OpenCV C++ and cvSmooth

后端 未结 2 1667
误落风尘
误落风尘 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: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.

提交回复
热议问题