Trackmate Tracker
From trackmate
Contents |
Wiki Home >> Trackmate Tracker
If this is the first time you are setting things up, you may also want to take a look at How To Setup the Trackmate System.
The information bar:
- frame/sec shows the rate at which frames from your camera are being processed.
- Tags shows three numbers: # valid tags seen the last frame / # valid tags sent (may use previous frame data) / # tag centers seen in the last frame.
The middle settings:
- Use the arrow keys to set the size (in inches) to match the active region of your Trackmate system.
- [R] changes the camera resolution (if supported by your camera).
- [M] changes the mirroring mode. This is important for correctly reading tags.
- [P] changes the pixels per inch. This is the resampled resolution of the image after it has been corrected for perspective via a homography. Higher numbers will read tags more accurately, but at great cost to processing time. 65 is the default. 50 is about the lower you can go. Anything about 100 is kind of useless.
- [I] and [O] change the inner and outter match coefficients respectively. This is used to fine-tune the tag centers. Unless you are doing something really strange, you shouldn't need to change these. The default values are 9.00 and 29.40.
- [T] changes the threshold used to determine digital data within the tag. If you have correctly calibrated the white illumination, you shouldn't need to adjust this.
The bottom blue bar settings:
- [s] allows you to select and adjust your camera.
- [w] calibrates the maximum white value for each pixel of the image. To calibrate, place a plain white sheet of paper on the surface and press [w].
- [!] saves all of the current settings (they will be loaded by default the next time you start Tracker).
- [1] loads the last saved settings.
Tracking algorithm overview
First, a four-point homography is used to adjust the webcam’s image for perspective warping. The homography corrects for distortion that occurs if the camera is not centered exactly under the center of the sensing surface, something difficult to avoid for most camera configurations. To calibrate the system and compute the homography matrix, the user places a sheet of tags on the sensing surface and clicks the onscreen image where the sheet’s four corners appear. This perspective-corrected image is then used for the remainder of the image processing.
Second, a simple differencing method is used to locate hot-spots within the image that are likely to represent tag centers. Since the tag contains rotationally invariant components (alternating black and white concentric circular rings), the image can be searched for a specific combination of pixel differences to find small regions that are very likely to represent the center of a tag. This is accomplished by subtracting the brightness value of pixels corresponding to locations on the white ring from the black rings, and then using the least of those differences (thus requiring a strong match to be considered a good point).
Third, each likely tag center is found by locating the brightest hot-spots computed in the previous step. The algorithm then proceeds to read the pixels corresponding to the outer data ring (which is composed of a white strip with three small black segments) to determine the tag’s orientation. If an orientation can be successfully determined, both inner rings of data are read next (consisting of six bytes for the unique ID and a single byte inverted checksum). If the ID checksum matches the tag’s checksum data, the tag is assumed to be valid and the RGB color data is read from its corners. All valid tag information (including ID, position, rotation, and RGB color) is stored in an array for later use.
Fourth, the complete list of valid tags within the current image (a single frame from the webcam’s incoming video) is compared to the previous frame. This enables misread tags in the current frame to be paired with valid tags in the previous frame (only considering likely matches that are within a specified distance). Since inexpensive webcams often produce noisy images in low lighting, and sometimes sporadically return invalid or blank images, previous-frame comparison caching helps to avoid false negatives (where an object is assumed to have been removed when it is actually still present).
Finally, the entire list of valid tags (including adjustments made in the previous step to allow for caching) are wrapped in an Open Sound Control (OSC) bundle and sent via the LusidOSC protocol to any application that may be listening for the object data.
