Canon vs Nikon Subject Distance Field?

Started by KenO, April 01, 2010, 10:54:51 AM

Previous topic - Next topic

KenO

Until recently I have been using a Canon Point and Shoot that showed subject distance.

Am now using a Nikon D60 and ExifTool shows the subject distance for all the RAW NEF photos I have taken as unknown.

Did a search and found that Subject Distance Field is part of EXIF 2.2 standard and not the camera mfg proprietary data.

Is this correct and what do I need to do for Nikon Cameras to show the subject distance?

Thanks

Ken


KenO

Have been searching since posting and found:      
Re: Does EXIF contain the distance at which the camera is focused?
« Reply #6 on: June 30, 2008, 11:49:42 AM » http://www.nikongear.com/smf/index.php?topic=10607.0
Try using ExifTool

I tried it on a couple of NEFs and the "Focus Distance" attribute looked about right.

Mal

LCD Illumination                : Off
Photo Info Playback             : Info Up-down, Playback Left-right
Shutter Release Button AE-L     : Off
Release Button To Use Dial      : No
Self Timer Time                 : 10 s
Monitor Off Time                : 20 s
Flash Sync Speed                : 1/250 s
Flash Shutter Speed             : 1/60 s
Auto Bracket Set                : AE & Flash
Auto Bracket Mode M             : Flash/Speed
Auto Bracket Order              : 0,-,+
Modeling Flash                  : On
No Memory Card                  : Enable Release
Metering Time                   : 2 s
Internal Flash                  : TTL
NEF Compression                 : Lossless
Noise Reduction                 : Off
Linearization Table             : (Binary data 46 bytes, use -b option to extrac
t)
WB GRBG Levels                  : 256 454 285 256
Lens Data Version               : 0203
Exit Pupil Position             : 146.3 mm
AF Aperture                     : 2.8
Focus Position                  : 0x11
Focus Distance                  : 1.50 m
Lens ID Number                  : 119
Lens F Stops                    : 6.00

So seems some are able to get a "real distance".

Ken

KenO

Is this correct?

by Dave Abbott "There are two similar headings in Nikon EXIF - "Focus Distance" and "Subject Distance Range"

The first is recorded in all better EXIF Viewers - The second always reads "Unknown"

Looks like this space is provided for future models which may have a rangefinder function." http://www.nikongear.com/smf/index.php?topic=10607.0

Ken

Phil Harvey

Hi Ken,

You will find that the FocusDistance reported by cameras is not very accurate, although I think the Nikon cameras are better than some others (like Canon for example, which isn't accurate at all).  I believe there are technical reasons for this but I don't know the details.

If you find FocusDistance useful you can copy it to the standard EXIF SubjectDistance tag to make it available for EXIF-compliant software with this command:

  exiftool "-SubjectDistance<FocusDistance" FILE

The EXIF standard specifies both SubjectDistance (in metres) and SubjectDistanceRange (unknown, macro, close or distant).  See the EXIF tag name documentation for a list of EXIF tags (the underlined ones are part of the EXIF spec).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

KenO

Phil

Thanks for the tip! "If you find FocusDistance useful you can copy it to the standard EXIF SubjectDistance tag to make it available for EXIF-compliant software with this command:exiftool "-SubjectDistance<FocusDistance" FILE

Did not realize that SubjectDistance was so general and that Nikon Focus Distance is not std EXIF but part of Nikon Maker Notes. 

Ken

ofrex


I took pictures of seals from a large distance (of the order of a kilometer) with a Nikon D300 and a 300mm Nikon lens.

According to

exiftool -list * | grep "Focus Distance"

the seals are at only at 37.58 meters. This is clearly wrong. I am curious to understand what is going on. A possibility is that the way the distance is coded in the EXIF does not allow for distances larger than 37.58 meters, or is it some Nikon bug?

Phil Harvey

It is not a bug or a metadata limitation.  Cameras do not need to know an accurate focus distance, and it seems that the number they store in the image is just approximate.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BogdanH

Hi,

I don't know about Nikon, but I assume it is similar to Canon, where it's assumed, that "distance" values are used for flash photography (not for checking "in focus" precission). That is, as distance to subject gets bigger, exact accuracy isn't that important anymore (for flash intensity calculation).

Bogdan

ofrex

Quote from: BogdanH on May 25, 2010, 12:04:31 PM
Hi,

I don't know about Nikon, but I assume it is similar to Canon, where it's assumed, that "distance" values are used for flash photography (not for checking "in focus" precission). That is, as distance to subject gets bigger, exact accuracy isn't that important anymore (for flash intensity calculation).

Bogdan

You are right, but a "Focus Distanc"e of 38 meters when the real distance is 1000 meters (one thousand) is very inacurate.

BogdanH

Quote from: ofrex on May 27, 2010, 04:24:33 AM
You are right, but a "Focus Distanc"e of 38 meters when the real distance is 1000 meters (one thousand) is very inacurate.
Some time ago I've checked my lens (Canon EF-S17-55) for every possible focus distance and got following distances reported by camera (in meters):
0.33-0.34-0.41-0.44-0.47-0.49-0.52-0.56-60.0-0.69-0.74-0.80-0.85-0.92-0.99-
1.08-1.18-1.30-1.45-1.63-1.87-2.18-2.62-3.27-4.34-6.43-12.33-136.23-655.35

As you can see, most reported distance values are up to ~3m -at close distance, where flash intensity is very sensible. And for all actual distances above ~137m, camera always reports 655.35m. My guess is, that for actual distances (let's say) above ~15m, reported value is only mandatory.
There's another thing: camera (or leans) doesn't realy measure (or calculate) actual distance value...by using some "in-focus" data comming from AF sensor. At least for Canon lenses, it's much more simpler: inside lens barrel, there are mechanical sliding contacts, which determine how much is focus ring rotated (see figure 8: http://www.photoscene.com/sw/tour/inside.htm).

Greetings,
Bogdan

rhameed

Sorry for resurrecting this very old thread. But I have a question about the focus distance steps reported by BogdanH for the 17-55mm lens. How did you convert the "upper focus distance" and "lower focus distance" numbers from the exif into the focus distance. Did you just take the average? And also by any chance do you have the numbers marking two boundaries for each step instead of the average?

BogdanH

Actual distance value pairs (see https://exiftool.org/forum/index.php/topic,3765.msg17267.html#msg17267) are stored in Makernotes metadata section.

Bogdan