Capturing Affine projection values
Posted: 2013-04-09T02:42:36-07:00
I wonder if there is a simple way to capture Affine Projection output from -verbose -deskew… and feed this back to another image.
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=23142
Code: Select all
-print "__Artifacts__\n%[artifact:*]"
Code: Select all
convert rose: -background black -rotate 5 \
-deskew 60 \
-print 'image deskewed by %[deskew:angle]\n' show:
In my (limited) experience, -deskew only works well for angles of about 5 degrees or less. I think it was meant more for deskewing text images rather than everyday type images. In such case, it does not rely upon the outer padding from a small rotation, but uses the rows of text to guide it.For example if you change the above example to use an initial rotation of 10 and the resulting image does not appear to have been deskewed. More over the reported calculated deskew angle was a tiny -0.895174 degrees, which is obviously not a good result.