Skip to content
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

[gsoc2019] Otsu threshold implemented #314

Merged
merged 1 commit into from
Jul 19, 2019

Conversation

miralshah365
Copy link
Contributor

@miralshah365 miralshah365 commented Jun 21, 2019

Description

New method threshold_optimal introduced. In this method, the user does not need to specify any threshold value but is chosen by the Otsu's algorithm. More details about the algorithm can be found in the reference.

If the image is multi-channel then the algorithm is applied on each channel. If the image has channel depth more than 8bit then each channel is normalized to fit in the range from 0 to 255.

References

closes #311
http://www.labbookpages.co.uk/software/imgProc/otsuThreshold.html

Tasklist

  • Add test case(s)
  • Ensure all CI builds pass
  • Review and approve

@miralshah365 miralshah365 self-assigned this Jun 21, 2019
@miralshah365 miralshah365 changed the title Otsu threshold implemented [gsoc2019]Otsu threshold implemented Jun 21, 2019
@mloskot mloskot marked this pull request as ready for review June 23, 2019 10:40
Copy link
Member

@mloskot mloskot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miralshah365 This looks good.

Here is my first batch of comments clearing some trivial aspects of the code.

Could you also try to update your PR against latest develop where Olzhas merged his PR,
and you will need to resolve the conflict in test/core/image_processing/Jamfile.
When you will be updating, please do regular true git merge and git push,
but not git rebase and git push --force.
The issue is that rebase and forced-push update lose tracking of history of review comments.


Later today, I will do another round of comments and run proper testing of your code.

include/boost/gil/image_processing/threshold.hpp Outdated Show resolved Hide resolved
include/boost/gil/image_processing/threshold.hpp Outdated Show resolved Hide resolved
include/boost/gil/image_processing/threshold.hpp Outdated Show resolved Hide resolved
include/boost/gil/image_processing/threshold.hpp Outdated Show resolved Hide resolved
include/boost/gil/image_processing/threshold.hpp Outdated Show resolved Hide resolved
include/boost/gil/image_processing/threshold.hpp Outdated Show resolved Hide resolved
include/boost/gil/image_processing/threshold.hpp Outdated Show resolved Hide resolved
include/boost/gil/image_processing/threshold.hpp Outdated Show resolved Hide resolved
@mloskot mloskot changed the title [gsoc2019]Otsu threshold implemented [gsoc2019] Otsu threshold implemented Jun 23, 2019
@mloskot mloskot added cat/feature New feature or functionality status/work-in-progress Do NOT merge yet until this label has been removed! labels Jun 23, 2019
Copy link
Member

@mloskot mloskot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miralshah365 Please, "Resolve conversation" for addressed comments.

include/boost/gil/image_processing/threshold.hpp Outdated Show resolved Hide resolved
@mloskot
Copy link
Member

mloskot commented Jun 28, 2019

@miralshah365 I've started discussion related to review of this PR (and previous #310 feature too),. Please, see the thread Global binarization vs multi-channel binarization

Copy link
Member

@mloskot mloskot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review with suggestion for better naming of variables

  • self-descriptive and evident
  • C++ standard library-like, but not of form of any CamelCase

include/boost/gil/image_processing/threshold.hpp Outdated Show resolved Hide resolved
Copy link
Member

@mloskot mloskot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miralshah365 LGTM! Feel free to merge.

Please, consider adding a test case with gray8_image_t (in separate PR).

@miralshah365 miralshah365 merged commit 6bdc48c into boostorg:develop Jul 19, 2019
@mloskot mloskot added google-summer-of-code All items related to GSoC activities and removed status/work-in-progress Do NOT merge yet until this label has been removed! labels Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat/feature New feature or functionality google-summer-of-code All items related to GSoC activities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[gsoc2019] Implement Otsu's thresholding method
2 participants