Page 1 of 1

Butterfly size from a photo?

Posted: Wed Jul 24, 2013 11:20 pm
by Pete Eeles
Quick question:

If I take a photo of a butterfly with a prime lens (fixed focal length) and then focus on a butterfly and take a shot, is it possible to calculate the size of the butterfly based on its size within the overall frame? I don't know if the EXIF information includes enough information to achieve this, hence my question. But it would be awesome if this could be achieved! Thx!

Cheers,

- Pete

Re: Butterfly size from a photo?

Posted: Thu Jul 25, 2013 6:06 am
by Rogerdodge
Pete
The EXIF information does not include the focus distance. Therefore I don't think it is calculable.

However - if this question is related to your other post (Colour Calibration), then I would suggest that for each series of specimens, use manual focus and lock it off. Photograph a scale (on a colour board and grey scale also?) with the first shot and maintain that same focus distance with all future shots in that series.
If you change to larger/smaller specimens, then repeat the process.

HTH

Roger

Re: Butterfly size from a photo?

Posted: Thu Jul 25, 2013 8:05 am
by Pete Eeles
Rogerdodge wrote:The EXIF information does not include the focus distance. Therefore I don't think it is calculable.
Indeed - and a real shame this information isn't included, since the camera must know what focus setting is being used!
Rogerdodge wrote:If this question is related to your other post (Colour Calibration)
Not really - the first question (in this thread) is to allow me to use the EXIF data, and the image itself, to calculate the size of a butterfly (assuming its wings are perpendicular to the plan of the camera).

Definitely helps Rog - and thx!

Cheers,

- Pete

Re: Butterfly size from a photo?

Posted: Thu Jul 25, 2013 9:19 am
by dilettante
Pete Eeles wrote:
Rogerdodge wrote:The EXIF information does not include the focus distance. Therefore I don't think it is calculable.
Indeed - and a real shame this information isn't included, since the camera must know what focus setting is being used!
I'm not sure the camera necessarily does know. Thinking for instance of SLR lenses, I think they just adjust focus back and forth until the AF detectors say focus has been achieved, but I'm not sure the camera or even the lens has a way of measuring or reporting where this is.

Re: Butterfly size from a photo?

Posted: Thu Jul 25, 2013 1:51 pm
by MikeOxon
Actually several cameras do record distance information, since it is used in some of the in-built image correction functions. (for example, Nikon cameras automatically remove chromatic aberrations from most lenses). Many image processing applications do not show all the data that are available but ExifTool shows much more than most - download from http://www.sno.phy.queensu.ca/~phil/exiftool/

For Nikon, both 'D' and 'G' type lenses transmit distance information to the camera. This applies to some independent lenses as well, such as my Tamron 90mm macro, which is a 'D' type lens. I don't have experience of other makes but believe some Canon cameras also use distance information.

As an example, here's an edited extract of EXIF data from a macro shot taken with my Nikon D300s:

ExifTool Version Number : 9.33
File Name : DSC_30612.NEF

---------------edited-----------------------

Lens Type : D
Lens : 90mm f/2.8

---------------edited----------------------

Lens Data Version : 0204
Exit Pupil Position : 85.3 mm
AF Aperture : 3.3
Focus Position : 0x22
Focus Distance : 0.71 m
Lens ID Number : 50
Lens F Stops : 6.92
Min Focal Length : 89.8 mm
Max Focal Length : 89.8 mm
Max Aperture At Min Focal : 2.8
Max Aperture At Max Focal : 2.8
MCU Version : 53
Effective Max Aperture : 3.2
Raw Image Center : 2176 1434

In this example, you can see the focus distance recorded as 0.71m. I've edited out reams of additional information, which even includes how many times the shutter has been fired since the camera was new!

So, if your camera provides this information, you should be able to calculate the original image size from basic optical formulae.

Mike

Re: Butterfly size from a photo?

Posted: Thu Jul 25, 2013 5:45 pm
by FISHiEE
My Canon 10D used to show the focus distance in the Exif info but latter models didn't include it it seems :(

Have to say I was sometimes a little sceptical of what the figure was sometimes though. Maybe that was just for the badly out of focus ones! :lol:

Re: Butterfly size from a photo?

Posted: Fri Jul 26, 2013 6:29 am
by JKT
I wonder if that shown focal length is the actual (which depends on the focus distance) or the infinity one. Easy to test...

Re: Butterfly size from a photo?

Posted: Sun Jul 28, 2013 10:20 pm
by Pete Eeles
Thx for all the replies, which have pretty much confirmed what I thought was the case, but it was good to get confirmation that this is in the "too hard" category at best!

Cheers,

- Pete