## Physics and Photography

For the discussion of the sciences. Physics problems, chemistry equations, biology weirdness, it all goes here.

Moderators: gmalivuk, Moderators General, Prelates

JazzKennyWowy
Posts: 1
Joined: Wed Mar 14, 2018 3:55 pm UTC

### Physics and Photography

Is it possible to figure out the distance of an in focus object was from the camera when the photo was taken? I was thinking if you knew the aperture, focal length, and the sensor size (probably matters if not full frame) which most photography websites have the option of including with photos. If the depth of field was too large you couldn't but with a shallow depth of field I bet you could get a pretty accurate measurement.

speising
Posts: 2350
Joined: Mon Sep 03, 2012 4:54 pm UTC
Location: wien

### Re: Physics and Photography

No.
Proof: you can focus on different things without changing any of the mentioned parameters.

gmalivuk
GNU Terry Pratchett
Posts: 26738
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

### Re: Physics and Photography

In particular, the problem is that the focal length is related to the actual distances by the equation 1/s1 + 1/s2 = 1/f, where s1 is the distance (from the front nodal point) to the in-focus object and s2 is the distance (from the rear nodal point) to the film or sensor.

If f = 50mm and s2 = 55mm, then s1 = 55cm. If s2 = 51mm then s1 = 255cm.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

doogly
Dr. The Juggernaut of Touching Himself
Posts: 5530
Joined: Mon Oct 23, 2006 2:31 am UTC
Location: Lexington, MA
Contact:

### Re: Physics and Photography

Is not s_2 very knowable by cameras?
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.

Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?

gmalivuk
GNU Terry Pratchett
Posts: 26738
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

### Re: Physics and Photography

It's presumably entirely knowable by the camera, but I don't believe it's typically stored in image metadata.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

ReneeDegutis
Posts: 1
Joined: Tue Dec 04, 2018 6:23 am UTC

### Re: Physics and Photography

JazzKennyWowy wrote:Re: Physics and Photography
Is it possible to figure out the distance of an in focus object was from the camera when the photo was taken? I was thinking if you knew the aperture, focal length, and the sensor size (probably matters if not full frame) which most photography websites have the option of including with photos. If the depth of field was too large you couldn't but with a shallow depth of field I bet you could get a pretty accurate measurement.

Hello JazzKennyWowy,

Seems to me there was a discussion on the Photography Stack Exchange about the distance to an object having two pictures taken some cm apart. The OpenCV library can be a perfect tool, if you are interested to write code.
Update: found the source to Photo Stack Exchange discussion - https://photo.stackexchange.com/questio ... ken-a?rq=1

Regards,
Renee
Last edited by ReneeDegutis on Wed Dec 26, 2018 7:17 am UTC, edited 2 times in total.

Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 4060
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

### Re: Physics and Photography

Versions of that old and new.

(Somewhere I've still got a pair of, now ancient, digital cameras rigged side-by-side onto a rigid frame so that they can take consistent simultaneous photos to be image-processed to try to extract (rough) depth data of a scene.)