Files
breakpilot-lehrer/klausur-service/backend/ocr/pipeline/page_crop.py
Benjamin Admin 0504d22b8e
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 29s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 2m25s
CI / test-python-agent-core (push) Successful in 19s
CI / test-nodejs-website (push) Successful in 20s
Restructure: Move ocr_pipeline + labeling + crop into ocr/ package
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-25 21:51:43 +02:00

34 lines
835 B
Python

"""
Page Crop — Barrel Re-export
Content-based crop for scanned pages and book scans.
Split into:
- page_crop_edges.py — Edge detection (spine shadow, gutter, projection)
- page_crop_core.py — Main crop algorithm and format detection
All public names are re-exported here for backward compatibility.
License: Apache 2.0
"""
# Core: main crop functions and format detection
from .page_crop_core import ( # noqa: F401
PAPER_FORMATS,
detect_page_splits,
detect_and_crop_page,
_detect_format,
)
# Edge detection helpers
from .page_crop_edges import ( # noqa: F401
_INK_THRESHOLD,
_MIN_RUN_FRAC,
_detect_spine_shadow,
_detect_gutter_continuity,
_detect_left_edge_shadow,
_detect_right_edge_shadow,
_detect_top_bottom_edges,
_detect_edge_projection,
_filter_narrow_runs,
)