Main Content

esfrChart

Imatest edge spatial frequency response (eSFR) test chart

Description

An esfrChart object stores the positions and measurements of regions of interest (ROIs) of Imatest® edge spatial frequency response (eSFR) test charts [1], [2].

The esfrChart object supports the Enhanced and Extended versions of the eSFR test chart. These test charts are based on the ISO 12233:2014 standard test chart, and they have extra visual features such as color ROIs and additional slanted edge ROIs. The esfrChart object also accepts versions of the Enhanced and Extended eSFR test charts with additional background wedges.

Creation

Description

chart = esfrChart(A) creates an esfrChart object from an image of a test chart, A. The esfrChart object performs automatic detection of the chart position and style.

example

chart = esfrChart(A,'Sensitivity',s) creates an esfrChart object using sensitivity s during the automatic chart detection.

example

chart = esfrChart(A,'RegistrationPoints',p) creates an esfrChart object by specifying the position, p, of registration points.

chart = esfrChart(___,Name,Value) refines the automatic chart detection using one or more name-value arguments.

Input Arguments

expand all

Test chart image, specified as an m-by-n-by-3 numeric array representing an RGB image or an m-by-n numeric matrix representing a grayscale image. This argument sets the Image property.

If you specify a grayscale image, then the esfrChart object simulates a color image by replicating the pixel intensity values across the three color channels. In this case, color measurements returned by the measureColor function are meaningless.

Data Types: single | double | uint8 | uint16

Sensitivity of chart detection, specified as a numeric scalar in the range [0, 1]. If you set a high sensitivity value, then the esfrChart object detects more points of interest with which to register the test chart image.

Data Types: single | double

Position of registration points used to orient the image, specified as a 4-by-2 numeric matrix. The four rows correspond to the top-left, top-right, bottom-right, and bottom-left registration points, respectively. The two columns represent pixel coordinates in [x, y] format. This argument sets the RegistrationPoints property.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'Style','Extended'

Style of test chart, specified as 'Enhanced', 'Extended', 'WedgeEnhanced', or 'WedgeExtended'. If you do not specify a chart style, then by default the esfrChart object estimates the chart style based on the number and position of points of interest. This argument sets the Style property.

Data Types: char | string

Camera parameters used to compensate for distortion, specified as a cameraParameters (Computer Vision Toolbox) object. Use of this argument requires Computer Vision Toolbox™.

Refine the position of slanted edge ROIs, specified as a numeric or logical 1 (true) or 0 (false).

The esfrChart object first performs an initial estimate of ROI positions with respect to the registration points, RegistrationPoints. When you specify 'RefinePoints' as true, the object then refines the slanted edge ROI positions using localized information about the image content. When false, the object does not refine the slanted edge ROI positions.

Properties

expand all

Test chart image, specified as an m-by-n-by-3 numeric array.

Data Types: single | double | uint8 | uint16

Position and intensity values of slanted edges, specified as a 60-by-1 vector of structures. Each element in the vector corresponds to one ROI and contains these fields:

FieldDescription
ROIA 1-by-4 vector specifying the spatial extent of the ROI. The vector has the form [X Y Width Height]. X and Y are the coordinates of the top-left corner of the ROI. Width and Height are the width and height of the ROI, in pixels. ROI is of data type double.
ROIIntensityArray of intensity values within the ROI, in RGB format. The array has dimensions Height-by-Width-by-3. The data type of ROIIntensity matches the data type of the Image property.

The esfrChart object excludes some slanted edge ROIs in the 'Enhanced' and 'WedgeEnhanced' style test charts.

  • When the chart style is 'Enhanced', the esfrChart object excludes four ROIs, with indices 1, 19, 41, and 59.

  • When the chart style is 'Enhanced', the esfrChart object excludes twelve ROIs, with indices 1, 2, 4, 18, 19, 20, 41, 42, 44, 58, 59, and 60.

For the excluded ROIs, the value of the ROI field is [NaN NaN NaN NaN] and the value of the ROIIntensity field is an empty array, [].

Position and intensity values of gray patches, specified as a 20-by-1 vector of structures. Each element in the vector corresponds to one ROI and contains these fields:

FieldDescription
ROIA 1-by-4 vector specifying the spatial extent of the ROI. The vector has the form [X Y Width Height]. X and Y are the coordinates of the top-left corner of the ROI. Width and Height are the width and height of the ROI, in pixels. ROI is of data type double.
ROIIntensityArray of intensity values within the ROI, in RGB format. The array has dimensions Height-by-Width-by-3. The data type of ROIIntensity matches the data type of the Image property.

Position and intensity values of color patches, specified as a 16-by-1 vector of structures. Each element in the vector corresponds to one ROI and contains these fields:

FieldDescription
ROIA 1-by-4 vector specifying the spatial extent of the ROI. The vector has the form [X Y Width Height]. X and Y are the coordinates of the top-left corner of the ROI. Width and Height are the width and height of the ROI, in pixels. ROI is of data type double.
ROIIntensityArray of intensity values within the ROI, in RGB format. The array has dimensions Height-by-Width-by-3. The data type of ROIIntensity matches the data type of the Image property.

Position of registration points used to orient the image, specified as a 4-by-2 numeric matrix. The four rows correspond to the top-left, top-right, bottom-right, and bottom-left registration points, respectively. The two columns represent pixel coordinates in [x, y] format.

Data Types: double

Reference values of gray ROIs in the CIE 1976 L*a*b* color space, specified as a 20-by-3 numeric matrix. The three columns contain the L*, a*, and b* values of the gray patches, respectively. The rows contain the reference intensities of the 20 gray ROIs, in the same sequential order.

Note

The esfrChart object includes default CIE 1976 L*a*b* values for the gray ROIs. However, the actual reference values can vary depending on several factors, such as print quality.

Data Types: double

Reference values of color ROIs in the CIE 1976 L*a*b* color space, specified as a 16-by-3 numeric matrix. The three columns contain the L*, a*, and b* values of the color patches, respectively. The rows contain the reference intensities of the 16 color ROIs, in the same sequential order.

Note

The esfrChart object includes default CIE 1976 L*a*b* values for the color ROIs. However, the actual reference values can vary depending on several factors, such as print quality. Accurate reference color values result in more faithful color reproduction measurements.

Data Types: double

Style of test chart, specified as 'Enhanced', 'Extended', 'WedgeEnhanced', or 'WedgeExtended'.

Object Functions

measureSharpnessMeasure spatial frequency response using Imatest eSFR chart
measureChromaticAberrationMeasure chromatic aberration at slanted edges using Imatest eSFR chart
measureNoiseMeasure noise using Imatest eSFR chart
measureColorMeasure color reproduction using test chart
measureIlluminantMeasure scene illuminant using test chart
displayChartDisplay test chart with overlaid regions of interest

Examples

collapse all

Read an image of an eSFR chart into the workspace. Display the image.

I = imread('eSFRTestImage.jpg');
figure
imshow(I)
title('Captured Image of eSFR Chart')
text(size(I,2),size(I,1)+15, ...
    ['Chart courtesy of Imatest',char(174)],'FontSize',10,'HorizontalAlignment','right');

Figure contains an axes object. The axes object with title Captured Image of eSFR Chart contains 2 objects of type image, text.

Linearize the image. The displayed chart will appear darker because the image no longer has gamma correction.

I_lin = rgb2lin(I);

Create an esfrChart object using the linearized chart image. Specify the sensitivity that the esfrChart model uses to detect the points with which to register the chart image.

chart = esfrChart(I_lin,'Sensitivity',0.6)
chart = 
  esfrChart with properties:

                 Image: [1836x3084x3 uint8]
       SlantedEdgeROIs: [60x1 struct]
              GrayROIs: [20x1 struct]
             ColorROIs: [16x1 struct]
    RegistrationPoints: [4x2 double]
                 Style: 'Extended'
      ReferenceGrayLab: [20x3 double]
     ReferenceColorLab: [16x3 double]

Display the imported eSFR chart. Regions of interest (ROI) are highlighted and labeled.

displayChart(chart)

Figure eSFR test chart contains an axes object. The axes object contains 97 objects of type image, text.

The chart is imported correctly. All 60 slanted edge ROIs (labeled with green numbers) are visible and centered on appropriate edges. 20 gray patch ROIs (labeled in red) and 16 color patch ROIs (labeled in white) are visible and are contained within the boundary of each patch.

Create an esfrChart object by specifying the coordinates of the four registration points. Registration points are located at the center of the black-and-white checkered circles.

Read an image of an eSFR chart into the workspace.

I = imread('eSFRTestImage.jpg');

Display the image and configure it to collect four registration points.

figure
imshow(I)
[X, Y] = ginput(4);

Click the registration points in this order: top-left, top-right, bottom-right, bottom-left.

Create an esfrChart object, specifying the four registration points. Display the imported eSFR chart. Regions of interest are highlighted and labeled. The registration points appear in red.

chart = esfrChart(I,'RegistrationPoints',[X, Y]);
displayChart(chart);

Tips

  • For accurate and reliable results, acquire an image of the test chart according to standard specifications outlined in the ISO standard and by the manufacturer [2], [3]. As a simple guideline, align the chart horizontally on a light background. Cover over 90% of the field of view with the chart, but ensure that the top and bottom edges of the chart are still visible. For reliable measurements, set the minimum image width to at least 500 pixels.

  • You can capture an image of the Extended eSFR test chart at the full 16:9 aspect ratio, or at an aspect ratio of 3:2 or 4:3, as specified on the chart.

  • To ensure that the chart is properly imported, visually verify the test chart image using the displayChart function.

Compatibility Considerations

expand all

Behavior changed in R2021a

References

[2] Using eSFR ISO Part 1. URL: https://www.imatest.com/docs/esfriso_instructions.

[3] ISO 12233:2014. "Photography – Electronic still picture imaging – Resolution and spatial frequency responses." International Organization for Standardization; ISO/TC 42 Photography. URL: https://www.iso.org/standard/59419.html.

Introduced in R2017b