opencv4.1 -213:The function/feature is not implemented due original code license issues

今天使用opencv4.1,发现很大变化,记录如下:

一、很多CV_之类的参数都去掉了CV_,如CV_RETR_CCOMP不再适用于opencv4.1,请使用RETR_CCOMP
二、还有一些CV_参数换了一种写法,如CV_BGR2GRAY换成COLOR_BGR2GRAY、CV_MOP_OPEN换成MORPH_OPEN
三、几乎所有的Cv...不再支持,如CvPoint、CvPoint2D32f等都换成cv::Point
四、CV_StsUnmatchedFormats、CV_AA已经废弃
五、很多cv...参数也不再支持,换成cv::... 如cvSize换成了cv::Size
六、一些cv...函数换了写法,如cvFastArctan()换成了cv::fastAtan2()
七、报错说未实现的函数体,已经被移除cv作用域而添加到新增cv::ximgproc作用域中:
CV_Error(Error::StsNotImplemented, "Implementation has been removed due original code license issues");
OpenCV(4.1.0) /home/jpmv/Program/opencv4.0.1/opencv-4.1.0/modules/imgproc/src/lsd.cpp:143: error: (-213:The function/feature is not implemented) Implementation has been removed due original code license issues in function 'LineSegmentDetectorImpl'

OpenCV: terminate handler is called! The last OpenCV error is:
OpenCV(4.1.0) Error: Insufficient memory (Failed to allocate 2002210532 bytes) in OutOfMemoryError, file G:/MXCwork/2019/opencv4.1.0/opencv-4.1.0/modules/core/src/alloc.cpp, line 55
解决办法:
1、勾选OPENCV_ENABLE_NONFEE重新编译,无效
2、re-run CMAKE with WITH_WIN32UI, since you are on Windows, and eventually with WITH_QT. 无效
3、有效的方式:
#include <opencv2/ximgproc.hpp> //wd 20190508
#include <opencv2/line_descriptor/descriptor.hpp> //wd 20190508
using namespace cv::ximgproc;//wd 20190508

{
	...
	vector<Vec4f> lines;
	Ptr<cv::ximgproc::FastLineDetector> detector = cv::ximgproc::createFastLineDetector();
	detector->detect(roi, lines);
}

大家共勉:https://docs.opencv.org/4.1.0/d1/d9e/fld_lines_8cpp-example.html  

 

评论 14
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

元气少女缘结神

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值