Page 1 of 1

Remove areas exposed by deskew?

Posted: 2015-03-13T19:07:48-07:00
by psmith
After running this command:

Code: Select all

convert -deskew 40% -background green in.jpg out.jpg
out.jpg will have a non-uniform green area that corresponds to the amount of skew corrected. How do I remove this area?

Re: Remove areas exposed by deskew?

Posted: 2015-03-13T19:43:51-07:00
by snibgo
You should have input-file, then the processing, then the output file.

Code: Select all

convert in.jpg -background green -set option:deskew:auto-crop 1 -deskew 40% -fuzz 5% -trim +repage out.jpg
The 5% and "1" might need tweaking.

Re: Remove areas exposed by deskew?

Posted: 2017-03-30T13:04:40-07:00
by andreibexa
I am using an OCR script - Tesseract. I didn't know how to align or rotate a text, to be perfect aligned horizontaly. Your script works great !

Code: Select all

convert in.jpg -set option:deskew:auto-crop 1 -deskew 40% -fuzz 5% -trim +repage out.jpg
Thank you so much ! :) :D :)