Click here to show toolbars of the Web Online Help System: show toolbars |
Table: | For operations on blobs |
MIL_ID ResultBlobId, | //in |
MIL_INT64 Operation, | //in |
MIL_INT64 SelectionCriterion, | //in |
MIL_INT64 Condition, | //in |
MIL_DOUBLE CondLow, | //in |
MIL_DOUBLE CondHigh | //in |
This function selects or merges blobs that meet a specified criterion. These blobs will be included in or excluded from future operations (calculations or result retrieval), or deleted entirely from the result buffer. Selection criterion can be based on a calculated feature or on the current status of the blobs. MblobCalculate() must have been called at least once before calling this function.
If this function is not called at least once, all blobs are included by default. If there is more than one call to this function, the effect of the calls is cumulative unless M_INCLUDE_ONLY or M_EXCLUDE_ONLY is specified as the operation to perform.
If a blob is excluded or deleted, its index is reassigned; that is, the index of blobs with indices greater than that of the excluded/deleted blob are reduced by one. This ensures that included blobs have consecutive indices. Label values of included and excluded blobs, however, are left as is; therefore, it is possible to specify the label value of an excluded blob. Deleted blobs label values are set to 0.
The Blob Analysis result buffer's index will be updated so that all consecutive index values remain valid. The label values however do not get updated, therefore it is possible to specify the label value of an excluded blob.
Once a blob has been excluded, it can normally be re-included only by specifying M_INCLUDE or M_INCLUDE_ONLY in a future call to this function (with the correct criterion). However, if you change the processing mode of a Blob analysis context (using MblobControl()), or use the result buffer with different images, the subsequent call to MblobCalculate() will cause all results in the buffer to be discarded and all blobs will be re-included.
The limits of the blob selection criterion are set using the CondLow and CondHigh parameters. If the blobs were taken from a calibrated image, these parameters can be set in pixel units or world units. To set the units, use MblobControl() with M_INPUT_SELECT_UNITS. Note that if you set this control type to M_WORLD but you don't pass MblobSelect() a result buffer whose results were obtained from a calibrated target image, the function will generate an error.
Specifies the identifier of the Blob Analysis result buffer to use in the blob selection process.
Specifies the operation to perform on the specified blobs. This parameter can be set to one of the following.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Deletes blobs that meet the specified condition. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Excludes all blobs that meet the specified condition. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Excludes only those blobs that meet the specified condition and includes all others. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Includes all blobs that meet the specified condition. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Includes only those blobs that meet the specified condition and excludes all others. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Groups all the blobs that meet the specified condition. |
Specifies the feature to use as part of the selection criterion or the status of the blobs to affect. See MblobControl() for a full description of the features. The specified result buffer must already contain the results for the specified feature.
To use as part of the criterion a feature that has only a binary definition, select one of the following.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the number of foreground pixels in a blob (holes are not counted). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses all blobs that touched the border of the blob identifier image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the area covered by the bounding box of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the ratio of the horizontal size to the vertical size of the bounding box of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the ratio of the area of a blob to the area of the bounding box of the blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the extreme right coordinate of the bounding box of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the extreme left coordinate of the bounding box of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the extreme bottom coordinate of the bounding box of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the extreme top coordinate of the bounding box of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the breadth of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the compactness feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the area of the convex hull of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the X-component of the center of gravity of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the Y-component of the center of gravity of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the ratio of the area of a blob to the area of its convex hull. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the perimeter of the convex hull of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the approximation of the perimeter of the convex hull of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the elongation of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the number of blobs - number of holes. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the Feret diameter at the principal axis of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the Feret diameter at the secondary axis of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the measure of the shape of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the Feret diameter feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the angle at which the maximum Feret diameter is found, in degrees, relative to the input coordinate system specified using MblobControl() with M_INPUT_SELECT_UNITS. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the largest Feret diameter found after checking a certain number of angles. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the ratio of the maximum Feret diameter by its perpendicular Feret diameter. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the average Feret diameter at all the angles checked. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the angle at which the minimum Feret diameter is found, in degrees, relative to the input coordinate system specified using MblobControl() with M_INPUT_SELECT_UNITS. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the smallest Feret diameter found after checking a certain number of angles. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the ratio of the minimum Feret diameter by its perpendicular Feret diameter. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the Feret diameter that is perpendicular to the maximum Feret diameter. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the Feret diameter that is perpendicular to the minimum Feret diameter. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the ratio of the Feret diameter at the principal axis to the Feret diameter at the secondary axis. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the dimension of the minimum bounding box of a blob in the horizontal direction. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the dimension of the minimum bounding box of a blob in the vertical direction. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the x-coordinate of the top left-most pixel along the perimeter of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the y-coordinate of the top left-most pixel along the perimeter of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the index value. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the number of times a transition from background to foreground (not vice versa) occurs in the horizontal direction for the entire blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Determines the number of times that the neighborhood
configuration |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Determines the number of times that the neighborhood
configuration |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Determines the number of times that the neighborhood
configuration |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the label feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the measure of the true length of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the angle of the minimum-area bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the area of the minimum-area bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the X-coordinate of the center of the minimum-area bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the Y-coordinate of the center of the minimum-area bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the height of the minimum-area bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the perimeter of the minimum-area bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the width of the minimum-area bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the angle of the minimum-perimeter bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the area of the minimum-perimeter bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the X-coordinate of the center of the minimum-perimeter bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the Y-coordinate of the center of the minimum-perimeter bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the height of the minimum-perimeter bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the perimeter of the minimum-perimeter bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the width of the minimum-perimeter bounding box. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the moment calculation. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the number of chained pixels in a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the number of holes in a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the total number of runs in a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the total length of edges in a blob (including the edges of any holes), with an allowance made for the staircase effect that is produced when diagonal edges are digitized. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the degree to which a blob is similar to a rectangle. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the roughness feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the extreme right X-coordinate of a blob, calculated in the relative coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the extreme left X-coordinate of a blob, calculated in the relative coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the extreme bottom Y-coordinate of a blob, calculated in the relative coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the extreme top Y-coordinate of a blob, calculated in the relative coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the dimension of the minimum bounding box of a blob in the horizontal direction, calculated in the relative coordinate system (that is, M_WORLD_BOX_X_MAX - M_WORLD_BOX_X_MIN + 1). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the dimension of the minimum bounding box of a blob in the vertical direction, calculated in the relative coordinate system (that is, M_WORLD_BOX_Y_MAX - M_WORLD_BOX_Y_MIN + 1). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the X-coordinate at the maximum Y-coordinate of a blob, calculated in the relative coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the X-coordinate at the minimum Y-coordinate of a blob, calculated in the relative coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the Y-coordinate at the maximum X-coordinate of a blob, calculated in the relative coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the Y-coordinate at the minimum X-coordinate of a blob, calculated in the relative coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the maximum X-coordinate at the maximum Y-coordinate of the blob, calculated in the pixel coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the maximum X-coordinate at the minimum Y-coordinate of the blob, calculated in the pixel coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the minimum X-coordinate at the maximum Y-coordinate of the blob, calculated in the pixel coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the minimum X-coordinate at the minimum Y-coordinate of the blob, calculated in the pixel coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the maximum Y-coordinate at the maximum X-coordinate of the blob, calculated in the pixel coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the maximum Y-coordinate at the minimum X-coordinate of the blob, calculated in the pixel coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the minimum Y-coordinate at the maximum X-coordinate of the blob, calculated in the pixel coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the minimum Y-coordinate at the minimum X-coordinate of the blob, calculated in the pixel coordinate system. |
To use as part of the criterion a feature that has only a grayscale definition, select one of the following. You can specify one of these features as part of your selection criterion only if both a blob identifier image and a grayscale image were passed to MblobCalculate() (and the features were selected for calculation).
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the difference between the maximum and minimum pixel values of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the maximum pixel value in a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the mean pixel value in a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the minimum pixel value in a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the standard deviation of pixel values in a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the sum of all pixel values in a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the sum of the squares of the pixel values in a blob. |
To use as part of the criterion a feature that has two different definitions (a binary and a grayscale definition), select one of the following.
If you did not provide both a blob identifier image and a grayscale image to MblobCalculate(), only the binary version was calculated. If you did provide a grayscale image, both versions were calculated, unless otherwise specified. In the latter case, see combination values below to specify which to use as part of the criterion. If both versions were calculated and no version is specified, then the grayscale version of the feature is selected as criterion.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the angle, in degrees, at which a blob has the least moment of inertia, relative to the input coordinate system specified using MblobControl() with M_INPUT_SELECT_UNITS. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the angle, in degrees, perpendicular to M_AXIS_PRINCIPAL_ANGLE, relative to the input coordinate system specified using MblobControl() with M_INPUT_SELECT_UNITS. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the X-position of the center of gravity of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the Y-position of the center of gravity of a blob. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the central moment of a blob, where the order of X equals 0 and the order of Y equals 2. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the central moment of a blob, where the order of X equals 1 and the order of Y equals 1. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the central moment of a blob, where the order of X equals 2 and the order of Y equals 0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the ordinary moment of a blob, where the order of X equals 0 and the order of Y equals 1. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the ordinary moment of a blob, where the order of X equals 0 and the order of Y equals 2. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the ordinary moment of a blob, where the order of X equals 1 and the order of Y equals 0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the ordinary moment of a blob, where the order of X equals 1 and the order of Y equals 1. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the feature specifying the ordinary moment of a blob, where the order of X equals 2 and the order of Y equals 0. |
You can add one of the following values to the above-mentioned values to set whether to use the binary or grayscale version of the selected feature.
Note that the selected feature must have both a binary definition and a grayscale definition, and both versions must have been calculated.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the binary version of the selected feature. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses the grayscale version of the selected feature. |
To use as part of the selection criterion the current status of the blobs, set the SelectionCriterion parameter to one of the following values. For example, you can delete all currently excluded blobs from the list of blobs on which to operate.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses all blobs. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses all excluded blobs. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Uses all included blobs. |
Specifies the condition for the blob selection. This parameter must be set to one of the values below.
When the selection criterion is based on the current status of blobs or M_BLOB_TOUCHING_IMAGE_BORDERS, set the Condition parameter to M_NULL.
When the selection criterion is based on a feature (except M_BLOB_TOUCHING_IMAGE_BORDERS), you can specify one of the following conditions that use two limits (CondLow and CondHigh).
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that blobs with values for the specified feature in the range CondLow to CondHigh, inclusive, are included, excluded, or deleted from future operations on the specified result buffer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that blobs with values for the specified feature less than CondLow, or greater than CondHigh, are included, excluded, or deleted from future operations on the specified result buffer. |
When the selection criterion is based on a feature (except M_BLOB_TOUCHING_IMAGE_BORDERS), you can specify one of the following conditions that use only one limit (CondLow).
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that blobs with values for the specified feature equal to CondLow are included, excluded, or deleted from future operations on the specified result buffer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that blobs with values for the specified feature greater than CondLow are included, excluded, or deleted from future operations on the specified result buffer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that blobs with values for the specified feature greater than or equal to CondLow are included, excluded, or deleted from future operations on the specified result buffer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that blobs with values for the specified feature less than CondLow are included, excluded, or deleted from future operations on the specified result buffer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that blobs with values for the specified feature less than or equal to CondLow are included, excluded, or deleted from future operations on the specified result buffer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that blobs with values for the specified feature not equal to CondLow are included, excluded, or deleted from future operations on the specified result buffer. |
Specifies the lower limit of the selected condition.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that this parameter is not applicable. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the lower limit of the condition, relative to the input coordinate system specified using MblobControl() with M_INPUT_SELECT_UNITS. |
Specifies the upper limit of the selected condition.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that this parameter is not applicable. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the upper limit of the condition, relative to the input coordinate system specified using MblobControl() with M_INPUT_SELECT_UNITS. |
Header | Include mil.h. |
Library | Use mil.lib; milblob.lib. |
DLL | Requires mil.dll; milblob.dll. |