Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

320
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda