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 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 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
Copy link
Member

mloskot left a comment

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

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

This comment has been minimized.

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

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 force-pushed the miralshah365:otsu_threshold branch from 589fb28 to 36c8734 Jul 18, 2019
closes #311
@miralshah365 miralshah365 force-pushed the miralshah365:otsu_threshold branch from 36c8734 to 97f2f6a Jul 18, 2019
@miralshah365 miralshah365 merged commit 6bdc48c into boostorg:develop Jul 19, 2019
9 checks passed
9 checks passed
boostorg.gil Build #20190718.8 succeeded
Details
boostorg.gil (macos1013_xcode91_cmake) macos1013_xcode91_cmake succeeded
Details
boostorg.gil (ubuntu1604_gcc5_cxx11_cmake) ubuntu1604_gcc5_cxx11_cmake succeeded
Details
boostorg.gil (ubuntu1604_gcc8_cxx14_cmake) ubuntu1604_gcc8_cxx14_cmake succeeded
Details
boostorg.gil (win2012_vs2015_cmake) win2012_vs2015_cmake succeeded
Details
boostorg.gil (win2016_vs2017_cxx14_cmake) win2016_vs2017_cxx14_cmake succeeded
Details
boostorg.gil (win2016_vs2017_cxx17_cmake) win2016_vs2017_cxx17_cmake succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
[gsoc2019] Image Processing Algorithms automation moved this from In progress to Done Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.