Skip to content

Add localized motion / activity detection (absdiff)#357

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

Add localized motion / activity detection (absdiff)#357
JE-Chen merged 1 commit into
devfrom
feat/motion-regions-batch

Conversation

@JE-Chen

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

Copy link
Copy Markdown
Member

Three near-neighbours, all distinct: wait_until_screen_stable is a boolean poll loop; ssim_changed_regions is structural (illumination-tolerant, ignores fast pixel motion); diff_screenshots isn't framed as activity blobs + score. This is the cheap absdiff path: which sub-regions are moving between two frames.

  • changed_regions (AC_changed_regions): threshold the per-pixel difference, denoise (blur), dilate, return moved-region boxes ({x,y,width,height,area,center}, largest first, >= min_area).
  • has_motion (AC_has_motion): boolean + activity_score (fraction of pixels moved).
  • Two injectable frames (size-mismatch raises ValueError); reuses visual_match._to_gray + cv2_utils.blobs.connected_boxes (no copies); after defaults to a live screen grab in the executor. Headless-testable on synthetic frames. 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 20 complexity · 0 duplication

Metric Results
Complexity 20
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 1ceceff into dev Jun 23, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/motion-regions-batch branch June 23, 2026 02:59
@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