| MIL 10 Reference
| Customize Help
| Save Settings

MblobGetRuns



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
None.
Synopsis
Get the blob run-length encoding information.
Syntax
void MblobGetRuns(
MIL_ID BlobResId, //in
MIL_INT LabelVal, //in
MIL_INT64 ArrayType, //in
void *RunXPtr, //out
void *RunYPtr, //out
void *RunLengthPtr //out
)
Description

This function obtains the coordinate and length of each run (unbroken horizontal sequence of foreground pixels) in a specified blob, from the blob analysis result buffer. Prior to using this function, M_NUMBER_OF_RUNS must have been added to the feature list, using MblobSelectFeature(), and a call to MblobCalculate() must have been made.

The coordinate and length arrays must be large enough to hold information for all runs in the specified blob. The number of runs for a blob can be obtained, using MblobGetResult() or MblobGetResultSingle(). The number of runs, as well as the run-length encoding results, are given in raw pixel values and are not affected by the pixel aspect ratio.

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
BlobResId

Specifies the identifier of the blob analysis result buffer.

LabelVal

Specifies the blob(s) for which to get run length encoding information.

function map For the upper limit of the selected condition
CollapseValue Description
Collapse M_ALL

Specifies to read the runs of all included blobs. The runs are read consecutively and placed in the array in an increasing order of the labels of blobs.

The array should be large enough to hold all the runs. The total size of the required array is the sum of the runs for all blobs; to obtain the number of runs for each blob, use MblobGetResult() or MblobGetResultSingle() with M_NUMBER_OF_RUNS.

(summarize)
Collapse Value

Specifies the label value of the blob for which to get run information. You can get the label value for a blob, using MblobGetLabel() or MblobGetResult(). You cannot obtain run length encoding information for blobs that have been deleted from the result buffer.

(summarize)
ArrayType

Specifies the type of the arrays in which the coordinate and length of the runs for a blob will be returned.

See the Parameter associations section for possible values that can be specified.

RunXPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type char
  • array of type MIL_INT
  • array of type MIL_INT16
  • array of type MIL_INT32
  • array of type MIL_INT64

Specifies the address of the array in which to write the X-coordinate of the start (left-most pixel) of each run in the specified blob.

Note, you can set RunXPtr to M_NULL if the X-coordinate is not required.

See the Parameter associations section for possible values that can be returned.

RunYPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type char
  • array of type MIL_INT
  • array of type MIL_INT16
  • array of type MIL_INT32
  • array of type MIL_INT64

Specifies the address of the array in which to write the Y-coordinate of the start of each run in the specified blob.

Note, you can set RunYPtr to M_NULL if the Y-coordinate is not required.

See the Parameter associations section for possible values that can be returned.

RunLengthPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type char
  • array of type MIL_INT
  • array of type MIL_INT16
  • array of type MIL_INT32
  • array of type MIL_INT64

Specifies the address of the array in which to write the length of each run in the specified blob.

Note, you can set RunLengthPtr to M_NULL if the length of each run is not required.

See the Parameter associations section for possible values that can be returned.

The table below lists possible values for the ArrayType parameter and possible values returned to the RunXPtr, RunYPtr, and RunLengthPtr parameters.

function map For specifying the type of the arrays
CollapseArrayType Description
RunXPtr
- Possible values returned
RunYPtr
- Possible values returned
RunLengthPtr
- Possible values returned
Collapse M_TYPE_CHAR

Retrieves an array of type char.

(summarize)
Collapse RunXPtr, RunYPtr, and RunLengthPtr
Data type info

Data type: array of type char
Array size: Large enough to hold the number of currently included blobs.
Note: The array size is determined by calling another function.

Collapse M_TYPE_MIL_INT

Retrieves an array of type MIL_INT.

(summarize)
Collapse RunXPtr, RunYPtr, and RunLengthPtr
Data type info

Data type: array of type MIL_INT
Array size: Large enough to hold the number of currently included blobs.
Note: The array size is determined by calling another function.

Collapse M_TYPE_MIL_INT16

Casts the requested results to a MIL_INT16.

(summarize)
Collapse RunXPtr, RunYPtr, and RunLengthPtr
Data type info

Data type: array of type MIL_INT16
Array size: Large enough to hold the number of currently included blobs.
Note: The array size is determined by calling another function.

Collapse M_TYPE_MIL_INT32

Retrieves an array of type MIL_INT32.

(summarize)
Collapse RunXPtr, RunYPtr, and RunLengthPtr
Data type info

Data type: array of type MIL_INT32
Array size: Large enough to hold the number of currently included blobs.
Note: The array size is determined by calling another function.

Collapse M_TYPE_MIL_INT64

Retrieves an array of type MIL_INT64.

(summarize)
Collapse RunXPtr, RunYPtr, and RunLengthPtr
Data type info

Data type: array of type MIL_INT64
Array size: Large enough to hold the number of currently included blobs.
Note: The array size is determined by calling another function.

Compilation information
Header Include mil.h.
Library Use mil.lib; milblob.lib.
DLL Requires mil.dll; milblob.dll.
ALL TYPE CHAR TYPE MIL INT TYPE MIL INT16 TYPE MIL INT32 TYPE MIL INT64