Daniel Reetz, the founder of the DIY Book Scanner community, has recently started making videos of prototyping and shop tips. If you are tinkering with a book scanner (or any other project) in your home shop, these tips will come in handy. https://www.youtube.com/channel/UCn0gq8 ... g_8K1nfInQ

New and not sure where I am going wrong

Don't know where to start, or stuck on a certain problem? Drop by and tell us about it. Feel like helping others? Start here.
Post Reply
Zem
Posts: 2
Joined: 26 Feb 2018, 21:51
E-book readers owned: Kindle Oasis, Kindle Fire
Number of books owned: 500
Country: USA

New and not sure where I am going wrong

Post by Zem » 27 Feb 2018, 13:35

I have made my cardboard setup and scanned the preface of a book as a test. I have run it through Scan Tailor, but I'm not quite sure what I am doing. I have adjusted all sorts of Scan Tailor settings, but none of them seem right.

So it seems my problem is likely either lighting, the camera hardware (Samsung WB350), camera settings, or any of the steps in Scan Tailor. I was looking for tutorial or documentation and didn't find that (I understand with freeware there's no obligation on the developer for that).

I'd appreciate references to any support materials or specifics about what I'm doing from (whether the initial picture is bad or what I'm doing in Scan Tailor). One problem with this book is that while the preface is pretty clean, some of these pages have literally no margin. In some places words are cutoff at the edge of the paper.

Thanks!
SAM_2869.JPG
outSAM_2869.jpg

BruceG
Posts: 67
Joined: 14 May 2014, 23:17
Number of books owned: 500
Country: Australia

Re: New and not sure where I am going wrong

Post by BruceG » 28 Feb 2018, 04:43

The scan looks OK
image_001_Left.jpg
image_001_Left.jpg (23.76 KiB) Viewed 806 times
Had the file been a decent size it would have been easier to check.
I used YASW for dekeystoning & cropping.
How do you want to use the output?

BillGill
Posts: 98
Joined: 18 Dec 2016, 17:13
E-book readers owned: Calibre, FBReader
Number of books owned: 7000
Country: USA

Re: New and not sure where I am going wrong

Post by BillGill » 28 Feb 2018, 10:39

Looking at your original scan it doesn't seem to me that you would need to use scan tailor. About all that needs to be done before you send it to OCR is to crop it. I use ABBY Finereader for OCR, so that may make a difference. FineReader automatically takes care of rotation and dekeystoning. If you are using something else you may need to rotate it.

Having said that, one bit of advice I can offer is to get your camera closer to the document. If it is positioned so that it just covers the area to be scanned it simplifies things quite a bit. A common method is to use a camera with a zoom function, but for my latest scanner I use the camera unzoomed, and just position it close to the platen. This may produce a problem with lighting, the camera may cast a shadow. For that you will want to use lighting that is at a very low angle to the page being scanned. Use a bright light pointed almost parallel to the page. In fact use 2 lights, one on each side. I think that is probably the best way to handle lighting, if your rig can accommodate it.

For pages that don't have a margin you will have to just go ahead and bite the bullet. The only way to fix that is to manually edit the text files to correct the missing characters.

Bill

Zem
Posts: 2
Joined: 26 Feb 2018, 21:51
E-book readers owned: Kindle Oasis, Kindle Fire
Number of books owned: 500
Country: USA

Re: New and not sure where I am going wrong

Post by Zem » 28 Feb 2018, 13:31

The final purpose will be pdf reading and printing a page at a time so I don't have to carry around this massive book. The real value is sheet music later in the book... the full book will bend my portable music stand.

The camera zooms, but I was having trouble getting it just right because it wants to zoom in large increments. I will see if I can figure out a method of getting it closer. As far as lighting goes, I have four bright lights at low angles used for lighting some green screen kit I bought a couple years ago. They are very white.

I will check out these other codes. Thanks!

L.Willms
Posts: 129
Joined: 21 Sep 2016, 10:51
E-book readers owned: Tolino Shine
Country: Germany
Location: Frankfurt/Main, Germany

Re: New and not sure where I am going wrong

Post by L.Willms » 09 Apr 2018, 05:31

BillGill wrote:
28 Feb 2018, 10:39
Looking at your original scan it doesn't seem to me that you would need to use scan tailor.
I disagree.

Processing the scans with ScanTailor (Advanced) is the best thing which can be done to have proper images for OCR.

zbgns
Posts: 21
Joined: 22 Dec 2016, 06:07
E-book readers owned: Tolino, Kindle
Number of books owned: 600
Country: Poland

Re: New and not sure where I am going wrong

Post by zbgns » 10 Apr 2018, 05:37

I experimented with some implementations of the cardboard scanner concept and it seems that there are a few common issues that you apparently also encountered. It would be relatively easy to apply some improvements that may help in reduction of manual work during processing with Scan Tailor. Scan Tailor has excellent automatic mode so majority of work may be done without manual intervention. However pictures to be processed need to meet specific criteria that maybe are not obvious at the beginning. Otherwise, it is still possible to obtain reasonable output quality but very time consuming manual adjustments of each page during processing may be necessary. So please let me comment on the “hardware” setup first.
1. The picture is overexposed and the contrast ratio between background and letters is not as high as it may be, resulting in fussiness. It makes result of binarization process worse. The threshold algorithm need to decide what areas should be white (background) and black (letters) but this is quite difficult when shapes of letters are not fully sharp. You may correct exposure in your camera, however I assume that adjustments described below may significantly improve also the brightness issue.
2. As BillGill mentioned, the camera is too far and the picture aside from the book contains a lot of unnecessary elements. It may cause problems with exposure as the camera focuses on some elements in the background. In addition Scan Tailor have difficulties with automatic cropping of the contents of the book and it must be done manually.
3. Black (or dark) background should also make significant difference in terms of better contrast ratio as well better accuracy of cropping done by Scan Tailor.
Nevertheless, the quality of the picture provided seems to be sufficient to obtain reasonable output. I processed the attached picture with the Scan Tailor (Experimental) and the result seems to be well, although manual corrections were applied. First of all I needed to do rectangular selection to crop the wanted area. The Scan Tailor crop algorithm was misled by some elements in the background. I also corrected geometry of the picture (dewrap). This correction is very slight as the picture has good geometry (especially taking into account how difficult is to obtain perfect positioning of a camera in case of a cardboard scanner). Finally I increased thickness at the final stage up to 10.
Afterwards I used tesseract on this output picture in order to check how accurate the OCR recognition is. There are some errors but only a few. This should also give acceptable results in case of sheet music. Please only note that cardboard scanners lose information on physical dimensions of a scanned page. So usually it is necessary to set correct height, weight and DPI before converting to pdf.
Attachments
SAM_2869.png

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest