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

Fixes for compiling and using min threshold #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dineiar
Copy link

@dineiar dineiar commented Sep 7, 2020

  • The code didn't compile due to using img.toGrayScale() instead of just toGrayScale()
  • The minimum threshold was being effectively ignored due to a flawed check in the if at canny.cpp#L274.
  • Other minor adjustments include a Makefile to provide standard compilation, waitKey to keep the image output open until some key is pressed, relative file path, and removing an unnecessary verification.

thres = Mat(threshold(non, 20, 40)); //Double Threshold and Finalize

namedWindow("Original");
thres = Mat(threshold(non, 30, 50)); //Double Threshold and Finalize
Copy link
Author

Choose a reason for hiding this comment

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

Adjusted the min-max threshold due to the fix in line 276.

@charlesnchr
Copy link

Thanks for pointing these issues out — it helped me as I was debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants