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$