Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   CAMERA (http://www.chiefdelphi.com/forums/showthread.php?t=51907)

Slick 15-01-2007 08:04

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?

Kevin Watson 15-01-2007 13:01

Re: CAMERA
 
Quote:

Originally Posted by Slick (Post 557104)
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

Slick 15-01-2007 14:05

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.....

Greg Marra 15-01-2007 14:09

Re: CAMERA
 
Quote:

Originally Posted by Slick (Post 557268)
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.

Slick 15-01-2007 14:13

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....

Kevin Watson 15-01-2007 15:04

Re: CAMERA
 
Quote:

Originally Posted by Slick (Post 557279)
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

Slick 15-01-2007 15:08

Re: CAMERA
 
Thanks again.... Kevin is the MAN.... I'll try it tonight....

Kevin Watson 15-01-2007 15:22

Re: CAMERA
 
Quote:

Originally Posted by Slick (Post 557268)
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 15-01-2007 15:37

Re: CAMERA
 
Quote:

Originally Posted by Greg Marra (Post 557275)
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

Slick 17-01-2007 07:38

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.

sniggel 18-01-2007 16:52

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?

royalfire 19-01-2007 14:34

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.

Kevin Watson 19-01-2007 15:02

Re: CAMERA
 
Quote:

Originally Posted by royalfire (Post 560473)
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

sniggel 19-01-2007 15:49

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.

Kevin Watson 19-01-2007 16:30

Re: CAMERA
 
Quote:

Originally Posted by sniggel (Post 560540)
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


All times are GMT -5. The time now is 18:28.

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