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)

Jade 19-01-2007 21:10

Re: CAMERA
 
We are having trouble getting our camera to follow the target. It gets the target but doesn't follow it, can you help? Also can we have your code for easy c

synth3tk 19-01-2007 22:46

Re: CAMERA
 
I know it's repetitive, but we got the same thing. Using LabView, it picks up the color, but doesn't track it. Also, we've tried to get our light to show up green, but it just comes up as white. We used different lighting conditions, but because it's always white it usually tries to track the ceiling lights.

sniggel 20-01-2007 00:41

Re: CAMERA
 
kevin, thankyou i will try this monday morning unfortnately I dont have access to the school over the weekend.

kevin.fort 20-01-2007 10:06

Re: CAMERA
 
We have the same problem as mentioned twice in this thread that with labview the camera thinks that the green light is white. Also when we use the default code provided by kevin.org the camera will not lock onto the light. It continues scanning and when the defualt values are changed to what labview says they should be closer to the camera will recognize the light(the red light comes on) but it wont stay on it because it keeps going back and forth between the lights on the ceiling.
any ideas or suggestions would be greatly appreciated
Thanks

Mike Betts 20-01-2007 11:42

Re: CAMERA
 
All,

Kevin's code works fine "right out of the box" with no modifications.

Please read this FAQ (particularly Q9).

Mike

sniggel 22-01-2007 09:03

Re: CAMERA
 
Quote:

Originally Posted by Kevin Watson (Post 560569)
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,
We recompiled with the increase to 10 of the SEARCH_DELAY_DEFAULT. The camera panned slower, but still didn't respond with anything other than "searching..." We had some students play with the configuration (I know, they shouldn't have...). Now we want to revert to the default calibration, how do we go about doing that?
Thanks!
Team 2051

sniggel 22-01-2007 09:51

Re: CAMERA
 
Quote:

Originally Posted by sniggel (Post 562400)
Kevin,
We recompiled with the increase to 10 of the SEARCH_DELAY_DEFAULT. The camera panned slower, but still didn't respond with anything other than "searching..." We had some students play with the configuration (I know, they shouldn't have...). Now we want to revert to the default calibration, how do we go about doing that?
Thanks!
Team 2051

OK. We got it to work and follow the green light. But it only works when we have the light bars facing the camera (not through the white HDPE panel).

Alan Anderson 22-01-2007 10:27

Re: CAMERA
 
Quote:

Originally Posted by sniggel (Post 562424)
OK. We got it to work and follow the green light. But it only works when we have the light bars facing the camera (not through the white HDPE panel).

That sounds like you might not be supplying enough power to the target lights. Are you using a good supply capable of several amps? If you are using a robot battery, is it fully charged?

sniggel 22-01-2007 11:10

Re: CAMERA
 
thanks. this helped. we are now tracking the light with one minor problem. if we use the diffuser(the white board in front of the lights) the camera keeps searching, if we turn the light tubes directly to the camera the camera tracks the lights. has anybody else had this problem? and any suggestions on what might need modified?

Kevin Watson 22-01-2007 11:46

Re: CAMERA
 
Quote:

Originally Posted by sniggel (Post 562477)
thanks. this helped. we are now tracking the light with one minor problem. if we use the diffuser(the white board in front of the lights) the camera keeps searching, if we turn the light tubes directly to the camera the camera tracks the lights. has anybody else had this problem? and any suggestions on what might need modified?

I think Alan's suggestion makes a lot of sense. The light is pulling somewhere around an amp of current, which the robot battery can easilly deliver. How far away is the light from the camera? Also, make sure you move the search delay back to six.

-Kevin

Kevin Watson 22-01-2007 11:56

Re: CAMERA
 
Quote:

Originally Posted by sniggel (Post 562400)
Kevin,
We recompiled with the increase to 10 of the SEARCH_DELAY_DEFAULT. The camera panned slower, but still didn't respond with anything other than "searching..." We had some students play with the configuration (I know, they shouldn't have...). Now we want to revert to the default calibration, how do we go about doing that?
Thanks!
Team 2051

If using the "streamlined" version of the code, extract camera.h and tracking.h from the zip archive and drop 'em into your build directory.

If using the "bells and whistles" version, go into the camera menu by typing the letter c into the little "to port" box and hit return. From there you can restore the default settings. Do the same for the tracking menu but use the letter t.

Make sure you save the changes once you've recalled the default values.

-Kevin

petek 22-01-2007 13:25

Re: CAMERA
 
Quote:

Originally Posted by Kevin Watson (Post 562496)
I think Alan's suggestion makes a lot of sense. The light is pulling somewhere around an amp of current, which the robot battery can easilly deliver. How far away is the light from the camera? Also, make sure you move the search delay back to six.

-Kevin

We saw this problem (low light intensity) this past weekend. A couple of observations I made:

When powering the light from a battery, you should disconnect when not actually trying to acquire the light. The debugging dimension has a different temporal scale than the physical world, and the battery is living in the latter. It appears that one charge is good for testing one - or at maximum, two - ideas or one configuration error.

When packing 10 lbs in a 5 lb box, like we've done with all the wire, ballasts, and bulbs in the light enclosure, you might expect that the light performance may not be optimal. Especially when the light gets put together in a big rush because you have something more important to do - like debugging camera code. Shadows of a wiring rats nest projected onto the diffuser are probably not the best thing to calibrate to.

When all else fails, plug the camera into the LabView CMUcam GUI and take a peek at what it is seeing, rather than tweaking settings blindly while the battery discharges.

Nicole_Ypes 01-02-2007 20:17

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?

Try using a bright light. And also set the white balancing on the camera. May I sugest the briliant program by Kevin for focusing and tweaking you camera. It uses java and I believe the second tab from the left will answer alot of your questions!

Bomberofdoom 03-02-2007 10:50

Re: CAMERA
 
Hey, Kevin, just a personal question, but do you think that finding the RBG or YcrBrcg(sorry, I forogt how it's called)parameters(color level, max-min etc.) on LABView and then entering them to the color parameters in your code will work even better than setting them on LABView?

Kevin Watson 03-02-2007 12:15

Re: CAMERA
 
Quote:

Originally Posted by Bomberofdoom (Post 570817)
Hey, Kevin, just a personal question, but do you think that finding the RBG or YcrBrcg(sorry, I forogt how it's called)parameters(color level, max-min etc.) on LABView and then entering them to the color parameters in your code will work even better than setting them on LABView?

FIRST's James Rahaim spent quite a bit of time tweaking those values to work under many different lighting conditions. In general, you don't need to change the calibration values, but if you do decide to change them, don't use the RGB color space because it won't work nearly as well. I haven't used the LabVIEW tool, so I can't really say if it's better than the Java-based tool.

-Kevin


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

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