|
Re: Angle Calculation from image of goal
Here is some LabVIEW code that tackles this problem...
The way the VI works is it takes your current gyro heading, and does some trigonometry to find the needed gyro heading and the current distance from the goal (might be helpful if you have a certain distance range you can shoot from).
Make sure to set the constants in the code (I've commented it mostly, but the important ones are the goal target width (in feet), the camera's horizontal angle of view (in degrees), and the image width (in pixels)...
Disregard the Disabled code at the bottom.
Hope this is helpful, feel free to PM me with any questions.
__________________
2016 - NE District Championship Entrepreneurship Award
2016 - Hartford District Industrial Design Award
2016 - Waterbury District Engineering Inspiration Award
|