Quote:
|
Originally Posted by intelitek_Chris
I guess the answer to your question also depends on how you want to 'track' the target. If you just want the camera to return values about what it sees (specifically about the green target), than that is indeed built in 'out of the box'. You could write a simple program that initializes and then starts the camera. Then in a while loop, add a camera capture, print to screen, and a short wait statement. You should see the variable you captured printing in the terminal window screen. Something similar to this is provided as a demonstration in tutorial 7.
If you want the camera to move on it's own to follow the target (using the pan and tilt mount), there are two options. You can turn on the camera servo tracking with the 'Servo' block, and plug the camera servos into the pan and tilt ports on the camera board. The camera has a built in tracking mode, however this method isn't very adaptable.
The best solution is probably to write a simple program that moves the camera to follow the target based on one or more of the parameters coming back from the camera. Plug the camera servos directly into the RC, and drive them manually with your program. Writing a program such as this isn't especially difficult, but should be part of the challenge of the competition, and wasn't included in easyC as a sample. There is nothing to stop all of you from working on a tracking program and sharing it with each other though!
|
We have tried to get the easyc program to track on it's own for the last week or two without much luck.
Kevin's mplab program will compile and download to the controller and track back and forth looking for the target.
With the pan and tilt in the camera board, we can get the camera to keep the target centered, but once the target is lost the camera just stops tracking.
I have read as many of the threads as I can find and can not find any help on this. We have made sure that the battery is fresh, and the wires setup correctly.
For me to code the pan and tilt by plugging the pan and tilt into the pwm connection on the robot controller, is there a source of what the easyc camera values are and what the values mean?
A pan near value of x means what? A confidence level of > 1 means that we see more than 1 pixel? is that really good?
Any help would be appreciated.