These measurements could be likely accomplished quite well using a camera, IMAQ acquisition board, and IMAQ Vision software. For example, you could place the rat on a flat surface with a camera directly overhead. Constrain the rat such that it is always within the field of view of the camera and place a marker on the rat that is easily discernable from the rest of the image. The marker should be crisp and and have high contrast. A small black circle on a white background should work well.
While acquiring continuous video with the IMAQ card, you can use the Vision toolset to process the images and get the coordinates of the target in each frame. This can be done by pattern matching, circle detection, blob analysis or a variety of other methods. The best method will depend on you particular setup. Then use one of the Vision calibration functions to convert the coordinates from pixels to real world units of your choice. Sum up the incremental distances between each point to get the total distance traveled. Since the frame rate of the camera is fixed and stable (typ. 30 Hz or 33.3 ms), you can calculate the velocity of the rat over any particular interval. I'm not sure what you mean by track length. How is this different than distance?
Here are a few tips that may help make your experiement successful:
- Image quality is paramount with most vision processing. Since you are trying to image a moving object, a progressive scan camera may be a good idea for crisp images.
- When calibrating your image to convert from pixels to real world units, be sure to calibrate at the height of the target (not the floor) to reduce scaling errors caused by perspective.
- Particle tracking algorithms do not typically have to search the entire image on every frame. If you have some rough idea of the maximum velocity and acceleration of a rat, then you can use the location of the marker in the Nth frame to set up a small search region for the N+1 frame that represents only the possible locations at that point in time. This can greatly reduce the amount of computation time required.
Please see the following page for more information about
IMAQ and Vision products. If you need help with selecting hardware or the overall layout of your experiment, you may want to give
Graftek a call.
Regards,
Brent R.
Applications Engineer
National Instruments