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

Dekeystoning with a checkerboard

Share your process here - how to build something, scan something, or use something.
zamacam
Posts: 20
Joined: 04 Mar 2014, 00:53

Re: Dekeystoning with a checkerboard

Post by zamacam » 14 Jan 2011, 17:51

I did a quick test. Here the results:
- I've got a crash without using -Xmx512M option. I begin to think this option is required
- I've got a crash in my first test using non-rotaded images (I attached crash report below)
- it works nicely on 25 images after I rotated them (up visible on your barcodes images is really up and not right positionned as on the test image I uploaded in my previous message)

I will run qrpc.jar on nearly 1000 pages book this night. I will report what will happen here.

My successfull test make me very happy. I ran it on a book with high keystone I've never been able to fix correctly using software like PhotoShop or DxO. Images generated by your software are just perfect. :D

Code: Select all

imac:scantailor david$ java -Xmx512M -jar ../dist/qrpc.jar left/
qrpc (QR Perspective Correction) v 1.0, by Robert Baruch (robert.c.baruch@gmail.com)
2011-01-14 18:18:32,817 [INFO ] Found 410 jpeg images to process
2011-01-14 18:18:32,818 [DEBUG] Loading image IMG_0003.JPG
2011-01-14 18:18:33,813 [DEBUG] Create luminance source
2011-01-14 18:18:33,814 [DEBUG] Create binarizer
2011-01-14 18:18:33,815 [DEBUG] Return results
2011-01-14 18:18:35,471 [INFO ] No QR codes found in image
2011-01-14 18:18:35,472 [WARN ] No initial QR codes found for dekeystoning. Leaving file alone.
2011-01-14 18:18:35,472 [DEBUG] Loading image IMG_0004.JPG
2011-01-14 18:18:36,124 [DEBUG] Create luminance source
2011-01-14 18:18:36,124 [DEBUG] Create binarizer
2011-01-14 18:18:36,124 [DEBUG] Return results
2011-01-14 18:18:37,636 [INFO ] No QR codes found in image
2011-01-14 18:18:37,637 [WARN ] No initial QR codes found for dekeystoning. Leaving file alone.
2011-01-14 18:18:37,637 [DEBUG] Loading image IMG_0005.JPG
2011-01-14 18:18:38,267 [DEBUG] Create luminance source
2011-01-14 18:18:38,267 [DEBUG] Create binarizer
2011-01-14 18:18:38,267 [DEBUG] Return results
2011-01-14 18:18:39,745 [INFO ] No QR codes found in image
2011-01-14 18:18:39,745 [WARN ] No initial QR codes found for dekeystoning. Leaving file alone.
2011-01-14 18:18:39,745 [DEBUG] Loading image IMG_0006.JPG
2011-01-14 18:18:40,354 [DEBUG] Create luminance source
2011-01-14 18:18:40,355 [DEBUG] Create binarizer
2011-01-14 18:18:40,355 [DEBUG] Return results
2011-01-14 18:18:41,819 [INFO ] No QR codes found in image
2011-01-14 18:18:41,819 [WARN ] No initial QR codes found for dekeystoning. Leaving file alone.
2011-01-14 18:18:41,819 [DEBUG] Loading image IMG_0007.JPG
2011-01-14 18:18:42,450 [DEBUG] Create luminance source
2011-01-14 18:18:42,451 [DEBUG] Create binarizer
2011-01-14 18:18:42,451 [DEBUG] Return results
2011-01-14 18:18:43,923 [INFO ] No QR codes found in image
2011-01-14 18:18:43,923 [WARN ] No initial QR codes found for dekeystoning. Leaving file alone.
2011-01-14 18:18:43,923 [DEBUG] Loading image IMG_0008.JPG
2011-01-14 18:18:44,553 [DEBUG] Create luminance source
2011-01-14 18:18:44,553 [DEBUG] Create binarizer
2011-01-14 18:18:44,553 [DEBUG] Return results
2011-01-14 18:18:46,069 [DEBUG] Number of QR codes found: 2
2011-01-14 18:18:46,070 [DEBUG] QR code 'DIYBookscannerTL':
2011-01-14 18:18:46,070 [DEBUG]   2013.5,473.5
2011-01-14 18:18:46,070 [DEBUG]   2190.0,471.0
2011-01-14 18:18:46,070 [DEBUG]   2193.0,647.5
2011-01-14 18:18:46,070 [DEBUG]   2045.5,620.5
2011-01-14 18:18:46,070 [DEBUG] QR code 'DIYBookscannerTR':
2011-01-14 18:18:46,071 [DEBUG]   2024.5,1270.0
2011-01-14 18:18:46,071 [DEBUG]   2201.5,1267.5
2011-01-14 18:18:46,071 [DEBUG]   2203.5,1444.5
2011-01-14 18:18:46,071 [DEBUG]   2056.5,1417.0
Exception in thread "main" java.lang.NullPointerException
	at qrpc.Main.findQR(Main.java:116)
	at qrpc.Main.main(Main.java:221)

User avatar
rob
Posts: 773
Joined: 03 Jun 2009, 13:50
E-book readers owned: iRex iLiad, Kindle 2
Number of books owned: 4000
Country: United States
Location: Maryland, United States
Contact:

Re: Dekeystoning with a checkerboard

Post by rob » 14 Jan 2011, 22:18

Wow! OK, well I'm happy that the software at least works with the images rotated. I'm not so happy that it doesn't work the way it's supposed to.

The problem with the null pointer exception is that it found some, but not all, of the QR codes. But I'm not sure why it found all the codes with the image rotated!
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.

User avatar
rob
Posts: 773
Joined: 03 Jun 2009, 13:50
E-book readers owned: iRex iLiad, Kindle 2
Number of books owned: 4000
Country: United States
Location: Maryland, United States
Contact:

Re: Dekeystoning with a checkerboard

Post by rob » 14 Jan 2011, 22:26

Actually, now that I'm looking at your output, I'm not even certain that you have the right version of the code. My fault, I think.

Please use this one, and make sure that when you run it, it says that it is version 1.1.
Attachments
qrpc-1.1 2.zip
(1.54 MiB) Downloaded 269 times
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.

zamacam
Posts: 20
Joined: 04 Mar 2014, 00:53

Re: Dekeystoning with a checkerboard

Post by zamacam » 15 Jan 2011, 13:20

I did some tests. Basically it works fine and IMHO everyone should use this program in the end.

I found two bugs. The first one seems to be related to JPEG file format and the second one seems to be related to what is displayed in the image.

About the first bug:

I've got a crash with an image originally generated by PhotoShop CS2 for Mac, as the 450 images available in the directory. When qrpc analyses it, it crashes with following message:

Code: Select all

imac:scantailor david$ java -Xmx1024M -jar 1.1.1/qrpc-1.1/qrpc.jar ../test/
qrpc (QR Perspective Correction) v 1.1 (20110114), by Robert Baruch (robert.c.baruch@gmail.com)
2011-01-15 17:30:21,307 [INFO ] Found 2 jpeg images to process
2011-01-15 17:30:21,309 [DEBUG] Loading image img_0195.jpg
2011-01-15 17:30:22,758 [DEBUG] Create luminance source
2011-01-15 17:30:22,759 [DEBUG] Create binarizer
2011-01-15 17:30:22,759 [DEBUG] Return results
2011-01-15 17:30:23,699 [DEBUG] Number of QR codes found: 4
2011-01-15 17:30:23,700 [DEBUG] QR code 'DIYBookscannerTR':
2011-01-15 17:30:23,701 [DEBUG]   1152.5,1047.0
2011-01-15 17:30:23,701 [DEBUG]   1148.0,865.0
2011-01-15 17:30:23,702 [DEBUG]   1330.5,861.5
2011-01-15 17:30:23,702 [DEBUG]   1303.5,1013.5
2011-01-15 17:30:23,702 [DEBUG] QR code 'DIYBookscannerBR':
2011-01-15 17:30:23,702 [DEBUG]   1171.5,1872.0
2011-01-15 17:30:23,702 [DEBUG]   1167.0,1688.0
2011-01-15 17:30:23,703 [DEBUG]   1350.5,1684.0
2011-01-15 17:30:23,703 [DEBUG]   1323.0,1837.5
2011-01-15 17:30:23,703 [DEBUG] QR code 'DIYBookscannerBL':
2011-01-15 17:30:23,703 [DEBUG]   344.0,1887.0
2011-01-15 17:30:23,703 [DEBUG]   340.5,1704.0
2011-01-15 17:30:23,703 [DEBUG]   524.5,1700.0
2011-01-15 17:30:23,703 [DEBUG]   496.0,1853.5
2011-01-15 17:30:23,704 [DEBUG] QR code 'DIYBookscannerTL':
2011-01-15 17:30:23,704 [DEBUG]   330.0,1062.0
2011-01-15 17:30:23,704 [DEBUG]   326.5,880.0
2011-01-15 17:30:23,704 [DEBUG]   509.5,876.5
2011-01-15 17:30:23,704 [DEBUG]   481.5,1028.5
2011-01-15 17:30:23,704 [INFO ] Estimated dpi: 274
2011-01-15 17:30:23,716 [DEBUG] m00 0.9919021553130454
2011-01-15 17:30:23,716 [DEBUG] m01 0.014380051538901727
2011-01-15 17:30:23,716 [DEBUG] m02 -15.166797816758104
2011-01-15 17:30:23,717 [DEBUG] m10 -0.018230861927265564
2011-01-15 17:30:23,717 [DEBUG] m11 0.9813236619674381
2011-01-15 17:30:23,717 [DEBUG] m12 17.587864267347634
2011-01-15 17:30:23,717 [DEBUG] m20 -1.3245178181935318E-7
2011-01-15 17:30:23,718 [DEBUG] m21 -7.284848000055213E-6
2011-01-15 17:30:23,718 [DEBUG]  TL (330.0,1062.0) -> (330.0,1061.9999999999998)
2011-01-15 17:30:23,718 [DEBUG]  TR (1152.6367797851562,1062.0) -> (1152.4999999999998,1047.0)
2011-01-15 17:30:23,718 [DEBUG]  BL (330.0,1884.6367797851562) -> (344.0,1887.0)
2011-01-15 17:30:23,718 [DEBUG]  BR (1152.6367797851562,1884.6367797851562) -> (1171.4999999999998,1872.0000000000002)
2011-01-15 17:30:23,718 [INFO ] Dekeystoning image...
2011-01-15 17:30:27,046 [INFO ] Image dekeystoned, saved to file qr img_0195.jpg
2011-01-15 17:30:27,046 [DEBUG] Loading image img_0199.jpg
2011-01-15 17:30:27,935 [DEBUG] Create luminance source
2011-01-15 17:30:27,936 [DEBUG] Create binarizer
2011-01-15 17:30:27,936 [DEBUG] Return results
2011-01-15 17:30:28,677 [DEBUG] Number of QR codes found: 0
Exception in thread "main" java.lang.NullPointerException
	at qrpc.Main.findQR(Main.java:157)
	at qrpc.Main.main(Main.java:266)
It successfully analysed 198 images before this one. I tried to regenerate the faulty image in PhotoShop using same parameters as when it was created and qrpc crashed with same message.

I tried to resave this image in JPEG using Preview and same problem. I then tried to convert it in JPEG using convert from ImageMagick, same problem. I finally tried to convert it to TIFF and then to reconvert it to JPEG using convert from ImageMagick and qrpc succcessfully dekeystoned it.

Code: Select all

imac:scantailor david$ java -Xmx1024M -jar 1.1.1/qrpc-1.1/qrpc.jar ../test/
qrpc (QR Perspective Correction) v 1.1 (20110114), by Robert Baruch (robert.c.baruch@gmail.com)
2011-01-15 17:33:11,366 [INFO ] Found 2 jpeg images to process
2011-01-15 17:33:11,369 [DEBUG] Loading image img_0195.jpg
2011-01-15 17:33:12,618 [DEBUG] Create luminance source
2011-01-15 17:33:12,618 [DEBUG] Create binarizer
2011-01-15 17:33:12,619 [DEBUG] Return results
2011-01-15 17:33:13,539 [DEBUG] Number of QR codes found: 4
2011-01-15 17:33:13,540 [DEBUG] QR code 'DIYBookscannerTR':
2011-01-15 17:33:13,541 [DEBUG]   1152.5,1047.0
2011-01-15 17:33:13,541 [DEBUG]   1148.0,865.0
2011-01-15 17:33:13,541 [DEBUG]   1330.5,861.5
2011-01-15 17:33:13,541 [DEBUG]   1303.5,1013.5
2011-01-15 17:33:13,541 [DEBUG] QR code 'DIYBookscannerBR':
2011-01-15 17:33:13,541 [DEBUG]   1171.5,1872.0
2011-01-15 17:33:13,542 [DEBUG]   1167.0,1688.0
2011-01-15 17:33:13,542 [DEBUG]   1350.5,1684.0
2011-01-15 17:33:13,542 [DEBUG]   1323.0,1837.5
2011-01-15 17:33:13,542 [DEBUG] QR code 'DIYBookscannerBL':
2011-01-15 17:33:13,542 [DEBUG]   344.0,1887.0
2011-01-15 17:33:13,542 [DEBUG]   340.5,1704.0
2011-01-15 17:33:13,542 [DEBUG]   524.5,1700.0
2011-01-15 17:33:13,542 [DEBUG]   496.0,1853.5
2011-01-15 17:33:13,542 [DEBUG] QR code 'DIYBookscannerTL':
2011-01-15 17:33:13,542 [DEBUG]   330.0,1062.0
2011-01-15 17:33:13,542 [DEBUG]   326.5,880.0
2011-01-15 17:33:13,542 [DEBUG]   509.5,876.5
2011-01-15 17:33:13,542 [DEBUG]   481.5,1028.5
2011-01-15 17:33:13,542 [INFO ] Estimated dpi: 274
2011-01-15 17:33:13,555 [DEBUG] m00 0.9919021553130454
2011-01-15 17:33:13,555 [DEBUG] m01 0.014380051538901727
2011-01-15 17:33:13,556 [DEBUG] m02 -15.166797816758104
2011-01-15 17:33:13,556 [DEBUG] m10 -0.018230861927265564
2011-01-15 17:33:13,557 [DEBUG] m11 0.9813236619674381
2011-01-15 17:33:13,557 [DEBUG] m12 17.587864267347634
2011-01-15 17:33:13,558 [DEBUG] m20 -1.3245178181935318E-7
2011-01-15 17:33:13,558 [DEBUG] m21 -7.284848000055213E-6
2011-01-15 17:33:13,559 [DEBUG]  TL (330.0,1062.0) -> (330.0,1061.9999999999998)
2011-01-15 17:33:13,559 [DEBUG]  TR (1152.6367797851562,1062.0) -> (1152.4999999999998,1047.0)
2011-01-15 17:33:13,559 [DEBUG]  BL (330.0,1884.6367797851562) -> (344.0,1887.0)
2011-01-15 17:33:13,560 [DEBUG]  BR (1152.6367797851562,1884.6367797851562) -> (1171.4999999999998,1872.0000000000002)
2011-01-15 17:33:13,560 [INFO ] Dekeystoning image...
2011-01-15 17:33:16,741 [INFO ] Image dekeystoned, saved to file qr img_0195.jpg
2011-01-15 17:33:16,742 [DEBUG] Loading image img_0199.jpg
2011-01-15 17:33:17,436 [DEBUG] Create luminance source
2011-01-15 17:33:17,436 [DEBUG] Create binarizer
2011-01-15 17:33:17,436 [DEBUG] Return results
2011-01-15 17:33:17,439 [INFO ] No QR codes found in image
2011-01-15 17:33:17,439 [INFO ] Dekeystoning image...
2011-01-15 17:33:20,413 [INFO ] Image dekeystoned, saved to file dekey img_0199.jpg
I tried to find a difference between this image and the others and didn't find one. But as I didn't play with images file format since many years now, I probably missed something.

I'm attaching images used in this test case in bug1.zip.


About the second bug:

qprc crashes with following message when it tried to analyze IMG_0002.JPG available in bug2.zip attached to this message.

IMG_0002.JPG used in this test case was generated by the camera (a Canon PowerShot A480 running SDM 1.84).

Code: Select all

imac:scantailor david$ java -Xmx1024M -jar 1.1.1/qrpc-1.1/qrpc.jar ../test/
qrpc (QR Perspective Correction) v 1.1 (20110114), by Robert Baruch (robert.c.baruch@gmail.com)
2011-01-15 17:50:41,248 [INFO ] Found 1 jpeg images to process
2011-01-15 17:50:41,250 [DEBUG] Loading image IMG_0002.JPG
2011-01-15 17:50:42,524 [DEBUG] Create luminance source
2011-01-15 17:50:42,525 [DEBUG] Create binarizer
2011-01-15 17:50:42,525 [DEBUG] Return results
2011-01-15 17:50:44,339 [DEBUG] Number of QR codes found: 2
2011-01-15 17:50:44,339 [DEBUG] QR code 'DIYBookscannerTL':
2011-01-15 17:50:44,339 [DEBUG]   1615.5,481.5
2011-01-15 17:50:44,339 [DEBUG]   1791.5,478.0
2011-01-15 17:50:44,340 [DEBUG]   1794.5,654.5
2011-01-15 17:50:44,340 [DEBUG]   1647.5,628.0
2011-01-15 17:50:44,340 [DEBUG] QR code 'DIYBookscannerTR':
2011-01-15 17:50:44,340 [DEBUG]   1627.0,1278.0
2011-01-15 17:50:44,340 [DEBUG]   1803.5,1275.0
2011-01-15 17:50:44,340 [DEBUG]   1806.0,1452.5
2011-01-15 17:50:44,340 [DEBUG]   1659.5,1425.0
Exception in thread "main" java.lang.NullPointerException
	at qrpc.Main.findQR(Main.java:161)
	at qrpc.Main.main(Main.java:266)
imac:scantailor david$ 
I'm thinking it is related to the fact two QR registration images are visible in this image. When I cropped it to remove one of the registration image, qrpc successfully analysed it:

Code: Select all

imac:scantailor david$ java -Xmx1024M -jar 1.1.1/qrpc-1.1/qrpc.jar ../test/
qrpc (QR Perspective Correction) v 1.1 (20110114), by Robert Baruch (robert.c.baruch@gmail.com)
2011-01-15 17:55:54,899 [INFO ] Found 1 jpeg images to process
2011-01-15 17:55:54,900 [DEBUG] Loading image IMG_0002-crop.jpg
2011-01-15 17:55:56,559 [DEBUG] Create luminance source
2011-01-15 17:55:56,560 [DEBUG] Create binarizer
2011-01-15 17:55:56,560 [DEBUG] Return results
2011-01-15 17:55:57,691 [DEBUG] Number of QR codes found: 4
2011-01-15 17:55:57,692 [DEBUG] QR code 'DIYBookscannerBL':
2011-01-15 17:55:57,692 [DEBUG]   831.5,502.0
2011-01-15 17:55:57,692 [DEBUG]   1005.0,498.0
2011-01-15 17:55:57,692 [DEBUG]   1007.0,673.0
2011-01-15 17:55:57,692 [DEBUG]   862.0,647.0
2011-01-15 17:55:57,692 [DEBUG] QR code 'DIYBookscannerTL':
2011-01-15 17:55:57,692 [DEBUG]   1615.5,482.0
2011-01-15 17:55:57,692 [DEBUG]   1791.5,478.0
2011-01-15 17:55:57,692 [DEBUG]   1794.5,654.5
2011-01-15 17:55:57,692 [DEBUG]   1647.0,628.0
2011-01-15 17:55:57,692 [DEBUG] QR code 'DIYBookscannerTR':
2011-01-15 17:55:57,692 [DEBUG]   1627.0,1278.0
2011-01-15 17:55:57,692 [DEBUG]   1803.5,1275.0
2011-01-15 17:55:57,692 [DEBUG]   1806.0,1452.0
2011-01-15 17:55:57,693 [DEBUG]   1659.5,1425.0
2011-01-15 17:55:57,693 [DEBUG] QR code 'DIYBookscannerBR':
2011-01-15 17:55:57,693 [DEBUG]   839.5,1291.0
2011-01-15 17:55:57,693 [DEBUG]   1014.0,1288.0
2011-01-15 17:55:57,693 [DEBUG]   1016.5,1464.5
2011-01-15 17:55:57,693 [DEBUG]   871.0,1437.0
2011-01-15 17:55:57,693 [INFO ] Estimated dpi: 265
2011-01-15 17:55:57,705 [DEBUG] m00 0.005529147538135669
2011-01-15 17:55:57,706 [DEBUG] m01 -0.9721557716193354
2011-01-15 17:55:57,706 [DEBUG] m02 2069.6410838776437
2011-01-15 17:55:57,706 [DEBUG] m10 0.9895227293494236
2011-01-15 17:55:57,706 [DEBUG] m11 0.030657964947872852
2011-01-15 17:55:57,706 [DEBUG] m12 -1132.9937751680013
2011-01-15 17:55:57,706 [DEBUG] m20 -5.4501227723963375E-6
2011-01-15 17:55:57,707 [DEBUG] m21 1.1196371232296749E-5
2011-01-15 17:55:57,707 [DEBUG]  TL (1615.5,482.0) -> (1615.5,481.99999999999983)
2011-01-15 17:55:57,707 [DEBUG]  TR (2411.5830688476562,482.0) -> (1627.0,1277.9999999999998)
2011-01-15 17:55:57,707 [DEBUG]  BL (1615.5,1278.0830688476562) -> (831.5,501.9999999999996)
2011-01-15 17:55:57,707 [DEBUG]  BR (2411.5830688476562,1278.0830688476562) -> (839.5000000000001,1291.0000000000002)
2011-01-15 17:55:57,707 [INFO ] Dekeystoning image...
2011-01-15 17:56:01,425 [INFO ] Image dekeystoned, saved to file qr IMG_0002-crop.jpg
imac:scantailor david$
Attachments
bug2.zip
(3.94 MiB) Downloaded 265 times
bug1.zip
(3.72 MiB) Downloaded 254 times

User avatar
rob
Posts: 773
Joined: 03 Jun 2009, 13:50
E-book readers owned: iRex iLiad, Kindle 2
Number of books owned: 4000
Country: United States
Location: Maryland, United States
Contact:

Re: Dekeystoning with a checkerboard

Post by rob » 18 Jan 2011, 18:45

OK, I've solved bug #1. When there are no QR codes found (in this particular way -- usually no QR codes found results in a different branch in the code being executed), the program will not bomb.

However, for bug #2, I'm not certain what the problem is. It's possible this is a problem with the ZXing library, in which case may I send the original image to the ZXing developers for troubleshooting? Anyway, I modified the code so that instead of failing in this case, it will save the image as "problem <filename>", and continue to use the most recent registration image.

Here is the new version of the code which will handle bug 1 and 2.
Attachments
qrpc-1.2.zip
(1.54 MiB) Downloaded 260 times
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.

User avatar
rob
Posts: 773
Joined: 03 Jun 2009, 13:50
E-book readers owned: iRex iLiad, Kindle 2
Number of books owned: 4000
Country: United States
Location: Maryland, United States
Contact:

Re: Dekeystoning with a checkerboard

Post by rob » 18 Jan 2011, 19:30

Ok, I think I solved bug 2. The problem was the algorithm which binarizes the image from grayscale to black/white. In your bug 2 image, there was just enough white to throw off the algorithm, which made two of the barcodes unreadable. Cropping the image changed the black/white balance so that the QR codes got clearer, but manual cropping is not the solution we want!

What I did was add some code so that if only SOME of the QR codes were detected, use another binarizer which gives better (but slower) results. Kind of like putting on a different set of reading glasses. Using that, I was able to detect all the QR codes from your image.

If the program can still only find SOME of the QR codes with both binarizers, then it falls back on saving the problem image, and not using it for registration.

Here's the latest:
Attachments
qrpc-1.3.zip
(1.54 MiB) Downloaded 259 times
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.

zamacam
Posts: 20
Joined: 04 Mar 2014, 00:53

Re: Dekeystoning with a checkerboard

Post by zamacam » 18 Jan 2011, 20:14

Hi Rob,

I did some new tests and I'm happy to be able to write that all worked as expected. Thank you very much Rob to have fixed these bugs. I have books with maps and graphics and for the first time, lines on images are perfectly parallels, squares are squared and my maps are displayed as they are on original books. Thank you so much to save me so much time. I no longer need to launch PhotoShop or DxO to fix these problems. All is done automatically :lol:

Feel free to send the image illustring bug #2 to the ZXing developers if it can help.

I have a final question. It is more curiosity than another thing. I opened source files available in qrpc archive to try to understand how your program works. I saw it is saving dekeystoned files using 0.85 JPEG compression. I remember to have read somewhere in this forum we should not compress our files using JPEG algorythms. Following this advice I since saved all my intermediate files using TIFF. So, here is my question: I may have to scan some books in which text is printed in tiny characters on a grey background (the editor uses this solution to emphasize some very technical theorical discussions). In some case, could the use of 0.85 JPEG compression be problematic for Scantailor?

User avatar
rob
Posts: 773
Joined: 03 Jun 2009, 13:50
E-book readers owned: iRex iLiad, Kindle 2
Number of books owned: 4000
Country: United States
Location: Maryland, United States
Contact:

Re: Dekeystoning with a checkerboard

Post by rob » 18 Jan 2011, 22:40

I did? Sorry, I shouldn't have done that! Here is the new code which saves the images at quality 1.

I'm very happy to hear that the images have turned out straight! Hopefully ScanTailor will have an easier time with the preprocessed images.
Attachments
qrpc-1.4.zip
(1.54 MiB) Downloaded 289 times
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.

User avatar
Gerard
Posts: 154
Joined: 17 Oct 2010, 07:15
Number of books owned: 0
Location: Berlin (Germany)

Re: Dekeystoning with a checkerboard

Post by Gerard » 21 Jan 2011, 14:14

one suggestion, could we made it more generic, like find the qr-codes and if in the picture is an qr code with lets say "task:" do an eval or something similar

then you can make some of this code cards, throw it on the scanner and control the later post processing,

i would make codes like
  • delete last image
  • this is left side
  • this is right side
  • new book
  • next image is book cover
  • give me just information how i have move the camera (don't process the images)
maybe one day we can control the cams with this cards

steve1066d
Posts: 296
Joined: 27 Nov 2010, 02:26
E-book readers owned: PRS-505
Number of books owned: 1250
Location: Minneapolis, MN
Contact:

Re: Dekeystoning with a checkerboard

Post by steve1066d » 21 Jan 2011, 15:21

Gerard,

You know, what you are proposing is pretty much exactly what I'm working on in my tool BookScanWizard http://bookscanwizard.sourceforge.net.

Here's what I've come up with:
"Next Pages Gray",
"Next Pages Color",
"Next Pages B/W",
"Next Pages Color",
"Next Pages B/W",
"Delete previous page",
"Flag Spot",
"End Book",
"Skip this page"
"Title: XXX"

When I scan I usually scan a few books at a time, so my thought was it would be nice to split the books apart by looking for the "end book" code. Or if I know what books I'm going to scan, I could create a separate title code for each book so that they can even get split out into a named directory instead of "book1", book2, etc.

I've also considered adding them crop indicators.. Put one in the upper right & lower left and lower right and the system will crop to those corners.

The trick is to figure out what features will be real timesavers, and what are just gimmicks that sound cool, but aren't any faster than doing it the current way.



Steve
Steve Devore
BookScanWizard, a flexible book post-processor.

Post Reply