Repository navigation
feat(compare): paper-based detection, auto alignment, page pairing and change report (#465) - #784
Open
oscar981-op wants to merge 1 commit into
Open
oscar981-op wants to merge 1 commit into
oscar981-op wants to merge 1 commit into
Conversation
… pairing and change report (OpenAEC-Foundation#465) Detection - Resolution derived from the paper size (about 0.2 mm per pixel on any sheet), pages rendered in bounded tiles into 1-byte ink masks, a per-side pixel budget for oversized sheets. - Streaming mask comparison in the worker: tolerance dilation, run-based connected components, merge and minimum size expressed in mm on paper. - Background colour estimated from the page instead of assuming white. - Sensitivity presets (line drawing, scan, text document) that set threshold, tolerance, minimum size and merge distance together. - Optional vector comparison of path segments for pages recognised as vector drawings, with the pixel comparison as fallback. Alignment - "Align automatically": coarse phase correlation over candidate scales and rotations, then patch-based similarity refinement; confidence shown, measuring-scale ratio used as candidate and fallback. - Manual dx/dy (mm), rotation and scale stay available and override the automatic result per page pair; old-page highlights and the split line use the same transform as the detection. Pairing, text and report - Automatic page pairing on sheet number, page label or content fingerprint, shown as an editable list with "only in old/new" pages. - Filter for added/removed/modified in the text tab. - Change report as CSV and as a PDF summary with crops, and selected changes placed as clouds with a comment on the new document. - The second side can be a file on disk or the version before the last save. Translations for all 40 languages; unit tests for detection on A0/A1/A3, tiling bounds, alignment, pairing, report and vector diff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #465.
Per gap
About 70 strings in all 40 locales. The PDF report uses the standard PDF font, so its headings are in English for non-Latin languages; the CSV keeps every language.
A0 timing (measured locally, Ryzen 7 3700U)
About 0.4 s with a known alignment and about 1.2 s on the first visit. pdf.js tile rendering is not included; it can only be measured in the app.
Behaviour changes
splitOldTransformis no longer used.rememberPreviousPdfBytes(loader.js,saver.js) and the Compare ribbon button.Tests
75 Compare tests (detection, alignment, pairing, report, vector, i18n). Full suite: 0 failures.
vite buildis clean.Not yet checked in the running app
🤖 Generated with Claude Code