Go to Post FIRST is a big family and we‘ll get through this together. - Gary Dillard [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 15-01-2007, 08:04
Slick Slick is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Martinsville, VA
Posts: 21
Slick is an unknown quantity at this point
CAMERA

Need help… We are having a serious problem it seems in calibrating our camera. We are using LABview and putting the target(green light) about 12 feet away. The camera seems to only see a bright white light. We run the program (Bells and Whistles version) and the camera pans and tilts correctly (it seems), but never acquires the target. Can anyone tell me how to calibrate the camera…. And what code needs to change to acquire the target. Shouldn’t the camera stop when the target is found? What are we missing?
  #2   Spotlight this post!  
Unread 15-01-2007, 13:01
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CAMERA

Quote:
Originally Posted by Slick View Post
Need help… We are having a serious problem it seems in calibrating our camera. We are using LABview and putting the target(green light) about 12 feet away. The camera seems to only see a bright white light. We run the program (Bells and Whistles version) and the camera pans and tilts correctly (it seems), but never acquires the target. Can anyone tell me how to calibrate the camera…. And what code needs to change to acquire the target. Shouldn’t the camera stop when the target is found? What are we missing?
You shouldn't need to calibrate the camera. Just use the calibration parameters that are included and it should just start tracking.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #3   Spotlight this post!  
Unread 15-01-2007, 14:05
Slick Slick is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Martinsville, VA
Posts: 21
Slick is an unknown quantity at this point
Re: CAMERA

Thanks Kevin... I will try that tonight. If this is the case, why do we need LABview. Also, why are there documents from innovation first to calibrate the camera (in detail).... Not questioning you, I just wonder WHY? Maybe I was trying to make this much harder than it really is... Your help is much appreciated.... Thanks again.....
  #4   Spotlight this post!  
Unread 15-01-2007, 14:09
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,030
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: CAMERA

Quote:
Originally Posted by Slick View Post
Thanks Kevin... I will try that tonight. If this is the case, why do we need LABview. Also, why are there documents from innovation first to calibrate the camera (in detail).... Not questioning you, I just wonder WHY? Maybe I was trying to make this much harder than it really is... Your help is much appreciated.... Thanks again.....
Theoretically, if you were to track the light under vastly different lighting conditions, or you wanted to track a different colored object, the Labview software would be great for finding new camera calibration values.

However, Kevin has already figured out an awesome set of values for tracking the green light FIRST uses in competitions. If you just use his, it will work wonderfully. Compared to how hard it was to use the camera in 2005, what Kevin has done is pretty much magic.
  #5   Spotlight this post!  
Unread 15-01-2007, 14:13
Slick Slick is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Martinsville, VA
Posts: 21
Slick is an unknown quantity at this point
Re: CAMERA

Thanks.... What file are the parameters in... Are they in user_routines.c or user_routines_fast.c.... -or- are they in a ".h" file? Thanks for the help....
  #6   Spotlight this post!  
Unread 15-01-2007, 15:04
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CAMERA

Quote:
Originally Posted by Slick View Post
Thanks.... What file are the parameters in... Are they in user_routines.c or user_routines_fast.c.... -or- are they in a ".h" file? Thanks for the help....
They're located in camera.h. If you use the "Bells and Whistles" version of the code you can change these values on-the-fly using the camera menu.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #7   Spotlight this post!  
Unread 15-01-2007, 15:08
Slick Slick is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Martinsville, VA
Posts: 21
Slick is an unknown quantity at this point
Re: CAMERA

Thanks again.... Kevin is the MAN.... I'll try it tonight....
  #8   Spotlight this post!  
Unread 15-01-2007, 15:22
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CAMERA

Quote:
Originally Posted by Slick View Post
Thanks Kevin... I will try that tonight. If this is the case, why do we need LABview. Also, why are there documents from innovation first to calibrate the camera (in detail).... Not questioning you, I just wonder WHY? Maybe I was trying to make this much harder than it really is... Your help is much appreciated.... Thanks again.....
LabVIEW is a very cool tool, and I would encourage everyone to crack the manuals and discover all the wonderful things you can do with it. I suspect that they include a demo LabVIEW application so that you can get calibration data for targets other than the green light. The hope is that students will want to explore and use LabVIEW and the CMUcam2 in the off-season.

Anyway, I suspect you'll find that the default calibration parameters will work quite well. Just FYI, to help teams get the camera running, I started a FAQ last year: http://kevin.org/frc/camera.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #9   Spotlight this post!  
Unread 15-01-2007, 15:37
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CAMERA

Quote:
Originally Posted by Greg Marra View Post
However, Kevin has already figured out an awesome set of values for tracking the green light FIRST uses in competitions. If you just use his, it will work wonderfully.
Actually, I just wrote the code. A member of the FRC engineering staff spent many hours tweaking those calibration values to get them right.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #10   Spotlight this post!  
Unread 17-01-2007, 07:38
Slick Slick is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Martinsville, VA
Posts: 21
Slick is an unknown quantity at this point
Re: CAMERA

Kevin, I'm sorry I did not respond yesterday, but the camera did respond to the light. It works perfectly. Thanks for the help. I don't think we would have solved this without you. We were making this much harder than it really was. Now comes what I hope is the fun part in coding the drive chain to respond and move the robot the way we want it to move. I guess we want the robot to go into the light...(HA) Old horror movie humor. Thanks again.
  #11   Spotlight this post!  
Unread 18-01-2007, 16:52
sniggel sniggel is offline
Registered User
FRC #2051
 
Join Date: Jan 2007
Location: A.W. Beattie
Posts: 28
sniggel is an unknown quantity at this point
Re: CAMERA

we are getting the camera to see the green light, but it keeps searching and moves off of it, then rotates back to the light and off again,like it cant get a solid fix on it. any suggestions?
  #12   Spotlight this post!  
Unread 19-01-2007, 14:34
royalfire royalfire is offline
Registered User
FRC #0190
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Massachusetts
Posts: 7
royalfire is an unknown quantity at this point
Re: CAMERA

you have probably put the camera exactly as the manual said. Unfortunately, Kevin's code is upside-down. Switch the macros (Kevin's FAQ says which) which control pan and tilt direction.
  #13   Spotlight this post!  
Unread 19-01-2007, 15:02
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CAMERA

Quote:
Originally Posted by royalfire View Post
you have probably put the camera exactly as the manual said. Unfortunately, Kevin's code is upside-down. Switch the macros (Kevin's FAQ says which) which control pan and tilt direction.
Actually, the manual is incorrect. The optimum orientation for the camera is with the tilt axis extending through the camera module.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #14   Spotlight this post!  
Unread 19-01-2007, 15:49
sniggel sniggel is offline
Registered User
FRC #2051
 
Join Date: Jan 2007
Location: A.W. Beattie
Posts: 28
sniggel is an unknown quantity at this point
Re: CAMERA

we finally got the camera working yesterday where it would give us values and the red light would light, today it just keeps searching with no data coming back using the same code(kevin's) that we used yesterday. The red light lights up, but no data comes back, any suggestions what might be causing this. Also we tried kevins new code posted 1/16 and same thing happened.
  #15   Spotlight this post!  
Unread 19-01-2007, 16:30
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CAMERA

Quote:
Originally Posted by sniggel View Post
we finally got the camera working yesterday where it would give us values and the red light would light, today it just keeps searching with no data coming back using the same code(kevin's) that we used yesterday. The red light lights up, but no data comes back, any suggestions what might be causing this. Also we tried kevins new code posted 1/16 and same thing happened.
Look for this code in tracking.h:

// This value defines how many "slow loops" to wait before
// sending the tracking servo(s) to their next destination
// while in search mode. This provides a small delay for the
// camera to lock onto the target between position changes.
#define SEARCH_DELAY_DEFAULT 6

and increase this value to 10 and see it it starts working.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
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
Camera Troubles cmurdoch Programming 9 11-02-2006 11:34
No lights on camera Bob22341 Programming 4 08-02-2006 13:27
camera question naor52 Programming 8 03-02-2006 00:07
Camera Help (New to Camera Programming) Idaman323 Programming 6 14-01-2006 03:56
camera problem miscar Programming 2 23-01-2005 12:06


All times are GMT -5. The time now is 03:39.

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