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

Book Scan Wizard

Discussion about Steve DeVore's Book Scan Wizard, a power-user package to automate scan processing.
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: Book Scan Wizard

Post by steve1066d » 06 Mar 2011, 20:36

The checkboxes on the top tell the system to not perform the operation when previewing.

So if the Crops button isn't checked, it won't actually crop the page for preview, but it will show you the crop box.

Likewise for the perspective & filters. If you have all the checkboxes off, then you can quickly go from page to page verifying that the crop & perspective adjustments will work.
Steve Devore
BookScanWizard, a flexible book post-processor.

gsloop

Re: Book Scan Wizard

Post by gsloop » 06 Mar 2011, 20:52

Cool, that makes perfect sense now that you say it. [I should have thunk it, but perhaps I'm slow today.]

Now, as I play with things, I'm going to have to get into accurately feeding it the DPI data. I can see this is true by playing with the crop area of a project and being able to duplicate it between sides. I can see the apparent image of one side is larger than the other - meaning, in short, that the DPI/PPI of the sources is different.

Is the best way to handle this, by using the bar codes?

---
As an aside...
[...And I know it's not different cameras. I sold one of the used ones I had, and have gotten two of the same kind. This solves several problems -

1) no need to resize images after the fact.
2) USB triggering seems a lot more reliable with two of the same cameras. [Perhaps my USB trigger sucks, but it works equally well on the two cameras now.]

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: Book Scan Wizard

Post by steve1066d » 06 Mar 2011, 21:15

Well, there's a lot of stuff in BSW that made sense to me while I was developing it that probably isn't too others.
Now, as I play with things, I'm going to have to get into accurately feeding it the DPI data. I can see this is true by playing with the crop area of a project and being able to duplicate it between sides. I can see the apparent image of one side is larger than the other - meaning, in short, that the DPI/PPI of the sources is different.

Is the best way to handle this, by using the bar codes?
I've got a few ways of handling that. Yes, barcodes work well for that.

Another (low tech) option is to use the Scale command on one of the sides. For example, if the distance from one side of the page to the other side of the page is 1500 pixels for the left side, and 1700 pixels for the right side, you can add this command:

Code: Select all

Pages = Left
Scale = 1.1333
Another option is to crop the two sides separately, then use the ScaleToFirst command to automatically scale the pages to the same size.
Steve Devore
BookScanWizard, a flexible book post-processor.

spamsickle
Posts: 596
Joined: 06 Jun 2009, 23:57

Re: Book Scan Wizard

Post by spamsickle » 11 Apr 2011, 12:23

I finally got around to trying to build Book Scan Wizard on Windows 7, JDK1.6.0_21.

In addition to JAI 1.1.3 and JAI Tools 1.1, I seemed to be missing a couple of jars. I got these messages running ant:

org.apache.commons.codec.binary does not exist
org.apache.http does not exist
org.apache.http.client.methods does not exist
org.apache.http.entity does not exist
org.apache.http.impl.client does not exist
org.apache.http.message does not exist
org.apache.http.params does not exist
org.jdesktop.beansbinding does not exist
org.netbeans.lib.awtextra does not exist

I know your build.txt file said either ant or netbeans was required, but since it was asking for that netbeans package I went ahead and installed netbeans too, to get AbsoluteLayout.jar from that. In addition to that jar, I also added

commons-codec-1.5.jar
httpcore-4.1.jar
httpclient-4.1.1.jar
beansbinding-1.2.1.jar

to /root/lib, which took care of most of these "does not exist" errors. I'm still getting errors trying to compile /s3/ArchiveTransfer.java, complaining about things like org.apache.commons.codec.binary
and org.apache.http.client.methods which should be in commons-codec-1.5.jar and httpclient-4.1.1.jar. Maybe the manifest is telling the compiler that it's for an earlier JDK, I'm not sure. Even putting those jars in the s3 directory and the classpath doesn't seem to help. I'd rather not edit build.xml (or the other XML files) at this point, because I feel like I'm probably overlooking something obvious. Can you suggest what it might be?

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: Book Scan Wizard

Post by steve1066d » 11 Apr 2011, 13:00

For the distributed version I'm combining the jar files into a single jar file (it seemed to work better with webstart). To make the combined jar file use "ant package"

I use NetBeans for my development, and I haven't verified that the ant script works the way it should stand-alone in a while. I'll take a look tonight and see what needs to be changed.
Steve Devore
BookScanWizard, a flexible book post-processor.

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: Book Scan Wizard

Post by steve1066d » 12 Apr 2011, 00:10

Spamsickle,

The repository was missing many jar files. I checked in the missing files so you should have better luck now.
Steve Devore
BookScanWizard, a flexible book post-processor.

spamsickle
Posts: 596
Joined: 06 Jun 2009, 23:57

Re: Book Scan Wizard

Post by spamsickle » 12 Apr 2011, 16:17

That does get everything to compile properly, but it's still not building a jar file for me. I tried making a quick and dirty jar file by going to the build\classes directory and running "jar -cvf bsw.jar *", but got "Failed to load Main-Class manifest attribute from ..\BSW.jar" when I tried to run it. I got my manifest to look like

Manifest-Version: 1.0
Created-By: 1.6.0_21 (Sun Microsystems Inc.)
Main-Class: net.sourceforge.bookscanwizard.BSW

(as produced by META-INF>type manifest.mf), but that's still returning "Could not find the main class: net.sourceforge.bookscanwizard.BSW. Program will
exit." when I try to run it. Looks to me like BSW.class is at that point in the jar, so I've probably done something dumb.

In looking at your pre-built manifest and jar file, it appears you're pulling in a lot of stuff for google.com and abbyy finereader -- I suspect these reflect experiments to integrate OCR, and have no bearing on the problem I'm having -- but it also looks like you're using Maven along with NetBeans. Your jar file is more than twice as big as the one I'm building with my command line, and I'm worried that even when I resolve this immediate problem, there may still be pieces missing for me to stumble across one at a time.

If it's necessary to use Maven and NetBeans to compile and execute this project, I'll probably table that effort for the time being. I've never worked with either; up to now, Eclipse has been my Java IDE.

On the other hand, maybe there's a simple fix (like checking a few jar files into the repository) that will still make it work with Ant. If you can suggest something, that would be great. If not, thanks for the utility that BSW provides, and I'll just work with the executable you built.

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: Book Scan Wizard

Post by steve1066d » 12 Apr 2011, 16:35

You can run it by doing "ant run"

The two different jar sizes are due to whether or not all the required jar files are bundled in a single jar file or if they are separate.

running "ant" will create the separate jar files to the dist directory. You can use "ant run" to run the app.

After doing that, running "ant package" will create a combined jar file, and will create a bsw.sh and bsw.cmd (Look in the /package/bin directory after running the package task.

I'm not using Maven, but the ant files are ones that NetBeans created automatically.. which means they aren't the easiest things to decipher.

the google.com stuff Is the zxing barcode libarary. The only reference to FineReader should be the autohotkey script in /util (which probably isn't used by anyone but me).

I did verify that I'm able to compile and run everything without NetBeans. If you are using eclipse, you might just want to create a new project, and add the jar files that are in /lib. The ant script is really only needed for creating distributions.

Hope this helps, and let me know if you have further questions. I'm glad you are taking a look at the code.
Steve Devore
BookScanWizard, a flexible book post-processor.

spamsickle
Posts: 596
Joined: 06 Jun 2009, 23:57

Re: Book Scan Wizard

Post by spamsickle » 12 Apr 2011, 18:47

Yes, that did help. I have it running under Eclipse now. Thank you, and thanks also for the chance to learn a little Ant along the way. Post 512!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest