next up previous contents
Next: Calculating features based on Up: BLOB analysis methods Previous: BLOB analysis methods

Calculating feature distributions based on blobs

 

uad Calculate feature distribution for thresholded blobs
-in <image> input image
-out <distr> output distribution in a field
-val <thres> absolute gray level for thresholding
[-feat <featnbr>] calculated feature

This command thresholds gray scale image using gray level thres. Each dark area is considered as a blob (a floc when using paper images) and feature featnbr is calculated for each of them. The distribution is formed from these measurements. Results are scaled so that distribution extends approximately from 0 to 2000. Parameter featnbr specifies measured property as follows:

featnbr measured property
1 area (default)
2 perimeter (length of edge)
3 volume
4 roundness
5 radii (proportion of longest and shortest radius)
6 eccentricity (almost similar to roundness and radii)
7 steepness
8 orientation

Example: Following commands load an image and plot perimeter distribution of flocs that are segmented using threshold 182. Note, that negative image must be used because dark areas are considered blobs and in original paper picture flocs are light.

...
# Load image
NDA> loadimg paper.gif img_in
NDA> cnvimg -in img_in -out img_gray -gray
# Make negative image so that flocs are dark
NDA> negative -in img_gray -out img_neg
# Calculate perimeter distribution
NDA> uad -in img_neg -out distr -val 182 -feat 2
# Plot the distribution
NDA> mkgrp g
NDA> ldgrv g -f distr -co black
NDA> show g


next up previous contents
Next: Calculating features based on Up: BLOB analysis methods Previous: BLOB analysis methods

Anssi Lensu
Thu May 17 15:00:44 EET DST 2001