www.photomacrography.net :: View topic - MTF mapper
www.photomacrography.net Forum Index
An online community dedicated to the practices of photomacrography, close-up and macro photography, and photomicrography.
Photomacrography Front Page Amateurmicrography Front Page
Old Forums/Galleries
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
MTF mapper
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    www.photomacrography.net Forum Index -> Macro and Micro Technique and Technical Discussions
View previous topic :: View next topic  
Author Message
Adalbert



Joined: 30 Nov 2015
Posts: 347

PostPosted: Sun Jan 28, 2018 1:41 pm    Post subject: MTF mapper Reply with quote

Hello everybody,
A discussion about this point has already been started in the following thread:
http://www.photomacrography.net/forum/viewtopic.php?t=36205&start=45
but I think it is better to create a new one for it.

Enclosed you will find the result of my current test (with a really white paper :-)


( LSA 50mm & LU PLAN 5x & 200*133 px )

Mapper:


BR, ADi
Back to top
View user's profile Send private message
Lou Jost



Joined: 04 Sep 2015
Posts: 2089
Location: Ecuador

PostPosted: Sun Jan 28, 2018 2:31 pm    Post subject: Reply with quote

Now that looks a lot nicer!!! Congratulations on your persistence. It has paid off.
_________________
Lou Jost
www.ecomingafoundation.wordpress.com
www.loujost.com
Back to top
View user's profile Send private message Visit poster's website
Adalbert



Joined: 30 Nov 2015
Posts: 347

PostPosted: Sun Jan 28, 2018 2:52 pm    Post subject: Reply with quote

Hello Lou,
It's very nice of you :-)
And many thanks for your help!
BR, ADi
Back to top
View user's profile Send private message
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 18694
Location: Richland, Washington State, USA

PostPosted: Sun Jan 28, 2018 6:17 pm    Post subject: Reply with quote

Refresh my memory, please: what optics and camera was this shot with? I see that you say "( LSA 50mm & LU PLAN 5x & 200*133 px )", but I don't know what "LSA 50mm" means and I'm not sure what the NA of the LU Plan is.

Also, can you clarify please that the 200x133 pixels image is simply a crop, done without resizing? The fact that the aspect ratio is 3:2, same as the whole frame, is making me a little nervous.

What has me spooked here is that the curves now look too good, as in way too high. When I run a calculated MTF based on what I think your optics are, I get numbers like diffraction-limited cutoff (MTF=0) occurring at about 0.4 cycles per pixel. Your curve is a lot higher than that. In fact it's within a few percent of a synthetic clean edge that I generated by a few steps of 50% downsizing with bicubic spline in Photoshop, starting with a high resolution image that was made with select-and-fill.

So I'm looking for things that might be messing up the test.

Accidentally downsizing instead of cropping will certainly produce an unrealistically sharp edge.

I also notice that your background is blown out to pure white, and I'm concerned that overexposure of the background might push the curve up as an artifact.

Then, I notice in re-reading your earlier thread that you were using stacked output. There's plenty of room for mischief in stacking, especially if you're aligning and/or running PMax. DMap done with alignment turned off should be pretty safe (assuming that your physical apparatus maintains alignment well enough).

But even so, the TIFF and JPEG outputs from stacking will typically use some nonlinear profile with gamma around 2.

MTF mapper really prefers to work with linear data, like what it would have if you gave it a raw file to work with.

I don't know any way to crop a raw file and have it still be raw, but it seems to me that you could have dcraw output with a linear color space and run that into MTF mapper.

Zerene Stacker should also be able to handle linear color space (though it's been a while since I checked that), if you want to continue running from stacked outputs.

--Rik
Back to top
View user's profile Send private message Visit poster's website
Adalbert



Joined: 30 Nov 2015
Posts: 347

PostPosted: Mon Jan 29, 2018 7:00 am    Post subject: Reply with quote

Hello Rik,
Quote:
what optics and camera was this shot with?
Sorry, I didn’t copy the information from the original thread:
- camera = CANON EOS M3 (pixel pitch 3,7)
- tube-lens= Sigma Life-Size Attachment 52mm
- tube-length=50mm
- lens= NIKON LU Plan 5x / 0.15
- illumination= 4*YN660
- subject= razor blade on white paper
- stack method= PMax
- stack size=70 pictures
Actually I wanted to compare the quality of the images dependent on the length of the tube-lens (this time=50mm). MTF-chart was only one part of this test.
So, I was not looking for the general method for the analysis of the resolution of the microscope-lenses but only for the comparison of the results of my setups pro tube-length.
After I had learnt the option with one slanted-edge of the MTF-mapper I executed this test with the mapper.

Maybe we can establish such general method, we only have to find a test-target :-)

BR, ADi
Back to top
View user's profile Send private message
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 18694
Location: Richland, Washington State, USA

PostPosted: Mon Jan 29, 2018 9:34 am    Post subject: Reply with quote

ADi, thanks for the data. They confirm that I was imagining the correct configuration. The key bits for me are 5X and NA 0.15, which establish the diffraction limits.

Again, by my calculations your computed MTF curve cannot possibly be correct because it is way better than diffraction permits. This means that your test protocol is not valid, which means that using it to compare configurations will be a waste of time.

So let's go back to things that might be causing the problem.

First, you should not be over-exposing the light background. Background should be uniform light gray. To make this happen, just position the paper far back from the razor blade, so that it is completely out of focus. At 5X NA 0.15, placing the paper an inch or two behind the razor blade should be OK.

Second, it is critical that the small image that is fed to MTF mapper is constructed by cropping without resizing. With your optics, MTF mapper at 100% should be showing that the edge transition takes place over a span of 2-3 pixels, as shown in your other thread at http://www.photomacrography.net/forum/userpix/5394_candle_prg_1.jpg :



I suggest to try again, paying special attention to these issues.

--Rik
Back to top
View user's profile Send private message Visit poster's website
Lou Jost



Joined: 04 Sep 2015
Posts: 2089
Location: Ecuador

PostPosted: Mon Jan 29, 2018 9:37 am    Post subject: Reply with quote

Rik, it was my fault that Adalbert used a white background. I don't understand how an arbitrary shade of light gray would be appropriate to measure contrast. Surely then the result would depend on the shade of gray used? Can you explain this choice a bit?
_________________
Lou Jost
www.ecomingafoundation.wordpress.com
www.loujost.com
Back to top
View user's profile Send private message Visit poster's website
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 18694
Location: Richland, Washington State, USA

PostPosted: Mon Jan 29, 2018 9:46 am    Post subject: Reply with quote

The sharpness of an edge is determined by how quickly the gray level transitions from A to B. It doesn't really matter what values A and B are because those can be determined from the image.

The problem is that if the image is over-exposed, the edge can become artificially sharpened because the gray levels go quickly from 0 to 255 on their way to (say) 1000 which cannot be represented in the image file. Clipping of gray levels is not your friend in slanted-edge analysis.

--Rik
Back to top
View user's profile Send private message Visit poster's website
Smokedaddy



Joined: 07 Oct 2006
Posts: 1073
Location: Phoenix, Arizona

PostPosted: Mon Jan 29, 2018 9:49 am    Post subject: Reply with quote

For my background, I used to tape a razor blade to my computer monitor while I had Notepad up and running.
Back to top
View user's profile Send private message Visit poster's website
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 18694
Location: Richland, Washington State, USA

PostPosted: Mon Jan 29, 2018 11:44 am    Post subject: Reply with quote

Smokedaddy wrote:
For my background, I used to tape a razor blade to my computer monitor while I had Notepad up and running.

That will work fine as long as you're shooting from far enough away that the monitor pixels are nowhere near resolved on the camera sensor. If the monitor pixels are resolved, then you get messed up numbers because the slanted-line analysis assumes that the actual edge is a sharp line between two regions that each have a uniform gray level.

--Rik
Back to top
View user's profile Send private message Visit poster's website
lothman



Joined: 14 Feb 2009
Posts: 312
Location: Stuttgart/Germany

PostPosted: Mon Jan 29, 2018 2:36 pm    Post subject: Reply with quote

Adalbert wrote:

Maybe we can establish such general method, we only have to find a test-target :-)

BR, ADi


such a chrome mask on glass should work when backlit, shouldn't it?

https://www.ebay.de/itm/0-01MM-5-Scales-Microscope-Objective-Stage-Calibration-Glass-Slide-Micrometer/262004515749?hash=item3d00afa3a5:g:5ccAAOSw3ydVzWBq
Back to top
View user's profile Send private message
Adalbert



Joined: 30 Nov 2015
Posts: 347

PostPosted: Mon Jan 29, 2018 3:29 pm    Post subject: Reply with quote

Hello Rik,
OK, this time 5cm distance between the paper and razor blade and a cut of 200x200 px.





BR, ADi
Back to top
View user's profile Send private message
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 18694
Location: Richland, Washington State, USA

PostPosted: Mon Jan 29, 2018 5:24 pm    Post subject: Reply with quote

This looks much more believable.

The portion of the curve between 0.3 and 0.5 cycles/pixel looks like what's expected from the diffraction-limited tail end of any curve for 5X NA 0.15.

The rapid drop from 0.0 to 0.1 cycles/pixel with the plateau from 0.1 to 0.3 is typical of an aberration-limited curve with wavefront error around 1/2 lambda.

If you were not focus stacking, then I would suggest testing each of a series of frames closely surrounding best focus, to find the best one. Since you are focus stacking, there's not much point in doing that.

However, if you're currently using PMax, then I would be interested to see the curve for a properly done DMap output also. "Properly done" means to set the contrast threshold very high, so that the DMap mask covers everything except a narrow strip along the edge of the razor blade. This will be simplest to do if you set the mask color to something other than black, for example as discussed at http://www.photomacrography.net/forum/viewtopic.php?p=215149#215149 .

As a separate issue, it would be interesting to see the test repeated, but with an added aperture that restricts the exit pupil of the objective to about 70% of its current diameter. This can be expected to significantly reduce the main aberrations. In that case the portion of the curve from 0.0 to 0.2 can be expected to rise significantly, while the tail end of the curve will drop to a cutoff maybe around 0.25 or 0.3 due to worse diffraction from the smaller aperture.

I look forward to further results -- thanks for all your hard work!

--Rik
Back to top
View user's profile Send private message Visit poster's website
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 18694
Location: Richland, Washington State, USA

PostPosted: Mon Jan 29, 2018 5:40 pm    Post subject: Reply with quote

lothman wrote:
such a chrome mask on glass should work when backlit, shouldn't it?
https://www.ebay.de/itm/0-01MM-5-Scales-Microscope-Objective-Stage-Calibration-Glass-Slide-Micrometer/262004515749?hash=item3d00afa3a5:g:5ccAAOSw3ydVzWBq


I have one of those. There's nothing on that slide that is the proper size and shape to be handled automatically by MTF mapper, even in single ROI mode. With some careful work in Photoshop, it may be possible to use one of the long bars that point to the central dots, by using select-and-fill to turn the bar into a block that has one legitimate edge.

A better possibility would be to use the square blob part of a USAF 1951 target. I have one of those too, but unfortunately at this moment most of my photo stuff is still put away because of some recent house repairs.

I'm actually pretty happy with the results that ADi is getting with his razor blade. Perhaps the razor blades that I have looked at in the past were just badly made. I'll get another sample next time I go to the grocery store.

--Rik
Back to top
View user's profile Send private message Visit poster's website
Smokedaddy



Joined: 07 Oct 2006
Posts: 1073
Location: Phoenix, Arizona

PostPosted: Mon Jan 29, 2018 7:30 pm    Post subject: Reply with quote

I used to use this one (the smaller one) for telescope eyepiece testing and Imatest (or I was trying to). <g>

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.photomacrography.net Forum Index -> Macro and Micro Technique and Technical Discussions All times are GMT - 7 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group