I want to write data directly to the imageData array from IplImage, but I can not find much information about how it is formatted. What bothers me most is that despite creating an image with three channels, each pixel has four bytes.
The function I use to create the image:
IplImage *frame = cvCreateImage(cvSize(1, 1), IPL_DEPTH_8U, 3);
According to all indications, this should create a three-channel RGB image, but this does not seem to be the case.
How could I, for example, write one red pixel to this image?
Thanks for any help, it puzzles me.
source
share