The resolution of the depth information you can get just from object size is going to drop off really quickly as you move away from the camera.
When you are relatively close to the camera, the ball will occupy a lot of pixels and the depth of the object within the frame is high resolution.
As you move away from the camera however, the number of pixels the ball is occupying in your captured image rapidly decreases.
As that happens, the possible position of the ball along a line in space drawn from the camera to the center of the ball, gets larger and larger. Eventually a single pixel error in calculating the ball size will translate to a massive positioning error along that line!
- We use a larger ball.
- This moves the useable range of the sensing out further at the expense of near
- A larger wand is more cumbersome.
- We use a camera with a narrower FOV.
- This decreases the usable width and height of the performance area, but then extends the length.
- The camera will need to be further away from the performance area to start with.
- We use a camera with a really high resolution.
- The speed of OpenCV is inversely proportional to the number of pixels you are feeding it. Bigger images are a lot slower to process.
- Using the very low latency integrated CSI-2 camera interface of the PI or Jetson Nano, we end up maxing out at 8MP or about 1080P@30fps of RAW image data. To do much better than this we would need to use a USB-C camera and the cost skyrockets.
- We use stereo imaging and determine the depth via triangulation.
- We immediately lose half of the capture rate.
- We lose the ability to track multiple objects without more work as we can't triangulate each object without being able to differentiate them.
- Flashing each ball works, but then your capture rate goes down really fast as only one ball per color can be lit per captured frame and then the flashing must to be coordinated.
- Using different colored balls works, but then you lose the ability to paint in the color you are seeing as the ball.
For now I think the solution I am going with is to use a narrower FOV CSI-2 camera that can do 1080P@30fps and feed it to a Jetson Nano.