-1

i'm searching for an algoritm to find angle between camera and object in a picture, for example:

example

In the example picture we can see 30 degree between the camera point of view and the object (tv in our case).

is anyone knows any algoritm that solve this problem?

Bernhard Barker
  • 54,589
  • 14
  • 104
  • 138

1 Answers1

0

The Television makes up a plane with a normal. Now take the vector from a point on this plane, like the TV's center, and the camera: sin α equals to the dot-product of the two vectors divided by the product of both vectors' lengths. Use arcsin to obtain the angle (beware of radians vs. degrees). If neccessary, clamp the angle between 0° and 90°.

The Techel
  • 918
  • 8
  • 13