How can one calculate the height of a rectangle where the bottom part is unknown. The rectangle is in perspective, I know the top part and sides. However not the bottom.
Extra info: it's a picture taken of a paper, due to the angle of the camera the object is in perspective, top part being the furthest away and bottom part outside of the camera closest to you.
Situation like this: I know the green intersections, therefore the width in between and both sides (not the length obvious).
Below is how I think it should be done, but it's not precise so I'm looking for people to help me determine if I'm doing something wrong or can improve it.
#Paper size: Pw=21.02cm Ph=29,73cm Calibration constant, number of pixels per cm at 50cm distance: k = ### pixels/cm = (observed pixels calibrated)/Pw kdist = 50cm Q = k * Pw pixels width on the observed paper Distance to top: dtop = kdist*Q/Px Px is the top width in pixels We define a new point for measurement of the width, and define pixels to be perfect squares. Py = 0.1 * Px (10% down) New width for the new point, Py: is being manually measured for now. Px2 calculated at Py. Distance to Px2: d2 = kdist*Q/Px2 Calculate height between top and Py: h = sqrt(sqr(0.1*Pw)+sqr(dtop-d2)) Ratio between 0.1*Pw and full paper length: r = Ph/h Bottom line will be: Y = r*Py