Perfect distance between Sigma LSA and microscope lenses=?

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

Moderators: ChrisR, Chris S., Pau, rjlittlefield

Adalbert
Posts: 1089
Joined: Mon Nov 30, 2015 1:09 pm

Post by Adalbert »

Hello Mike,

OK, the candle version of the razor blade looks like that:
Image
https://farm5.staticflickr.com/4606/390 ... a273_o.jpg[/img]

MTF mapper
Image

MTF
Image

BR, ADi

Adalbert
Posts: 1089
Joined: Mon Nov 30, 2015 1:09 pm

Post by Adalbert »

Hello Rik,
Razor blades are excellent targets
Yes, but I don’t know how to get the razor blade and the paper to the same level (press together).

BR, ADi

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

Post by Lou Jost »

Do they need to be at the same level? The image would be exactly the same if a perfectly white paper were at the level of the razor blade or far below it. So I don't think it matters. (Note that the paper in your photo is not white, and that is a problem.)

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

Post by rjlittlefield »

OK, your big problem now looks like you're telling MTF mapper to process the whole image as if it contained one long straight edge, and in fact it contains one long slightly curved edge.

That slight curve makes all the difference in the world, because when MTF mapper fits the curved edge with a straight line, it observes that the fitted straight line has to be moved a lot of pixels to get most of the black or white on one side.

I suggest instead, make a small image from just a crop of the edge, short enough that the edge is essentially straight, then analyze that. See http://mtfmapper.blogspot.com/2017/05/n ... -mode.html , Figure 2.

Here's what I get from a 110x135 pixel crop of your image (crop only, no levels adjustment):

Image

Image

This is now showing MTF50 = 0.187 cycles/pixel, =5.35 pixels/cycle, =2.67 pixels per transition, which matches pretty well what I see by simply zooming in to look at the image at 800% in Photoshop.

--Rik

fvdbergh
Posts: 4
Joined: Sat Mar 28, 2015 1:09 am
Contact:

Balance image noise against distortion

Post by fvdbergh »

Hi guys,

When you crop out the edge you have to balance edge length against radial lens distortion, as well as the fact that the lens MTF will vary across the field. For the sake of the argument, let's say you put the razor blade in the centre of your field of view. Because of the magnification, you will probably have the razor blade running across the entire image --- this is bad because the MTF in the centre of the lens is certainly different from the the MTF at the edges of the image. I cannot give any solid figures here, but I would crop out only about 10% of the image height (see Rik's recent post).

MTF Mapper will automatically compensate for radial lens distortion (since about version 0.6.10), but using a smaller crop (i.e., shorter section of the edge) will help to limit the impact of such distortion too.

If you are using MTF Mapper with RGB tiff images (or JPEGs), then the I would aim for a minimum edge length of about 80 pixels (along the edge). If you use a raw image together with the 'Bayer channel' options in the Preferences dialog to process only, say, the green channel then I would aim for an edge length of about 200 pixels. These edge lengths will give you a reasonable balance between image noise (which becomes worse with shorter edges) and geometric distortion (worse with longer edges) or averaging across different parts of the lens (worse with longer edges).

Now that I have opened the "Bayer channel" can of worms, I had better describe the process in a bit more detail. First convert your raw camera image to a Bayer mosaiced 16-bit linear image using
dcraw -4 -T -d input.NEF
which should give you a tiff file. Now you can crop out part of the edge; I think the latest version of GIMP will actually handle the 16-bit image correctly. I recommend GIMP because it is important to crop out the image so that the top-left corner of your crop region falls on an even number (counting rows and columns from zero). Recall that on a typical Bayer sensor you will have an RGGB Bayer pattern in a 2x2 group, and you want to make sure that your cropped image preserves that pattern.

Now you can load up the cropped image in MTF Mapper, and process it three times, each time selecting a different Bayer channel in the Preferences dialog. You can now visualized the three SFR curves in a single window by shift-clicking on the Cyan annotated MTF50 values of the same edge in the three different "Annotated image" outputs corresponding to the R, G and B channels.

-Frans

ChrisR
Site Admin
Posts: 8546
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

Welcome to the forum, Frans :)
Chris R

Adalbert
Posts: 1089
Joined: Mon Nov 30, 2015 1:09 pm

Post by Adalbert »

Hello Rik,
Thank you for your hint and example!
BR, ADi

Adalbert
Posts: 1089
Joined: Mon Nov 30, 2015 1:09 pm

Post by Adalbert »

Hello Frans,

Many thanks for the explanation!

I would like to test a picture 6000x4000 pixel in TIFF 16 bit taken by the EOS M3 (pixel pitch = 3,7 µm)
It is a stack based on 70 CR2-pictures (converted to TIFF by the LR and processed by the Zerene Stacker)

I would crop out only about 10% of the image height
Which part of the picture should be cropped out?



If you are using MTF Mapper with RGB tiff images (or JPEGs), then the I would aim for a minimum edge length of about 80 pixels (along the edge). If you use a raw image together with the 'Bayer channel' options in the Preferences dialog to process only, say, the green channel then I would aim for an edge length of about 200 pixels.
Should I really cut such small part from the 6000x4000 ?

BTW, dcraw.exe cannot decode my stacks (neither TIFF nor JPG :-(
Should I convert the CR2 to the Bayer mosaicked 16-bit instead of the conversion to the TIFF and before stacking?

BR, ADi

fvdbergh
Posts: 4
Joined: Sat Mar 28, 2015 1:09 am
Contact:

Bayer channel example

Post by fvdbergh »

Ok, so I decided to eat my own dogfood :)

I downloaded DSC_0312.NEF from the DPReview studio test of the Nikon D850. I converted it with dcraw -4 -T -d DSC_0312.NEF.

I downloaded the latest development version of GIMP, 2.9.8. It looks like GIMP 2.8.20 did not handle 16-bit images, but 2.9.8 works just great. I cropped the image so that the top-left corner of the crop window started on even numbers (both row and column). I used "export" to save a 16-bit TIFF file of my crop, which was a 200x200 pixel over the horizontal slanted edge in the DPR studio chart.

I then fired up MTF Mapper 0.6.14, and added "--single-roi" to the Arguments field of the Preferences dialog. Then I chose "red" under "Bayer channel" (also in Preferences dialog), and used File/Open to process my cropped tiff file. I repeated this two more times, selecting the green and blue Bayer channels in turn, using MTF Mapper's "Annotated image" output mode.

I then used shift-left-click to select the Cyan MT50 text in each of the three Annotated image outputs, which gave me this:

Image

You can see that this lens (maybe the Nikkor 85 mm, set to f/5.6) has some pretty bad longitudinal chromatic aberration (like many Nikkor primes). The orange SFR curve is actually the blue channel, green is green, and the blue SFR curve is the red channel.

One day I might actually add some functionality to automate such a three-channel slanted-edge analysis, but given how MTF Mapper works, this is a bit ungainly at the moment.

fvdbergh
Posts: 4
Joined: Sat Mar 28, 2015 1:09 am
Contact:

Post by fvdbergh »

Adalbert wrote: Which part of the picture should be cropped out?
Well, I would start at the centre, but you can crop out any part that you would like to measure in more detail, probably one crop from the centre, one from the edge?
Adalbert wrote: Should I really cut such small part from the 6000x4000 ?
Yes. You can probably go up to about 600x600, but more than that and you will start blending the different MTFs as they vary across the field.
Adalbert wrote: BTW, dcraw.exe cannot decode my stacks (neither TIFF nor JPG :-(
Should I convert the CR2 to the Bayer mosaicked 16-bit instead of the conversion to the TIFF and before stacking?
For a stacked image, you can just export each channel of your image (using whatever tool you have handy, but GIMP will work) as a grayscale image, and perform the slanted-edge analysis on those to get some idea of how well the separate channels are focused / stacked.

The Bayer channel analysis is mostly useful for examining lens behaviour (such as LoCA), but using a demosaiced image, or just the luma channel of a demosaiced image (which is what MTF Mapper does by default if you give it an RGB image) is perhaps closer to real-world use. The stacking is probably performed on demosaiced images anyway.

Anyhow, come to think of it, I do not know whether Zerene will stack the channels individually --- it has been years since I last used (or updated) it. But it would actually make sense to do the stacking per-channel ....

Adalbert
Posts: 1089
Joined: Mon Nov 30, 2015 1:09 pm

Post by Adalbert »

Hello Frans,

So, I have tried with GIMP but without success :-(
Firstly I had to convert sRGB IEC61966-2.1 (of Zerene ) into GIMP built-in sRGB. Secondly I was not able to cut anything from the TIFF-file (GIMP has crashed every time).

So, I have just used the PS and cut a square 128x128 pixels from the middle of the picture.

Mapper:
Image

Red:
Image

Green:
Image

Blue:
Image


Together (shift left click)
Image

BR, ADi
Last edited by Adalbert on Sun Jan 28, 2018 7:21 am, edited 1 time in total.

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

Post by Lou Jost »

Adalbert, once again, that does not look like a black-and-white edge.

Adalbert
Posts: 1089
Joined: Mon Nov 30, 2015 1:09 pm

Post by Adalbert »

Hello Lou,
Yes (haha), I can see this too :-)
Do you know any supplier, which can deliver small MTF-test-charts?
BR, ADi

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

Post by Lou Jost »

No, I don't, sorry.

Adalbert
Posts: 1089
Joined: Mon Nov 30, 2015 1:09 pm

Post by Adalbert »

Hello Lou,
Me neither :-(
So, I’m trying with the razor blade and don’t have any better idea at the moment.
BTW, maybe micro-mounts?
BR, ADi

Post Reply Previous topicNext topic