Page 1 of 1

What to do with a page with text and graphics

Posted: 08 Jan 2020, 23:27
by wgrillo
Hello,
I'm working on scanning my first books with a cardboard box scanner. My plan is to improve the images with ScanTailor, and then put them through OCR with Tesseract. The problem I'm facing is that I have some pages where there are pictures and the same processing that renders the text sharper, completely destroys the pictures.
If it were whole page pictures, I could just skip that page, or work on it with another program to get it to the same size, etc. But what do I do when a page is half OCR-worthy text and half photo?
Thanks in advance for your help.

Re: What to do with a page with text and graphics

Posted: 09 Jan 2020, 06:50
by zbgns
In case where there are pages with text and photos it would be possible to apply the "mixed output" (text areas are binarized but pictures remain in color). Picture areas should be selected and indicated as picture zones and "Rectangular picture shape" mode from ST Advanced is really helpful for that. Usually Tesseract correctly identifies text areas on this type of files so the OCR should be performed correctly.
Moreover, if necessary, text (binarized) and pictures (color) may be saved as foreground (letters) and background (image) layers to separate files. ST Advanced offers "splitting output" feature for that and ST Universal has something similar. Then both layers may be reprocessed independently, although pairing these layers back to combined pages with text and pictures may be more tricky task.

Re: What to do with a page with text and graphics

Posted: 16 Jan 2020, 19:18
by wgrillo
Hello, zbgns,
I'm sorry it took me so long to reply, other stuff has kept me busy and I've only now been able to get back to this project.
I'm trying to do what you suggest, but I can't find any of the options you suggest. It's almost as if I was using a different program. I read the page you linked to, and it's the same one I downloaded Scan Tailor Advanced from. I was using version 2019.8.16, and you linked to a previous one, 1.0.16, so I uninstalled, and installed the old one, but I still don't get those options.
Is there something obvious I'm missing, like a "Dummy mode on" checkbox? (My steps are quite dummy-like: open the program, get two big blue options, choose the one that says "Create new project...", select the directory, and then I get "steps" on the left (Fix Orientation, Split pages, Deskew...) a page in the center, and thumbnails on the right. Should I be doing that different?
Thanks:

Wences

Re: What to do with a page with text and graphics

Posted: 20 Jan 2020, 18:15
by zbgns
I attach some screenshots and hope you will find them useful.
1. Let's say there is a page with pictures and text (doesn't matter there are in grayscale, the same apply to color ones)
Zrzut ekranu z 2020-01-17 22-00-59.png
2. In the "Output" stage:
a. Change "Mode" from "Black and White" to "Mixed"
b. Go to "Picture Zones" and check if selection of pictures is correct. First change "Picture shape" from "Free" to "Rectangular". Some manual adjustments may be necessary.
Zrzut ekranu z 2020-01-17 22-01-37.png
3, At the output text zones should be binarized but not picture zones. Also "Split output" is indicated if you want to have the layers in separate files.
Zrzut ekranu z 2020-01-17 22-02-25.png

Re: What to do with a page with text and graphics

Posted: 03 Feb 2020, 10:12
by wgrillo
zbgns: you are awesome!!! :)

My mistake was that I was looking for the options in the menus, and everywere else, and not in the output stage! Thanks so much, now I'm progressing again!
Cheers:

Wences