Zack Nemes
By:
Clemence Larroche
To track and follow a car as it travels along a path.
In our portion, we built a Lego base with two motors attached to a camera.
It rotates from side toside and up to down.
It is mounted on a platform well above the ground and follows a yellow cylinder, which is placed on a Lego vehicle.
2 MotorsRCX 2.0 micro controller
Lego camera and blocks
USB Camera
Lego Mindstorm robot invention kit
Infrared communication
Matlab
Visual BasicVideo OCX
Phantom Active X
A yellow cylinder was mounted on the car and served as a target
The program captured images from the camera and sent control commands to the camera according to what it saw.
A rotating platform was built with a Lego digital camera attached to it.
An effective way of distinguishing objects is by processing their colors
Each pixel in an image has three color components:Red, Green, and Blue.
There are other distinctive properties such as HSV (Hue, Saturation, and Values).
Our yellow cylindrical object was found to contain a high amount of red and low blue compared to the color components in its surroundings.
The program first tells the camera to recognize the yellow cylinder based on its Red and Blue properties.
It then plots a dot at the center of the object by averaging the X and Y values of the red and blue component pixels.
The camera’s field of view is broken up into boxes to which we attribute different vertical and horizontal movements.
Once it locates its target in one of the boxes it moves a specified quantity of time (here the units are in ms - milliseconds) to center the object.
600 ms left 300 ms up
300 ms left 300 ms up
300 ms up 300 ms right 300 ms up
600 ms right 300 ms up
600 ms left 150 ms up
300 ms left 150 ms up
150 ms up 300 ms right 150 ms up
600 ms right 150 ms up
600 ms left 300 ms left CENTER 300 ms right 600 ms right
600 ms left 150 ms down
300 ms left 150 ms down
150 ms down 300 ms right 150 ms down
600 ms right 150 ms down
600 ms left 300 ms down
300 ms left 300 ms down
300 ms down 300 ms right 300 ms down
600 ms right 300 ms down
In order for the pictures to come out clear, the object which we tracked needed to move at a very low speed.
Sometimes it is difficult to set the object in the center of the frame after one picture because of the lack of precision of our timers.
The algorithm is dependant on the given surroundings
The task of teaching robots the simplest of taskswhich humans accomplish subconsciously is far moredifficult and complex than expected.
The success of this project is limited to lab room setting.
Even though this project’s tasks were so basic, the actual Programming and algorithms were nonetheless confusing.