MIL_ID SrcImageBufId, | //in |
MIL_ID EventResultImId, | //in |
MIL_INT64 Condition, | //in |
MIL_DOUBLE CondLow, | //in |
MIL_DOUBLE CondHigh | //in |
This function finds the coordinates and value of the pixels that satisfy the specified condition in the specified source image. Results are stored in the specified event result buffer.
You can retrieve the values, X- or Y-coordinates, and the number of pixels that satisfy the condition, using MimGetResult() or MimGetResult1d(). If the result buffer does not have the required number of entries to hold the total number of events that satisfy the condition, the number returned will be limited to the number of entries in the result buffer.
You can limit this function's results to a region of the source image buffer using a region of interest (ROI) set using MbufSetRegion().
Specifies the identifier of the source image for the operation. This parameter must be given the identifier of a 1-band buffer.
This image buffer can have an ROI set using MbufSetRegion(). The ROI must be defined in raster format (M_RASTER or M_VECTOR_AND_RASTER). An error is generated if the ROI is only in vector format (M_VECTOR).
Specifies the identifier of the buffer in which to store the event results. This parameter must be given the identifier of an image processing result buffer, allocated using MimAllocResult() with an M_EVENT_LIST type. The buffer must have enough entries to hold the expected number of events.
If the number of pixels found is less than the number of event result buffer entries, the remaining result buffer entries are set to M_INVALID. If the number of events is greater than the number of allocated result buffer entries, the extra entries are discarded; when using multi-processing, the events kept might not be the first events in the source image. To determine the number of events so that you can allocate an appropriate result buffer, call MimLocateEvent() with EventResultImId set to M_NULL. The returned value is the number of pixels that satisfy the condition. Use this value to allocate a result buffer of the correct size. You then call this function a second time, specifying a result buffer with the correct size.
Specifies the condition under which pixel values are considered an event. This parameter must be set to one of the values below.
For conditions that use two limits, set the Condition parameter to one of the values below.
For conditions that use two
limits
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_IN_RANGE + |
Specifies that pixels with values between CondLow and CondHigh, inclusive, are considered events. |
||||||||||||||||||||||||||||||||||||||
M_OUT_RANGE |
Specifies that pixels with values less than CondLow, or greater than CondHigh, are considered events. |
For conditions that use one limit, set the Condition parameter to one of the values below.
For conditions that use one
limit
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_EQUAL |
Specifies that only pixels with values equal to CondLow will be considered an event. |
||||||||||||||||||||||||||||||||||||||
M_GREATER |
Specifies that only pixels with values greater than CondLow will be considered an event. |
||||||||||||||||||||||||||||||||||||||
M_GREATER_OR_EQUAL + |
Specifies that only pixels with values greater than or equal to the CondLow will be considered an event. |
||||||||||||||||||||||||||||||||||||||
M_LESS |
Specifies that only pixels with values less than CondLow will be considered an event. |
||||||||||||||||||||||||||||||||||||||
M_LESS_OR_EQUAL + |
Specifies that only pixels with values less than or equal to CondLow will be considered an event. |
||||||||||||||||||||||||||||||||||||||
M_NOT_EQUAL |
Specifies that only pixels with values not equal to CondLow will be considered an event. |
For conditions that use no limit, set the Condition parameter to the value below. Typically, this is only useful when specifying a local maxima or local minima condition.
For conditions that use no
limit
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_ALL + |
Specifies that all pixels satisfying the local maxima or local minima condition will be considered an event. (more details...) |
You can add one of the following values to the above-mentioned values to specify a local maxima or local minima as part of the condition under which pixel values are considered an event.
The local maxima or local minima condition only applies to pixels that meet the initial condition (for example, M_IN_RANGE).
You cannot use MimStat() with a local maxima or local minima condition to determine the number of event result buffer entries so that you can allocate an appropriate result buffer. Instead, you can use MimStat() with the initial condition only (for example, M_IN_RANGE) except M_ALL. However, since this is typically an unnecessarily large number, you should consider the specifics of your application to allocate a more appropriate result buffer.
For specifying a local maxima or local
minima as part of the condition
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_LOCAL_MAX_NOT_STRICT |
Specifies that within a 3x3 neighborhood of a pixel, the pixel must be equal to or greater than all of its neighbors for it to be considered an event. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_LOCAL_MAX_STRICT_MEDIUM |
Specifies that within a 3x3 neighborhood of a pixel, the pixel must be equal to or greater than all of its neighbors, and it must also be greater than the pixels on its left and the pixel below, for it to be considered an event. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_LOCAL_MIN_NOT_STRICT |
Specifies that within a 3x3 neighborhood of a pixel, the pixel must be equal to or less than all of its neighbors for it to be considered an event. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_LOCAL_MIN_STRICT_MEDIUM |
Specifies that within a 3x3 neighborhood of a pixel, the pixel must be equal to or less than all of its neighbors, and it must also be less than the pixels on its left and the pixel below, for it to be considered an event. (more details...) |
Specifies the lower limit of the selected condition.
For specifying the lower
limit
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that no lower limit is required. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the lower limit. |
Specifies the upper limit of the selected condition.
For specifying the upper
limit
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that no upper limit is required. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the upper limit. |
Header | Include mil.h. |
Library | Use mil.lib; milim.lib. |
DLL | Requires mil.dll; milim.dll. |