In my project i already have camera output in a buffer ProcessFrames(unsigned char *RefFrame,unsigned char *CurrentFrame, int width,int height) // i need to do processing on frames
IplImage *ReferenceImage = cvCreateImageHeader(cvSize(width,height),IPL_DEPTH_8U,1);
IplImage *CurrentImage = cvCreateImageHeader(cvSize(width,height),IPL_DEPTH_8U,1);
IplImage *ResultImage = cvCreateImageHeader(cvSize(width,height),IPL_DEPTH_8U,1);
cvSetData( ReferenceImage, RefFrame, width );
cvSetData( CurrentImage, CurrentFrame, width ); //here already create image header has allocated size so what is the reason for the crash
after core dump i get the message
OpenCV Error: Bad argument (Unknown array type) in cvarrToMat Downloads/opencv-2.4.7/modules/core/src/matrix.cpp, line 698 terminate called after throwing an instance of 'cv::Exception' what(): Downloads/opencv-2.4.7/modules/core/src/matrix.cpp:698: error: (-5) Unknown array type in function cvarrToMat