Click here to show toolbars of the Web Online Help System: show toolbars |
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 color 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.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_STAT_MIN_DIST. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a minimum distance operation, based on color histograms. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a match operation based on histogram voting. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a minimum distance operation, based on pixel voting. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a minimum distance operation, based on pixel statistics. |
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.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_HISTOGRAM_BASED. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. |
Specifies the type of distance (for color matching) or color 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. Color 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).
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
DistTypeOrCalIntent | |||||||||||||||||||||||||||||||||||||||
ConversionModeOrComputeOption | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a color matching context that is using an M_CIELAB source color space. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default distance type. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the CIE94 color distance with weighting factors pertaining to the graphic arts industry, as established by the CIE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the CIE94 color distance with weighting factors pertaining to the textile industry, as established by the CIE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the CIEDE2000 color distance, as established by the CIE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the CMC(l: c) color distance that has been adjusted for acceptability evaluation, as established by the CIE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the CMC(l: c) color distance that has been adjusted for perceptibility evaluation, as established by the CIE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use a Delta-E color distance, as defined by the International Commission on Illumination (CIE). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use a Euclidean color distance. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use a Mahalanobis color distance. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use a Manhattan color distance. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that no distance calculations are used. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a color matching context that is using an M_HSL source color space. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default distance type. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use a Manhattan color distance. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that no distance calculations are used. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a color matching context that is using an M_RGB source color space. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default distance type. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to HSL before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies no internal conversion. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the CIE94 color distance with weighting factors pertaining to the graphic arts industry, as established by the CIE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the CIE94 color distance with weighting factors pertaining to the textile industry, as established by the CIE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the CIEDE2000 color distance, as established by the CIE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the CMC(l: c) color distance that has been adjusted for acceptability evaluation, as established by the CIE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use the CMC(l: c) color distance that has been adjusted for perceptibility evaluation, as established by the CIE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use a Delta-E color distance, as defined by the International Commission on Illumination (CIE). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use a Euclidean color distance. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies no internal conversion. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use a Mahalanobis color distance. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies no internal conversion. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to use a Manhattan color distance. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to HSL before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies no internal conversion. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that no distance calculations are used. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to CIELAB before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to internally convert RGB colors to HSL before the match operation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies no internal conversion. |
The following ContextId, DistTypeOrCalIntent, and ConversionModeOrComputeOption parameter settings specify the color 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.
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).
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
DistTypeOrCalIntent | |||||||||||||||||||||||||||||||||||||||
ConversionModeOrComputeOption | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a relative color calibration context. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default color calibration intent. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as 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. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that MIL uses color statistics (in the reference color-sample and the color-samples) to generate the color information that the operation requires. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the operation considers a moderate amount of color information to establish the mapping. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as 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. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that MIL uses color statistics (in the reference color-sample and the color-samples) to generate the color information that the operation requires. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the operation considers a minimal amount of color information to establish the mapping. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as 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. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that MIL uses color statistics (in the reference color-sample and the color-samples) to generate the color information that the operation requires. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the operation considers a high amount of color information to establish the mapping. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as 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. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that MIL uses color statistics (in the reference color-sample and the color-samples) to generate the color information that the operation requires. |
Header | Include mil.h. |
Library | Use mil.lib; milcolor.lib. |
DLL | Requires mil.dll; milcolor.dll. |