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

Warning of sharp corners or cusps #16

Merged
merged 3 commits into from
Jun 8, 2023
Merged

Conversation

mawc2019
Copy link
Collaborator

In this PR, the Harris corner detector from OpenCV is used for detecting sharp corners or cusps in binary images. If a sharp corner or cusp is detected, a warning message will be printed out.
The detection is not successful in every cases. A feature may be mistakenly classified as a sharp corner or cusp if the resolution is too low. On the other hand, a sharp corner or cusp may not be recognized if the angle is smaller than ~30° or larger than ~120°. Changing some parameters can easily increase the true positive rate, but also increase the false positive rate. This issue was partially investigated here.

@stevengj
Copy link
Contributor

stevengj commented Jun 1, 2023

There should definitely be a way to turn this off.

@mawc2019
Copy link
Collaborator Author

mawc2019 commented Jun 1, 2023

A boolean argument warn_cusp is added. If True, warning will be given when the input 2d image is likely to contain sharp corners or cusps; if False, warning will not be given. The default option is False.

@stevengj stevengj merged commit 0e0262d into NanoComp:main Jun 8, 2023
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