OpenCV C++ and cvSmooth

后端 未结 2 1664
误落风尘
误落风尘 2021-01-24 02:54

Anyone know what could be problem:

cvSmooth(origImage, grayImage1, CV_BLUR,3);

I received error:

error: cannot convert `cv::Mat\         


        
相关标签:
2条回答
  • 2021-01-24 03:30

    Be careful not to mix the OpenCV 1.x API (CvArr) with the 2.x API (cv::Mat). I guess you tried an example from somewhere.

    0 讨论(0)
  • 2021-01-24 03:36

    cv::Mat is a new structure from the C++ version of OpenCV. cvSmooth() is from the old C API. Do not mix the C interface with the C++!

    I'll suggest that you take a moment to read the introduction.

    Also, if you check opencv/modules/imgproc/src/smooth.cpp you'll see that cv::boxFilter() is the equivalent for cvSmooth(CV_BLUR) on the new C++ interface.

    0 讨论(0)
提交回复
热议问题