Thread

Posted on Sat Jun 7 19:34:09 2008 by robbo612443
ISO value for Canon from EXIF data

Folks, I'm sorry:- I've searched all day but I just cant find an answer I can understand!...

I'm trying to extract the ISO speed values for pictures taken with my Canon camera. In some cases, the "ISO" tag is set which is great but most of the time it's not.

I'm using PERL (at which I'm a novice) and I'm trying to extract the information using EXIFTOOL but I just dont understand how I can get at (or even find!) the data I'm after.

Can anyone help? Perhaps itd all become clear to me if I understood the "group" structure a little more - I'm currently aware of the MakerNotes tag but I just cant "find" it so I'm not convinced it's the right place to look!! I could do with an example piece of PERL code to follow if anyone is feeling generous?!

I'm not even sure if I'm in the right forum but ANY help would be much appreciated.

TIA
Direct Responses: 8040 | Write a response
Posted on Sat Jun 7 20:10:03 2008 by bogdan in response to 8039
Re: ISO value for Canon from EXIF data
Using ExifTool, you can get ISO (for compact camera?):

exiftool -composite:ISO filename.jpg

...or write into Exif:

exiftool -composite:ISO>exif:ISO filename.jpg

Hope that helps,
Bogdan
Direct Responses: 8041 | Write a response
Posted on Sat Jun 7 20:25:06 2008 by robbo612443 in response to 8040
Re: ISO value for Canon from EXIF data

Hi Bogdan,

This looks like a command line. I'm trying to do the job in a Perl script so I can do something with the ISO value afterwards.

Is there a way of doing this in a perl script?

The camera I'm trying to get info from is a G6 powershot but everything I've read so far indicates that it's simply "Canon" which is the issue.. they put their information somewhere other than in the standard ISO tag

Thanks again. Rob

Direct Responses: 8042 | Write a response
Posted on Sun Jun 8 07:53:44 2008 by bogdan in response to 8041
Re: ISO value for Canon from EXIF data
Hi Rob,

Sorry, I have no idea about Perl (I'm on Delphi Pascal). About Canon ISO...
For all cameras, Canon writes two ISO values inside Makernotes: AutoISO and BaseISO tag. For most cameras, there's also ISO written into Exif, which is calculated from AutoISO and BaseISO value. This is always the case for dslr cameras -for pocket camera, it depends on camera settings (manual or auto).
I'm quite sure Phil will come around, to give you a hint for Perl...

Greetings,
Bogdan
Direct Responses: 8044 | Write a response
Posted on Sun Jun 8 13:57:49 2008 by exiftool in response to 8042
Re: ISO value for Canon from EXIF data
use Image::ExifTool qw(:Public); my $info = ImageInfo('image.jpg', 'ISO'); my ($iso) = values %$info; print "The ISO is $iso\n";

- Phil
Direct Responses: 8045 | Write a response
Posted on Sun Jun 8 21:34:06 2008 by robbo612443 in response to 8044
Re: ISO value for Canon from EXIF data

Phil, Bogdan,

Thanks very much for your help. I guess, with what you say in mind, I dont need to bother myself with the MakerNotes!? Slightly irritating that I spent a day trying to access these "MakerNotes" but I guess that's always the way when you're learning stuff.

I've still not managed to find the maker notes but at least I can get on with writing my database contents with the details of my pictures. If anyone feels like explaining the maker notes and where they can be found, that'd be fab.

Meanwhile, thanks once again to you both. Thanks especially to Phil for the code example.

Kind Regards
Rob
Direct Responses: 8047 | Write a response
Posted on Mon Jun 9 14:30:54 2008 by exiftool in response to 8045
Re: ISO value for Canon from EXIF data
Hi Rob,

With exiftool you don't need to worry about where the information came from unless you have a specific reason to do so. Just ask for the ISO and exiftool will get it from the EXIF information if available, otherwise it will get it from the makernotes, and sometimes it even has to calculate it from combinations of different makernotes tags. But you don't need to worry about the details, and can just ask for "ISO" in your code.

But if you really want to distinguish between these, you can ask for "EXIF:ISO", "MakerNotes:ISO" or "Composite:ISO" respectively.

- Phil
Write a response