kartaview / upload-scripts

Uploader tools for KartaView
MIT License
61 stars 30 forks source link

upload images with mapillary style metadata #17

Closed mvexel closed 7 years ago

mvexel commented 7 years ago

When you record images with the Mapillary app it stores metadata not in EXIF but some sort of proprietary JSON structure. Some users keep their images recorded with the Mapillary app before uploading them, and if they want to upload those to OSV also, they would need something that converts the JSON +images into regular images+EXIF metadata.

If anyone has an example of that JSON please attach one how.

datendelphin commented 7 years ago

Here is some example exif data:

---- ExifTool ----
ExifTool Version Number         : 10.20
Warning                         : [minor] Unknown APP4 segment
Warning                         : [minor] Unknown APP5 segment
---- System ----
File Name                       : 2016_09_24_08_59_59_635.jpg
Directory                       : 2016_09_24_08_59_46_844
File Size                       : 2.1 MB
File Modification Date/Time     : 2016:09:24 08:59:59+02:00
File Access Date/Time           : 2016:09:24 08:59:59+02:00
File Inode Change Date/Time     : 2016:09:24 09:06:14+02:00
File Permissions                : rwxr-----
---- File ----
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Image Width                     : 4608
Image Height                    : 3456
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
---- IFD0 ----
Image Width                     : 4608
Image Height                    : 3456
Image Description               : {"MAPLatitude":"50.820566833322275","MAPLongitude":"4.395034368127003","MAPAltitude":"133.44931568622968","MAPGPSAccuracyMeters":"6.0","MAPCompassHeading":{"MagneticHeading":230.95114135742188,"TrueHeading":231.73341220617294},"MAPVersionString":"2.32","MAPSettingsEmail":"user@email","MAPSettingsUploadHash":"[redacted]","MAPPhotoUUID":"1e169e07-3c35-4f70-94c1-6fd3578a07d6","MAPCaptureTime":"2016_09_24_08_59_59_635","MAPLocalTimeZone":"+0200","MAPCameraMode":1,"MAPAutoFocusMode":"FIXED","MAPAutoFocusDistance":0,"MAPSequenceUUID":"1791e627-918d-4b6c-ab42-22dd1bfb0bba","MAPDeviceModel":"SM-G903F","MAPDeviceMake":"samsung","MAPAccelerometerVector":{"x":10.064870834350586,"y":-0.12092750519514084,"z":-0.6103625893592834},"MAPAPI":"CAMERA2","MAPPicRotation":0}
Make                            : samsung
Camera Model Name               : SM-G903F
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : G903FXXU1BPF1
Modify Date                     : 2016:09:24 08:59:59
Y Cb Cr Positioning             : Centered
---- ExifIFD ----
Exposure Time                   : 1/266
F Number                        : 1.9
Exposure Program                : Program AE
ISO                             : 40
Exif Version                    : 0220
Date/Time Original              : 2016:09:24 08:59:59
Create Date                     : 2016:09:24 08:59:59
Shutter Speed Value             : 1/265
Aperture Value                  : 1.9
Brightness Value                : 5.94
Exposure Compensation           : 0
Max Aperture Value              : 1.9
Metering Mode                   : Center-weighted average
Flash                           : No Flash
Focal Length                    : 3.7 mm
User Comment                    : 
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 4608
Exif Image Height               : 3456
Exposure Mode                   : Auto
White Balance                   : Manual
Focal Length In 35mm Format     : 31 mm
Scene Capture Type              : Standard
Image Unique ID                 : K16LLIA00SM K16LLJA01SC.
---- MakerUnknown ----
Unknown 0x0001                  : 0100
Unknown 0x0002                  : 73728
Unknown 0x000c                  : 0
Unknown 0x0010                  : undef
Unknown 0x0040                  : 0
Unknown 0x0050                  : 1
Unknown 0x0100                  : 0
---- GPS ----
GPS Latitude Ref                : North
GPS Latitude                    : 50 deg 49' 14.04"
GPS Longitude Ref               : East
GPS Longitude                   : 4 deg 23' 42.12"
GPS Img Direction               : 230.9511413
---- Composite ----
Aperture                        : 1.9
GPS Latitude                    : 50 deg 49' 14.04" N
GPS Longitude                   : 4 deg 23' 42.12" E
GPS Position                    : 50 deg 49' 14.04" N, 4 deg 23' 42.12" E
Image Size                      : 4608x3456
Megapixels                      : 15.9
Scale Factor To 35 mm Equivalent: 8.4
Shutter Speed                   : 1/266
Circle Of Confusion             : 0.004 mm
Field Of View                   : 60.3 deg
Focal Length                    : 3.7 mm (35 mm equivalent: 31.0 mm)
Hyperfocal Distance             : 2.01 m
Light Value                     : 11.2
bogdan-racasan commented 7 years ago

Implementation for json files were implemented and committed to the latest revision.