>  Docs Center  >  Libraries  >  Salvaggio  >  PERSPECTIVE_PROJECT3D
Libraries

PERSPECTIVE_PROJECT3D

PERSPECTIVE_PROJECT3D

Name


    PERSPECTIVE_PROJECT3D

Purpose


    This function will perform a perspective projection of a three-
    dimensional point defined in homogenous coordinates onto a two-
    dimensional "focal plane" as if being acquired by a camera
    located in 3-space with a specified focal length, pixel size,
    and "look at" position.

Category


    GENERAL.

Calling Sequence


    result = PERSPECTIVE_PROJECT3D( point, $
                                    cameraPosition, $
                                    focalLength, $
                                    pixelSize, $
                                    lookatPosition, $
                                    OBSERVER_UP=observerUp )

Inputs


    point
      A vector containing the three-dimensional point to be projected in
      homogenous coordinates [x,y,z,1].
    cameraPosition
      A vector containing the three-dimensional point at which the camera
      is located in 3-space. Ths point is defined in homogeneous coordinates.
    focalLength
      A scalar defining the focal length of camera's lens (while this value
      serves as a scaling factor, keeping the units consistent with the pixel
      size is required).
    pixelSize
      A scalar defining the pixel size of the camera (pixels are assumed to
      be square) (while this value serves as a scaling factor, keeping the
      units consistent with the focal length is required).
    lookatPosition
      A vector containing the three-dimensional point at which the camera is
      staring in 3-space. This is only used to define the direction of gaze.
      This point is defined in homogeneous coordinates.

Keyword Parametrs


      OBSERVER_UP
        Set this keyword to a 4-element homogenous vector defining the up
        direction of the observer (as if the observer is holding the camera).
        The default value is [0,0,1,1] indicating up is in the positive z-
        direction.
  :ERROR CHECKING:
    None.

Side Effects


    None.

Requires


    NORMALIZE
    NORMH

Modification History


    Written by: Carl Salvaggio
    January, 2012 Original code
   

Disclaimer


    This source code is provided "as is" and without warranties as to performance
    or merchantability. The author and/or distributors of this source code may
    have made statements about this source code. Any such statements do not
    constitute warranties and shall not be relied on by the user in deciding
    whether to use this source code.
    This source code is provided without any express or implied warranties
    whatsoever. Because of the diversity of conditions and hardware under which
    this source code may be used, no warranty of fitness for a particular purpose
    is offered. The user is advised to test the source code thoroughly before
    relying on it. The user must assume the entire risk of using the source code.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us