Segments a directory of images with various methods, using a seed (a previous mask helping in refining the segmentation). The method choices are:
Version | 1.0 |
---|---|
Bundle | anima |
Categories | Image Processing |
Authors | Ville Rantanen (ville.rantanen@helsinki.fi) |
Issue tracker | View/Report issues |
Requires | Matlab |
Source files | component.xml seededshapesegment.m seededareasegment.m seededotsusegment.m knnsegment.m imagesegment.m execute.m |
Usage | Example with default values |
Name | Type | Mandatory | Description |
---|---|---|---|
in | ImageList | Mandatory | A directory with grayscale image files. (or possibly RGB for 'KNN') |
seed | ImageList | Optional | Directory of mask files that restrict the pixels used for segmentation. |
colors | CSV | Optional | CSV file with 2 or 4 columns. First with cluster number, and other(s) with color values (range 0-1), order R G B. |
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 numbering is set true. |
Name | Type | Default | Description |
---|---|---|---|
clearBorders | boolean | true | Clear objects touching the image edges. Applicable to all methods. |
constant | float | 0.5 | The area ratio in ConstantArea method. |
corr | float | 1 | Correction multiplier for threshold value in 'Otsu' method. |
fill | boolean | true | Fill holes in segmented objects. Applicable to all methods. |
kernel | string | "mean(exp(-x))" | Kernel in 'kernel' method. Cluster will be chosen by maximizing the kernel value. The 'x' is the vector of distances for the colors in the cluster. |
maxArea | float | 0 | Maximum accepted pixel area in all methods. Use 0 for no limit. |
maxEcc | float | 1 | Maximum accepted eccentricity value in 'Shape' method. |
maxRound | float | 1 | Maximum accepted roundness value in 'Shape' method. |
method | string | "Otsu" | Method for image segmentation. Choose from 'Otsu', 'Shape', 'ConstantArea','KNN','Kernel','Quadratic'. |
minArea | float | 0 | Minimum accepted pixel area in all methods. |
minEcc | float | 0 | Minimum accepted eccentricity value in 'Shape' method. |
minInt | float | 0 | Minimum accepted intensity value in 'Shape' and 'Otsu' methods. Ranges 0-1. |
minRound | float | 0 | Minimum accepted roundness value in 'Shape' method. |
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. |
Test case | Parameters▼ | IN in |
IN seed |
IN colors |
OUT mask |
OUT perimeter |
OUT numbered |
---|---|---|---|---|---|---|---|
case1_otsu | properties | in | seed | (missing) | mask | perimeter | numbered |
method=otsu, |
|||||||
case2_shape | properties | in | seed | (missing) | mask | perimeter | (missing) |
method=shape, |