cvPyrMeanShiftFiltering()用的不对吗,为什么会出现异常:
opencvhello.exe 中的 0x75369673 处未处理的异常: Microsoft C++ 异常: 内存位置 0x0012e310 处的 cv::Exception。
#include"cv.h"
#include"highgui.h"int main(){
IplImage* img = cvLoadImage("1.jpg");
IplImage* rgb=cvCreateImage(cvSize(img->width,img->height),img->depth,3);
cvPyrMeanShiftFiltering(img,rgb,20,40,2);
cvNamedWindow( "Example1",CV_WINDOW_AUTOSIZE);
cvShowImage("Example1",rgb);
cvWaitKey(0);
cvReleaseImage(&img);
cvReleaseImage(&rgb);
cvDestroyWindow("Example1");
return 0;
}