(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Set-up of CCD and parameters initialization

Description: In this tutorial, you learn how to install the CCD and set up the parameters which control the run-time behaviour

Tutorial Level: BEGINNER

Next Tutorial: Contour Initialization

Install CCD

The CCD package is available from [http://code.in.tum.de/indefero/index.php//p/ias-perception], you can fetch the code using the following command:

git clone http://code.in.tum.de/git/ias-perception.git

Afterword, you can build the ccd programs:

 cd ias-perception/contracting_curve_density_algorithm & make

The resulting program is bin/ccd_example and bin/ccd_node, the former is a example program of the CCD algorithm, the latter is a ros node.

Parameters Initialization

Like the snake and other computer vision programs, it is required to set up some parameters to run the ccd. In order to avoid compiling code after each change, we use a struct xml(e.g. ccd_params.xml) file to store the parameters, and OpenCV has some corresponding methods to read and store such files. The file should include the following nodes:

  • gamma_1: default value is 0.5
  • gamma_2: default value is 5
  • gamma_3: default value is 7
  • gamma_4: default value is 4
  • alpha: default value is 1.2
  • beta: default value is 0.05
  • kappa: default value is 0.5
  • c: default value os 0.25
  • h: control the search radius in the normal direction of the initial contour, if too short, it does not cover the real boudaries, if too long, the result is not accurate.
  • delta_h: determine the number of sample points in the normal direction, e.g. if delta_h = 2, it means we sample with a distant by 2
  • resolution: how many sample points on the contour
  • degree: determine to use either quadratic (degree = 3) or cubic (degree = 4) B-Spline
  • phi_dim: determine to use which kind of shape-space: 2-d or 3-d planar shape-space

The initialization file's content looks like this:

<?xml version="1.0"?>
<opencv_storage>
<gamma_1>0.5</gamma_1>
<gamma_2>5</gamma_2>
<gamma_3>7</gamma_3>
<gamma_4>5</gamma_4>
<alpha>1.2</alpha>
<beta>0.06</beta>
<kappa>0.5</kappa>
<c>0.25</c>
<h>50</h>
<delta_h>1</delta_h>
<resolution>300</resolution>
<degree>4</degree>
<phi_dim>6</phi_dim>
</opencv_storage>

Wiki: contracting_curve_density_algorithm/Tutorials/setupparams (last edited 2012-09-29 03:43:31 by Dejan Pangercic)