feat(math): recognize handwritten expressions (Issue #46, stage 2)

New module math_ink.rs turns the strokes of an expression into text for
math::solve. Consecutive overlapping strokes are grouped into symbols,
each symbol is classified with the $P point-cloud recognizer (plus the
turning angle and a small stroke-count penalty) against built-in
templates for digits, + ( ) / x y a b, and the structure comes from the
positions: stacked lines are =, stacked dots :, lines with symbols above
and below are fraction bars, low dots between digits decimal commas and
raised symbols exponents. Own templates can be added for stage 4.

Tested with synthetic handwriting (slanted, rotated, warped); not used by
the UI yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
haraldandClaude Opus 5.5 committed 2026-10-28 14:27:25 +01:00
1 parent cd490dd9a7
commit d16cd2db72
4 files changed
+1262

No files matched your search

+1
View File
@@ -192,6 +192,7 @@ src/
├── disk_watch.rs # Änderungen anderer Geräte übernehmen (Sync-Clients)
├── library.rs # Ordner der Notizbücher (library.json)
├── math.rs # Exaktes Ausrechnen handgeschriebener Formeln (Issue #46)
├── math_ink.rs # Erkennung handgeschriebener Formeln ($P-Punktwolken)
├── autosave.rs # Speichern im Hintergrund
├── export.rs # PDF-Export
├── page_export.rs # Seite als PNG/SVG, Auswahl als Bild
+1
View File
@@ -194,6 +194,7 @@ src/
├── disk_watch.rs # Taking over changes from other devices (sync clients)
├── library.rs # Notebook folders (library.json)
├── math.rs # Exact evaluation of handwritten math (Issue #46)
├── math_ink.rs # Recognition of handwritten math ($P point clouds)
├── autosave.rs # Saving in the background
├── export.rs # PDF export
├── page_export.rs # Page as PNG/SVG, selection as image
+1
View File
@@ -19,6 +19,7 @@ pub mod image_layer;
pub mod import;
pub mod library;
pub mod math;
pub mod math_ink;
pub mod osk;
pub mod page_export;
pub mod paths;
+1259
View File
File diff suppressed because it is too large. Load diff