AddBlobRule2
Use this method to define the constraints for a blob to be detected. You can add several rules to specify different kinds of blobs. In comparison to AddBlobRule two additional parameters MinMass and MinProportion are available for more control over the blob detection.
Public Sub AddBlobRule2 (MinMass As Long, MaxMass As Long, MinProportion As Long, MaxProportion As Long, MinWidth As Long, MaxWidth As Long, MinHeight As Long, MaxHeight As Long, MinSeparation As Long, bDiagonal As Boolean)
- MinMass
-
Defines the minimum number of pixels for a blob.
- MaxMass
-
Defines the maximum number of pixels for a blob.
- MinProportion
-
Defines the minimum proportion for a blob. Proportion is the ratio (in percent) of black pixels in comparison to the pixels of the bounding rectangle, which is the minimal rectangle that surrounds the blob. Common ranges for proportions are: hand written signatures 5-30%, handprinted text 20-50%, machine printed text 30-80%.
- MaxProportion
-
Defines the maximum proportion for a blob. Proportion is the ratio (in percent) of black pixels in comparison to the pixels of the bounding rectangle, which is the minimal rectangle that surrounds a blob. Common ranges for proportions are: hand written signatures 5-30%, handprinted text 20-50%, machine printed text 30-80%.
- MinWidth
-
Defines the minimum width of a blob in pixels.
- MaxWidth
-
Defines the maximum width of a blob in pixels.
- MinHeight
-
Defines the minimum height of a blob in pixels.
- MaxHeight
-
Defines the maximum height of a blob in pixels.
- MinSeparation
-
Minimum distance in pixels between a blob and its neighbors.
- bDiagonal
-
If set to TRUE, diagonal connections are considered in defining a blob. If set to FALSE, only those pixels that are connected horizontally or vertically are considered to define a blob.