Skip to content

Limit HSV hue trackbars to the OpenCV hue range - #301

Open
Aschenbath wants to merge 1 commit into
PyImageSearch:masterfrom
Aschenbath:codex/oss20-20261122-de52-imutils-hue
Open

Aschenbath wants to merge 1 commit into
PyImageSearch:masterfrom
Aschenbath:codex/oss20-20261122-de52-imutils-hue

Conversation

@Aschenbath

Copy link
Copy Markdown

The range detector uses COLOR_BGR2HSV, whose 8-bit hue range is 0–179. Set both hue slider limits to 179 and initialize H_MAX to 179; saturation, value and RGB channels retain their 0–255 ranges.

Fixes #291.

Validation: The unittest regression checks all six sliders in both HSV and RGB modes. It fails on the original source and passes after the change. GUI calls are mocked; no camera or display is required.

Developed with AI assistance; the changes and validation results were reviewed before submission.

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.

xhttps://github.com/PyImageSearch/imutils/blob/master/bin/range-detector limit range MAX for h in hsv to 179

1 participant