Skip to content

Add MSER text-region detection (find text without OCR)#350

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

Add MSER text-region detection (find text without OCR)#350
JE-Chen merged 1 commit into
devfrom
feat/text-regions-batch

Conversation

@JE-Chen

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

Copy link
Copy Markdown
Member

shape_locator finds rectangles (not text) and locate_text needs an OCR engine and the exact string — neither answers "where is any text on screen?".

  • find_text_regions (AC_find_text_regions): MSER glyph/word blobs as {x,y,width,height,area,center}, largest first. merge unions MSER's nested per-glyph regions; min_area/max_area/max_aspect filter; the whole-frame extremal region is dropped so a blank screen returns [].
  • find_text_lines (AC_find_text_lines): groups glyph boxes within y_tolerance px into one box per line — crop and feed to OCR (faster + more accurate than full-frame), or detect a label appeared with no OCR dependency installed.
  • cv2.MSER_create is base OpenCV (no contrib); reuses visual_match._haystack_gray (no copied loader); injectable haystack → headless-testable on synthetic two-row text. Wired through all 5 layers + headless test + EN/Zh docs + WHATS_NEW. Qt-free.

@JE-Chen JE-Chen merged commit c8b7b73 into dev Jun 22, 2026
15 of 16 checks passed
@JE-Chen JE-Chen deleted the feat/text-regions-batch branch June 22, 2026 23:54
@codacy-production

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.

@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