Page 6 of 9

Re: Dekeystoning with a checkerboard

Posted: 02 Feb 2011, 17:47
by Shaknum
By the way, I say "we" because I'm not trying to usurp your fantastic project, not because I'm trying to insinuate that you need to give any thought to the things I suggest. Thanks for the great work, I may have some time over the weekend to play around with the 2D API.

Re: Dekeystoning with a checkerboard

Posted: 02 Feb 2011, 18:20
by Anonymous1
If only there was a way to make Python as fast as Java and C++...

Re: Dekeystoning with a checkerboard

Posted: 03 Feb 2011, 19:56
by steve1066d
You might want to look at BookScanWizard for correcting keystone issues with barcodes.

Its got the following advantages:
  • It seems to more reliably find the codes in a bookscanning environment. (At least for me).
  • It will make use of multiple processors.
  • It uses bilinear interpolation, so there should be less aliasing ("jaggies") in the output.
  • It saves them as tiff files, which is a bit better than 100% jpgs' because even 100% jpegs have some loss.
[/list]

Here's a script you can run. This one assumes that the left & right images have already been merged into a single directory.
Create a file called book.bsw:

Code: Select all

LoadImages = source
SetDestination = tiff
Barcodes = 
ScaleToDPI = 300
then call the command:

Code: Select all

bsw -batch
That will take the images in the directory called source, search for the barcodes, and use them to fix the perspective and write out the files to the tiff directory.

If you have the files in separate left and right folders, you can do this, which will automatically combine them:
First, move them to separate l & r directories.
Then use this script:

Code: Select all

LoadLRImages = source
SetDestination = tiff
Barcodes = 
ScaleToDPI = 300
(the l & r directories should be subdirectories of "source")

One small note: the ScaleToDPI is optional. If you don't have it, it will keep the original DPI

The barcodes themselves are printed by running the tool interactively and choosing the option under tools to print the keystone correction images.

Re: Dekeystoning with a checkerboard

Posted: 04 Feb 2011, 00:06
by Anonymous1
@steve1066d, do many people use your software? Just wondering, as it has matured greatly since my first download. I will be using it more often once my scanner is built.

Re: Dekeystoning with a checkerboard

Posted: 04 Feb 2011, 00:24
by steve1066d
I'm not really sure how many are using it.. Its hard to gauge because if someone loads it from the webstart, I don't have any logs or counts to that tell me how often it is downloaded.

Re: Dekeystoning with a checkerboard

Posted: 04 Feb 2011, 03:07
by daniel_reetz
I've been playing with it - and really, really like it and hope it sees wide adoption. I am personally thinking about trying to make a good quick intro video so people can see why it's powerful and easy, and so they can easily compare it to Scan Tailor.

Unfortunately, my time is super-limited right now and I've been poor on delivering on my ideas and promises to this community over the last while... I need to reclaim some of my life from work to make things happen properly.

Re: Dekeystoning with a checkerboard

Posted: 06 Feb 2011, 22:51
by o3h1p
Steve,

I don't see how you use your program. There doesn't seem any great set of instructions for barcodes on the wiki,website, or these forums. In particular:

1) What is the difference bewteen Barcodes and BarcodePerspective
2) I can print out the barcodes, but where do I put them? At the beginning of the book and then take a picture of those pages? Can it differentiate between left/right barcode pages?
3) Should the barcodes span the entire page? When I print them out they only occupy about a 4x4 box at the top-left of a 8.5x11 in paper
4) Do you have to use the -barcodes flag from the command line or can you just input it in the script area and then hit "submit"
5) Any chance to use a gui dialog rather than having the user type in commands?

I haven't got it to run yet. Either I get "array out of bound errors" and I am looking at the command syntax or the output is identical to the input, though it does seem to do a decent job with fixing the presepective. The only problem I see is that the book will shift slightly during scanning so applying a crop to all pages will likely clip some part of the page towards the end of the book.

Jack

Re: Dekeystoning with a checkerboard

Posted: 06 Feb 2011, 22:54
by Anonymous1
What's your platform, Java version, and BSW version? I haven't had any of those problems yet...

Re: Dekeystoning with a checkerboard

Posted: 06 Feb 2011, 23:00
by daniel_reetz
o3h1p wrote:Steve,
I don't see how you use your program. There doesn't seem any great set of instructions for barcodes on the wiki,website, or these forums.
Not sure if you've seen this.

Re: Dekeystoning with a checkerboard

Posted: 06 Feb 2011, 23:03
by o3h1p
Yes I did Daniel, but it didn't seem to say anything really about fixing perspectives with barcodes.