Dekeystoning with a checkerboard
Moderator: peterZ
-
- 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
Jack,
The file in the manual install does only have a batch file for windows. However, if you enter the gui, there's an option to create a script that should work on linux, mac, or windows. I will add a script that will work with linux to the manual installation.
I did have a mistake in the posting you were following...
Instead of java -Xmx1024M -jar bsw/bin/BookScanWizard.jar -barcodes
use:
java -Xmx1024M -jar bsw/bin/BookScanWizard.jar -batch
However, it does seem like there is another issue. The -barcodes option will scan the directory that was given, and create a barcodes.csv file. The fact that you got an empty file says it wasn't finding the barcodes. Are you using the barcode page printed from the application? The one Rob released with his code won't work with BSW.
Could you post or send me an example image that contains the barcode?
The file in the manual install does only have a batch file for windows. However, if you enter the gui, there's an option to create a script that should work on linux, mac, or windows. I will add a script that will work with linux to the manual installation.
I did have a mistake in the posting you were following...
Instead of java -Xmx1024M -jar bsw/bin/BookScanWizard.jar -barcodes
use:
java -Xmx1024M -jar bsw/bin/BookScanWizard.jar -batch
However, it does seem like there is another issue. The -barcodes option will scan the directory that was given, and create a barcodes.csv file. The fact that you got an empty file says it wasn't finding the barcodes. Are you using the barcode page printed from the application? The one Rob released with his code won't work with BSW.
Could you post or send me an example image that contains the barcode?
Steve Devore
BookScanWizard, a flexible book post-processor.
BookScanWizard, a flexible book post-processor.
Re: Dekeystoning with a checkerboard
Hi Steve,
sorry, but I couldn't manage bookscanwizard to run.
Now I scanned several pages (with barcodes) and tryed several things:
-running the gui and creating a new config (with the wizard)
-using a predefined config (s.below) as part of the commandline (incl. the Java-Option XmX1024M)
-opening the config-.file within the gui.
All three methods lead to an error "java.lang.ArrayIndexoutOfBoundsException: -1"
Here's the config I used (and generated within the gui):
# Book Scan Wizard Script
# http://bookscanwizard.sourceforge.net
# C:\Daten\privat\Buecher\Scans
# the source directory, with subdirectories for left & right files
LoadLRImages = C:\Daten\privat\Buecher\Scans
# The Destination directory
SetDestination = tiff
# Sets the final DPI and compression
SetTiffOptions = 0 NONE
# Use barcodes.csv to define operations
Barcodes =
########################################################################
### Insert commands to fix keystone, color, etc.
########################################################################
Pages=all
########################################################################
Pages=all
Regards,
Marcel
Edit:
Additionally, I tryed to use a shorter path (c:\temp rather than the long path above) but it still doesn't work.
Edit2:
web starter version shows the same error
Edit3:
Managed to get around the error above. it seems that bookscanwizard has a problem with the .crw-File generate by my cameras (incl. some metadata). After deleting this file, I could start scanning the barcodes (within the gui).
But now, I get another error: "java.lang.IndexOutOfBoundsException: Index:2, Size:2"
The barcodes.csv -files are generated (both in the l & in the r-directory) but immediatly after bookscanwizard has finished, it shows this error.
Sorry to say this, but I spent hours trying to get bookscanwizard running but it seems to not be what it promised.
sorry, but I couldn't manage bookscanwizard to run.
Now I scanned several pages (with barcodes) and tryed several things:
-running the gui and creating a new config (with the wizard)
-using a predefined config (s.below) as part of the commandline (incl. the Java-Option XmX1024M)
-opening the config-.file within the gui.
All three methods lead to an error "java.lang.ArrayIndexoutOfBoundsException: -1"
Here's the config I used (and generated within the gui):
# Book Scan Wizard Script
# http://bookscanwizard.sourceforge.net
# C:\Daten\privat\Buecher\Scans
# the source directory, with subdirectories for left & right files
LoadLRImages = C:\Daten\privat\Buecher\Scans
# The Destination directory
SetDestination = tiff
# Sets the final DPI and compression
SetTiffOptions = 0 NONE
# Use barcodes.csv to define operations
Barcodes =
########################################################################
### Insert commands to fix keystone, color, etc.
########################################################################
Pages=all
########################################################################
Pages=all
Regards,
Marcel
Edit:
Additionally, I tryed to use a shorter path (c:\temp rather than the long path above) but it still doesn't work.
Edit2:
web starter version shows the same error
Edit3:
Managed to get around the error above. it seems that bookscanwizard has a problem with the .crw-File generate by my cameras (incl. some metadata). After deleting this file, I could start scanning the barcodes (within the gui).
But now, I get another error: "java.lang.IndexOutOfBoundsException: Index:2, Size:2"
The barcodes.csv -files are generated (both in the l & in the r-directory) but immediatly after bookscanwizard has finished, it shows this error.
Sorry to say this, but I spent hours trying to get bookscanwizard running but it seems to not be what it promised.
-
- 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
Marcel,
I'm sorry you are having problems with BSW. Have you tried the non-barcode way of configuring? That might keep you going while we figure out what is going on.
Verify that you are using the latest version. Help, About from the gui should return 0.9.8.
Would it be possible for you to run from the command line, then send me the output from bsw? That would have the debugging information that I need to diagnose the problem.
Run this:
java -Xmx1024M -jar bsw/bin/BookScanWizard.jar -batch >bsw.log 2>&1
I'm not why the .crw file is confusing it. I'm explicitly looking for only .tif, .png, .jpg, and .gif files. I also verified myself if I put a .crw file in with the images it worked for me. (But then again I once got a t-shirt from my coworkers that said "it works on my machine"
In any case, if you could try it again with that .crw file included, with the above command? (change bsw.log to something else so you don't overwrite the above log file).
Finally, try right clicking the Barcodes: line from withing the gui, right click, then choose "expand barcodes". This will replace the barcodes: line with the actual commands that the barcodes found. Send me a copy of that as well.
I know you've spent more than you want to on this already, but if I could have a few more minutes of your time, I'm sure we can get it working for you.
I'm sorry you are having problems with BSW. Have you tried the non-barcode way of configuring? That might keep you going while we figure out what is going on.
Verify that you are using the latest version. Help, About from the gui should return 0.9.8.
Would it be possible for you to run from the command line, then send me the output from bsw? That would have the debugging information that I need to diagnose the problem.
Run this:
java -Xmx1024M -jar bsw/bin/BookScanWizard.jar -batch >bsw.log 2>&1
I'm not why the .crw file is confusing it. I'm explicitly looking for only .tif, .png, .jpg, and .gif files. I also verified myself if I put a .crw file in with the images it worked for me. (But then again I once got a t-shirt from my coworkers that said "it works on my machine"
In any case, if you could try it again with that .crw file included, with the above command? (change bsw.log to something else so you don't overwrite the above log file).
Finally, try right clicking the Barcodes: line from withing the gui, right click, then choose "expand barcodes". This will replace the barcodes: line with the actual commands that the barcodes found. Send me a copy of that as well.
I know you've spent more than you want to on this already, but if I could have a few more minutes of your time, I'm sure we can get it working for you.
Steve Devore
BookScanWizard, a flexible book post-processor.
BookScanWizard, a flexible book post-processor.
Re: Dekeystoning with a checkerboard
Hi Steve,
first, here's the log file.
I ran the bsw with the command line. I used only the perspective-barcodes, no other.
Enclosed, also the csv-file.
When starting the gui and right-clicking the barcode-text & selecting "expand barcodes", I receive the same error as within the log file.
Regards,
Marcel
Edit:
Without the barcode-option, it works fine. But that will it make impossible to automatically keystone.
first, here's the log file.
I ran the bsw with the command line. I used only the perspective-barcodes, no other.
Enclosed, also the csv-file.
When starting the gui and right-clicking the barcode-text & selecting "expand barcodes", I receive the same error as within the log file.
Regards,
Marcel
Edit:
Without the barcode-option, it works fine. But that will it make impossible to automatically keystone.
- Attachments
-
- barcodes.csv
- (223 Bytes) Downloaded 629 times
-
- bsw.log
- (652 Bytes) Downloaded 638 times
- daniel_reetz
- Posts: 2812
- Joined: 03 Jun 2009, 13:56
- E-book readers owned: Used to have a PRS-500
- Number of books owned: 600
- Country: United States
- Contact:
Re: Dekeystoning with a checkerboard
.CRW are Canon Raw files and are quite different from camera to camera. So different, in fact, that they bear almost no resemblance to each other. Many of them contain small amounts of encrypted information as well.
Raw files should really be converted to TIFF, JPG, or PNG before processing - you don't want JAI doing your demosaicing, the results won't be as good as a dedicated demosaicer like DCRAW, Adobe Camera Raw/Lightroom/Photoshop, etc. It's really great to capture in raw format, but for the best result it should really be converted using the really sophisticated demosaicing technology in the software I just mentioned.
Raw files should really be converted to TIFF, JPG, or PNG before processing - you don't want JAI doing your demosaicing, the results won't be as good as a dedicated demosaicer like DCRAW, Adobe Camera Raw/Lightroom/Photoshop, etc. It's really great to capture in raw format, but for the best result it should really be converted using the really sophisticated demosaicing technology in the software I just mentioned.
-
- 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
Thanks for the logs.
It does appear from the .csv file that it only found two of the four barcodes were found on the page. It only found the bottom right & top right. Would it be possible to post the image with the barcodes (IMG_1844)?
I'll update the program so that it returns a better error message. it was assuming it was going to find 4 codes and didn't handle the case of missing barcodes well.
It does appear from the .csv file that it only found two of the four barcodes were found on the page. It only found the bottom right & top right. Would it be possible to post the image with the barcodes (IMG_1844)?
I'll update the program so that it returns a better error message. it was assuming it was going to find 4 codes and didn't handle the case of missing barcodes well.
Steve Devore
BookScanWizard, a flexible book post-processor.
BookScanWizard, a flexible book post-processor.
-
- 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
The problem is that your scans are darker than the program was expecting. However, it doesn't appear that your page is so dark that it shouldn't have found barcodes, so I think I need to adjust the default threshold.
However you can override the threshold to make it work. I found that a threshold of 80 should work. Try this:
java -Xmx1024M -jar bsw/bin/BookScanWizard.jar -barcodes -threshold 80 [directory to your images]
Then take a look a barcodes.csv verify that it it is dectecting all four barcodes (there should be 4 lines in the page). If not change the -threshold a bit and try again.
There currently isn't a way to set the threshold in the gui, but it is an option for both the -split and -barcodes command line options. I'll add a way to specify in the gui for the next release.
However you can override the threshold to make it work. I found that a threshold of 80 should work. Try this:
java -Xmx1024M -jar bsw/bin/BookScanWizard.jar -barcodes -threshold 80 [directory to your images]
Then take a look a barcodes.csv verify that it it is dectecting all four barcodes (there should be 4 lines in the page). If not change the -threshold a bit and try again.
There currently isn't a way to set the threshold in the gui, but it is an option for both the -split and -barcodes command line options. I'll add a way to specify in the gui for the next release.
Steve Devore
BookScanWizard, a flexible book post-processor.
BookScanWizard, a flexible book post-processor.
- 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
Here is the next version of QRPC. It's a minor fix so that those who are using the JAI's accelerated C libraries shouldn't run into any weird class cast issues.
- Attachments
-
- qrpc-1.5.zip
- (1.54 MiB) Downloaded 667 times
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.
Re: Dekeystoning with a checkerboard
It works fine. Thanks for your so usefull work Robrob wrote:Here is the next version of QRPC. It's a minor fix so that those who are using the JAI's accelerated C libraries shouldn't run into any weird class cast issues.