Can't geotag Canon Pro1 images

Started by Zandr, March 31, 2010, 10:22:47 PM

Previous topic - Next topic

Zandr

OK, this is just weird. I'm posting here since I'm sure I'm missing something. Feel free to move this to the bug report forum if it turns out to be a bug.

I can't seem to write tags to images from a Canon Pro1. It says it's working, but it doesn't actually do anything. This same track file tagged some Olympus E-P2 files with no problem.

MyTracks has the same problem, but that might just be because it uses exiftool under the hood (I don't know either way.).

Mac OS X 10.6.3, ExifTool 8.15 and 8.16 both showed the problem.

$ exiftool -ver
8.16
$ exiftool -v2 -geotag 100329_1356.gpx CRW_0200.CRW
Argument "-Geotime<DateTimeOriginal" is assumed
Loaded 623 points from GPS track log file '100329_1356.gpx'
 GPS track start: 2010:03:29 20:56:28 UTC
 GPS track end:   2010:03:29 23:23:15 UTC
Writing File:Geotag
======== CRW_0200.CRW
Setting new values from CRW_0200.CRW
 Geotime value:   2010:03:29 22:29:02 UTC
Writing MIE-GPS:GPSLatitude
Writing XMP-exif:GPSLatitude if tag exists
Writing GPS:GPSLatitude
Writing MIE-GPS:GPSLongitude
Writing XMP-exif:GPSLongitude if tag exists
Writing GPS:GPSLongitude
Writing MIE-GPS:GPSAltitude
Writing XMP-exif:GPSAltitude if tag exists
Writing GPS:GPSAltitude
Writing XMP-exif:GPSAltitudeRef if tag exists
Writing GPS:GPSAltitudeRef
Writing GPS:GPSLatitudeRef
Writing GPS:GPSLongitudeRef
Writing GPS:GPSDateStamp
Writing GPS:GPSTimeStamp
Writing XMP-exif:GPSDateTime if tag exists
Rewriting CRW_0200.CRW...
 Rewriting MakerNotes
 Rewriting ImageProps
 Rewriting MakerNotes
 Rewriting MakerNotes
 Rewriting MakerNotes
 Rewriting MeasuredInfo
 Rewriting ImageDescription
 Rewriting CameraObject
 Rewriting MakerNotes
 Rewriting CameraSpecification
 Rewriting ExifInformation
 Rewriting MakerNotes
 Rewriting MakerNotes
 Rewriting MakerNotes
 Rewriting MakerNotes
 Rewriting MakerNotes
 Rewriting MakerNotes
Nothing changed in CRW_0200.CRW
   0 image files updated
   1 image files unchanged
$ exiftool -s CRW_0200.CRW
ExifToolVersion                 : 8.16
FileName                        : CRW_0200.CRW
Directory                       : .
FileSize                        : 7.1 MB
FileModifyDate                  : 2010:03:29 15:29:02-07:00
FilePermissions                 : rwxrwxrwx
FileType                        : CRW
MIMEType                        : image/x-raw
RawData                         : (Binary data 7385910 bytes, use -b option to extract)
JpgFromRaw                      : (Binary data 21028 bytes, use -b option to extract)
ThumbnailImage                  : (Binary data 2494 bytes, use -b option to extract)
FileFormat                      : CRW
TargetCompressionRatio          : 10
ImageWidth                      : 3264
ImageHeight                     : 2448
PixelAspectRatio                : 1
Rotation                        : 0
ComponentBitDepth               : 8
ColorBitDepth                   : 24
ColorBW                         : 257
TargetImageType                 : Real-world Subject
RecordID                        : 0
FileNumber                      : 101-0200
DateTimeOriginal                : 2010:03:29 15:29:02
TimeZoneCode                    : 0
TimeZoneInfo                    : 0
OriginalFileName                : CRW_0200.CRW
ThumbnailFileName               : CRW_0200.THM
UserComment                     :
CanonFileDescription            : High definition CCD image
CanonImageType                  : CRW:High definition CCD image
OwnerName                       :
Make                            : Canon
Model                           : Canon PowerShot Pro1
BaseISO                         : 100
ROMOperationMode                : USA
CanonFirmwareVersion            : Firmware Version 1.01
FreeBytes                       : (Binary data 12 bytes, use -b option to extract)
FocalType                       : Zoom
FocalLength                     : 7.1875 mm
FocalPlaneXSize                 : 7.26 mm
FocalPlaneYSize                 : 5.46 mm
AutoISO                         : 100
MeasuredEV                      : 11.31
TargetAperture                  : 3.2
TargetExposureTime              : 1/125
ExposureCompensation            : 0
WhiteBalance                    : Custom 2
SlowShutter                     : Off
SequenceNumber                  : 0
OpticalZoomCode                 : 0
FlashGuideNumber                : 0
FlashExposureComp               : 0
AutoExposureBracketing          : Off
AEBBracketValue                 : 0
ControlMode                     : Camera Local Control
FocusDistanceUpper              : 65.53
FocusDistanceLower              : 0
FNumber                         : 3.2
ExposureTime                    : 1/128
BulbDuration                    : 0
CameraType                      : Compact
AutoRotate                      : None
NDFilter                        : Off
SelfTimer2                      : 0
FlashOutput                     : 0
MacroMode                       : Normal
SelfTimer                       : Off
Quality                         : RAW
CanonFlashMode                  : Off
ContinuousDrive                 : Continuous
FocusMode                       : Manual Focus (3)
RecordMode                      : CRW+THM
CanonImageSize                  : Large
EasyMode                        : Manual
DigitalZoom                     : None
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : 0
CameraISO                       : 50
MeteringMode                    : Evaluative
FocusRange                      : Manual
CanonExposureMode               : Program AE
LensType                        : Unknown (-1)
LongFocal                       : 50.8125 mm
ShortFocal                      : 7.1875 mm
FocalUnits                      : 32/mm
MaxAperture                     : 2.5
MinAperture                     : 8
FlashActivity                   : 0
FlashBits                       : (none)
FocusContinuous                 : Manual
AESetting                       : Exposure Compensation
ZoomSourceWidth                 : 3264
ZoomTargetWidth                 : 3264
SpotMeteringMode                : Center
PhotoEffect                     : Off
ManualFlashOutput               : n/a
ColorSpace                      : sRGB
CanonColorInfo1                 : (Binary data 2048 bytes, use -b option to extract)
WhiteSampleWidth                : 8
WhiteSampleHeight               : 8
WhiteSampleLeftBorder           : 1648
WhiteSampleTopBorder            : 1242
WhiteSampleBits                 : 12
CanonModelID                    : PowerShot Pro1
SensorWidth                     : 3344
SensorHeight                    : 2484
SensorLeftBorder                : 16
SensorTopBorder                 : 18
SensorRightBorder               : 3279
SensorBottomBorder              : 2465
BlackMaskLeftBorder             : 3318
BlackMaskTopBorder              : 18
BlackMaskRightBorder            : 3321
BlackMaskBottomBorder           : 2465
DecoderTableNumber              : 1
CompressedDataOffset            : 514
CompressedDataLength            : 7385907
NumAFPoints                     : 1
ValidAFPoints                   : 1
CanonImageWidth                 : 3264
CanonImageHeight                : 2448
AFImageWidth                    : 3264
AFImageHeight                   : 204
AFAreaWidth                     : 588
AFAreaHeight                    : 37
AFAreaXPositions                : 0
AFAreaYPositions                : 0
AFPointsInFocus                 : (none)
PrimaryAFPoint                  : 0
RawJpgQuality                   : Normal
RawJpgSize                      : Small
RawJpgWidth                     : 640
RawJpgHeight                    : 480
Aperture                        : 3.2
DriveMode                       : Continuous shooting
ISO                             : 50
ImageSize                       : 3264x2448
Lens                            : 7.2 - 50.8 mm
LensID                          : Unknown 7-50mm
ScaleFactor35efl                : 4.8
ShootingMode                    : Program AE
ShutterSpeed                    : 1/128
CircleOfConfusion               : 0.006 mm
FOV                             : 55.5 deg
FocalLength35efl                : 7.2 mm (35 mm equivalent: 34.2 mm)
HyperfocalDistance              : 2.58 m
Lens35efl                       : 7.2 - 50.8 mm (35 mm equivalent: 34.2 - 241.9 mm)
LightValue                      : 11.3


[edit] PH - formatted output as a code block

Phil Harvey

Unfortunately the CRW format does not support GPS information.  I could quite easily define a technique to do this, and I have debated making this enhancement.  But I decided against doing this for 2 reasons: 1) Only exiftool would be able to read this, and 2) there is the possibility that poorly written software may not be able to handle a tag it doesn't recognize in the CRW.

So currently the only alternative is to use an XMP sidecar file for CRW images.  To create a sidecar XMP file containing GPS information, add -o %d%f.xmp to your command.

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

Zandr

Phil,
Thanks for the quick response. Unfortunately, Aperture's handling of location data in XMP is less than stellar, so I'll have to play with the workflow a bit.

Please consider this a feature request to report an error in a situation like this. :)

Thanks again,
-Zandr

Phil Harvey

Quote from: Zandr on April 01, 2010, 10:36:06 AM
Please consider this a feature request to report an error in a situation like this. :)

I've thought about this too, but if I output warnings for tags which weren't written to the output file exiftool would issue warnings for every file in many normal situations (like when copying all tags from one file to another of a different format).  I could maybe issue a warning only if no tags were written, but that still doesn't help people to figure out what is wrong when some tags are written and some aren't.

For now I will put an entry in the FAQ to explain this, but I'm open to any suggestions.

- Phil


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

Zandr

We only get the individual "Writing Tag" messages at -v2, right?

So at -v2, maybe make that message "Writing Tag Blah: Not supported in output file" in this case.

I've not read the code, it might be that you can't tell at that stage in the process, but I guess the general thought that at -v2 (or higher?) I really want to know everything that's going on, good or bad.

Phil Harvey

The situation is actually quite complicated.  I don't keep track of which tags ExifTool has written, so therefore I don't know which specific tags weren't written (and adding this ability may be difficult for various reasons, some mentioned below).  I only keep a count of the number of things that were changed in the file to know when nothing was changed.

Tags can actually be written to unsupported file formats if they contain a trailer which supports the information.  However, because of its design CRW can't support the usual trailers, but exiftool is a general utility and I want to keep its behaviour consistent for all file types.

Also, there are other reasons why a tag may not be written (other than just because the format doesn't support the tag).  For instance, Canon tags may only be written to images which contain Canon maker notes, and it is possible to conditionally write a tag based on its value (ie. -author-=you -author=me).

The bottom line is that it would be difficult to figure out why a tag wasn't written for the general case.  I agree it seems simple for CRW and GPS tags, but I'm looking at the big picture.

- Phil

[edit] Yes, you are correct.  You only see the individual writing messages with -v2
...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 ($).

Zandr

Yeah, I thought something like that might be the case. Just thinking out loud in any event.

OK, FAQ entry works for me. :D

Thanks again, this is a great piece of software. I'm actually working on a python script to drive exiftool for adding lens metadata for manual focus lenses. Just *using* exiftool for this (across several cameras from different manufacturers) makes me appreciate what a nightmare this metadata is to deal with.


Phil Harvey

#7
I've added a first draft of this to the FAQ.

- Phil

[edit] First revision now completed on FAQ 23 :)

[edit2] I love this edit feature of the new forum :) :)
...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 ($).

Zandr

I think I'd add a "See Also: FAQ 23" to FAQ3. Otherwise, it looks good.

Zandr

Quote from: Zandr on April 01, 2010, 10:36:06 AM
Unfortunately, Aperture's handling of location data in XMP is less than stellar, so I'll have to play with the workflow a bit.

Got the workflow sorted.

The reason I'm using the old Canons in the first place is that these are converted to IR. Aperture's handling of really extreme WB data is also broken, so it turns out that making JPEGs with dcraw -w and using that as a sidecar kills two Aperture birds with one stone.

Thanks again!

Phil Harvey

Excellent.  Glad you got things working.

Quote from: Zandr on April 01, 2010, 04:19:43 PM
I think I'd add a "See Also: FAQ 23" to FAQ3. Otherwise, it looks good.

Good suggestion.  Done.

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