Skip to content
v01d edited this page Dec 3, 2013 · 5 revisions

In order to use the WhyCon system there are four required steps:

  1. Calibrate your camera
  2. Print the planar target(s)
  3. Set the working axis (optional)
  4. Start tracking

In order to follow the next sections, please refer to the reference where command-line parameters are explained.

Camera Calibration

WhyCon expects an input in the form of live video, pre-recorded video files or sequence of images. In all cases, the camare used for obtaining the images needs to be calibrated. WhyCon accepts either the widely used MATLAB format as generated by the MATLAB calibration toolbox. The resulting .m file can be read directly by WhyCon.

Alternatively, you can use the provided calibrator executable which does not require a tedious point-and-click procedure. A tutorial on this calibrator can be found here. This program generates an XML file which can also be supplied to the WhyCon executable.

Planar target printing

In order to track the desired targets, it is necessary to use the supplied pattern. You can access it directly from here: circle.pdf (right-click, save as). Print this in a full sheet without any scaling. The actual target starts within the thin outter line. If you need to cut it, do not cut out this line since it ensures that some white space will be surrounding the actual ring.

While the pattern dimensions are fixed, you should re-measure the outer and inner diameters (outer = black ring, inner = white circle). If they differ, these values should be used as a command line parameter when running WhyCon.

It is posible to print the target at any scale. Simply measure the new diameter values.

Set the working axis (optional)

The coordinates of the detected patterns, without any transformation, are computed with respect of the camera coordinate frame (X,Y,Z=width,height,depth). In some cases this is fine and therefore the user need not to worry about setting a particular reference frame. However, it may be necessary to define a particular point in space as the origin of a user defined frame. In this case, WhyCon can be used to perform an initial axis setting step.

Note: currently this is only implemented for defining a planar working space (e.g. ground plane for ground robots). In this case, the associated coordinate transform translates camera-centered 3D coordinates into 2D coordinates on a user-defined frame. This also increases precision greatly, so it is recommended in this cases. User-defined 3D frame setting will soon be added. Please see roadmap.

2D user-defined frame (plane)

For this step, you will need four targets already printed. This targets need to be placed defining a rectangle on the floor (or on the plane you will be using). To define the axis, run the WhyCon executable in "axis setting" mode. This will immedatiely try to detect the four targets and generate the axis definition file which can be reused later.

The patterns used for this step should be removed before continuing with tracking, otherwise they will be tracked (which may not be desired).

Start tracking

The tracking mode of the WhyCon executable will allow the user to track an arbitrary number of circles while informing their poses. If the previous axis-setting step was performed, the axis definition file can be used which will apply a transformation on the camera-centered coordinates, to obtain a new set of transformed coordinates.

During tracking, if the GUI is used, the detected circles will be drawn on screen. The poses will be logged to the output file.