Change the blob analysis processing mode.


void MblobControl(BlobResId, ProcMode, Value)

MIL_ID BlobResId; Blob analysis result buffer identifier
long ProcMode; Processing mode to set
double Value; Value associated with processing mode


This function changes the processing mode associated with the specified blob analysis result buffer. It is normally called immediately after allocating a blob analysis result buffer, using MblobAllocResult, but can be called later (in which case, already calculated results are discarded). If not called, default processing modes and values are used in calculations.

The BlobResId parameter specifies the identifier of the blob analysis result buffer.

The ProcMode parameter specifies the processing mode.

The Value parameter specifies the value associated with the processing mode.

Possible processing modes and associated values are listed below (defaults are shown in bold):

ProcMode Value Description
M_BLOB_IDENTIFICATION M_INDIVIDUAL All blobs are measured individually.
M_WHOLE_IMAGE All blobs are grouped together.
M_LABELLED Blobs with the same label value are grouped together.
M_LATTICE M_8_CONNECTED Each pixel has 8 neighbors.
M_4_CONNECTED Each pixel has 4 neighbors.
M_PIXEL_ASPECT_RATIO value (default is 1.0) Pixel width/pixel height
M_NUMBER_OF_FERETS value between M_MIN_FERETS and M_MAX_FERETS (default is 8). The first Feret angle used is always 0°, and the difference between successive angles is 180°/number of Ferets.
M_FOREGROUND_VALUE M_NONZERO Blobs consist of non-zero pixels.
M_ZERO Blobs consist of zero pixels.
M_IDENTIFIER_TYPE M_GRAYSCALE Non-zero pixels can have any value.
M_BINARY Non-zero pixels must have the maximum value of the buffer (for example, 0xff for an 8-bit image).
M_SAVE_RUNS M_ENABLE Calls to MblobCalculate?will save, in the result buffer, run information from the blob identifier image.
M_DISABLE Disabling saves time in performing MblobCalculate and reduces the memory requirements for the result buffer. However, you cannot use MblobFill, MblobGetLabel, MblobGetRuns, or MblobLabel.

If the identifier image is already binarized (for example, pixel values for an 8-bit image are either 0 or 0xff), you can change the identifier type to M_BINARY to calculate features faster.

Note, you can use MblobInquire to perform inquiries on specific processing modes associated with a blob analysis result buffer.

See also

MblobInquire, MblobCalculate, MblobAllocResult