| MIL 10 Reference
| Customize Help
| Save Settings

MblobGetResult



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
Synopsis
Get results for a feature of the included blobs, from a blob result buffer.
Syntax
void MblobGetResult(
MIL_ID BlobResId, //in
MIL_INT64 Feature, //in
void *TargetArrayPtr //out
)
Description

This function retrieves the results for a specified feature for all included blobs, from the blob analysis result buffer.

If your target image was associated with a calibration context, positional and dimensional results are, by default, returned with respect to the relative coordinate system of the image. Otherwise, these results are returned in pixels, relative to the top-left pixel in the target image.

If your target image was associated with a calibration context but you want to retrieve positional and dimensional results in pixel units, use MblobControl() with the M_RESULT_OUTPUT_UNITS control type set to M_PIXEL. However, note that if you set M_RESULT_OUTPUT_UNITS to M_WORLD without specifying a calibrated image in which to calculate the results, MblobGetResult() will generate an error.

When calculated in pixel units, the pixel aspect ratio, specified with MblobControl(), is taken into account horizontally. Results are returned in units of "pixel height" since the pixel width is adjusted to be equal to the pixel height.

Note that trying to retrieve a result which is not available generates an error.

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 from which to get results. The specified feature(s) must have already been calculated with MblobCalculate().

Feature

Specifies the feature for which to retrieve the results.

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

TargetArrayPtr
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_DOUBLE
  • array of type MIL_FLOAT
  • array of type MIL_INT
  • array of type MIL_INT16
  • array of type MIL_INT32
  • array of type MIL_INT64
  • MIL_DOUBLE

Specifies the address of the array in which to write results. Each blob creates a separate result entry. Only results for blobs that are currently included are obtained.

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

To retrieve the result for a binary feature, select one of the following.

Unless otherwise specified, the following values require that you pass the TargetArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to the number of currently included blobs. This number can be obtained, using MblobGetNumber() (When retrieving the result from the currently included blobs.) .

function map For retrieving results for a binary feature
CollapseFeature Description
TargetArrayPtr
- Possible values returned
Collapse M_ALL_FERETS +

Retrieves all the Feret diameters of all the blobs in the image.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_AREA +

Retrieves the number of foreground pixels in each blob (holes are not counted).

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_BLOB_INCLUSION_STATE +

Retrieves whether each blob is included in calculations and retrieval of results.

(summarize)
Collapse M_EXCLUDED

Specifies that the blob is not included in calculations and retrieval of results.

Collapse M_INCLUDED

Specifies that the blob is included in calculations and retrieval of results.

Collapse M_BLOB_TOUCHING_IMAGE_BORDERS +

Retrieves whether each blob is touching the borders of the image.

(summarize)
Collapse M_NO

Specifies that the blob is not touching the borders of the image.

Collapse M_YES

Specifies that the blob is touching one or more borders of the image.

Collapse M_BOX_AREA +

Retrieves the area covered by the bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_BOX_ASPECT_RATIO +

Retrieves the ratio between the horizontal size and the vertical size of the bounding box of each blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_BOX_FILL_RATIO +

Retrieves the ratio between the area of the blob and the area of the bounding box of each blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_BOX_X_MAX +

Retrieves the extreme right X-coordinate of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_BOX_X_MIN +

Retrieves the extreme left X-coordinate of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_BOX_Y_MAX +

Retrieves the extreme bottom Y-coordinate of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_BOX_Y_MIN +

Retrieves the extreme top Y-coordinate of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_BREADTH +

Retrieves a measure of the true breadth of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_COMPACTNESS +

Retrieves the compactness of each blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_CONVEX_HULL_AREA +

Retrieves the area of the convex hull of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_CONVEX_HULL_COG_X +

Retrieves the X-component of the center of gravity of the convex hull of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_CONVEX_HULL_COG_Y +

Retrieves the Y-component of the center of gravity of the convex hull of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_CONVEX_HULL_FILL_RATIO +

Retrieves the ratio, for each blob, between the blob's area and the area of its convex hull.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_CONVEX_HULL_PERIMETER +

Retrieves the perimeter of the convex hull of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_CONVEX_PERIMETER +

Retrieves an approximation of the perimeter of the convex hull of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_ELONGATION +

Retrieves a value that is equal to M_LENGTH / M_BREADTH of each blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_EULER_NUMBER +

Retrieves the number of blobs minus the number of holes (number of blobs - number of holes). This value is more useful if calculated using the M_WHOLE_IMAGE processing mode instead of the M_INDIVIDUAL processing mode.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_FERET_AT_PRINCIPAL_AXIS_ANGLE +

Retrieves the Feret diameter at the principal axis of each blob.

The principal axis is the axis at which the blob has the least moment of inertia. Also, if the blob is symmetrical, the principal axis is aligned with the blob's axis of symmetry.

You can retrieve the angle of the principal axis, by calling MblobGetResult() with M_AXIS_PRINCIPAL_ANGLE.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_AT_SECONDARY_AXIS_ANGLE +

Retrieves the Feret diameter at the secondary axis of each blob.

The secondary axis is perpendicular to the principal axis. You can retrieve the angle of the secondary axis by calling MblobGetResult() with M_AXIS_SECONDARY_ANGLE.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_ELONGATION +

Retrieves a measure of the shape of each blob. It is equal to M_FERET_MAX_DIAMETER / M_FERET_MIN_DIAMETER.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_FERET_MAX_ANGLE +

Retrieves the angle, in degrees, at which the maximum Feret diameter is found for each blob, relative to the output coordinate system specified using MblobControl() with M_RESULT_OUTPUT_UNITS.

An angle interpreted with respect to the pixel coordinate system is always measured counter-clockwise. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system, see the Angle convention in MIL subsection of the Working with real-world units section of Chapter 25: Calibrating your camera setup.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_MAX_DIAMETER +

Retrieves the largest Feret diameter found after checking a certain number of angles.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_MAX_DIAMETER_ELONGATION +

Retrieves the ratio of the maximum Feret diameter of each blob by its perpendicular Feret diameter.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_FERET_MEAN_DIAMETER +

Retrieves the average of the Feret diameters at the angles checked for each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_MIN_ANGLE +

Retrieves the angle, in degrees, at which the minimum Feret diameter is found for each blob, relative to the output coordinate system specified using MblobControl() with M_RESULT_OUTPUT_UNITS.

An angle interpreted with respect to the pixel coordinate system is always measured counter-clockwise. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system, see the Angle convention in MIL subsection of the Working with real-world units section of Chapter 25: Calibrating your camera setup.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_MIN_DIAMETER +

Retrieves the smallest Feret diameter found after checking a certain number of angles.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_MIN_DIAMETER_ELONGATION +

Retrieves the ratio of the minimum Feret diameter of each blob by its perpendicular Feret diameter.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_FERET_PERPENDICULAR_TO_MAX_DIAMETER +

Retrieves the Feret diameter for each blob that is perpendicular to the maximum Feret diameter.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_PERPENDICULAR_TO_MIN_DIAMETER +

Retrieves the Feret diameter for each blob that is perpendicular to the minimum Feret diameter.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_PRINCIPAL_AXIS_ELONGATION +

Retrieves the ratio, for each blob, of the Feret diameter at the principal axis to the Feret diameter at the secondary axis. It is equal to M_FERET_AT_PRINCIPAL_AXIS_ANGLE / M_FERET_AT_SECONDARY_AXIS_ANGLE.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_FERET_X +

Retrieves the dimension of the minimum bounding box of each blob, in the horizontal direction.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_Y +

Retrieves the dimension of the minimum bounding box of each blob, in the vertical direction.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_FIRST_POINT_X +

Retrieves (along with M_FIRST_POINT_Y) a unique point for each blob, that is always on the perimeter of the blob. The X-coordinate is that of the left-most pixel on the top-most line of the blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_FIRST_POINT_Y +

Retrieves (along with M_FIRST_POINT_X) a unique point for each blob, that is always on the perimeter of the blob. The Y-coordinate is that of the top-most line of the blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_GENERAL_FERET +

Retrieves the Feret diameter at the specified angle.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_GENERAL_MOMENT +

Retrieves the moment calculation.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_INTERCEPT_0 +

Retrieves the number of times a transition from background to foreground (not vice versa) occurs in the horizontal direction for the entire blob. In other words, it is equal to the number of times the neighborhood configuration [B, F] occurs in a blob, where B is a background pixel and F is a foreground pixel.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_INTERCEPT_45 +

Determines the number of times that the neighborhood configuration occurs in a blob, where F is a foreground pixel, B is a background pixel, and a dot can be any pixel value.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_INTERCEPT_90 +

Determines the number of times that the neighborhood configuration occurs in a blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_INTERCEPT_135 +

Determines the number of times that the neighborhood configuration occurs in a blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_LABEL_VALUE +

Retrieves the label value for each blob in an image. This is a positive integer (>= 1) that is unique for each blob.

(summarize)
Collapse M_LENGTH +

Retrieves a measure of the true length of each blob, although it is only accurate for certain object types (for example, long thin ones) because it is derived from the perimeter (P) and area (A) assuming that P = 2(length + breadth) and A = length x breadth.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_AREA_BOX_ANGLE +

Retrieves the angle of the minimum-area bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_AREA_BOX_AREA +

Retrieves the area of the minimum-area bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_AREA_BOX_CENTER_X +

Retrieves the X-coordinate of the center of the minimum-area bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_AREA_BOX_CENTER_Y +

Retrieves the Y-coordinate of the center of the minimum-area bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_AREA_BOX_HEIGHT +

Retrieves the height (shortest side) of the minimum-area bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_AREA_BOX_PERIMETER +

Retrieves the perimeter of the minimum-area bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_AREA_BOX_WIDTH +

Retrieves the width (longest side) of the minimum-area bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_AREA_BOX_Xn +

Retrieves the X-coordinate of the n th vertex of the minimum-area bounding box of each blob, where n stands for an integer between 1 and 4.

Note that due to potential rotations of the bounding box, the labelling of the vertices might be inconsistent.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_AREA_BOX_Yn +

Retrieves the Y-coordinate of the n th vertex of the minimum-area bounding box of each blob, where n stands for an integer between 1 and 4.

Note that due to potential rotations of the bounding box, the labelling of the vertices might be inconsistent.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_PERIMETER_BOX_ANGLE +

Retrieves the angle of the minimum-perimeter bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_PERIMETER_BOX_AREA +

Retrieves the area of the minimum-perimeter bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_PERIMETER_BOX_CENTER_X +

Retrieves the X-coordinate of the center of the minimum-perimeter bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_PERIMETER_BOX_CENTER_Y +

Retrieves the Y-coordinate of the center of the minimum-perimeter bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_PERIMETER_BOX_HEIGHT +

Retrieves the height (shortest side) of the minimum-perimeter bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_PERIMETER_BOX_PERIMETER +

Retrieves the perimeter of the minimum-perimeter bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_PERIMETER_BOX_WIDTH +

Retrieves the width (longest side) of the minimum-perimeter bounding box of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_PERIMETER_BOX_Xn +

Retrieves the X-coordinate of the n th vertex of the minimum-perimeter bounding box of each blob, where n stands for an integer between 1 and 4.

Note that due to potential rotations of the bounding box, the labelling of the vertices might be inconsistent.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_MIN_PERIMETER_BOX_Yn +

Retrieves the Y-coordinate of the n th vertex of the minimum-perimeter bounding box of each blob, where n stands for an integer between 1 and 4.

Note that due to potential rotations of the bounding box, the labelling of the vertices might be inconsistent.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_NUMBER_OF_CHAINED_PIXELS +

Retrieves the number of chained pixels for each blob.

(summarize)
Collapse M_NUMBER_OF_CONVEX_HULL_POINTS +

Retrieves the number of points on the convex perimeter of each blob.

(summarize)
Collapse M_NUMBER_OF_HOLES +

Retrieves the number of holes in each blob. Holes that intersect the edge of the image are not counted (they might not be holes). This value is equal to 1 - M_EULER_NUMBER and is therefore a true hole count if calculated using the M_INDIVIDUAL processing mode.

(summarize)
Collapse M_NUMBER_OF_RUNS +

Retrieves the total number of runs in each blob.

(summarize)
Collapse M_PERIMETER +

Retrieves the total length of edges in each blob (including the edges of any holes), with an allowance made for the staircase effect that is produced when diagonal edges are digitized (inside corners are counted as 1.414, rather than 2.0). A single pixel blob (area = 1) has a perimeter of 4.0.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_RECTANGULARITY +

Retrieves the degree to which each blob is similar to a rectangle. To do this, MblobGetResult() calculates the ratio of the blob's area to the product of its minimum Feret diameter and the Feret diameter perpendicular to the minimum Feret diameter.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_ROUGHNESS +

Retrieves a measure of how rough a blob is and is equal to M_PERIMETER / M_CONVEX_PERIMETER. A smooth convex blob will have the minimum roughness of 1.0.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_TOTAL_NUMBER_OF_RUNS +

Retrieves the total number of runs in all blobs in the target image.

(summarize)
Collapse M_WORLD_BOX_X_MAX +

Retrieves the extreme right X-coordinate of each blob, calculated in the relative coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_WORLD_BOX_X_MIN +

Retrieves the extreme left X-coordinate of each blob, calculated in the relative coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_WORLD_BOX_Y_MAX +

Retrieves the extreme bottom Y-coordinate of each blob, calculated in the relative coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_WORLD_BOX_Y_MIN +

Retrieves the extreme top Y-coordinate of each blob, calculated in the relative coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_WORLD_FERET_X +

Retrieves the dimension of each blob's Feret diameter, in the horizontal direction, calculated in the relative coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_WORLD_FERET_Y +

Retrieves the dimension of each blob's Feret diameter, in the vertical direction, calculated in the relative coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_WORLD_X_AT_Y_MAX +

Retrieves the X-coordinate at the maximum Y-coordinate of each blob, calculated in the relative coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_WORLD_X_AT_Y_MIN +

Retrieves the X-coordinate at the minimum Y-coordinate of each blob, calculated in the relative coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_WORLD_Y_AT_X_MAX +

Retrieves the Y-coordinate at the maximum X-coordinate of each blob, calculated in the relative coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_WORLD_Y_AT_X_MIN +

Retrieves the Y-coordinate at the minimum X-coordinate of each blob, calculated in the relative coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_X_MAX_AT_Y_MAX +

Retrieves the maximum X-coordinate at the maximum Y-coordinate of each blob, calculated in the pixel coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_X_MAX_AT_Y_MIN +

Retrieves the maximum X-coordinate at the minimum Y-coordinate of each blob, calculated in the pixel coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_X_MIN_AT_Y_MAX +

Retrieves the minimum X-coordinate at the maximum Y-coordinate of each blob, calculated in the pixel coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_X_MIN_AT_Y_MIN +

Retrieves the minimum X-coordinate at the minimum Y-coordinate of each blob, calculated in the pixel coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_Y_MAX_AT_X_MAX +

Retrieves the maximum Y-coordinate at the maximum X-coordinate of each blob, calculated in the pixel coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_Y_MAX_AT_X_MIN +

Retrieves the maximum Y-coordinate at the minimum X-coordinate of each blob, calculated in the pixel coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_Y_MIN_AT_X_MAX +

Retrieves the minimum Y-coordinate at the maximum X-coordinate of each blob, calculated in the pixel coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_Y_MIN_AT_X_MIN +

Retrieves the minimum Y-coordinate at the minimum X-coordinate of each blob, calculated in the pixel coordinate system.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)

You can add one of the following values to the above-mentioned values to specify to retrieve the contact points of the Feret.

function map For retrieving Feret contact points
CollapseCombination value Description
Collapse M_FERET_CONTACT_POINTS_X1

Retrieves the X-coordinate for the first contact point of the Feret diameter of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_CONTACT_POINTS_X2

Retrieves the X-coordinate for the second contact point of the Feret diameter of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_CONTACT_POINTS_Y1

Retrieves the Y-coordinate for the first contact point of the Feret diameter of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_FERET_CONTACT_POINTS_Y2

Retrieves the Y-coordinate for the second contact point of the Feret diameter of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)

To retrieve the result for a grayscale feature, select one of the following. Results for these features are only available if both a blob identifier image and a grayscale image were passed to MblobCalculate() (and the features were selected for calculation).

Unless otherwise specified, the following values require that you pass the TargetArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to the number of currently included blobs. This number can be obtained using MblobGetNumber() (When retrieving the result from the currently included blobs.) .

function map For retrieving results for a grayscale feature with blob identifier and grayscale image
CollapseFeature Description
TargetArrayPtr
- Possible values returned
Collapse M_BLOB_CONTRAST +

Retrieves the difference between the maximum and minimum pixel values of a blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_MAX_PIXEL +

Retrieves the maximum pixel value found in each blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_MEAN_PIXEL +

Retrieves the mean pixel value in each blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_MIN_PIXEL +

Retrieves the minimum pixel value found in each blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_SIGMA_PIXEL +

Retrieves the standard deviation of pixel values in each blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_SUM_PIXEL +

Retrieves the sum of all pixel values in each blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_SUM_PIXEL_SQUARED +

Retrieves the sum of the squares of each pixel value in each blob.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)

To retrieve the result for a feature that has two different definitions (a binary and a grayscale definition), select one of the following values. If you did not provide both a blob identifier image and a grayscale image, only the binary version was calculated. If you did provide a grayscale image, both versions were calculated, unless otherwise specified. If both versions were calculated and no version is specified, then the grayscale version of the feature is retrieved.

Unless otherwise specified, the following values require that you pass the TargetArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to the number of currently included blobs. This number can be obtained using MblobGetNumber() (When retrieving the result from the currently included blobs.) .

function map For retrieving results for a feature that has two different definitions
CollapseFeature Description
TargetArrayPtr
- Possible values returned
Collapse M_AXIS_PRINCIPAL_ANGLE +

Retrieves the angle, in degrees, at which each blob has the least moment of inertia. For elongated blobs, it is aligned with the longest axis. The result is always between -90° and +90°, relative to the output coordinate system specified using MblobControl() with M_RESULT_OUTPUT_UNITS.

An angle interpreted with respect to the pixel coordinate system is always measured counter-clockwise. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system, see the Angle convention in MIL subsection of the Working with real-world units section of Chapter 25: Calibrating your camera setup.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_AXIS_SECONDARY_ANGLE +

Retrieves the angle perpendicular to M_AXIS_PRINCIPAL_ANGLE of each blob, in degrees. It is always between -90° and +90°, relative to the output coordinate system specified using MblobControl() with M_RESULT_OUTPUT_UNITS.

An angle interpreted with respect to the pixel coordinate system is always measured counter-clockwise. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system, see the Angle convention in MIL subsection of the Working with real-world units section of Chapter 25: Calibrating your camera setup.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into world units, taking into account distortions as best as possible.

(summarize)
Collapse M_CENTER_OF_GRAVITY_X +

Retrieves the X-position of the center of gravity of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_CENTER_OF_GRAVITY_Y +

Retrieves the Y-position of the center of gravity of each blob.

If you requested to retrieve results in world units with M_RESULT_OUTPUT_UNITS and the calculation was performed on appropriate buffers, the results returned are transformed into the relative coordinate system, taking into account distortions as best as possible.

(summarize)
Collapse M_MOMENT_CENTRAL_X0_Y2 +

Retrieves the central moment for each blob where the order of X equals 0 and the order of Y equals 2.

Results are only available in pixel units.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_MOMENT_CENTRAL_X1_Y1 +

Retrieves the central moment for each blob where the order of X equals 1 and the order of Y equals 1.

Results are only available in pixel units.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_MOMENT_CENTRAL_X2_Y0 +

Retrieves the central moment for each blob where the order of X equals 2 and the order of Y equals 0.

Results are only available in pixel units.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_MOMENT_X0_Y1 +

Retrieves the ordinary moment for each blob where the order of X equals 0 and the order of Y equals 1.

This calculation returns the mean of Y for each blob.

Results are only available in pixel units.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_MOMENT_X0_Y2 +

Retrieves the ordinary moment for each blob where the order of X equals 0 and the order of Y equals 2.

Results are only available in pixel units.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_MOMENT_X1_Y0 +

Retrieves the ordinary moment for each blob where the order of X equals 1 and the order of Y equals 0.

This calculation returns the mean of X for each blob.

Results are only available in pixel units.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_MOMENT_X1_Y1 +

Retrieves the ordinary moment for each blob where the order of X equals 1 and the order of Y equals 1.

Results are only available in pixel units.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Collapse M_MOMENT_X2_Y0 +

Retrieves the ordinary moment for each blob where the order of X equals 2 and the order of Y equals 0.

Results are only available in pixel units.

Even if you requested to retrieve results in world units, the results returned will remain in pixel units.

(summarize)
Combination constants for the values listed in For retrieving results for a feature that has two different definitions.

You can add one of the following values to the above-mentioned values to set whether the results should be returned for the binary or grayscale version of the selected feature.

function map For feature parameters that have two definitions
CollapseCombination value Description
Collapse M_BINARY +

Retrieves the result for the binary version of the selected feature.

Collapse M_GRAYSCALE +

Retrieves the result for the grayscale version of the selected feature.

This is the default value.

(summarize)

You can add one of the following values to the above-mentioned values to set the requested results to a data type.

function map For specifying a data type
CollapseFeature Description
TargetArrayPtr
- Possible values returned
Collapse M_TYPE_CHAR

Casts the requested results to a char.

(summarize)
Collapse TargetArrayPtr data type info

Data type: array of type char
Array size: Number of currently included blobs (MblobGetNumber())
Note: When retrieving the result from the currently included blobs.

Collapse M_TYPE_MIL_DOUBLE

Casts the requested results to a MIL_DOUBLE.

(summarize)
Collapse TargetArrayPtr data type info
  • Data type: array of type MIL_DOUBLE
    Array size: Number of currently included blobs (MblobGetNumber())
    Note: When retrieving the result from the currently included blobs.

  • Data type: MIL_DOUBLE
    Note: When retrieving timing results with M_TIMEOUT_END.

Collapse M_TYPE_MIL_FLOAT

Casts the requested results to a MIL_FLOAT.

(summarize)
Collapse TargetArrayPtr data type info

Data type: array of type MIL_FLOAT
Array size: Number of currently included blobs (MblobGetNumber())
Note: When retrieving the result from the currently included blobs.

Collapse M_TYPE_MIL_INT

Casts the requested results to a MIL_INT.

(summarize)
Collapse TargetArrayPtr data type info

Data type: array of type MIL_INT
Array size: Number of currently included blobs (MblobGetNumber())
Note: When retrieving the result from the currently included blobs.

Collapse M_TYPE_MIL_INT16

Casts the requested results to a MIL_INT16.

(summarize)
Collapse TargetArrayPtr data type info

Data type: array of type MIL_INT16
Array size: Number of currently included blobs (MblobGetNumber())
Note: When retrieving the result from the currently included blobs.

Collapse M_TYPE_MIL_INT32

Casts the requested results to a MIL_INT32.

(summarize)
Collapse TargetArrayPtr data type info

Data type: array of type MIL_INT32
Array size: Number of currently included blobs (MblobGetNumber())
Note: When retrieving the result from the currently included blobs.

Collapse M_TYPE_MIL_INT64

Casts the requested results to a MIL_INT64.

(summarize)
Collapse TargetArrayPtr data type info

Data type: array of type MIL_INT64
Array size: Number of currently included blobs (MblobGetNumber())
Note: When retrieving the result from the currently included blobs.

To retrieve a result that specifies whether a limit is reached, select one of the values specified in the table below:

Unless otherwise specified, the following values require that you pass the TargetArrayPtr parameter the address of a MIL_DOUBLE.

function map For retrieving results of reaching limits
CollapseFeature Description
TargetArrayPtr
- Possible values returned
Collapse M_MAX_BLOBS_END

Retrieves whether the maximum number of blobs was reached. This limit is set using MblobControl() with M_MAX_BLOBS.

(summarize)
Collapse M_FALSE

Specifies that the maximum number of blobs was not reached.

Collapse M_TRUE

Specifies that the maximum number of blobs was reached.

Collapse M_TIMEOUT_END

Retrieves whether the timeout limit was reached. You can see the timeout limit using MblobControl() with M_TIMEOUT.

(summarize)
Collapse M_FALSE

Specifies that the timeout limit was not reached.

Collapse M_TRUE

Specifies that the timeout limit was reached.

Compilation information
Header Include mil.h.
Library Use mil.lib; milblob.lib.
DLL Requires mil.dll; milblob.dll.
ALL FERETS AREA BLOB INCLUSION STATE EXCLUDED INCLUDED BLOB TOUCHING IMAGE BORDERS NO YES BOX AREA BOX ASPECT RATIO BOX FILL RATIO BOX X MAX BOX X MIN BOX Y MAX BOX Y MIN BREADTH COMPACTNESS CONVEX HULL AREA CONVEX HULL COG X CONVEX HULL COG Y CONVEX HULL FILL RATIO CONVEX HULL PERIMETER CONVEX PERIMETER ELONGATION EULER NUMBER FERET AT PRINCIPAL AXIS ANGLE FERET AT SECONDARY AXIS ANGLE FERET ELONGATION FERET MAX ANGLE FERET MAX DIAMETER FERET MAX DIAMETER ELONGATION FERET MEAN DIAMETER FERET MIN ANGLE FERET MIN DIAMETER FERET MIN DIAMETER ELONGATION FERET PERPENDICULAR TO MAX DIAMETER FERET PERPENDICULAR TO MIN DIAMETER FERET PRINCIPAL AXIS ELONGATION FERET X FERET Y FIRST POINT X FIRST POINT Y GENERAL FERET GENERAL MOMENT INTERCEPT 0 INTERCEPT 45 INTERCEPT 90 INTERCEPT 135 LABEL VALUE LENGTH MIN AREA BOX ANGLE MIN AREA BOX AREA MIN AREA BOX CENTER X MIN AREA BOX CENTER Y MIN AREA BOX HEIGHT MIN AREA BOX PERIMETER MIN AREA BOX WIDTH MIN AREA BOX Xn MIN AREA BOX Yn MIN PERIMETER BOX ANGLE MIN PERIMETER BOX AREA MIN PERIMETER BOX CENTER X MIN PERIMETER BOX CENTER Y MIN PERIMETER BOX HEIGHT MIN PERIMETER BOX PERIMETER MIN PERIMETER BOX WIDTH MIN PERIMETER BOX Xn MIN PERIMETER BOX Yn NUMBER OF CHAINED PIXELS NUMBER OF CONVEX HULL POINTS NUMBER OF HOLES NUMBER OF RUNS PERIMETER RECTANGULARITY ROUGHNESS TOTAL NUMBER OF RUNS WORLD BOX X MAX WORLD BOX X MIN WORLD BOX Y MAX WORLD BOX Y MIN WORLD FERET X WORLD FERET Y WORLD X AT Y MAX WORLD X AT Y MIN WORLD Y AT X MAX WORLD Y AT X MIN X MAX AT Y MAX X MAX AT Y MIN X MIN AT Y MAX X MIN AT Y MIN Y MAX AT X MAX Y MAX AT X MIN Y MIN AT X MAX Y MIN AT X MIN FERET CONTACT POINTS X1 FERET CONTACT POINTS X2 FERET CONTACT POINTS Y1 FERET CONTACT POINTS Y2 BLOB CONTRAST MAX PIXEL MEAN PIXEL MIN PIXEL SIGMA PIXEL SUM PIXEL SUM PIXEL SQUARED AXIS PRINCIPAL ANGLE AXIS SECONDARY ANGLE CENTER OF GRAVITY X CENTER OF GRAVITY Y MOMENT CENTRAL X0 Y2 MOMENT CENTRAL X1 Y1 MOMENT CENTRAL X2 Y0 MOMENT X0 Y1 MOMENT X0 Y2 MOMENT X1 Y0 MOMENT X1 Y1 MOMENT X2 Y0 BINARY GRAYSCALE TYPE CHAR TYPE MIL DOUBLE TYPE MIL FLOAT TYPE MIL INT TYPE MIL INT16 TYPE MIL INT32 TYPE MIL INT64 MAX BLOBS END FALSE TRUE TIMEOUT END FALSE TRUE BINARY GRAYSCALE TIMEOUT END TIMEOUT END