i have passed a lot of time searching on how to convert from cv::Mat or CvMat to CvArr but with no gain ,please help me in that,thanks.
convert first the image using the following:
IplImage* oldstyleimg = &matimg.operator IplImage()
I don t remember if it only create the header for the image or it makes a copy