Spline-Guided Segmentation: A New Era in AI-Driven Handwritten Text Recognition
V. Zalizko
International Innovation Centr for Artificial Intelligence, ETH
https://orcid.org/0000-0001-5362-8270
1. Mathematical Foundation: Moving Beyond Axis-Aligned Bounding Boxes (AABB)
Standard OCR systems utilize AABB, which fails when the convex hulls of handwritten characters intersect. Our research introduces a parametric spline model (S(t)) that treats character boundaries as fluid trajectories.
The “Digital Scalpel” Logic: Instead of a simple grid, the algorithm calculates a path of minimum energy between two adjacent symbols, effectively “unweaving” intertwined strokes.
Result: This prevents the “bleeding” of pixels from one character into another, which is a primary cause of misclassification in CNNs.
2. Solving the Topological Complexity of STEM Notation
Physico-mathematical documents are non-linear by nature. We categorize the “touching characters” problem into three types:
Vertical Overlap: Common in fractions (ba) and limits.
Diagonal Encroachment: Typical for subscripts (xi) and exponents.
Structural Entanglement: Occurs with large operators like integrals (∫) or summations (∑).
Innovation: The spline-guided approach adaptively adjusts its curvature based on the local density of ink pixels, ensuring that thin strokes (like the tail of a ‘y’ or a ‘g’) are not severed.
3. Benchmarking OCR Accuracy & LaTeX Synthesis
The impact of our method was measured by the accuracy of the final LaTeX string generation:
Error Reduction: The transition from traditional watershed segmentation to spline-guided pre-processing reduced the Character Error Rate (CER) by a significant margin in dense formula clusters.
Legacy Preservation: The method proved exceptionally robust for low-contrast scans of 20th-century scientific manuscripts, where ink spread (bleeding) makes standard OCR impossible.
4. Integration with Vision Transformers (ViT) & Layer C2 Stability
The segmentation output is fed into a Vision Transformer architecture.
Clean Data Ingestion: By providing “cleaner” isolated patches, the ViT’s self-attention mechanism can focus on the morphology of the symbol rather than struggling with background noise or partial strokes from neighboring characters.
Telemetry (Layer C2): For cloud-based implementation, we monitored the TCP/IP stack performance. Using arithmetic averaging (μinterval) of telemetry data, we ensured that the high-computational cost of spline calculation did not compromise the real-time response proxies required for educational platforms.
5. Strategic Implementation at LLC “MISH” (Mriia School)
This research serves as a cornerstone for the Digital Twin of the Classroom concept:
Automated Assessment: Teachers can scan an entire class’s handwritten math tests; our system segments each student’s unique handwriting style, converts it to LaTeX, and flags errors automatically.
Charter Compliance: This project directly fulfills the “Experimental Research and Development” mandate of the LLC “MISH” Corporate Charter, bridging the gap between theoretical computer vision and practical pedagogy.
Updated Reference for Publication
Citation: Zalizko, V. (2025). “Spline-Guided Segmentation of Handwritten Physico-Mathematical Documents for Improved OCR Accuracy.” Preprint. DOI: 10.21203/rs.3.rs-8471729/v1.
Abstract of the report. International scientific journal “Artificial Intelligence in Education: Ukraine and the World”






