-
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
Added all standard morphological transformations #541
Conversation
Please format your files with |
Nitpick: If the |
@meshtag I looked into comparing initial work on the morphological operations by @ayushbansal07 in PR #430 and your work, and I don't see a copying one to the other, but if you have used @ayushbansal07 's work in any way, then please credit him adding relevant copyright notice. I leave it to your judgement. One thing that Ayush does nicely is the Doxygen comments, so I'd suggest to look at those. It would be good if you could update your PR based on the latest changes in the You seem to be saving on whitespaces e.g. |
@meshtag If you update your PR from the latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a another round of my review which is mostly nitpicks about missing whitespaces.
@mloskot ,apologies for making so many whitespace errors and thanks a lot for your patience and effort pointing them out. |
There is no need to apologies, we're all learning. Please, consider @simmplecoder advice in #541 (comment) I noticed
or
|
Alright, this is probably last round of reviews. Please consider changes I suggested. To reformat files using my |
Formatting still is not correct @meshtag . I do not think it is worth dealing with it on your own. I can just send you a patch. The easy way to understand that the formatter is not getting it right is by looking at space count per indent. It is 2 at the moment, should be 4. |
Yes, @meshtag, although this may seem like an trivial annoyance, we want to fix any formatting issues before merge - the legacy code of GIL is already messy and we are slowly cleaning it up, so must keep new code as consistent as possible. |
No problem @mloskot , I am having trouble figuring out why appveyor build is failing . Do I need to change/correct something? |
@meshtag I think the key message of the log is
So, you don't need to do anything. Rather, I will have to think which AppVeyor job to kick out :) UPDATE: Done in 2676d31 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meshtag Could you hit the "Resolve conversation" button for each of the thread that you have addressed its comments? This way we will have a clearer picture of what has been done and what not. Thanks.
Second, if you update this PR with the latest develop
branch it will receive the AppVeyor fix.
compare-results.zip |
Thanks for the comparison. The results are looking good, I think. |
The code I used to get the results from opencv is
|
* Added all standard morphological transformations * Improved comments and some other things * Applied adviced changes * Applied adviced changes * Should handle grayscale dilation/erosion * Checking * Added test cases and improved code structure * Added command line control * Added command line control * Rectified some things * Rectified some more things * Improved comments * Improved comments * Improved doxygen comments and added more test cases * Improved compatibility for builds and rectifying whitespace use * Minor improvement in comments * Did clang formatting * pushed enum class inside namespace 'detail' and some other things * Should handle multichannel images * Clang formatting attempt * got rid of if/else comparators for target_element * Adds morphology.hpp declaration in boost/gil.hpp * Fix newline * (std::max)(a, b) instead of std::max(a, b) * Improved Formatting
* Added all standard morphological transformations * Improved comments and some other things * Applied adviced changes * Applied adviced changes * Should handle grayscale dilation/erosion * Checking * Added test cases and improved code structure * Added command line control * Added command line control * Rectified some things * Rectified some more things * Improved comments * Improved comments * Improved doxygen comments and added more test cases * Improved compatibility for builds and rectifying whitespace use * Minor improvement in comments * Did clang formatting * pushed enum class inside namespace 'detail' and some other things * Should handle multichannel images * Clang formatting attempt * got rid of if/else comparators for target_element * Adds morphology.hpp declaration in boost/gil.hpp * Fix newline * (std::max)(a, b) instead of std::max(a, b) * Improved Formatting
* Added all standard morphological transformations * Improved comments and some other things * Applied adviced changes * Applied adviced changes * Should handle grayscale dilation/erosion * Checking * Added test cases and improved code structure * Added command line control * Added command line control * Rectified some things * Rectified some more things * Improved comments * Improved comments * Improved doxygen comments and added more test cases * Improved compatibility for builds and rectifying whitespace use * Minor improvement in comments * Did clang formatting * pushed enum class inside namespace 'detail' and some other things * Should handle multichannel images * Clang formatting attempt * got rid of if/else comparators for target_element * Adds morphology.hpp declaration in boost/gil.hpp * Fix newline * (std::max)(a, b) instead of std::max(a, b) * Improved Formatting
Description
This pull request adds all standard morphological transformations in Boost Gil library.
Summary of applied morphological concepts:
argument 'iterations' in the dilate function.
argument 'iterations' in the erode function.
It is useful in removing noise.
It is useful in closing small holes inside the foreground objects, or small black points on the object.
The result will look like the outline of the object.
Functions have been made for applying above morphological transformations.
References
https://homepages.inf.ed.ac.uk/rbf/HIPR2/dilate.htm
https://homepages.inf.ed.ac.uk/rbf/HIPR2/erode.htm
https://docs.opencv.org/master/d9/d61/tutorial_py_morphological_ops.html
Tasklist