|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Angle Calculation from image of goal
Quote:
Imagine a camera that is looking straight up. What does the x coordinate mean with respect to the robot? What does the y coordinate mean? |
|
#2
|
||||
|
||||
|
Re: Angle Calculation from image of goal
We actually took the time to do the trig out for the offset. You can take a look at our function https://github.com/FRC125/NU16/blob/...lator.java#L31 you will just need to now the fov, dimensions of image, height of camera, x,y offset of camera in inches and angle of the camera.
Your offset basically changes based on the distance to the target. You use the y coordinate of the target to calculate this distance. |
|
#3
|
||||
|
||||
|
Re: Angle Calculation from image of goal
Quote:
The horizontal field of view that you'd find on the camera's data sheet doesn't always agree perfectly with the observed results; it might take a bit of experimental tweaking. |
|
#4
|
||||
|
||||
|
Re: Angle Calculation from image of goal
I'm not sure this holds true when working with a "flat" image, we just tried rotating the camera and it did not change the x value of the target
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|