# Is it possible to calculate the dimensions of ANY object in a picture having at some known distance an object on know dimensions?

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.

Regards

Joao Carlos

• Nope, it's not possible using a single image. However it is possible if you have two images taken from nearby cameras. This is exactly how our brain estimates the distances between your eyes and objects. If you shut one eye, this system fails. You can try this out yourself - the image appears to be flat (but you still can probably memorize approximately how far the objects are). – kristjan Aug 16 '15 at 19:57
• So, if I had 2 cameras fixed on some stand and pointing to the scene, taking the picture at the same time and knowing the distance from each one to my reference object, it would be possible? – jcarlos Aug 17 '15 at 1:01
• Yes, because it is possible to calculate the distance between the two cameras using this reference object and then you can use simple geometry. – kristjan Aug 17 '15 at 17:16