Fastest between mat of Vec2 or 2 Mat <p>I have a question concerning access speed of OpenCV matrix.</p> <p>I currently need two channels of unsigned char to contain my data. But at one point i need to split my data to process them separately (which probably results in a matrix copy)</p> <pre><code>for( auto ptr = ROI.begin&lt;cv::Vec2b&gt;(); ptr!=ROI.end&lt;cv::Vec2b&gt;();ptr++){ //insert values } cv::split(ROI,channels_vector) process(channels_vector[0]); process(channels_vector[1]); more_stuff(ROI); </code></pre> <p>My question is the following : Should I use two different matrix at the beginning to avoid the split or let it like this ? Or as it may depend on my computation what is the difference of cost between two accesses of a matrix and a matrix copy ?</p>