calculating view angle out of an image

4 views (last 30 days)
avioz dagan
avioz dagan on 5 Aug 2021
Edited: Matt J on 5 Aug 2021
I have an image and I need to get the view angle of each ROI.
by saying view angle i mean the angle between the picture eye, the ROI, and the ground plane.
I know the height of the camera, and I know some reference distances across the image.
is there any way to sample a point in the image and get the view angle?

Answers (1)

Matt J
Matt J on 5 Aug 2021
Edited: Matt J on 5 Aug 2021
You have to calibrate the camera and get the 3x4 projection matrix, P, but once you do it should be quite easy:
u=dot( normalize(P(3,1:1:3),'norm') , normalize(P(1:3,1:3)\[x;y;1],'norm') );
angle=acosd(u)+90;

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!