Unable to make perspective command work

Discussion about Steve DeVore's Book Scan Wizard, a power-user package to automate scan processing.

Moderator: peterZ

Post Reply
takzachar

Unable to make perspective command work

Post by takzachar »

Hi,

I am using BookScanWizard for testing so far and the perspective worked sofar, until I came up with a need to fix some pages like the ones I am attaching, for which I am getting the message "Coordinates out of boubds".

The parammeters file I am using is the following.

Code: Select all


# the source directory
LoadImages=C:\testbsw


# The Destination directory
SetDestination = tiff

# Sets the final DPI and compression
SetTiffOptions = 300 NONE

# Sets the final DPI and compression
SetTiffOptions = 300 DEFLATE


########################################################################
### Insert commands to fix keystone, color, etc.
########################################################################

Pages all
Pages = left

Perspective =  251,843, 2751,837, 2569,3497, 256,3508 # P1130378 L

#Rotate =  2844,3720, 166,685 # P1130378 L
#Rotate =  2844,3720, 166,685 # P1130378 L


Pages = right
Perspective =  279,404, 2711,416, 2705,3850, 450,3844 # P1130379 R

Appreciate a little help on this
This is the right page
This is the right page
P1130378.tif
This is the left page
(88.12 KiB) Not downloaded yet
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: Unable to make perspective command work

Post by steve1066d »

Is the attached image the source document? BSW is designed to work with full color or grayscale images, and I've never tried 2 color images with it.

However, I don't know any reason why it would work. I'll take a look at it this evening.
Steve Devore
BookScanWizard, a flexible book post-processor.
takzachar

Re: Unable to make perspective command work

Post by takzachar »

Hi,


No it is not the source image. I passed it first with scantailor which did the split, dewarping e.t.c. but failed in the perspective. In BSW I can crop the images but I get the aforementioned error when I run the perspective command. I could have export it to greyscale. Unfortunetely I don't have the source now to see if that would fix the problem.

Thanks for your reply and for looking to it.
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: Unable to make perspective command work

Post by steve1066d »

The problem is the black and white source images. If you can convert them to grayscale, BSW will be able to handle them.

I'll look into adding the ability to handle this case in BSW, though actually, you would be better off using BSW first to fix the perspective, then use ScanTailor to finish converting it if you wish.
Steve Devore
BookScanWizard, a flexible book post-processor.
takzachar

Re: Unable to make perspective command work

Post by takzachar »

Indeed,

I just increased the number of colors and it worked (or have you fixed it anyway, I am using the web start).

So anyway, thank you very much for this very nice tool.
takzachar

Re: Unable to make perspective command work

Post by takzachar »

Hi again,

After fixing the perspective, I am getting images like the one I am attaching. Is there a way to automatically abandon the black area/angle which is created after the perspective is fixed? Unfortunately in many cases it is impossoble to get rid of them by crop. Maybe an option that such an area is created with same color as the background of the image.


Thanks
P1130378.tif
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: Unable to make perspective command work

Post by steve1066d »

Right now there's no way to fix that from within BSW. There's been requests to be able to clear a section of the image, and it is something I'll probably add soon.

But for now I think you need to bring it back into Scan Tailor to do that.

Like I think I said before.. it works better to use BSW before Scan Tailor
Steve Devore
BookScanWizard, a flexible book post-processor.
takzachar

Re: Unable to make perspective command work

Post by takzachar »

Hi,

unfortunately ST can not remove it automatically as this black area is inside the content box, so it has to be removed manually, a time consumming process as there are many pages. I think that the most helpfull option in such cases is to fill the created images after the perspective fix with the same color as the background (of course I don't know how feasible that is, though ...)

Thank you very much for this nice tool and also for your help.
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: Unable to make perspective command work

Post by steve1066d »

I've added support for defining an area to white out.. See my other thread.
Steve Devore
BookScanWizard, a flexible book post-processor.
Post Reply