Hblob = vision.BlobAnalysis returns a blob analysis object, H , used to compute statistics for connected regions in a binary image.
Hblob = vision.BlobAnalysis( Name,Value ) sets properties using one or more name-value pairs. Enclose each property name in quotes. For example, Hblob = vision.BlobAnalysis('AreaOutputPort',true)
Unless otherwise indicated, properties are nontunable , which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.
If a property is tunable , you can change its value at any time.
For more information on changing property values, see System Design in MATLAB Using System Objects.
Return blob area, specified as true or false .
Return coordinates of blob centroids, specified as true or false .
Return coordinates of bounding boxes, specified as true or false .
Return vector whose values represent lengths of ellipses' major axes, specified as true or false . Set this property to true to output a vector whose values represent the lengths of the major axes of the ellipses that have the same normalized second central moments as the labeled regions. This property applies when you set the OutputDataType property to double or single .
Return vector whose values represent lengths of ellipses' minor axes, specified as true or false . Set this property to true to output a vector whose values represent the lengths of the minor axes of the ellipses that have the same normalized second central moments as the labeled regions. This property is available when the OutputDataType property is double or single .
Return vector whose values represent angles between ellipses' major axes and x-axis, specified as true or false . Set this property to true to output a vector whose values represent the angles between the major axes of the ellipses and the x-axis. This property applies when you set the OutputDataType property to double or single .
Return vector whose values represent ellipses' eccentricities, specified as true or false . Set this property to true to output a vector whose values represent the eccentricities of the ellipses that have the same second moments as the region. This property applies when you set the OutputDataType property to double or single .
Return vector whose values represent equivalent diameters squared, specified as true or false . Set this property to true to output a vector whose values represent the equivalent diameters squared.
Return vector whose values represent results of dividing blob areas by bounding box areas, specified as true or false .
Return vector whose values represent estimates of blob perimeter lengths, specified as true or false .
Output data type of statistics, specified as double , single , or Fixed point . Area and bounding box outputs are always an int32 data type. Major axis length , Minor axis length , Orientation and Eccentricity do not apply when you set this property to Fixed point .
Connected pixels, specified as 4 or 8 .
Maximum number of labeled regions in each input image, specified as a positive scalar integer. The maximum number of blobs the object outputs depends on both the value of this property, and on the size of the input image. The number of blobs the object outputs may be limited by the input image size.
Minimum blob area in pixels, specified as positive scalar integer.
Tunable: Yes
Maximum blob area in pixels, specified as an integer.
Tunable: Yes
Exclude blobs that contain at least one image border pixel, specified as true or false .
Maximum number of labeled regions in each input image, specified as a positive scalar integer. The maximum number of blobs the object outputs depends on both the value of this property, and on the size of the input image. The number of blobs the object outputs may be limited by the input image size
Rounding method for fixed-point operations, specified as 'Floor' , 'Ceiling' , 'Convergent' , 'Nearest' , 'Round' , 'Simplest' , or 'Zero' .
Action to take when integer input is out-of-range, specified as 'Wrap' or 'Saturate' .
Product data type, specified as 'Same as input' or 'Custom' .
Product word and fraction lengths, specified as a scaled numerictype (Fixed-Point Designer) object. This property applies only when you set the AccumulatorDataType property to 'Custom' .
Data type of accumulator, specified as 'Same as product' , 'Same as input' , or 'Custom' .
Accumulator word and fraction lengths, specified as a scaled numerictype (Fixed-Point Designer) object. This property applies only when you set the AccumulatorDataType property to 'Custom' .
[ area , centroid , bbox ] = Hblob( bw ) returns the area, centroid, and the bounding box of the blobs when the AreaOutputPort , CentroidOutputPort and BoundingBoxOutputPort properties are set to true . These are the only properties that are set to true by default. If you set any additional properties to true , the corresponding outputs follow the area , centroid , and bbox outputs.
[ ___ , majoraxis ] = Hblob( bw ) computes the major axis length majoraxis of the blobs found in input binary image bw when you set the MajorAxisLengthOutputPort property to true .
[ ___ , minoraxis ] = Hblob( bw ) computes the minor axis length minoraxis of the blobs found in input binary image BW when you set the MinorAxisLengthOutputPort property to true .
[ bw ___ , orientation ] = Hblob( bw ) computes the orientation of the blobs found in input binary image bw when you set the OrientationOutputPort property to true .
[ ___ , eccentricity ] = Hblob( bw ) computes the eccentricity of the blobs found in input binary image bw when you set the EccentricityOutputPort property to true .
[ ___ , EQDIASQ ] = Hblob( bw ) computes the equivalent diameter squared EQDIASQ of the blobs found in input binary image bw when you set the EquivalentDiameterSquaredOutputPort property to true .
[ ___ , EXTENT ] = Hblob( bw ) computes the EXTENT of the blobs found in input binary image bw when the ExtentOutputPort property is set to true .
[ ___ , perimeter ] = Hblob( bw ) computes the perimeter of the blobs found in input binary image bw when you set the PerimeterOutputPort property to true .
[ ___ , label ] = Hblob( bw ) returns a label matrix label of the blobs found in input binary image bw when you set the LabelMatrixOutputPort property to true.