I want to use photos in Blender, but I need to know camera information (sensor, focal, etc. for camera that was used to capture these photos), there is no Exif data inside these photos. I wonder if there is an equation or way to detect camera information visually (not exact, but near enough), depending on distance or perspective, etc.
You can get the angle of view with the Blam add-on
You can get them both (sensor size and focal length) at one time, but only the common factor of the equation.
With the mentioned add-on, that you can freely download, you are able to match the camera look starting from a bunch of grease pencil layers. If your photo has three vanishing points as the one below, you should provide three different layers, one per axis.
After that you can start the camera calibration with the button on the left, and you'll get the focal length value automatically applied to the active camera.
You can see from this quick modeling that the geometry is following the correct perspective deformation.
And even the length of the edges results in more or less the same as you expect from a cube.
Now comes the hardest part, as there is no uniform relation between the focal length of a lens and the angle of view, since the size of the camera sensor also determines the angle of view.
So in order to get the right value showed in the Exif data of the camera's focal length you must at least know the size of its sensor... (I may be wrong; there are a lots of things to consider. I hope someone who has more knowledge can help here. A related question is https://photo.stackexchange.com/questions/21616/how-can-i-calculate-focal-length-from-a-photograph).
Here's the scene after feeding the fields with the camera's real sensor size and focal length: the camera has to be slightly moved away from the subject to match the previous result.
Sorry, the properties panel is in my own language, anyway it's saying:
- Camera Model NIKON D32000
- Focal length = 38 mm
- Focal length 35 mm = 57 mm