kartaview / openstreetcam.org

The openstreetcam.org web site
MIT License
75 stars 10 forks source link

Orientation EXIF tag incorrectly interpreted from GoPro Hero 7 #188

Open ToeBee opened 5 years ago

ToeBee commented 5 years ago

I'm not sure why this hasn't been a problem with previous GoPro cameras. But I just got a Hero 7 and all the tracks I have uploaded with the camera mounted upside down show up on OpenStreetCam in portrait mode, with the right edge of the image pointing down.

I did some testing with a stationary image and rotated the camera clockwise. The camera detected the rotation and changed the Orientation tag and OpenStreetCam is obviously detecting the orientation tag but mishandling the value. Images taken in a "normal" orientation show up correctly as do images taken when the camera is rotated 90 degrees counter clockwise. But 90 degrees clockwise and 180 degrees are not working. The Windows image viewer, JOSM, GIMP and Mapillary all show the correct orientation.

Here is my user profile right now with the test images plus 3 actual tracks with incorrect rotation: image

The four test ones were taken starting with the camera upright (the 4th track in my profile) and then rotated clockwise 90, 180 and 270 degrees. The value of the Orientation tag according to exiftools is 1, 6, 3 and 8.

ToeBee commented 5 years ago

I am accumulating more and more tracks that are on their side as I use the Hero 7. I thought about flipping all the images I upload using a script. But I'm afraid if I do that, they may get flipped again once the server side gets fixed. Or does the EXIF tag get rewritten when you use the API to flip images?

Also, sign detection does not seem to be running on these tracks. Will it run if I flip the images? And/or will it be run on all affected tracks once things are fixed on the server side?

ToeBee commented 5 years ago

So it seems like this has been fixed for new uploads. But I have a bunch of old sequences that are still flipped on their side. Should I write a script to go through and rotate them all?

mvexel commented 5 years ago

@alexandrui-telenav @mirunac-telenav will these be re-processed to fix the flipping?