segmentation
edisonSegmentation

Wrapper to the The EDISON system: a low-level vision tool that performs confidence based edge detection and synergistic image segmentation.

Wrapper to the The EDISON system: a low-level vision tool that performs confidence based edge detection and synergistic image segmentation.

Description

This module wraps around some functions of the EDISON system from the robust image understanding laboratory at Rutgers University.

The purpose of the module is to obtain good segmentation of color images. The image is split into regions corresponding to uniformly colored patches.

Details on the employed algorithms is provided in the following paper: [1] D. Comaniciu, P. Meer: "Mean shift: A robust approach toward feature space analysis". IEEE Trans. Pattern Anal. Machine Intell., May 2002.

[2] P. Meer, B. Georgescu: "Edge detection with embedded confidence". IEEE Trans. Pattern Anal. Machine Intell., 28, 2001.

[3] C. Christoudias, B. Georgescu, P. Meer: "Synergism in low level vision". 16th International Conference of Pattern Recognition, Track 1 - Computer Vision and Robotics, Quebec City, Canada, August 2001.

The edison source files are provided as a library in the edisonlib folder.

Some changes to these files had to be made in order to obtain the desired functionality. These include changes in function GetRegions in msImageProcessor.cpp

Libraries

YARP library OpenCV library

Parameters

width, height - Dimension of the images to be processed. This may differ from the dimension of the input images. Forcing a smaller dimension will save computation power at the cost of resolution. Values larger that the input image dimension will be discarded. These parameters do no influence the dimension of the output. This is always the same as the input dimension. Default: the size of the original image.

sigmaS - The spatial bandwidth (neighborhood in the pixel domain). Default: 7

sigmaR - The color bandwidth (neighborhood in the color color domain). Default: 6.5

minregion - The minimal area for segmented regions (in pixels) Default: 20.0

gradWinRad - The radius of the window used for the computation of the gradient and confidence map (positive integer). Default: 2.0

threshold - edge strength threshold (must be in the interval [0,1]) Default: 0.3

mixture - mixture parameter (must be in the interval [0,1]) Default: 0.2

speedup - accelerate computation by doing some approximations. Possible values 0 (NO_SPEEDUP), 1 (MED_SPEEDUP), 2 (HIGH_SPEEDUP) Default: MED_SPEEDUP

The best results have been obtained with MED_SPEEDUP

Ports Accessed

Port with raw RGB image.

Ports Created

/conf for module configuration, according to EDISONsegmentation.thrift definition file

/rawImg:i receive the original RGB image to segment

/rawImg:o output the original RGB image

/labeledImg:o segmented image with the labels (PixelInt)

/viewImg:o segmented image with the colors models for each region (good to visualize)

Input Data Files

None

Output Data Files

None

Configuration Files

Parameters can be put in a configuration file. Default configuration file name is edisonConfig.ini An example configuration file is provided in the source folder (configFile.ini), containing the following:

height 120
width 160
dim 3
sigmaS 10
sigmaR 18
minRegion 50
gradWindRad 2
threshold 1
mixture 1
speedup 1

Tested OS

Linux and Windows.

Example Instantiation of the Module

yarp server
edisonSegmentation.exe --from configFile.ini
yarpdev --device opencv_grabber --movie H:\DataSets\testImages2009_07_21\segm_test_icub.avi --loop --framerate 0.1
yarpview /raw
yarpview /view
yarp connect /grabber /edisonSegm/rawImg:i
yarp connect /edisonSegm/rawImg:o /raw
yarp connect /edisonSegm/viewImg:o /view
Author
Alexandre Bernardino, Elena Ceseracciu (improved module version)

Copyright (C) 2008 RobotCub Consortium

CopyPolicy: Released under the terms of the GNU GPL v2.0.

This file can be edited at src/edisonSegmentation/main.cpp.