Activity for Frans van den Bergh

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Ryan, I think the absolute minimum number of fiducials that must be visible is 5 (not counting the two central markers), if I remember correctly. But with only 5 fiducials you are unlikely to have a good estimate of the lens radial distortion parameters, so this might only work with lenses with very low distortion. I would say a reasonable number is around 10, but again this depends on their distribution across the image; measuring pitch or yaw accurately depends on having fiducials near the edges...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Thanks for sharing these results, they are pretty compelling! If you need to do something like this in the future, just add the --debug flag to your MTF Mapper command. This will dump some text that you can scrape, the focus offset is somewhere near the end of the output. I can share a few interesting insights: 1. I have worked with Zemax models of lenses to see what the relationship between the focus distance (camera to target) and back focus distance (lens to sensor) is. For one specific lens,...

  • Frans van den Bergh Frans van den Bergh committed [r726] on Code

    discard potential fiducials that touch the image edge

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Ryan, Interestingly, the failure is caused by one of the fiducials that has been cut in half by the framing. I have marked the culprit on your sample image. I just used GIMP to remove the offending fiducial, and then the chart orientation feature of MTF Mapper works as expected (see other attachment). I was not even aware of this failure mode, but the particular fiducial (the one I marked in red) is interpreted as "code 0", which is the code usually reserved for the two black fiducials (with the...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Gray-Box, It sounds like you already have solutions to some of your questions, but I'll try to address them: * Adding a way to fix the scale for chromatic aberration or the 2D grid plots via the GUI is possible, and something that would not take a huge amount of work, so I might consider it; * I don't have access to any cameras to produce pixel-shifted images, so I'm hesitant to implement any corrections. But remember that pixel shifting increases the sample density only, it does not alter the...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Fizz, You are already on the right track: what you are observing, namely that the results improve when you move further away from the test chart, is what I would expect if print quality was a limiting factor. To answer your questions: 1. Slanted-edge measurements are the product of three parts: MTF_measured = MTF_target * MTF_lens * MTF_sensor. At some point your chart magnification is low enough that the MTF_target part no longer has a measurable impact. If you start with a very high quality...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Pryzet, Here's a quick follow-up to illustrate what I meant by looking for shifts in the 3D surface consisting of the (x, y) pixel coordinates and the corresponding MTF50 measured at that location. Note that MTF Mapper "slides" a small window along the long edges of the black bar targets, thus computing many MTF50 values along each long edge, producing the 3D dataset like the 0raw_points.txt I shared yesterday. I have attached the script (thanks ChatGPT) that is a minimal implementation of what...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Pryzet, There are quite a few potential factors that could affect stability. For now, let's focus (pardon the pun) only on the RGB results: 1. The MTF Mapper test chart orientation estimation is not perfect, partly because a regular camera calibration requires multiple poses of the planar calibration target in order to estimate the lens intrinsic parameters, in particular focal length and radial distortion, but MTF Mapper has to do the same job with only a single target pose. In addition to that,...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Jonathan, The MTF Mapper GUI is not really well suited to a workflow that requires combining multiple result sets from multiple images into a single output. Keep in mind that the GUI is really calling the command-line MTF Mapper in the background. I know that other MTF Mapper users have performed analyses like you are interested in, e.g., you capture a sequence of through-focus images and then extract the best result from each part of the field to build a composite result. This requires some scripting,...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Yes, MTF Mapper will directly process raw Bayer images. You can start with a raw camera file such as a .NEF or .CR2, and the MTFM GUI will call dcraw (or libraw) to render the image to a grayscale Bayer-mosaic Tiff file. This only happens when you set the Bayer channel option in the settings, and you'll see an icon next to the filename in the MTFM results list to indicate what type of channel interpretation was used (RGB, single channel grayscale, or Bayer red, green or blue). If you are using the...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hmm. I don't want to go into too many details regarding SE_MTF since I have never looked at the code myself. But I do suspect that SE_MTF may not handle edge orientations larger than 5 degrees correctly; the earlier versions of the ISO 12233 standard simply required the edge to be at roughly 5 degrees, and many implementations just assume you stick to those parameters. It is entirely possible to use most other edge orientation angles with some minor changes to the algorithm. So that could explain...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi again, Hugo! Try mtf_generate_rectangle.exe -m 1.0 -n 0 -o sharp.png in the directory where mtf_mapper.exe lives. For converting between c/p and lp/mm, I use c * (1000 / p) where c is the c/p value and p is the sensor pitch in micron, e.g., 0.442 * (1000 / 5.97) = 74.04 lp/mm, which is close enough to your value to show your formula is correct (exact dimensions of the sensor and number of pixels explain the remaining differences). There are a great number of details that affect the accuracy of...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Hugo! Please send the file to fvdbergh@gmail.com, and I will take a look when my travels are over. But to get back to the cycles/pixel issue, I really did mean one cycle fits into a pixel. If you had a perfect lens then the sensor will simply capture a 50% gray value ... but that is only for a very literal interpretation of 1.0 cycle per pixel. If you look at the slanted-edge method then the SFR is just the contrast as a function of spatial frequency, and we have now chosen to represent spatial...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    one line pair is a black line and a white line; this can also be interpreted as one cycle, if you place two line pairs next to each other, then the distance from the middle of the first black line to the middle of the second black line is one cycle, however, this is the same distance as yhe width of a black line and a white line together. In other words, a line pair is the same thing as a cycle. when we measure in line pairs per mm, we are talking about physical line pairs as the lens would project...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Hugo, The best source for the pixel pitch is the sensor datasheet if you know the sensor model number. Next best is if the camera manufacturer posts this number, or perhaps a reputable review site. The least accurate method is to calculate it yourself, mostly because you cannot assume that the sensor dimensions are exactly equal to the nominal format size. Having said that, if you do not have an accurate pitch number, then any approximation is reasonable, meaning that a small error in your calculated...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Hugo, Apologies for the delay, I'm travelling so my responses may be a bit spotty. I think we have to sort out the different units first. Imatest is reporting cycles per pixel, which are very different from the line pairs per mm you are reporting on via MTF Mapper. In MTF Mapper you can just change the units in the settings (untick lp/mm units). For the lp/mm units to function correctly you also need to set the pixel pitch correctly (I think it should be 5.97 micron for the D610). But for comparing...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Glad to hear you have resolved the discrepancies! Feel free to ask more questions if you have any. Regards, Frans

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Balazs, The quick-and-dirty solution is to do the following: mtf_mapper --chart-orientation DSC_1972.tiff out --debug --logfile test.log and then look in test.log for the line that looks like this: Tait-Bryan angles: 0.424339 45.626967 0.734844 where the angles are listed in roll-yaw-pitch order. You have to remember to pass the --debug flag. I should warn you, though, that I have received reports of inaccurate chart orientation estimates. I only tested over a small range of distances, and it...

  • Frans van den Bergh Frans van den Bergh committed [r725] on Code

    fixed up polygon output for generate_rectangle

  • Frans van den Bergh Frans van den Bergh committed [r724] on Code

    1. switched svg page over to using floating point coordinates

  • Frans van den Bergh Frans van den Bergh committed [r723] on Code

    added multi-pattern slide target type

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hmm, I plotted the full SFR curve for your initial image lowvalue.png, as well as an edge from 350mm.png that also happens to have an MTF50 value of 0.08. You can see that the SFR curves are very similar until the contrast drops below 0.1, so it is not surprising that the MTF50 values are similar. By the way, you can get more precision out of MTF Mapper if you process the outputs with a script, but I don't know if you will necessarily get improved accuracy. Is the difference between 0.075 and 0.08...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Ok, I also see values of about 0.24 cycles/pixel in 150mm.png. Not sure if you still have a question, or if I have answered it already?

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    I quickly ran MTF Mapper on the image you provided above (not ideal, but I also got 0.08, so it should be representative), and extracted the attached Edge Spread Function. A sharp edge should rise from black to white over a very short distance, perhaps a distance on the order of 1 pixel or less. From the ESF extracted from your image the rise distance looks to be about 8 pixels, so the edge really does appear to be quite blurry. The SFR curve has a "bounce" in it, which suggests that the lens was...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh committed [r722] on Code

    version bump

  • Frans van den Bergh Frans van den Bergh committed [r721] on Code

    improved Imatest chart cropping to handle trimodal histograms

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh modified a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh modified a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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,...

  • Frans van den Bergh Frans van den Bergh committed [r720] on Code

    added readme for docker, tweaks to container building

  • Frans van den Bergh Frans van den Bergh committed [r719] on Code

    basic docker container for arm64, plus a Python watcher/processor

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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,...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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.,...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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.

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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.

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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.

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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

  • Frans van den Bergh Frans van den Bergh committed [r718] on Code

    allow an LSF to have a peak away from the centre of the edge, but only if

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Thanks, this seems to work well! I've committed these changes to the repo. Regards, Frans

  • Frans van den Bergh Frans van den Bergh committed [r717] on Code

    fixed some logger compiler warnings

  • Frans van den Bergh Frans van den Bergh committed [r716] on Code

    extract Olympus fine tune adjust value

  • Frans van den Bergh Frans van den Bergh committed [r715] on Code

    removed outdated -std=c++11 flag

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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!

  • Frans van den Bergh Frans van den Bergh committed [r714] on Code

    some safeguards to prevent under/over-run

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    ... and the rest of the attachments.

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    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

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Harry, Thanks for point this out! I guess for a simple ideal square pixel with a reduced fill factor I can still update the MTF curve formula. I did not even know that people were using these formulas :) Regards, Frans

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Jeff! MTF Mapper also supports LibRaw's dcraw_emu and unprocessed_raw executables. In the MTF Mapper GUI, Settings->Preferences under the "Helpers" tab you can select which raw processor you would like to use in the "Raw developer" drop-down list. I cannot quite recall at which version in added LibRaw, but if you've installed a new MTF Mapper version over an older install it is quite likely that it would stick to using dcraw until you tell it otherwise; for fresh installations (new machine fresh)...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    I had another look at the MTF Mapper output, specifically the LSF profile (see attachment). You appear to be using a linear intensity scale ("linear light"), so you should definitely enable the "Linear gamma (8 bit)" setting in the Preferences dialog. In the attached LSF plots the blue curve represents the default sRGB TRC that MTF Mapper assumes for 8-bit images (this is more typical for any camera capture), and the green curve is the LSF with the "linear gamma" setting enabled. Note how the green...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Dominic, For the single edge image you provided please use the "File->open single edge image" menu option. You could also use "File->Open with manual edge selection" if you want to process such an edge image without having to crop it out of a larger image first. A few other observations: 1. The SFR of your edge image looks suspiciously Gaussian. I'm guessing this is a synthetic image? 2. The histogram of your image is effectively clipping at both the dark and bright ends. This could cause problems...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hey Rodrigo, I just built MTF Mapper in an Ubuntu 22.04 docker container, and I got very similar error messages when building with make -j8, however a normal make seemed to work just fine. I probably have some poorly configured dependency in the documentation section of my cmake build file ... (I've updated the .deb, should work on 22.04 now)

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hey Rodrigo, Sorry, I have not seen that specific error before. LaTeX installations can be quite complex ... Anyhow, the quick solution is to not build the documentation. Just run your make -j8 command from within the build/bin directory instead of the build directory to skip the docs. The documentation / help in the GUI is not likely to work when building from source in any case (requires some additional directories to be passed to cmake). I'll see if I can build and release a new .deb for 22.0...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Well that sounds frustrating! I'd be happy to help you obtain better results. Some preliminary observations: 1. I would not recommend covering the chart with any material that is likely to produce specular reflections, such as glass or plastic lamination. Such reflective surfaces are prone to producing nonuniform illumination, which are inevitably going to make it harder to obtain good results. 2. Keep in mind that lens profiles produced by MTF Mapper are rarely going to look like those published...

  • Frans van den Bergh Frans van den Bergh committed [r713]

  • Frans van den Bergh Frans van den Bergh committed [r712]

    completion of "--allow-partial" feature: improved handling of vertical/horizontal edges at the image boundary

  • Frans van den Bergh Frans van den Bergh committed [r711]

    added an option to invert the input image before proceeding with processing

  • Frans van den Bergh Frans van den Bergh committed [r710]

    optionally allow partial targets (cut by image bounds) to be processed

  • Frans van den Bergh Frans van den Bergh committed [r709]

    store geometric edge length (corner-to-corner) in edge info

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Zoe, Apologies for the late reply! Some additional information that would help: * what type of target were you using ("lensgrid") * resolution of the camera you were using Some likely reasons for the "insufficient targets detected" error would be: * small target size: If I assume you are using a lensgrid-style chart that you are capturing in the usual way (camera lens axis perpendicular to the test chart), then you can check the size of the black trapezoid targets using PhotoShop or GIMP or even...

  • Frans van den Bergh Frans van den Bergh committed [r708]

    version bump

  • Frans van den Bergh Frans van den Bergh committed [r707]

    added option to override default behaviour of restricting CA to tangential edges

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi, Some feedback: 1. Yes, this chart will work, but the "chart orientation" measurement feature in MTF Mapper may no longer work as expected. The position of those circular fiducial patterns are hard-coded into both the code that generates the chart, and in the MTF Mapper code that interprets the fiducials. I did notice, however, that you appear to have discarded some of the fiducials, and MTF Mapper recognised the fiducial sequence, so maybe you did not move the fiducials, but just clipped the...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Jeff, Yes, this is certainly possible. Going onto my TODO list. Regards, Frans

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Jeff, Thanks for reporting this! I'll take a look to see what's going on here. Regards, Frans

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Denis, As promised, I put together my old AWK scripts into a new Python script: here, also attached to this post. I have not tested it to death, so please let me know if you run into any unexpected issues. The script supports the full OpenCV radial model (both polynomial, division, and rational models if you like). It is important to note that my script performs the inverse distortion such that if you take the rendered image, you should apply the coefficients you passed to the script to undistort...

  • Frans van den Bergh Frans van den Bergh modified a comment on discussion General Discussion

    Hi Denis, I checked, and I agree that those images are not already available on sourceforge. When I started looking for them, I realised that they have most likely been lost; they were stored on another server that died two years ago, and I don't seem to have any backups. I did generate them with mtf_generate_rectangle, but with the help of some additional scripts (written in AWK, it seems). As you may already know, mtf_generate_rectangle can render user-defined input polygon geometry. What I did...

  • Frans van den Bergh Frans van den Bergh modified a comment on discussion General Discussion

    Hi Denis, I checked, and I agree that those images are not already available on sourceforge. When I started looking for them, I realised that they have most likely been lost; they were stored on another server that died two years ago, and I don't seem to have any backups. I did generate them with mtf_generate_rectangle, but with the help of some additional scripts (written in AWK, it seems). As you may already know, mtf_generate_rectangle can render user-defined input polygon geometry. What I did...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Denis, I checked, and I agree that those images are not already available on sourceforge. When I started looking for them, I realised that they have most likely been lost; they were stored on another server that died two years ago, and I don't seem to have any backups. I did generate them with mtf_generate_rectangle, but with the help of some additional scripts (written in AWK, it seems). As you may already know, mtf_generate_rectangle can render user-defined input polygon geometry. What I did...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi, The short explanation is that overexposure, specifically when you saturate the white background of the test chart, introduces a non-linearity in the edge spread function (ESF). This starts out as a subtle influence, but by the time you have significant saturation the ESF is visibly affected on the bright side of the edge. This saturation tends to truncate the "round" shoulder of the ESF, causing it to become a sharper transition, which in turn increases the measured MTF artificially. I have the...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Joe, I think got most of what you are doing, I just want to make sure I understand all the details. 1. You are capturing an image of a 45-degree MTF Mapper test chart 2. You have a stepper motor that adjust the focus position of your lens 3. Using the peak of the "profile" plot as an estimate "best sharpness", you determine the position, in pixels, of the focus distance (or focus depth) Do you have a separate camera calibration process that helps you to convert the focus depth value from pixels...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi David, You have uncovered the truth: without the "-v 2" argument, the edge centroids do not have a very predictable association with nearby corner coordinates :) I had made the decision to only use the new (fixed) corner / edge centroid association when the "-v 2" argument is present, with the intention of preserving backwards compatibility. However, I am beginning to think that this was a bad idea, and that I should make the -v 2 corner / centroid behaviour the default behaviour going forward....

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Andy, Both of those curves look "plausible", so it is not easy for me to say whether you should enable the "linear gamma" option from that alone (sometimes the difference is more pronounced). You could look at the ESF curves to see if the blue curve is more symmetrical around the midpoint than the green curve, especially when you look at the knee / shoulder points in the ESF curves. One other thing that I see from your SFR plot is that your CNR values are a bit low (which is why they are flagged...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Andy, In my experience, most computer vision cameras tend to capture linear data, so my guess would be that you will have to use MTF Mapper's "linear gamma" option. It can be hard to determine the encoding (e.g., linear vs gamma 2.2) just from the image metadata because PNG files are not required to contain ICC profiles. The best way to confirm whether the camera outputs a linear encoding is to capture an image of something like a QA-62 target, like this one, and then measuring the OECF directly....

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Andy, Both the manual ROI selection image and the annotated output image are enhanced for display purposes, but this does not affect the slanted-edge analysis. Internally, MTF Mapper always performs measurements on linear-encoded data. I will define a few processes, and then show examples of how they are used: histogram stretch: the 2nd and 98th percentiles of the histogram are linearly mapped to 0 and 255 in output scale. TRC-to-linear: input encoding is transformed from (usually non-linear)...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Wayne, Thanks for reporting this. I use Qt's homePath() method (https://doc.qt.io/qt-5/qdir.html#homePath to open the file dialog, starting in what is hopefully the user's home directory. I see in the documentation that this will attempt to scan C:\ under certain conditions, which might be what is happening in your case. I'll see if I can add some additional checks to prevent MTF Mapper from scanning C:. But keep in mind that if you are running MTF Mapper from a non-administrator account, then...

  • Frans van den Bergh Frans van den Bergh posted a comment on discussion General Discussion

    Hi Jeff, Thank you very much for letting me know about this. This file (demo_plugin.dll) does not appear to be necessary for gnuplot to function correctly. I have removed it from my build for future MTF Mapper Windows binaries. As for safety: please note that I do not build gnuplot from source myself for inclusion in MTF Mapper. The Windows build of gnuplot that I include was produced by Dr. Tatsuro Matsuoka. I see that the link to Dr. Matsuoka's download page is now broken (see http://www.gnuplot.info/download.html]....

  • Frans van den Bergh Frans van den Bergh committed [r706]

    version bump

  • Frans van den Bergh Frans van den Bergh committed [r705]

    fixed a bug in --checkerboard component inflation

  • Frans van den Bergh Frans van den Bergh committed [r704]

    1. fixed a bug in the read-noise units when using realistic sensor noise simulation

  • Frans van den Bergh Frans van den Bergh committed [r703]

    upgraded ESF/LSF outputs in -v 2 mode to include coordinates and sample spacing

1 >