MIL_ID SrcImageBufId, | //in |
MIL_ID DstImageBufId, | //in |
MIL_ID ArrayBufIdOrConversionType | //in |
This function performs a color conversion on the source image and places the result in the destination buffer.
The values generated will be normalized to the possible range of values in the destination buffer. For example, the hue values from 0 to 360° will generate the values from 0 to 255 in an 8-bit destination buffer.
Note that the values in a signed source buffer must be positive. For a floating-point destination buffer, the values generated will be normalized between 0 and 1.
If necessary, you can perform a mathematically optimal color-to-grayscale conversion using McolProject() with M_PRINCIPAL_COMPONENT_PROJECTION.
Specifies the identifier of the source image buffer. Source buffer values must be positive. If specifying a floating-point buffer, the values of the buffer must be normalized between 0 and 1 before calling this function.
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
Specifies the identifier of the destination image buffer. If specifying a floating-point buffer, the values generated will be normalized between 0 and 1. This normalization does not apply to the MIL array buffer identifier conversion type.
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
Specifies the type of conversion to perform. The conversion can be specified with either a predefined or custom transformation matrix. This parameter can be set to one of the following.
For specifying the type of conversion to
perform
|
|||||||||||||||||||||||||||||||||||||||
Value |
Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
M_HSL_TO_RGB |
Specifies a HSL to RGB conversion. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Only supports conversion from M_BGR32 packed to M_BGR32 packed buffers. |
† | d | |||||||||||||||||||||||||||||||||||||
M_L_TO_RGB |
Specifies an L (luminance) to RGB conversion. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Only supports conversion from M_BGR32 packed to unsigned monochrome 8- or 16-bit buffers. |
† | d | |||||||||||||||||||||||||||||||||||||
M_RGB_NORMALIZE |
Specifies an RGB-to-normalized-RGB conversion. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_RGB_TO_H |
Specifies an RGB to H conversion, where H represents the hue of the HSL color space. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Only supports conversion from M_BGR32 packed to unsigned monochrome 8- or 16-bit buffers. |
† | d | |||||||||||||||||||||||||||||||||||||
M_RGB_TO_HSL |
Specifies an RGB to HSL (hue, luminance (intensity), and saturation) conversion. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Only supports conversion from M_BGR32 packed to M_BGR32 packed buffers. |
† | d | |||||||||||||||||||||||||||||||||||||
M_RGB_TO_L |
Specifies an RGB to L conversion, where L represents the luminance (intensity) of the HSL color space. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Only supports conversion from M_BGR32 packed to unsigned monochrome 8- or 16-bit buffers. |
† | d | |||||||||||||||||||||||||||||||||||||
M_RGB_TO_Y |
Specifies an RGB to Y conversion, where Y represents the luminance of the YUV color space. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Only supports conversion from M_BGR32 packed to unsigned monochrome 8- or 16-bit buffers or from M_BGR32 packed to the first band of M_BGR32 packed buffers. |
† | d | |||||||||||||||||||||||||||||||||||||
MIL array buffer identifier |
Specifies a general matrix multiplication transform will be used to modify the source image's color information. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Supports conversion from M_BGR32 packed to unsigned monochrome 8- or 16-bit buffers for 3x1 matrices. Supports conversion from M_BGR32 packed to the first band of M_BGR32 packed buffers for 3x3 matrices. |
† | d |
Header | Include mil.h. |
Library | Use mil.lib; milim.lib. |
DLL | Requires mil.dll; milim.dll. |