Documentation

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.

displayColorPatch

Display visual color reproduction as color patches

Syntax

displayColorPatch(colorTable)
displayColorPatch(colorTable,Name,Value)

Description

displayColorPatch(colorTable) displays measured and reference colors, colorTable, for color patch regions of interest (ROIs) in a test chart. The measured color values are displayed as squares surrounded by a thick boundary of the corresponding reference color.

example

displayColorPatch(colorTable,Name,Value) displays measured color values with additional parameters to control aspects of the display.

Examples

collapse all

This example shows how to display the color patch diagram from measurements of color accuracy on an Imatest® eSFR chart.

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. Display the chart, highlighting the 16 color patches.

chart = esfrChart(I_lin);
displayChart(chart,'displayEdgeROIs',false,...
    'displayGrayROIs',false,'displayRegistrationPoints',false)

Measure the color in all color patch ROIs.

colorTable = measureColor(chart);

Display the color accuracy measurements without the ROI index overlay. Each square color patch is the measured color, and the thick surrounding border is the reference color for that ROI. The color accuracy measurement is displayed as Delta_E, the Euclidean distance between measured and reference colors in CIE 1976 L*a*b* color space. More accurate colors have a smaller Delta_E.

displayColorPatch(colorTable,'displayROIIndex',false)

Input Arguments

collapse all

Color values in each color patch, specified as an m-by-8 color table, where m is the number of patches. The eight columns represent these variables:

VariableDescription
ROIIndex of the sampled ROI. The value of ROI is an integer in the range [1, 16]. The indices match the ROI numbers displayed by displayChart.
Measured_R

Mean value of red channel pixels in an ROI. Measured_R is a scalar of the same data type as chart.Image, which can be of type single, double, uint8, or uint16.

Measured_G

Mean value of green channel pixels in an ROI. Measured_G is a scalar of the same data type as chart.Image.

Measured_B

Mean value of blue channel pixels in an ROI. Measured_B is a scalar of the same data type as chart.Image.

Reference_L

Reference L* value corresponding to the ROI. Reference_L is a scalar of type double.

Reference_a

Reference a* value corresponding to the ROI. Reference_a is a scalar of type double.

Reference_b

Reference b* value corresponding to the ROI. Reference_b is a scalar of type double.

Delta_EEuclidean color distance between the measured and reference color values, as outlined in CIE 1976.

To obtain a color table, use the measureColor function.

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: displayColorPatch(myColorTable,'displayROIIndex',false) turns off the display of the ROI indices.

collapse all

Display ROI index labels, specified as the comma-separated pair consisting of 'displayROIIndex' and true or false. When displayROIIndex is true, then displayColorPatch overlays color patch ROI index labels on the displayed color patches. The indices match the ROI numbers displayed by displayChart.

Data Types: logical

Display Delta_E values, specified as the comma-separated pair consisting of 'displayDeltaE' and true or false. When displayDeltaE is true, displayColorPatch overlays the values of Delta_E on the displayed color patches.

Data Types: logical

Axes handle of the displayed image object, specified as the comma-separated pair consisting of 'Parent' and an axes handle. Parent specifies the parent of the image object created by displayColorPatch.

See Also

Functions

Using Objects

Introduced in R2017b

Was this topic helpful?