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

Improve hsv based thresholding logic #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

timeamagyar
Copy link

Hi Justin,

First of all many thanks for sharing your computer vision project, it served as a very good starting point for one of my projects!
Meanwhile, i added a small improvement to your hsv based thresholding logic. Simplified the threshold computation logic using bitwise AND for all colors that are continuous and bitwise OR for the discontinuous color red. This way you do not have to make any explicit checks for negative values and you do not have to provide negative lower threshold values either. Also, do not know if this is intentional but in your picture you completely cut off the cool red portion by providing hThresholdLow = -359/360;

Cheers,
Timea

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.

None yet

1 participant