Skip to content

Add colour-histogram fingerprint and change detection#356

Merged
JE-Chen merged 1 commit into
devfrom
feat/img-histogram-batch
Jun 23, 2026
Merged

Add colour-histogram fingerprint and change detection#356
JE-Chen merged 1 commit into
devfrom
feat/img-histogram-batch

Conversation

@JE-Chen

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

Copy link
Copy Markdown
Member

image_dedup fingerprints with a perceptual aHash/dHash (a spatial hash, brittle to colour/theme shifts) and color_stats reports one average/dominant colour. A normalized colour histogram is the standard illumination/scale-robust "is this the same view, or has the palette shifted?" signal (theme switch, content reload, rotated banner).

  • image_histogram (AC_image_histogram): per-channel normalized histogram as a flat list; space hsv/rgb/gray, bins per channel.
  • compare_histograms: correlation / chisqr / intersection / bhattacharyya (similarity vs distance methods).
  • histogram_changed (AC_histogram_changed): compares a reference against the live screen / current image, auto-flipping the threshold direction for similarity vs distance methods.
  • Reuses color_region's RGB loader (no copy); injectable image → headless-testable (synthetic swapped-palette proves the change detection). Base OpenCV (cv2.calcHist/compareHist). Wired through all 5 layers + headless test + EN/Zh docs + WHATS_NEW. Qt-free.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 28 complexity · 0 duplication

Metric Results
Complexity 28
Duplication 0

View in Codacy

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 082632d into dev Jun 23, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/img-histogram-batch branch June 23, 2026 02:46
@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