I am trying to get the orientation of the photo taken in survey123 app in order to correct the direction of them. I have checked that with the device vertically the direction of the photo is correct, but if we touch the photo with the device horizontally, the direction is incorrect. This is because the direction is taken with respect to the longitudinal axis of the device. To correct it I've thought about using the imageorientation variable of the EXIF data, using the pulldata() function that returns the orientation of the mobile device, with values from 1 to 8:
Flag | Orientation | Description |
---|---|---|
1 | 0 degrees | the correct orientation, no adjustment is required. |
2 | 0 degrees, mirrored | image has been flipped back-to-front. |
3 | 180 degrees | image is upside down. |
4 | 180 degrees, mirrored | image is upside down and flipped back-to-front. |
5 | 90 degrees | image is on its side. |
6 | 90 degrees, mirrored | image is on its side and flipped back-to-front. |
7 | 270 degrees | image is on its far side. |
8 | 270 degrees, mirrored | image is on its far side and flipped back-to-front. |
but it seems that the photos taken from survey123 app do not take this value correctly, or at least that I have been able to check.
I would appreciate any indications about it. Thanks a lot.
Hi @Anonymous User
Apologies, I sent my message from a phone and was not clear. I am also having this issue (in bold):
------------------------------------------------------------
I use Survey123 to capture field photos and one of the things I record is the direction the photo is facing using pulldata("@exif", ${image}, "GpsImgDirection") then covert to a direction like North, Northeast, etc. However almost all my photos are required to be horizontal and the GpsImgDirection value recorded is offset by 90 degrees when I take a horizontal photo. I wonder if Survey123's problem of handling horizontal photos is related. To work around this I've set a calc field to add 90 degrees since more than 90 percent of my photos are horizontal anyways, and set my direction field to be manually if I don't agree with the direction conversion.
Hi there,
I can also confirm (using the exif sample from Survey123 Connect to test) that Survey123 only ever writes 1 to the ImageOrientation exif tag. Using the same sample with images loaded into the image question from the native iphone or ipad camera app yields different values for portrait and landscape photos.
Thanks,
Marc
Hi @Marc_Graham,
Thanks, we are looking into this issue, it appears the when orientation lock is enabled on iOS, it changes the ImageOrientation exif tag to be 1. This of course causes issues with knowing the orientation of the device when the image was taken and displaying it the correct way.
Regards,
Phil.
Hi Phil,
In our experience it also doesn't work correctly when orientation lock is not enabled.
Using your exif sample on an iPhone XR with orientation lock turned off I get values of 1 for both a portrait and landscape image. Notably the camera view doesn't re-orient when in landscape mode, perhaps for the phone version you have hardcoded it to always be portrait?
Regards,
Marc
Hi @Marc_Graham,
That's interesting. What version of iOS is on that device? I tested a whole range of iOS devices in our office and didn't see the issue with orientation lock off. We do have an XR which I need to test again?
Have you tried other iOS devices, does it happen with other models?
The app is locked on iPhones in portrait mode, but not the camera. So when you turn the device sideways (landscape) the app will still be in the portrait orientation, but when you open the camera, it will take a landscape photo. This is all provided that the OS provides the correct orientation of the device. Maybe the XR or certain iOS version is reported the orientation incorrectly (ie the 1 you are seeing).
Regards,
Phil.
Hi @Fco_JavierRomero @Marc_Graham @HowardBeverly1 @AaronWorthley1 @DougBrowning,
We have just released the 3.15 July Update today of Survey123 Connect and Field app which includes fixes for image orientation values being stored in EXIF data incorrectly, and also a fix for the the orientation lock on iOS being enabled and causing the orientation of landscape images to be incorrect. Please test out the latest builds and let us know if you still have issues with orientation information from images.
See the announcement here: https://community.esri.com/t5/arcgis-survey123-blog/what-s-new-in-arcgis-survey123-july-2022/ba-p/11...
Regards,
Phil.
That's great. Thanks for the Update @Anonymous User
Is anyone else still having problems with this? I just added ImageOrientation to my Survey, and did a test run: I wanted to go through 1-8 in the correct order. Instead I got 6-6-8-8-1-3-3-1 as the image orientation and am wholly confused now.
Yes, my team is still having this issue. My team has tested taking the same photo 4 times with the screen's orientation lock off: 1) horizontal photo with camera at left, 2) horizontal photo with camera at right, 3) vertical photo with camera at top, and 4) vertical photo with camera at bottom. All four test photos record a different photo direction. The only one that is correct is the vertical photo with the camera at top. Would appreciate help with this.