-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Restore LineSegmentDetector LSD & avoid license conflict #2524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That would be very useful because LSD line detector is very useful and robust. |
Currently working on it. |
This is not enough. Even derived work from GPL code is not allowed due GPL copyleft license. |
As an alternative, I use the original implementation with a python wrapper |
Based on the latest post in #2016, it seems like the author of the blog post realized the license issue, and released in a compatible license. Does this mean LineSegmentDetector can be added back into 4.x? |
Unfortunately problem is much wider than mentioned function which compares floating-point values. |
If someone (I could try) took the time to implement from scratch, then it would be fine? |
i am happy to annonce that after i send an e-mail to @rafael-grompone-von-gioi he kindly published his Computation of a NFA related to a binomial distribution code with MIT licence. He also states he will be happy to help on restoration of LDS Algorithm in OpenCV. thank you @rafael-grompone-von-gioi for your great work. |
Hey all, I wanted to let you know I've written a partial implementation of the Line Segment Detector paper. It works, but unlike the paper, it relies on a density heuristic for filtering lines, instead of the NFA heuristic in the paper. I wasn't able to write a numerically-stable implementation of the NFA function. This is why it's a partial implementation. @rafael-grompone-von-gioi I hope this can serve as a good launchpad to write a full implementation. I'm more than happy to collaborate on it! EDIT: I should add that if we can add a stable NFA implementation, I'll be happy to merge my work into |
Hi Yusuf,
Thank you for your email. I’happy to collaborate. Unfortunately, I will
not be able to work on this for about two weeks, I’m overloaded with
important work. So now I just send some short comments.
I think the NFA validation is core of the LSD method; without that it is
not the LSD method. Without the NFA step is more similar to a variation of
Burns et al. method than to LSD. So I would be happy to help to include
the NFA part.
I saw you are working on a python implementation. But, LSD was already in
OpenCV before. Why not using the same implementation and only updating the
parts where there were doubts about the license? This should be minimal
work.
Best,
rafael
…On Sun 9 May 2021 at 20:05, Yusuf Olokoba ***@***.***> wrote:
Hey all, I wanted to let you know I've written a partial implementation
of the Line Segment Detector paper
<https://github.com/hdkai/Line-Segment-Detector>. It works, but unlike
the paper, it relies on a density heuristic for filtering lines, instead of
the NFA heuristic in the paper. I wasn't able to write a numerically-stable
implementation of the NFA function. This is why it's a partial
implementation.
@rafael-grompone-von-gioi <https://github.com/rafael-grompone-von-gioi> I
hope this can serve as a good launchpad to write a full implementation. I'm
more than happy to collaborate on it!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2524 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACVV4SZS3AUQM25MB4TE2ETTM4IMDANCNFSM4M45NBOQ>
.
|
Hey @rafael-grompone-von-gioi , thanks for the quick response. I have inline responses below:
This is no rush at all. We can get to it whenever you are available.
I agree. My implementation was just a quick way to get going, because as I mentioned earlier I wasn't able to compute the NFA.
My implementation is actually a Cython hybrid, and it has been hand-optimized to run as fast as possible. My understanding was that the OpenCV implementation was completely off limits because of the Affero license, so I had to start from scratch. I chose to write it in Cython for speed. I'm happy to rewrite the implementation in C++ if needed. |
@alalek can i prepare a patch to revert commits removing LSD and other algos using NFA? |
@sturkmen72 Sure! |
relates opencv/opencv#13942 |
Restored in 4.5.4 release. Thanks @sturkmen72 for the efforts! |
Concerning the removal of LSD due to original code license conflict, it would be a great earning for the community to restore it back by modifying the code in order to avoid license conflict.
The original license conflict issue: #2016
Proposal:
Find an alternative way to "Compare doubles by relative error" as in original modules/line_descriptor/include/opencv2/line_descriptor/descriptor.hpp between lines 625 and 824.
The text was updated successfully, but these errors were encountered: