Segments a directory of images with various methods. The method choices are:
Source | Outputs |
---|---|
![]() | ![]() ![]() |
Chart for the minsize/maxsize area restrictions:
Chart for the minround/maxround roundness restrictions:
Version | 2.3 |
---|---|
Bundle | anima |
Categories | Image Processing |
Authors | Ville Rantanen (ville.rantanen@helsinki.fi) |
Issue tracker | View/Report issues |
Requires | Matlab |
Source files | component.xml shapesegment.m imagesegment.m kmeanssegment.m snakesegment.m snakeiterate.m correlationsegment.m execute.m |
Usage | Example with default values |
Name | Type | Mandatory | Description |
---|---|---|---|
in | ImageList | Mandatory | A directory with grayscale image files. |
opt | ImageList | Optional | A directory with grayscale image files used in Correlation method. |
seed | MaskList | Optional | Masklist of objects as initial guess for the 'Snake' method. e.g. output from Ellipse2Masklist. |
Name | Type | Description |
---|---|---|
mask | ImageList | BW PNG images. |
perimeter | ImageList | BW PNG images of the perimeter of the mask. |
numbered | ImageList | BW PNG images of the numbers of the objects in the mask. Created only if parameter numbers is set true. |
masklist | MaskList | Image folder structure describing each object. One folder of images for each source image. |
Name | Type | Default | Description |
---|---|---|---|
clearBorders | boolean | true | Clear objects touching the image edges. Applicable to all methods. |
clusters | float | 2 | Clusters for KMeans method. The result mask will have as many gray scales as cluster number. Results with number higher than 2 will not be compatible with the feature measurements components, and object numbering doesn't work. |
constant | float | 0.5 | Constant value for threshdolding the images, for 'Constant' method. Range 0 to 1. Also, the area ratio in ConstantArea method. |
corr | float | 1 | Correction multiplier for threshold value in 'Otsu' and 'Correlation' method. |
fill | boolean | true | Fill holes in segmented objects. Applicable to all methods. |
maskList | boolean | false | Produce masklist entry for each object. Forced true with 'Snake' method. |
maxArea | float | 0 | Maximum accepted pixel area in all methods. 0-1 is considered as ratio of image size. Use 0 for no limit. |
maxEcc | float | 1 | Maximum accepted eccentricity value. Default=line |
maxRound | float | 1 | Maximum accepted roundness value. |
method | string | "Otsu" | Method for image segmentation. Choose from 'Otsu', 'Constant', 'Shape', 'ConstantArea', 'KMeans', 'Snake', 'Wavelet', 'Correlation', 'Grid'. |
minArea | float | 0 | Minimum accepted pixel area in all methods. |
minEcc | float | 0 | Minimum accepted eccentricity value. Default=circle |
minInt | float | 0 | Minimum accepted intensity value in 'Shape' and 'Otsu' method. Ranges 0-1. |
minRound | float | 0 | Minimum accepted roundness value. |
numbers | boolean | false | Draw images of the numbers of the objects in the mask. This can be a lengthy process if there are huge amounts of objects. |
snakeParam | string | "0.7,0.65,1,0.7,0.65,0.65,0.65,100" | Parameters for active contour method. Must be a comma separated list of eight numbers. Explanation in the following order:
|
waveletParam | string | "4,5" | Parameters for Wavelet method. Must be a comma separated list of two numbers. Explanation in the following order:
|
Test case | Parameters▼ | IN in |
IN opt |
IN seed |
OUT mask |
OUT perimeter |
OUT numbered |
OUT masklist |
---|---|---|---|---|---|---|---|---|
case1 | properties | in | (missing) | (missing) | mask | perimeter | (missing) | (missing) |
method=Shape, |
||||||||
case2 | properties | in | (missing) | (missing) | mask | perimeter | (missing) | (missing) |
method=Otsu, |
||||||||
case3_kmeans | properties | in | (missing) | (missing) | mask | perimeter | (missing) | (missing) |
method=KMeans, |
||||||||
case4_snake | properties | in | (missing) | seed | mask | perimeter | numbered | (missing) |
method=snake, |