javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Hi, I am trying to use this method:
cvCheckArr

As a parameter I pass an IplImage and it compiles, but when I tried to run got this error:

"Unsupported format in function: cvCheckArr .cxmathfuncs.cpp "

I checked the above file and found from the code that it tries to convert the argument const CvArr* arr into a CvMat. The problem is that I pass an IplImage.

What I am trying to accomplish is to take the difference of 2 images and see if pixels of the result are lower than a certain threshold:

cvSub( frame, oldFrame, dst, NULL );
		
int diff = cvCheckArr(dst, /*flags*/ 0,/*min*/ 0,/*max*/ 120);

Don't mind the other values (0,0,120), the problem is that it doesn't run.
Do you know any other way to accomplish what I am trying to do?

Thanks.