Skip to content

Add Hough line / grid / separator detection#351

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

Add Hough line / grid / separator detection#351
JE-Chen merged 1 commit into
devfrom
feat/edge-lines-batch

Conversation

@JE-Chen

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

Copy link
Copy Markdown
Member

grid_locator clusters already-found boxes and shape_locator finds closed rectangles — neither finds a table's ruling lines or a UI divider from raw pixels.

  • find_lines (AC_find_lines): Canny + probabilistic Hough segments as {x1,y1,x2,y2,angle,length,orientation} (horizontal/vertical/diagonal), longest first, with an orientation filter.
  • find_grid (AC_find_grid): clusters horizontal rules → rows, vertical rules → cols, returns {rows, cols, cells} so you can address "row 3, col 2".
  • find_separators (AC_find_separators): merged coordinates of long divider lines along an axis.
  • Reuses visual_match._haystack_gray (no copied loader); injectable haystack → headless-testable on a synthetic 3×3 grid (blank → no lines). Base OpenCV (cv2.HoughLinesP), lazy imports. Wired through all 5 layers + headless test + EN/Zh docs + WHATS_NEW. Qt-free.

@JE-Chen JE-Chen merged commit 97b549b into dev Jun 23, 2026
15 of 16 checks passed
@JE-Chen JE-Chen deleted the feat/edge-lines-batch branch June 23, 2026 00:07
@sonarqubecloud

Copy link
Copy Markdown

@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.

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