I am making a camera-based application for Android. My problem, is to find the real angle subtended by an object in an image, on the camera, when I have :
1.The length of that object in the image, in pixels,
2.The vertical angle-of-view of the camera,
3.The length of the image,in pixels.
Being new to image processing, I have this (probably basic) doubt. Is there a linear relationship between the angle that an object subtends on the camera, and the number of pixels in the image of the object taken by the camera? Angle subtended: Join the topmost point of the object to camera, then join bottom most point of object to camera. The angle formed at the camera, is the angle subtended. For example: Consider an image that is vertically, 200 pixels in height. The vertical angle of view of the camera, is suppose 20 degrees. So, I can say, that this 20 degrees covers 200 pixels of the image. Now, there is a portion of the image (an object) which is 10 pixels in height. I want to find the angle subtended by this object on the camera, in physical world. Would I be right in telling that, since 200 pixels are covered by 20 degrees, 10 pixels would be covered by 1 degree? That is, this object subtends an angle of 1 degree on the camera?.
As shown in this diagram, I know the values of L (of image), P (of object in image), x (Vertical angle of view of camera), and I want to find y , the angle subtended by object on camera. My assumption is (y/P)=(x/L), that is directly proportional. Would this assumption be correct?