Reputation: 315
I'm using some old C code that uses the old deprecated IplImage
type.
I'm using the new OpenCV 2.3.1 for Android, and the images I get from the camera are CvMat
s. I want to convert them to IplImage
so I can pass it to the native function.
Alternatively, I could modify the original function to accept a CvMat
and convert it to IplImage
inside the body of the function, but I need to do this in C NOT C++.
Upvotes: 1
Views: 1389
Reputation: 44128
Use cvGetImage
:
IplImage tmp;
IplImage* result = cvGetImage((CvArr*) mat, &tmp);
Upvotes: 6