imgfeat | Calculate 40 blob features per image |
-in <image> | input image |
-out <featdata> | result data frame |
-val <thres> | threshold choosing |
flocfeat | Calculate 8 blob features per blob |
-in <image> | input image |
-out <featdata> | result data frame |
-val <thres> | threshold choosing |
These commands calculate blob-based features for given image. Command imgfeat forms eight distributions, area, perimeter, etc. and calculates mean, variance, skewness, kurtosis and entropy for all of these. This gives altogether 40 features for one image. Resulting data frame has 41 or 42 fields having one data record. First field (thres) tells absolute threshold and second field (quant) tells histogram quantile but only if threshold giving maximum amount of flocs was preferred. Rest of the fields tell values of features.
Command flocfeat measures each segmented blob and stores eight fields (are, per, ...) in the data frame. Now there are one data record for each segmented floc. Note, that amount of segmented flocs in paper images may be quite big.
Both commands have parameter thres that defines how segmentation of blobs is done. Following table lists possible values and their meaning.
thres | threshold choosing |
0...255 | absolute gray level |
-100...-1 | persentage of blob pixels (1...100 %) |
-101 | median of the gray level histogram |
-102 | mean of the gray level histogram |
-103 | mode of the gray level histogram |
-200 | threshold giving largest amount of blobs |
-300 | segmentation using floodfill-algorithm |
Example: Following commands calculate image features and floc features from paper image using 20 % quantile threshold.
... # Load image NDA> loadimg paper.gif img_in NDA> cnvimg -in img_in -out img_gray -gray NDA> negative -in img_gray -out img_neg # Calculate image features NDA> imgfeat -in img_neg -out imgdata -val -20 Getting image... Selecting threshold... Selected threshold: 181 Allocating memory... Segmentating image... Measuring objects... Calculating features... Inserting data... Done! # Calculate blob features NDA> imgfeat -in img_neg -out flocdata -val -20 Getting image... Selecting threshold... Selected threshold: 181 Allocating memory... Segmentating image... Measuring objects... Calculating features... Inserting data... Done!