My FRC (robotics) team is having issues with image processing, and tomorrow is our last testing day before competition. The camera is facing downward and tilted in the x direction. We are trying to calculate the distance that an object is to a fixed point on the same surface. We only need to calculate the x distance (in inches).
Here's a diagram. The object could be anywhere on the line with the fixed point.
Here is the view from the camera
The tape measure represents the line in the diagram. I know it's low res and not the best picture, I took it just before I left today. The tape measure is where the object could be. And we only care about it's x position.
Other info if needed:
- Camera: Pixy
- Focal length: 28mm (1.1024")
- Sensor size: 0.25"
- Height of camera from surface (the ground in our case): 8"
We always know the x position (in pixels) of the object, we just need to calculate the distance (in inches) that the object is from the fixed point.
If you have any other questions please ask. Thanks.