-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add distance transform functionality #594
base: develop
Are you sure you want to change the base?
Add distance transform functionality #594
Conversation
Aside from the first wikipedia test, all other test have been verified with openCV.
|
Codecov Report
@@ Coverage Diff @@
## develop #594 +/- ##
===========================================
+ Coverage 78.72% 79.41% +0.69%
===========================================
Files 118 119 +1
Lines 5034 5204 +170
===========================================
+ Hits 3963 4133 +170
Misses 1071 1071 |
Use constexpr wherever preferred; Replace static const bool by inheriting std::true_type or std::false_type in metafunctions.
Moves 2 metafunctions: check_mask_size and check_distance_type to detail namespace and prefixes them with 'dt' (distance_transform) to avoid naming conflicts.
Uses the clang-format configuration provided in the latest commit of PR boostorg#596. Formatting is applied to test file and example file as well. I have made no changes whatsoever after using the clang-format.
As you might have noticed at some places (especially in the test file) reformatting should have been done after using clang-format, but I had a feeling to keep things as they are after they have been automatically formatted. Let me know about your preferences on this. Note that the second last commit has proper manual formatting. |
It is fine to try format any new code using the |
Description
Adds Distance Transform functionality to GIL, using algorithms which run in linear time in the worst case.
References
Precise Euclidean distance transform -
http://www.theoryofcomputing.org/articles/v008a019/v008a019.pdf
Manhattan and chessboard distance transforms -
Principles of Digital Image Processing - core Techniques by Wilhelm Burger, Mark J.Burge.
Approximate Euclidean distance transform -
http://www.cmm.mines-paristech.fr/~marcoteg/cv/publi_pdf/MM_refs/1986_Borgefors_distance.pdf
Tasklist