Is it possible to calculate the dimensions of ANY object in a picture having at some known distance an object on know dimensions?
I'm thinking about the scenario where someone is holding a smartphone in one hand and on the other, or at some fixed stand, we have a W x H cm paper rectangle at some distance D cm.
Assuming some lenses characteristics, could it be possible to map the pixels to real objects and estimate their size?
I can imagine how to if we assume all the objects are in the same plane or distance, but I'd like to understand the optics principles would allow us to calculate it when the objects aren't at the same distance from the camera as is the reference object.
This question here Size of object from its image answer the question how to estimate actual dimensions of an object at some known distance.
Another one Calculate the distance between two points from iPhone Camera answers how to estimate the distance of 2 objects in the same plane assuming you know the distance from the camera.