我在我的开放式简历项目中实现了LSD。在我将opencv版本从4.0.0升级到4.1.0之前,一切都运行得很好。现在我得到的错误是
cv2.error: OpenCV(4.1.0) /io/opencv/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'似乎由于一些许可证问题,此功能已被删除。我该如何解决这个问题。
错误显示在以下代码部分中:
cv2.createLineSegmentDetector(0)发布于 2020-02-12 18:06:40
在OpenCV4中,它现在被称为FastLineDetector。首先需要使用pip install opencv-contrib-python安装opencv-contrib-python,然后可以使用以下实现
img = cv2.imread(test_image, 0)
fld = cv2.ximgproc.createFastLineDetector()
lines = fld.detect(img)
result_img = fld.drawSegments(img,lines)发布于 2019-06-15 06:48:35
https://stackoverflow.com/questions/56016650
复制相似问题