Ask Your Question

Conversion between IplImage and MxArray

asked 2012-07-17 14:02:55 -0500

Josiah gravatar image

I am working on a project that accepts stream of images from a webcam through CvCapture, detect the face of the user through cvHaarDetectObjects() from each image and then send the image and its detected face locations to Matlab through Matlab engine. Then it will further be processed in Matlab. So my problem is how I can convert the Iplimage(gray-scale) of the detected face to MxArray variable and pass it as a 2D matrix to the Matlab through the Matlab engine. If anyone has any idea, please let me know.


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-07-17 15:17:52 -0500

AlexanderShishkov gravatar image
edit flag offensive delete link more


Thanks for you suggestion, I solved the problem. I used cvGetRawData(img, (uchar**)&data) function from this link:

Josiah gravatar imageJosiah ( 2012-09-11 12:59:38 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2012-07-17 14:02:55 -0500

Seen: 669 times

Last updated: Jul 17 '12