Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

315
Vistas
How do I detect if phone is being held straight up or lying horizontal or tilted?

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.

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Provide some extra information, like the platform you're writing this code for. If you have access to the devices UI, you could try to compare the width and height of the window/viewport. If the width is greater than the height, it's in landscape.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda