Main Content

colorChecker

CalibriteColorCheckertest chart

Description

AcolorCheckerobject stores the positions and measurements of the regions of interest (ROIs) of a Calibrite ColorChecker®Classic test chart (formerly produced by X-Rite®and GretagMacbeth®)[1].

Creation

Description

example

chart = colorChecker(A)creates acolorCheckerobject from input imageA. The input image sets theImageproperty.

chart = colorChecker(A,Name,Value)controls the automatic chart detection using one or more name-value arguments.

example

chart = colorChecker(A,"RegistrationPoints",p)creates acolorCheckerobject and sets theRegistrationPointsproperty using the specified points inp.

Input Arguments

expand all

Name-Value Arguments

Specify optional pairs of arguments asName1=Value1,...,NameN=ValueN, whereNameis the argument name andValueis the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example:chart = colorChecker(A,Downsample=false)does not downsample the chart image for chart detection

Before R2021a, use commas to separate each name and value, and encloseNamein quotes.

Example:chart = colorChecker(A,"Downsample",false)does not downsample the chart image for chart detection

Downsample the chart image for chart detection, specified asa numeric or logical1(true) or0(false). Whentrue,colorCheckerresizes the image while preserving the aspect ratio such that the size of the smallest dimension is 1000. Downsampling enablescolorCheckerto detect the chart more quickly.

colorCheckeruses the downsampled image for detection only. The object calculates all properties using the original image.

Sensitivity of chart detection, specified as a number in the range [0, 1]. If you set a high sensitivity value,colorCheckerdetects more points of interest with which to register the test chart image.

Data Types:single|double

Properties

expand all

This property is read-only.

Test chart image, specified as an RGB image.

Data Types:single|double|uint8|uint16

This property is read-only.

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

Field Description
ROI

1-by-4 vector specifying the spatial extent of the ROI. The vector has the form [XYWidthHeight].XandYare the coordinates of the top-left corner of the ROI.WidthandHeightare the width and height of the ROI, in pixels.ROIis of data typedouble.

ROIIntensity

Array of color values within the ROI. The array has dimensionsHeight-by-Width-by-3. The data type ofROIIntensitymatches the data type of theImageproperty.

Coordinates of registration points, specified as a 4-by-2 numeric matrix. The registration points are the (x,y) coordinates of the plus-shaped (+) fiducials on the outer corners of the chart. Each row of the matrix contains the coordinates for one registration point. Specify the points in the order "black", "white", "dark skin", and "bluish green" according to the color of the nearest color patch.

Data Types:double

Object Functions

measureColor Measure color reproduction using test chart
measureIlluminant Measure scene illuminant using test chart
displayChart Display test chart with overlaid regions of interest

Examples

collapse all

Read an image of a ColorChecker® chart into the workspace.

I = imread("colorCheckerTestImage.jpg");

Display the image.

imshow(I) title("Captured Image of ColorChecker Chart") text(size(I,2),size(I,1)+15,"Chart courtesy of Calibrite",..."FontSize",10,"HorizontalAlignment","right")

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

Create acolorCheckerobject by performing automatic chart detection on the image.

chart = colorChecker(I)
chart = colorChecker with properties: Image: [1024x1541x3 uint8] RegistrationPoints: [4x2 double] ColorROIs: [24x1 struct]

To confirm that thecolorCheckerobject detected the chart correctly, display the chart and detected ROIs. Each ROI appears as a blue rectangle centered in the appropriate color patch. The registration points appear as red diamonds on the outer corners of the chart.

displayChart(chart)

Figure Color checker test chart contains an axes object. The axes object contains 25 objects of type image, text.

Read an image of a ColorChecker® chart into the workspace.

I = imread("colorCheckerTestImage.jpg");

Display the image.

imshow(I) title("Captured Image of ColorChecker Chart") text(size(I,2),size(I,1)+15,"Chart courtesy of Calibrite",..."FontSize",10,"HorizontalAlignment","right")

Draw point ROIs that overlap the plus-shaped (+) fiducials at the corners of the chart.

blackPoint = drawpoint; whitePoint = drawpoint; darkSkinPoint = drawpoint; bluishGreenPoint = drawpoint;

Combine the (x,y)的坐标点roi成一个4×2的矩阵matrix.

cornerPoints = [blackPoint.Position; whitePoint.Position; darkSkinPoint.Position; bluishGreenPoint.Position];

Create acolorCheckerobject by specifying the (x,y) coordinates of the corner registration points.

chart = colorChecker(I,"RegistrationPoints",cornerPoints);

To confirm that thecolorCheckerobject detected the chart correctly, display the chart and detected ROIs.

displayChart(chart)

Tips

  • There are two manufactured versions of the ColorChecker test chart that have slightly different reference values. The reference values of thecolorCheckerobject match the "After November 2014" version of the chart.

References

[1]Calibrite. "ColorChecker Classic".https://calibrite.com/us/product/colorchecker-classic/.

[2]费尔南德斯·d·M。f . a . Guerrero-Pena t I. Ren, and G. J. J. Leandro, "Fast and robust multiple ColorChecker detection using deep convolutional neural networks," Image and Vision Computing, Volume 81, 2019, pp. 15-24.

Version History

Introduced in R2020b