ExifTool Forum

General => Metadata => Topic started by: Duncan Carlsmith on June 30, 2023, 06:31:13 PM

Title: APPLE makernote decoding
Post by: Duncan Carlsmith on June 30, 2023, 06:31:13 PM
Hi. I don't see any post since 2015 on decoding the makernote APPLE adds to iphone image EXIF data. I attach output obtained with
exiftool -a -u -g1 -ee3 -api RequestAll=3 IMG_3034.jpeg >IMG_3034.jpeg_exif.txt
and output obtained with IOS App EXIF Tool as "raw data" exported to myself. There are a number of unexplained fields in the exiftool output.

1) Does anyone know of a more complete explication and decoding of APPLE makernote information?

I am intrigued by Run Time Value, Scale, and Epoch. I can't seem to interpret Value as POSIX time or UTC time or Julian date though Epoch suggests some such interpretation. I'd love discover the UTC in mobile phone images. From the local time which does appear, using the GPS lat and long to determine the local timezone (not trivial), and adjusting for daylight savings time (ack!) based on the date, one can find the UTC time, but that is painful and potentially error-prone at best.

2) Does anyone know the meaning of RunTime Value?

3) I wonder about the signal-to-noise value being negative. Is this misinterpreted?

In the EXIF TOOL output, real values "0.1054688","0.06640625" appear which are not in the exiftool output as well as an undecoded 512 length byte string.

4) What are these fields?

Both intrigue me because I've hoped to find time average magnetometer readings which, with the acceleration vector, GPS lat and long, UTC (or POSIX) time would determine the celestial pose of the camera. The "image direction" and "destination bearing" values seem to be a rat's nest judging from the behavior of the iPhone Compass app when the phone is pointing towards elevations in excess of 45 degrees - the bearing flips. I'm not sure yet if image direction (which is not a vector but behaves like a compass bearing) also flips. I understand that raw magnetometer can deviate from Earth's field due to local external fields even after crazy-eight style calibration is used to separate local external plus iPhone internal magnetism from Earth's field, and that walking around at larger scales may be used to compensate for local external fields after the calibration to differentiate the Earth's field, and that this strategy may be used to best estimate bearing but having performed the calibration maneuvers, a 3d vector frozen to the 3 phone axes is much cleaner than an undefined quantity that flips. And one can look up the approximate correction using a world magnetic field model.

FYI, I'm interested in estimating celestial pose from night sky images without additional data. Several sky-viewingNot a valid attachment ID.Not a valid attachment ID.  apps do this in real time with proprietary code. Stellarium open code does NOT do this - the mobile app based on Stellarium is proprietary. But if anyone can point me at open code for real-time celestial pose estimation, I'd be interested in studying it. I'm a total amateur.

exiftool:

---- Apple ----
Maker Note Version              : 14
Run Time Flags                  : Valid
Run Time Value                  : 278200113282208
Run Time Scale                  : 1000000000
Run Time Epoch                  : 0
AE Stable                      : Yes
AE Target                      : 140
AE Average                      : 125
AF Stable                      : Yes
Acceleration Vector            : 0.0225661788 -0.03184613586 -0.9983484155
Focus Distance Range            : 0.07 - 0.11 m
Apple 0x000d                    : 35
Apple 0x000e                    : 0
OIS Mode                        : 5
Apple 0x0010                    : 1
Image Capture Type              : 2
Live Photo Video Index          : 65536
Image Processing Flags          : (none)
Quality Hint                    : q825s
Apple 0x001f                    : 0
Image Capture Reqest ID        : 018E148A-A096-4857-BD6A-694409CD3067
HDR Headroom                    : 0
Apple 0x0023                    : 11 268435479
Scene Flags                    : [2], [3], [5], [10], [11], [12], [13], [15]
Signal To Noise Ratio Type      : 3
Signal To Noise Ratio          : -18.24663543
Apple 0x002b                    : 0DAD32D2-BDBD-4E0B-A660-4FF33BC70CDB
Apple 0x002d                    : 2980
Apple 0x002e                    : 1
Focus Position                  : 255
Apple 0x0033                    : 0
Apple 0x0034                    : 1
Apple 0x0035                    : 0
Apple 0x0036                    : 27
Apple 0x0037                    : 7
AF Measured Depth              : 9
Apple 0x0039                    : 0
Apple 0x003a                    : 0
Apple 0x003b                    : 0
Apple 0x003c                    : 4
AF Confidence                  : 4
Green Ghost Mitigation Status  : 0
Semantic Style                  : {0=1,1=0,2=0,3=0}
Apple 0x0043                    : 0
Apple 0x0044                    : 0
Front Facing Camera            : No
Apple 0x0046                    : 0
Apple 0x0048                    : 9
Apple 0x0049                    : 96
Apple 0x004a                    : 2

EXIF TOOL
"{MakerApple}" = {
1 = 14;
12 = (
"0.1054688",
"0.06640625"
);
13 = 35;
14 = 0;
15 = 5;
16 = 1;
2 = {length = 512, bytes = 0xbe00a600 93008600 7a007000 69006400 ... 68006400 61005e00 };
20 = 2;
23 = 65536;
25 = 0;
26 = q825s;
3 = {
epoch = 0;
flags = 1;
timescale = 1000000000;
value = 278200113282208;
};
31 = 0;
32 = "018E148A-A096-4857-BD6A-694409CD3067";
33 = 0;
35 = (
11,
268435479
);
37 = 48172;
38 = 3;
39 = "-18.24664";
4 = 1;
43 = "0DAD32D2-BDBD-4E0B-A660-4FF33BC70CDB";
45 = 2980;
46 = 1;
47 = 255;
5 = 140;
51 = 0;
52 = 1;
53 = 0;
54 = 27;
55 = 7;
56 = 9;
57 = 0;
58 = 0;
59 = 0;
6 = 125;
60 = 4;
61 = 4;
63 = 0;
64 = {
0 = 1;
1 = 0;
2 = 0;
3 = 0;
};
65 = 0;
66 = 0;
67 = 0;
68 = 0;
69 = 0;
7 = 1;
70 = 0;
72 = 9;
73 = 96;
74 = 2;
8 = (
"0.02256618",
"-0.03184614",
"-0.9983484"
);
};
"{TIFF}" = {
DateTime = "2023:06:29 21:01:31";
HostComputer = "iPhone 13 Pro";
Make = Apple;
Model = "iPhone 13 Pro";
Orientation = 6;
ResolutionUnit = 2;
Software = "16.5.1";
TileLength = 512;
TileWidth = 512;
XResolution = 72;
YResolution = 72;
};
}
Title: Re: APPLE makernote decoding
Post by: blue-j on July 03, 2023, 07:11:45 PM
For "Acceleration Vector," it is X, Y and Z axis acceleration in G's (gravitational force)
Title: Re: APPLE makernote decoding
Post by: Phil Harvey on July 11, 2023, 07:22:45 AM
The comments in the code (https://github.com/exiftool/exiftool/blob/master/lib/Image/ExifTool/Apple.pm) contain everything else I know about these tags, including references to the information sources.

- Phil