Visible detail and micro contrast deterioration after performing image fine rotation

I run RT 5.8 over Ubuntu 18.04. I recently took a number of insect macros, which required straightening/ fine angle adjustment . I worked with the RAW files (.PEF) in usual manner, adjusting contrast, color, sharpness etc first and fixing the angles just before the final crop. I noticed that after changing angles via “Straightening/Fine rotation” the image quality dropped considerably. The image deterioration became visible on RT (while still in RAW) as well as in the saved .jpeg file. At first I thought that it happened as a result of auto-cropping during the fine angle adjustment procedure, but when I cropped the the original image (without changing angle) to the same size as the RT did while adjusting the angle, I found no deterioration in the earlier file, not in RAW neither in saved .Jpeg. Interestingly, changing an image angle via preset 90 deg or "Flip horizontally " or “Flip vertically” has no effect over the image quality . What could be the problem and how to fix it?

Could you post some screenshots at 100% zoom, showing what you experience?

In general I believe that you will always see some degradation when you do a slight angular adjustment due to the fact that in order to compensate the s/w is going to be forced to do interpolations (anti-aliasing) that will result in having to blur between pixels in order to fill in what wasn’t there. Consider the case of a perfectly vertical black line against a white background. If you rotate by a small value the formerly adjacent black pixels will have to result in an imperfect stair-step which will be filled in with a gray value. The question is: How good or bad is the s/w that you’re using at doing these sorts of adjustments and how closely are you pixel peeping to notice? Are the adjustments going to be apparent if/when your image is printed and is the result improved by subsequent sharpen or clarity adjustments?

3 Likes

Sure,thank you. I’m going to place the samples in the attachments. These are screenshots taken either saved jpegs or over RT working screen.
Please note, that the image quality didn’t change at all after performing “Flip horizontally”.

“that you will always see some degradation when you do a slight angular adjustment”
-why, then any preset angle change (90 deg left or right, or Flop vertically or Flop horizontally doesn’t seem to affect the image quality at all ?
I’m not printing these images yet (or maybe ever), but an image quality in macro is very important . If the depth of field is a millimetre or so, any deterioration in sharpness renders such an image useless.

“flip horizontal” is just a relocation of the unmodified pixels from one side of the image rectangle to the other. It’s when you do an angular rotation that an interpolation is required that changes the pixels.

3 Likes

Well, what do we learn out of this? In a macro don’t modify angles. I’m pretty sure, nobody will realize that you didn’t do it …

2 Likes

For any non-trivial rotations (i.e. anything else than multiples of 90°), the pixel values have to be interpolated. This will always introduce artifacts or unsharpness.

2 Likes


Is it the same in case of 90 deg flop? Because even in this case the grasshopper is still doing fine.
Only the gradual angle change affects it badly.

1 Like

Rotations in multiples of 90° won’t have the problem because they can be performed by swapping pixels

1 Like

Yes, it’s the angles between the major orientations (90, 180, 270, vertical/horizontal reversing) that introduce the need to interpolate the pixels to their new locations.

Your first screenshot does not look like a 100% preview. Preview for less than 100% often is less sharp then preview at 100%

Unfortunately, wildlife rarely complies with photographer’s requirements…

Yes, I probably took the first screenshot over smaller enlargement. But it doesn’t mean that at 100% it looks better;on contrary it looks worse under greater magnification in RAW.

I see. Would it be the case with any RAW editor?

What camera do you use?

I ask because, if you’re going to have to rotate images to get the right composition (I get that, some subjects and situations don’t let you compose optimally in-camera), your sensor resolution may be exposing the rotation artifacts more egregiously. My best camera is 24MP; I wouldn’t expect images from it to perform in rotation as well as equivalent images from, say, a 42MP camera.

I don’t have direct observation experience amongst softwares, but I would think so. There’s only so much a rotation algorithm can do to preserve the local pixel relationships in arbitrary-angle rotations. Oh, I do have rotation experience; I’ve cobbled together a bi-linear rotation algorithm for my hack software.

1 Like

As a very first step I would disable Auto-fill and then crop off the resulting black borders. That should give you a much better result.

1 Like

Thanks! I’m going to try this. i also will try to experiment in GIMP over the same parameters.

Auto-fill upsizes the image (because it tries to keep the image dimensions after rotation) and so leads to less sharp result, especially if it has to upsize a lot.

3 Likes

I used Pentax K5iis (16.3MP) for this sample but I’ve been in the same situation before, with Pentax KP (24MP) and it was the same story developing in RT. I actually think that higher MP would show even worse deterioration.