I have scanned documents that weren't scanned perfectly straight so the text is not orientated perfectly horizontally, i.e. perhaps 10° of a slop on each line.
My understanding is that the deskew option in imagemagick should solve this, for example
convert skewed_1500.jpeg -deskew 40% skewed_1500_not.jpg
but it doesn't have any noticeable effect on the output file.
I've attached the skewed/skewed_not images for comparison.
Best regards,
Colm
I would try a bigger value like 80% otherwise an Imagemagick forum member has a bash script that may be better: http://www.fmwconcepts.com/imagemagick/textdeskew/index.php