![]() |
Yet another Camera thread...
1 Attachment(s)
For the past few days / week, I've been trying to get the camera code to work. This code I have made is a variation of the sample code provided. As an FYI, the Target.h and Target.cpp is a copy and paste from the sample code.
The code *seems* to recognize a target... when it sees pink above green (or was it green above pink?), the servos slow down significantly and then once the target is out of sight, it keeps on moving at a normal speed. Help is appreciated, Thanks. EDIT: Seems like "Track.h" needs to go after "TrackAPI.h". Still, there's likely something wrong w/ the code. |
Re: Yet another Camera thread...
The most likely case of this problem is that the sign of the horizontal direction is backward. When the two color demo sees the target it tries to step slowly until it is in the target is in the center. If the step value is backward it actually moves away from the target. Once the target is out of the image, the normal panning, which is faster, will kick in.
|
Re: Yet another Camera thread...
Do you mean changing:
Code:
incrementV = verticalDestination - verticalPosition;Code:
incrementV = verticalPosition - verticalDestination;Code:
// TODO: Check to see if this needs to be reversed |
| All times are GMT -5. The time now is 02:58. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi