Up: Component summary Component

SegmentSeeded

Segments a directory of images with various methods, using a seed (a previous mask helping in refining the segmentation). The method choices are:

All the methods work on per-object basis.

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

Inputs

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.

Outputs

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.

Parameters

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 cases

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,
minArea=3,
maxArea=0,
corr=1.3,
numbers=true,
metadata.timeout=60

case2_shape properties in seed (missing) mask perimeter (missing)

method=shape,
constant=0.333,
minArea=5,
maxArea=300,
minEcc=0.0,
maxEcc=0.75,
minRound=0.6,
minInt=0.15


Generated 2018-12-12 07:42:05 by Anduril 2.0.0