MIL_ID ContextId, | //in |
MIL_INT SampleIndexOrLabel, | //in |
MIL_ID SrcImageBufId, | //in |
MIL_ID DestImageBufId, | //in |
MIL_INT64 ControlFlag | //in |
This function transforms a source image's color data according to the mapping associated with a color-sample in a relative color calibration context. The transformed image is written in the destination image buffer.
This function supports in-place processing; you can specify the identifier of the same image buffer for both the source and the destination.
The mapping associated with the color-sample (SampleIndexOrLabel) is established with McolDefine() and McolPreprocess(). McolDefine() defines the color-samples, and reference color-sample. McolPreprocess() establishes the mapping with which to interpret the color data of each color-sample so it is similar to the color data of the reference color-sample (for example, similar color temperature and distribution). By applying the color-sample mapping, McolTransform() corrects the color data of its source images to resemble the color data of the reference color-sample. You can then use these transformed source images, which now resemble each other, to perform other color operations, such as color matching (McolMatch()).
To influence the transformation, you can alter how MIL establishes the color-sample mapping by changing the processing strategy with McolSetMethod(). Such changes require you to call McolPreprocess() before McolTransform().
Specifies the identifier of the relative color calibration context containing the color-sample and its associated mapping. The relative color calibration context must have been previously allocated on the required system using McolAlloc() with M_COLOR_CALIBRATION_RELATIVE. The relative color calibration context must also have been previously preprocessed using McolPreprocess().
MIL assumes all color data you use with a relative color calibration context is 8-bit RGB (3-band). If color data is inconsistent (for example, between the source image and the color-sample), MIL still processes it all as 8-bit RGB, which can produce misleading results.
Specifies the index or label of a color-sample in the specified relative color calibration context. This function transforms the color of the source image according to the mapping associated to the color-sample. Ensure the color-sample is appropriate for the specified source image.
For specifying a
color-sample
|
|||||||||||||||||||||||||||||||||||||||
Value |
Description
|
||||||||||||||||||||||||||||||||||||||
Specifies the index of a color-sample. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies an index value greater than or equal to 0. |
|||||||||||||||||||||||||||||||||||||||
Specifies the label of a color-sample. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies a label value greater than 0. |
Specifies the identifier of the source image with which to perform the relative color calibration. The buffer must be an 8-bit color (3-band) unsigned image buffer (same as the destination).
Header | Include mil.h. |
Library | Use mil.lib; milcolor.lib. |
DLL | Requires mil.dll; milcolor.dll. |