I am trying to try and constrain shooting pictures when the phone is held (approximately) straight. The purpose here is to ensure - for example - that a facade, something lying on a horizontal surface is being shot straight.
I am using to detect changes in angles and I have come to the conclusion that:
- beta and gamma close to 0: phone is held flat horizontal (parallel to a floor)
- beta close to 0 and gamma close to 90: phone is held in landscape mode
- beta and gamma close to 90: phone held in portrait mode
Is this correct? Right now I am testing on iOS - but I'd be interested to know if this changes depending on platforms.