| Customize Help
| Save Settings

MimZoneOfInfluence



Function Map
Synopsis
Perform a zone of influence detection.
Syntax
void MimZoneOfInfluence(
MIL_ID SrcImageBufId, //in
MIL_ID DstImageBufId, //in
MIL_INT64 OperationFlag //in
)
Description

This function separates an image into zones, according to how much of a blob's surrounding background is within the blob's territorial boundaries, or "zone of influence". The image is considered to be binary, with background pixels equal to 0 (black), and all non-zero pixels treated as blobs. It gives every pixel in a blob's zone of influence the same value. Each zone of influence is numbered consecutively, beginning with 1. A blob's zone of influence consists of all pixels closer to that blob than to any other blob. There are as many zones as blobs.

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 source of the operation. This parameter must be given an image buffer identifier.

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.

DstImageBufId

Specifies the identifier of the destination of the resulting image. This parameter must be given an image buffer identifier.

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.

The destination buffer should be deep enough to hold the maximum number of zones (blobs). The maximum label value is 2 n - 5, where n is the depth of the destination buffer in bits. For example, an 8-bit buffer can be used for a maximum of 251 blobs and a 16-bit buffer can be used for a maximum of 65531 blobs. Note that if the destination buffer depth is too small, several zones might be given the same value.

OperationFlag

Specifies the type of 3x3 distance matrix used for the operation. The following table shows each value's respective 3x3 distance matrix for calculating the distance to a neighboring pixel, which is then used for the zone of influence computation.

This parameter must be set to one of the values below.

function map For controlling the type of 3x3 distance matrix
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_CHESSBOARD.

Click to summarize M_CHAMFER_3_4

Uses a distance algorithm that makes a better approximation to actual Euclidean distance, and is therefore more accurate than M_CHESSBOARD.

This is the 3x3 distance matrix:

(summarize)
Click to summarize M_CHESSBOARD

Specifies a chessboard matrix. This operation is faster than M_CHAMFER_3_4.

This is the 3x3 distance matrix:

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
PROC NONE PROC NONE DEFAULT CHAMFER 3 4 CHESSBOARD