Distance information for Sony SLR cameras

Started by LKB, October 31, 2011, 07:15:27 AM

Previous topic - Next topic

Phil Harvey

Hi Igal,

Thanks!  I will add this to the next version.  What exactly is the 0x003a-3b formula?  Is this version of the distance any more or less reliable than the 0x49bb one?

- 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 ($).

milchtaich

Hi Phil,
The best formula I could come with is this one. To get the distance in meters, multiply the value by 2^((70 -z)/16), where z is the raw decimal value of the approximate focal length tag (byte 0x49C6). The result usually agrees reasonably well with the 0x49bb one, except at close focus distances where the present tag is more coarse grained (fewer possible values).

Igal

Phil Harvey

Interesting, thanks.

It would be great to decode this for other models too.  I will see what I can do.

- 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 ($).

LKB

I am very interested in this feature. I k ow that distance accuracy is low but even indication of infinity on my wide angle lenses (Minolta 20/2.8) would be of great benefit. It tends to go towards it, especially with people shots and this would allow me to filter out the missed shots easily.

I am more then happy to take more sample shoots on my A55, on the known base/with different lenses maybe ?

Phil Harvey

Coincidentally, I am downloading a set of distance samples for the A55 as I write this.  imaging-resource has the focus distance tests which I can use for this, although the range of distances isn't great (6-16ft).

I'll let you know what I discover.

- 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 ($).

Phil Harvey

#20
As it turns out, the flash distance tests aren't ideal because 1) images are taken sequentially, so I can be fooled by other information that increments monotonically with shutter count, and 2) image distance is correlated with flash power, so I could be fooled by this too.

That having been said, here are the tags that incremented monotonically for the samples:

Tag 0x0010 0x3b32        : 85+2+2+3+1+3+1+2+3+1+3 (plus lots more in tag 0x0010 nearly identical to this)
Tag 0x0020 0x1244        : 18+18+30+5+10+0+2+0+0+2+2
Tag 0x0020 0x37d3        : 87+2+2+2+2+2+2+2+2+2+2
Tag 0x0020 0x37dd        : 32+4+4+4+4+4+4+4+4+4+4
Tag 0x0020 0x37e1        : 26+2+2+2+2+2+2+2+2+2+2
Tag 0x0020 0x3d06        : 6+2+2+2+2+2+2+2+2+2+2
Tag 0x0020 0x3e62        : 2+1+1+0+1+1+1+0+2+1+3
Tag 0x0020 0x3e66        : 3+0+1+1+2+1+2+0+3+0+1
Tag 0x0020 0x3e6a        : 2+0+0+1+3+2+2+0+2+0+1
Tag 0x0020 0x3f21        : 11+1+1+1+3+0+1+0+9+12+11
Tag 0x0020 0x3f25        : 12+1+3+2+3+3+3+0+7+6+9
Tag 0x0020 0x3f29        : 12+0+4+4+5+4+6+1+7+3+3
Tag 0x0020 0x3fd1        : 17+1+1+0+0+0+1+0+3+2+2
Tag 0x0020 0x3fd5        : 12+2+1+0+1+1+1+1+3+2+1
Camera Settings 3 0x0114 : 106+2+2+2+2+2+2+2+2+2+2
Camera Settings 3 0x01b4 : 31+11+11+11+11+11+11+11+11+11+11
Camera Settings 3 0x0200 : 6+2+2+2+2+2+2+2+2+2+2
Camera Settings 3 0x045f : 150+0+1+1+0+1+1+0+1+1+1


The first value given is the data at the 6ft distance, then the "+X" numbers are the difference between this and the next value for distances which increment by 1ft each, up to 16ft.

None of these possibilities really jumps out at me as being a good candidate.  I have tested a few of the better ones against other samples, and none gave consistently good results.

So we might be out of luck here for the newer Sony models.

- Phil

Edit: I should state for the record that this analysis was for the SLT-A55V
...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 ($).

LKB

Phil,
Is the flash information only place that dist is stored? D lenses (all Sony and most new Minolota ones) send information to flash, so maybe there are other info location there?
I could design non-incremental test with flash/no-flash and including infinity to test those possibilities. I just need a few more advices here:
-would it be more meaningful to test with large differences in focal length (lets say 20 vs 200), sequential or just a single lens will do?
-what distance changes would you be intersted in? With fine weather I can take my disto and set out .5,3,5,10,20 and maybe 50 m baseline to shoot photos on.

Would this be of any help?

Phil Harvey

I wasn't looking specifically at flash information.  Non-flash samples would be preferable just to avoid confusion with flash information.  Do you have a distance scale on the lens itself?  If you do, a quick set at each of the distances indicated on the lens with manual focus should do the job.  (taken in a random order to avoid the other coincidental correlations.)

- 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 ($).

LKB

Oki,
There is scale on most of my non-DT lenses. I can do those in the evening/over the weekend. One focal length or change them? Should I use prime or zoom?

Phil Harvey

I don't think it matters what focal length or lens, as long as it is an autofocus lens (but set to manual focus for this test of course), and you use the same focal length for all shots.

- 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 ($).

LKB

Phil,
I got a bit of deadline breach and can't deliver the photos at the moment. I'll try as soon as possible though...

LKB

Phil, how is this feature going? Do you need more samples?

Phil Harvey

Thanks for the reminder, but I haven't forgotten.

The samples are sufficient, and I have analyzed them in some detail but haven't yet found the focus distance information.  I haven't given up yet though, but it isn't looking too hopeful at the moment.

- 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 ($).

Phil Harvey

I took another close look at the metadata from your A55 test images, and unfortunately I still can't find anything that looks like a reliable focus distance. :(

I won't say that this information doesn't exist, but I will say that it is hiding very well if it does.

- 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 ($).

LKB

That is a pity.
What about any information suggesting focusing to infinity? Is there anything like that?