Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Video: Color Camera Tracking (http://www.chiefdelphi.com/forums/showthread.php?t=72468)

laultima 19-01-2009 20:03

Video: Color Camera Tracking
 
Heres a quick video we took after we got the camera tracking working. As I've said in previous posts, we used our own fairly simple code with the color values from the Two Color Tracking Demo. The video is here:
http://www.youtube.com/watch?v=SiVSM2MuWvs

and the snipet of code we use to move the servos is here:
http://www.chiefdelphi.com/forums/sh...931#post803931

Questions and comments are appreciated.

WhiteShadow1474 19-01-2009 20:33

Re: Video: Color Camera Tracking
 
that looks great. that should greatly help your robot during autonomous mode or during teleop if its a shooter

mahmosh 20-01-2009 21:53

Re: Video: Color Camera Tracking
 
wooooooow ... realy good

dani190 20-01-2009 22:33

Re: Video: Color Camera Tracking
 
nice job guys...

Question, i am testing now ours now... When you guys were testing, did your camera need to have that vision target? or could you just use the green and pink fabric held in ur hand?

Also once it finds the color, i am assuming the camera should theoretically lock on to the color and not move correct?

but the second it looses it, it will look around?

Also how jittery are your servos? Ours seem extra jittery... And like either direction, left or right it will almost liek step there... and not go in a smooth constant motion

I ordered 4 more servos to be safe and try them, just to see if thats the issue...

Thanks, Dani

Greg McKaskle 21-01-2009 08:07

Re: Video: Color Camera Tracking
 
If the servo is jerky because it only moves a few times a second, you should try to speed up the loop. If your image size is large or if you have lots of processing, your framerate will drop and it will start jerking.

Another possibility, but less common, is that your target is too close to the camera. If the full image is filled with the target, it is by definition in the center, and you move the target some and the scene is still full, no movement. Only when the edge of the target enters the image will the servo move.

Greg McKaskle

excel2474 21-01-2009 10:23

Re: Video: Color Camera Tracking
 
good job! can you post the portion of the code where you defined what the values of green and red are? Thanks.

dani190 22-01-2009 10:03

Re: Video: Color Camera Tracking
 
ok we got it, the code is switched apparentlly...
When it says to do pink over green, we do green over pink and it works...

fordfiler6 22-01-2009 15:20

Re: Video: Color Camera Tracking
 
Dani, If you are using the same "find color" vi that we are, the reason its backwards is because you are specifying your teams colors.

Then you also have to either push the button to find your foes (the opposite color scheme) or not to find teammates.

Hope that explains it a little more for you.

bigbeezy 22-01-2009 15:43

Re: Video: Color Camera Tracking
 
i know in 2006 and 07 teams would need to calibrate the cameras on the actual field. I am not a programmer nor familiar with the new system, but do these new cameras need to do that as well?

Daniel_H 22-01-2009 16:53

Re: Video: Color Camera Tracking
 
cool! did you do something about the intrinsic lag problem? Our f.p.s. never passes 9 and there's a delay in the response of something like 0,25~0,5s.

dani190 22-01-2009 22:43

Re: Video: Color Camera Tracking
 
that would be because you are trying to get video feedback at the same time/ the code is still taking it but just not showing it.
Once i ripped out the code that retrieves the video, it worked perfect. No lag at all and was really really smooth!


All times are GMT -5. The time now is 11:25.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi