Fix HSV hue range handling and deprecated OpenCV trackbar API in tuner#1982
Open
fspindle wants to merge 2 commits into
Open
Fix HSV hue range handling and deprecated OpenCV trackbar API in tuner#1982fspindle wants to merge 2 commits into
fspindle wants to merge 2 commits into
Conversation
…pointer-based overloads) Support H min > H max by treating the hue range as circular. Since hue is defined modulo 360 degrees, a threshold like [170, 10] should select values that wrap around from 170 to 255 and from 0 to 10, instead of being always false as before. When h_low <= h_high, the check remains a classic inclusive range; when h_low > h_high, the check becomes a union of [h_low, max] and [min, h_high].
…ner.cpp - Replace the deprecated cv::createTrackbar() usage that passes a pointer to be written directly by OpenCV (raises "Using 'value' pointer is unsafe and deprecated" warnings since OpenCV 4.x). Trackbars are now created with a null value pointer and the new value is instead retrieved from the callback's "val" parameter, guarded by VISP_HAVE_OPENCV_VERSION >= 0x040000 to keep the old behavior for OpenCV 3.x. - Initialize trackbar positions from the loaded YAML calibration via cv::setTrackbarPos() so the new callback-based flow starts with the correct values. - Rename the detection window to "Object Color Segmentation" and clarify on-screen mouse click instructions.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1982 +/- ##
==========================================
- Coverage 48.71% 48.71% -0.01%
==========================================
Files 532 532
Lines 69402 69404 +2
Branches 32436 32434 -2
==========================================
Hits 33810 33810
Misses 31445 31445
- Partials 4147 4149 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.