I'm trying to determine the rotation of a structure by mounting three LEDs in known locations then watching it with a camera.
The LEDs are arranged such that two are at either end of a line and the third is perpendicularly offset from the centre of this line.
The size of this shape is known but the camera doesn't output real world measurements so these dimensions can't be used directly - as a ratio perhaps.
Here is a diagram of the problem:
r, c, d are known and I am trying to find theta.
Thanks
Assuming that the projection is parallel, we have
$$c=\frac a2\cos\theta-b\sin\theta,\\ d=\frac a2\cos\theta+b\sin\theta.$$
Then taking the ratio and simplifying
$$\frac cd=\frac{r-2\tan\theta}{r+2\tan\theta}$$ from which you easily get $\tan\theta$.