← Back to team overview

pyexiv2-developers team mailing list archive

Re: focus points

 

Hi Olivier, Forgot to say thank you to everybody for providing such a great
tool.

I have an example here for you:

this is the original:  http://dl.dropbox.com/u/29301287/IMG_0957.CR2

this is a screenshot (correct use of word too) of how the camera itself
displays:  http://dl.dropbox.com/u/29301287/canon7d.jpg

this is small jpg produced by pipeline of dcraw -> python with pyxiv2:
http://dl.dropbox.com/u/29301287/thumb_fpm_IMG_0957.fromraw.jpg

All the credit goes to Phil Harvey's exiftool.  He parses out the same cr2
and exposes following focus points.  I spent a few minutes examining the
perl code before closing it and quietly backing away from the keyboard.  I
found it easier to just look at the output of pyexiv2 and pick out the bits
i wanted.

output from exiftool:

[AFInfoSize]                      182
[AFAreaMode]                      Zone AF
[NumAFPoints]                     19
[ValidAFPoints]                   19
[CanonImageWidth]                 5184
[CanonImageHeight]                3456
[AFImageWidth]                    5184
[AFImageHeight]                   3456
[AFAreaWidths]                    222 222 222 222 222 222 222 222 222 222
222 222 222 222 222 222 222 222 222
[AFAreaHeights]                   266 266 266 266 266 266 266 266 266 266
266 266 266 266 266 266 266 266 266
[AFAreaXPositions]                -1373 -881 -881 -881 -393 -393 -393 0 0 0
0 0 393 393 393 881 881 881 1373
[AFAreaYPositions]                0 393 0 -393 393 0 -393 743 393 0 -393
-743 393 0 -393 393 0 -393 0
[AFPointsInFocus]                 4,8
[AFPointsSelected]                4,5,6,8,9,10,12,13,14



Below is the full listing.  There are quite a few 7D specific sections
there.  I'm not sure if all cameras have the focus point data.  it would be
great, but canon has a habit of firmware crippling things.  For my purposes
it has definitely been instructive to see what focus points are used and
study which modes work for me and which get me into trouble.

Jason

EXIF IMG_0957.CR2
  ExifToolVersion = 8.64
  FileName = IMG_0957.CR2
  Directory = .
  FileSize = 26721039
  FileModifyDate = 1324921535
  FilePermissions = 33060
  FileType = CR2
  MIMEType = image/x-canon-cr2
  ExifByteOrder = II
  + [IFD0 directory with 17 entries]
  | 0)  ImageWidth = 5184
  | 1)  ImageHeight = 3456
  | 2)  BitsPerSample = 8 8 8
  | 3)  Compression = 6
  | 4)  Make = Canon
  | 5)  Model = Canon EOS 7D
  | 6)  PreviewImageStart = 69116
  | 7)  Orientation = 1
  | 8)  PreviewImageLength = 2623611
  | 9)  XResolution = 72 (72/1)
  | 10) YResolution = 72 (72/1)
  | 11) ResolutionUnit = 2
  | 12) ModifyDate = 2011:12:25 22:54:04
  | 13) Artist =
  | 14) Copyright =
  | 15) ExifOffset (SubDirectory) -->
  | + [ExifIFD directory with 31 entries]
  | | 0)  ExposureTime = 0.01666666667 (1/60)
  | | 1)  FNumber = 3.5 (35/10)
  | | 2)  ExposureProgram = 1
  | | 3)  ISO = 1250
  | | 4)  ExifVersion = 0221
  | | 5)  DateTimeOriginal = 2011:12:25 22:54:04
  | | 6)  CreateDate = 2011:12:25 22:54:04
  | | 7)  ComponentsConfiguration = 1 2 3 0
  | | 8)  ShutterSpeedValue = 6 (393216/65536)
  | | 9)  ApertureValue = 3.625 (237568/65536)
  | | 10) ExposureCompensation = 0 (0/1)
  | | 11) MeteringMode = 5
  | | 12) Flash = 16
  | | 13) FocalLength = 27 (27/1)
  | | 14) MakerNoteCanon (SubDirectory) -->
  | | + [MakerNotes directory with 41 entries]
  | | | 0)  CanonCameraSettings (SubDirectory) -->
  | | | + [BinaryData directory, 98 bytes]
  | | | | MacroMode = 2
  | | | | SelfTimer = 0
  | | | | Quality = 4
  | | | | CanonFlashMode = 0
  | | | | ContinuousDrive = 0
  | | | | FocusMode = 0
  | | | | RecordMode = 6
  | | | | CanonImageSize = -1
  | | | | EasyMode = 1
  | | | | DigitalZoom = 0
  | | | | Contrast = 0
  | | | | Saturation = 0
  | | | | Sharpness = 32767
  | | | | CameraISO = 32767
  | | | | MeteringMode = 3
  | | | | FocusRange = 2
  | | | | AFPoint = 0
  | | | | CanonExposureMode = 4
  | | | | LensType = 230
  | | | | LongFocal = 70
  | | | | ShortFocal = 24
  | | | | FocalUnits = 1
  | | | | MaxAperture = 96
  | | | | MinAperture = 288
  | | | | FlashActivity = 0
  | | | | FlashBits = 0
  | | | | FocusContinuous = -1
  | | | | AESetting = -1
  | | | | ImageStabilization = -1
  | | | | DisplayAperture = 0
  | | | | ZoomSourceWidth = 0
  | | | | ZoomTargetWidth = 0
  | | | | SpotMeteringMode = -1
  | | | | PhotoEffect = -1
  | | | | ManualFlashOutput = 0
  | | | | ColorTone = 0
  | | | | SRAWQuality = 0
  | | | 1)  CanonFocalLength (SubDirectory) -->
  | | | + [BinaryData directory, 8 bytes]
  | | | | FocalType = 0
  | | | | FocalLength = 27
  | | | | FocalPlaneXUnknown = 11675
  | | | | FocalPlaneYUnknown = 19690
  | | | 2)  CanonFlashInfo = 0 0 0 0
  | | | 3)  CanonShotInfo (SubDirectory) -->
  | | | + [BinaryData directory, 68 bytes]
  | | | | AutoISO = 0
  | | | | BaseISO = 276
  | | | | MeasuredEV = -32
  | | | | TargetAperture = 116
  | | | | TargetExposureTime = 192
  | | | | ExposureCompensation = 0
  | | | | WhiteBalance = 0
  | | | | SlowShutter = 3
  | | | | SequenceNumber = 0
  | | | | OpticalZoomCode = 8
  | | | | CameraTemperature = 151
  | | | | FlashGuideNumber = 0
  | | | | AFPointsInFocus = 0
  | | | | FlashExposureComp = 0
  | | | | AutoExposureBracketing = 0
  | | | | AEBBracketValue = 0
  | | | | ControlMode = 1
  | | | | FocusDistanceUpper = 0
  | | | | FNumber = 116
  | | | | ExposureTime = 192
  | | | | MeasuredEV2 = 78
  | | | | BulbDuration = 0
  | | | | CameraType = 248
  | | | | AutoRotate = -1
  | | | | NDFilter = -1
  | | | | SelfTimer2 = -1
  | | | | FlashOutput = 0
  | | | 4)  CanonImageType = Canon EOS 7D
  | | | 5)  CanonFirmwareVersion = Firmware Version 1.2.5
  | | | 6)  OwnerName =
  | | | 7)  SerialNumber = 2271213169
  | | | 8)  CanonCameraInfo7D (SubDirectory) -->
  | | | + [BinaryData directory, 1536 bytes]
  | | | | FNumber = 37
  | | | | ExposureTime = 104
  | | | | ISO = 101
  | | | | HighlightTonePriority = 0
  | | | | MeasuredEV2 = 78
  | | | | MeasuredEV = 80
  | | | | FlashMeteringMode = 6
  | | | | CameraTemperature = 151
  | | | | FocalLength = 27
  | | | | CameraInfo7D_2b (SubDirectory) -->
  | | | | + [BinaryData directory, 1500 bytes]
  | | | | | CameraOrientation = 0
  | | | | | FocusDistanceUpper = 172
  | | | | | FocusDistanceLower = 142
  | | | | | WhiteBalance = 0
  | | | | | ColorTemperature = 5200
  | | | | | HighISONoiseReduction = 0
  | | | | | LensType = 230
  | | | | | ShortFocal = 24
  | | | | | LongFocal = 70
  | | | | | FirmwareVersion = 1.2.5
  | | | | | FileIndex = 956
  | | | | | DirectoryIndex = 101
  | | | | | PictureStyleInfo (SubDirectory) -->
  | | | | | + [BinaryData directory, 729 bytes]
  | | | | | | ContrastStandard = 0
  | | | | | | SharpnessStandard = 3
  | | | | | | SaturationStandard = 0
  | | | | | | ColorToneStandard = 0
  | | | | | | FilterEffectStandard = 0
  | | | | | | ToningEffectStandard = 0
  | | | | | | ContrastPortrait = 0
  | | | | | | SharpnessPortrait = 2
  | | | | | | SaturationPortrait = 0
  | | | | | | ColorTonePortrait = 0
  | | | | | | FilterEffectPortrait = 0
  | | | | | | ToningEffectPortrait = 0
  | | | | | | ContrastLandscape = 0
  | | | | | | SharpnessLandscape = 4
  | | | | | | SaturationLandscape = 0
  | | | | | | ColorToneLandscape = 0
  | | | | | | FilterEffectLandscape = 0
  | | | | | | ToningEffectLandscape = 0
  | | | | | | ContrastNeutral = 0
  | | | | | | SharpnessNeutral = 0
  | | | | | | SaturationNeutral = 0
  | | | | | | ColorToneNeutral = 0
  | | | | | | FilterEffectNeutral = 0
  | | | | | | ToningEffectNeutral = 0
  | | | | | | ContrastFaithful = 0
  | | | | | | SharpnessFaithful = 0
  | | | | | | SaturationFaithful = 0
  | | | | | | ColorToneFaithful = 0
  | | | | | | FilterEffectFaithful = 0
  | | | | | | ToningEffectFaithful = 0
  | | | | | | ContrastMonochrome = 0
  | | | | | | SharpnessMonochrome = 3
  | | | | | | SaturationMonochrome = 0
  | | | | | | ColorToneMonochrome = 0
  | | | | | | FilterEffectMonochrome = 0
  | | | | | | ToningEffectMonochrome = 0
  | | | | | | ContrastUserDef1 = 0
  | | | | | | SharpnessUserDef1 = 3
  | | | | | | SaturationUserDef1 = 0
  | | | | | | ColorToneUserDef1 = 0
  | | | | | | FilterEffectUserDef1 = 0
  | | | | | | ToningEffectUserDef1 = 0
  | | | | | | ContrastUserDef2 = 0
  | | | | | | SharpnessUserDef2 = 3
  | | | | | | SaturationUserDef2 = 0
  | | | | | | ColorToneUserDef2 = 0
  | | | | | | FilterEffectUserDef2 = 0
  | | | | | | ToningEffectUserDef2 = 0
  | | | | | | ContrastUserDef3 = 0
  | | | | | | SharpnessUserDef3 = 3
  | | | | | | SaturationUserDef3 = 0
  | | | | | | ColorToneUserDef3 = 0
  | | | | | | FilterEffectUserDef3 = 0
  | | | | | | ToningEffectUserDef3 = 0
  | | | | | | UserDef1PictureStyle = 129
  | | | | | | UserDef2PictureStyle = 129
  | | | | | | UserDef3PictureStyle = 129
  | | | 9)  CanonModelID = 2147484240
  | | | 10) ThumbnailImageValidArea = 0 159 7 112
  | | | 11) SerialNumberFormat = 2684354560
  | | | 12) Canon_0x0019 = 1
  | | | 13) CanonAFInfo2 (SubDirectory) -->
  | | | + [SerialData directory, 182 bytes]
  | | | | 0)  AFInfoSize = 182
  | | | | 1)  AFAreaMode = 7
  | | | | 2)  NumAFPoints = 19
  | | | | 3)  ValidAFPoints = 19
  | | | | 4)  CanonImageWidth = 5184
  | | | | 5)  CanonImageHeight = 3456
  | | | | 6)  AFImageWidth = 5184
  | | | | 7)  AFImageHeight = 3456
  | | | | 8)  AFAreaWidths = 222 222 222 222 222 222 222 222 222 222 222
222 222 222 22[snip]
  | | | | 9)  AFAreaHeights = 266 266 266 266 266 266 266 266 266 266 266
266 266 266 2[snip]
  | | | | 10) AFAreaXPositions = -1373 -881 -881 -881 -393 -393 -393 0 0 0
0 0 393 393 [snip]
  | | | | 11) AFAreaYPositions = 0 393 0 -393 393 0 -393 743 393 0 -393
-743 393 0 -393[snip]
  | | | | 12) AFPointsInFocus = 272 0
  | | | | 13) AFPointsSelected = 30576 0
  | | | 14) OriginalDecisionDataOffset = 0
  | | | 15) CanonFileInfo (SubDirectory) -->
  | | | + [BinaryData directory, 52 bytes]
  | | | | BracketMode = 0
  | | | | BracketValue = 0
  | | | | BracketShotNumber = 0
  | | | | RawJpgQuality = 0
  | | | | RawJpgSize = 0
  | | | | LongExposureNoiseReduction2 = 0
  | | | | WBBracketMode = 0
  | | | | WBBracketValueAB = 0
  | | | | WBBracketValueGM = 0
  | | | | FilterEffect = -1
  | | | | ToningEffect = -1
  | | | | LiveViewShooting = 0
  | | | | FlashExposureLock = 0
  | | | 16) LensModel = EF24-70mm f/2.8L USM
  | | | 17) InternalSerialNumber = S1132938A
  | | | 18) DustRemovalData =
  | | | 19) CropInfo (SubDirectory) -->
  | | | + [BinaryData directory, 8 bytes]
  | | | | CropLeftMargin = 0
  | | | | CropRightMargin = 0
  | | | | CropTopMargin = 0
  | | | | CropBottomMargin = 0
  | | | 20) CustomFunctions2 (SubDirectory) -->
  | | | + [CanonCustom2 directory with 4 entries]
  | | | + [CanonCustom2 group 1 directory with 7 entries]
  | | | | 0)  ExposureLevelIncrements = 0
  | | | | 1)  ISOSpeedIncrements = 0
  | | | | 2)  ISOExpansion = 1
  | | | | 3)  AEBAutoCancel = 0
  | | | | 4)  AEBSequence = 0
  | | | | 5)  SafetyShift = 0
  | | | | 6)  FlashSyncSpeedAv = 0
  | | | + [CanonCustom2 group 2 directory with 3 entries]
  | | | | 0)  LongExposureNoiseReduction = 0
  | | | | 1)  HighISONoiseReduction = 0
  | | | | 2)  HighlightTonePriority = 0
  | | | + [CanonCustom2 group 3 directory with 13 entries]
  | | | | 0)  AIServoTrackingSensitivity = 0
  | | | | 1)  AIServoTrackingMethod = 0
  | | | | 2)  AIServoImagePriority = 0
  | | | | 3)  LensDriveNoAF = 0
  | | | | 4)  AFMicroadjustment = 0 0 0 0 0
  | | | | 5)  SelectAFAreaSelectMode = 1 31
  | | | | 6)  ManualAFPointSelectPattern = 0
  | | | | 7)  VFDisplayIllumination = 1
  | | | | 8)  DisplayAllAFPoints = 1
  | | | | 9)  FocusDisplayAIServoAndMF = 0
  | | | | 10) AFAssistBeam = 0
  | | | | 11) OrientationLinkedAFPoint = 0
  | | | | 12) MirrorLockup = 0
  | | | + [CanonCustom2 group 4 directory with 4 entries]
  | | | | 0)  CustomControls = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
222 222 222 222
  | | | | 1)  DialDirectionTvAv = 0
  | | | | 2)  AddOriginalDecisionData = 0
  | | | | 3)  AddAspectRatioInfo = 0
  | | | 21) AspectInfo (SubDirectory) -->
  | | | + [BinaryData directory, 20 bytes]
  | | | | AspectRatio = 0
  | | | | CroppedImageWidth = 5184
  | | | | CroppedImageHeight = 3456
  | | | 22) ProcessingInfo (SubDirectory) -->
  | | | + [BinaryData directory, 28 bytes]
  | | | | ToneCurve = 0
  | | | | Sharpness = 0
  | | | | SharpnessFrequency = 0
  | | | | SensorRedLevel = 0
  | | | | SensorBlueLevel = 0
  | | | | WhiteBalanceRed = 0
  | | | | WhiteBalanceBlue = 0
  | | | | WhiteBalance = -1
  | | | | ColorTemperature = 5200
  | | | | PictureStyle = 133
  | | | | DigitalGain = 0
  | | | | WBShiftAB = 0
  | | | | WBShiftGM = 0
  | | | 23) MeasuredColor (SubDirectory) -->
  | | | + [BinaryData directory, 12 bytes]
  | | | | MeasuredRGGB = 814 1024 1024 512
  | | | 24) ColorSpace = 1
  | | | 25) VRDOffset = 0
  | | | 26) SensorInfo (SubDirectory) -->
  | | | + [BinaryData directory, 34 bytes]
  | | | | SensorWidth = 5360
  | | | | SensorHeight = 3516
  | | | | SensorLeftBorder = 168
  | | | | SensorTopBorder = 56
  | | | | SensorRightBorder = 5351
  | | | | SensorBottomBorder = 3511
  | | | | BlackMaskLeftBorder = 0
  | | | | BlackMaskTopBorder = 0
  | | | | BlackMaskRightBorder = 0
  | | | | BlackMaskBottomBorder = 0
  | | | 27) ColorData4 (SubDirectory) -->
  | | | + [BinaryData directory, 2674 bytes]
  | | | | ColorDataVersion = 7
  | | | | ColorCoefs (SubDirectory) -->
  | | | | + [BinaryData directory, 210 bytes]
  | | | | | WB_RGGBLevelsAsShot = 1817 1024 1024 1830
  | | | | | ColorTempAsShot = 3989
  | | | | | WB_RGGBLevelsAuto = 1817 1024 1024 1830
  | | | | | ColorTempAuto = 3989
  | | | | | WB_RGGBLevelsMeasured = 1603 1026 1020 1906
  | | | | | ColorTempMeasured = 3588
  | | | | | WB_RGGBLevelsUnknown = 721 1170 1170 601
  | | | | | ColorTempUnknown = 3582
  | | | | | WB_RGGBLevelsDaylight = 2185 1024 1024 1526
  | | | | | ColorTempDaylight = 5200
  | | | | | WB_RGGBLevelsShade = 2539 1024 1024 1295
  | | | | | ColorTempShade = 7000
  | | | | | WB_RGGBLevelsCloudy = 2356 1024 1024 1402
  | | | | | ColorTempCloudy = 6000
  | | | | | WB_RGGBLevelsTungsten = 1540 1024 1024 2280
  | | | | | ColorTempTungsten = 3200
  | | | | | WB_RGGBLevelsFluorescent = 1931 1024 1024 2136
  | | | | | ColorTempFluorescent = 3769
  | | | | | WB_RGGBLevelsKelvin = 2185 1024 1024 1526
  | | | | | ColorTempKelvin = 5189
  | | | | | WB_RGGBLevelsFlash = 2411 1024 1024 1394
  | | | | | ColorTempFlash = 6160
  | | | | | WB_RGGBLevelsUnknown2 = 1942 1024 1024 1719
  | | | | | ColorTempUnknown2 = 4357
  | | | | | WB_RGGBLevelsUnknown3 = 2185 1024 1024 1526
  | | | | | ColorTempUnknown3 = 5189
  | | | | | WB_RGGBLevelsUnknown4 = 2185 1024 1024 1526
  | | | | | ColorTempUnknown4 = 5189
  | | | | | WB_RGGBLevelsUnknown5 = 2185 1024 1024 1526
  | | | | | ColorTempUnknown5 = 5189
  | | | | | WB_RGGBLevelsUnknown6 = 2185 1024 1024 1526
  | | | | | ColorTempUnknown6 = 5189
  | | | | | WB_RGGBLevelsUnknown7 = 1028 1024 1024 1043
  | | | | | ColorTempUnknown7 = 3954
  | | | | | WB_RGGBLevelsUnknown8 = 1028 1024 1024 1043
  | | | | | ColorTempUnknown8 = 3954
  | | | | | WB_RGGBLevelsUnknown9 = 1028 1024 1024 1043
  | | | | | ColorTempUnknown9 = 3954
  | | | | | WB_RGGBLevelsUnknown10 = 1028 1024 1024 1043
  | | | | | ColorTempUnknown10 = 3954
  | | | | | WB_RGGBLevelsUnknown11 = 1028 1024 1024 1043
  | | | | | ColorTempUnknown11 = 3954
  | | | | ColorCalib (SubDirectory) -->
  | | | | + [BinaryData directory, 120 bytes]
  | | | | | CameraColorCalibration01 = -361 360 950 10900
  | | | | | CameraColorCalibration02 = -335 371 918 10000
  | | | | | CameraColorCalibration03 = -294 389 862 8300
  | | | | | CameraColorCalibration04 = -248 413 810 7000
  | | | | | CameraColorCalibration05 = -192 445 748 6000
  | | | | | CameraColorCalibration06 = -165 461 719 5600
  | | | | | CameraColorCalibration07 = -133 480 687 5200
  | | | | | CameraColorCalibration08 = -84 506 638 4700
  | | | | | CameraColorCalibration09 = -27 543 584 4200
  | | | | | CameraColorCalibration10 = 30 587 540 3800
  | | | | | CameraColorCalibration11 = 81 629 502 3500
  | | | | | CameraColorCalibration12 = 142 681 460 3200
  | | | | | CameraColorCalibration13 = 193 725 424 3000
  | | | | | CameraColorCalibration14 = 237 775 401 2800
  | | | | | CameraColorCalibration15 = 349 908 345 2400
  | | | | RawMeasuredRGGB = 3200057345 1022492674 908656642 310050817
  | | | 28) CRWParam = hQ. ...............p....r..f..........@
@@.}.x......M..xN.g.1...i[snip]
  | | | 29) Flavor = @@.
........D.=B.(?....o..k.|..5o...2...cOE..X...-#.-..M.+..~.....[snip]
  | | | 30) BlackLevel = 129 129 129
  | | | 31) Canon_0x4009 = 0 0 0
  | | | 32) CustomPictureStyleFileName =
  | | | 33) Canon_0x4011 =
  | | | 34) Canon_0x4012 =
  | | | 35) AFMicroAdj (SubDirectory) -->
  | | | + [BinaryData directory, 20 bytes]
  | | | | AFMicroAdjActive = 0
  | | | | AFMicroAdjValue = 0
  | | | 36) VignettingCorr (SubDirectory) -->
  | | | + [BinaryData directory, 116 bytes]
  | | | | PeripheralLighting = 1
  | | | | PeripheralLightingValue = 32
  | | | | OriginalImageWidth = 5184
  | | | | OriginalImageHeight = 3456
  | | | 37) VignettingCorr2 (SubDirectory) -->
  | | | + [BinaryData directory, 24 bytes]
  | | | | PeripheralLightingSetting = 1
  | | | 38) Canon_0x4017 = 327942 2105278464
  | | | 39) LightingOpt (SubDirectory) -->
  | | | + [BinaryData directory, 12 bytes]
  | | | | AutoLightingOptimizer = 0
  | | | 40) LensInfo (SubDirectory) -->
  | | | + [BinaryData directory, 30 bytes]
  | | 15) UserComment =
  | | 16) SubSecTime = 66
  | | 17) SubSecTimeOriginal = 66
  | | 18) SubSecTimeDigitized = 66
  | | 19) FlashpixVersion = 0100
  | | 20) ColorSpace = 1
  | | 21) ExifImageWidth = 5184
  | | 22) ExifImageHeight = 3456
  | | 23) InteropOffset (SubDirectory) -->
  | | + [InteropIFD directory with 2 entries]
  | | | 0)  InteropIndex = R98
  | | | 1)  InteropVersion = 0100
  | | 24) FocalPlaneXResolution = 5715.545755 (5184000/907)
  | | 25) FocalPlaneYResolution = 5808.403361 (3456000/595)
  | | 26) FocalPlaneResolutionUnit = 2
  | | 27) CustomRendered = 0
  | | 28) ExposureMode = 1
  | | 29) WhiteBalance = 0
  | | 30) SceneCaptureType = 0
  | 16) GPSInfo (SubDirectory) -->
  | + [GPS directory with 1 entries]
  | | 0)  GPSVersionID = 2 2 0 0
  + [IFD1 directory with 2 entries]
  | 0)  ThumbnailOffset = 48684
  | 1)  ThumbnailLength = 20432
  + [IFD2 directory with 13 entries]
  | 0)  ImageWidth = 670
  | 1)  ImageHeight = 432
  | 2)  BitsPerSample = 16 16 16
  | 3)  Compression = 1
  | 4)  PhotometricInterpretation = 2
  | 5)  StripOffsets = 2692728
  | 6)  SamplesPerPixel = 3
  | 7)  RowsPerStrip = 432
  | 8)  StripByteCounts = 1736640
  | 9)  PlanarConfiguration = 1
  | 10) Exif_0xc5d9 = 2
  | 11) Exif_0xc6c5 = 3
  | 12) Exif_0xc6dc = 648 432 21 0
  + [IFD3 directory with 7 entries]
  | 0)  Compression = 6
  | 1)  StripOffsets = 4429432
  | 2)  StripByteCounts = 22291607
  | 3)  Exif_0xc5d8 = 1
  | 4)  Exif_0xc5e0 = 3
  | 5)  RawImageSegmentation = 2 1728 1904
  | 6)  Exif_0xc6c5 = 1





‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ExifTool‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
[ExifToolVersion]                 8.64
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐File‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
[FileName]                        IMG_0957.CR2
[Directory]                       .
[FileSize]                        25 MB
[FileModifyDate]                  Mon  Dec 26, 2011  9:45 am
[FilePermissions]                 r--r--r--
[FileType]                        CR2
[MIMEType]                        image/x-canon-cr2
[ExifByteOrder]                   Little-endian (Intel, II)
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐EXIF‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
[ImageWidth]                      5184
[ImageHeight]                     3456
[BitsPerSample]                   8 8 8
[Compression]                     JPEG (old-style)
[Make]                            Canon
[Model]                           Canon EOS 7D
[PreviewImageStart]               69116
[Orientation]                     Horizontal (normal)
[PreviewImageLength]              2623611
[XResolution]                     72
[YResolution]                     72
[ResolutionUnit]                  inches
[ModifyDate]                      Sun  Dec 25, 2011 10:54 pm
[Artist]
[Copyright]
[ExposureTime]                    1/60
[FNumber]                         3.5
[ExposureProgram]                 Manual
[ISO]                             1250
[ExifVersion]                     0221
[DateTimeOriginal]                Sun  Dec 25, 2011 10:54 pm
[CreateDate]                      Sun  Dec 25, 2011 10:54 pm
[ComponentsConfiguration]         Y, Cb, Cr, -
[ShutterSpeedValue]               1/64
[ApertureValue]                   3.5
[ExposureCompensation (1)]        0
[MeteringMode (1)]                Multi-segment
[Flash]                           Off, Did not fire
[FocalLength]                     27.0 mm
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐MakerNotes‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
[MacroMode]                       Normal
[SelfTimer]                       Off
[Quality]                         RAW
[CanonFlashMode]                  Off
[ContinuousDrive]                 Single
[FocusMode]                       One-shot AF
[RecordMode]                      CR2
[CanonImageSize]                  Unknown (-1)
[EasyMode]                        Manual
[DigitalZoom]                     None
[Contrast]                        Normal
[Saturation]                      Normal
[MeteringMode]                    Evaluative
[FocusRange]                      Not Known
[CanonExposureMode]               Manual
[LensType]                        Canon EF 24-70mm f/2.8L
[LongFocal]                       70 mm
[ShortFocal]                      24 mm
[FocalUnits]                      1/mm
[MaxAperture]                     2.8
[MinAperture]                     23
[FlashActivity]                   0
[FlashBits]                       (none)
[ZoomSourceWidth]                 0
[ZoomTargetWidth]                 0
[ManualFlashOutput]               n/a
[ColorTone]                       Normal
[SRAWQuality]                     n/a
[FocalLength (1)]                 27 mm
[FocalPlaneXUnknown]              11675
[FocalPlaneYUnknown]              19690
[CanonFlashInfo]                  0 0 0 0
[AutoISO]                         100
[BaseISO]                         1234
[MeasuredEV]                      4.00
[TargetAperture]                  3.6
[TargetExposureTime]              1/64
[ExposureCompensation]            0
[WhiteBalance]                    Auto
[SlowShutter]                     None
[SequenceNumber]                  0
[OpticalZoomCode]                 n/a
[CameraTemperature]               23 C
[FlashGuideNumber]                0
[FlashExposureComp]               0
[AutoExposureBracketing]          Off
[AEBBracketValue]                 0
[ControlMode]                     Camera Local Control
[FNumber (1)]                     3.6
[ExposureTime (1)]                1/64
[MeasuredEV2]                     3.75
[BulbDuration]                    0
[CameraType]                      EOS High-end
[NDFilter]                        n/a
[CanonImageType]                  Canon EOS 7D
[CanonFirmwareVersion]            Firmware Version 1.2.5
[OwnerName]
[SerialNumber]                    2271213169
[FNumber (2)]                     3.5
[ExposureTime (2)]                1/64
[ISO (1)]                         1234
[HighlightTonePriority (1)]       Off
[MeasuredEV2 (1)]                 3.75
[MeasuredEV (1)]                  4
[FlashMeteringMode]               Off
[CameraTemperature (1)]           23 C
[FocalLength (2)]                 27 mm
[CameraOrientation]               Horizontal (normal)
[FocusDistanceUpper]              1.72 m
[FocusDistanceLower]              1.42 m
[WhiteBalance (1)]                Auto
[ColorTemperature (1)]            5200
[HighISONoiseReduction (1)]       Standard
[LensType (1)]                    Canon EF 24-70mm f/2.8L
[ShortFocal (1)]                  24 mm
[LongFocal (1)]                   70 mm
[FirmwareVersion]                 1.2.5
[FileIndex]                       957
[DirectoryIndex]                  100
[ContrastStandard]                0
[SharpnessStandard]               3
[SaturationStandard]              0
[ColorToneStandard]               0
[FilterEffectStandard]            0
[ToningEffectStandard]            0
[ContrastPortrait]                0
[SharpnessPortrait]               2
[SaturationPortrait]              0
[ColorTonePortrait]               0
[FilterEffectPortrait]            0
[ToningEffectPortrait]            0
[ContrastLandscape]               0
[SharpnessLandscape]              4
[SaturationLandscape]             0
[ColorToneLandscape]              0
[FilterEffectLandscape]           0
[ToningEffectLandscape]           0
[ContrastNeutral]                 0
[SharpnessNeutral]                0
[SaturationNeutral]               0
[ColorToneNeutral]                0
[FilterEffectNeutral]             0
[ToningEffectNeutral]             0
[ContrastFaithful]                0
[SharpnessFaithful]               0
[SaturationFaithful]              0
[ColorToneFaithful]               0
[FilterEffectFaithful]            0
[ToningEffectFaithful]            0
[ContrastMonochrome]              0
[SharpnessMonochrome]             3
[SaturationMonochrome]            0
[ColorToneMonochrome]             0
[FilterEffectMonochrome]          None
[ToningEffectMonochrome]          None
[ContrastUserDef1]                0
[SharpnessUserDef1]               3
[SaturationUserDef1]              0
[ColorToneUserDef1]               0
[FilterEffectUserDef1]            None
[ToningEffectUserDef1]            None
[ContrastUserDef2]                0
[SharpnessUserDef2]               3
[SaturationUserDef2]              0
[ColorToneUserDef2]               0
[FilterEffectUserDef2]            None
[ToningEffectUserDef2]            None
[ContrastUserDef3]                0
[SharpnessUserDef3]               3
[SaturationUserDef3]              0
[ColorToneUserDef3]               0
[FilterEffectUserDef3]            None
[ToningEffectUserDef3]            None
[UserDef1PictureStyle]            Standard
[UserDef2PictureStyle]            Standard
[UserDef3PictureStyle]            Standard
[CanonModelID]                    EOS 7D
[ThumbnailImageValidArea]         0 159 7 112
[SerialNumberFormat]              Format 2
[Canon_0x0019]                    1
[AFInfoSize]                      182
[AFAreaMode]                      Zone AF
[NumAFPoints]                     19
[ValidAFPoints]                   19
[CanonImageWidth]                 5184
[CanonImageHeight]                3456
[AFImageWidth]                    5184
[AFImageHeight]                   3456
[AFAreaWidths]                    222 222 222 222 222 222 222 222 222 222
222 222 222 222 222 222 222 222 222
[AFAreaHeights]                   266 266 266 266 266 266 266 266 266 266
266 266 266 266 266 266 266 266 266
[AFAreaXPositions]                -1373 -881 -881 -881 -393 -393 -393 0 0 0
0 0 393 393 393 881 881 881 1373
[AFAreaYPositions]                0 393 0 -393 393 0 -393 743 393 0 -393
-743 393 0 -393 393 0 -393 0
[AFPointsInFocus]                 4,8
[AFPointsSelected]                4,5,6,8,9,10,12,13,14
[OriginalDecisionDataOffset]      0
[BracketMode]                     Off
[BracketValue]                    0
[BracketShotNumber]               0
[RawJpgSize]                      Large
[LongExposureNoiseReduction2]     Off
[WBBracketMode]                   Off
[WBBracketValueAB]                0
[WBBracketValueGM]                0
[LiveViewShooting]                Off
[FlashExposureLock]               Off
[LensModel]                       EF24-70mm f/2.8L USM
[InternalSerialNumber]            S1132938A
[DustRemovalData]                 (Binary data 1024 bytes)
[CropLeftMargin]                  0
[CropRightMargin]                 0
[CropTopMargin]                   0
[CropBottomMargin]                0
[ExposureLevelIncrements]         1/3 Stop
[ISOSpeedIncrements]              1/3 Stop
[ISOExpansion]                    On
[AEBAutoCancel]                   On
[AEBSequence]                     0,-,+
[SafetyShift]                     Disable
[FlashSyncSpeedAv]                Auto
[LongExposureNoiseReduction]      Off
[HighISONoiseReduction]           Standard
[HighlightTonePriority]           Disable
[AIServoTrackingSensitivity]      Standard
[AIServoTrackingMethod]           Main focus point priority
[AIServoImagePriority]            1: AF, 2: Tracking
[LensDriveNoAF]                   Focus search on
[AFMicroadjustment]               Disable; 0; 0; 0; 0
[SelectAFAreaSelectMode]          Enable; 31
[ManualAFPointSelectPattern]      Stops at AF area edges
[VFDisplayIllumination]           Enable
[DisplayAllAFPoints]              Disable
[FocusDisplayAIServoAndMF]        Enable
[AFAssistBeam]                    Emits
[OrientationLinkedAFPoint]        Same for verical and horizontal
[MirrorLockup]                    Disable
[CustomControls]                  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
222 222 222 222
[DialDirectionTvAv]               Normal
[AddOriginalDecisionData]         Off
[AddAspectRatioInfo]              Off
[AspectRatio]                     3:2
[CroppedImageWidth]               5184
[CroppedImageHeight]              3456
[ToneCurve]                       Standard
[Sharpness]                       0
[SharpnessFrequency]              n/a
[SensorRedLevel]                  0
[SensorBlueLevel]                 0
[WhiteBalanceRed]                 0
[WhiteBalanceBlue]                0
[ColorTemperature]                5200
[PictureStyle]                    Faithful
[DigitalGain]                     0
[WBShiftAB]                       0
[WBShiftGM]                       0
[MeasuredRGGB]                    814 1024 1024 512
[ColorSpace (1)]                  sRGB
[VRDOffset]                       0
[SensorWidth]                     5360
[SensorHeight]                    3516
[SensorLeftBorder]                168
[SensorTopBorder]                 56
[SensorRightBorder]               5351
[SensorBottomBorder]              3511
[BlackMaskLeftBorder]             0
[BlackMaskTopBorder]              0
[BlackMaskRightBorder]            0
[BlackMaskBottomBorder]           0
[ColorDataVersion]                7 (500D/550D/7D/1DmkIV)
[WB_RGGBLevelsAsShot]             1817 1024 1024 1830
[ColorTempAsShot]                 3989
[WB_RGGBLevelsAuto]               1817 1024 1024 1830
[ColorTempAuto]                   3989
[WB_RGGBLevelsMeasured]           1603 1026 1020 1906
[ColorTempMeasured]               3588
[WB_RGGBLevelsUnknown]            721 1170 1170 601
[ColorTempUnknown]                3582
[WB_RGGBLevelsDaylight]           2185 1024 1024 1526
[ColorTempDaylight]               5200
[WB_RGGBLevelsShade]              2539 1024 1024 1295
[ColorTempShade]                  7000
[WB_RGGBLevelsCloudy]             2356 1024 1024 1402
[ColorTempCloudy]                 6000
[WB_RGGBLevelsTungsten]           1540 1024 1024 2280
[ColorTempTungsten]               3200
[WB_RGGBLevelsFluorescent]        1931 1024 1024 2136
[ColorTempFluorescent]            3769
[WB_RGGBLevelsKelvin]             2185 1024 1024 1526
[ColorTempKelvin]                 5189
[WB_RGGBLevelsFlash]              2411 1024 1024 1394
[ColorTempFlash]                  6160
[WB_RGGBLevelsUnknown2]           1942 1024 1024 1719
[ColorTempUnknown2]               4357
[WB_RGGBLevelsUnknown3]           2185 1024 1024 1526
[ColorTempUnknown3]               5189
[WB_RGGBLevelsUnknown4]           2185 1024 1024 1526
[ColorTempUnknown4]               5189
[WB_RGGBLevelsUnknown5]           2185 1024 1024 1526
[ColorTempUnknown5]               5189
[WB_RGGBLevelsUnknown6]           2185 1024 1024 1526
[ColorTempUnknown6]               5189
[WB_RGGBLevelsUnknown7]           1028 1024 1024 1043
[ColorTempUnknown7]               3954
[WB_RGGBLevelsUnknown8]           1028 1024 1024 1043
[ColorTempUnknown8]               3954
[WB_RGGBLevelsUnknown9]           1028 1024 1024 1043
[ColorTempUnknown9]               3954
[WB_RGGBLevelsUnknown10]          1028 1024 1024 1043
[ColorTempUnknown10]              3954
[WB_RGGBLevelsUnknown11]          1028 1024 1024 1043
[ColorTempUnknown11]              3954
[CameraColorCalibration01]        -361  360  950 (10900K)
[CameraColorCalibration02]        -335  371  918 (10000K)
[CameraColorCalibration03]        -294  389  862 (8300K)
[CameraColorCalibration04]        -248  413  810 (7000K)
[CameraColorCalibration05]        -192  445  748 (6000K)
[CameraColorCalibration06]        -165  461  719 (5600K)
[CameraColorCalibration07]        -133  480  687 (5200K)
[CameraColorCalibration08]         -84  506  638 (4700K)
[CameraColorCalibration09]         -27  543  584 (4200K)
[CameraColorCalibration10]          30  587  540 (3800K)
[CameraColorCalibration11]          81  629  502 (3500K)
[CameraColorCalibration12]         142  681  460 (3200K)
[CameraColorCalibration13]         193  725  424 (3000K)
[CameraColorCalibration14]         237  775  401 (2800K)
[CameraColorCalibration15]         349  908  345 (2400K)
[RawMeasuredRGGB]                 114365 146674 144937 70267
[CRWParam]                        (Binary data 20840 bytes)
[Flavor]                          (Binary data 16448 bytes)
[BlackLevel]                      129 129 129
[Canon_0x4009]                    0 0 0
[CustomPictureStyleFileName]
[Canon_0x4011]                    [...]
[Canon_0x4012]
[AFMicroAdjActive]                No
[AFMicroAdjValue]                 0
[PeripheralLighting]              On
[PeripheralLightingValue]         32
[OriginalImageWidth]              5184
[OriginalImageHeight]             3456
[PeripheralLightingSetting]       On
[Canon_0x4017]                    327942 2105278464
[AutoLightingOptimizer]           Standard
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐EXIF‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
[UserComment]
[SubSecTime]                      66
[SubSecTimeOriginal]              66
[SubSecTimeDigitized]             66
[FlashpixVersion]                 0100
[ColorSpace]                      sRGB
[ExifImageWidth]                  5184
[ExifImageHeight]                 3456
[InteropIndex]                    R98 - DCF basic file (sRGB)
[InteropVersion]                  0100
[FocalPlaneXResolution]           5715.545755
[FocalPlaneYResolution]           5808.403361
[FocalPlaneResolutionUnit]        inches
[CustomRendered]                  Normal
[ExposureMode]                    Manual
[WhiteBalance (2)]                Auto
[SceneCaptureType]                Standard
[GPSVersionID]                    2.2.0.0
[ThumbnailOffset]                 48684
[ThumbnailLength]                 20432
[ImageWidth (1)]                  670
[ImageHeight (1)]                 432
[BitsPerSample (1)]               16 16 16
[Compression (1)]                 Uncompressed
[PhotometricInterpretation]       RGB
[StripOffsets (1)]                2692728
[SamplesPerPixel]                 3
[RowsPerStrip]                    432
[StripByteCounts (1)]             1736640
[PlanarConfiguration]             Chunky
[Exif_0xc5d9]                     2
[Exif_0xc6c5 (1)]                 3
[Exif_0xc6dc]                     648 432 21 0
[Compression (2)]                 JPEG (old-style)
[StripOffsets]                    4429432
[StripByteCounts]                 22291607
[Exif_0xc5d8]                     1
[Exif_0xc5e0]                     3
[RawImageSegmentation]            2 1728 1904
[Exif_0xc6c5]                     1
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐Composite‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
[Aperture]                        3.5
[DriveMode]                       Single-frame Shooting
[FileNumber]                      100-0957
[ISO (2)]                         1234
[ImageSize]                       5184x3456
[Lens]                            24.0 - 70.0 mm
[LensID]                          Canon EF 24-70mm f/2.8L
[PreviewImage]                    (Binary data 2623611 bytes)
[ScaleFactor35efl]                1.6
[ShootingMode]                    Manual
[ShutterSpeed]                    1/60
[SubSecCreateDate]                Sun  Dec 25, 2011 10:54 pm
[SubSecDateTimeOriginal]          Sun  Dec 25, 2011 10:54 pm
[SubSecModifyDate]                Sun  Dec 25, 2011 10:54 pm
[ThumbnailImage]                  (Binary data 20432 bytes)
[WB_RGGBLevels]                   1817 1024 1024 1830
[BlueBalance]                     1.787109
[CircleOfConfusion]               0.019 mm
[FOV]                             46.0 deg
[FocalLength35efl]                27.0 mm (35 mm equivalent: 42.4 mm)
[HyperfocalDistance]              10.89 m
[Lens35efl]                       24.0 - 70.0 mm (35 mm equivalent: 37.7 -
109.9 mm)
[LightValue]                      5.9
[RedBalance]                      1.774414


On Wed, Jan 4, 2012 at 12:17 AM, Olivier Tilloy <olivier@xxxxxxxxxx> wrote:

> Very interesting, thanks for sharing Jason!
>
> Could you maybe post somewhere an original picture that embeds such
> information? I’m curious to see the visual result, but I don’t own a
> Canon camera.
>
> Also, do you know whether those magic values you use to extract the data
> are standard across all Canon cameras, or if they vary from one model to
> the other? Did you base your work on some sort of specification, or did
> you have to reverse-engineer the data?
>
> > I was thinking that perhaps these values (focuspointwidth,
> > focuspointheight, focuspointxpos, focuspointypos, activeafpoints,
> > afpoints) could be exposed more directly.  interested in your thoughts.
>
> It would make sense, especially if the format is common across all Canon
> cameras. I’m thinking that it may be a good candidate for an API such as
> the one requested in http://pad.lv/724185
>
> Cheers,
>
> Olivier
>

References