Match sideways and upside-down scans to PDF pages. Include an offline windmill example, four USGS reference sets and a reproducible omission and rotation benchmark.
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+1
- volume-sequences/scan-pdf-match/quarter-turns/LICENSEAdded+203
- volume-sequences/scan-pdf-match/quarter-turns/README.mdAdded+64
- volume-sequences/scan-pdf-match/quarter-turns/development-protocol.txtAdded+4
- volume-sequences/scan-pdf-match/quarter-turns/example/alignments.jpgAdded
- volume-sequences/scan-pdf-match/quarter-turns/example/matches.jsonAdded+52
- volume-sequences/scan-pdf-match/quarter-turns/example/references.jsonAdded+30
- volume-sequences/scan-pdf-match/quarter-turns/example/scans/drawing.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/example/scans/faint.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/example/scans/graph.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/example/scans/plate.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/example/windmills.pdfAdded+3
- volume-sequences/scan-pdf-match/quarter-turns/match_pages.pyAdded+152
- volume-sequences/scan-pdf-match/quarter-turns/reference-review.txtAdded+6
- volume-sequences/scan-pdf-match/quarter-turns/register.pyAdded+67
- volume-sequences/scan-pdf-match/quarter-turns/replay_volume.pyAdded+108
- volume-sequences/scan-pdf-match/quarter-turns/results/development-summary.jsonAdded+182
- volume-sequences/scan-pdf-match/quarter-turns/results/object-census.jsonAdded+42
- volume-sequences/scan-pdf-match/quarter-turns/results/transfer-rows.jsonlAdded
- volume-sequences/scan-pdf-match/quarter-turns/results/transfer-summary.jsonAdded+186
- volume-sequences/scan-pdf-match/quarter-turns/scan_pdf_geometry.pyAdded+80
- volume-sequences/scan-pdf-match/quarter-turns/scan_pdf_turns.pyAdded+91
- volume-sequences/scan-pdf-match/quarter-turns/transfer-protocol.txtAdded+5
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/references.jsonAdded+318
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-01.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-02.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-03.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-04.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-05.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-06.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-07.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-08.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-09.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-10.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-11.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-12.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-13.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-14.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-15.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-16.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/sheet-01.jpgAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/sheet-02.jpgAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/references.jsonAdded+318
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-01.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-02.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-03.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-04.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-05.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-06.pngAdded
- volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-07.pngAdded
62 unmodified lines63646562 unmodified linesvolume-sequences/scan-pdf-match/plitt/notebook.pdf filter=lfs diff=lfs merge=lfs -textvolume-sequences/scan-pdf-match/dall/notebook.pdf filter=lfs diff=lfs merge=lfs -textvolume-sequences/scan-pdf-match/bookmarks/example/bijutsukai-reviewed.pdf filter=lfs diff=lfs merge=lfs -text62 unmodified lines6364656662 unmodified linesvolume-sequences/scan-pdf-match/plitt/notebook.pdf filter=lfs diff=lfs merge=lfs -textvolume-sequences/scan-pdf-match/dall/notebook.pdf filter=lfs diff=lfs merge=lfs -textvolume-sequences/scan-pdf-match/bookmarks/example/bijutsukai-reviewed.pdf filter=lfs diff=lfs merge=lfs -textvolume-sequences/scan-pdf-match/quarter-turns/example/windmills.pdf filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364# Match rotated scans to PDF pages
Use this offline command to find which PDF page corresponds to a source image, even when some captures are sideways or upside down. You get a one-based PDF page number, the turn needed to align the scan with that page, and a decision to suggest the match or send it for review.
## Try it on a three-page PDF
The example uses a windmill drawing, a sideways photographic plate and a nearly blank page from *Windmills for Irrigation* (1897). The scan folder also contains a graph whose page was left out of the excerpt. [Example PDF](example/windmills.pdf?download=true) · [Visual comparison](example/alignments.jpg) · [Expected output](example/matches.json)
```shpython -m pip install huggingface_hub numpy Pillow 'pypdfium2>=5,<6'hf download foliokestrel/folio-spread-bench --repo-type dataset --local-dir bench \ --include 'volume-sequences/scan-pdf-match/quarter-turns/*.py'hf download foliokestrel/folio-spread-bench --repo-type dataset --local-dir bench \ --include 'volume-sequences/scan-pdf-match/quarter-turns/example/*'cd bench/volume-sequences/scan-pdf-match/quarter-turnspython match_pages.py example/scans example/windmills.pdf --quarter-turns```
| Scan | Result in the excerpt | What to look for ||---|---|---|| `drawing.png` | Page 1, 90° counterclockwise | The input scan was turned clockwise. Turning it left aligns the wheel and caption. || `plate.png` | Page 2, 0° | The original plate appears sideways in both the PDF and the scan. Its edges already align. || `faint.png` | Review | The nearly blank image has too little contrast. Its recorded source is excerpt page 3. || `graph.png` | Review | The graph comes from the same volume. Its page is absent from this excerpt. |
## Use your own files
```shpython match_pages.py path/to/scans book.pdf --quarter-turns > matches.json```
Use one image frame per file. The matcher applies the image’s orientation metadata and compares it with the displayed PDF page. Filenames can be in any order. On a `suggested` row, `candidate_ccw_degrees` gives the counterclockwise turn to apply to the displayed scan. Zero means the scan and PDF already agree. On a `review` row, the page and angle can still contain the nearest candidate. Inspect the images before using either value.
Each scan and PDF page is reduced to a 32 × 32 grayscale thumbnail. The matcher compares all four right-angle turns. A suggestion needs reciprocal first choices, correlation of at least 0.90, a lead of at least 0.04 over competing pages and scans when present, and a lead of at least 0.04 over competing turns. A nearly symmetric page can give an `ambiguous_angle` result. Missing pages, flat scans, repeated plates and similar layouts can also require review. The command writes JSON to standard output. Your source images and PDF remain intact.
The ordinary command uses one orientation. For similarly oriented notebook pages, `--verify-geometry` checks matching features inside the page and requires the optional package `opencv-python-headless`.
## Results on four held-out volumes
The test used 64 distinct image objects, 16 per USGS volume. Their source page and angle came from each PDF’s image placement, followed by visual inspection. All 343 eligible full-page image objects in the four original volumes had the same orientation as their displayed pages. For the mixed condition we deliberately turned three of every four scans. The shortened PDFs omit eight enrolled pages per volume and retain the other pages in order.
| PDF edition | Source orientation | Present / queried | Ordinary correct suggestions | Four-angle correct suggestions ||---|---|---:|---:|---:|| Original | As stored | 64 / 64 | 60 | 60 || Original | Mixed | 64 / 64 | 16 | 60 || Shortened | As stored | 32 / 64 | 29 | 29 || Shortened | Mixed | 32 / 64 | 0 | 29 |
Every suggested page and angle from the four-angle command was correct across these 256 decisions. All 32 absent scans stayed in review under both orientations. These test volumes measure correspondence between embedded rasters and their own PDF pages. Independently photographed books can introduce crop, skew and lighting differences. On a separate test of 48 source previews from the Dall handwritten notebook, the four-angle mode suggested just one correct page and sent the other 47 for review. [Individual decisions](results/transfer-rows.jsonl) · [Study protocol](transfer-protocol.txt) · [Visual reference notes](reference-review.txt) · [Three-book controlled rotation results](results/development-summary.json)
## Replay a complete volume
Install `pypdf` for the omission test and download the previews for one volume. From the directory containing `match_pages.py`, use the following commands for Water-Supply Paper 8. The replay downloads its 7 MB original PDF and checks the SHA-256 digest. Use `--pdf path/to/original.pdf` to reuse a local copy. Pick series 1, 8, 36 or 67, and download the corresponding `volumes/wspNUMBER` folder.
```shpython -m pip install 'pypdf>=6,<8'hf download foliokestrel/folio-spread-bench --repo-type dataset --local-dir ../../.. \ --include 'volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp8/*'python replay_volume.py 8 --edition omitted --orientation mixed > wsp8-results.json```
Each replay runs both matchers, checks the included preview hashes and scores fresh results against the source placements. Water-Supply Paper 8 yields seven correct four-angle suggestions on the shortened, mixed panel. Nine scans go to review, including eight omitted targets. [Reference placements and source digest](volumes/wsp8/references.json) · [Results by volume](results/transfer-summary.json)
The USGS editions and page imagery are U.S. government works. Folio Kestrel’s scripts use Apache 2.0 and its evaluation records use CC BY-SA 4.0. [Paper 1](https://pubs.usgs.gov/publication/wsp1) · [Paper 8](https://pubs.usgs.gov/publication/wsp8) · [Paper 36](https://pubs.usgs.gov/publication/wsp36) · [Paper 67](https://pubs.usgs.gov/publication/wsp67) · [Code license](LICENSE) · [Record license](https://creativecommons.org/licenses/by-sa/4.0/)1234Question: Can a four-angle whole-frame search recover real scan/PDF pairs when individual source scans have been turned sideways or upside down? This is a controlled transformation experiment. The books and their ordinary unrotated results have previously been examined.
Evaluate Smithsonian Bijutsukai (16 captures, one actually absent), Plitt (44 captures, intact and every-other-query omitted), and Dall (48 captures, intact and every-other-query omitted). Run both original pixels and a balanced cycle of 0, 90, 180, 270 degrees counterclockwise by alphabetical scan filename. Physically turn decoded input pixels before 32-by-32 fingerprinting. Read actual shortened PDFs. Skip geometric verification. Compute the maximum normalized whole-frame correlation over four scan orientations for each scan and PDF page. Require score at least .90, mutual first, forward and reverse distinct-identity margins at least .04, and an orientation margin at least .04 on the proposed pair. Blank vectors abstain. Return degrees counterclockwise to apply to the displayed source image to align with the PDF. No change to source files.Compare to the ordinary one-angle matcher on exactly the same features. Record every row, proposed pages, angles, status and reference. Count wrong pages and wrong angles separately for suggestions, including absent false links. Also run mismatched book, duplicate capture at a different angle, repeated target page, solid source and exact rotational symmetry. Those ambiguous/absent cases must abstain. For consideration as an opt-in CLI require zero wrong page or angle suggestions on EVERY panel including clean runs and controls, and a gain of at least five correct rotated-source suggestions on BOTH mixed-orientation Smithsonian and mixed-orientation intact Plitt vs ordinary. Keep default unchanged. Freeze method before results. Do not tune against these panels.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152{ "pdf_page_count": 3, "scans": [ { "scan": "drawing.png", "status": "suggested", "candidate_pdf_page": 1, "correlation": 0.9946485757827759, "page_margin": 0.6505482792854309, "scan_margin": 0.6562025547027588, "reason": null, "candidate_ccw_degrees": 90, "orientation_margin": 0.6994121968746185 }, { "scan": "faint.png", "status": "review", "candidate_pdf_page": null, "correlation": null, "page_margin": null, "scan_margin": null, "reason": "low_contrast_scan", "candidate_ccw_degrees": null, "orientation_margin": null }, { "scan": "graph.png", "status": "review", "candidate_pdf_page": 2, "correlation": 0.4103943407535553, "page_margin": 0.2475709468126297, "scan_margin": 0.5875565111637115, "reason": "low_similarity", "candidate_ccw_degrees": 90, "orientation_margin": 0.07100474834442139 }, { "scan": "plate.png", "status": "suggested", "candidate_pdf_page": 2, "correlation": 0.9979508519172668, "page_margin": 0.6595048308372498, "scan_margin": 0.5875565111637115, "reason": null, "candidate_ccw_degrees": 0, "orientation_margin": 0.7516284286975861 } ], "pdf_pages_without_suggestion": [ 3 ]}123456789101112131415161718192021222324252627282930[ { "scan": "drawing.png", "source_object": "object-10.png", "original_pdf_page": 42, "applied_cw": 90, "excerpt_page": 1 }, { "scan": "plate.png", "source_object": "object-14.png", "original_pdf_page": 25, "applied_cw": 0, "excerpt_page": 2 }, { "scan": "faint.png", "source_object": "object-02.png", "original_pdf_page": 40, "applied_cw": 0, "excerpt_page": 3 }, { "scan": "graph.png", "source_object": "object-09.png", "original_pdf_page": 16, "applied_cw": 0, "excerpt_page": null }]123version https://git-lfs.github.com/spec/v1oid sha256:2bf71db3ff2995e2ea4575287c5bff23000b165b30efea05f736f421b1c125f1size 507429123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152"""Find likely correspondences between a folder of book scans and a PDF edition."""import argparsefrom contextlib import closingimport jsonfrom pathlib import Pathimport sys
import numpy as npfrom PIL import Image, ImageOpsimport pypdfium2 as pdfium
EXTENSIONS = {".png", ".jpg", ".jpeg", ".tif", ".tiff", ".webp", ".jp2", ".j2k", ".bmp"}
def on_paper(image): if image.mode in ("RGBA", "LA", "PA") or "transparency" in image.info: rgba = image.convert("RGBA") paper = Image.new("RGB", rgba.size, "white") paper.paste(rgba, mask=rgba.getchannel("A")) image = paper return image
def fingerprint(image): gray = on_paper(image).convert("L").resize((32, 32), Image.Resampling.BOX) vector = np.array(gray, dtype=np.float32).ravel() vector -= vector.mean() if vector.std() < 2: return np.zeros_like(vector) return vector / np.linalg.norm(vector)
def scan_features(directory): if not directory.is_dir(): raise ValueError(f"Scan directory does not exist: {directory}") paths = sorted(p for p in directory.iterdir() if p.is_file() and p.suffix.lower() in EXTENSIONS) if not paths: raise ValueError("No supported scan images in the directory.") features = [] for path in paths: try: with Image.open(path) as image: if getattr(image, "n_frames", 1) != 1: raise ValueError("Choose one file per displayed scan.") features.append(fingerprint(ImageOps.exif_transpose(image))) except (ValueError, OSError) as exc: raise ValueError(f"{path.name}: {exc}") from exc return [p.name for p in paths], np.stack(features)
def pdf_features(path): features = [] with pdfium.PdfDocument(path) as document: document.init_forms() for index in range(len(document)): with closing(document[index]) as page: width, height = page.get_size() if not all(np.isfinite(v) and v > 0 for v in (width, height)): raise ValueError(f"Invalid page dimensions on PDF page {index+1}.") with closing(page.render(scale=400/max(width,height), draw_annots=True)) as bitmap: features.append(fingerprint(bitmap.to_pil())) if not features: raise ValueError("The PDF contains no pages.") return np.stack(features)
def nearest(queries, candidates): # Bound temporary matrix size while retaining both runners-up for duplicate detection. result = [] eligible = np.flatnonzero(candidates.any(axis=1)) if not len(eligible): return [(None, None, None)] * len(queries) targets = candidates[eligible] batch_size = max(1, min(128, 1_000_000 // len(targets))) for offset in range(0, len(queries), batch_size): batch = queries[offset:offset+batch_size] scores = np.clip(batch @ targets.T, -1, 1) for vector, row in zip(batch, scores): if not vector.any(): result.append((None, None, None)) continue best = int(row.argmax()) score = float(row[best]) gap = None if len(row) > 1: row[best] = -np.inf gap = score - float(row.max()) result.append((int(eligible[best]), score, gap)) return result
def compare(names, scans, pages): forward = nearest(scans, pages) backward = nearest(pages, scans) rows = [] suggested = set() for i, (page, score, gap) in enumerate(forward): reason = None reverse_gap = None if page is None: reason = "low_contrast_scan" if not scans[i].any() else "no_informative_pdf_page" else: reverse, _, reverse_gap = backward[page] if score < 0.90: reason = "low_similarity" elif gap is not None and gap < 0.04: reason = "similar_pdf_pages" elif reverse != i or (reverse_gap is not None and reverse_gap < 0.04): reason = "competing_scan" else: suggested.add(page+1) rows.append({"scan":names[i], "status":"review" if reason else "suggested", "candidate_pdf_page":None if page is None else page+1, "correlation":score, "page_margin":gap, "scan_margin":reverse_gap, "reason":reason}) return {"pdf_page_count":len(pages), "scans":rows, "pdf_pages_without_suggestion":[i for i in range(1,len(pages)+1) if i not in suggested]}
def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("scans", type=Path, help="Directory of individual scan images.") parser.add_argument("pdf", type=Path) modes = parser.add_mutually_exclusive_group() modes.add_argument("--quarter-turns", action="store_true", help="Compare upright, sideways and upside-down source scans with each displayed PDF page.") modes.add_argument("--verify-geometry",action="store_true",help="Check ambiguous mutual candidates against interior features (requires opencv-python-headless).") args = parser.parse_args() try: if args.verify_geometry: try: from scan_pdf_geometry import verify except ModuleNotFoundError as error: if error.name != "cv2": raise parser.exit(1,"Install opencv-python-headless to use --verify-geometry.\n") names, scans = scan_features(args.scans) pages = pdf_features(args.pdf) if args.quarter_turns: from scan_pdf_turns import compare_turns report = compare_turns(names, scans, pages) else: report = compare(names, scans, pages) if args.verify_geometry: verify(report,names,scans,pages,args.scans,args.pdf,on_paper) except (ValueError, OSError, pdfium.PdfiumError) as error: parser.exit(1, f"{parser.prog}: {error}\n") json.dump(report, sys.stdout, ensure_ascii=False, allow_nan=False, indent=2) print()
if __name__ == "__main__": main()123456USGS full embedded-image reference review before matching. The left thumbnail shows the native raster with the metadata-derived correction; the right shows the full displayed PDF page.
Water-Supply Paper 67, both sheets (16 pairs). Matched visual content and edges on map, graph, table, title and diagram pages. Object 10 / PDF 10 is nearly blank with faint marks; the PDF object placement supplies the reference. Retain.Water-Supply Paper 36, both sheets (16 pairs). Header and table arrangement match the rendered pages. Object 04 / PDF 4 is very faint, with a lightly marked right edge, so placement supplies the reference. Several table pages share the same printed layout. Retain all.Water-Supply Paper 8, both sheets (16 pairs). Object 14 / PDF 25 shows a landscape windmill plate printed sideways on both views. The correct relative orientation is zero although a reader may turn the page to view the photograph. Objects 02 / PDF 40 and 11 / PDF 22 are near-blank. Retain all references, including the two sparsely marked pages.Water-Supply Paper 1, both sheets (16 pairs). Object 02 / PDF 31 and 03 / PDF 54 have sideways plates in both views. The dark title, paler inner title and related but distinct content pages are consistent with their object placements. Retain all. Across the four books no mismatch or metadata correction found. Pages with no distinctive content retain their object-placement reference without assuming visual identity can be inferred from that content.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667"""Check whether matching interior image features support a whole-page correspondence."""from dataclasses import dataclass
import cv2import numpy as npfrom PIL import Image,ImageOps
cv2.setNumThreads(1)cv2.setRNGSeed(101)
@dataclassclass Features: gray: np.ndarray positions: np.ndarray descriptors: np.ndarray | None
def extract(image): image = ImageOps.exif_transpose(image).convert("L") image.thumbnail((640,640),Image.Resampling.LANCZOS) gray = np.asarray(image) h,w = gray.shape mask = np.zeros_like(gray) dx,dy = int(np.ceil(w*.10)),int(np.ceil(h*.10)) mask[dy:h-dy,dx:w-dx]=255 keypoints,descriptors = cv2.SIFT_create(nfeatures=1000).detectAndCompute(gray,mask) return Features(gray,np.float32([key.pt for key in keypoints]).reshape(-1,2),descriptors)
def evidence(source,target): da,db=source.descriptors,target.descriptors info={"verified":False,"matches":0,"inliers":0} if da is None or db is None or len(db)<2: return info pairs=cv2.BFMatcher().knnMatch(da,db,k=2) accepted=[m[0] for m in pairs if len(m)==2 and m[0].distance<.72*m[1].distance] info["matches"]=len(accepted) if len(accepted)<35: return info src=source.positions[[m.queryIdx for m in accepted]] dst=target.positions[[m.trainIdx for m in accepted]] transform,mask=cv2.estimateAffinePartial2D(src,dst,method=cv2.RANSAC,ransacReprojThreshold=3,maxIters=3000) if transform is None or mask is None: return info inliers=mask.ravel().astype(bool) info["inliers"]=int(inliers.sum()) if info["inliers"]<35 or inliers.mean()<.4: return info size=source.gray.shape[::-1] span=np.ptp(src[inliers],axis=0)/np.array(size) err=np.linalg.norm(src[inliers]@transform[:,:2].T+transform[:,2]-dst[inliers],axis=1) angle=float(np.degrees(np.arctan2(transform[1,0],transform[0,0]))) info.update(min_span=float(min(span)),median_error=float(np.median(err)),degrees=angle) if min(span)<.45 or info["median_error"]>=2 or abs(angle)>1: return info valid=cv2.warpAffine(np.ones(target.gray.shape,dtype=np.uint8),transform,size, flags=cv2.INTER_NEAREST|cv2.WARP_INVERSE_MAP).astype(bool) info["coverage"]=float(valid.mean()) if info["coverage"]<.80: return info stamp=cv2.warpAffine(target.gray,transform,size,flags=cv2.INTER_LINEAR|cv2.WARP_INVERSE_MAP) a,b=source.gray[valid],stamp[valid] if np.ptp(a) and np.ptp(b): info["correlation"]=float(np.corrcoef(a,b)[0,1]) info["verified"]=info["correlation"]>=.80 return info123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108"""Reproduce the two scan-to-PDF searches on one USGS volume and score recorded references."""import argparsefrom hashlib import sha256import jsonfrom pathlib import Pathimport subprocessimport sysimport tempfilefrom urllib.request import urlopen
from PIL import Imagefrom pypdf import PdfReader, PdfWriter
ROOT = Path(__file__).resolve().parent
def digest(path): checksum = sha256() with path.open("rb") as stream: for chunk in iter(lambda: stream.read(1024 * 1024), b""): checksum.update(chunk) return checksum.hexdigest()
def replay(series, edition, orientation, pdf, scratch): volume = ROOT / "volumes" / f"wsp{series}" ref = json.loads((volume / "references.json").read_text()) source = ref["source"] if pdf is None: pdf = scratch / "original.pdf" with urlopen(source["url"], timeout=90) as stream, pdf.open("wb") as target: for chunk in iter(lambda: stream.read(1024 * 1024), b""): target.write(chunk) if digest(pdf) != source["sha256"]: raise ValueError(f"Original PDF checksum differs from the reference for Water-Supply Paper {series}.") scans = volume / "scans" records = sorted(ref["scans"], key=lambda r: r["scan"]) angles = {} for i, record in enumerate(records): name = record["scan"] if digest(scans / name) != record["preview_sha256"]: raise ValueError(f"Scan checksum differs for {name}.") angles[name] = 90 * (i % 4) if orientation == "mixed" else 0 if orientation == "mixed": rotated = scratch / "scans" rotated.mkdir() for name, turn in angles.items(): with Image.open(scans / name) as image: image.rotate(-turn, expand=True).save(rotated / name) scans = rotated
retained = list(range(1, source["pages"] + 1)) if edition == "omitted": removed = {row["pdf_page"] for row in records[::2]} retained = [p for p in retained if p not in removed] with PdfReader(pdf) as reader, PdfWriter() as writer: writer.append(reader, pages=[p - 1 for p in retained], import_outline=False) pdf = scratch / "shortened.pdf" writer.write(pdf) remap = {p: i + 1 for i, p in enumerate(retained)} result = {} for method, flags in [("single", []), ("four", ["--quarter-turns"])]: raw = subprocess.check_output([sys.executable, ROOT / "match_pages.py", scans, pdf, *flags]) report = json.loads(raw) result[method] = {r["scan"]: r for r in report["scans"]} if len(report["scans"]) != len(records) or result[method].keys() != angles.keys(): raise ValueError("Matcher returned an unexpected set of scan names.") rows = [] summary = {method: dict(correct_page=0, wrong_page=0, missing_linked=0, review=0) for method in result} summary["four"]["wrong_angle_on_correct_page"] = 0 for record in records: name = record["scan"] reference = remap.get(record["pdf_page"]) ccw = (record["ccw"] + angles[name]) % 360 row = dict(scan=name, reference=reference, expected_ccw=ccw) for method in result: pred = result[method][name] row[method] = pred if pred["status"] == "review": summary[method]["review"] += 1 elif reference is None or pred["candidate_pdf_page"] != reference: summary[method]["wrong_page"] += 1 summary[method]["missing_linked"] += int(reference is None) else: summary[method]["correct_page"] += 1 if method == "four" and pred["candidate_ccw_degrees"] != ccw: summary[method]["wrong_angle_on_correct_page"] += 1 rows.append(row) return dict(panel=f"wsp{series}.{edition}.{orientation}", pdf_page_count=len(retained), summary=summary, rows=rows)
def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("series", type=int, choices=[1, 8, 36, 67]) parser.add_argument("--pdf", type=Path, help="Local original PDF. Omit to download the hash-checked USGS edition.") parser.add_argument("--edition", choices=["intact", "omitted"], default="intact") parser.add_argument("--orientation", choices=["stored", "mixed"], default="mixed") args = parser.parse_args() try: with tempfile.TemporaryDirectory() as temp: report = replay(args.series, args.edition, args.orientation, args.pdf, Path(temp)) except (OSError, ValueError, subprocess.CalledProcessError) as error: parser.exit(1, f"{parser.prog}: {error}\n") print(json.dumps(report, ensure_ascii=False, indent=2, allow_nan=False))
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182{ "panels": { "bijutsukai.intact.clean": { "single_correct_page": 13, "four_correct_page": 13 }, "bijutsukai.intact.mixed": { "single_correct_page": 3, "four_correct_page": 13, "four_correct_rotated_page": 10 }, "plitt.intact.clean": { "single_correct_page": 33, "four_correct_page": 33 }, "plitt.intact.mixed": { "single_correct_page": 9, "four_correct_page": 33, "four_correct_rotated_page": 24 }, "plitt.omitted.clean": { "single_correct_page": 15, "four_correct_page": 15 }, "plitt.omitted.mixed": { "four_correct_page": 15, "four_correct_rotated_page": 15 }, "dall.intact.clean": { "single_correct_page": 1, "four_correct_page": 1 }, "dall.intact.mixed": { "four_correct_page": 1, "four_correct_rotated_page": 1 }, "dall.omitted.clean": { "single_correct_page": 1, "four_correct_page": 1 }, "dall.omitted.mixed": { "four_correct_page": 1, "four_correct_rotated_page": 1 } }, "numeric_gate": true, "controls": [ { "scan": "leaf-01.jpg", "candidate_pdf_page": 1, "status": "suggested", "reason": null, "ccw": 0 }, { "scan": "leaf-02.jpg", "candidate_pdf_page": 2, "status": "suggested", "reason": null, "ccw": 0 }, { "scan": "leaf-03.jpg", "candidate_pdf_page": 3, "status": "review", "reason": "competing_scan", "ccw": 0 }, { "scan": "leaf-04.jpg", "candidate_pdf_page": 4, "status": "suggested", "reason": null, "ccw": 0 }, { "scan": "leaf-05.jpg", "candidate_pdf_page": 5, "status": "suggested", "reason": null, "ccw": 0 }, { "scan": "leaf-06.jpg", "candidate_pdf_page": 6, "status": "suggested", "reason": null, "ccw": 0 }, { "scan": "leaf-07.jpg", "candidate_pdf_page": 7, "status": "suggested", "reason": null, "ccw": 0 }, { "scan": "leaf-08.jpg", "candidate_pdf_page": 8, "status": "suggested", "reason": null, "ccw": 0 }, { "scan": "leaf-09.jpg", "candidate_pdf_page": 9, "status": "suggested", "reason": null, "ccw": 0 }, { "scan": "leaf-10.jpg", "candidate_pdf_page": 10, "status": "suggested", "reason": null, "ccw": 0 }, { "scan": "leaf-11.jpg", "candidate_pdf_page": 11, "status": "suggested", "reason": null, "ccw": 0 }, { "scan": "leaf-12.jpg", "candidate_pdf_page": 12, "status": "review", "reason": "similar_pages", "ccw": 0 }, { "scan": "leaf-13.jpg", "candidate_pdf_page": 13, "status": "review", "reason": "similar_pages", "ccw": 0 }, { "scan": "leaf-14.jpg", "candidate_pdf_page": 14, "status": "suggested", "reason": null, "ccw": 0 }, { "scan": "leaf-15.jpg", "candidate_pdf_page": 3, "status": "review", "reason": "similar_pages", "ccw": 0 }, { "scan": "leaf-16.jpg", "candidate_pdf_page": 15, "status": "review", "reason": "similar_pages", "ccw": 0 }, { "scan": "duplicate", "candidate_pdf_page": 3, "status": "review", "reason": "competing_scan", "ccw": 270 }, { "scan": "flat", "candidate_pdf_page": null, "status": "review", "reason": "flat", "ccw": null }, { "scan": "symmetric", "candidate_pdf_page": 17, "status": "review", "reason": "ambiguous_angle", "ccw": 0 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142{ "67": { "eligible": 114, "enrolled": 16, "eligible_ccw": { "0": 114 }, "enrolled_ccw": { "0": 16 } }, "36": { "eligible": 98, "enrolled": 16, "eligible_ccw": { "0": 98 }, "enrolled_ccw": { "0": 16 } }, "8": { "eligible": 69, "enrolled": 16, "eligible_ccw": { "0": 69 }, "enrolled_ccw": { "0": 16 } }, "1": { "eligible": 62, "enrolled": 16, "eligible_ccw": { "0": 62 }, "enrolled_ccw": { "0": 16 } }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186{ "panels": { "wsp1.intact.stored": { "queries": 16, "present": 16, "turned_present": 0, "single_correct_page": 16, "four_correct_page": 16, "seconds": { "single": 1.07, "four": 1.069 } }, "wsp1.intact.mixed": { "queries": 16, "present": 16, "turned_present": 12, "single_correct_page": 4, "four_correct_page": 16, "four_turned_correct_page": 12, "seconds": { "single": 1.099, "four": 1.088 } }, "wsp1.omitted.stored": { "queries": 16, "present": 8, "turned_present": 0, "single_correct_page": 8, "four_correct_page": 8, "seconds": { "single": 0.914, "four": 0.92 } }, "wsp1.omitted.mixed": { "queries": 16, "present": 8, "turned_present": 8, "four_correct_page": 8, "four_turned_correct_page": 8, "seconds": { "single": 0.973, "four": 0.973 } }, "wsp36.intact.stored": { "queries": 16, "present": 16, "turned_present": 0, "single_correct_page": 15, "four_correct_page": 15, "seconds": { "single": 3.73, "four": 3.733 } }, "wsp36.intact.mixed": { "queries": 16, "present": 16, "turned_present": 12, "single_correct_page": 4, "four_correct_page": 15, "four_turned_correct_page": 11, "seconds": { "single": 3.737, "four": 3.746 } }, "wsp36.omitted.stored": { "queries": 16, "present": 8, "turned_present": 0, "single_correct_page": 7, "four_correct_page": 7, "seconds": { "single": 3.429, "four": 3.426 } }, "wsp36.omitted.mixed": { "queries": 16, "present": 8, "turned_present": 8, "four_correct_page": 7, "four_turned_correct_page": 7, "seconds": { "single": 3.428, "four": 3.441 } }, "wsp67.intact.stored": { "queries": 16, "present": 16, "turned_present": 0, "single_correct_page": 15, "four_correct_page": 15, "seconds": { "single": 2.331, "four": 2.34 } }, "wsp67.intact.mixed": { "queries": 16, "present": 16, "turned_present": 12, "single_correct_page": 4, "four_correct_page": 15, "four_turned_correct_page": 11, "seconds": { "single": 2.361, "four": 2.354 } }, "wsp67.omitted.stored": { "queries": 16, "present": 8, "turned_present": 0, "single_correct_page": 7, "four_correct_page": 7, "seconds": { "single": 2.175, "four": 2.184 } }, "wsp67.omitted.mixed": { "queries": 16, "present": 8, "turned_present": 8, "four_correct_page": 7, "four_turned_correct_page": 7, "seconds": { "single": 2.197, "four": 2.207 } }, "wsp8.intact.stored": { "queries": 16, "present": 16, "turned_present": 0, "single_correct_page": 14, "four_correct_page": 14, "seconds": { "single": 1.148, "four": 1.154 } }, "wsp8.intact.mixed": { "queries": 16, "present": 16, "turned_present": 12, "single_correct_page": 4, "four_correct_page": 14, "four_turned_correct_page": 10, "seconds": { "single": 1.198, "four": 1.193 } }, "wsp8.omitted.stored": { "queries": 16, "present": 8, "turned_present": 0, "single_correct_page": 7, "four_correct_page": 7, "seconds": { "single": 1.036, "four": 1.036 } }, "wsp8.omitted.mixed": { "queries": 16, "present": 8, "turned_present": 8, "four_correct_page": 7, "four_turned_correct_page": 7, "seconds": { "single": 1.094, "four": 1.075 } } }, "net_turned_gain": 44, "numeric_gate": true}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980"""Verify ambiguous whole-frame candidates using local features and their closest rivals."""from contextlib import closingfrom functools import lru_cache
import numpy as npfrom PIL import Image,ImageOpsimport pypdfium2 as pdfium
from register import extract,evidence
def nearest_three(queries,candidates): """Rank eligible candidates in bounded batches. Earlier indices break ties.""" eligible=np.flatnonzero(candidates.any(axis=1)) result=[() for _ in queries] if not len(eligible): return result targets=candidates[eligible] batch_size=max(1,min(128,1_000_000//len(targets))) for offset in range(0,len(queries),batch_size): batch=queries[offset:offset+batch_size] scores=np.clip(batch@targets.T,-1,1) for i,(query,row) in enumerate(zip(batch,scores),offset): if query.any(): indices=[] for _ in range(min(3,len(row))): idx=int(row.argmax()) indices.append(int(eligible[idx])) row[idx]=-np.inf result[i]=indices return result
def verify(report,names,scans,pages,scan_dir,pdf_path,on_paper): forward=nearest_three(scans,pages) reverse=nearest_three(pages,scans) with pdfium.PdfDocument(pdf_path) as document: document.init_forms() if len(document)!=len(pages): raise ValueError("The PDF page count changed during matching.")
@lru_cache(maxsize=6) def scan_image(index): with Image.open(scan_dir/names[index]) as image: return extract(on_paper(ImageOps.exif_transpose(image)))
@lru_cache(maxsize=6) def page_image(index): with closing(document[index]) as page: scale=640/max(page.get_size()) with closing(page.render(scale=scale,draw_annots=True)) as bitmap: return extract(bitmap.to_pil())
@lru_cache(maxsize=256) def check(i,j): return evidence(scan_image(i),page_image(j))
for i,row in enumerate(report["scans"]): if row["status"]!="review" or row["correlation"] is None or row["correlation"]<.90: continue j=row["candidate_pdf_page"]-1 targets=forward[i] sources=reverse[j] if not targets or not sources or targets[0]!=j or sources[0]!=i: continue winner=check(i,j) details={"outcome":"insufficient_geometry","baseline_reason":row["reason"],"winner":winner} row["geometric_check"]=details if not winner["verified"]: continue rivals=[(i,k) for k in targets[1:]]+[(k,j) for k in sources[1:]] details["rivals"]=[{"scan":names[si],"pdf_page":pj+1,**check(si,pj)} for si,pj in rivals] if any(r["verified"] for r in details["rivals"]): details["outcome"]="rival_geometry" continue details["outcome"]="geometry_supported" row["status"]="suggested" row["reason"]=None assigned={r["candidate_pdf_page"] for r in report["scans"] if r["status"]=="suggested"} report["pdf_pages_without_suggestion"]=[p for p in range(1,len(pages)+1) if p not in assigned]12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091"""Find mutual scan / PDF matches across four displayed orientations in bounded batches."""
import numpy as np
def compare_turns(names, scans, pages, *, batch_size=None): if batch_size is None: batch_size = max(1, min(64, 250_000 // len(pages))) valid_pages = pages.any(axis=1) reverse = np.full(len(pages), -1, dtype=int) reverse_best = np.full(len(pages), -np.inf) reverse_second = np.full(len(pages), -np.inf) forward = [] for start in range(0, len(scans), batch_size): batch = scans[start : start + batch_size] images = batch.reshape(-1, 32, 32) by_angle = np.stack( [ np.clip( np.rot90(images, k, axes=(1, 2)).reshape(len(batch), -1) @ pages.T, -1, 1, ) for k in range(4) ] ) best = by_angle.max(axis=0) best[:, ~valid_pages] = -np.inf best[~batch.any(axis=1), :] = -np.inf for offset, scores in enumerate(best): # Update both reverse winners before discarding this scan's scores. improved = scores > reverse_best reverse_second = np.where( improved, reverse_best, np.maximum(scores, reverse_second) ) reverse[improved] = start + offset np.maximum(reverse_best, scores, out=reverse_best) page = int(scores.argmax()) first = float(scores[page]) if not np.isfinite(first): forward.append(None) continue runner = np.partition(scores, -2)[-2] if len(scores) > 1 else -np.inf angles = by_angle[:, offset, page] direction = int(angles.argmax()) angle_gap = first - float(np.partition(angles, -2)[-2]) gap = first - float(runner) if np.isfinite(runner) else None forward.append((page, first, gap, direction * 90, angle_gap))
rows, suggested = [], set() for i, (name, pair) in enumerate(zip(names, forward)): page = score = gap = reverse_gap = direction = angle_gap = None if pair is None: reason = ( "no_informative_pdf_page" if scans[i].any() else "low_contrast_scan" ) else: page, score, gap, direction, angle_gap = pair if np.isfinite(reverse_second[page]): reverse_gap = float(reverse_best[page] - reverse_second[page]) if score < 0.90: reason = "low_similarity" elif gap is not None and gap < 0.04: reason = "similar_pdf_pages" elif reverse[page] != i or (reverse_gap is not None and reverse_gap < 0.04): reason = "competing_scan" elif angle_gap < 0.04: reason = "ambiguous_angle" else: reason = None suggested.add(page + 1) rows.append( dict( scan=name, status="review" if reason else "suggested", candidate_pdf_page=None if page is None else page + 1, correlation=score, page_margin=gap, scan_margin=reverse_gap, reason=reason, candidate_ccw_degrees=direction, orientation_margin=angle_gap, ) ) return dict( pdf_page_count=len(pages), scans=rows, pdf_pages_without_suggestion=[ j for j in range(1, len(pages) + 1) if j not in suggested ], )12345Transfer study for the fixed four-orientation matcher. Use all four original USGS Water-Supply Papers 1, 8, 36 and 67 in native-usgs/sources.jsonl. Their page reading direction has been studied previously. None was used for scan-to-PDF quarter-turn development. Test whether a scanner image stored as a PDF image object can be linked back to a displayed page and oriented correctly. This is a PDF extraction workflow; the source and page come from the same PDF.
Before any matching, enumerate displayed image objects using MuPDF. Require an embedded raster at least 200 px on both axes with a non-reflecting, orthogonal quarter-turn transform; rendered footprint bounding box edges within 3% of the displayed page. Keep pages with one qualifying object and an xref occurring on a single page in the book. Exclude image mask-only objects. Determine display angle from its native image-to-page transform composed with PDF page rotation using the downward image y axis. Convert to counterclockwise. Hash-order pages within natural-angle strata (turned, zero), retain up to 16 per stratum per book. Use the original stored raster pixels (decode with PyMuPDF, save 640-edge grayscale previews). Record natural angle counts; zero observed is an informative outcome. Verify each pair visually before scoring, mark any geometry/label exception in notes. Preserve the full enrolled panel, report exceptions separately.
Compare ordinary CLI and four-angle CLI on these 4 PDFs, full page gallery, original stored orientation and a balanced cycle of additional clockwise quarter-turns by sorted anonymous filename. These are separate panels: the latter cannot establish naturally occurring rotations. In each book also remove every other enrolled target from the PDF itself and apply the remaining-page reference map for both scan conditions. No threshold changes. For an opt-in experimental release require no wrong page or angle suggestions and no links to missing pages on all transfer panels, and at least five additional correct suggestions on turned sources in the intact deliberately rotated panels combined. No claim about true native sideways images unless an observed case is correct. Save source references, outputs, review evidence and a replay for public use.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318{ "source": { "series": 1, "url": "https://pubs.usgs.gov/wsp/0001/report.pdf", "source": "https://pubs.usgs.gov/publication/wsp1", "doi": "10.3133/wsp1", "sha256": "67eba0c356728c2425295e370e39540bcae1cdc693ba118501b5704625b86d65", "bytes": 21796425, "pages": 62, "issue": null }, "scans": [ { "pdf_page": 53, "xref": 314, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-01.png", "preview_sha256": "4e4e239195f2f2390d8047c355e065c12d2ac59c6d7af5ba54946e0f43254f13" }, { "pdf_page": 31, "xref": 181, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-02.png", "preview_sha256": "07465c49e79d2bb5e5000951440e1429ce66d6a325cb3ecbdfb0007829d80370" }, { "pdf_page": 54, "xref": 320, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-03.png", "preview_sha256": "6121b29b678c01a6e643acf56c23a45b4dacf8622bc6aaad79a96f3938d5938b" }, { "pdf_page": 13, "xref": 72, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-04.png", "preview_sha256": "788932fb6a32ea1e3b3c17b4aaaab732d33fa92314ef24816992b192d43e6053" }, { "pdf_page": 27, "xref": 157, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-05.png", "preview_sha256": "18f7e8ad75fe7f13aa31d42d052ff4b0b12d680a8110c44f57c96577ec4ffa54" }, { "pdf_page": 2, "xref": 6, "ccw": 0, "transform": [ 394.20001220703125, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2190, 3525 ], "scan": "object-06.png", "preview_sha256": "94b79c6c6e6174b0cfb4c43b64e4390e031c75e783d7ed7ce17b735e79d899de" }, { "pdf_page": 4, "xref": 18, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-07.png", "preview_sha256": "76647bfd422757747bf5291863514bf50e5e8141c923a2c3efe0faab22170063" }, { "pdf_page": 48, "xref": 283, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-08.png", "preview_sha256": "c60a306d379ccae5d18a45f1a0e1fadca503adb37a7ee83425789ef1338228e0" }, { "pdf_page": 58, "xref": 344, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-09.png", "preview_sha256": "8cbaf77a9ceaf31dac8e52dc434f8fccd196a57f781e6234a1c329cf8afa550f" }, { "pdf_page": 36, "xref": 211, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-10.png", "preview_sha256": "e520f37890aacb8e32991d3dd9fcb4ec101daaaef9debc57c7f0335860ae3b95" }, { "pdf_page": 1, "xref": 464, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-11.png", "preview_sha256": "9132d3fc0f5d1a6b75fb57b6efe28a1bc5a9ccdfc9666968f07371332d063f4c" }, { "pdf_page": 23, "xref": 133, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-12.png", "preview_sha256": "609eb12b8bc27c7026c1a6dbdabebd9877c2f19d2bc0d5e9c8ba8662adc6ec5b" }, { "pdf_page": 45, "xref": 265, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-13.png", "preview_sha256": "85320678f366e44cfc7d70ad71800d91580eb64bed6e345ff1daa2da552bd6ff" }, { "pdf_page": 3, "xref": 12, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-14.png", "preview_sha256": "0b7c4367be25249665fb87f6e0d00d5612d8304de6011ba5e99b000431481f2a" }, { "pdf_page": 57, "xref": 338, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-15.png", "preview_sha256": "3dd4e613cd636a74a99ef89a9acf220a934b0dc9e9eaf45e0dab96a68b2b12d3" }, { "pdf_page": 16, "xref": 90, "ccw": 0, "transform": [ 400.5, 0.0, 0.0, 634.5, 0.0, 0.0 ], "original_pixels": [ 2225, 3525 ], "scan": "object-16.png", "preview_sha256": "d94a3ff0b58a4f4604c6f9e6813127e524a4b9f731b887d9edfeadc463dd30ce" } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318{ "source": { "series": 36, "url": "https://pubs.usgs.gov/wsp/0036/report.pdf", "source": "https://pubs.usgs.gov/publication/wsp36", "doi": "10.3133/wsp36", "sha256": "e27f9751426e6ed9207647cd2c824e1cb02e61007da978bcc1c021ef9cb932fe", "bytes": 12805117, "pages": 98, "issue": null }, "scans": [ { "pdf_page": 98, "xref": 375, "ccw": 0, "transform": [ 397.20001220703125, 0.0, 0.0, 648.719970703125, -0.6000059843063354, -0.3599853515625 ], "original_pixels": [ 3310, 5406 ], "scan": "object-01.png", "preview_sha256": "7fff060587c773fb78585e0bbae640fe9ae9e8ef8e68a3d0d9eaefc46283819d" }, { "pdf_page": 21, "xref": 74, "ccw": 0, "transform": [ 397.20001220703125, 0.0, 0.0, 648.719970703125, -0.6000059843063354, -0.3599853515625 ], "original_pixels": [ 3310, 5406 ], "scan": "object-02.png", "preview_sha256": "4046e4cbc3d6d49d5e3103d73f6ac49bd54d2008486493f3716a8ad6e1131d33" }, { "pdf_page": 53, "xref": 198, "ccw": 0, "transform": [ 399.7200927734375, 0.0, 0.0, 650.280029296875, -1.7999999523162842, -1.08001708984375 ], "original_pixels": [ 3331, 5419 ], "scan": "object-03.png", "preview_sha256": "a403c42a3d18bb5d4b521e6c1f587b681d43a21eed085c97ca48f9f621b1130d" }, { "pdf_page": 4, "xref": 10, "ccw": 0, "transform": [ 396.0, 0.0, 0.0, 648.0, 0.0, 0.0 ], "original_pixels": [ 3300, 5400 ], "scan": "object-04.png", "preview_sha256": "07f6f3751cfcd29f313956610d537c7bfb42c81f5443d5af30dd07b65b30a2cb" }, { "pdf_page": 66, "xref": 249, "ccw": 0, "transform": [ 398.5201110839844, 0.0, 0.0, 649.5601196289062, -1.2000000476837158, -0.7200927734375 ], "original_pixels": [ 3321, 5413 ], "scan": "object-05.png", "preview_sha256": "26af6e7af20dd4a579b5eb33b42d2734e4a95de9d2aa93210f852ed088b05f27" }, { "pdf_page": 15, "xref": 50, "ccw": 0, "transform": [ 397.20001220703125, 0.0, 0.0, 648.719970703125, -0.6000059843063354, -0.3599853515625 ], "original_pixels": [ 3310, 5406 ], "scan": "object-06.png", "preview_sha256": "25e105a8d12a9823e30e32317660c0bafe467c00c25a127a08908be29ddbf2b8" }, { "pdf_page": 7, "xref": 20, "ccw": 0, "transform": [ 398.5201110839844, 0.0, 0.0, 649.5601196289062, -1.2000000476837158, -0.7200927734375 ], "original_pixels": [ 3321, 5413 ], "scan": "object-07.png", "preview_sha256": "64a9a12472cb9d32763816785c203df149f88fb72c58c06e7caa6a426d777371" }, { "pdf_page": 9, "xref": 28, "ccw": 0, "transform": [ 399.7200927734375, 0.0, 0.0, 650.280029296875, -1.7999999523162842, -1.08001708984375 ], "original_pixels": [ 3331, 5419 ], "scan": "object-08.png", "preview_sha256": "f5edc619cdaeabbf04da470ec2c914c26e17df27379a45cfc61f665d75e5c22e" }, { "pdf_page": 14, "xref": 47, "ccw": 0, "transform": [ 398.5201110839844, 0.0, 0.0, 649.5601196289062, -1.2000000476837158, -0.7200927734375 ], "original_pixels": [ 3321, 5413 ], "scan": "object-09.png", "preview_sha256": "902a5ead492c534432ff30c1920200fd373e8796a63872f93b295ddcf39066b1" }, { "pdf_page": 17, "xref": 58, "ccw": 0, "transform": [ 401.0400085449219, 0.0, 0.0, 651.1201171875, -2.5199999809265137, -1.56011962890625 ], "original_pixels": [ 3342, 5426 ], "scan": "object-10.png", "preview_sha256": "099ff55dc47d5b5482c4f25837aa39630a09d4715ecb8540129319b55c7d10ef" }, { "pdf_page": 82, "xref": 312, "ccw": 0, "transform": [ 401.0400085449219, 0.0, 0.0, 651.1201171875, -2.5199999809265137, -1.56011962890625 ], "original_pixels": [ 3342, 5426 ], "scan": "object-11.png", "preview_sha256": "1dd97608f2aba0cfbd106b06eac7b2b5f401ab9559ecfc36abdadb746caaae00" }, { "pdf_page": 86, "xref": 328, "ccw": 0, "transform": [ 398.5201110839844, 0.0, 0.0, 649.5601196289062, -1.2000000476837158, -0.7200927734375 ], "original_pixels": [ 3321, 5413 ], "scan": "object-12.png", "preview_sha256": "7b2ad77876be7bd99053c0c1e0d77793518f1d980a0cbabc70d048b7849cffaa" }, { "pdf_page": 62, "xref": 233, "ccw": 0, "transform": [ 398.5201110839844, 0.0, 0.0, 649.5601196289062, -1.2000000476837158, -0.7200927734375 ], "original_pixels": [ 3321, 5413 ], "scan": "object-13.png", "preview_sha256": "6743ebf9c6a3b045815bb15c5e351a9750c0eb9fab43758caa1b4fe941474bfe" }, { "pdf_page": 45, "xref": 166, "ccw": 0, "transform": [ 397.20001220703125, 0.0, 0.0, 648.719970703125, -0.6000059843063354, -0.3599853515625 ], "original_pixels": [ 3310, 5406 ], "scan": "object-14.png", "preview_sha256": "f175a58143b0da5d0cddd46d64cadafe67a978fff8e18e2910bdb92476feac00" }, { "pdf_page": 69, "xref": 261, "ccw": 0, "transform": [ 397.20001220703125, 0.0, 0.0, 648.719970703125, -0.6000059843063354, -0.3599853515625 ], "original_pixels": [ 3310, 5406 ], "scan": "object-15.png", "preview_sha256": "9f23f0acc926e58a964262256f302f9b4121910903c04ca7b567b16e49509a8e" }, { "pdf_page": 43, "xref": 158, "ccw": 0, "transform": [ 397.20001220703125, 0.0, 0.0, 648.719970703125, -0.6000059843063354, -0.3599853515625 ], "original_pixels": [ 3310, 5406 ], "scan": "object-16.png", "preview_sha256": "2fc6f2b88b9f8bb797d35160cf7de56c2892461d1e1462f740c1d1b289692d43" } ]}.gitattributes+1
volume-sequences/scan-pdf-match/quarter-turns/LICENSEAdded+203
volume-sequences/scan-pdf-match/quarter-turns/README.mdAdded+64
volume-sequences/scan-pdf-match/quarter-turns/development-protocol.txtAdded+4
volume-sequences/scan-pdf-match/quarter-turns/example/alignments.jpgAdded

Large File Pointer Details
- SHA256: ed6a66e3b2b447947506672508f48bdb15fdb416a4a9140e8ab9d40c383dc3cf
- Pointer size: 131 Bytes
- Size of remote file: 146 kB
volume-sequences/scan-pdf-match/quarter-turns/example/matches.jsonAdded+52
volume-sequences/scan-pdf-match/quarter-turns/example/references.jsonAdded+30
volume-sequences/scan-pdf-match/quarter-turns/example/scans/drawing.pngAdded

Large File Pointer Details
- SHA256: 3f5251aaf60103b3c1b6c33c3d36ebb5aeda2d52d686385541cbd5586bdf6909
- Pointer size: 131 Bytes
- Size of remote file: 115 kB
volume-sequences/scan-pdf-match/quarter-turns/example/scans/faint.pngAdded

Large File Pointer Details
- SHA256: c7c22afeb0e68788d7bb67680b4548657fb7f759513b146482f1ec62f056c163
- Pointer size: 129 Bytes
- Size of remote file: 5.19 kB
volume-sequences/scan-pdf-match/quarter-turns/example/scans/graph.pngAdded

Large File Pointer Details
- SHA256: 2e5d6447826c9da3dfc8e845aa661421e6467c74ca9019816e5553cebb51d73b
- Pointer size: 131 Bytes
- Size of remote file: 106 kB
volume-sequences/scan-pdf-match/quarter-turns/example/scans/plate.pngAdded

Large File Pointer Details
- SHA256: 3086f13fb1561c580a2e980e78c96ecea4e1d8335c943f7c368898fabcad5fec
- Pointer size: 131 Bytes
- Size of remote file: 109 kB
volume-sequences/scan-pdf-match/quarter-turns/example/windmills.pdfAdded+3
volume-sequences/scan-pdf-match/quarter-turns/match_pages.pyAdded+152
volume-sequences/scan-pdf-match/quarter-turns/reference-review.txtAdded+6
volume-sequences/scan-pdf-match/quarter-turns/register.pyAdded+67
volume-sequences/scan-pdf-match/quarter-turns/replay_volume.pyAdded+108
volume-sequences/scan-pdf-match/quarter-turns/results/development-summary.jsonAdded+182
volume-sequences/scan-pdf-match/quarter-turns/results/object-census.jsonAdded+42
volume-sequences/scan-pdf-match/quarter-turns/results/transfer-rows.jsonlAdded
volume-sequences/scan-pdf-match/quarter-turns/results/transfer-summary.jsonAdded+186
volume-sequences/scan-pdf-match/quarter-turns/scan_pdf_geometry.pyAdded+80
volume-sequences/scan-pdf-match/quarter-turns/scan_pdf_turns.pyAdded+91
volume-sequences/scan-pdf-match/quarter-turns/transfer-protocol.txtAdded+5
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/references.jsonAdded+318
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-01.pngAdded

Large File Pointer Details
- SHA256: 4e4e239195f2f2390d8047c355e065c12d2ac59c6d7af5ba54946e0f43254f13
- Pointer size: 131 Bytes
- Size of remote file: 165 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-02.pngAdded

Large File Pointer Details
- SHA256: 07465c49e79d2bb5e5000951440e1429ce66d6a325cb3ecbdfb0007829d80370
- Pointer size: 131 Bytes
- Size of remote file: 154 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-03.pngAdded

Large File Pointer Details
- SHA256: 6121b29b678c01a6e643acf56c23a45b4dacf8622bc6aaad79a96f3938d5938b
- Pointer size: 131 Bytes
- Size of remote file: 175 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-04.pngAdded

Large File Pointer Details
- SHA256: 788932fb6a32ea1e3b3c17b4aaaab732d33fa92314ef24816992b192d43e6053
- Pointer size: 131 Bytes
- Size of remote file: 165 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-05.pngAdded

Large File Pointer Details
- SHA256: 18f7e8ad75fe7f13aa31d42d052ff4b0b12d680a8110c44f57c96577ec4ffa54
- Pointer size: 131 Bytes
- Size of remote file: 166 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-06.pngAdded

Large File Pointer Details
- SHA256: 94b79c6c6e6174b0cfb4c43b64e4390e031c75e783d7ed7ce17b735e79d899de
- Pointer size: 130 Bytes
- Size of remote file: 85.8 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-07.pngAdded

Large File Pointer Details
- SHA256: 76647bfd422757747bf5291863514bf50e5e8141c923a2c3efe0faab22170063
- Pointer size: 130 Bytes
- Size of remote file: 74.7 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-08.pngAdded

Large File Pointer Details
- SHA256: c60a306d379ccae5d18a45f1a0e1fadca503adb37a7ee83425789ef1338228e0
- Pointer size: 131 Bytes
- Size of remote file: 165 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-09.pngAdded

Large File Pointer Details
- SHA256: 8cbaf77a9ceaf31dac8e52dc434f8fccd196a57f781e6234a1c329cf8afa550f
- Pointer size: 131 Bytes
- Size of remote file: 162 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-10.pngAdded

Large File Pointer Details
- SHA256: e520f37890aacb8e32991d3dd9fcb4ec101daaaef9debc57c7f0335860ae3b95
- Pointer size: 131 Bytes
- Size of remote file: 168 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-11.pngAdded

Large File Pointer Details
- SHA256: 9132d3fc0f5d1a6b75fb57b6efe28a1bc5a9ccdfc9666968f07371332d063f4c
- Pointer size: 131 Bytes
- Size of remote file: 111 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-12.pngAdded

Large File Pointer Details
- SHA256: 609eb12b8bc27c7026c1a6dbdabebd9877c2f19d2bc0d5e9c8ba8662adc6ec5b
- Pointer size: 131 Bytes
- Size of remote file: 140 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-13.pngAdded

Large File Pointer Details
- SHA256: 85320678f366e44cfc7d70ad71800d91580eb64bed6e345ff1daa2da552bd6ff
- Pointer size: 131 Bytes
- Size of remote file: 150 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-14.pngAdded

Large File Pointer Details
- SHA256: 0b7c4367be25249665fb87f6e0d00d5612d8304de6011ba5e99b000431481f2a
- Pointer size: 130 Bytes
- Size of remote file: 69.2 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-15.pngAdded

Large File Pointer Details
- SHA256: 3dd4e613cd636a74a99ef89a9acf220a934b0dc9e9eaf45e0dab96a68b2b12d3
- Pointer size: 131 Bytes
- Size of remote file: 145 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/scans/object-16.pngAdded

Large File Pointer Details
- SHA256: d94a3ff0b58a4f4604c6f9e6813127e524a4b9f731b887d9edfeadc463dd30ce
- Pointer size: 131 Bytes
- Size of remote file: 167 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/sheet-01.jpgAdded

Large File Pointer Details
- SHA256: 09a2a969da51c0c4c51ff9c99e2ec9c5591d8b727b662ad74013424af4976642
- Pointer size: 131 Bytes
- Size of remote file: 177 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp1/sheet-02.jpgAdded

Large File Pointer Details
- SHA256: 94bbdd19236029f647089967f37f144ce6554228f78a736e5b3a644a1855f781
- Pointer size: 131 Bytes
- Size of remote file: 173 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/references.jsonAdded+318
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-01.pngAdded

Large File Pointer Details
- SHA256: 7fff060587c773fb78585e0bbae640fe9ae9e8ef8e68a3d0d9eaefc46283819d
- Pointer size: 131 Bytes
- Size of remote file: 102 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-02.pngAdded

Large File Pointer Details
- SHA256: 4046e4cbc3d6d49d5e3103d73f6ac49bd54d2008486493f3716a8ad6e1131d33
- Pointer size: 131 Bytes
- Size of remote file: 107 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-03.pngAdded

Large File Pointer Details
- SHA256: a403c42a3d18bb5d4b521e6c1f587b681d43a21eed085c97ca48f9f621b1130d
- Pointer size: 130 Bytes
- Size of remote file: 98.3 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-04.pngAdded

Large File Pointer Details
- SHA256: 07f6f3751cfcd29f313956610d537c7bfb42c81f5443d5af30dd07b65b30a2cb
- Pointer size: 129 Bytes
- Size of remote file: 7.61 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-05.pngAdded

Large File Pointer Details
- SHA256: 26af6e7af20dd4a579b5eb33b42d2734e4a95de9d2aa93210f852ed088b05f27
- Pointer size: 131 Bytes
- Size of remote file: 103 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-06.pngAdded

Large File Pointer Details
- SHA256: 25e105a8d12a9823e30e32317660c0bafe467c00c25a127a08908be29ddbf2b8
- Pointer size: 130 Bytes
- Size of remote file: 79.6 kB
volume-sequences/scan-pdf-match/quarter-turns/volumes/wsp36/scans/object-07.pngAdded

Large File Pointer Details
- SHA256: 64a9a12472cb9d32763816785c203df149f88fb72c58c06e7caa6a426d777371
- Pointer size: 130 Bytes
- Size of remote file: 63.9 kB