Dear Frans van den Bergh, Thank you for creating this wonderful tool, MTF Mapper. I would like to use it to test the lenses of my camera. For this purpose, I need to adapt the field of view to be approximately 13 times smaller than the A4 format and to have a different aspect ratio. Additionally, there are cases where the field of view is not rectangular but circular or oval. At the moment, I don't fully understand all the details about how the code functions. I have a few questions: Should the chart...
Is it only me having this problem with saving data with the save buttons on windows PCs?
Is it only me having this problem with saving data with the save buttons on windows PCs?
Is it only me having this problem with saving data with the save buttons on windows PCs?
That worked perfekt. Thank you very much Frans! Instead of cropping the picture I put a white rectangle over the two black horizontal lines. Though I can not save the results on my three windows PC with the save buttons in mtf mapper. One of them is windows 11 and two are windows 10. It is not working with mtfmapper 0.7.38 or 0.7.40. I found the data in: C:\Users\Guido\AppData\Local\Temp\mtfmappertemp_0 So at least I was able to copy the data from there.
Hi Frans, Last week I've calibrated three of my lenses to match my camera. MTF Mapper was super helpful in the process, as it makes determining the amount of defocus very straightforward. Essentially, the biggest problem I had was sticking the A0 poster on the wall by myself. Given that every single shot contains some uncertainty in the focus position, I wanted to do a regression of AF Tune Value versus focus mismatch. As far as I could find, exporting the results from the UI does not give you the...
That worked perfekt. Thank you very much Frans! Instead of cropping the picture I put a white rectangle over the two black horizontal lines. Though I can not save the results on my three windows PC. One of them is windows 11 and two are windows 10. It is not working with mtfmapper 0.7.38 or 0.7.40. I found the data in: C:\Users\Guido\AppData\Local\Temp\mtfmappertemp_0 So at least I was able to copy the data from there.
Hi Guido, I have found the underlying reason why MTF Mapper's --imatest-chart option was not working with your images. I think my code was based around an older Imatest chart type that did not have those bright white squares inside the centre column, second row block. Those blocks were brighter than the white background of the chart, causing all kinds of trouble. I have released MTF Mapper 0.7.40 to fix the problem, your test images should now work correctly (maybe with a little adjustment of the...
version bump
improved Imatest chart cropping to handle trimodal histograms
Hi Guido, Sure! To deal with the image brightness problem you could try adjusting the Threshold parameter (in the GUI, Settings->Preferences, the Threshold field under the "Input Flags" group). Or on the command line, try the -t option, I found -t 0.3 worked with your 139.jpg. For dealing with Imatest charts there is the --imatest-chart command line option, and the corresponding File->Open Imatest image GUI menu item. Except I noticed that this is not working correctly with your input images. I have...
Hi Frans, Thanks again for your response. In the paper they convolve the slit with the presample blur of the sensor and then sample it. Having reread the paper I think this is what I need to do - I was hoping that mtf_generate_rectangle might offer a shortcut for doing this, but from your explanation above, I don't think that it will. I've attached the paper for your interest. Kind regards, Dean.
Hi Frans, I'm have trouble with pictures from an Imatest chart. Only if I make the picture brighter I get results. Even with the brighter picture I only get results in the center but not on the top and bottom line. Any idea what could cause the problem? Kind regards Guido
Hi Dean, I found the paper on Google scholar, but scholar did not find an open-access PDF, so I only have the abstract to go on. If I understand correctly (based on other similar papers) the idea is to use a slit instead of a point light source (too few photons, requires some magnification optics). The slit will have a rect() function impulse response across the narrow part of the slit, compared to the step() impulse response of the slanted-edge method. I suppose if you knew the width of the slit...
Hi Dean, I found the paper on Google scholar, but scholar did not find an open-access PDF, so I only have the abstract to go on. If I understand correctly (based on other similar papers) the idea is to use a slit instead of a point light source (too few photons, requires some magnification optics). The slit will have a rect() function impulse response across the narrow part of the slit, compared to the step() impulse response of the slanted-edge method. I suppose if you knew the width of the slit...
Hi Dean, I found the paper on Google scholar, but scholar did not find an open-access PDF, so I only have the abstract to go on. If I understand correctly (based on other similar papers) the idea is to use a slit instead of a point light source (too few photons, requires some magnification optics). The slit will have a rect() function impulse response across the narrow part of the slit, compared to the step() impulse response of the slanted-edge method. I suppose if you knew the width of the slit...
Hi Frans, Thank you very much for this, as well as the ChatGPT tip, as I have struggled to get Gawk working on Windows. One further question... One of my aims is to replicate the work described in "Comparison of tilted slit and tilted edge supperresolution MTF techniques" by Olson et al. (2007). My plan is to create a narrow slit using the generator - do you think this will work? Thanks in advance, Dean.
Hi Dean, I have attached a sample of the usaf1951r.txt file, but also included some AWK scripts for generating more such charts. I also found the siemens.txt file, so I included the scripts for generating more of these too. I know you mentioned that you are working on Windows, but with some kind of Windows-Subsystem-for-Linux (WSL) you might be able to run AWK. Otherwise, I'm sure you can try to ask ChatGPT to convert the AWK scripts into Python. Regardless, it is pretty simple to generate these...
Hi, I've been using mtf_generate_rectangle to generate rectangles, but I'd like to generate more complex charts and see usaf1951r.txt mentioned in your blog. However, I cannot find this file in the distribution or on SourceForge and think it would act as a good starting point for my own charts. Can you supply this and the Siemens example? Thanks, Dean. PS I'm working on Windows.
Hi Daniel, Those lensprofile charts are indeed wild! If you still have them, would you mind sending me a sample image of the "bad" lighting orientation? I should be able to use that to improve the sanity checks (involving each slanted-edge measurement) to prevent such disasters in the future. First prize would be if I can generate an appropriate warning, but I cannot promise that just yet. Regards, Frans
Outlandish values were creating huge loops in the lines produced. Could not read the values on the Y axis. Was driving me nuts, but then I tried changing the angle of the light on the chart and...problem solved! The chart I'm using is printed on photopaper and it has a gloss. Get the lighting angle wrong and the lensprofile chart has a fit. Other charts look mostly normal. The chart orientation numbers were all less than 0.10. That doesn't matter if the lighting angle is creating some kind of reflection...I...
Hi Franz, we really missed the additional data on the edge corner in the edge_mtf file. it's straight forward this way. thanks a lot, Lorenzo.
Hi Lorenzo, It is a bit clunky, but the quickest way to obtain the geometric edge orientation is to compute the vector between the "edge centroid" and the "nearby corner" coordinates listed in edge_mtf_values.txt (assuming you ran MTF Mapper with the -q -v 2 options). The non-comment lines in edge_mtf_values.txt and edge_sfr_values.txt match one-to-one, so you can safely join the information across the two files. Then take x=$2 - $5 and y=$3 - $6, where $n represents column number n from edge_mtf_values.txt,...
p.s. we are aware that your code is able to discriminate between sagittal and meridional edges, but also on that we could not understand how it is done. but it could be added to the discussion since honestly, it could possibly be even more useful than horizontal and vertical discrimination. we're providing here one of our test images on which we're trying to compute the mtf. to explain the problem we found that our optical system has some different astigmatism in the two directions. we then use a...
hello, we're using the software for mtf measurement on an SFRplus chart provided by IMATEST. we would need to be able to discriminate between horizontal and vertical edges but we are having a hard time in understanding how to do it from the output data and if it is even possible. Basically we're looking at the "slanted edge orientation" angle and the "edge orientation relative to radial line to centre" angle, as they are called in the output file "edge_sfr_values.txt". about the first one: as far...
added readme for docker, tweaks to container building
basic docker container for arm64, plus a Python watcher/processor
Thank you Frans, I will contact you directly and hope to report back to this discussion! Best greetings Tom
Hi Tom, Yes, there are at least two implementations that I have spun off as closed source that are nearly real time, meaning 3 to 5 frames per second while processing 5 MP images, running on arm64 processors. Since one version belongs to my current employer, and the other was implemented under contract, I am not able to make these available to third parties. I might be able to help you with some scripting to automate the process a little bit; depending on how much processing power you have available,...
Dear Frans, Is there a real time version of MTF mapper that does not require loading files but accepts a WDM or V4L source, or any other real time video signal capture? We are (finally) in the process of internally shimming a series of water corrected underwater optics we developed with Zeiss, and would like to speed up the process which is pretty tedious working on a file by file base... Feel free to reach out off list if appropriate! Many thanks! Tom Kwasnitschka GEOMAR Helmholtz Centre for Ocean...
Hi Frans, Thank you very much for your help. I have now obtained the desired results through fiducial_correspondence.txt! Regarding the issue of chart orientation you mentioned, I am currently testing with an A3-sized chart at 30 cm, and the results appear to be reliable. I plan to use MTF Mapper to test sharpness in the automated testing of a camera's production,I've just started learning about this area, so there's a lot of knowledge I'm still missing. There are some documents where I could use...
Hi Rany, Some answers: 1. When you run mtf_mapper with the --chart-orientation option (I'm referring to command-line operation) it produces a file called fiducial_correspondence.txt which provides both the image space coordinates (in pixels) and the chart space coordinate (in mm) of the circular fiducial targets. The chart space coordinates are simply the expected x and y positions for a given target design, so you can use the contents of fiducial_correspondence.txt to perform any camera calibration...
Dear [Developer/Support Team]: I hope this message finds you well. I am writing to inquire about certain features of MTFMapper and to seek guidance on its compilation under the Windows operating system: 1. Firstly, I am interested in knowing whether MTFMapper can not only generate a marked chart for chart orientation results but also export additional data such as the center distance between two symbols on the chart, along with the Pitch, Roll, and Yaw values, into a text file simultaneously. 2....
Dear [Developer/Support Team]: I hope this message finds you well. I am writing to inquire about certain features of MTFMapper and to seek guidance on its compilation under the Windows operating system: 1. Firstly, I am interested in knowing whether MTFMapper can not only generate a marked chart for chart orientation results but also export additional data such as the center distance between two symbols on the chart, along with the Pitch, Roll, and Yaw values, into a text file simultaneously. Secondly,...
Hi, Sorry for answering this late, I put my project aside for a bit. Thank you so much for answering my message. Even if I am a beginner, I have succeeded to reach my aim thanks to your help. Thank you again for your work. I wish you well
Hi! Yes, this is certainly possible. Let's assume that you have mtf_mapper.exe on your PATH (see this tutorial, and you have a cmd.exe window open (or powershell). Let's also assume you have a file called sample.png (I attached one) in the current directory. Then you can run the command mtf_mapper -v 2 -q sample.png . which will produce an output file called edge_sfr_values.txt in the current directory. This file contains some comments, i.e., lines starting with a "#" symbol, which describe the meaning...
Hi, I'm using MTF Mapper gui and I like the efficiency of the software comparing to other tool ! I would like to make it even more easier for my purpose. I'm analysing a Camera and I'm looking for the resolution at 100lp/mm. With the "User manuals for individual application" I was wondering if it was possible to write a script that can give me this value only by ginving him an Image and the size of the pixel (without looking to all the curve). I know my question will seems basic, but I am a beginner...
Frans, Thank you so much for the explanation. I have recalculated the MTF from the same single edge images using lp/mm for the specific pixel pitch of each sensor (X-H2=3.04, X-H2S=3.76). Now I see an expected result with the higher resolution 40mp sensor showing consistently greater resolving power in terms of actual line pairs.
Hi Jeff, Those results are actually a textbook example of this phenomenon. To explain it briefly consider that the measured system SFR is the product of the target SFR, the lens SFR and the sensor SFR. Your experiments keep the first two terms (target and lens) constant, but changes the sensor SFR. The sensor SFR is usually approximated as |sinc(f)|, which corresponds to a box filter in the spatial domain, roughly modelling a slice through the square shape of the "ideal" photosite (note that I only...
The test images were taken at ~1m which is 4x the 0.28m minimum focus distance for the lens. I understand your point regarding stepper motors increments. I don't think that is the limiting factor here. Both cameras are physically identical and were mounted at a fixed location so the sensor planes should have been exactly the same distance from the subject. Focus confirmation and focus assist highlighting was confirmed on each test.
The test images were taken at ~1m which is 4x the 0.28m minimum focus distance for the lens. I understand your point regarding stepper motors increments. I don't think that is the limiting factor here. Both cameras are physically identical and were mounted at a fixed location so the sensor planes should have been exactly the same distance from the subject.
The lens's stepping motor makes it impossible to nail focus at closer distances without moving the whole camera. So that may be the problem. You could put the camera on an arca swiss rail to help with focus. If you don't already know.
The len's stepping motor makes it impossible to nail focus at closer distances without moving the whole camera. So that may be the problem. If you don't already know.
Test: backlit razor blade, single edge. Same lens used on two different cameras having the same mount and physical sensor size (APS-C). The only difference is a 26 versus 40 megapixel sensor. I am interested if there is a measurable difference in sharpness and resolving power with the higher resolution 40mp sensor. The results are puzzling. The MTF50 (c/p) values are marginally but consistently higher for the lower resolution 26mp sensor. I am not sure how to interpret this result. Does this mean...
Hi Frans, thank you very much for your advice. I had underestimated the impact of focusing. I tried to solve that by using the focus bracket function on my camera body. I also wasn't aware that mtf mapper doesn't do raw processing of x-trans files. I can imagine it would be a lot of extra work. Therefore I decided to my RAW processing in Capture One which I am familiar with. Unfortunately I had no references of how the reviewers did their processing. They only state that they use the Imatest software....
Hi Florian, I think your calculation is in the right ballpark. So keeping in mind that one cycle = one line pair, 1500 lp/ph -> 1500/4160 = 0.3606 lp/ph. Looking at your attached sample crops, I see that your edge lengths are trending to the lower end of the range. Not a problem in itself, but if you are capturing an A4 chart from a large distance it might be (slightly) better to try and print the central A4 part of an A3 chart (on A4 paper) so that the trapezoidal shapes are a bit larger, giving...
Hi Frans, I'm trying to evaluate sharpness of a recently bought Fujinon 150-600 on my X-S10 body. Fujifilm show very good performance at 45 lp/mm on the wide and tele end. Optical limits found an mtf50 of >3000 lw/ph near center 150-600mm wide open. Digital Camera World found >1500 lp/ph (? no axis label, smh) 150-400mm. So the reviews seem to agree. And from what I calculated, this would correspond to 0.33 c/p on my 4160 pixels high sensor, correct? I played around with mtf mapper and an A4 printed...
Thank you so much for your reply Frans! I will reach out directly as soon as I have a scaled down version.
Hi Jeff, Whoops. I hoped that QT would pick up the system properties like font size automatically, e.g., the current Windows font size. But apparently that is not the case. I'll see if I can get this to "work as expected". Thanks for reporting this! Regards, Frans
Hi Theresa, Sorry, but I don't currently have built-in support for generating charts smaller than A4. Note that this only applies to the code that generates the charts. MTF Mapper will accept and process almost any test chart that contains black squares (or trapezoids) on a white background. The lensgrid style chart adds two things: a) the edges of the squares/trapezoids are reasonably well aligned with the tangential and radial directions, while avoiding a few known bad edge orientations (e.g.,...
Hi there, I want to use the MTF targets to evaluate camera parameters for a computer vision setup. The Field of View is quite small. Since I want to evaluate the whole setup as-is, I need a target that is small enough to fit into my field of view. In this case it means, that the size of the target is more like A5 or even a bit smaller. I mainly care for MTF50 (lensgrid chart) at the moment, but the focus will be relevant as well. Now I have the following questions: 1. Is there a way to export the...
Is there a way to increase the size of the mtfmapper application window and display fonts? I've tried increasing scaling on Windows 11 to 200% but that has not effect on the app. I'm having a difficult time reading the fonts especially in the preferences. Thank you.
Is there a way to increase the size of the mtfmapper application window and display fonts? I've tried increasing scaling on Windows 11 to 200% but that has not effect on the app. I'm having a difficult time reading the fonts especially in the preferences. Thank you.
Thank you very much for explanation!
Thanks very much!!!
Thank you very much, that would be great!
Right now the accuracy of the chart orientation estimation is not great outside of the range I tested; in fact it appears to be rather insensitive to rotation at other focal lengths. So unfortunately I cannot even give you a straight answer until I fix the problem, and then test with different lenses. This is a pretty big project, and I don't have as much time to work on MTF Mapper as I used to, so I won't make any promises.
Hmm. I have actually tried this before with 2 A4 prints of a modified lensgrid chart. Although this produced perfectly usable SFR measurements I found that it was too hard to align them accurately enough for the chart orientation feature to work (you actually need sub 0.1 mm accuracy). But I know Bernhard often uses multi-page prints (those are his chart designs). I'll ask him if he would mind if I include his charts with MTF Mapper. You would lose the chart orientation feature, though.
That's actually not a bad idea. Should be straightforward to implement for the 2D/3D plots. I can also see what this will look like with the lens profile since it will probably increase the variance at a give distance. I'll add it to my backlog.
Dear Frans Some time ago I sent you 3 suggestions/questions concerning MTF mapper. I suppose you received them, but as at the time I had no account in SoureceForge and I have just created it, today I sent the 3 emails (slightly rephrased) again. Just in case. Keep up the good work! Best regards. Jerry
Hi Frans, What precision is necessary for chart orientation estimation? Focal lengths given by manufacturers often differ from actual focal length values. For example a typical 50mm lens is really around 52mm (4% difference). In case of some zooms the differencies are even greater. One can also have doubts about the sensor width values. (eg. if sony says that a7 35,8 mm sensor is 6000 pixel wide, than the DCraw 6048 pixel image is 36,08 mm wide. Does a 4 or 5% difference in focal ratio noticeably...
Hi Frans, Most of the users of MTF Mapper cannot print big test charts and are limited to A4 or A3 size, which is OK for perspective charts but rather small for the grid/lensgrid charts. It would be great if you could generate multipage charts, that could be printed in smaller format and carefully mounted (for example using double sided tape) to a flat board. I made myself a set of such charts by cropping the “old” grid chart. The result is adapted to my printer, but may not work on others with different...
It would be very useful to add the option “average” to graphs representing sagittal and meridional values. It is particularly useful in 2D and 3D graphs, as it makes comparing different lenses much easier. lensrentals used to make such graphs: https://www.lensrentals.com/blog/2015/07/24-70-f2-8-zoom-mtf-and-variation/ These graphs are “totally” averaged, as they represent averaged values from many tested lenses. They were published on the-digital-picture website, but unfortunately, just like MTF...
Apolgies for the delayed reply! I don't think you will be completely satisfied by a standard print (A4) if you are testing at such a large magnification. If I may suggest a rule-of-thumb, you want at least 8 printer dots per image sensor pixel. In other words, if you have a full-frame sensor, say a Nikon D850 with 8256 pixels per row, then you want your field of view to cover at least 8 * 8256 = 66048 printed dots. At a normal laser printer resolution of 1200 dots per inch, that is a print 55 inches...
Hi Fred! I hope you are doing well. I have just started using MTF Mapper in order to determine the resolution of my imaging system. I use a Cmos camera and a zoom lens objective with different extension tubes foe magnification. If I use a zoom lens set to 110mm and an extension tube length of 10cm how can I try to resize the chart so that most of it can be imaged as now I am only able to see a single edge and it's blurry too... I used lengrid A4 for now... how to resize so that I see most of it and...
I am using an NVIDIA Quadro T1000 GPU, but I am running this through a Windows VM so that is limiting my video memory to 256MB. Base memory is 32GB, and 8GB for the VM. It would be interesting to see if the issue is exclusive the VM or if it affects base Windows as well. My host system has built-in IT restrictions on installing 3rd party software, otherwise I wouldn't bother with the VM.
Hi Steve, This is indeed curious. I just tried your JPEG image on Linux (will test on Windows 10 a bit later), and the orientation was just fine. What kind of GPU / graphics card are you using? The window component in MTF Mapper that displays the image (and scroll bars) uses OpenGL, so there may be some weird OpenGL issue at work here. But I have not seen this before! Regards, Frans
Hello Frans, I am encountering a strange issue with the GUI (version 0.7.38 running on Windows 10). When I upload any image it shows up as flipped upside-down. And if I zoom in on the image move the slider bar down (towards the bottom of the screen), the image will pan in the opposite sense (i.e. it scrolls up to see the top of the image). I have tried uploading multiple different images using multiple different filetypes (.png, .jpg, .tiff) with the same result each time. Do you know what is going...
allow an LSF to have a peak away from the centre of the edge, but only if
Arch Linux with gcc 13.1.1 and cmake 3.26.3.
Thanks, this seems to work well! I've committed these changes to the repo. Regards, Frans
fixed some logger compiler warnings
extract Olympus fine tune adjust value
removed outdated -std=c++11 flag
That's interesting! Which OS / platform ? But I can see how this clashes with the later c++ standard specification in the cmake file, so I've removed the -std=c++11 flag. Thanks for reporting this!
The AF Fine Tune value for Olympus can be extracted by adding this line to extract_af_tune() in src/gui/exiv2_property.cc: case OLYMPUS: return extract_property(QString("Exif.OlympusCs.AFFineTuneAdj")).section(" ", 0, 0); The exif tag contains three values and this code extracts only the first one. Not sure if it works the same way for all cameras and lenses, but on my E-M1 II, the first value is the value in use for the current image based on the lens and zoom focal length. The second value is the...
I was getting an error trying to build the latest with GCC. The problem is in CMakeLists.txt here: if(CMAKE_COMPILER_IS_GNUCXX) message(STATUS "Using a g++ compiler variant --- additional compiler warnings turned on") add_definitions(-Wall -W -Wno-unused-local-typedefs -std=c++11) endif(CMAKE_COMPILER_IS_GNUCXX) Removing -std=c++11 fixes it.
some safeguards to prevent under/over-run
... and the rest of the attachments.
Ok, great! I think using PGM is a decent workaround --- just keep in mind that MTF Mapper will assume that 8-bit images without any ICC profile are encoded with the sRGB TRC (which is usually the right choice), so that is why you still need the "linear gamma" flag. Conversely, 16-bit images without ICC profiles are assumed to be linear; this behaviour is mostly backwards compatibility with the original behaviour dating more than 10 years back now! Another pitfall that I encountered recently is that...
Thanks very much Frans, I saw the option for linear gamma in the MTFMapper GUI, but from the check box text I assumed it only applied to 8 bit images. The image actually comes from what is essentially an industrial camera, so the source image doesn't have any color profile information. It must get added somewhere down the line, possibly when I cropped it in Gimp. I've now tried saving it without a color profile, but PNG seems surprisingly stubborn in hanging onto gamma (which always seems to be 0.4545)....
Hi Larry, I took a quick look, and your SFR actually looks pretty good: a sharp lens that is focused well! I think the root cause of the differences is the ICC Tone Response Curve (TRC) embedded in your PNG file. MTF Mapper identifies this as a 16-bit file with an ICC 'curv' type TRC, meaning the 16-bit integers in the PNG file are not a linear function of light intensity. Early on in the MTF Mapper processing pipeline it will use the ICC TRC to linearize the input data before performing any SFR...
Hi Frans, I’m trying out MTFMapper on a single ROI image crop (attached) and getting results that differ considerably from what I obtain with sfrmat. The MTF estimates at Nyquist (90.91 lp/mm) are: MTFMapper: ~30% sfrmat5: ~19% sfrmat3: ~21% I also tried a couple of tools which gave different results again: Mitre SFR 1.4.2: ~24% ImageJ: ~10% The target is approximately at best focus (~2m distant). There is noticeable FPN, and the target was just taped (not glued) onto a board, so you can see some...
Hi Frans, Thanks for the detailed response and the patch file, that is super helpful Harry
Hi Harry, To address your question "Do you know what the ROI size along the edge is at the moment?": Most ESF samplers (including the default --esf-sampler piecewise-quadratic) do not have an explicit ROI limitation as measured along the edge, but --esf-sampler line limited to 400 pixels. But I assume you are asking about the automatic ROIs that apply to trapezoids. Those are definitely tuned for "typical photographic conditions", so they are likely to be too wide (meaning reach too close to adjoining...
Hi Frans, Yes I was thinking about collimated illumination before. I was worried about accidentally decreasing the effective f-number though, since the lens is f/1.8 and it is macro photography. Thanks so much for sending that patch through!! I'm glad that it also halves the sample spacing, that is perfect: I was struggling with the samples being too far apart before, and I always ended up studying the lowest sample. That is a good point about the overlapping ROIs - I will keep a lookout for that....
Hi Harry, (follow up to my previous post) I found some older synthetic images that I generated with great care to ensure that wider ROIs would be free from contamination, i.e., these were single-edge images so there could be no opposing or adjacent edges. The attached plot shows the difference between the expected analytical SFR of the synthetic image, and the measurement obtained with MTF Mapper at various ROI widths. I notice that there are some pretty wild errors (0.003!) after 0.5 cycles/pixel...
Hi Harry, That contrast-enhanced image is pretty scary! It is a bit hard to gauge the target size from the photo of the set-up, but would a collimator help to reduce the impact of the reflections? Anyhow, I played around with the MTF Mapper source code to see what it would take to support a wider ROI around each edge. I have attached the patch file that you can apply to the source code (or you could just manually edit the source as indicated in the patch file). If you can build from source, which...
Hi Frans, Thanks so much for your response! You are right - I increased the contrast of the raw image using ImageJ (see attached). It looks like there are some back reflections going on. The test target is chrome on glass so the backs of the squares are quite reflective. I'm guessing that the sharp edges are internal reflections due to the thickness of the glass target, and the splodges are reflections from the polished surface of the diffuser. What a nightmare! Looks like I am going to re-think...
Hi Harry, Thanks for the raw image! A few quick answers: 1. MTF Mapper no longer uses the Tukey window; in fact, MTF Mapper does not use any windowing at all, but it does try to taper off the LSF tails using smoothing. Still not perfect for really wide LSFs, but less biased than Tukey windowing at really low frequencies. 2. I've had a look at the dodgy edges with the contrast > 1 at low frequencies. I don't have a good explanation of why I am seeing this, but it appears that your white background...
By the way the image is saved as a 16 bit png where only the first 12 bits are used. It does work with MTF mapper though
Hi Frans, Thanks for the detailed response! I have attached the image. It sounds plausible that truncation of the long tail of an asymmetric LSF on one side could be the cause of this effect. Out of interest, is the Tukey window still applied in the current version of MTF mapper, as described here - http://mtfmapper.blogspot.com/2015/06/improved-apodization-and-bias-correction.html ? Also, I read in the manual that the window is a total of 32 pixels wide, but I guess that may have been an old version...
Hi Harry, It seems counter intuitive, but it is actually harder to measure the SFR accurately at low frequencies. One of the challenges is that the line spread function (LSF) can be quite wide under certain circumstances, e.g, a very defocused edge, or perhaps coma as you mentioned. For practical reasons, MTF Mapper uses a window of only -28 to +28 pixels wide as measured normal to the edge, which means that very wide LSFs can be truncated, leading to an increase in the SFR at low frequencies. To...
Hi Frans, I have noticed that the contrast goes above 1 at the lowest sample (1/64 c/p) for a subset of the edges in my image. This is always accompanied by a set of ripples in the MTF curve (see attached screenshots). I was wondering if you could give me some clues about why this might be happening. My current theory is that it is related to the way mtf_mapper handles the phase of the OTF. My reasons for this are: * Only off-axis field points are affected (where there is singificant coma) * Only...
Hi Frans, Attached is a file with a ColorProfile as well as an Exif subIFD. The metadata and contents were created programmatically . (My use case for your tool at the moment is perhaps a little unusual - I am playing around with synthetic files to try to better understand the visual impact of different MTF50 values). The current version of MTF_Mapper fails to recognize the ColorProfile - I believe because of code snippet I cited in my my original post. AFAIK. the top level IFD can lead to another...
Hi Warren, Thanks for the debugging and the code snippet! Could you please send me a test file to fvdbergh@gmail.com ? I don't have access to my usual set of test images right now, but I'll try to integrate your suggested changes within the next week or so. Regards, Frans
Hi Frans, Thanks for this fantastic tool! There is a minor glitch in tiffsniff.cc which causes processing for the ColorProfile tag (34675) to be skipped if the metadata also contains an Exif tag (34665). Once the Exif IFD is processed, the code looks to begin processing the next IFD. It should instead return to resume processing the remaining tags in the original IFD. A suggestion might be to wrap a conditional around the code segment near the bottom of tiffsniff to something like: // read next IDF...