Max Lyons Forums Forum Index Max Lyons Forums
Panoramic and Related Photography | Subscribe
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

EXIF Use for Focal length Multiplier?

 
Post new topic   Reply to topic    Max Lyons Forums Forum Index -> PTAssembler, Panorama Tools and Other Software
View previous topic :: View next topic  
Author Message
andrewj



Joined: 03 Jul 2008
Posts: 13
Location: England

PostPosted: Wed Jul 08, 2009 3:32 am    Post subject: EXIF Use for Focal length Multiplier? Reply with quote

Dear Max,
Which EXIF field(s) are used to derive the focal length multiplier in PTAssembler?

JPGs produced with Bibble V4 are fine, but those produced with the new version cause a warning about missing focal length multiplier info in PTAssembler. I have done a quick visual check and the EXIF data looks very similar, so I need a steer exactly what to check.

Thanks
Andrew
Back to top
View user's profile Send private message Visit poster's website
Punkie



Joined: 30 Jan 2008
Posts: 38
Location: Netherlands

PostPosted: Wed Jul 08, 2009 5:59 am    Post subject: Reply with quote

Hello Andrew

As far as I know PTAssembler reads the info partly from the file pta_multiplier.txt. That list is rather outdated, but with so many camera's coming out each year you can't maintain that. But you can ad that info from your camera in it. The following info is needed from the EXIF.
1) Manufacturer
2) Camera model
3) Multiplying factor

Multiplying factor is not in the EXIF info from my camera's, so you have to calculate that.
Focal length is read by PTAssembler from the EXIF info.
You have to put it in the right syntax.
Examples of my camera's

Canon|Canon PowerShot A590 IS|6.04
OLYMPUS IMAGING CORP.|E-500|2.0

Save the file now under the same name and PTAssembler reads all the info now.

You better keep a backup of that file, because with a new install it is overwritten by the old one.

Kind regards,
Henk Tijdink
Back to top
View user's profile Send private message
maxlyons



Joined: 20 Jun 2003
Posts: 3347
Location: USA

PostPosted: Thu Jul 09, 2009 1:33 am    Post subject: Re: EXIF Use for Focal length Multiplier? Reply with quote

andrewj wrote:
Dear Max,
Which EXIF field(s) are used to derive the focal length multiplier in PTAssembler?


The code to compute this is pretty complicated, mostly because PTAssembler tries to "guess" fields that aren't in the EXIF data and because some cameras actually record incorrect values. That said, the general approach used by PTAssembler (assuming no missing fields or bogus values) is to use the FocalPlaneXResolution, FocalPlaneYResolution and FocalPlaneResolutionUnit tags to deduce the sensor size, from which the multiplier value can be calculated.

If all else fails, and the value can't be computed, then PTAssembler will consult the multiplier file mentioned by Punkie.

One easy thing you can do if PTAssembler can't calculate the value is to hard-code it using the "Focal Length Multiplier" option on the misc tab of the preferences screen.


Max
Back to top
View user's profile Send private message Visit poster's website
Punkie



Joined: 30 Jan 2008
Posts: 38
Location: Netherlands

PostPosted: Thu Jul 09, 2009 2:03 pm    Post subject: Re: EXIF Use for Focal length Multiplier? Reply with quote

Quote:
The code to compute this is pretty complicated, mostly because PTAssembler tries to "guess" fields that aren't in the EXIF data and because some cameras actually record incorrect values. That said, the general approach used by PTAssembler (assuming no missing fields or bogus values) is to use the FocalPlaneXResolution, FocalPlaneYResolution and FocalPlaneResolutionUnit tags to deduce the sensor size, from which the multiplier value can be calculated.

If all else fails, and the value can't be computed, then PTAssembler will consult the multiplier file mentioned by Punkie.

One easy thing you can do if PTAssembler can't calculate the value is to hard-code it using the "Focal Length Multiplier" option on the misc tab of the preferences screen.


Hello Max

I'm just wondering why PTAssembler first try to calculate it from the EXIF info and later checks the multiplier file if it can't find it.
When the multiplying factor is in the file it is already hard coded and available. Then you don't have to calculate again. Now it seems like inventing the wheel again. Perhaps first the file should be checked and if the camera is not in the file then trying to calculate it.

With more camera's with different multiplying factors in use of which PTAssembler can't calculate the FOV, I think you can better modify the multiplier file, then every time changing it in the preference screen. Most of the time that that value is wrong in the preference screen you notice it when already working in the project. Putting your camera values in the multiplier file is perhaps something to mention in the manual. Just by curiosity I found and opened the multiplier file. Checking the EXIF of some pictures I found which EXIF values were needed, so I could put my camera's in the multiplier file.

Kind regards,
Henk Tijdink
Back to top
View user's profile Send private message
andrewj



Joined: 03 Jul 2008
Posts: 13
Location: England

PostPosted: Thu Jul 09, 2009 4:14 pm    Post subject: Reply with quote

Thanks to Max for the info. This is exactly what I needed - there's just a bug in the new version of Bibble which the developers need to sort out.

In response to Punkie, the problem with the settinsg file approach is that camera models change very fast, and this loads Max with a maintenance problem. For the large number of cases where a simple calculation from EXIF data works, it's the right solution, with the various manual or semi-manual over-ride approaches good work-arounds for when the EXIF method fails.

Andrew
Back to top
View user's profile Send private message Visit poster's website
Punkie



Joined: 30 Jan 2008
Posts: 38
Location: Netherlands

PostPosted: Thu Jul 09, 2009 4:43 pm    Post subject: Reply with quote

Hello Andrew

I didn't mean that Max should maintain the multiplier file, but that a user with more camera's of which PTAssembler can't compute the multiplier can put these references in the multiplier file.
Then you don't have to change the multiplier in the preference screen, when using images with another multiplier. See my camera examples!
That is what should be mentioned in the manual so a user knows about the existence of that file and can add camera's to that file.

Kind regards,
Henk Tijdink
Back to top
View user's profile Send private message
maxlyons



Joined: 20 Jun 2003
Posts: 3347
Location: USA

PostPosted: Thu Jul 09, 2009 11:31 pm    Post subject: Reply with quote

Lots of good points here. The multiplier file was really an afterthought...it has been a very long time since I coded it. I remember that it wasn't my idea originally, and that someone (perhaps a forum member) convinced me that it would be a good idea. But, PTAssembler has always attempted to compute the value first...I'll consider rethinking the order.

Although it has been a very long time since I coded or updated the multiplier file, I'm pretty sure that I didn't intend for it to be a user editable file (which is why it isn't mentioned in the documentation). There are lots of things in PTAssembler that I could have obfuscated (e.g. project files, the multiplier file, the lens settings file, the preferences file, etc.) so that the user wouldn't be able to read/edit them. But, in general, I have decided to keep this sort of data in a human readable format with the caveat that if you can figure out the file format and modify these files you are on your own.

As for the multiplier file maintenance issue, that is a real nightmare. I went down that road for a couple of years with another software program I wrote, and ended up totally overwhelmed with the volume of new camera models that appeared with ever-increasing frequency. So, I don't plan on a lot of regular updates to this file.

With all that said, I'll consider adding a user interface to edit this file to add data for their cameras. The only caveat that I'd add is that (similar to other EXIF problems), some cameras/software don't record (or record incorrectly) the make/model information which is the key used to look up the correct multiplier value. And, if this file is edited by the user, then I guess the PTAssembler installer shouldn't overwrite it, even if the version distributed with PTAssembler has a number of updates/new entries.

Max
Back to top
View user's profile Send private message Visit poster's website
maxlyons



Joined: 20 Jun 2003
Posts: 3347
Location: USA

PostPosted: Sun Aug 30, 2009 1:28 pm    Post subject: Reply with quote

maxlyons wrote:
But, PTAssembler has always attempted to compute the value first...I'll consider rethinking the order.


After some more thought, I am going to change the order! Future versions of PTAssembler will consult the multiplier file first, and only fall back to the EXIF data if a value isn't found in the multiplier file.

I have done this because I have noticed that some images from several current/new cameras may have incorrect EXIF values which can lead to an incorrect calculation of the multiplier. Specifially, the FocalPlaneXResolution and FocalPlaneXResolution values can often be wrong for the Canon G9 and G10 cameras. The story is actually pretty complicated, and after spending some time looking at the files from these cameras, here are the observations that I have made:

1. It looks like the values are recorded correctly in the JPEG files from the Canon G9. I haven't looked at the G10 JPEG files, but my guess is that they are OK as well.

2. When shooting RAW format, it looks like the FocalPlaneXResolution and FocalPlaneYResolution values in the RAW files are applicable to the small thumbnail images that are embedded within the RAW files, rather than the raw data itself.

3. When converting from RAW to TIFF, the software that I have tried (DPP, RawTherapee and ZoomBrowser) takes the FocalPlaneXResolution and FocalPlaneYResolution values that are appropriate for the small embedded thumbnail image and copies them into the full size converted TIFF file.

4. The net result of 2 and 3 above is that when PTAssembler finds the EXIF data in the TIFF file and attempts to calculate the multiplier, it ends up producing an incorrect result.

5. I note that Phil Harvey's excellent ExifTool program seems to be able to calculate a correct value for "Scale Factor To 35 mm Equivalent" (the same concept as PTAssembler's multiplier) for these TIFF files. I haven't looked too much at the ExifTool source code, but my guess is that this value is derived by parsing the (undocumented and manufacturer specific) "MakerNote" EXIF data, rather than by looking at the standard EXIF tags upon which PTAssembler relies.

As a result of all this, I have concluded that relying on the EXIF data to calculate the multiplier is probably more appropriate as a "second best" solution when the multiplier file doesn't contain an appropriate value.

This change will be in the next release of PTAssembler.

Max
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Max Lyons Forums Forum Index -> PTAssembler, Panorama Tools and Other Software All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group