Skip to content

Fix HSV hue range handling and deprecated OpenCV trackbar API in tuner#1982

Open
fspindle wants to merge 2 commits into
lagadic:masterfrom
fspindle:hsv_hue_handling
Open

Fix HSV hue range handling and deprecated OpenCV trackbar API in tuner#1982
fspindle wants to merge 2 commits into
lagadic:masterfrom
fspindle:hsv_hue_handling

Conversation

@fspindle

@fspindle fspindle commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

fspindle added 2 commits July 8, 2026 11:19
…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

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.71%. Comparing base (ad2ff38) to head (464b643).
⚠️ Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
modules/core/src/image/vpImageTools.cpp 0.00% 6 Missing ⚠️
modules/core/include/visp3/core/vpImageTools.h 0.00% 3 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant