Results 1 to 8 of 8

Math Help - Angles and pixels in a photo: Are trigonometric functions scale dependent?

  1. #1
    Newbie
    Joined
    Jan 2013
    From
    Sweden
    Posts
    23

    Angles and pixels in a photo: Are trigonometric functions scale dependent?

    In a photo each pixel represents an angle.

    In an image of two objects with known angle (e.g. two stars), one could count the number of pixels between them and determine the ratio pixels/angle degree of that camera for all other purposes.

    I try to ignore the true ratio and just use pixel as an angular unit. However, trigonomectric functions like sine and cosine fail to work then, it seems. Why is that? I mean, what if I had a camera with very many pixels per angular degree, and one with extremely few, why should it matter? Why can't I simply define that one pixel represents one degree? Or ten?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    4,165
    Thanks
    762

    Re: Angles and pixels in a photo: Are trigonometric functions scale dependent?

    Hey Encircled.

    Can you explain what exactly it is you are trying to do? If you want to measure something, can you write down what you are measuring in terms of a function of the pixels or the data itself?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jan 2013
    From
    Sweden
    Posts
    23

    Re: Angles and pixels in a photo: Are trigonometric functions scale dependent?

    I want to measure the size of objects in photos. But I am only interested in their relative sizes.

    Anyway, say that the angle between points A and B is 354 pixels, corresponding to 0.1 radians angle.
    And between points B and C 708 pixels, corresponding to 0.2 radians.

    But sin(354)/sin(708) is not equal to sin(0.1)/(sin(0.2)

    The unit with which angles is measured seems quite important, but I don't quite understand why this is so.

    Must I calculate the true number of pixels per radian for each camera, by phtographing for example stars, before I can use trignometry on its photos?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor

    Joined
    Apr 2005
    Posts
    16,427
    Thanks
    1857

    Re: Angles and pixels in a photo: Are trigonometric functions scale dependent?

    What "angle" are you talking about? The angle between lines from the camera to one star and from the camera to another star has nothing to do with the angle between the lines, say, from the camera to one tree top and from the camera to another tree top.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Jan 2013
    From
    Sweden
    Posts
    23

    Re: Angles and pixels in a photo: Are trigonometric functions scale dependent?

    Doesn't it?
    If the camera has a field of view of 40 degrees horizontally, then when a photo is taken with 2048 pixels horizontal resolution, certainly 2048/40 pizels represent an angle of 1 degree. Regardless if it's between stars or trees. I want to calculate the pixels/degree 'backwards'. Only practical problems with measurement precision make me think that stars with known separation angles are to be prefered.

    I think the answer is that an angle must be a fraction of circle. 354 is an angle only if we know that 15043 is 'the whole way around' so to speak. An angle seems to fundamentally be a relationship between two other values.
    Last edited by Encircled; March 9th 2013 at 03:45 PM.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member
    Joined
    Dec 2012
    From
    Athens, OH, USA
    Posts
    709
    Thanks
    294

    Re: Angles and pixels in a photo: Are trigonometric functions scale dependent?

    Encircled,

    3d computer graphics is modeled on the way a camera works. I used to teach graphics so I know exactly what happens. There is a "center of projection" COP (eye of the user when she is aiming the camera) and a projection plane (plane of pixels in a modern camera). An object is projected onto this plane by projecting each of the object's points onto the projection plane. A point is projected onto the plane by intersecting the line between the point and the COP with the projection plane. So for example, two stars in a photo may be exactly the same size in pixels, but this has nothing to do with their actual sizes. The size of an object in pixels is dependent upon the above projection process and this is entirely dependent on the distance the object is from the COP. Even if you know the distances that two objects are from the COP, you have to apply the geometry/trigonometry of the projection. It turns out that the projection involves division by the distance from the COP. In sum, I think your efforts are doomed to failure.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Jan 2013
    From
    Sweden
    Posts
    23

    Re: Angles and pixels in a photo: Are trigonometric functions scale dependent?

    Interesting!
    I don't understand what the problem would be. If I take an image of two objects, A and B, then the pixel distance between them must represent the angle A-camera-B. No matter if they are objects within a few decimeters of the camera, a couple of kilometers away, or several light years away. I'm not interested in the size of a star, but of the distance between them. Maybe that's the misunderstanding?

    To first find out the pixels/radian, I take a photo of the horizon. I identify two buildings, A and B, on a map and measure the true length of the sides in the triangle camera-A-B. Then the law of cosine calculates the angles. And I simply count the number of pixels between the buildings. My problem is only that 1% error in length measurement on the map gives about 15% error in the angle! So I get a variation of 5% in different tests. Stars have fixed angles, I don't need to know the distance to them, I can just look up in some table the exact angle between them. The problem now, however, is that they are very faint and hard to identify with my phone camera (and weather is constantly cloudy). But I think a more careful attempt will work.

    Then when I take an image of two objects, I will, by counting their pixel distance, know the angle between them as seen from me.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Member
    Joined
    Mar 2013
    From
    BC, Canada
    Posts
    100
    Thanks
    16

    Re: Angles and pixels in a photo: Are trigonometric functions scale dependent?

    Quote Originally Posted by Encircled View Post
    Interesting!

    Then when I take an image of two objects, I will, by counting their pixel distance, know the angle between them as seen from me.
    I believe that your thinking is correct to objects that are very far away, however check out this image (from Angle of View):

    Angles and pixels in a photo: Are trigonometric functions scale dependent?-focal_length.jpg

    Note how the "angle" between the bottles changes depending on the focal length. This is a known behaviour in optics of trying to map a spherical image onto a flat plane (camera sensor). Imagine taking a piece of paper and wrapping it around a balloon. Now take the same piece of paper and lay it on a much, much larger sphere. In terms of the paper, the larger sphere is "almost nearly flat", which is the bottom scene in the photo above. So, in summary, I think your idea will work, but only for a large focal length, and for distant objects. You would also have to keep the settings of the camera constant, for every photo thereafter, unless you produced a new data table for each "setting" that would allow you to correlate the number of pixels to the angle (and create this data table with baseline information such as a known angle between stars, as you mentioned). How would you calculate the angle of objects that are too close? Take a panorama with your (constant) settings until you have both objects in view. Compose this photo and count the number of pixels (also note that this is only an approximation, as is the single photo)
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 6
    Last Post: August 29th 2010, 06:23 PM
  2. Trigonometric Ratios and and Special Angles
    Posted in the Trigonometry Forum
    Replies: 3
    Last Post: December 2nd 2009, 04:22 AM
  3. Trigonometric Functions of Non-Acute Angles
    Posted in the Trigonometry Forum
    Replies: 1
    Last Post: September 14th 2009, 06:20 PM
  4. Replies: 5
    Last Post: April 2nd 2009, 06:22 PM
  5. trigonometric functions of special angles
    Posted in the Trigonometry Forum
    Replies: 2
    Last Post: April 21st 2008, 08:26 AM

Search Tags


/mathhelpforum @mathhelpforum