Lanczos3 (6x6) advanced interpolator?

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: Pau, rjlittlefield, ChrisR, Chris S.

johan
Posts: 1005
Joined: Tue Sep 06, 2011 7:39 am
Contact:

Lanczos3 (6x6) advanced interpolator?

Post by johan »

I just did a stack trying out one of the new features in the Zerene beta, the "Lanczos3 (6x6) advanced interpolator". The stack came out ok I suppose, but I'm not entirely sure what I should be looking for to decide interpolators or what the effect of 6x6 rather than 4x4 is. Can anyone shed a little light on the use of these?

Thanks!

Image
peacock by Johan J.Ingles-Le Nobel, on Flickr
My extreme-macro.co.uk site, a learning site. Your comments and input there would be gratefully appreciated.

rjlittlefield
Site Admin
Posts: 21214
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Can anyone shed a little light on the use of these?
Sure...

Very briefly, Lanczos3 and Lanczos8 do a better job of preserving sharpness when there are partial-pixel shifts.

Visit http://pixinsight.com/doc/docs/Interpol ... ithms.html and go down to the "Rotation Examples". What you'll see there is an extremely sharp image (random pixel noise) that has been rotated a small amount using an assortment of different interpolators. Mousing over each of the interpolator names is supposed to show you the resulting image. (This works better in some browsers than others. Firefox seems to be broken at this moment but IE 9 works fine.)

The angular aspect of the rotation is not important. What matters is that the rotation introduces all sorts of partial-pixel shifts ranging from none at the center to 1/2 pixel on both axes at other points. The pattern repeats on a coarse square grid.

The default interpolator in Zerene Stacker is similar to what pixinsight.com labels "Bicubic spline". You can see that where there have been partial-pixel shifts, the image looks less sharp. This is because in those regions, the interpolator has done some averaging of nearby pixels to derive new values "in between" the original pixel positions. With Lanczos-3, the softening is less obvious. If the display included Lanczos-8, then the softening would be virtually non-existent.

Ultimately, you have to choose the interpolator based on what it does with your own images. Aside from its much longer computation time, Lanczos-8 can also produce some obvious "ringing" effects several pixels wide around sharp edges.

So it is a tradeoff, sort of like anti-moiré filters that soften the image but prevent false colors. Using a lower-order interpolator avoids long-range ringing, at the cost of lower perceived sharpness when an already sharp image undergoes a partial-pixel shift.

As a rule of thumb, Lanczos-8 will give the highest sharpness and works OK with random textures, while Lanczos-3 is not as sharp but holds up better with structured textures that have smooth regions next to edges. The effects are most obvious at very low magnifications where there is less optical blurring, and are nonexistent if you've turned off computational alignment so there are no partial-pixel shifts. To my eye, the differences are significant only when pixel-peeping images that are very sharp already. I put them in at the urging of a landscape photographer.

By the way, the current release T201303012035 has a known bug that prevents selecting the generic interpolator "CubicA,param=<value>". If you try that, you'll get red error messages and an "Uh-oh, something went wrong" popup window. It's a silly mistake, will be fixed soon.

--Rik

johan
Posts: 1005
Joined: Tue Sep 06, 2011 7:39 am
Contact:

Post by johan »

rjlittlefield wrote:Aside from its much longer computation time, Lanczos-8 can also produce some obvious "ringing" effects several pixels wide around sharp edges.
Thanks Rik, appreciated. Would this be an example of the ringing effect you're talking about? (dmap 30/15/2)

Image
My extreme-macro.co.uk site, a learning site. Your comments and input there would be gratefully appreciated.

rjlittlefield
Site Admin
Posts: 21214
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Would this be an example of the ringing effect you're talking about?
No. That looks like a DMap halo -- a smooth slope in the depth map, found in featureless regions, interacting with slight differences in exposure or OOF features from frame to frame. The darker/lighter bands in that case result from selecting pixel data from slightly darker and lighter frames as the depth map traverses from one level to another.

Below are some examples of ringing & sharpness differences due to the interpolators. The input here is a single image, rotated slightly in the spirit of pixinsight.com. Note that these images are 400% of actual pixels. The sharp black line down the right edge of the inset panel started life as 1 pixel wide, constructed in Photoshop. In this sense it is unrealistically sharp, but it nicely illustrates the effect. In practice, ringing like this would mostly be seen in architectural work where there are hard edges next to uniform areas where the ringing is easy to see.

Image

--Rik

johan
Posts: 1005
Joined: Tue Sep 06, 2011 7:39 am
Contact:

Post by johan »

Ahh, gotcha, thanks.
My extreme-macro.co.uk site, a learning site. Your comments and input there would be gratefully appreciated.

Post Reply Previous topicNext topic