Automatic deskew is jaggy

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

Fixx
Posts: 9
Joined: Fri Oct 21, 2022 10:42 am

Automatic deskew is jaggy

Post by Fixx »

OK, here is an example what is the quality of deskew rotation compared to Photoshop:

Photoshop:
Image

And XnConvert:
Image

Maybe rotation algorithm should be updated? (notice: images above are scaled (but not resampled) by board software. Defects are more visible when you open images full size to its own tab.)
cday
XnThusiast
Posts: 4138
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Automatic deskew is jaggy

Post by cday »

Might be best to attach original images for comparison: source image, Photoshop output and XnConvert output. Current forum attachment limit 2MiB, image formats other than JPEG and PNG may need to be attached as a ZIP or similar archive format.

As XnView MP is a tabbed image viewer, it will then be easy to compare the original and output images, zoomed-in if necessary... :D
Fixx
Posts: 9
Joined: Fri Oct 21, 2022 10:42 am

Re: Automatic deskew is jaggy

Post by Fixx »

Well, as problem is so obvious there is no need for fancy displays...
Here is simple rectangle skewed 2 degrees:
Image

Here is Photoshop rotated -2 degrees to make it straight:
Image

And here is XnConvert automatic deskew:
Image

Difference is quite visible.
Original files are here: https://www.dropbox.com/s/2fqk7aeq8mhn2 ... s.zip?dl=0
cday
XnThusiast
Posts: 4138
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Automatic deskew is jaggy

Post by cday »

I think, after a very quick look at the Rotate and Automatic deskew actions, the answer is that the XnConvert Automatic deskew action currently does not have the 'Smooth' option available in the Rotate option... :(

And for completeness, in XnView MP the rotate tool has a 'Use anti-aliasing' option, which may or may not use the same algorithm as XnConvert's Rotate 'Smooth' option, but the Rotate -- Automatic Deskew tool also does not have an anti-aliasing option.


I have attached my own test image, a rectangle aligned with the horizontal axis, which can be used to see the effects of rotation and anti-aliasing when starting with a perfect rectangle. As in your test image, the canvas pixel dimensions are quite small, which results in the image quality degrading more rapidly than would be the case with larger pixel dimensions.

Image 1.png
You do not have the required permissions to view the files attached to this post.