Login or Create Account

Using SFRplus Part 2

Running Imatest SFRplus

   My Account  |  Cart Contents  |  Checkout   
Running SFRplus Rescharts SFRplus SFRplus settings windows Parameters & setup window Settings & options window Gamma Warnings SFRplus summary
See Also
Using SFRplus 1: Preparing and photographing Using SFRplus 3: Results SFRplus Tour Lens testing with Imatest Sharpness: What is it and how is it measured? Using Imatest
Related
Understanding image sharpness: introduction

Running SFRplus

Imatest SFRplus performs highly automated measurements of several key image quality factors using a specially-designed test chart. This document shows how to run SFRplus inside Rescharts and how to save settings for automated runs. Part 1 introduced SFRplus and explained how to obtain and photograph the chart. Part 3 illustrates the results.

Open Imatest by double-clicking the Imatest icon  on

After several seconds, the Imatest main window opens. Then click on Rescharts or SFRplus  on the upper left.

SFRplus operates in two modes.

Use Rescharts to initiate an interactive/setup SFRplus run. This allows you to examine detailed results interactively to to save settings for the highly automated SFRplus  runs. Rescharts should be run at least once prior to the first SFRplus run.

SFRplus modes

File portion of Rescharts wndowRescharts SFRplus

Selecting file(s)

The portion of the Rescharts window used for opening files is shown on the right. You can open a file by clicking on Read image file if the correct chart type is displayed, or by selecting a Chart type. One or more files may be selected, as shown below. If you select multiple files, they will be combined (averaged), and you'll be given the option of saving the combined file.

If the folder contains meaningless camera-generated file names such as IMG_3734.jpg, IMG_3735.jpg, etc., you can change them to meaningful names that include focal length, aperture, etc., with the View/Rename Files utility, which takes advantage of EXIF data stored in each file.

The folder saved from the previous run appears in the Look in: box on the top. You are free to change it. You can open a single file by simply double-clicking on it. You can select multiple files for combined runs (in Imatest Master) by the usual Windows techniques: control-click to add a file; shift-click to select a block of files. Then click Open. Three image files for the Canon 17-40mm L lens are highlighted. Large files can take several seconds to load. Batch (sequential) runs are not supported in Rescharts

Imagest SFR: Open slanted-edge input file dialog box
File selection

Multiple file selection Several files can be selected in Imatest Master using standard Windows techniques (shift-click or control-click). The files are combined to reduce noise and (in some instances) observe the effects of camera shake or image stabilization. The multi-image dialog box gives you the option of saving the combined file, which will have the same name as the first selected file with _comb_n appended, where n is the number of files combined. Batch mode, which allows several files to be analyzed in sequence, is not supported by Rescharts

RAW files  Starting with Imatest Master 2.7 (February 2008) Imatest SFR can analyze Bayer raw files: standard files (TIFF, etc.) that contain undemosaiced data. RAW files are not very useful for measuring MTF because the pixel spacing in each image planes is twice that of the image as a whole; hence MTF is lower than for demosaiced files. But Chromatic aberration can be severely distorted by demosaicing, and is best measured in Bayer RAW files (and corrected during RAW conversion). Details of RAW files can be found here.

SFRplus settings windows

SFRplus parameters & setup window

Shortly after the file (or files) have been selected the SFRplus parameters & setup window, shown below, appears. This window allows you to select groups of regions (ROIs) for analysis, shown as violet rectangles. It also lets you select  the size of the regions, whether to analyze vertical or horizontal edges, and change several additional settings. Pressing the Settings & options button on the left opens the SFRplus Settings & options window, which allows you to select additional settings that affect the calculations, display, and output (for automated SFRplus runs). The light yellow-orange rectangles are for calculating the Color/lightness uniformity profiles.

SFR parameters & setup window
SFRplus parameters & setup window; 9 regions selected for analysis

SFRplus parameters & setup window controls Settings
Settings area
Gamma Assumed Gamma (contrast) of the chart. Has a small effect on the MTF results. Default is 0.5.
Channel Select channel to analyze: R, G, B, Y, R-only, G-only, B-only, Y-only. (Y is Luminance channel). Use one channel only where other channels are dark and may not contain valid data.
Chart contrast
(for gamma calc.)
Chart contrast-- for the contrasty squares (i.e., most of them). Used to estimate gamma from the image.
Use for MTF (Checkbox, normally unchecked) When checked, use the gamma derived from the chart for the MTF calculation. This may result in a small improvement in accuracy.
Display options Open the SFRplus settings & options window, shown below.
ROI selection area
Region (center, etc)
(Selects which regions
to locate. Actual ROIs
are located automatically)
Select the regions (ROIs) to analyze. Choices below. The number of regions is in parentheses. This is a particularly important setting. We encourage users to become familiar with each of the settings below.
Center (1).
Center & corners (5).
Center, corners, part-way (9) (Part-way is on diagonal between center & corners). This setting is often a good compromise between speed and detail.
Center, L, R, T, B (9).
Center, corners, part-way, L, R, T, B (13).
Maximum regions (23) (edges on a 5x5 grid, omitting the squares above and below the center). Highly detailed results.
Vertical, Horizontal edges Chooses between Vertical and Horizontal edges. Usually Vertical, but Horizontal is useful on occasion..
ROI size Slider that determines the size of the ROI. Use the largest value that keeps a save distance from edges of squares and top and bottom bars. May have to be reduced where distortion is severe.
ROI width
(below ROI size slider)
Width of ROI selection. Normal width for the standard rectangular ROI. Choose Wider or Widest for enhanced noise analysis.
Other controls
Title Title. Defaults to file name. You can add a description.
Help Open this web page in a web browser.
Image setting Selects image channel for display: Original (RGB) image, Red, Green, or Blue channels
Save settings Save settings (for use in auto SFRplus), but do not continue with run.
OK Save settings and continue with run: Calculate results for all selected region. You will be able to view results interactively.
Cancel Cancel run; do not save settings

After you've finished making settings, click OK to save settings and continue with the run. You can Click Save settings to save the settings without continuing.

SFRplus settings & options window

The SFRplus settings & options window, shown below, opens when Display options in the parameters & setup window is pressed. The settings are read from the rescharts.ini file, and saved to both imatest.ini and rescharts.ini when OK is pressed. Settings are similar to the settings in the SFR input dialog box.

SFRplus settings & options window
SFRplus settings & options window

This window is divided into sections: Title and Help on top, then Plot and save, Display options, Settings, Optional parameters, and finally, OK or Cancel.

Title defaults to the input file name. You may leave it unchanged, replace it, or add descriptive information for the camera, lens, converter settings, etc.— as you please.

Help opens a browser window containing a web page describing the module. The browser window sometimes opens behind other windows; you may need to check if it doesn't pop right up.

Plot and save (for SFRplus Master auto/API only; NOT for Rescharts).  

This area selects figures to plot and save as well as a number of data save settings. It only applies to the automatic version of SFRplus in Imatest Master — it is not for Rescharts.

The leftmost checkboxes in this section select figures to plot and save. Note that all plotted figures are saved. Saved figures, CSV, and XML files are given names that consist of a root file name (which defaults to the image file name) with a suffix added. Examples:

Canon_17-40_24_f8_C1_1409_YR7_cpp.png
Canon_17-40_24_f8_C1_1409_YR7_MTF.csv

Close figures after save should be checked if a large number of figures is to be displayed. It prevents a buildup of figures, which can slow processing.

A CSV summary file is saved for all runs. An XML file is saved if Save XML results is checked.

You can select either Save CSV files for individual ROIs or Save summary CSV file only (the summary file is always saved).

Save folder determines where to store results. It can be set either to subfolder Results of the image folder or to a folder of your choice.


Display options (to the right of Plot) contains settings that affect the plot display.

MTF plots (individual and summary) selects the spatial frequency scale for MTF plots for for the summary plot. Cycles/pixel (C/P), Cycles/mm (lp/mm), Cycles/inch (lp/in), Line Widths per Picture Height (LW/PH), and Line Pairs per Picture Height (LP/PH) are the choices. (Note that one cycle is the same as one line pair or two line widths.) If you select Cycles per inch or Cycles/mm, you must enter a number for the pixel size— either in pixels per inch, pixels per mm, or microns per pixel. For more detail on pixel size, see the box below.

Maximum MTF plot frequency selects the maximum display frequency for MTF plots. The default is 2x Nyquist (1 cycle/pixel). This works well for high quality digital cameras, not for imaging systems where the edge is spread over several pixels. In such cases, a lower maximum frequency produces a more readable plot.  1x Nyquist (0.5 cycle/pixel), 0.5x Nyquist (0.25 cycle/pixel), and 0.2x Nyquist (0.1 cycle/pixel) are available.

Chart contrast  For a medium or low contrast charts (contrast <= 40; not recommended with the old ISO 12233 chart), you can enter the chart contrast (or Off). If the ROI is large enough, the actual (measured) gamma will be calculated and displayed along with the contrast factor (the chart contrast multiplier = measured gamma/nominal gamma, where nominal gamma is entered in the Settings area, described below). If the Use for MTF box just to the right is checked, this value will be used in the MTF calculation, which may result in a modest improvement in accuracy.

Secondary readout input dialog boxSecondary readout controls the secondary readout display in MTF plots. The primary readout is MTF50 (the half-contrast spatial frequency); the secondary readout has several options. It defaults to MTF30 (the spatial frequency where MTF is 30%).

Clicking Change opens the window shown on the right. Secondary readout settings are saved between runs. Choices:

  • The upper radio button (MTF) selects MTFnn, the spatial frequency where MTF is nn% of its low frequency value.
  • The middle radio button selects MTFnnP, the spatial frequency where MTF is nn% of its peak value: useful with strongly oversharpened edges.
  • The lower radio button (MTF @ ) selects MTF @ nn units, where nn is a spatial frequency in units of Cycles/pixel, LP/mm, or LP/in. If you select this button, the pixel spacing should be specified in the Cycles per... line in the Plot section of the input dialog box, shown above. A reminder message is displayed if the pixel spacing has been omitted.

Edge plot selects the contents of the upper (edge) plot. The edge can be cropped (default) or the entire edge can be displayed. Three displays are available.

  1. Edge profile (linear) is the edge profile with gamma-encoding removed. The values in this plot are proportional to light intensity. This is the default display.
  2. Line spread function (LSF) is the derivative of the linear edge profile. MTF is the fast fourier transform (FFT) of the LSF. When LSF is selected, LSF variance (σ2), which is proportional to the DxO blur unit, is displayed.
  3. Edge pixel profile is proportional to the edge profile in pixels, which includes the effects of gamma encoding.

Settings affect the calculations as well as the display.

Gamma is used to linearize the input data, i.e., to remove the gamma encoding applied in the camera or RAW converter. It defaults to 0.5 = 1/2, which is typical of digital cameras, but is affected by camera or RAW converter contrast settings. It should be set to 0.45 when RAW images are read into Imatest (to be converted by dcraw), but there is little loss in accuracy if it is left at 0.5. If is is set to less than 0.3 or greater than 0.8, the background will be changed to pink to indicate an unusual (possibly erroneous) selection.

Since SFR sharpness measurements are moderately sensitive to the Gamma setting (a 10% error in gamma results in a 2.5% error in MTF50 for a normal contrast target), it's a good idea to run Colorcheck or Stepchart to determine the correct value of Gamma. A nominal value of gamma should be entered, even if the value of gamma derived from the chart (described above) is used to calculate MTF.

Gamma
Gamma is the exponent of the equation that relates image pixel level to luminance. For a monitor or print,
Output luminance = (pixel level)gamma_display
When the raw output of the image sensor, which is linear, is converted to image file pixels for a standard color space, the approximate inverse of the above operation is applied.
pixel level = (RAW pixel level)gamma_camera ~= exposuregamma_camera
The total system gamma is gamma_display * gamma_camera.  Standard values of display gamma are 1.8 for older color spaces used in the Macintosh and 2.2 for color spaces used in Windows, such as sRGB (the default) and Adobe RGB (1998).

In practice, gamma is equivalent to contrast. More detail on gamma can be found in SFR Instructions, part 2.

Channel is normally left at it's default value of Y for the luminance channel, where Y = 0.3*R + 0.59*G + 0.11*B. In rare instances the R, G, and B color channels might be of interest.

Reset restores the settings in Options and Settings to their default values.


Additional parameters (all optional) for Excel .CSV output  contains a detailed description of the camera, lens, and test conditions. EXIF data is entered, if available, but can be overridden by manual settings. Description & settings is particularly useful for annotating the test system (it is displayed in MTF Compare).These settings are optional but can be useful when several tests are run for different lenses, focal lengths, apertures, or other settings. The settings are displayed next to the MTF plots. They are saved and reused in subsequent runs for files with the same pixel dimensions. If EXIF data is available (currently, only in JPEG files) it overrides the saved settings. The Reset button clears all entries.

ISO standard SFR  If this checkbox is checked, SFR calculations are performed according to the ISO 12233 standard, and the y-axis is labeled SFR (MTF) (ISO standard). This method is slightly less accurate than the normal Imatest calculation, which incorporates a number of refinements, including a better edge detection algorithm and a second-order polynomial fit to the average edge for a more accurate estimate of SFR in the presence of lens distortion. This box is normally left unchecked; it should only be used for comparing normal Imatest calculations to the ISO standard. The difference is typically very small.


When entries are complete, click OK to return control to the SFRplus settings & options window. When all entries are complete, click either Save settings, OK, or Cancel. Save settings saves the settings for use in automated SFRplus runs, which can be initiated from the SFRplus button in the main Imatest window. OK saves the settings then calculates results for interactive viewing. A sequence of Calculating... boxes appear to let you know how calculations are proceeding. When calculations are complete, results are displayed interactively in the Rescharts window, as shown below.

Warnings

A Clipping warning is issued if more than 0.5% of the pixels are clipped (saturated), i.e., if dark pixels reach level 0 or light pixels reach the maximum level (255 for bit depth = 8). This warning is emphasized if more than 5% of the pixels are clipped. Clipping reduces the accuracy of SFR results. It makes measured sharpness better than reality.

The percentage of clipped pixels is not a reliable index of the severity of clipping or of the measurement error. For example, it is possible to just barely clip a large portion of the image with little loss of accuracy. The plot on the right illustrates relatively severe clipping, indicated by the sharp "shoulder" on the black line (the edge without standardized sharpening). The sharp corner makes the MTF look better than reality. The absence of a sharp corner may indicate that there is little MTF error.


Clipping warnings

Clipping can usually be avoided with a correct exposure-- neither too dark nor light. A low contrast target is recommended for reducing the likelihood of clipping: it increases exposure latitude and reduces the sensitivity of the MTF results to errors in estimating gamma.


SFRplus summary

Next: Using SFRplus Part 3: Results

Pixel size

Pixel size has an important relationship to image quality. For very small pixels, noise, dynamic range and low light performance suffer. Pixel size is rarely given in spec sheets: it usually takes some math to find it. If the sensor type and the number of horizontal and vertical pixels (H and V) are available, you can find pixel size from the table on the right and the following equations.
    pixel size in mm = (diagonal in mm) / sqrt(H2 + V2)
    pixel size in microns = 1000 (diagonal in mm) / sqrt(H2 + V2)
Pixel size in microns (microns per pixel) can be entered directly into the SFR input dialog box. Example, the cute little 5 megapixel Panasonic Lumix DMC-TZ1 has a 1/2.5 inch sensor and a maximum resolution of 2560x1980 pixels. Guessing that the diagonal is 7 mm, pixel size is 2.1875 (rounded, 2.2) microns.You can find detailed sensor specifications in pages from Sony, Panasonic, and Kodak.
Sensor
Designation

(Type)
Diagonal
mm.
Width
mm.
Height
mm.
1/4" 4.5    
1/3.6" 5.0 4.0 3.0
1/3.2" 5.68 4.54 3.42
1/3" 6.0 4.8 3.6
1/2.7" 6.59 5.27 3.96
1/2.5" 6.9 - 7.2    
1/2" 8.0 6.4 4.8
1/1.8" 8.93 - 9.1 7.18 5.32
2/3" 11.0 8.8 6.6
1" 16.0 12.8 9.6
4/3" 22.5 18.0 13.5
35mm 44.3 24.0 36.0