Go to Post I would be happy playing matches in a waffle house parking lot - mesamb1 [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-12-2006, 15:43
Guy_E Guy_E is offline
Registered User
FRC #1574 (MisCar)
Team Role: Leadership
 
Join Date: Mar 2006
Rookie Year: 2006
Location: ISRAEL
Posts: 81
Guy_E has a spectacular aura aboutGuy_E has a spectacular aura about
Send a message via MSN to Guy_E
Changing tracked color

Hi,
I have a small question. Let's say I wanted to change the color the camera tracks during the game (for example from green to red). Do I need to change the R_MIN, R_Max etc. defines in camera.h or is there something else I need to do?

Thanks,
Guy
__________________
Team #1574 Misgav High School - Israel

Winner of the 2007 Israeli Regional

Winner of the 2007 Motorola Quality in Design Award

Visit our website:
www.miscar1574.com
  #2   Spotlight this post!  
Unread 26-12-2006, 16:16
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,187
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Changing tracked color

Yes, that is all you need to do. You can figure out what your defined limits are by playing around with the LabView CMUCam workspace or the CMU Java App.
  #3   Spotlight this post!  
Unread 26-12-2006, 18:32
divergentdave divergentdave is offline
Registered User
FRC #1816 (Green Machine)
 
Join Date: Jun 2006
Rookie Year: 2007
Location: MN
Posts: 35
divergentdave is a jewel in the roughdivergentdave is a jewel in the roughdivergentdave is a jewel in the rough
Send a message via AIM to divergentdave
Re: Changing tracked color

That will work if you just want to track a different color for the whole game, but it sounds like you want to switch to a new color after you've been tracking one color for a while. If you want to change colors on the fly, then you'll need to send a \r to the camera to stop tracking the current color, and then send it a new TC command with the new color.
__________________
Team 1816 - The Green Machine
  #4   Spotlight this post!  
Unread 26-12-2006, 19:02
Unsung FIRST Hero
Greg Marra Greg Marra is offline
[automate(a) for a in tasks_to_do]
FRC #5507 (Robotic Eagles)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2005
Location: San Francisco, CA
Posts: 2,031
Greg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond repute
Re: Changing tracked color

Quote:
Originally Posted by divergentdave View Post
That will work if you just want to track a different color for the whole game, but it sounds like you want to switch to a new color after you've been tracking one color for a while. If you want to change colors on the fly, then you'll need to send a \r to the camera to stop tracking the current color, and then send it a new TC command with the new color.
This is correct. Changing the defines will change the color the camera tracks, but to change the defines requires you to recompile, which is difficult to do on the field. You will want to write some functions to re-initialize the color tracking on the camera on the field, updating it with the new color values to track.
  #5   Spotlight this post!  
Unread 26-12-2006, 22:41
bear24rw's Avatar
bear24rw bear24rw is offline
Team 11 Programming Captain
AKA: Max T
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2005
Location: Flanders, NJ
Posts: 385
bear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to behold
Send a message via AIM to bear24rw
Re: Changing tracked color

Take a look at the Track_Color() function in kevin watson camera.c

www.kevin.org/frc
  #6   Spotlight this post!  
Unread 27-12-2006, 11:12
Guy_E Guy_E is offline
Registered User
FRC #1574 (MisCar)
Team Role: Leadership
 
Join Date: Mar 2006
Rookie Year: 2006
Location: ISRAEL
Posts: 81
Guy_E has a spectacular aura aboutGuy_E has a spectacular aura about
Send a message via MSN to Guy_E
Re: Changing tracked color

Thanks guys, I think I got it.
__________________
Team #1574 Misgav High School - Israel

Winner of the 2007 Israeli Regional

Winner of the 2007 Motorola Quality in Design Award

Visit our website:
www.miscar1574.com
  #7   Spotlight this post!  
Unread 28-12-2006, 01:52
teh_pwnerer795 teh_pwnerer795 is offline
Registered User
AKA: !!Mitch!!
FRC #1392
Team Role: Programmer
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Ajax, Canada
Posts: 142
teh_pwnerer795 is just really niceteh_pwnerer795 is just really niceteh_pwnerer795 is just really niceteh_pwnerer795 is just really nice
Send a message via MSN to teh_pwnerer795 Send a message via Yahoo to teh_pwnerer795
Re: Changing tracked color

I also have a question... say if the camera is searching for a color... and you want to switch the color its tracking.. should you say Camera_Idle(); ...Track_Color(R,R,G,G,B,B).... then Servo_Track();?
__________________
Great Art is Created; Master Pieces are Stolen

[n00b]Teh_Foxdonut teh_pwnerer795 - CounterStrike:Source
  #8   Spotlight this post!  
Unread 28-12-2006, 12:12
bear24rw's Avatar
bear24rw bear24rw is offline
Team 11 Programming Captain
AKA: Max T
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2005
Location: Flanders, NJ
Posts: 385
bear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to behold
Send a message via AIM to bear24rw
Re: Changing tracked color

I think you need to put the camera in raw mode first
Closed Thread


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
looking for pics of tracked robots amos229 Technical Discussion 11 28-08-2006 17:50
Change color that is tracked. MarkVH Programming 2 15-02-2006 18:05
changing vertex color kcy88 3D Animation and Competition 2 29-02-2004 11:47
Changing Chairman's Jacqui Sutton Chairman's Award 1 03-04-2003 09:47
Changing gears archiver 2000 1 23-06-2002 23:26


All times are GMT -5. The time now is 20:41.

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