Scan a book with your phone, then OCR it
99.7%
Tesseract on strongly curled pages, after page-dewarp
20 phone photos of an open book
I typeset Pride and Prejudice as 20 open-book spreads, then rendered each as a 12 MP phone-style photo.
Made-up photos, so I know every word. Four curl levels, from none to strong, 5 spreads each. 11,756 words in all.
As taken: Apple Vision barely noticed
| Reader | No curl to medium | Strong curl |
|---|---|---|
| Apple Vision | 100% | 98.5% |
| Tesseract | 99.7% | 94.3% |
| RapidOCR | 99.6% | 88.6% |
| Our Actor's code | 99.9% | 94.3% |
With no to medium curl, every reader found 99.6% of words or more. Strong curl is where they split.
RapidOCR reads across both pages
On a whole spread, RapidOCR mixed the pages line by line: a line from the left page, then the line beside it on the right. Only 51.6% of words were in reading order.
With one page per file, the order came back: 95.3% of all words in sequence.
page-dewarp fixed Tesseract on strong curl
| Reader | As cut | After page-dewarp |
|---|---|---|
| Apple Vision | 100% | 100% |
| Tesseract | 93.5% | 99.7% |
| RapidOCR | 82.9% | 95.4% |
| Our Actor's code | 95.1% | 99.8% |
Tesseract on the same pages, flat and never photographed: 99.8%. With no to medium curl, page-dewarp cost RapidOCR words: 96.9%, against 99.3% as cut.
Flatten and read, in 5 commands
You need Python 3.10 or newer and Tesseract. Name the two page photos left.jpg and right.jpg.
python3 -m venv flat && source flat/bin/activate
pip install page-dewarp
page-dewarp -x 10 -y 10 left.jpg right.jpg
tesseract left_thresh.png left
tesseract right_thresh.png right
- One page per file: crop along the fold, or shoot one page at a time.
-
Keep
-x 10 -y 10. With the default margins, page-dewarp cut off letters next to the spine, and Tesseract found 94.2% of all words, against 99.9%. -
The output is black and white:
left_thresh.png. Add-nb 1to keep gray. - If it finds no text lines, it writes no file and still exits 0.
- page-dewarp is MIT licensed.
Or send the photos to our Actor
Our Apify Actor, PDF to Markdown OCR, reads JPG and PNG files by URL. It has no dewarp step.
- As taken, its code found 98.5% of words, and 94.3% with strong curl.
- After page-dewarp, it found 99.8% on strongly curled pages.
- A scanned page or image costs $0.006, plus $0.00005 to start each run at the default 1 GB of memory.
- We make the Actor, not page-dewarp.
How I tested, and what I skipped
- A Mac with Apple M5 Max, macOS 26.6.
- The text: Pride and Prejudice (Project Gutenberg #1342), set in Georgia at 11 pt.
- 40 pages, 31 lines a page.
- The curl: each page rises from the spine like a cylinder, with a spine shadow. The phone tilts up to 2 degrees.
- The photos: 4032 x 3024 JPG, a little blur and noise, light from one side.
- Words found: true words in any order, case and punctuation ignored. Reading order: true words found in sequence.
- One page per file: cut along the true fold line, as a careful crop would.
- The same photos at 1,600 px wide moved the totals for Apple Vision, Tesseract and RapidOCR by 1.1 points or less. On strong curl, RapidOCR gained 4.2 points. I did not run the Actor on them.
- No times: every run was at background priority on a busy Mac.
- Scripts and results stay in our private repo, in research/bench/scan-book-phone-2026-11-25/.
| Reader | Version |
|---|---|
| Tesseract | 5.5.4, eng |
| Apple Vision | accurate, en-US |
| RapidOCR | 3.10.0, PP-OCRv6 small |
| Our Actor's code | 0.1.141, run locally |
| page-dewarp | 0.3.4 |
What I did not test
- Real phone photos: glare, motion blur, fingers, thick books.
- Scanner apps, and Live Text on an iPhone.
- Languages other than English, and other fonts.
Questions people ask
Can I OCR a book with my phone?
Yes. On our 20 made-up spread photos, Apple Vision found 99.6% of the words as taken. Tesseract did best after page-dewarp on every page (99.9%). RapidOCR needs one page per file to keep the order, and page-dewarp helped it only on strong curl.
Do I need to flatten curved pages before OCR?
Mostly for strong curl, and not for Apple Vision. page-dewarp took Tesseract from 93.5% to 99.7% of words on strongly curled pages. With no to medium curl, it cost RapidOCR words.
How do I turn a book into text?
Photograph each spread, crop it to one page per file, flatten curled pages with page-dewarp, then run OCR. The 5 commands are above.
Should I photograph one page or two at a time?
One page per file is safer. RapidOCR read across both pages of a spread, and I ran page-dewarp on one page per file. Apple Vision kept the order either way.