Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

please NEVER abuse Mat::at for anything on the whole image.

if you wanted a 3 channel, single column Mat it would be a simple:

Mat res = img.reshape(3,;

for 1 channel, and 3 colums it would be:

Mat res = img.reshape(1,;

(imho, you're entirely overcomplicating this...)