Calculate angle of object with respect to reference line

Hello, I have been thinking for some time about trying to make an app with appinventor in which, from a photo, I can calculate the angle of an object with respect to a straight reference line. But I'm not sure how to calculate that angle once the contours in the photo have been detected, is there an extension to achieve that? thank you so much!!

Icono de Validado por la comunidad

Have you been able to achieve this part?

If the image was inside a canvas would you know the x/y coordinates of A & B ? If so you can calculate the angle/s.


1 Like

One method might be to use the phone's Orientation Sensor in conjunction with the Canvas, using a thin line as a sprite and a protractor - like grid as the background.