1

I have a photo of a billboard. I am trying to solve this problem of finding out the aspect ratio of this billboard.

What is known to me is nothing more than this photo.

Can someone help me with this?enter image description here (Even if it has no sufficient information to solve this problem then I want to know what is it missing)

  • Possibly related: https://math.stackexchange.com/questions/455128/how-to-find-an-all-in-one-2d-to-3d-transformation-matrix-for-perspective-project https://math.stackexchange.com/questions/1691895/inverse-of-perspective-matrix https://math.stackexchange.com/questions/1407264/determining-the-angle-of-a-photograph-containing-known-parallel-objects-lines https://www.google.com/search?client=ubuntu&channel=fs&q=inverse+projection+matrix+2d+to+3d&ie=utf-8&oe=utf-8 – Keith McClary Jan 20 '19 at 04:51

1 Answers1

2

To the $2$D vectors $h, w, d$,

enter image description here

we want to add components $H, W, D$ normal to the image plane such that the sums are orthogonal in $3$D: $$ 0=h\cdot d + HD = h\cdot w + HW = w\cdot d + WD$$ where $h\cdot d,\, h\cdot w$ and $w\cdot d$ are $2$D inner products. Then

$$ W^2 = -\frac{w\cdot d \quad h\cdot w}{d\cdot h}$$ $$H^2 = -\frac{h\cdot d \quad h\cdot w}{w\cdot d}$$ $$D^2 = -\frac{w\cdot d \quad h\cdot d}{w\cdot h}$$ The aspect ratio is $$\frac{\sqrt {W^2 + \lVert w\lVert ^2}}{\sqrt {H^2 + \lVert h\lVert ^2}}$$

The above assumes that the $3$D sign is projected normally onto the image, but the camera is close so there is some perspective. I think you would get a better approximation by taking $w$ to be the average of the top and bottom edge vectors, etc.