Operating system, Imagemagick version pdf final size & dpi

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
janezstefanec
Posts: 1
Joined: 2013-11-18T11:32:56-07:00
Authentication code: 6789

Operating system, Imagemagick version pdf final size & dpi

Post by janezstefanec »

Dear forum users, please help me to improve my script speed, get the paper white and chars black ready for use in e-books.

My current script is:

convert $i.jpg -matte -background none -virtual-pixel background
-distort Perspective "0,0 0,0 1998,0 1990,0 2003,1335 1998,1335 35,1325 0,1325" -trim -rotate -90 -quality 10 -sharpen 0x1.0 $i.pdf

I use the code to convert photos taken with two Canon 400D cameras on my book scanner robot at a speed of 2 scans per second (7200 scans per hour)

original photo from a camera exp. 1/80:
http://www.bookscanner.si/Anthony/capture000597.jpg
original photo from a camera exp. 1/60:
http://www.bookscanner.si/Anthony/capture000605.jpg
img size: 3189 x 2126 300 dpi

1/80 converted to a pdf: http://www.bookscanner.si/Anthony/3.pdf
1/60 converted to a pdf: http://www.bookscanner.si/Anthony/19.pdf

As you can see I have a couple of other problems:
some of the text shows through the page of the book.
There are some compression artefacts the pdf.

Should the photos be resized for the e-book pdf format before conversion?
Can I combine the perspective distort and rotate in a different distort command to improve the speed?

Thank you.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Operating system, Imagemagick version pdf final size & d

Post by fmw42 »

You may be seeing jpg compression artifacts in your output. Have tried scanning either directly to pdf or to png or tiff to avoid the jpg compression issues?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Operating system, Imagemagick version pdf final size & d

Post by Bonzo »

The OP is using a canon dslr and the formats are either jpg or RAW.

Looking at the specifications for that camera " Continuous: 3.0 fps up to 27 JPEG / 10 RAW frames ". I would guess at the speed he is working RAW would fill the buffer after 10 photos.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Operating system, Imagemagick version pdf final size & d

Post by snibgo »

If you don't like the compression artefacts, don't use such a low quality number.
snibgo's IM pages: im.snibgo.com
Post Reply