![]() |
Camera Cycling And Angle
During the search mode, the camera does it's first sweep, and then when it moves back to make it's second sweep with a higher angle, the camera catches a glimpse of the light, but not enough to lock, so it restarts the search function from the beginning. This continues over and over, and the camera never locks! Any suggestions? Thanks.
Another questions as well. The tilt angle when taken does not vary enough to provide enough information for the trig functions to properly give distance. The angle intervals are too far spaced out. Any suggestions? Any more accurate ways of finding distance? Thanks again. |
Re: Camera Cycling And Angle
Sorry, I don't have any suggestions on the first part.
Quote:
|
Re: Camera Cycling And Angle
Quote:
Quote:
-Kevin |
Re: Camera Cycling And Angle
Quote:
Code:
if(new_search == 1) |
Re: Camera Cycling And Angle
Denz, the math and the algorithms show there are different things which effect accuracy. The camera can be mounted at the max robot height and still give plenty of accuracy if the math is understood and some undocumented things are known. In determining what part of the vertical vs distance accuracy you are referring to here is a list of things to consider:
The camera pwm values can be used for a coarse angle measurement then the target centroid pixels can be used for fine measurement. |
Re: Camera Cycling And Angle
We decided to use blob size, which is effective to an extent. The camera stays at a tilt angle of 38 degrees for about 6 feet before it changes to anything else. I have the tilt error set at 2 pixles, maybe I should adjust it to 1? Anyhow, my math was correct for sure, and I converted degrees into radians and everything (I'm a math guy, don't worry). But the problem is the tilt angle changes very little or big distances. We're using blob size for now, but if I can get the distance to work, that would be great!
Thanks Donut, I will try your suggestion, it looks like it works. Thanks alot for everyone's help, lol being a first year programmer is pretty hard! |
Re: Camera Cycling And Angle
The camera zero accuracy is 0.8 degrees per pwm step. But of course is subject to the deadzone when the target center is near the camera center. But the target center (in pixels) does not use that deadzone. Camera pixels (vertical) have an accuracy of 0.14 degrees per pixel. So if you want accuracy use camera pwm to get bot to camera center angle, then target centeroid pixels to get camera center to target center.
|
Re: Camera Cycling And Angle
Quote:
If you are: Does this make a difference if the error tolerance is 0 or 1? Is this more accurate? What is the math behind it? I guess the advantage would be that the target does not have to be in the center of the camera field of view to calculate distance. Any other advantages? Thanks in advance, Robinson |
Re: Camera Cycling And Angle
Quote:
Quote:
The bot to camera center calculation is a straight interpolation of the form: bot to camera angle = pwm * (a/b) + c This is the same formula as 2 points define a line. To derive the constants use two different pwm values (spaced far apart) and measure the angle of the camera. The camera center to target center formula is similar: camera to target angle = target pixel * (camera fov angle / camera pixels) - center pixel Then combine: bot to target angle = bot to camera angle + camera to target angle Quote:
|
| All times are GMT -5. The time now is 01:35. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi