| Customize Help
| Save Settings

MimBoundingBox



Function Map
Synopsis
Compute the bounding box that contains valid pixels according to a given condition.
Syntax
void MimBoundingBox(
MIL_ID SrcImageBufId, //in
MIL_INT64 Condition, //in
MIL_DOUBLE CondLow, //in
MIL_DOUBLE CondHigh, //in
MIL_INT64 BoxDefinitionType, //in
MIL_INT *TopLeftXPtr, //out
MIL_INT *TopLeftYPtr, //out
MIL_INT *BottomRightXOrLengthPtr, //out
MIL_INT *BottomRightYOrLengthPtr, //out
MIL_INT64 ControlFlag //in
)
Description

This function computes the bounding box that contains valid pixels according to a given condition, based on a lower limit and an upper limit. For example, you can define a condition such that pixels are valid only within a specified value range.

You can specify to return the bounding box in one of two ways: using coordinates of 2 opposite corners, or using coordinates of 1 corner and the width and height (in pixel units).

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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
SrcImageBufId

Specifies the identifier of the data source of the operation. This parameter must be set to the MIL identifier of a 1-band image 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).

Condition

Specifies the condition under which pixels are considered valid.

function map For specifying the condition
Click to summarizeValue Description
Click to summarize M_EQUAL

Specifies that only pixels with values equal to CondLow are considered valid. CondHigh must be set to 0.

(summarize)
Click to summarize M_GREATER

Specifies that only pixels with values greater than CondLow are considered valid. CondHigh must be set to 0.

(summarize)
Click to summarize M_GREATER_OR_EQUAL

Specifies that only pixels with values greater than or equal to CondLow are considered valid. CondHigh must be set to 0.

(summarize)
Click to summarize M_IN_RANGE

Specifies that pixel values between CondLow and CondHigh, inclusive, are considered valid.

Click to summarize M_LESS

Specifies that only pixels with values less than CondHigh are considered valid. CondLow must be set to 0.

(summarize)
Click to summarize M_LESS_OR_EQUAL

Specifies that only pixels with values less than or equal to CondHigh are considered valid. CondLow must be set to 0.

(summarize)
Click to summarize M_NOT_EQUAL

Specifies that only pixels with values not equal to CondLow are considered valid. CondHigh must be set to 0.

(summarize)
Click to summarize M_OUT_RANGE

Specifies that pixels with values less than CondLow, or greater than CondHigh, are considered valid.

CondLow

Specifies the lower limit of the selected condition.

CondHigh

Specifies the upper limit of the selected condition.

BoxDefinitionType

Specifies the way in which the bounding box is returned.

function map For specifying the way in which the bounding box is returned
Click to summarizeValue Description
Click to summarize M_BOTH_CORNERS

Specifies to return the bounding box using the coordinates of its top-left and bottom-right corners.

Click to summarize M_CORNER_AND_DIMENSION

Specifies to return the bounding box using the coordinates of its top-left corner, and the box's width and height.

TopLeftXPtr

Specifies the address of the variable in which to write the X-coordinate of the top-left corner of the bounding box.

TopLeftYPtr

Specifies the address of the variable in which to write the Y-coordinate of the top-left corner of the bounding box.

BottomRightXOrLengthPtr

Specifies the address of the variable in which to write the X-coordinate of the bottom-right corner or the width of the bounding box.

BottomRightYOrLengthPtr

Specifies the address of the variable in which to write the Y-coordinate of the bottom-right corner or the height of the bounding box.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
PROC VECTOR EQUAL GREATER GREATER OR EQUAL IN RANGE LESS LESS OR EQUAL NOT EQUAL OUT RANGE BOTH CORNERS CORNER AND DIMENSION