Subject distance

qDslrDashboard feature request, ideas
Post Reply
homedoc
Posts: 2
Joined: 17 May 2015, 16:40

Subject distance

Post by homedoc »

I am using a Nikon D800E, and before that Nikon 5100. I think it is dumb that when you focus on a subject, the camera will not display the distance between the camera and your focus point. Then you could use a DOF calculator to find your DOF without having to stop the camera down manually, which makes the image very hard to see anyway. I don't know if Canon cameras have this same problem.

I know that the camera has this info because it stores it in Exif as tag 9206. Unfortunately, the only Exif reader I have ever found that reports this data is ExifPro, which is a Windows application. I have searched for a similar app for Android but if there is one, I have not found it!

It would be great if you could retrieve this info live and display it. If not, maybe you could set up the image reader code to display this info from a captured jpeg?
hubaiz
Site Admin
Posts: 2003
Joined: 27 Jan 2015, 18:58

Re: Subject distance

Post by hubaiz »

There is no such property that can be get from camera.
homedoc
Posts: 2
Joined: 17 May 2015, 16:40

Re: Subject distance

Post by homedoc »

Hi there,

Here is a link to a screen shot of ExifPro indicating the Subject Distance exif parameter.

https://www.dropbox.com/s/uh2omhf71wt7x ... t.jpg?dl=0

So the property info is somewhere in the camera, though it may not be available except through Exif. If that is the case, I think it would be very useful in the field tro read and display it when a jpeg is displayed.

For example, if you use a DOF calculator and it reports that your DOF is from point A to point B, how can you be sure that part of your subject matter is within the DOF? One solution would be to focus on the subject matter object, snap and import a low res jpeg, and then read the EXIF Subject Distance to see if the object is within the csalculated DOF. Since no cameras (that I am aware of) report the actual Subject Distance directly, and it cannot be accessed through the USB camera interface, the only other solution would be to buy a range finder, which can be pretty expensive.

Also, FYI, here is a link to a complete list of all the Exif parameters, including Subject Distance (parameter 9206):

http://www.sno.phy.queensu.ca/~phil/exi ... /EXIF.html

Dave
hubaiz
Site Admin
Posts: 2003
Joined: 27 Jan 2015, 18:58

Re: Subject distance

Post by hubaiz »

I checked the JPG/NEF/CR2/ARW images from Nikon D5000, D7100, Canon 650D and Sony NEX6 and none of them had the SubjectDistance Exif tag.
dslr
Posts: 58
Joined: 09 May 2015, 21:42

Re: Subject distance

Post by dslr »

not sure if you can get the data but thought i'd mention it...

need to examine the original nikon jpeg file or raw nef file
jpeg file saved from other softwares, such as photoshop, will strip out nikon metadata

i examined files from nikon d300 and d7200 with lenses 18-200mm and 70-300mm

exif has

0xa40c SubjectDistanceRange but its value seems to always set to 'Unknown'

nikon proprietary metadata has

0x000a FocusDistance. value is in meters

i used this free tool exiftool by phil harvey

http://www.sno.phy.queensu.ca/~phil/exiftool/

it is a command line tool. the companion gui for windows is exiftoolGUI

http://u88.n24.queensu.ca/exiftool/foru ... 750.0.html

in the top forum posting, click where it says

Click here to download ExiftoolGUI v5.16 (in green)

by default the exiftoolGUI looks for exiftool.exe in C:\Windows (may need to search for exiftool.exe and copy or move it to c:\windows)
by default, only tag names are displayed. to view the tag ids, options -> prefix tag names with id number

attached is a screenshot of exiftooGUI examining a raw NEF file (i've erased the directory hierarchy in the 'browse' section on the left)

Maker - nikon metadata
Exif - standard exif data
ALL - all data (standard, nikon, etc)

thanks...
Attachments
exifGUI.jpg
exifGUI.jpg (237.86 KiB) Viewed 11942 times
dslr
Posts: 58
Joined: 09 May 2015, 21:42

Re: Subject distance

Post by dslr »

nikon metada vs exif

http://www.sno.phy.queensu.ca/~phil/exi ... Nikon.html


Nikon LensData0204 Tags

Nikon encrypts the LensData information below if LensDataVersion is 0201 or higher, but the decryption algorithm is known so the information can be extracted.

Index1 Tag Name Writable Values / Notes
0 LensDataVersion N
4 ExitPupilPosition int8u
5 AFAperture int8u
8 FocusPosition int8u
10 FocusDistance int8u (this focus distance is approximate, and not very accurate for some lenses)
11 FocalLength int8u
12 LensIDNumber int8u (see LensID values below)
13 LensFStops int8u
14 MinFocalLength int8u
15 MaxFocalLength int8u
16 MaxApertureAtMinFocal int8u
17 MaxApertureAtMaxFocal int8u
18 MCUVersion int8u
19 EffectiveMaxAperture int8u
Post Reply