next up previous contents
Next: 6.8 bumper Up: 6. Device Interfaces Previous: 6.6 audiomixer   Contents


6.7 blobfinder


The blobfinder interface provides access to devices that detect colored blobs.


The maximum number of unique color classes.

The maximum number of blobs for each color class.

The maximum number of blobs in total.


The format of the blobfinder data packet is very similar to the ACTS v1.2/2.0 format, but a bit simpler. The packet length is variable, with each packet containing both a list of blobs and a header that provides an index into that list. For each channel, the header entry tells you which blob to start with and how many blobs there are.

struct player_blobfinder_header_elt : Blob index entry.

uint16_t index;
Offset of the first blob for this channel.

uint16_t num;
Number of blobs for this channel.

struct player_blobfinder_blob_elt : Structure describing a single blob.

uint32_t color;
A descriptive color for the blob (useful for gui's). The color is stored as packed 32-bit RGB, i.e., 0x00RRGGBB.

uint32_t area;
The blob area (pixels).

uint16_t x, y;
The blob centroid (image coords).

uint16_t left, right, top, bottom;
Bounding box for the blob (image coords).

uint16_t range;
Range (mm) to the blob center

struct player_blobfinder_data : The list of detected blobs.

uint16_t width, height;
The image dimensions.

player_blobfinder_header_elt_t header[PLAYER_BLOBFINDER_MAX_CHANNELS];
An index into the list of blobs (blobs are indexed by channel).

player_blobfinder_blob_elt_t blobs[PLAYER_BLOBFINDER_MAX_BLOBS];
The list of blobs.

Configuration: Set tracking color

struct player_blobfinder_color_config : For some sensors (ie CMUcam), simple blob tracking tracks only one color. To set the tracking color, send a request with the format below, including the RGB color ranges (max and min). Values of -1 will cause the track color to be automatically set to the current window color. This is useful for setting the track color by holding the tracking object in front of the lens.

uint8_t subtype;

int16_t rmin, rmax;
int16_t gmin, gmax;
int16_t bmin, bmax;
RGB minimum and max values (0-255) *

Configuration: Set imager params

struct player_blobfinder_imager_config : Imaging sensors that do blob tracking generally have some sorts of image quality parameters that you can tweak. The following ones are implemented here: brightness (0-255) contrast (0-255) auto gain (0=off, 1=on) color mode (0=RGB/AutoWhiteBalance Off, 1=RGB/AutoWhiteBalance On, 2=YCrCB/AWB Off, 3=YCrCb/AWB On) To set the params, send a request with the format below. Any values set to -1 will be left unchanged.

uint8_t subtype;


This device accepts no commands.

next up previous contents
Next: 6.8 bumper Up: 6. Device Interfaces Previous: 6.6 audiomixer   Contents