Jump to content

SwisTrack/Version 3/Using SwisTrack

From Wikibooks, open books for an open world

This page refers to version 3 of SwisTrack. Unless you are still using this old version, you may want to read the documentation of the most recent version of SwisTrack.

Using SwisTrack

[edit | edit source]

SwisTrack processes the images in various steps, whereas each step can be performed in a particular mode. For instance you can acquire images from device A, segment it with method B, and perform tracking with method C. This choices are independent from each other, e.g. it does not matter whether the image comes from a camera or a video. Rather, every step expects data to be available in a certain format, and produces output accordingly.

The organization of this manual follows the same scheme that SwisTrack uses for image processing, which is summarized in the table below

Step Input Output Example

Input

Any video source (camera or file).

A raw image

Segmenter

A raw image

A binary image with potential targets as white blobs.

Segmenter Post-Processing

A binary image

Segmenter post-processing performs some filtering on the image (erosion/dilution) to get smoother blobs that ease the detection of contours. Also, it is possible to apply a mask image (right) that rejects blobs outside a certain region of the image.

Particle filter

A binary image

A list of contours that fulfill certain criteria (size, shape, etc.). Contours ("particles") that have been rejected are indicated with red circles, whereas accepted contours are indicated with green circles.

Tracker

A list of particles

A list of trajectories

Calibration

A list of trajectories

A list of trajectories (calibrated)

n.a.

Output

A list of trajectories

A text file with trajectory coordinates and time stamp.

n.a.

Input

[edit | edit source]

AVI video driver

[edit | edit source]

This mode uses Intel OpenCV's video acquisition features which uses Video for Windows (VfW) codecs for loading AVI and MPEG files. Make sure that you have the correct codec installed, SwisTrack does not work with DirectShow drivers! A good test is to use the software VirtualDub (open source), which allows you to get more specific information about the codec in use.

CMU 1394 Digital Camera Driver

[edit | edit source]

This mode uses the firewire driver developed at Carnegie Mellon University. Make sure you deinstall the driver that comes with your camera before! There is a little test application shipped with the CMU driver, which allows you to test your camera, and also to make some settings that are not yet accessible from SwisTrack.

Native Video Driver

[edit | edit source]

This mode makes use of the native video driver of your operating system. Under Windows, this mode allows accessing standard USB cameras ("Webcams"). Under Linux, it should allow accessing Firewire cameras also, which has not been tested yet.

Segmenter

[edit | edit source]

Static Background (fixed threshold)

[edit | edit source]

The image is segmented by subtracting a background image of the scene from each video frame. A fixed threshold defines the minimum difference required to count a pixel as not belonging to the background.

This mode is sensible to changes in lighting condition.

Apparently, you need to be careful that the background image has the exact same dimensions of the video file. The bmp exported from SwisTrack itself does not always have the same dimensions.

Running Average

[edit | edit source]

This mode does not require a background image, which is instead the running average of all video frames processed so far. The parameter alpha specifies the speed of the running average, i.e. the ratio of how much every new frame contributes to the average.

This mode is more capabale when dealing with changing lighting conditions, but is not able to cope with objects that stop moving for a longer period of time as they become part of the background.

Static Background (color ratio)

[edit | edit source]

Fixed Color

[edit | edit source]

Segmenter Post-Processing

[edit | edit source]

Particle Filter

[edit | edit source]

Min-Max Size Filter

[edit | edit source]

Circular Shape Filter

[edit | edit source]

No Mask

[edit | edit source]

Binary Mask

[edit | edit source]

This feature is currently under revision.

Tracker

[edit | edit source]

Nearest Neighbor

[edit | edit source]

The option Maximum allowed speed is given in pixels and defines the radius SwisTrack should look for potential targets. 'Maximum allowed speed is not necessary the physical speed of an object but should also take into account scenarios where objects are merged and split afterwards, which induces displacement on the trajectories without that the objects were moving.

The option Can trajectories share a particle? allows you to specify whether trajectories can merge on a single particle (as for instance when two insects are overlapping) or if this behavior is not desired (as for instance when tracking robots equipped with markers).

Calibration

[edit | edit source]

No Calibration

[edit | edit source]

2nd Order Polynomial Fit

[edit | edit source]

Output

[edit | edit source]

Output uncalibrated data

[edit | edit source]