Is there any c++ opencv interface that can do the same operation of these two functions?
Hi, I'm actually using these two functions in this way
IplImage *image;
ARUint8 *dataPtr; // unsigned chars, in format ARGB
cv::Size size;
//do stuff
image = cvCreateImage(*size, IPL_DEPTH_8U, channels );
cvSetImageData( image, dataPtr, size->width * channels );
The fitst one creates is used to initialize an empty IplImage *image, the second one to copy the raw data from an external source (dataPtr) to the image itself.
I know that the first one should be trivial, replacing the IplImage con un cv::Mat, the problem is that I don't know how to pass the parameter "IPL_DEPTH_8U" to the constructor.
To copy the data with the c++ interface, i have no clue...
PS: ARUint8 *dataPtr is my source of data, I cannot have another source, but then I need to convert it to opencv data representation
Thanks in advance!