Documentation – Previous v5.2

Using Uniformity-Interactive

Current Documentation

All documentation versions

Interactive measurement of vignetting and sensor nonuniformity

Uniformity-Interactive measures image nonuniformity, which can be caused by the lens, the sensor, and the lighting— the same parameters measured by Uniformity— in an interactive interface that can be updated in near-realtime. For example, it can measure evenness of flash illumination (using light bounced off a white wall) or the uniformity of flatbed scanners. In Imatest Master, Uniformity can also display a pixel level histogram, analyses of hot and dead pixels and color shading, a grid plot, and a detailed image of fine nonuniformities (i.e., sensor noise). These features are described in Uniformity instructions: Imatest Master.

The instructions below largely duplicate the Uniformity instructions.

*Note* As of Imatest 5.0, image acquisition capabilities can now be found in Imatest Master. Previously these capabilities were in Imatest IS which has been discontinued. 

 

Instructions

Image preparation

  • Set your camera or lens to manual focus and focus it at infinity (the worst case for light falloff).
  • Blankscreen modlue

    Screen Pattern module for Light Falloff.

    Photograph an evenly illuminated uniform subject.

  • One of the simplest ways to obtain a uniform subject is to photograph your computer monitor at a distance of 1-3 inches (2-8 cm) using the Imatest Screen Patterns module, shown on the right. Click on Screen Patterns on the right of the Imatest main window, then maximize the screen. You can adjust the Hue, Saturation, and Lightness (H, S, and L, which default to 0,0,1) if required. (Thanks to Jonathan Sachs for this suggestion.)

    This method works best with flat screen LCDs with wide viewing angles (not so well with laptops).

  • For extreme wide angle lenses or laptop screens with a limited viewing angle, an additional diffuser should be used. We recommend using opal diffusing glass mounted close to the lens. Opal glass is available in the US from Edmund Optics. (Thanks to Bart van der Wolf for the suggestion.) If a diffuser is used, a lightbox may be substituted for the monitor. (Lightboxes are typically brighter but less uniform.)
  • CRTs are not recommended because their raster scan tends to make exposures less uniform.
  • (We prefer the LCD monitor, but this approach may work in come cases.) Photograph an evenly-lit smooth matte sheet (white or gray). Be careful not to shade it. Outdoors illumination (shade) sometimes provides very even illumination. Getting uniform illumination can be a challenge with ultrawide lenses; it’s almost impossible to avoid shading part of the card. Opal diffusing glass is strongly recommended.
  • The subject does not need to be in focus (you don’t even need a lens to measure sensor uniformity); the goal is to measure lens light falloff and/or sensor uniformity, not features of the subject. For typical measurements, set exposure compensation to overexpose by about one f-stop. (You may, however, use any exposure you choose.)
  • Save the image as a RAW file or maximum quality JPEG.
ITI_lightbox_front

To obtain even illumination

We recommend the ITI LED LIghtbox, which features excellent illumination uniformity (97%), dimming over a range of 300:1, selectable color temperature (typically 3100 and 5100K), and can be used with Imatest Dynamic Range and other transmissive charts. Imatest lightboxes are compared here.

The GLX-16 Lightbox Viewer is an good choice when extreme evenness and illumination control are not required.

The most even illumination can be obtained with an integrating sphere from a supplier such as Image Engineering, Labsphere, or Electro-Optical Industries (EOI). Integrating spheres are much more expensive than LED lightboxes.

The DSC Labs Ambi Illuminator also provides extremely even illumination from a variety of external light sources. It is excellent for illuminating transparencies. Also of interest: DNP Light boxes.

 

Running Uniformity-Interactive

Start Imatest and click on Uniformity Interactive. This opens a dialog box that asks for input image file(s).

Very large files (height x width x colors over 40 MB) may cause memory overflow problems. (We recommend that you use a 64-bit operating system with 8+GB RAM to minimize this issue.) Files over 40 or 80 MB can be automatically reduced 1/2x linearly (using 1/4 the memory). Click Settings, Options II (in the Imatest main window) and make the appropriate setting in LARGE FILES (Uniformity, Blemish…).

Multiple file selection Several files can be selected in Imatest Master using standard Windows techniques (shift-click or control-click). This allows you to combine (average) several files. (Batch mode is not available in Uniformity-Interactive.)
Combined (averaged) files are useful for measuring fixed-pattern noise (at least 8 identical images captured at low ISO speed are recommended). The combined file can be saved. Its name will be the same as the first selected file with _comb_n appended, where n is the number of files combined.
The input dialog box for the first run is the same as for standard non-batch runs. Additional runs use the same settings. Since no user input is required they can run extremely fast.
One caution: Imatest can slow dramatically when more than about twenty figures are open. For this reason we recommend checking the Close figures after save checkbox, and saving the results. This allows a large number of image files to be run in batch mode without danger of bogging down the computer.

Four cropping (ROI selection) options are available by clicking Options I: ROIs… in the Imatest main window. The second option (Select crop by dragging cursor. Ask to repeat crop for same sized image), which is similar to the ROI selection in SFR, is typically preferred.

1. Use “Enable Crop pixels near border” in Settings box (Don’t ask to crop.)
2. Select crop (ROI) by dragging cursor. Ask to repeat crop for same sized image [default].
3. Select crop by dragging cursor. Do not ask to repeat crop.
4. Automatically select crop for image surrounded by a dark boundary.

After the input file has been read, the Uniformity-Interactive window, showing the most recently displayed results, is displayed.

Uniformity Interactive window showing contours

Uniformity-Interactive main window, showing pixel contours
(identical to the first figure of Uniformity)

Results are displayed using the previous (saved in imatest.ini) settings, in this case the pixel contour plot with unnormalized contours superposed on the image.

Uniformity controls

  • Read Image file reads an image, then performs calculations and displays results.
  • Display dropdown menu selects the results to display.
    • In Imatest Master the following selections are available: Original image, Pixel contours, F-stop contours, Color shading, Color profiles, Histograms, Fine detail, Grid plot.
    • In Imatest Studio the following selections are available: Original image, Pixel contours, F-stop contours.
  • Primary display settings (below Display) lets you select the most impportant settings for the selected display, for example how to normalize the results, whether to display a pseudocolor plot. Additional settings are available by pressing More Settings, immediately to the right.
  • More Settings opens the Uniformity dialog box (similar to the Light Falloff dialog box), shown below. This contains advanced settings not shown in the Primary display settings dropdown menu.
  • Uniformity datatip

    Zoom/Rotate 3D/Data Cursor
    selects the action when you click on the image. Zoom zooms in on the image. It zooms out when you shift-click or double-click. Rotate 3D is used to rotate 3D images (2D images are zoomed). Data Cursor opens a tiny window called a Datatip that displays values of the image or curve. Right-click on the Datatip to remove it or access additional options.

  • Reload reloads the image. Most valuable for Image Acquisition, which allows images to be read directly from devices like manufacturer’s evaluation boards.
  • Save screen Saves and optionally displays the Uniformity window.
  • Save data Saves results in CSV and/or XML files. Opens the Save dialog box.
  • Help opens this web page. (Others are available in the Help dropdown window on the top toolbar.)
  • Exit exits the Uniformity window.

Uniformity-Interactive settings window

This dialog box appears when you answer Yes (not Express mode) when reading an image or when you press the More Settings button.

uniformity_interactive_settings
Uniformity Interactive settings dialog box for Imatest Master

  • Title Defaults to the file name. You can change it if you wish.
  • Expert/Simplified modes Simplified mode grays out advanced selections that may not be needed by beginners.
  • Standard settings selects commonly-used settings: good choices for beginners.

Contour plot display options Eight display options are available. 3D plots are available in Imatest 3.4+. Normalized refers to the Pixel contour display only. These settings are in Primary display settings dropdown menu of the main Uniformity window.

Contours superposed on image (not normalized)
Contours superposed on image (normalized to 1)
Pseudocolor with colorbar (not normalized)
Pseudocolor with colorbar (normalized to 1)
3D pseudocolor w/colorbar (not normalized)
3D pseudocolor w/colorbar (normalized to 1)
3D pseudocolor shaded w/colorbar (not normalized)
3D pseudocolor shaded w/colorbar (normalized to 1)
  • Scaling options Contour plot scaling (Auto/Manual, etc.) sets the scaling for the Pixel contour display.
Auto or manual scaling: Press Set with Scaling. Scaling set by Scaling button.
Scaling: 0 – 1 or 255: -4 – 0 f-stops Fixed scaling: 0 – 1 or 255 for Luminance pixel plot; -4 – 0 f-stops for f-stop plot.
Scaling (min – max) Fully automatic scaling.
  • Scaling button: Opens the dialog box shown on the right. Lets you select manual or automatic scaling for the two contour plots. Minimum and Maximum set the scale when Auto scaling is unchecked.

Color shading, Color uniformity profiles, and Fine detail displays only apply to Imatest Master. We describe them briefly.

Contour plot scaling window
Manual scaling for contour plots
  • Color shading display: Select Red/Blue, Red/Green, Green/Blue, or any of several variants of Delta-E and Delta-C (76 (i.e., plain), 94, and 2000). These settings are in Primary display settings dropdown menu of the main Uniformity window.
  • Display type: Exaggerated color, Pseudocolor, and 3D options.
  • Pixels (gamma-encoded), Intensity (linear— using gamma), and f-stop difference.

Color uniformity profiles Choose between several different normalizations or R, G, B, and Y, R/G and B/G, or Delta-L*, a*, b*, and C*. These settings are in Primary display settings dropdown menu of the main Uniformity window.

Fine detail display Choose between exaggerated local noise with or without contour lines, pseudocolor contours, spot detection (which includes nonlinear processing), or several 3D plots.

Settings area

  • Gamma (Settings area). The default value of gamma, 0.5, is typical for digital cameras. Gamma affects the second figure (the light falloff measured in f-stops); it has no effect on the first figure. Gamma can be measured by Stepchart using any one of several widely-available step charts. (Reflection charts are easiest to use but transmission charts can also be used to measure dynamic range.) Some issues in calculating gamma are discussed below the second figure.
  • Corner and side regions (default 32x32 pixels) allows you to select the areas at the corners and sides of the images to be analyzed. These affect the numeric readouts below the plots (example: Corners: worst = …). Choices include 10x10 pixels, 32x32 pixels, 1% (min. 10x10), 2% (min. 10x10), 5%, and 10%.
  • Crop pixels near borders (L, R, T, B) (Settings area). Available only if Don’t ask to crop. (Use Crop … borders settings in LF input dialog box.) is selected in the Options I in the Imatest main window. If checked, the image is cropped by the number of pixels indicated near the left, right, top, and bottom borders.

The following options are not available in Imatest Studio. They are discussed in detail in Light Falloff instructions: Imatest Master.

  • Channel (Settings area) You can choose between Red, Blue, Green, and Y (luminance) channel
  • Hot and dead pixels (Settings area) By checking the appropriate boxes you can display hot pixels (red x) and/or dead pixels (blue •). Hot pixels are stuck at or near the sensor’s maximum value (255 in 8-bit files) and dead pixels are stuck at or near 0. You can choose between hot/dhead pixel detection in any channel, all channels or the selected channel.

Hot & dead pixel dialog area

Because signal processing— especially JPEG compression— can cause these values to shift, you can use the sliders to set the detection threshold between 6-255 for hot pixels and 0-249 pixels for dead pixels. (The extreme values are for measurements made on white or black fields.) Clicking on < or > at the ends of the sliders adjusts the threshold by 1. The default values are 252 and 4, respectively. Settings are saved between runs. JPEG files must be saved at the highest quality level for this feature to work; isolated hot and dead pixels tend to be smudged at lower quality levels. Details are described in Light Falloff: Imatest Master .

  • (Plot area) Color shading displays color nonuniformity. Several options are available. Display Histogram displays histograms of R, G, and B channels. Display color uniformity profiles displays R, G, and B values (or ratios— several options available) along the diagonals and horizontal and vertical center lines. Display fine detail displays a detailed figure of noise and sensor uniformity with an option for spot detection.. The calculation can be slow and uses lots of memory. Details in Light Falloff: Imatest Master .

Results

Luminance contour plot

shows normalized pixel level contours for the image file luminance channel, where luminance is defined as Y = 0.30*R + 0.59*G + 0.11*B.. A maximum value of 1 corresponds to pixel level = 255 for image files with a bit depth of 8 or 65535 for a bit depth of 16. Some illumination nonuniformity is evident in the plot: the top is brighter than the bottom. The image is smoothed (lowpass filtered) before the contours are plotted.

Luminance (relative pixel level) contour plot

The text displays the maximum normalized pixel level for the luminance channel, the worst and mean corner values (in normalized pixel levels and as a percentage of maximum), and the side values. Selected EXIF data is shown on the right. Two hot and two dead pixels (which were simulated) were detected with thresholds of 246 and 10 (pixels), respectively. The crop (Left, Right, Top, Bottom) is shown just below. Details below. Picture Window Pro Light Falloff transformation dialog boxThe setting for correcting light falloff in the Picture Window Pro Light falloff transformation is also given. The PW pro Light Falloff dialog box is shown on the right. Film Size (mm) remains at 36 (the PW Pro default value: the width of a 35mm frame). Picture Window Pro is the powerful and affordable photographic image editor that I use for my own work. The Lens Focal Length is rarely the exact focal length of the lens. Light falloff depends on the lens aperture (f-stop) as well as a number of lens design parameters. Lenses designed designed for digital cameras, where the rays emerging from the rear of the lens remain nearly normal (perpendicular) to the sensor surface, tend to have reduced light falloff. For aesthetic purposes I generally recommend undercorrecting the image, i.e., using a larger Lens Focal Length. This makes the edges somewhat darker, which is usually pleasing. Ansel Adams routinely burned (darkened) the edges of his prints. Part of the reason was that he had to compensate for light falloff from his enlarger (when he wasn’t contact printing).

“My experience indicates that practically every print requires some burning of the edges, especially prints that are to be mounted on a white card, as the flare from the card tends to weaken visually the tonality of the adjacent areas. Edge burning must never be overdone…”

Ansel Adams, “The Print,” p. 66. 1966 edition.

f-stop contour plot

shows image file luminance contours, measured in f-stops, normalized to a maximum value of 0. A pseudocolor display with color bar has been selected. The colors in the color bar are fixed: colors always vary from white at 0 f-stops to black at -4 f-stops and darker. For this plot to be accurate, a correct estimate of gamma (the camera’s intrinsic contrast) is required. Gamma is measured by Stepchart, using any one of several widely-available step charts, or by Colorcheck.

F-stop contour plot in pseudocolor (normalized)

Gamma can be tricky to measure for several reasons. (1) Many cameras have complex response curves, for example, “S”-curves superposed atop gamma curves. This means that gamma can vary with brightness. (2) Some cameras employ adaptive signal processing in their RAW conversion algorithms. This increases contrast (i.e., gamma) for low contrast subjects and decreases it for contrasty subjects. This improves image quality for a wide range of scenes, but makes measurements difficult, especially since Light Falloff targets have the lowest possible contrast.

Both contour plots are available as 3D plots (Master-only). The following 3D plot is unnormalized and shaded.

3D contour plot

3D shaded pseudocolor F-stop contour plot (unnormalized)

Deriving f-stop falloff

The f-stop falloff in the second plot is derived from the equations,

Pixel level = k1 luminanceγ ; Luminance = k2 pixel level1/γ and

F-stop loss = log2(luminance ratio) = 3.322 log10(luminance ratio)

where luminance ratio is the ratio of the maximum luminance to the luminance in the area of interest, for example, the mean value of the corners.

Example: The first and second figures, above, are derived from the same image file. In the first figure, the mean pixel level at the corners relative to the center is 0.666/0.905 = 0.736 (73.6%). Since γ is assumed to be 0.5 (fairly typical of encoding gamma of digital cameras, the exposure at the corners relative to the center is 0.7361/γ = 0 .7362 = 0.5416. The corresponding f-stop loss = log2(0.5416) = 3.322 log10(0.5416) = -0.885 f-stops. There is a slight discrepancy with the second figure, which calculates the mean at the corners (0.894 f-stops) after taking the logarithm to convert results into f-stops.

Additional results are illustrated in Light Falloff: Imatest Master .

.CSV and XML output files

The .CSV output file contains additional statistics. Most have obvious meanings.

  • Image pixels contains the width, height, and total size in pixels. Hot and Dead pixels show the total count and the fraction (divided to total pixels)
  • The x and y coordinates of the hot and dead pixels are listed. The maximum is 100. Coordinates are in pixels from the top-left.

Contact Imatest if you need additional .CSV output.The optional XML output file contains results similar to the .CSV file. Its contents are largely self-explanatory. It is stored in [root name].xml. XML output will be used for extensions to Imatest, such as databases, to be written by Imatest and third parties. Contact us if you have questions or suggestions.

Saving results

When you press Save data the dialog box shown on the right is opened. It allows you to select which results to save (CSV or XML files) where to save it. The default is subdirectory Results in the data file directory. You can change to another existing directory, but new results directories must be created outside of Imatest— using a utility such as Windows Explorer. (This is a limitation of this version of Matlab.) The selections are saved. CSV and XML data are saved in files whose names consist of a root file name with a suffix for plot type and channel (R, G, B, or Y) and extension. Example: IMG_9875_ISO1600_RGB_f-stop_ctrG.png. The root file name defaults to the image file name, but can be changed using the Results root file name box. Be sure to press enter. After you click on Yes or No, the Imatest main window reappears.

The CSV and XML files contain EXIF data, which is image metadata that contains important camera, lens, and exposure settings. By default, Imatest uses a small program, jhead.exe, which works only with JPEG files, to read EXIF data. To read detailed EXIF data from all image file formats, we recommend downloading, installing, and selecting Phil Harvey’s ExifTool, as described here.

Links

Vignetting by Paul van Walree, who has excellent descriptions of several of the lens (Seidel) aberrations and other causes of optical degradation.