I am trying to get information from an image using the cvGet2D function in OpenCV.
I created an array of 10 IplImage pointers:
IplImage *imageArray[10];
and I save 10 images from a webcam:
imageArray[numPicture] = cvQueryFrame(capture);
when i call the function:
info = cvGet2D(imageArray[0], 250, 100);
where info :
CvScalar info;
I got an error:
OpenCV error: invalid argument (unrecognized or unsupported array type) in cvPtr2D, file / build / buildd / opencv -2.1.0 / src / cxcore / cxarray.cpp, line 1824
terminate call after calling instance 'cv :: Exception'
what (): / build / buildd / opencv-2.1.0 / src / cxcore / cxarray.cpp: 1824: error: (-5) unrecognized or unsupported array type in cvPtr2D function
If I use the cvLoadImage function to initialize the IplImage pointer and then pass it to the cvGet2D function, the code works correctly:
IplImage* imagen = cvLoadImage("test0.jpg"); info = cvGet2D(imagen, 250, 100);
however, I want to use information already stored in my array.
Do you know how I can solve it?
source share