adding Pitch and Roll to a jpg file

Started by sideleau, August 14, 2013, 10:47:13 AM

Previous topic - Next topic

sideleau

Greetings. I am attempting to add Roll and Pitch to a .jpg file that was created via the exiftool and contains GPS Lat, Lon, Alt.
I have reviewed some answers on this topic but the GPS parameters do not show up in the .jpg file when I look at the contents.
The first attempt is brute force by explicitly adding the Roll and Pitch but ultimately, I want to use an .nmea file with a sentence that contains the Heading, Roll, and Pitch (e.g. $PTNTHPR for example or something else).
I have a Windows 7 laptop.
The ExifTool version is 9.3.2.0

I created a .ExifTool_config file that resides in the directory where the exitftoll resides.

at the command line: ".\exiftool(-k).exe"  -config .ExifTool_config -v2 -GPSPitch=35 -GPSRoll=30 "C:\test_in\test2.jpg" -o "C:\test_out" > test.log

the log:
Writing GPS:GPSPitch
Writing GPS:GPSRoll
======== C:/test_in/test.jpg
'C:/test_in/test.jpg' --> 'C:/test_out/test.jpg'
Rewriting C:/test_in/test.jpg...
  Editing tags in: APP0 APP1 GPS IFD0 JFIF
  Creating tags in: APP1 GPS IFD0
JPEG APP1 (46246 bytes):
  Rewriting IFD0
  ExifByteOrder = II
  Rewriting ExifIFD
  Rewriting MakerNoteSony
  Rewriting ShotInfo
  Rewriting Tag9400a
  Rewriting Tag9402
  Rewriting Tag9403
  Rewriting Tag9405
  Rewriting Tag9406
  Rewriting Tag9050
  Rewriting InteropIFD
  Rewriting GPS
    - GPS:GPSPitch = '35'
    + GPS:GPSPitch = '35'
    + GPS:GPSRoll = '30'
  Rewriting IFD1
JPEG APP2 (384 bytes):
JPEG DQT (130 bytes):
JPEG DHT (416 bytes):
JPEG SOF0:
JPEG SOS
    1 image files created

using the following to display the contents of the jpg file that was created from the above:
".\exiftool(-k).exe" .\test_in\test2.JPG > test2.html

the test2.html file:
ExifTool Version Number         : 9.32
File Name                       : test2.JPG
Directory                       : ./test_in
File Size                       : 9.5 MB
File Modification Date/Time     : 2013:08:12 10:34:12-07:00
File Access Date/Time           : 2013:08:13 13:54:05-07:00
File Creation Date/Time         : 2013:08:13 13:54:05-07:00
File Permissions                : rw-rw-rw-
File Type                       : JPEG
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Image Description               :
Make                            : SONY
Camera Model Name               : NEX-7
Orientation                     : Horizontal (normal)
X Resolution                    : 350
Y Resolution                    : 350
Resolution Unit                 : inches
Software                        : NEX-7 v1.02
Modify Date                     : 2013:07:17 17:27:32
Y Cb Cr Positioning             : Co-sited
Exposure Time                   : 1/1000
F Number                        : 5.6
Exposure Program                : Shutter speed priority AE
ISO                             : 100
Sensitivity Type                : Recommended Exposure Index
Recommended Exposure Index      : 100
Exif Version                    : 0230
Date/Time Original              : 2013:07:17 17:27:32
Create Date                     : 2013:07:17 17:27:32
Components Configuration        : Y, Cb, Cr, -
Compressed Bits Per Pixel       : 3
Brightness Value                : 10.11875
Exposure Compensation           : 0
Max Aperture Value              : 2.8
Metering Mode                   : Multi-segment
Light Source                    : Unknown
Flash                           : Off, Did not fire
Focal Length                    : 20.0 mm
Rating                          : 0
Brightness                      : 0
Long Exposure Noise Reduction   : Off
High ISO Noise Reduction        : Normal
HDR                             : Off; Uncorrected image
WB Shift AB GM                  : 0 0
Face Info Offset                : 94
Sony Date Time                  : 2013:07:17 22:27:27
Sony Image Height               : 4000
Sony Image Width                : 6000
Faces Detected                  : 0
Face Info Length                : 37
Creative Style                  : Standard
Color Temperature               : Auto
Color Compensation Filter       : 0
Scene Mode                      : Standard
Zone Matching                   : ISO Setting Used
Dynamic Range Optimizer         : Auto
Image Stabilization             : Off
Color Mode                      : Standard
Full Image Size                 : 6000x4000
Preview Image Size              : 1616x1080
File Format                     : ARW 2.3
Quality                         : Fine
Flash Exposure Compensation     : 0
White Balance Fine Tune         : 0
Sony Model ID                   : NEX-7
Teleconverter                   : None
Multi Frame Noise Reduction     : Off
Picture Effect                  : Off
Soft Skin Effect                : Off
Vignetting Correction           : Auto
Lateral Chromatic Aberration    : Auto
Distortion Correction           : Auto
Lens Type                       : E-Mount, T-Mount, Other Lens or no lens
Lens Spec                       : E 20mm F2.8
Flash Level                     : Normal
Release Mode                    : Continuous
Sequence Number                 : 130
Anti-Blur                       : Off
Intelligent Auto                : Off
White Balance                   : Auto
Sequence Image Number           : 130
Sequence File Number            : 130
Release Mode 2                  : Continuous Low
Shot Number Since Power Up      : 143
Sequence Length                 : Continuous
Camera Orientation              : Horizontal (normal)
Quality 2                       : JPEG
Ambient Temperature             : 34 C
AF Area Mode                    : Multi
Battery Level                   : 23%
Flash Status                    : Built-in Flash present
Image Count                     : 186
Lens Mount                      : E-mount
Lens Format                     : APS-C
Lens Type 2                     : Sony E 20mm F2.8
User Comment                    :
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 6000
Exif Image Height               : 4000
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
File Source                     : Digital Camera
Scene Type                      : Directly photographed
Custom Rendered                 : Normal
Exposure Mode                   : Auto
Focal Length In 35mm Format     : 30 mm
Scene Capture Type              : Standard
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : Normal
Lens Info                       : 20mm f/2.8
Lens Model                      : E 20mm F2.8
GPS Version ID                  : 2.3.0.0
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Altitude Ref                : Above Sea Level
GPS Time Stamp                  : 17:27:32
GPS Speed Ref                   : knots
GPS Speed                       : 20.22
GPS Track Ref                   : True North
GPS Track                       : 208.5
GPS Date Stamp                  : 2013:07:17
PrintIM Version                 : 0300
Compression                     : JPEG (old-style)
Thumbnail Offset                : 40722
Thumbnail Length                : 5762
MPF Version                     : 0100
Number Of Images                : 2
MP Image Flags                  : Dependent child image
MP Image Format                 : JPEG
MP Image Type                   : Large Thumbnail (full HD equivalent)
MP Image Length                 : 744565
MP Image Start                  : 9230104
Dependent Image 1 Entry Number  : 0
Dependent Image 2 Entry Number  : 0
Image Width                     : 6000
Image Height                    : 4000
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
Aperture                        : 5.6
GPS Altitude                    : 425 m Above Sea Level
GPS Date/Time                   : 2013:07:17 17:27:32Z
GPS Latitude                    : 34 deg 18' 37.03" N
GPS Longitude                   : 118 deg 48' 8.03" W
GPS Position                    : 34 deg 18' 37.03" N, 118 deg 48' 8.03" W
Image Size                      : 6000x4000
Lens ID                         : Sony E 20mm F2.8
Preview Image                   : (Binary data 744565 bytes, use -b option to extract)
Scale Factor To 35 mm Equivalent: 1.5
Shutter Speed                   : 1/1000
Thumbnail Image                 : (Binary data 5762 bytes, use -b option to extract)
Circle Of Confusion             : 0.020 mm
Field Of View                   : 61.9 deg
Focal Length                    : 20.0 mm (35 mm equivalent: 30.0 mm)
Hyperfocal Distance             : 3.57 m
Light Value                     : 14.9


There is NO reference to the GPS Roll or GPS Pithc in the output above.
Thanks in advance for any response to this.

Phil Harvey

You must use the same config file when reading, or you won't see your non-standard tags (unless you use the -u option, but then the tags won't have meaningful names).  For some reason your config file isn't getting loaded properly when reading back the information.

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

sideleau

Thanks, it works!
I also was using the dump on the wrong jpg, duh.

Now I need to use a sentence in an .nmea file that contains Heading, Roll, and Pitch
I will attempt the following that I read from another post on this forum: $PTNTHPR,265.2,N,-7.5,N,0.0,N,A*56

I will let you know the results.

sideleau

OK, I added the "$PTNTHPR,265.2,N,-7.5,N,0.0,N,A*56" to the .nmea file and it works!

Thanks for the help.

Slainte!