Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

imho, you're confusing the type of the input buffer (which will be a Mat or a vector of uchar bytes) with the type of the final image.

think of a file on disk. though it's bytes all the way down, you can decompress it, and rearrange the image pixels to various other formats, bgr, 16bit, float, whatever. this is, what's meant here. if your bytes (like on disk) represent a bgr image, should it get converted to grayscale or not ? should an alpha channel get discarded or not ? like that.

imho, you're confusing the type of the input buffer (which will be a Mat or a vector of uchar bytes) with the type of the final image.

think of a file on disk. though it's bytes all the way down, you can decompress it, and rearrange the image pixels to various other formats, bgr, 16bit, float, whatever. whatever (this information is stored in the image header, preceeding the pixels) . this is, what's meant here. if your bytes (like on disk) represent a bgr image, should it get converted to grayscale or not ? should an alpha channel get discarded or not ? like that.