Results 1 to 5 of 5
Like Tree2Thanks
  • 1 Post By chiro
  • 1 Post By chiro

Thread: Perspective projections (focal length and vanishing points)

  1. #1
    Newbie
    Joined
    Oct 2012
    From
    Washington
    Posts
    6

    Perspective projections (focal length and vanishing points)

    I am currently working on some homework which relates to perspective projects. I've been able to complete some of the questions but not others. I'd like to be pointed in the correct direction and have my reasoning corrected, if needed.

    Say that we've given 4 points, p_0, p_1, p_2 and p_3, retrieved from a perspective projection of a 3D rectangle, where the sides aren't parallel. If the focal point is at the origin and the camera is looking down the negative z-axis:

    1. How do we use the projected points to find the 2D vanishing points?
    My idea is that create two lines from 2 points each and find their intersection. Do the same for the horizontal direction. Thus, we get 2 vanishing points.

    2. If we have two rays from the focal point to one vanishing point each, will they be orthogonal?
    I think not because if I compute the dot product of the above two vanishing points, I get a non-zero number.

    3. Get the focal length.
    I have no idea on how to begin. How can we possibly find the focal length w/o having the previous 3D coordinates?

    4. Get the normal to the plane of the rectangle.
    I have a feeling this relates to computing the normal by using the cross product. Do I simply take two of the above lines (intersecting ones) in 2D, add a z-coordinate of 1 and then compute the normal?

    Note that I did not put specific numbers or examples, because I'd like to learn it by doing the homework. If someone could please guide me into the correct direction, I'd appreciate it. Thanks!
    Last edited by mrmackey; Nov 9th 2014 at 05:52 AM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    6,602
    Thanks
    1712

    Re: Perspective projections (focal length and vanishing points)

    Hey mrmackey.

    Is your projection on to a 2D plane? If so then are you finding x' = x/z, y' = y/z or are you using some other transformation?
    Thanks from mrmackey
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Oct 2012
    From
    Washington
    Posts
    6

    Re: Perspective projections (focal length and vanishing points)

    Hi Chiro, thanks for the reply.

    Yes, the projection is onto a 2D plane. The perspective matrix looks like:
    [1 0 0 0]
    [0 1 0 0]
    [0 0 1/f 0]

    So x' = fx/z and y' = fy/z. But without having the coordinates of the original 3D rectangle (x,y,z for 4 points), how can we make use of the above? At the moment, we have four points (x', y') in the 2D plane that were gotten after the 3D rectangle was projected. We are trying to find f (the focal length). We don't have x,y,z either.
    Last edited by mrmackey; Nov 9th 2014 at 05:50 PM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    6,602
    Thanks
    1712

    Re: Perspective projections (focal length and vanishing points)

    Well if we assume that the z coordinate is the same we basically get:

    x' = (f/z)*x, y' = (f/z)*y and for four points this means:

    x1' = (f/z)*x1, x2' = (f/z)*x2, x3' = (f/z)*x3, x4' = (f/z)*x4
    y1' = (f/z)*y1, y2' = (f/z)*y2, y3' = (f/z)*y3, y4' = (f/z)*y4

    We can also re-write (f/z) as cf where c = 1/z (which is a constant if they all lie on the same plane) or just a constant d.

    You can then use this to get back your original points in terms of this constant f/z.

    The only thing though is that without extra information both f and z could be varied to get the same value. So you could for example increase f while reducing the z coordinate of the original shape and you would still get the same result.

    If you have any other constraints for how f and z are related then use that: otherwise you can't get a unique solution.
    Thanks from mrmackey
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Oct 2012
    From
    Washington
    Posts
    6

    Re: Perspective projections (focal length and vanishing points)

    Hi Chiro,

    That's as far as I was able to get as well. But not being able to get a unique solution, or a unique value for f, I feel like I am missing something.

    Nevertheless, I will continue trying to figure it out. And if I do, I'll report back.

    Thanks for your help!
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Focal length
    Posted in the Algebra Forum
    Replies: 2
    Last Post: Jan 13th 2014, 01:30 PM
  2. angular magnification and focal length
    Posted in the Math Topics Forum
    Replies: 0
    Last Post: Jul 21st 2010, 03:40 PM
  3. Replies: 3
    Last Post: Oct 18th 2009, 06:09 PM
  4. Light rays, convex lens and focal length
    Posted in the Geometry Forum
    Replies: 1
    Last Post: Apr 17th 2009, 11:12 PM
  5. distance with 2 focal points.
    Posted in the Trigonometry Forum
    Replies: 1
    Last Post: Mar 7th 2008, 07:30 AM

Search Tags


/mathhelpforum @mathhelpforum