Base Case. Assume a well-lit plain white (no depth and like really white) background, and a magically levitating black micro ball (such that, it would yield a very small object -of a few pixels- in the end picture with almost no 3D quality).
Here, regardless of focal length, you would not be able to reverse engineer what focal length was used by just looking at the picture.
Familiar Case I. Suppose we have a standard portrait photoshoot in a studio, with only the face on the image, and again a well-lit white background.
Here, one would easily differentiate between a wide-angle lens and a tele, based on the distortion of the face.
Familiar Case II. Suppose we have an object with a landscape in the background. If we want the object to stay the same size using different focal lengths, we change perspective (i.e. position of camera) to compensate, and we end up with different (relative) distances between the object and background.
Early Hypothesis. I guess the determination of focal length is based on
- the width and height of the object (without/regardless of background); you would be able to notice/measure distortion,
- the depth of the object or picture in general; change in perspective (to compensate for the focal length) would show a elongated depth, e.g. a square box or a person with an urban landscape as the background.
EDIT: Question. Is there any theory on what aspects of a picture are fundamental for the determination of focal length? Suppose we would want to build an algorithm where we input a photo and it outputs a focal length. What would be the theoretical building blocks of that algorithm?
Also, let's assume we're using a full frame sensor.