Go to Post Robotic Football now thats something I would build 6 weeks for. - Nikkocharger [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 18-02-2005, 15:00
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Camera Tracking Problem

Could you post your current code? I think you're aware that in user_routines_fast.c there's a function called User_Autonomous_Code (Pretty sure, don't quote me on it.) well in that code you want to track your color.

Everytime you call camera_track_color it will set the camera back to its home position, defeating the point of tracking. So you want to only call it once. Here's how you would do it:
Code:
int Find_Color_Flag = 0; // Initialize a flag variable

if(Find_Color_Flag == 0) // If it hasn't been called yet
{
     camera_find_color(GREEN); // Find the color
     Find_Color_Flag = 1; // Set the flag to true
}

camera_track_update(); // Track the color
That should make it track the color green.

Make sure that your camera is calibrated, and that you replaced the 3 values for the camera initialization code in the initialization function.
__________________
http://www.mikesorrenti.com/
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripting Setup and the Camera + Serial Port Drivers CJO Programming 22 11-01-2006 17:42
Camera Tracking Woes VideoMan053 Programming 4 29-01-2005 18:09
Camera Color Recognition Problem? AnkurG Technical Discussion 3 20-01-2005 21:52
Camera Problem n_0163 Electrical 3 14-01-2005 21:10
CMUCam2 Camera Code - Are important parts commented out? Mr. Lim Programming 4 14-01-2005 12:11


All times are GMT -5. The time now is 01:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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