| Customize Help
| Save Settings

MimFindExtreme



Function Map
Synopsis
Find an image buffer's extremes (minimum and/or maximum pixel values).
Syntax
void MimFindExtreme(
MIL_ID SrcImageBufId, //in
MIL_ID ExtremeResultImId, //in
MIL_INT64 ExtremeType //in
)
Description

This function finds the maximum and/or minimum value of the specified source image and stores results in the specified extreme result buffer.

You can read the minimum and/or maximum from the result buffer, using MimGetResult1d() or MimGetResult(), specifying M_VALUE as the result type.

You can limit this function's results to a region of the source image buffer using a region of interest (ROI) set using MbufSetRegion().

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
SrcImageBufId

Specifies the identifier of the data source of the operation. This parameter must be given an image buffer identifier. The buffer must be 1-band.

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).

ExtremeResultImId

Specifies the identifier of the buffer in which to store the extreme values. This parameter must be given the identifier of an image processing result buffer that was allocated with MimAllocResult() and that has an M_EXTREME_LIST type. If just the maximum or minimum is calculated, only one entry is needed. If both the minimum and maximum are calculated, the result buffer must have two entries. The minimum value is stored in the first entry and the maximum value is stored in the second.

ExtremeType

Specifies the type of extreme(s) to find.

To find the actual minimum and/or maximum pixel value(s) in the buffer, specify one or a combination of the values from the following table. For example, to find both the maximum and minimum values, set the ExtremeType parameter to M_MIN_VALUE + M_MAX_VALUE.

function map For specifying whether to find the minimum value, maximum value, or both
Click to summarizeValue Description
Click to summarize M_MAX_VALUE

Finds the maximum value.

Click to summarize M_MIN_VALUE

Finds the minimum value.

To find the minimum absolute value, maximum absolute value, or both, specify one or a combination of the values from the following table. For example, to find both the maximum absolute and minimum absolute values, set the ExtremeType parameter to M_MIN_ABS_VALUE + M_MAX_ABS_VALUE.

function map For specifying whether to find the minimum absolute value, maximum absolute value, or both
Click to summarizeValue Description
Click to summarize M_MAX_ABS_VALUE

Finds the maximum value, as an absolute value.

Click to summarize M_MIN_ABS_VALUE

Finds the minimum value, as an absolute value.

Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
PROC VECTOR MAX VALUE MIN VALUE MAX ABS VALUE MIN ABS VALUE