I am trying to recreate classic light guns on LCD TVs by using object detection from an image. I have a light gun that will have a colored dot on the end of it. The webcams at either side of the TV will look for the colored dot and try to figure out where its pointing in relation to the TV by using the angle. Two webcams are used because the colored dot may be lost at certain angles.
I am able to figure out the distance from the gun to the TV but that's it. In the actual game there is a calibration screen so I thought it might be possible to use data from the calibration screen for the calculations. On the calibration screen, the user shoots as accurately as possible on a target displayed on a screen.
So in conclusion, my problem is that I need to find an angle which shows where the gun is pointing in relation to the TV, by using an image from one of two webcams. The only measurement I can get is from the webcam to the gun. A possible solution is by using the calibration screen. In the calibration screen I can identify the distance from the target to the webcam. I am not sure if this is helpful or not but it may be.
I apologize if this does not make sense, I am relatively new to using a lot of maths in my programming. Below is a diagram of what I think is correct.