如何在 opencv 4.1.0 中实现 LSD

Abh*_*jet 6 python opencv

我在我的开放简历项目中实施了 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'
Run Code Online (Sandbox Code Playgroud)

似乎由于某些许可问题,此功能已被删除。我该如何解决这个问题。

错误显示在代码的以下部分:

cv2.createLineSegmentDetector(0)
Run Code Online (Sandbox Code Playgroud)

小智 2

这里有一个较旧的线段检测器实现,带有 python、matlab 的绑定

$ pip install pylsd

为我工作