lens testing setup and presentation

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

RobertOToole
Posts: 2627
Joined: Thu Jan 17, 2013 9:34 pm
Location: United States
Contact:

Post by RobertOToole »

ray_parkhurst wrote:Yeah, I have a few copies of PS but rarely use it. Never wanted to get over the learning curve, but indeed auto alignment would be very useful. I do the alignment manually, which takes a bit of time.

I hear you Ray.

Photoshop has to have the worst UI ( user interface ) of any program written in the history of mankind.

I have used Photoshop for almost 20 yrs now and I taught Photoshop professionally for at least 6-7 years, and even I get lost sometimes with the over complicated UI on the new versions.


:D

Robert

RobertOToole
Posts: 2627
Joined: Thu Jan 17, 2013 9:34 pm
Location: United States
Contact:

Post by RobertOToole »

rjlittlefield wrote:
RobertOToole wrote:You can use a menu command to load all the open images into a single file as layers. Photoshop can then align the images.
If you're talking about Edit > Auto-Align Layers, then suddenly I have become very uncomfortable due to the sub-pixel interpolation issue discussed above.

But probably I have misunderstood what you're talking about. Can you explain in more detail?

--Rik
Hi rik,

I do my alignment manually but you can align a stack with Edit>Auto-Align after selecting all the layers, once all the files are loaded into a stack. But you have to be careful and check, since some of the modes scale the images, I believe, if my memory is correct, that the collage setting doesn't scale the layers.

The best way to align manually is to set one layer to blend mode: difference. This makes life easier.

Below is a Rodagon layer on top of a Minolta 5400 layer set to difference.


RobertImage

RobertOToole
Posts: 2627
Joined: Thu Jan 17, 2013 9:34 pm
Location: United States
Contact:

Post by RobertOToole »

rjlittlefield wrote:It appears that the crop has been rotated with respect to the full frame.

If that means that the 100% image has been rotated from what came out of the camera, then the result cannot be meaningfully compared to any other image that is close in quality.

This is because slight rotation inevitably implies subpixel interpolation, which always messes up the sharpness one way or the other.
Good point you make here Rik.

I missed this the first time I read the thread so thanks for pointing that out. I am sure someone else missed this also.

Robert

ray_parkhurst
Posts: 3402
Joined: Sat Nov 20, 2010 10:40 am
Location: Santa Clara, CA, USA
Contact:

Post by ray_parkhurst »

rjlittlefield wrote: If you're talking about Edit > Auto-Align Layers, then suddenly I have become very uncomfortable due to the sub-pixel interpolation issue discussed above.
...

--Rik
Rik...doesn't Zerene and other stacking software do a similar thing when scaling of images is allowed? It is for this particular reason that I turn off scaling, even though it can result in some distortion, and why I search for telecentric lenses that don't change scale vs focal plane shifts.

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

Post by rjlittlefield »

ray_parkhurst wrote:Rik...doesn't Zerene and other stacking software do a similar thing when scaling of images is allowed?
Yes, they do, and not just when scaling is allowed. Even shift corrections have the same problem -- in order to align the images as well as possible, the software may have to do subpixel shifting, and if it does, then it has to do subpixel interpolation, and that's where all the problems kick in.

It is because of interacting with Zerene users that I'm very sensitive to the issue. The advanced interpolation methods are in there because with very sharp lenses, it's possible to see some loss of sharpness due to subpixel shifting with the default bicubic interpolator. The same guys who saw that softening in Zerene Stacker complain in other forums that they don't like Photoshop because it does the same thing, and in Photoshop there's no option to use any sharper method.

Adding complexity to the issue, it turns out that the "best" interpolation method depends to some extent on the image content. A high order Lanczos interpolator that works great on random detail like foliage may introduce obvious ringing around long straight edges in architecture. For stacking, I finally just gave up on the idea of making specific recommendations about what to use when, and just started telling people what to look for -- like softening versus ringing -- and make their own decisions for their own subjects, their own equipment, and their own tastes.

But for lens testing, the recommendation seems pretty straightforward: just avoid interpolation whenever possible.

--Rik

dickb
Posts: 342
Joined: Mon Jul 05, 2010 1:54 am

Re: lens testing setup and presentation

Post by dickb »

RobertOToole wrote:Hi Dick,

I can help with that and give the processing workflow I use.

By experience I found the only way to do it, for me at least, is to process each image in a comparison with exactly the same settings so you can see minor differences and it makes testing a lot more repeatable and consistent results.

For example I prefer to have noise reduction set to zero, and also all lens correction turned off. This is a problem with Photoshop and Lightroom though since even with some settings like contrast zero'd out, the baseline is still offset a bit. I do add some mild sharpening in the RAW conversion, 40, 0.4, 0, but I don't apply sharpening to the converted images.

Using this method I can re-test or add another lens and get results that are easy to comparable.

BTW I am in the process of comparing a bunch of tube lenses and a pile of scanner lenses, I think my brain now has a wafer disk image permanently etched into my prefrontal cortex :D

All the best,
Robert

Thanks for your comments. I can empathise with wafer image retention..

For exposure, do you just use the TTL of the flashes? Or do you tweak exposure and contrast afterwards? I found my non TTL flashes to be cumbersome in use, adjusting the output for every aperture..

ray_parkhurst
Posts: 3402
Joined: Sat Nov 20, 2010 10:40 am
Location: Santa Clara, CA, USA
Contact:

Post by ray_parkhurst »

rjlittlefield wrote:
ray_parkhurst wrote:Rik...doesn't Zerene and other stacking software do a similar thing when scaling of images is allowed?
Yes, they do, and not just when scaling is allowed. Even shift corrections have the same problem -- in order to align the images as well as possible, the software may have to do subpixel shifting, and if it does, then it has to do subpixel interpolation, and that's where all the problems kick in

....

But for lens testing, the recommendation seems pretty straightforward: just avoid interpolation whenever possible.

--Rik
This is probably better asked in a separate thread, but is subpixel shifting really required? There is already significant interpolation going on even at pixel level in the source images (or in post for RAW), and the effects of AA filters and such on most cameras will blur at even 1-2pixel levels of detail. It seems like pixel-level alignment would be sufficient. Is there an option in Zerene to eliminate sub-pixel alignment, ie align to the nearest pixel?

I honestly did not know this was happening, and now I am not happy about it. I end up turning off scaling now even for non-telecentric lenses, and just accept the distortions. It would not work for some subjects, but for my purposes it's only possible to tell the difference through careful pixel peeping, so is irrelevant.

Edited to add:

For lens testing, and animations, I try for nearest pixel alignment. Being a maximum of 1/2 pixel misaligned seems to work fine. Even at that, distortions can swamp the alignment very quickly.

RobertOToole
Posts: 2627
Joined: Thu Jan 17, 2013 9:34 pm
Location: United States
Contact:

Re: lens testing setup and presentation

Post by RobertOToole »

dickb wrote:
RobertOToole wrote:Hi Dick,

I can help with that and give the processing workflow I use.

By experience I found the only way to do it, for me at least, is to process each image in a comparison with exactly the same settings so you can see minor differences and it makes testing a lot more repeatable and consistent results.

For example I prefer to have noise reduction set to zero, and also all lens correction turned off. This is a problem with Photoshop and Lightroom though since even with some settings like contrast zero'd out, the baseline is still offset a bit. I do add some mild sharpening in the RAW conversion, 40, 0.4, 0, but I don't apply sharpening to the converted images.

Using this method I can re-test or add another lens and get results that are easy to comparable.

BTW I am in the process of comparing a bunch of tube lenses and a pile of scanner lenses, I think my brain now has a wafer disk image permanently etched into my prefrontal cortex :D

All the best,
Robert

Thanks for your comments. I can empathise with wafer image retention..

For exposure, do you just use the TTL of the flashes? Or do you tweak exposure and contrast afterwards? I found my non TTL flashes to be cumbersome in use, adjusting the output for every aperture..
I am always in Manual mode and I try to match the exposure between apertures/lenses. I use a Godox controller and just hit one button, turn a little dial to adjust the power setting. Some lenses are not always linear between apertures so it might only need 2/3rd stop between apertures.

Hope this helps.

Robert

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

Ray wrote: I end up turning off scaling now even for non-telecentric lenses
I am not sure if that is correct. Imagine, you have two images, taken in sequence with non-telecentric lens, if you turn scaling adjustment off, you will get blurred images as different parts of subject will be fused.

Of course, Rik is more authorative since he is the creator, but my common sense tells me not to turn the scaling off if non-telecentric lens is used.

ray_parkhurst
Posts: 3402
Joined: Sat Nov 20, 2010 10:40 am
Location: Santa Clara, CA, USA
Contact:

Post by ray_parkhurst »

mjkzz wrote:
Ray wrote: I end up turning off scaling now even for non-telecentric lenses
I am not sure if that is correct. Imagine, you have two images, taken in sequence with non-telecentric lens, if you turn scaling adjustment off, you will get blurred images as different parts of subject will be fused.

Of course, Rik is more authorative since he is the creator, but my common sense tells me not to turn the scaling off if non-telecentric lens is used.
What happens is the algorithm decides on a different best-focused pixel in the final rendering. This causes subtle lateral distortions as the rendering transitions from one focal plane to the next. For some subjects this is completely unacceptable, and for others it's completely invisible except when pixel peeping in comparison with a rendering done with scaling. The effect is significantly mitigated by over-sampling, ie taking more shots than would normally be needed for a given depth of field. More shots means less scaling shift between shots, so less distortion.

Lou Jost
Posts: 5933
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Also, telecentricity is not an all-or-none property. There are gradations in the degree of telecentricity.

My test for telecentricity is to do a stack both ways, with scaling on and with scaling off, and if they look the same for my intended medium, then I can treat the lens as telecentric for that project. And I would prefer that lens to one that failed that test,all else being equal. If I intend to stitch, then I'd prefer the telecentric lens even if I take a small hit in image quality.

However, I prefer to stitch different stacks of a single aerial image, by moving the camera in the x-y plane, rather than moving the lens in the x-y plane for each individual z-stack. Then I am not sure how much telecentricity matters.
Last edited by Lou Jost on Thu May 31, 2018 9:09 am, edited 1 time in total.

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

Ray, I think there are more than what you said.

For example, images taken from a wobbling rail, you will get a sequence of mis-aligned images. To deal with this, a stacking algorithm must first align these images, for translational, scaling, rotational shifts, before deciding what is in focus and what is not. If you do not do these steps, you will be fusing different parts of subject/scene together. Some software, like Zerene since I use it, allows you to turn off or set a range for some alignments to speed up the process. And this is only before stacking.

Of course, I am only speaking for a general approach of stacking algorithm, there are a lot of more than just these alignments, like interpolation mentioned in previous posts, fusing pixels, etc. I think this is more of Rik's topic, so I will stop here.

ray_parkhurst
Posts: 3402
Joined: Sat Nov 20, 2010 10:40 am
Location: Santa Clara, CA, USA
Contact:

Post by ray_parkhurst »

mjkzz wrote:Ray, I think there are more than what you said.

For example, images taken from a wobbling rail, you will get a sequence of mis-aligned images. To deal with this, a stacking algorithm must first align these images, for translational, scaling, rotational shifts, before deciding what is in focus and what is not. If you do not do these steps, you will be fusing different parts of subject/scene together. Some software, like Zerene since I use it, allows you to turn off or set a range for some alignments to speed up the process. And this is only before stacking.

Of course, I am only speaking for a general approach of stacking algorithm, there are a lot of more than just these alignments, like interpolation mentioned in previous posts, fusing pixels, etc. I think this is more of Rik's topic, so I will stop here.
Well, if the rail is really rotating as well as shifting and also the image is scaling, then indeed more sophistication is needed. But I usually ignore rotation, as I have never seen it happen in my system. I keep alignment on, though now with what I've learned about sub-pixel alignment happening I'm not happy about it. All I am turning off is scaling, so only subtle image to image shifts in scale are going uncorrected.

Edited to add: my application is coin photography, which lends itself to a simpler approach. Bugs or flowers or whatever might not work as well since the stacks are much deeper.

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

Post by rjlittlefield »

RobertOToole wrote:I believe, if my memory is correct, that the collage setting [in Photoshop] doesn't scale the layers.
I believe that's correct. Nonetheless, I'm pretty sure the collage setting will still do fractional pixel shifts if that's what gives the best match for the image contents. That implies subpixel interpolation, still not a good idea for precision comparisons.
ray_parkhurst wrote: Is there an option in Zerene to eliminate sub-pixel alignment, ie align to the nearest pixel?
There is not.

If one got added, it might take the form of an interpolator named "nearest neighbor", since that's the mathematical equivalent when just shifting. But for most applications, nearest neighbor interpolation is generally considered to be the worst possible thing you can do, so I would need a pretty compelling use case to explain its presence. Automatic alignment of lens test images to make animations might qualify.

Or maybe just go a different route and include a single checkbox that would disable rotation, disable scale, and force nearest-pixel shifts. That would be less general but also easier to explain & use.

Anyway, for focus stacking, if you need alignment at all then asking for nearest-pixel alignment basically says that you prefer to have most of the pixels completely unmodified, at the cost of up to almost one full pixel misalignment at the transitions between focus planes. That might be a sellable argument also, certainly for lens testing and possibly for natural subjects with random texture -- no long linear features where jogs would grab attention.

But no, there's no such feature now.

--Rik

ray_parkhurst
Posts: 3402
Joined: Sat Nov 20, 2010 10:40 am
Location: Santa Clara, CA, USA
Contact:

Post by ray_parkhurst »

rjlittlefield wrote:
ray_parkhurst wrote: Is there an option in Zerene to eliminate sub-pixel alignment, ie align to the nearest pixel?
There is not.
...
Or maybe just go a different route and include a single checkbox that would disable rotation, disable scale, and force nearest-pixel shifts. That would be less general but also easier to explain & use.
That sounds like an excellent option.
rjlittlefield wrote: Anyway, for focus stacking, if you need alignment at all then asking for nearest-pixel alignment basically says that you prefer to have most of the pixels completely unmodified, at the cost of up to almost one full pixel misalignment at the transitions between focus planes. That might be a sellable argument also, certainly for lens testing and possibly for natural subjects with random texture -- no long linear features where jogs would grab attention.
I think for some applications (such as my coin photography) this would be a near ideal solution to maintain sharpness at the cost of a small amount of distortion at the transitions, which I believe are hardly noticeable.

Post Reply Previous topicNext topic