Skip to content

Scene-break detection by recurrence -> <hr> #22

Description

@Arkoniak

In-chapter section dividers render as small images (Surya Picture / Unlimited extracted raster),
not semantic breaks. Detect at book level by recurrence and emit <hr> in the HTML.

Depends on: #30 (build_html.py provides the HTML stream; picture blocks are already identified
by label = 'picture' in voted_tokens, with image paths from Unlimited's raster extraction).

Detection algorithm:

  • Collect all picture blocks across the book; crop by bbox (or use Unlimited's extracted files)
  • Perceptual-hash (dHash/aHash) + cluster: large near-identical cluster of small centered crops
    = the divider ornament → replace with <hr> in the HTML
  • A real illustration is unique and/or large — separable from the divider by size + uniqueness
  • Chapter-heading ornaments also recur but at a stable vertical position (top of first page of
    chapter) — separable within the cluster by page position
  • Cover textual * * * / *** variants too

See brainstorm Layer 4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions