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 requested a review from mloskot Jun 21, 2019
@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 Jun 23, 2019
Copy link
Member

@mloskot mloskot left a comment

@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 status/work-in-progress labels Jun 23, 2019
Copy link
Member

@mloskot mloskot left a comment

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

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

@mloskot 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

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
@miralshah365 miralshah365 force-pushed the otsu_threshold branch 3 times, most recently from 13b47d9 to 1c24ffa Compare Jul 10, 2019
Copy link
Member

@mloskot mloskot left a comment

@miralshah365 LGTM! Feel free to merge.

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

@mloskot mloskot added this to the Boost 1.72+ milestone Jul 18, 2019
@miralshah365 miralshah365 merged commit 6bdc48c into boostorg:develop Jul 19, 2019
9 checks passed
[gsoc2019] Image Processing Algorithms automation moved this from In progress to Done Jul 19, 2019
@mloskot mloskot added google-summer-of-code and removed status/work-in-progress 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 google-summer-of-code
Development

Successfully merging this pull request may close these issues.

2 participants