Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I convert an OpenCV Mat of type CV_8UC3 pixel data to an unsigned int* in ARGB format?

I need a pointer unsigned int* data, such that,

an unsigned int (32 bits) holds a pixel in ARGB format, which from left to right is as follows:

the first 8 bits are for the alpha channel (and are ignored) the next 8 bits are for the red channel the next 8 bits are for the green channel the last 8 bits are for the blue channel

click to hide/show revision 2
No.2 Revision

updated 2013-10-17 11:57:34 -0600

berak gravatar image

How can I convert an OpenCV Mat of type CV_8UC3 pixel data to an unsigned int* in ARGB format?

I need a pointer unsigned int* data, such that,

an unsigned int (32 bits) holds a pixel in ARGB format, which from left to right is as follows:

the first 8 bits are for the alpha channel (and are ignored) the next 8 bits are for the red channel the next 8 bits are for the green channel the last 8 bits are for the blue channelchannl