MIL_ID ContextId, | //in |
MIL_INT64 OperationMode, | //in |
MIL_INT64 DistTypeOrCalIntent, | //in |
MIL_INT64 ConversionModeOrComputeOption, | //in |
MIL_INT64 ControlFlag | //in |
This function sets the strategy with which to perform color matching or relative color calibration, when calling McolMatch() or McolTransform(), respectively. The strategy is based on the operation and either the color distance (for color matching) or the calibration intent (for relative color calibration). By manipulating these settings, you can affect the resulting color-samples that MIL matches to the target areas, or the color-sample mappings that MIL uses to transform color data with relative color calibration.
If you perform color matching using an RGB source color space, you can use this function to convert your RGB color data to a different color space before the match operation. To do so, explicitly specify a conversion mode (ConversionModeOrComputeOption).
The strategy set with this function is part of the specified context. For this function's settings to take effect, you must preprocess the context (McolPreprocess()).
Specifies the identifier of the color matching or relative color calibration context. The context must have been previously allocated on the required system using McolAlloc() with M_COLOR_MATCHING or M_COLOR_CALIBRATION_RELATIVE.
See the Parameter associations section for possible values that can be specified.
Specifies the operation.
For specifying the operation with which to perform McolMatch(), set this parameter to one of the following values. The ContextId parameter must indicate the identifier of a color matching context.
For specifying the distance operation
(color matching) INQ
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_STAT_MIN_DIST. |
||||||||||||||||||||||||||||||||||||||
M_HISTOGRAM_MATCHING |
Specifies a minimum distance operation, based on color histograms. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HISTOGRAM_VOTE |
Specifies a match operation based on histogram voting. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MIN_DIST_VOTE |
Specifies a minimum distance operation, based on pixel voting. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STAT_MIN_DIST |
Specifies a minimum distance operation, based on pixel statistics. (more details...) |
For specifying the operation with which to establish the mapping that MIL associates between each color-sample and the reference color-sample, set this parameter to one of the following values. The ContextId parameter must indicate the identifier of a relative color calibration context.
For specifying the mapping operation
(relative color calibration) INQ
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_HISTOGRAM_BASED. |
||||||||||||||||||||||||||||||||||||||
M_COLOR_TO_COLOR |
Specifies that a color-sample's mapping is based on transforming its color to the color of the reference color-sample on a point-to-point basis. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GLOBAL_MEAN_VARIANCE |
Specifies that a color-sample's mapping is based on transforming its mean and variance (standard deviation) to resemble the mean and variance of the reference color-sample. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HISTOGRAM_BASED |
Specifies that a color-sample's mapping is based on using enhanced color distribution information to transform its color data to better resemble the color data of the reference color-sample. (more details...) |
Specifies the type of distance (for color matching) or calibration intent (for relative color calibration) that the operation uses. Distance is the difference in color between the color-sample and the target area. Except for the M_MAHALANOBIS distance type, which uses the covariance of the color-sample, MIL uses the mean of the colors to calculate the distance. Calibration intent is the extent to which the color data of the color-samples must resemble the color data of the reference color-sample.
See the Parameter associations section for possible values that can be specified.
Specifies the conversion mode (for color matching) or compute option (for relative color calibration) that the operation uses. Conversion mode refers to the color space to which the RGB source color data will be converted before performing McolMatch(). You can only convert RGB source color data to CIELAB or HSL when matching colors. By default, this type of conversion is not performed (or allowed), and you should set this parameter to M_DEFAULT (same as M_NONE). Compute option indicates whether the operation uses all pixel values or color statistics.
When specifying a conversion mode, the match operation uses the converted color values. For example, if you are using the ConversionModeOrComputeOption parameter to convert your RGB color data to HSL, the match will be performed with the HSL version of the color.
See the Parameter associations section for possible values that can be specified.
The tables below list possible values for the ContextId, DistTypeOrCalIntent, and ConversionModeOrComputeOption parameters.
The following ContextId, DistTypeOrCalIntent, and ConversionModeOrComputeOption parameter settings specify the type of distance calculation to use when calling McolMatch(). The ContextId parameter must indicate the identifier of a color matching context.
Except for converting RGB source color data to CIELAB or HSL when matching colors, the ConversionModeOrComputeOption parameter is unused and should be set to M_DEFAULT (same as M_NONE).
The settings in the following table are restricted according to the color matching context's source color space, as set using McolAlloc() with M_RGB, M_HSL, or M_CIELAB. Note that the only distance type available for an M_HSL source color space, as indicated in the table below, is M_MANHATTAN (which is also the default for HSL).
The M_CMC... and M_CIE... settings are recommended for advanced users and are typically applied to improve the Delta-E performance when dealing with minor color variances in industrial color difference evaluation. These distance types follow the standards of the International Commission on Illumination (CIE), as established in their technical report on Colorimetry (CIE 15:2004).
For specifying the type of distance
calculation (color matching)
|
|||||||||||||||||||||||||||||||||||||||
ContextId |
Description
|
||||||||||||||||||||||||||||||||||||||
DistTypeOrCalIntent | |||||||||||||||||||||||||||||||||||||||
ConversionModeOrComputeOption | |||||||||||||||||||||||||||||||||||||||
CIELAB color matching context ID |
Specifies a color matching context that is using an M_CIELAB source color space. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default distance type. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CIE94_GRAPHIC_ARTS |
Specifies to use the CIE94 color distance with weighting factors pertaining to the graphic arts industry, as established by the CIE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CIE94_TEXTILE |
Specifies to use the CIE94 color distance with weighting factors pertaining to the textile industry, as established by the CIE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CIEDE2000 |
Specifies to use the CIEDE2000 color distance, as established by the CIE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CMC_ACCEPTABILITY |
Specifies to use the CMC(l: c) color distance that has been adjusted for acceptability evaluation, as established by the CIE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CMC_PERCEPTIBILITY |
Specifies to use the CMC(l: c) color distance that has been adjusted for perceptibility evaluation, as established by the CIE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DELTA_E |
Specifies to use a Delta-E color distance, as defined by the International Commission on Illumination (CIE). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_EUCLIDEAN |
Specifies to use a Euclidean color distance. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MAHALANOBIS |
Specifies to use a Mahalanobis color distance. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MANHATTAN |
Specifies to use a Manhattan color distance. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies that no distance calculations are used. (more details...) |
||||||||||||||||||||||||||||||||||||||
HSL color matching context ID |
Specifies a color matching context that is using an M_HSL source color space. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default distance type. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MANHATTAN |
Specifies to use a Manhattan color distance. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies that no distance calculations are used. (more details...) |
||||||||||||||||||||||||||||||||||||||
RGB color matching context ID |
Specifies a color matching context that is using an M_RGB source color space. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default distance type. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies to internally convert RGB colors to CIELAB before the match operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HSL |
Specifies to internally convert RGB colors to HSL before the match operation. |
||||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies no internal conversion. |
||||||||||||||||||||||||||||||||||||||
M_CIE94_GRAPHIC_ARTS |
Specifies to use the CIE94 color distance with weighting factors pertaining to the graphic arts industry, as established by the CIE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
M_CIE94_TEXTILE |
Specifies to use the CIE94 color distance with weighting factors pertaining to the textile industry, as established by the CIE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
M_CIEDE2000 |
Specifies to use the CIEDE2000 color distance, as established by the CIE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
M_CMC_ACCEPTABILITY |
Specifies to use the CMC(l: c) color distance that has been adjusted for acceptability evaluation, as established by the CIE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
M_CMC_PERCEPTIBILITY |
Specifies to use the CMC(l: c) color distance that has been adjusted for perceptibility evaluation, as established by the CIE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
M_DELTA_E |
Specifies to use a Delta-E color distance, as defined by the International Commission on Illumination (CIE). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
M_EUCLIDEAN |
Specifies to use a Euclidean color distance. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies to internally convert RGB colors to CIELAB before the match operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies no internal conversion. |
||||||||||||||||||||||||||||||||||||||
M_MAHALANOBIS |
Specifies to use a Mahalanobis color distance. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies no internal conversion. |
||||||||||||||||||||||||||||||||||||||
M_MANHATTAN |
Specifies to use a Manhattan color distance. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies to internally convert RGB colors to CIELAB before the match operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HSL |
Specifies to internally convert RGB colors to HSL before the match operation. |
||||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies no internal conversion. |
||||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies that no distance calculations are used. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies to internally convert RGB colors to CIELAB before the match operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HSL |
Specifies to internally convert RGB colors to HSL before the match operation. |
||||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies no internal conversion. |
The following ContextId, DistTypeOrCalIntent, and ConversionModeOrComputeOption parameter settings specify the calibration intent (quality) with which to perform the operation that MIL uses to establish the mapping it associates to color-samples. These settings can increase or decrease the accuracy inherent in the operation. The ContextId parameter must indicate the identifier of a color matching context. Unless otherwise specified, values are available for all operations.
For specifying the calibration intent
(quality) of the mapping operation (relative color
calibration)
|
|||||||||||||||||||||||||||||||||||||||
ContextId |
Description
|
||||||||||||||||||||||||||||||||||||||
DistTypeOrCalIntent | |||||||||||||||||||||||||||||||||||||||
ConversionModeOrComputeOption | |||||||||||||||||||||||||||||||||||||||
Relative color calibration context ID |
Specifies a relative color calibration context. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default calibration intent. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_COMPUTE_ITEM_PIXELS. |
||||||||||||||||||||||||||||||||||||||
M_COMPUTE_ITEM_PIXELS |
Specifies that MIL uses all pixel values (in the reference color-sample and the color-samples) to generate the color information that the operation requires. |
||||||||||||||||||||||||||||||||||||||
M_COMPUTE_ITEM_STAT |
Specifies that MIL uses color statistics (in the reference color-sample and the color-samples) to generate the color information that the operation requires. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_BALANCE |
Specifies that the operation considers a moderate amount of color information to establish the mapping. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_COMPUTE_ITEM_PIXELS. |
||||||||||||||||||||||||||||||||||||||
M_COMPUTE_ITEM_PIXELS |
Specifies that MIL uses all pixel values (in the reference color-sample and the color-samples) to generate the color information that the operation requires. |
||||||||||||||||||||||||||||||||||||||
M_COMPUTE_ITEM_STAT |
Specifies that MIL uses color statistics (in the reference color-sample and the color-samples) to generate the color information that the operation requires. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GENERALIZATION |
Specifies that the operation considers a minimal amount of color information to establish the mapping. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_COMPUTE_ITEM_PIXELS. |
||||||||||||||||||||||||||||||||||||||
M_COMPUTE_ITEM_PIXELS |
Specifies that MIL uses all pixel values (in the reference color-sample and the color-samples) to generate the color information that the operation requires. |
||||||||||||||||||||||||||||||||||||||
M_COMPUTE_ITEM_STAT |
Specifies that MIL uses color statistics (in the reference color-sample and the color-samples) to generate the color information that the operation requires. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PRECISION |
Specifies that the operation considers a high amount of color information to establish the mapping. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_COMPUTE_ITEM_PIXELS. |
||||||||||||||||||||||||||||||||||||||
M_COMPUTE_ITEM_PIXELS |
Specifies that MIL uses all pixel values (in the reference color-sample and the color-samples) to generate the color information that the operation requires. |
||||||||||||||||||||||||||||||||||||||
M_COMPUTE_ITEM_STAT |
Specifies that MIL uses color statistics (in the reference color-sample and the color-samples) to generate the color information that the operation requires. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milcolor.lib. |
DLL | Requires mil.dll; milcolor.dll. |