MIL_ID ResultId, | //in |
MIL_INT AreaLabel, | //in |
MIL_INT ColorSampleIndexOrLabel, | //in |
MIL_INT64 ResultType, | //in |
void *ResultArrayPtr | //out |
This function retrieves the results of the specified type from a color matching result buffer. Results are only available after calling McolMatch(), and are organized by target area labels and color-sample indices. You can get results obtained from a specific target area or for all target areas. Similarly, you can get results obtained from a specific color-sample or for all color-samples.
To determine the order of the results, use M_AREA_LABEL_VALUE, and set the AreaLabel parameter to M_ALL and the ColorSampleIndexOrLabel parameter to M_GENERAL.
Specifies the label of the target area(s) for which to get results.
Target areas are specified using McolMatch() with the AreaIdentifierImageId parameter. If you set AreaIdentifierImageId to M_NULL, you must set the AreaLabel parameter to M_ALL or M_DEFAULT.
Set this parameter to one of the following values.
Specifies the color-sample(s) for which to get results. Set this parameter to one of the following values.
For specifying the
color-sample
|
|||||||||||||||||||||||||||||||||||||||
Value |
Description
|
||||||||||||||||||||||||||||||||||||||
Specifies the index of a color-sample. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies an index value from 0 (inclusive) to the number of defined color-samples minus 1. |
|||||||||||||||||||||||||||||||||||||||
Specifies the label of a color-sample. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies a label value greater than 0. |
|||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies to retrieve results for each color-sample. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GENERAL |
Specifies to retrieve general results not specific to any one color-sample. |
Specifies the type of result to retrieve.
See the Parameter associations section for possible values that can be specified.
Specifies the address of the first element of the array in which to write the requested information.
This array must be large enough to hold all entries. For example, if you retrieve results for all target areas and color-samples, you must account for the following array size: NumberOfTargetAreas x NumberOfSamples.
See the Parameter associations section for possible values that can be returned.
The tables below list possible values for the ResultType parameter and possible values returned to the ResultArrayPtr parameter.
To retrieve general results relating to the color matching context, the ResultType parameter can be set to one of the following values. In this case, you must set the AreaLabel and ColorSampleIndexOrLabel parameters to M_GENERAL.
Unless otherwise specified, the following values require that you pass the ResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to what is required by the result type (for multiple results) or the address of a MIL_DOUBLE (for a single result).
For retrieving general results relating
to the color matching context
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_AREA_IMAGE_SIGN + |
Retrieves the data type required for the image buffer in which to draw the target area(s) of the area identifier image (McolDraw() with M_DRAW_AREA). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_UNSIGNED |
Specifies unsigned data. |
||||||||||||||||||||||||||||||||||||||
M_AREA_IMAGE_SIZE_BAND + |
Retrieves the number of surfaces (color bands) required for the image buffer in which to draw the target area(s) of the area identifier image (McolDraw() with M_DRAW_AREA). (more details...) |
||||||||||||||||||||||||||||||||||||||
1 |
Specifies 1 color band. |
||||||||||||||||||||||||||||||||||||||
M_AREA_IMAGE_SIZE_BIT + |
Retrieves the depth per band required for the image buffer in which to draw the target area(s) of the area identifier image (McolDraw() with M_DRAW_AREA). (more details...) |
||||||||||||||||||||||||||||||||||||||
1 |
Specifies 1-bit data depth per band. |
||||||||||||||||||||||||||||||||||||||
8 |
Specifies 8-bit data depth per band. |
||||||||||||||||||||||||||||||||||||||
16 |
Specifies 16-bit data depth per band. |
||||||||||||||||||||||||||||||||||||||
M_AREA_IMAGE_SIZE_X + |
Retrieves the width required for the image buffer in which to draw the target area(s) of the area identifier image (McolDraw() with M_DRAW_AREA). (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the width of the image buffer, in pixels. |
||||||||||||||||||||||||||||||||||||||
M_AREA_IMAGE_SIZE_Y + |
Retrieves the height required for the image buffer in which to draw the target area(s) of the area identifier image (McolDraw() with M_DRAW_AREA). (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the height of the image buffer, in pixels. |
||||||||||||||||||||||||||||||||||||||
M_AREA_IMAGE_TYPE + |
Retrieves the data type and depth required for the image buffer in which to draw the target area(s) of the area identifier image (McolDraw() with M_DRAW_AREA). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_UNSIGNED + 1 |
Specifies 1-bit unsigned data. |
||||||||||||||||||||||||||||||||||||||
M_UNSIGNED + 8 |
Specifies 8-bit unsigned data. |
||||||||||||||||||||||||||||||||||||||
M_UNSIGNED + 16 |
Specifies 16-bit unsigned data. |
||||||||||||||||||||||||||||||||||||||
M_AREA_MATCH_IMAGE_SIZE_X + |
Retrieves the width required for the image buffer in which to draw (for each target area) the color or label of the best-matched color-sample (McolDraw() or McolMatch() with M_DRAW_AREA_MATCH_USING_COLOR or M_DRAW_AREA_MATCH_USING_LABEL). (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the width of the image buffer, in pixels. |
||||||||||||||||||||||||||||||||||||||
M_AREA_MATCH_IMAGE_SIZE_Y + |
Retrieves the height required for the image buffer in which to draw (for each target area) the color or label of the best-matched color-sample (McolDraw() or McolMatch() with M_DRAW_AREA_MATCH_USING_COLOR or M_DRAW_AREA_MATCH_USING_LABEL). (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the height of the image buffer, in pixels. |
||||||||||||||||||||||||||||||||||||||
M_DISTANCE_IMAGE_SIGN + |
Retrieves the data type required for the image buffer in which to draw the distance between the color of the target area (for an M_STAT_MIN_DIST operation mode) or target pixel (for an M_MIN_DIST_VOTE operation mode), and the color of its best-matched color-sample (McolDraw() or McolMatch() with M_DRAW_DISTANCE). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FLOAT |
Specifies floating-point data. |
||||||||||||||||||||||||||||||||||||||
M_DISTANCE_IMAGE_SIZE_BAND + |
Retrieves the number of surfaces (color bands) required for the image buffer in which to draw the distance between the color of the target area (for an M_STAT_MIN_DIST operation mode) or target pixel (for an M_MIN_DIST_VOTE operation mode), and the color of its best-matched color-sample (McolDraw() or McolMatch() with M_DRAW_DISTANCE). (more details...) |
||||||||||||||||||||||||||||||||||||||
1 |
Specifies 1 color band. |
||||||||||||||||||||||||||||||||||||||
M_DISTANCE_IMAGE_SIZE_BIT + |
Retrieves the depth per band required for the image buffer in which to draw the distance between the color of the target area (for an M_STAT_MIN_DIST operation mode) or target pixel (for an M_MIN_DIST_VOTE operation mode), and the color of its best-matched color-sample (McolDraw() or McolMatch() with M_DRAW_DISTANCE). (more details...) |
||||||||||||||||||||||||||||||||||||||
32 |
Specifies 32-bit data depth per band. |
||||||||||||||||||||||||||||||||||||||
M_DISTANCE_IMAGE_SIZE_X + |
Retrieves the width required for the image buffer in which to draw the distance between the color of the target area (for an M_STAT_MIN_DIST operation mode) or target pixel (for an M_MIN_DIST_VOTE operation mode), and the color of its best-matched color-sample (McolDraw() or McolMatch() with M_DRAW_DISTANCE). (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the width of the image buffer, in pixels. |
||||||||||||||||||||||||||||||||||||||
M_DISTANCE_IMAGE_SIZE_Y + |
Retrieves the height required for the image buffer in which to draw the distance between the color of the target area (for an M_STAT_MIN_DIST operation mode) or target pixel (for an M_MIN_DIST_VOTE operation mode), and the color of its best-matched color-sample (McolDraw() or McolMatch() with M_DRAW_DISTANCE). (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the height of the image buffer, in pixels. |
||||||||||||||||||||||||||||||||||||||
M_DISTANCE_IMAGE_TYPE + |
Retrieves the data type and depth required for the image buffer in which to draw the distance between the color of the target area (for an M_STAT_MIN_DIST operation mode) or target pixel (for an M_MIN_DIST_VOTE operation mode), and the color of its best-matched color-sample (McolDraw() or McolMatch() with M_DRAW_DISTANCE). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FLOAT + 32 |
Specifies 32-bit floating-point data. |
||||||||||||||||||||||||||||||||||||||
M_MAX_DISTANCE + |
Retrieves the maximum (largest) color distance among all distances between the target area and all matching color-samples. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NUMBER_OF_AREAS + |
Retrieves the number of target areas in the area identifier image with which you performed the matching operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NUMBER_OF_SAMPLES + |
Retrieves the number of color-samples defined in the context. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PIXEL_MATCH_IMAGE_SIZE_X + |
Retrieves the width required for the image buffer in which to draw (for each pixel in each target area) the color or label of the color-sample for which each pixel voted (McolDraw() or McolMatch() with M_DRAW_PIXEL_MATCH_USING_COLOR or M_DRAW_PIXEL_MATCH_USING_LABEL). (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the width of the image buffer, in pixels. |
||||||||||||||||||||||||||||||||||||||
M_PIXEL_MATCH_IMAGE_SIZE_Y + |
Retrieves the height required for the image buffer in which to draw (for each pixel in each target area) the color or label of the color-sample for which each pixel voted (McolDraw() or McolMatch() with M_DRAW_PIXEL_MATCH_USING_COLOR or M_DRAW_PIXEL_MATCH_USING_LABEL). (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the height of the image buffer, in pixels. |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_COLOR_SIGN + |
Retrieves the data type required for the image buffer in which to draw (for each target area or for each pixel in each target area) the color of the best-matched color-sample or the color of the color-sample for which each pixel voted (McolDraw() or McolMatch() with M_DRAW_AREA_MATCH_USING_COLOR or M_DRAW_PIXEL_MATCH_USING_COLOR). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_COLOR_SIZE_BAND + |
Retrieves the number of surfaces (color bands) required for the image buffer in which to draw (for each target area or for each pixel in each target area) the color of the best-matched color-sample or the color of the color-sample for which each pixel voted (McolDraw() or McolMatch() with M_DRAW_AREA_MATCH_USING_COLOR or M_DRAW_PIXEL_MATCH_USING_COLOR). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_COLOR_SIZE_BIT + |
Retrieves the depth per band, in bits, required for the image buffer in which to draw (for each target area or for each pixel in each target area) the color of the best-matched color-sample or the color of the color-sample for which each pixel voted (McolDraw() or McolMatch() with M_DRAW_AREA_MATCH_USING_COLOR or M_DRAW_PIXEL_MATCH_USING_COLOR). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_COLOR_TYPE + |
Retrieves the data type and depth required for the image buffer in which to draw (for each target area or for each pixel in each target area) the color of the best-matched color-sample or the color of the color-sample for which each pixel voted (McolDraw() or McolMatch() with M_DRAW_AREA_MATCH_USING_COLOR or M_DRAW_PIXEL_MATCH_USING_COLOR). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_LABEL_SIGN + |
Retrieves the data type required for the image buffer in which to draw (for each target area or for each pixel in each target area) the label of the best-matched color-sample or the label of the color-sample for which each pixel voted (McolDraw() or McolMatch() with M_DRAW_AREA_MATCH_USING_LABEL or M_DRAW_PIXEL_MATCH_USING_LABEL). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_LABEL_SIZE_BAND + |
Retrieves the number of surfaces (color bands) required for the image buffer in which to draw (for each target area or for each pixel in each target area) the label of the best-matched color-sample or the label of the color-sample for which each pixel voted (McolDraw() or McolMatch() with M_DRAW_AREA_MATCH_USING_LABEL or M_DRAW_PIXEL_MATCH_USING_LABEL). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_LABEL_SIZE_BIT + |
Retrieves the depth per band, in bits, required for the image buffer in which to draw (for each target area or for each pixel in each target area) the label of the best-matched color-sample or the label of the color-sample for which each pixel voted (McolDraw() or McolMatch() with M_DRAW_AREA_MATCH_USING_LABEL or M_DRAW_PIXEL_MATCH_USING_LABEL). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_LABEL_TYPE + |
Retrieves the data type and depth required for the image buffer in which to draw (for each target area or for each pixel in each target area) the label of the best-matched color-sample or the label of the color-sample for which each pixel voted (McolDraw() or McolMatch() with M_DRAW_AREA_MATCH_USING_LABEL or M_DRAW_PIXEL_MATCH_USING_LABEL). (more details...) |
To retrieve general results relating to a target area, the ResultType parameter can be set to one of the following values. In this case, you must set the AreaLabel parameter to a specific value (or M_ALL), and the ColorSampleIndexOrLabel parameter to M_GENERAL.
Unless otherwise specified, the following values require that you pass the ResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to what is required by the result type (for multiple results) or the address of a MIL_DOUBLE (for a single result).
For retrieving general target area
results
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_AREA_LABEL_VALUE + |
Retrieves the label of the target areas you used to obtain results. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_AREA_PIXEL_COUNT + |
Retrieves the total number of pixels in the target area. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_BEST_MATCH_INDEX + |
Retrieves the index of the target area's best-matched color-sample. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_BEST_MATCH_LABEL + |
Retrieves the label of the target area's best-matched color-sample. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_OUTLIER_COVERAGE + |
Retrieves the outlier coverage, which is the percentage of the number of pixels in the target area that did not vote for any color-sample. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SCORE_RELEVANCE + |
Retrieves the relevance score of the target area, as a percentage. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STATUS + |
Retrieves the match status of the target area. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FAILURE |
Specifies that no color-samples have been matched. |
||||||||||||||||||||||||||||||||||||||
M_SUCCESS |
Specifies that at least one color-sample has been matched. |
To retrieve results relating to a color-sample, the ResultType parameter can be set to one of the following values. In this case, you must set the AreaLabel parameter to a specific target area (or M_ALL) and the ColorSampleIndexOrLabel parameter to a specific color-sample (or M_ALL).
To retrieve color-sample results for all color-samples and all areas, set both the AreaLabel and ColorSampleIndexOrLabel parameter to M_ALL, and use M_NUMBER_OF_AREAS and M_NUMBER_OF_SAMPLES to set the size of the result array (NumberOfTargetAreas x NumberOfSamples). Note that to get a color-sample result, you must first refer to its target area.
Unless otherwise specified, the following values require that you pass the ResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to what is required by the result type (for multiple results) or the address of a MIL_DOUBLE (for a single result).
For retrieving color-sample
results
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_COLOR_DISTANCE + |
Retrieves the color distance (difference) between the target area and the specified color-sample, when using McolSetMethod() with the M_STAT_MIN_DIST operation mode. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_COVERAGE + |
Retrieves the proportion of pixels within the target area that voted for the color-sample, as a percentage. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_LABEL_VALUE + |
Retrieves the label of the color-sample corresponding to the specified index. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_MATCH_STATUS + |
Retrieves whether the specified color-sample fulfills the match conditions, with respect to the distance tolerance and acceptance. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MATCH |
Specifies that the color-sample fulfills the match conditions. |
||||||||||||||||||||||||||||||||||||||
M_NO_MATCH |
Specifies that the color-sample does not fulfill the match conditions. |
||||||||||||||||||||||||||||||||||||||
M_SAMPLE_PIXEL_COUNT + |
Retrieves the number of pixels within the target area that voted for the color-sample, when using McolSetMethod() with M_MIN_DIST_VOTE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SCORE + |
Retrieves the match score, as a percentage. (more details...) |
You can add the following value to the above-mentioned values to determine whether a result is available.
For determining whether results are
available
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_AVAILABLE |
Retrieves whether a result is available to be returned. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
Data
type: MIL_DOUBLE |
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that the result is not available to be returned. |
||||||||||||||||||||||||||||||||||||||
Value != 0 |
Specifies that the result is available to be returned. |
You can add one of the following values to the above-mentioned values to cast the requested results to the required data type.
Some results might be altered if they do not fit numerically in the data type you specify. For example, if you cast a result value of 300 to a char, information will be lost. The default data type, double, will never result in lost information.
For specifying the data type
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_TYPE_CHAR |
Casts the requested results to a char. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_DOUBLE |
Casts the requested results to a MIL_DOUBLE. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_FLOAT |
Casts the requested results to a MIL_FLOAT. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_ID |
Casts the requested results to a MIL_ID. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT |
Casts the requested results to a MIL_INT. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT16 |
Casts the requested results to a MIL_INT16. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT32 |
Casts the requested results to a MIL_INT32. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT64 |
Casts the requested results to a MIL_INT64. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
Header | Include mil.h. |
Library | Use mil.lib; milcolor.lib. |
DLL | Requires mil.dll; milcolor.dll. |