LSD: making the AGPL dependency optional #2578
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While Colmap itself is licensed with the permissive BSD license, the LSD dependency is AGPL. This basically means that any binary stemming from the codebase is AGPL as well, and thus cannot be used e.g. commercially. Other optional dependencies look okay (please correct me if I am wrong, e.g. CGAL can be turned off).
In this pull request I added the option to exclude LSD (similarly as can be done for CGAL). This affects the
model_orientation_aligner
module by removing theMANHATTAN-WORLD
option.The PR is related to issue #752. A possible alternative could be to use OpenCV solution (see the issue above and https://github.com/opencv/opencv/blob/2cd330486ec4597eab49c1575fc4a6603f205a6a/modules/imgproc/src/lsd.cpp#L167). OpenCV excluded this part for while, the re-added LSD after its crucial part https://github.com/rafael-grompone-von-gioi/binomial_nfa had been relincesed. I have also contacted the author of LSD (https://github.com/theWorldCreator/LSD) but got no response.