This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Measure chromatic aberration at slanted edges using Imatest® eSFR chart


aberrationTable = measureChromaticAberration(chart)
aberrationTable = measureChromaticAberration(chart,Name,Value)



aberrationTable = measureChromaticAberration(chart) measures the chromatic aberration at all slanted edge regions of interest (ROIs) of an Imatest® eSFR chart.

aberrationTable = measureChromaticAberration(chart,Name,Value) measures the chromatic aberration with additional parameters to specify a subset of ROIs to measure.


collapse all

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

I = imread('eSFRTestImage.jpg');
I_lin = rgb2lin(I);

Create an esfrChart object using the linearized chart image, then display the chart with ROI annotations. The 60 slanted edge ROIs are labeled with green numbers.

chart = esfrChart(I_lin);

Measure the chromatic aberration in all slanted edge ROIs. Examine the contents of the returned table, chTable, for a single ROI.

chTable = measureChromaticAberration(chart);
ROIIndex = 3;
ans=1x5 table
    ROI    aberration    percentAberration     edgeProfile     normalizedEdgeProfile
    ___    __________    _________________    _____________    _____________________

    3      1.8214        0.1415               [348x4 table]    [348x4 table]        

Plot the normalized intensity for that ROI. Store the normalized edge profile in a separate variable, edgeProfile, for clarity.

edgeProfile = chTable.normalizedEdgeProfile{ROIIndex}
edgeProfile=348x4 table
    normalizedEdgeProfile_R    normalizedEdgeProfile_G    normalizedEdgeProfile_B    normalizedEdgeProfile_Y
    _______________________    _______________________    _______________________    _______________________

     -0.0019159                -0.0052604                   0.0018654                 -0.0050984            
     0.00064307                 0.0016012                    0.007665                  0.0018985            
      0.0047292                  0.004937                   -0.010688                  0.0051152            
     -0.0063185                -0.0071078                  -0.0043257                 -0.0069145            
     9.8248e-05                0.00028167                   0.0034132                -0.00040942            
      0.0040778                 0.0039764                    0.010264                  0.0040204            
      0.0054102                 0.0076711                  -0.0095022                    0.00755            
     -0.0083363                -0.0079699                  0.00031015                 -0.0079333            
      0.0038055                 0.0017068                 -0.00096097                  0.0021258            
    -0.00026496                -0.0023867                    0.006826                 -0.0018463            
      0.0024255                 0.0025396                  -0.0099785                  0.0026976            
     -0.0099311                -0.0093365                  0.00078869                 -0.0093403            
      0.0025726                 0.0043935                  -0.0016773                  0.0038921            
     0.00064307                 0.0021052                   0.0043385                  0.0016508            
      0.0018538                 0.0025724                  -0.0059163                   0.002397            
     -0.0067509                -0.0065905                   0.0024829                 -0.0065973            

index = length(edgeProfile.normalizedEdgeProfile_R);
plot(1:index, edgeProfile.normalizedEdgeProfile_R,'r', ...
    1:index, edgeProfile.normalizedEdgeProfile_G,'g', ...
    1:index, edgeProfile.normalizedEdgeProfile_B,'b')
ylabel('Normalized Intensity')
title(['ROI ' num2str(ROIIndex) ' with Aberration ' num2str(chTable.aberration(ROIIndex))])

The blue channel has a higher intensity than the red and green channels immediately before the edge, and a lower intensity than the red and green channels immediately after the edge. This difference in intensity contributes to the measured value of chromatic aberration.

The measured values of aberration and percentAberration for this edge are relatively small. Visual inspection of the image confirms that the sides of the edge do not have a strong color tint.

Input Arguments

collapse all

eSFR chart, specified as an esfrChart object.

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 single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: measureChromaticAberration(myChart,'ROIIndex',2) measures the chromatic aberration only of ROI 2.

collapse all

ROI indices to include in measurements, specified as the comma-separated pair consisting of 'ROIIndex' and a scalar or vector of integers in the range [1, 60]. The indices match the ROI numbers displayed by displayChart.


measureChromaticAberration uses the intersection of ROIs specified by 'ROIIndex' and 'ROIOrientation'.

Example: 29:32

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32

ROI orientation, specified as the comma-separated pair consisting of 'ROIOrientation' and 'both', 'vertical', or 'horizontal'. The measureChromaticAberration function performs measurements only on ROIs with the specified orientation.


measureChromaticAberration uses the intersection of ROIs specified by 'ROIIndex' and 'ROIOrientation'.

Example: 'vertical'

Data Types: char | string

Output Arguments

collapse all

Chromatic aberration measurements, returned as an m-by-5 table. m is the number of sampled ROIs.

The five columns represent these variables:

ROIIndex of the sampled ROI. The value of ROI is an integer in the range [1, 60].

Chromatic aberration, measured as the area between the maximum and the minimum red, green, and blue edge intensity profiles. The measured chromatic aberration inticates perceptual chromatic aberration. aberration is a scalar of type double.

percentAberrationAberration, expressed as a percentage of the distance in pixels between the center of the image and the center of the ROI.

Intensity profile of each color channel across the edge in the ROI. edgeProfile is an s-by-4 table, where s is the number of samples across the edge. The four columns represent the red, green, blue, and luminance values, averaged along the edge.

Luminance (Y) is a linear combination of the red (R), green (G), and blue (B) channels according to:

Y = 0.213R + 0.715G + 0.072B


The sampling rate for the chromatic aberration measurement is about four times the sampling rate of the image.


Intensity profile, normalized between [0, 1] using 5% of the front end and tail end of data. normalizedEdgeProfile is an s-by-4 table with a similar structure to edgeProfile.


  • Chromatic aberration is best measured at slanted edges that are:

    • Roughly orthogonal to the line connecting the center of the image and the center of the ROI

    • Farthest from the center of the image

    Because chromatic aberration increases radially from the center of the image, measurements at slanted edges near the center of the image can be ignored.

  • The absolute chromatic aberration reported in the aberration field is measured in the horizontal or vertical direction. However, chromatic aberration is a radial phenomenon, and radial measurements are more accurate.

  • Perform chromatic aberration measurements on linearized data. Use rgb2lin to linearize sRGB images.

Introduced in R2017b

Was this topic helpful?