Skip to content

Add HSV colour-space segmentation (lighting-robust colour location)#349

Merged
JE-Chen merged 2 commits into
devfrom
feat/hsv-segment-batch
Jun 22, 2026
Merged

Add HSV colour-space segmentation (lighting-robust colour location)#349
JE-Chen merged 2 commits into
devfrom
feat/hsv-segment-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 22, 2026

Copy link
Copy Markdown
Member

find_color_region masks in RGB with a per-channel ± box — it can't match "the same colour at a different brightness" (status lights, highlights, theme tints). HSV separates hue from saturation/value, so a hue band + S/V floor catches every shade across lighting.

  • dominant_hue_regions (AC_dominant_hue_regions): constrains only huehue_tol) plus a sat_min/val_min floor, returning blob boxes at any brightness. Red's 0/180 hue wrap is handled automatically (two-range OR).
  • segment_hsv (AC_segment_hsv): explicit lower_hsv..upper_hsv band → blob boxes. color_mask returns the raw uint8 mask.
  • Reuses the shared cv2_utils.blobs.connected_boxes helper; injectable RGB haystack → headless-testable (synthetic bright + dark red prove the brightness-invariance RGB can't do). Base OpenCV only, lazy imports. Wired through all 5 layers + headless test + EN/Zh docs + WHATS_NEW. Qt-free.

@codacy-production

codacy-production Bot commented Jun 22, 2026

Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit 63e1bfe into dev Jun 22, 2026
15 of 16 checks passed
@JE-Chen JE-Chen deleted the feat/hsv-segment-batch branch June 22, 2026 23:15
@sonarqubecloud

Copy link
Copy Markdown

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