Main Page | Modules | Class List | File List | Class Members | File Members

Camera geometric/photometric transformations
[Vision Package]


Classes

struct  Gan_PositionState
 Structure containing any previous project/backproject result. More...
struct  Gan_CubicBSplineSupport
struct  Gan_CubicBSplineWeights
struct  Gan_Camera
 Structure containing camera parameters in double precision. More...
struct  Gan_PositionState_f
 Structure containing any previous project/backproject result. More...
struct  Gan_CubicBSplineSupportF
struct  Gan_CubicBSplineWeightsF
struct  Gan_Camera_f
 Structure containing camera parameters in single precision. More...

Defines

#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CSKEW   camera->nonlinear.affine.skew
#define CKYX   camera->nonlinear.affine.kyx
#define CKIXX   camera->nonlinear.affine.Kinv.xx
#define CKIXY   camera->nonlinear.affine.Kinv.xy
#define CKIXZ   camera->nonlinear.affine.Kinv.xz
#define CKIYX   camera->nonlinear.affine.Kinv.yx
#define CKIYY   camera->nonlinear.affine.Kinv.yy
#define CKIYZ   camera->nonlinear.affine.Kinv.yz
#define TERMINATION_THRESHOLD   1.0e-7
#define CAM_STRUCT   Gan_Camera
#define GAN_POSITIONSTATE   Gan_PositionState
#define CAM_MAT33_ZERO_Q   gan_mat33_zero_q
#define CAM_FILL_ARRAY_FLOAT   gan_fill_array_d
#define CAM_MAT22_IDENT_Q   gan_mat22_ident_q
#define CAM_MAT22_ZERO_Q   gan_mat22_zero_q
#define CAM_MAT22_MULTV2_Q   gan_mat22_multv2_q
#define CAM_VEC3_SET_PARTS_Q   gan_vec3_set_parts_q
#define CAM_MAT33_MULTV3_Q   gan_mat33_multv3_q
#define CAM_MAT33_MULTV3_S   gan_mat33_multv3_s
#define CAM_MAT22_FILL_Q   gan_mat22_fill_q
#define CAM_MAT22_RMULTM22_S   gan_mat22_rmultm22_s
#define CAM_VEC2_SUB_Q   gan_vec2_sub_q
#define CAM_VEC2_DECREMENT   gan_vec2_decrement
#define CAM_MAT22_DET_Q   gan_mat22_det_q
#define CAM_VEC2_FILL_Q   gan_vec2_fill_q
#define GAN_MAT33_MULTV3_Q   gan_mat33_multv3_q
#define CAM_VECTOR2   Gan_Vector2
#define CAM_VECTOR3   Gan_Vector3
#define CAM_MATRIX22   Gan_Matrix22
#define CAM_FLOAT   double
#define CAM_FLOAT_MAX   DBL_MAX
#define CAM_SQR   gan_sqr_d
#define CAM_ZERO   0.0
#define CAM_ONE   1.0
#define CAM_HALF   0.5
#define CAM_TWO   2.0
#define CAM_THREE   3.0
#define CAM_FOUR   4.0
#define CAM_ONE_SIXTH   GAN_ONE_SIXTH
#define CAM_SMALL_NUMBER   1.0e-6
#define CAM_SMALL_NUMBER_INV   1.0e6
#define CAM_DETERMINANT_LIMIT   1.0e-10
#define CAM_LARGE_VALUE   1.0e9
#define CAM_WEIGHTBLOCK   Gan_CubicBSplineWeightBlock
#define CAM_SUPPORTSTRUCT   Gan_CubicBSplineSupport
#define TERMINATION_THRESHOLD   1.0e-7
#define CAM_STRUCT   Gan_Camera
#define GAN_POSITIONSTATE   Gan_PositionState
#define CAM_MAT33_ZERO_Q   gan_mat33_zero_q
#define CAM_FILL_ARRAY_FLOAT   gan_fill_array_d
#define CAM_MAT22_IDENT_Q   gan_mat22_ident_q
#define CAM_MAT22_ZERO_Q   gan_mat22_zero_q
#define CAM_MAT22_MULTV2_Q   gan_mat22_multv2_q
#define CAM_VEC3_SET_PARTS_Q   gan_vec3_set_parts_q
#define CAM_MAT33_MULTV3_Q   gan_mat33_multv3_q
#define CAM_MAT33_MULTV3_S   gan_mat33_multv3_s
#define CAM_MAT22_FILL_Q   gan_mat22_fill_q
#define CAM_MAT22_RMULTM22_S   gan_mat22_rmultm22_s
#define CAM_VEC2_SUB_Q   gan_vec2_sub_q
#define CAM_VEC2_DECREMENT   gan_vec2_decrement
#define CAM_MAT22_DET_Q   gan_mat22_det_q
#define CAM_VEC2_FILL_Q   gan_vec2_fill_q
#define GAN_MAT33_MULTV3_Q   gan_mat33_multv3_q
#define CAM_VECTOR2   Gan_Vector2
#define CAM_VECTOR3   Gan_Vector3
#define CAM_MATRIX22   Gan_Matrix22
#define CAM_FLOAT   double
#define CAM_FLOAT_MAX   DBL_MAX
#define CAM_SQR   gan_sqr_d
#define CAM_ZERO   0.0
#define CAM_ONE   1.0
#define CAM_HALF   0.5
#define CAM_TWO   2.0
#define CAM_THREE   3.0
#define CAM_FOUR   4.0
#define CAM_ONE_SIXTH   GAN_ONE_SIXTH
#define CAM_SMALL_NUMBER   1.0e-6
#define CAM_SMALL_NUMBER_INV   1.0e6
#define CAM_INVERT_WARP
#define CAM_DETERMINANT_LIMIT   1.0e-10
#define CAM_LARGE_VALUE   1.0e9
#define CAM_WEIGHTBLOCK   Gan_CubicBSplineWeightBlock
#define CAM_SUPPORTSTRUCT   Gan_CubicBSplineSupport
#define GAN_CUBIC_BSPLINE_CAMERA_LEVEL   4
 Highest supported level of subdivision of cubic B-spline mesh.
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CK1   camera->nonlinear.radial1.K1
#define CTR2   camera->nonlinear.radial1.thres_R2
#define CTDR   camera->nonlinear.radial1.thres_dR
#define COA   camera->nonlinear.radial1.outer_a
#define COB   camera->nonlinear.radial1.outer_b
#define R_CHANGE_THRES   1.0e-7
#define MIN_UND_ITERATIONS   6
#define MAX_UND_ITERATIONS   100
#define SMALL_DR_THRES   0.001
#define MODEL_FRACTION   0.95
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CK1   camera->nonlinear.radial1.K1
#define CTR2   camera->nonlinear.radial1.thres_R2
#define CTDR   camera->nonlinear.radial1.thres_dR
#define COA   camera->nonlinear.radial1.outer_a
#define COB   camera->nonlinear.radial1.outer_b
#define R_CHANGE_THRES   1.0e-7
#define MIN_UND_ITERATIONS   6
#define MAX_UND_ITERATIONS   100
#define SMALL_DR_THRES   0.001
#define MODEL_FRACTION   0.95
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CK1   camera->nonlinear.radial2.K1
#define CK2   camera->nonlinear.radial2.K2
#define CTR2   camera->nonlinear.radial2.thres_R2
#define CTDR   camera->nonlinear.radial2.thres_dR
#define COA   camera->nonlinear.radial2.outer_a
#define COB   camera->nonlinear.radial2.outer_b
#define R_CHANGE_THRES   1.0e-7
#define MIN_UND_ITERATIONS   6
#define MAX_UND_ITERATIONS   100
#define SMALL_DR_THRES   0.001
#define MODEL_FRACTION   0.95
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CK1   camera->nonlinear.radial3.K1
#define CK2   camera->nonlinear.radial3.K2
#define CK3   camera->nonlinear.radial3.K3
#define CTR2   camera->nonlinear.radial3.thres_R2
#define CTDR   camera->nonlinear.radial3.thres_dR
#define COA   camera->nonlinear.radial3.outer_a
#define COB   camera->nonlinear.radial3.outer_b
#define R_CHANGE_THRES   1.0e-7
#define MIN_UND_ITERATIONS   6
#define MAX_UND_ITERATIONS   100
#define SMALL_DR_THRES   0.001
#define MODEL_FRACTION   0.95
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CXX   camera->nonlinear.xydist4.cxx
#define CXY   camera->nonlinear.xydist4.cxy
#define CYX   camera->nonlinear.xydist4.cyx
#define CYY   camera->nonlinear.xydist4.cyy
#define SMALL_DR_THRES_SQUARED   1.0e-6
#define TERMINATION_THRESHOLD   1.0e-7
#define MIN_UND_ITERATIONS   6
#define MAX_UND_ITERATIONS   100
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CSKEW   camera->nonlinear.affine.skew
#define CKYX   camera->nonlinear.affine.kyx
#define CKIXX   camera->nonlinear.affine.Kinv.xx
#define CKIXY   camera->nonlinear.affine.Kinv.xy
#define CKIXZ   camera->nonlinear.affine.Kinv.xz
#define CKIYX   camera->nonlinear.affine.Kinv.yx
#define CKIYY   camera->nonlinear.affine.Kinv.yy
#define CKIYZ   camera->nonlinear.affine.Kinv.yz
#define TERMINATION_THRESHOLD   1.0e-4
#define CAM_STRUCT   Gan_Camera_f
#define GAN_POSITIONSTATE   Gan_PositionState_f
#define CAM_MAT33_ZERO_Q   gan_mat33f_zero_q
#define CAM_FILL_ARRAY_FLOAT   gan_fill_array_f
#define CAM_MAT22_IDENT_Q   gan_mat22f_ident_q
#define CAM_MAT22_ZERO_Q   gan_mat22f_zero_q
#define CAM_MAT22_MULTV2_Q   gan_mat22f_multv2_q
#define CAM_VEC3_SET_PARTS_Q   gan_vec3f_set_parts_q
#define CAM_MAT33_MULTV3_Q   gan_mat33f_multv3_q
#define CAM_MAT33_MULTV3_S   gan_mat33f_multv3_s
#define CAM_MAT22_FILL_Q   gan_mat22f_fill_q
#define CAM_MAT22_RMULTM22_S   gan_mat22f_rmultm22_s
#define CAM_VEC2_SUB_Q   gan_vec2f_sub_q
#define CAM_VEC2_DECREMENT   gan_vec2f_decrement
#define CAM_MAT22_DET_Q   gan_mat22f_det_q
#define CAM_VEC2_FILL_Q   gan_vec2f_fill_q
#define GAN_MAT33_MULTV3_Q   gan_mat33f_multv3_q
#define CAM_VECTOR2   Gan_Vector2_f
#define CAM_VECTOR3   Gan_Vector3_f
#define CAM_MATRIX22   Gan_Matrix22_f
#define CAM_FLOAT   float
#define CAM_FLOAT_MAX   FLT_MAX
#define CAM_SQR   gan_sqr_f
#define CAM_ZERO   0.0F
#define CAM_ONE   1.0F
#define CAM_HALF   0.5F
#define CAM_TWO   2.0F
#define CAM_THREE   3.0F
#define CAM_FOUR   4.0F
#define CAM_ONE_SIXTH   GAN_ONE_SIXTH_F
#define CAM_SMALL_NUMBER   1.0e-4F
#define CAM_SMALL_NUMBER_INV   1.0e4F
#define CAM_DETERMINANT_LIMIT   1.0e-10F
#define CAM_LARGE_VALUE   1.0e9F
#define CAM_WEIGHTBLOCK   Gan_CubicBSplineWeightBlockF
#define CAM_SUPPORTSTRUCT   Gan_CubicBSplineSupportF
#define TERMINATION_THRESHOLD   1.0e-4
#define CAM_STRUCT   Gan_Camera_f
#define GAN_POSITIONSTATE   Gan_PositionState_f
#define CAM_MAT33_ZERO_Q   gan_mat33f_zero_q
#define CAM_FILL_ARRAY_FLOAT   gan_fill_array_f
#define CAM_MAT22_IDENT_Q   gan_mat22f_ident_q
#define CAM_MAT22_ZERO_Q   gan_mat22f_zero_q
#define CAM_MAT22_MULTV2_Q   gan_mat22f_multv2_q
#define CAM_VEC3_SET_PARTS_Q   gan_vec3f_set_parts_q
#define CAM_MAT33_MULTV3_Q   gan_mat33f_multv3_q
#define CAM_MAT33_MULTV3_S   gan_mat33f_multv3_s
#define CAM_MAT22_FILL_Q   gan_mat22f_fill_q
#define CAM_MAT22_RMULTM22_S   gan_mat22f_rmultm22_s
#define CAM_VEC2_SUB_Q   gan_vec2f_sub_q
#define CAM_VEC2_DECREMENT   gan_vec2f_decrement
#define CAM_MAT22_DET_Q   gan_mat22f_det_q
#define CAM_VEC2_FILL_Q   gan_vec2f_fill_q
#define GAN_MAT33_MULTV3_Q   gan_mat33f_multv3_q
#define CAM_VECTOR2   Gan_Vector2_f
#define CAM_VECTOR3   Gan_Vector3_f
#define CAM_MATRIX22   Gan_Matrix22_f
#define CAM_FLOAT   float
#define CAM_FLOAT_MAX   FLT_MAX
#define CAM_SQR   gan_sqr_f
#define CAM_ZERO   0.0F
#define CAM_ONE   1.0F
#define CAM_HALF   0.5F
#define CAM_TWO   2.0F
#define CAM_THREE   3.0F
#define CAM_FOUR   4.0F
#define CAM_ONE_SIXTH   GAN_ONE_SIXTH_F
#define CAM_SMALL_NUMBER   1.0e-4F
#define CAM_SMALL_NUMBER_INV   1.0e4F
#define CAM_INVERT_WARP
#define CAM_DETERMINANT_LIMIT   1.0e-10F
#define CAM_LARGE_VALUE   1.0e9F
#define CAM_WEIGHTBLOCK   Gan_CubicBSplineWeightBlockF
#define CAM_SUPPORTSTRUCT   Gan_CubicBSplineSupportF
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CK1   camera->nonlinear.radial1.K1
#define CTR2   camera->nonlinear.radial1.thres_R2
#define CTDR   camera->nonlinear.radial1.thres_dR
#define COA   camera->nonlinear.radial1.outer_a
#define COB   camera->nonlinear.radial1.outer_b
#define R_CHANGE_THRES   1.0e-4F
#define MIN_UND_ITERATIONS   6
#define MAX_UND_ITERATIONS   100
#define SMALL_DR_THRES   0.01F
#define MODEL_FRACTION   0.95F
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CK1   camera->nonlinear.radial1.K1
#define CTR2   camera->nonlinear.radial1.thres_R2
#define CTDR   camera->nonlinear.radial1.thres_dR
#define COA   camera->nonlinear.radial1.outer_a
#define COB   camera->nonlinear.radial1.outer_b
#define R_CHANGE_THRES   1.0e-4F
#define MIN_UND_ITERATIONS   6
#define MAX_UND_ITERATIONS   100
#define SMALL_DR_THRES   0.01F
#define MODEL_FRACTION   0.95F
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CK1   camera->nonlinear.radial2.K1
#define CK2   camera->nonlinear.radial2.K2
#define CTR2   camera->nonlinear.radial2.thres_R2
#define CTDR   camera->nonlinear.radial2.thres_dR
#define COA   camera->nonlinear.radial2.outer_a
#define COB   camera->nonlinear.radial2.outer_b
#define R_CHANGE_THRES   1.0e-4F
#define MIN_UND_ITERATIONS   6
#define MAX_UND_ITERATIONS   100
#define SMALL_DR_THRES   0.01F
#define MODEL_FRACTION   0.95F
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CK1   camera->nonlinear.radial3.K1
#define CK2   camera->nonlinear.radial3.K2
#define CK3   camera->nonlinear.radial3.K3
#define CTR2   camera->nonlinear.radial3.thres_R2
#define CTDR   camera->nonlinear.radial3.thres_dR
#define COA   camera->nonlinear.radial3.outer_a
#define COB   camera->nonlinear.radial3.outer_b
#define R_CHANGE_THRES   1.0e-4F
#define MIN_UND_ITERATIONS   6
#define MAX_UND_ITERATIONS   100
#define SMALL_DR_THRES   0.01F
#define MODEL_FRACTION   0.95F
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CZH   camera->zh
#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CXX   camera->nonlinear.xydist4.cxx
#define CXY   camera->nonlinear.xydist4.cxy
#define CYX   camera->nonlinear.xydist4.cyx
#define CYY   camera->nonlinear.xydist4.cyy
#define SMALL_DR_THRES_SQUARED   1.0e-4
#define TERMINATION_THRESHOLD   1.0e-4
#define MIN_UND_ITERATIONS   6
#define MAX_UND_ITERATIONS   100

Typedefs

typedef Gan_PositionState Gan_PositionState
 Structure containing any previous project/backproject result.
typedef Gan_CubicBSplineSupport Gan_CubicBSplineSupport
typedef Gan_Vector2 Gan_CubicBSplineWeightBlock [1+(1<< 4)]
typedef Gan_CubicBSplineWeights Gan_CubicBSplineWeights
typedef Gan_Camera Gan_Camera
 Structure containing camera parameters in double precision.
typedef Gan_PositionState_f Gan_PositionState_f
 Structure containing any previous project/backproject result.
typedef Gan_CubicBSplineSupportF Gan_CubicBSplineSupportF
typedef Gan_Vector2_f Gan_CubicBSplineWeightBlockF [1+(1<< 4)]
typedef Gan_CubicBSplineWeightsF Gan_CubicBSplineWeightsF
typedef Gan_Camera_f Gan_Camera_f
 Structure containing camera parameters in single precision.

Enumerations

enum  Gan_CameraType {
  GAN_LINEAR_CAMERA, GAN_RADIAL_DISTORTION_1, GAN_RADIAL_DISTORTION_2, GAN_RADIAL_DISTORTION_3,
  GAN_RADIAL_DISTORTION_1_INV, GAN_STEREOGRAPHIC_CAMERA, GAN_EQUIDISTANT_CAMERA, GAN_SINE_LAW_CAMERA,
  GAN_EQUI_SOLID_ANGLE_CAMERA, GAN_XY_DISTORTION_4, GAN_FIXED_CORNER_WARP, GAN_FIXED_CORNER_WARP_INV,
  GAN_CUBIC_BSPLINE_CAMERA, GAN_CUBIC_BSPLINE_CAMERA_INV, GAN_AFFINE_CAMERA, GAN_CAMERA_TYPE_ENUM_COUNT
}
 Camera models supported by Gandalf. More...

Functions

Gan_Bool gan_camera_build_va (Gan_Camera *camera, Gan_CameraType type, double zh, double fx, double fy, double x0, double y0,...)
 Constructs a structure representing a camera.
Gan_Bool gan_camera_internalize (Gan_Camera *camera)
 Builds the internals of a camera.
Gan_Bool gan_camera_identical (const Gan_Camera *camera1, const Gan_Camera *camera2)
 Checks whether two cameras have identical parameters.
Gan_SquMatrix33 gan_camera_fill_matrix_s (const Gan_Camera *camera)
 Fills and returns a 3x3 upper triangular camera matrix.
Gan_Matrix33 gan_camera_fill_fullmatrix_s (const Gan_Camera *camera)
 Fills and returns a full 3x3 camera matrix.
Gan_Bool gan_camera_set_common_fields (Gan_Camera *camera, Gan_CameraType type, double zh, double fx, double fy, double x0, double y0)
 Set common fields of camera structure.
Gan_Bool gan_camera_project_point_gen (const Gan_Camera *camera, Gan_Vector3 *X, Gan_Vector3 *p, Gan_PositionState *Xpprev, Gan_Matrix22 *HX, Gan_Camera HC[2], int *error_code)
 Macro: Projects a point from the scene onto the image.
Gan_Bool gan_camera_project_point (const Gan_Camera *camera, Gan_Vector3 *X, Gan_Vector3 *p, int *error_code)
 Macro: Projects a point from the scene onto the image.
Gan_Bool gan_camera_project_point_q (const Gan_Camera *camera, Gan_Vector3 *X, Gan_Vector3 *p)
 Macro: Projects a point from the scene onto the image.
Gan_Bool gan_camera_project_point_i (const Gan_Camera *camera, Gan_Vector3 *X)
 Macro: Projects a point from the scene onto the image.
Gan_Bool gan_camera_backproject_point_gen (const Gan_Camera *camera, Gan_Vector3 *p, Gan_Vector3 *X, Gan_PositionState *pXprev, int *error_code)
 Macro: Back-projects an image point into the scene.
Gan_Bool gan_camera_backproject_point (const Gan_Camera *camera, Gan_Vector3 *p, Gan_Vector3 *X, int *error_code)
 Macro: Back-projects an image point into the scene.
Gan_Bool gan_camera_backproject_point_q (const Gan_Camera *camera, Gan_Vector3 *p, Gan_Vector3 *X)
 Macro: Back-projects an image point into the scene.
Gan_Bool gan_camera_backproject_point_i (const Gan_Camera *camera, Gan_Vector3 *p)
 Macro: Back-projects an image point into the scene.
Gan_Bool gan_camera_add_distortion_gen (const Gan_Camera *camera, Gan_Vector3 *pu, Gan_Vector3 *p, Gan_PositionState *pupprev, int *error_code)
 Macro: Applies non-linear distortion to an image point.
Gan_Bool gan_camera_add_distortion (const Gan_Camera *camera, Gan_Vector3 *pu, Gan_Vector3 *p, int *error_code)
 Macro: Applies non-linear distortion to an image point.
Gan_Bool gan_camera_add_distortion_q (const Gan_Camera *camera, Gan_Vector3 *pu, Gan_Vector3 *p)
 Macro: Applies non-linear distortion to an image point.
Gan_Bool gan_camera_add_distortion_i (const Gan_Camera *camera, Gan_Vector3 *p)
 Macro: Applies non-linear distortion to an image point.
Gan_Bool gan_camera_remove_distortion_gen (const Gan_Camera *camera, Gan_Vector3 *p, Gan_Vector3 *pu, Gan_PositionState *ppuprev, int *error_code)
 Macro: Removes non-linear distortion from an image point.
Gan_Bool gan_camera_remove_distortion (const Gan_Camera *camera, Gan_Vector3 *p, Gan_Vector3 *pu, int *error_code)
 Macro: Removes non-linear distortion from an image point.
Gan_Bool gan_camera_remove_distortion_q (const Gan_Camera *camera, Gan_Vector3 *p, Gan_Vector3 *pu)
 Macro: Removes non-linear distortion from an image point.
Gan_Bool gan_camera_remove_distortion_i (const Gan_Camera *camera, Gan_Vector3 *p)
 Macro: Removes non-linear distortion from an image point.
Gan_Bool gan_camera_project_line_q (const Gan_Camera *camera, Gan_Vector3 *L, Gan_Vector3 *l)
 Macro: Projects a line from the scene onto the image.
Gan_Bool gan_camera_project_line_i (const Gan_Camera *camera, Gan_Vector3 *L)
 Macro: Projects a line from the scene onto the image.
Gan_Bool gan_camera_backproject_line_q (const Gan_Camera *camera, Gan_Vector3 *l, Gan_Vector3 *L)
 Macro: Back-projects an image line into the scene.
Gan_Bool gan_camera_backproject_line_i (const Gan_Camera *camera, Gan_Vector3 *l)
 Macro: Back-projects an image line into the scene.
Gan_Bool gan_camera_build_affine (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0, double skew, double kyx)
 Builds a structure representing a affine camera.
Gan_Bool gan_cameraf_from_camera_q (const Gan_Camera *camera, Gan_Camera_f *cameraf, Gan_CubicBSplineWeightsF **ppweight, Gan_CubicBSplineSupportF **ppsupport)
 Converts camera from double to single precision representation.
Gan_Bool gan_camera_from_cameraf_q (const Gan_Camera_f *cameraf, Gan_Camera *camera, Gan_CubicBSplineWeights **ppweight, Gan_CubicBSplineSupport **ppsupport)
 Converts camera from single to double precision representation.
Gan_Camera_f gan_cameraf_from_camera_s (const Gan_Camera *camera, Gan_CubicBSplineWeightsF **ppweight, Gan_CubicBSplineSupportF **ppsupport)
 Converts camera from double to single precision representation.
Gan_Camera gan_camera_from_cameraf_s (const Gan_Camera_f *cameraf, Gan_CubicBSplineWeights **ppweight, Gan_CubicBSplineSupport **ppsupport)
 Converts camera from single to double precision representation.
Gan_Bool gan_camera_build_cubic_Bspline (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0, double skew, double kyx, double kzx, double kzy, Gan_Vector2 weight[1+(1<< 4)][1+(1<< 4)], Gan_CubicBSplineSupport *support)
 Builds a structure representing a cubic B-spline mesh.
Gan_Bool gan_camera_build_cubic_Bspline_inv (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0, double skew, double kyx, double kzx, double kzy, Gan_Vector2 weight[1+(1<< 4)][1+(1<< 4)], Gan_CubicBSplineSupport *support)
 Builds a structure representing an inverse cubic B-spline mesh.
Gan_Bool gan_camera_build_equi_solid_angle (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0)
 Builds a structure representing a equi-solid angle camera.
Gan_Bool gan_camera_build_equidistant (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0)
 Builds a structure representing a equidistant camera.
Gan_Bool gan_camera_build_linear (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0)
 Builds a structure representing a linear camera.
Gan_Bool gan_camera_build_radial_distortion_1 (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0, double K1)
 Builds a structure representing a non-linear camera.
Gan_Bool gan_camera_build_radial_distortion_1_inv (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0, double K1)
 Builds a structure representing a non-linear camera.
Gan_Bool gan_camera_build_radial_distortion_2 (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0, double K1, double K2)
 Builds a structure representing a non-linear camera.
Gan_Bool gan_camera_build_radial_distortion_3 (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0, double K1, double K2, double K3)
 Builds a structure representing a non-linear camera.
Gan_Bool gan_camera_build_sine_law (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0)
 Builds a structure representing a sine law camera.
Gan_Bool gan_camera_build_stereographic (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0)
 Builds a structure representing a stereographic camera.
Gan_Bool gan_camera_build_xy_distortion_4 (Gan_Camera *camera, double zh, double fx, double fy, double x0, double y0, double cxx, double cxy, double cyx, double cyy)
 Builds a structure representing a xy-distortion camera.
Gan_Bool gan_cameraf_build_va (Gan_Camera_f *camera, Gan_CameraType type, float zh, float fx, float fy, float x0, float y0,...)
 Constructs a structure representing a camera.
Gan_Bool gan_cameraf_internalize (Gan_Camera_f *camera)
 Builds the internals of a camera.
Gan_Bool gan_cameraf_identical (const Gan_Camera_f *camera1, const Gan_Camera_f *camera2)
 Checks whether two cameras have identical parameters.
Gan_SquMatrix33_f gan_cameraf_fill_matrix_s (const Gan_Camera_f *camera)
 Fills and returns a 3x3 upper triangular camera matrix.
Gan_Matrix33_f gan_cameraf_fill_fullmatrix_s (const Gan_Camera_f *camera)
 Fills and returns a full 3x3 camera matrix.
Gan_Bool gan_cameraf_set_common_fields (Gan_Camera_f *camera, Gan_CameraType type, float zh, float fx, float fy, float x0, float y0)
 Set common fields of camera structure.
Gan_Bool gan_cameraf_project_point_gen (const Gan_Camera_f *camera, Gan_Vector3_f *X, Gan_Vector3_f *p, Gan_PositionState_f *Xpprev, Gan_Matrix22_f *HX, Gan_Camera_f HC[2], int *error_code)
 Macro: Projects a point from the scene onto the image.
Gan_Bool gan_cameraf_project_point (const Gan_Camera_f *camera, Gan_Vector3_f *X, Gan_Vector3_f *p, int *error_code)
 Macro: Projects a point from the scene onto the image.
Gan_Bool gan_cameraf_project_point_q (const Gan_Camera_f *camera, Gan_Vector3_f *X, Gan_Vector3_f *p)
 Macro: Projects a point from the scene onto the image.
Gan_Bool gan_cameraf_project_point_i (const Gan_Camera_f *camera, Gan_Vector3_f *X)
 Macro: Projects a point from the scene onto the image.
Gan_Bool gan_cameraf_backproject_point_gen (const Gan_Camera_f *camera, Gan_Vector3_f *p, Gan_Vector3_f *X, Gan_PositionState_f *pXprev, int *error_code)
 Macro: Back-projects an image point into the scene.
Gan_Bool gan_cameraf_backproject_point (const Gan_Camera_f *camera, Gan_Vector3_f *p, Gan_Vector3_f *X, int *error_code)
 Macro: Back-projects an image point into the scene.
Gan_Bool gan_cameraf_backproject_point_q (const Gan_Camera_f *camera, Gan_Vector3_f *p, Gan_Vector3_f *X)
 Macro: Back-projects an image point into the scene.
Gan_Bool gan_cameraf_backproject_point_i (const Gan_Camera_f *camera, Gan_Vector3_f *p)
 Macro: Back-projects an image point into the scene.
Gan_Bool gan_cameraf_add_distortion_gen (const Gan_Camera_f *camera, Gan_Vector3_f *pu, Gan_Vector3_f *p, Gan_PositionState_f *pupprev, int *error_code)
 Macro: Applies non-linear distortion to an image point.
Gan_Bool gan_cameraf_add_distortion (const Gan_Camera_f *camera, Gan_Vector3_f *pu, Gan_Vector3_f *p, int *error_code)
 Macro: Applies non-linear distortion to an image point.
Gan_Bool gan_cameraf_add_distortion_q (const Gan_Camera_f *camera, Gan_Vector3_f *pu, Gan_Vector3_f *p)
 Macro: Applies non-linear distortion to an image point.
Gan_Bool gan_cameraf_add_distortion_i (const Gan_Camera_f *camera, Gan_Vector3_f *p)
 Macro: Applies non-linear distortion to an image point.
Gan_Bool gan_cameraf_remove_distortion_gen (const Gan_Camera_f *camera, Gan_Vector3_f *p, Gan_Vector3_f *pu, Gan_PositionState_f *ppuprev, int *error_code)
 Macro: Removes non-linear distortion from an image point.
Gan_Bool gan_cameraf_remove_distortion (const Gan_Camera_f *camera, Gan_Vector3_f *p, Gan_Vector3_f *pu, int *error_code)
 Macro: Removes non-linear distortion from an image point.
Gan_Bool gan_cameraf_remove_distortion_q (const Gan_Camera_f *camera, Gan_Vector3_f *p, Gan_Vector3_f *pu)
 Macro: Removes non-linear distortion from an image point.
Gan_Bool gan_cameraf_remove_distortion_i (const Gan_Camera_f *camera, Gan_Vector3_f *p)
 Macro: Removes non-linear distortion from an image point.
Gan_Bool gan_cameraf_project_line_q (const Gan_Camera_f *camera, Gan_Vector3_f *L, Gan_Vector3_f *l)
 Macro: Projects a line from the scene onto the image.
Gan_Bool gan_cameraf_project_line_i (const Gan_Camera_f *camera, Gan_Vector3_f *L)
 Macro: Projects a line from the scene onto the image.
Gan_Bool gan_cameraf_backproject_line_q (const Gan_Camera_f *camera, Gan_Vector3_f *l, Gan_Vector3_f *L)
 Macro: Back-projects an image line into the scene.
Gan_Bool gan_cameraf_backproject_line_i (const Gan_Camera_f *camera, Gan_Vector3_f *l)
 Macro: Back-projects an image line into the scene.
Gan_Bool gan_cameraf_build_affine (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0, float skew, float kyx)
 Builds a structure representing a affine camera.
Gan_Bool gan_cameraf_build_cubic_Bspline (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0, float skew, float kyx, float kzx, float kzy, Gan_Vector2_f weight[1+(1<< 4)][1+(1<< 4)], Gan_CubicBSplineSupportF *support)
 Builds a structure representing a cubic B-spline mesh.
Gan_Bool gan_cameraf_build_cubic_Bspline_inv (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0, float skew, float kyx, float kzx, float kzy, Gan_Vector2_f weight[1+(1<< 4)][1+(1<< 4)], Gan_CubicBSplineSupportF *support)
 Builds a structure representing an inverse cubic B-spline mesh.
Gan_Bool gan_cameraf_build_equi_solid_angle (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0)
 Builds a structure representing a equi-solid angle camera.
Gan_Bool gan_cameraf_build_equidistant (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0)
 Builds a structure representing a equidistant camera.
Gan_Bool gan_cameraf_build_linear (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0)
 Builds a structure representing a linear camera.
Gan_Bool gan_cameraf_build_radial_distortion_1 (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0, float K1)
 Builds a structure representing a non-linear camera.
Gan_Bool gan_cameraf_build_radial_distortion_1_inv (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0, float K1)
 Builds a structure representing a non-linear camera.
Gan_Bool gan_cameraf_build_radial_distortion_2 (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0, float K1, float K2)
 Builds a structure representing a non-linear camera.
Gan_Bool gan_cameraf_build_radial_distortion_3 (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0, float K1, float K2, float K3)
 Builds a structure representing a non-linear camera.
Gan_Bool gan_cameraf_build_sine_law (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0)
 Builds a structure representing a sine law camera.
Gan_Bool gan_cameraf_build_stereographic (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0)
 Builds a structure representing a stereographic camera.
Gan_Bool gan_cameraf_build_xy_distortion_4 (Gan_Camera_f *camera, float zh, float fx, float fy, float x0, float y0, float cxx, float cxy, float cyx, float cyy)
 Builds a structure representing a xy-distortion camera.

Typedef Documentation

typedef struct Gan_CubicBSplineSupport Gan_CubicBSplineSupport
 

Warped positions and derivatives, to aid backprojection.

typedef struct Gan_CubicBSplineSupportF Gan_CubicBSplineSupportF
 

Warped positions and derivatives, to aid backprojection

typedef struct Gan_CubicBSplineWeights Gan_CubicBSplineWeights
 

Cubic B-spline weight structure.

typedef struct Gan_CubicBSplineWeightsF Gan_CubicBSplineWeightsF
 

Cubic B-spline weight structure.


Enumeration Type Documentation

enum Gan_CameraType
 

Camera models supported by Gandalf.

Enumeration values:
GAN_LINEAR_CAMERA  linear camera model
GAN_RADIAL_DISTORTION_1  one parameter K1 of radial distortion
GAN_RADIAL_DISTORTION_2  two parameters K1,K2 of radial distortion
GAN_RADIAL_DISTORTION_3  three parameters K1,K2,K3 of radial distortion
GAN_RADIAL_DISTORTION_1_INV  one parameter K1 of inverse radial distortion
GAN_STEREOGRAPHIC_CAMERA  stereographic projection
GAN_EQUIDISTANT_CAMERA  equidistant projection
GAN_SINE_LAW_CAMERA  sine-law projection
GAN_EQUI_SOLID_ANGLE_CAMERA  equi-solid angle projection
GAN_XY_DISTORTION_4  distortion model as used by 3D Equalizer V4
GAN_FIXED_CORNER_WARP  warp model with fixed corners
GAN_FIXED_CORNER_WARP_INV  inverse warp model with fixed corners
GAN_CUBIC_BSPLINE_CAMERA  camera defined by projective warp and cubic B-spline warp
GAN_CUBIC_BSPLINE_CAMERA_INV  camera defined by projective warp and inverse cubic B-spline warp
GAN_AFFINE_CAMERA  affine camera model


Function Documentation

Gan_Bool gan_camera_add_distortion const Gan_Camera camera,
Gan_Vector3 pu,
Gan_Vector3 p,
int *  error_code
 

Macro: Applies non-linear distortion to an image point.

Parameters:
camera Pointer to the camera structure
pu Pointer to the image point coordinates without distortion
p Pointer to the output distorted image point coordinates
error_code Pointer to error code or NULL
Given a homogeneous 2D image point pu assumed to be the linear projection of a scene point (i.e. having no non-linear distortion), adds distortion to the coordinates, writing the result into the pointer p. The camera parameters are read from the given camera.

Returns:
GAN_TRUE on successfully applying the distortion, GAN_FALSE on failure.
See also:
gan_camera_remove_distortion().

Gan_Bool gan_camera_add_distortion_gen const Gan_Camera camera,
Gan_Vector3 pu,
Gan_Vector3 p,
Gan_PositionState pupprev,
int *  error_code
 

Macro: Applies non-linear distortion to an image point.

Parameters:
camera Pointer to the camera structure
pu Pointer to the image point coordinates without distortion
p Pointer to the output distorted image point coordinates
pupprev Pointer to previous input/output position or NULL
error_code Pointer to error code or NULL
Given a homogeneous 2D image point pu assumed to be the linear projection of a scene point (i.e. having no non-linear distortion), adds distortion to the coordinates, writing the result into the pointer p. The camera parameters are read from the given camera.

Returns:
GAN_TRUE on successfully applying the distortion, GAN_FALSE on failure.
See also:
gan_camera_remove_distortion_gen().

Gan_Bool gan_camera_add_distortion_i const Gan_Camera camera,
Gan_Vector3 p
 

Macro: Applies non-linear distortion to an image point.

Parameters:
camera Pointer to the camera structure
p Pointer to the image point coordinates (input/output)
Given a homogeneous 2D image point p assumed to be the linear projection of a scene point (i.e. having no non-linear distortion), adds distortion to the coordinates, overwriting the vector p with the result. The camera parameters are read from the given camera.

This is a macro call to gan_camera_add_distortion_q().

Returns:
GAN_TRUE on successfully applying the distortion, GAN_FALSE on failure.
See also:
gan_camera_add_distortion_q().

Gan_Bool gan_camera_add_distortion_q const Gan_Camera camera,
Gan_Vector3 pu,
Gan_Vector3 p
 

Macro: Applies non-linear distortion to an image point.

Parameters:
camera Pointer to the camera structure
pu Pointer to the image point coordinates without distortion
p Pointer to the output distorted image point coordinates
Given a homogeneous 2D image point p assumed to be the linear projection of a scene point (i.e. having no non-linear distortion), adds distortion to the coordinates, overwriting the vector p with the result. The camera parameters are read from the given camera.

This is a macro call to gan_camera_add_distortion_q().

Returns:
GAN_TRUE on successfully applying the distortion, GAN_FALSE on failure.
See also:
gan_camera_add_distortion_q().

Gan_Bool gan_camera_backproject_line_i const Gan_Camera camera,
Gan_Vector3 l
 

Macro: Back-projects an image line into the scene.

Parameters:
camera Pointer to the camera structure
l Pointer to image coordinates of the line (input/output)
Given the homogeneous coordinates of an image line l, back-projects the line into the scene, so that the output line is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected line actually represents a plane through the origin (optical centre). The operation is performed in-place in the vector l.

This is a macro call to gan_camera_backproject_line_q().

Returns:
GAN_TRUE on successfully computing scene coordinates of line, GAN_FALSE on failure.
See also:
gan_camera_backproject_line_q(), gan_camera_project_line_q() gan_camera_backproject_line_i().

Gan_Bool gan_camera_backproject_line_q const Gan_Camera camera,
Gan_Vector3 l,
Gan_Vector3 L
 

Macro: Back-projects an image line into the scene.

Parameters:
camera Pointer to the camera structure
l Pointer to homogeneous image coordinates of the line
L Pointer to the output 3D line camera-centred coordinates
Given the homogeneous coordinates of an image line l, back-projects the line into the scene, so that the output line L is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected line actually represents a plane $L.X=0$ through the origin (optical centre).

Returns:
GAN_TRUE on successfully computing scene coordinates of line, GAN_FALSE on failure.
See also:
gan_camera_backproject_point_q(), gan_camera_project_line_q() gan_camera_backproject_line_i().

Gan_Bool gan_camera_backproject_point const Gan_Camera camera,
Gan_Vector3 p,
Gan_Vector3 X,
int *  error_code
 

Macro: Back-projects an image point into the scene.

Parameters:
camera Pointer to the camera structure
p Pointer to homogeneous image coordinates of the point
X Pointer to the output 3D point camera-centred coordinates
error_code Pointer to error code or NULL
Given the homogeneous coordinates of an image point p, back-projects the point into the scene, so that the output point X is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected point is chosen to lie on the plane Z=1.

Returns:
GAN_TRUE on successfully computing scene coordinates of point, GAN_FALSE on failure.
See also:
gan_camera_backproject_line_q(), gan_camera_project_point_q() gan_camera_backproject_point_i().

Gan_Bool gan_camera_backproject_point_gen const Gan_Camera camera,
Gan_Vector3 p,
Gan_Vector3 X,
Gan_PositionState pXprev,
int *  error_code
 

Macro: Back-projects an image point into the scene.

Parameters:
camera Pointer to the camera structure
p Pointer to homogeneous image coordinates of the point
X Pointer to the output 3D point camera-centred coordinates
pXprev Pointer to previous input/output position or NULL
error_code Pointer to error code or NULL
Given the homogeneous coordinates of an image point p, back-projects the point into the scene, so that the output point X is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected point is chosen to lie on the plane Z=1.

Returns:
GAN_TRUE on successfully computing scene coordinates of point, GAN_FALSE on failure.
See also:
gan_camera_backproject_line_q(), gan_camera_project_point_q() gan_camera_backproject_point_i().

Gan_Bool gan_camera_backproject_point_i const Gan_Camera camera,
Gan_Vector3 p
 

Macro: Back-projects an image point into the scene.

Parameters:
camera Pointer to the camera structure
p Homogeneous image/camera point coordinates (input/output)
Given the homogeneous coordinates of an image point p, back-projects the point into the scene, so that the output point is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected point is chosen to lie on the plane Z=1. The operation is performed in-place in the vector p.

This is a macro call to gan_camera_backproject_point_q().

Returns:
GAN_TRUE on successfully computing scene coordinates of point, GAN_FALSE on failure.
See also:
gan_camera_backproject_point_q().

Gan_Bool gan_camera_backproject_point_q const Gan_Camera camera,
Gan_Vector3 p,
Gan_Vector3 X
 

Macro: Back-projects an image point into the scene.

Parameters:
camera Pointer to the camera structure
p Pointer to homogeneous image coordinates of the point
X Pointer to the output 3D point camera-centred coordinates
Given the homogeneous coordinates of an image point p, back-projects the point into the scene, so that the output point X is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected point is chosen to lie on the plane Z=1.

Implemented as a macro call to gan_camera_backproject_point().

Returns:
GAN_TRUE on successfully computing scene coordinates of point GAN_FALSE on failure.
See also:
gan_camera_backproject_line_q(), gan_camera_project_point_q() gan_camera_backproject_point_i().

Gan_Bool gan_camera_build_affine Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0,
double  skew,
double  kyx
 

Builds a structure representing a affine camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
skew Affine off-diagonal component xy
kyx Affine off-diagonal component yx
Constructs a structure representing a camera, under the affine pinhole camera model. This is the double precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_affine().

Gan_Bool gan_camera_build_cubic_Bspline Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0,
double  skew,
double  kyx,
double  kzx,
double  kzy,
Gan_Vector2  weight[1+(1<< 4)][1+(1<< 4)],
Gan_CubicBSplineSupport support
 

Builds a structure representing a cubic B-spline mesh.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
skew Skew coefficient (xy element of camera matrix)
kyx Element of camera matrix at position YX
kzx Element of camera matrix at position ZX
kzy Element of camera matrix at position ZY
weight Array of B-spline basis function weights
support Pointer to support structure for back-projection
Constructs a structure representing a camera, under the model that the distortion follows a B-spline mesh.

NB allocation/freeing of the weight and support arrays should be handled by calling function!

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_cubic_Bspline().

Gan_Bool gan_camera_build_cubic_Bspline_inv Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0,
double  skew,
double  kyx,
double  kzx,
double  kzy,
Gan_Vector2  weight[1+(1<< 4)][1+(1<< 4)],
Gan_CubicBSplineSupport support
 

Builds a structure representing an inverse cubic B-spline mesh.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
skew Skew coefficient (xy element of camera matrix)
kyx Element of camera matrix at position YX
kzx Element of camera matrix at position ZX
kzy Element of camera matrix at position ZY
weight Array of B-spline basis function weights
support Pointer to support structure for projection
Constructs a structure representing a camera, under the model that the inverse distortion follows a B-spline mesh.

NB allocation/freeing of the weight and support arrays should be handled by calling function!

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_cubic_Bspline_inv().

Gan_Bool gan_camera_build_equi_solid_angle Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0
 

Builds a structure representing a equi-solid angle camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
Constructs a structure representing a camera, under the equi-solid angle camera model. This is the double precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_equi_solid_angle().

Gan_Bool gan_camera_build_equidistant Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0
 

Builds a structure representing a equidistant camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
Constructs a structure representing a camera, under the equidistant camera model. This is the double precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_equidistant().

Gan_Bool gan_camera_build_linear Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0
 

Builds a structure representing a linear camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
Constructs a structure representing a camera, under the linear pinhole camera model. This is the double precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_linear().

Gan_Bool gan_camera_build_radial_distortion_1 Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0,
double  K1
 

Builds a structure representing a non-linear camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
K1 Radial distortion parameter
Constructs a structure representing a camera, under a non-linear camera model with one parameter of radial distortion. This is the double precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_radial_distortion_1().

Gan_Bool gan_camera_build_radial_distortion_1_inv Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0,
double  K1
 

Builds a structure representing a non-linear camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
K1 Radial distortion parameter
Constructs a structure representing a camera, under an inverse non-linear camera model with one parameter of radial distortion, wherein the model is applied to the distorted image to recover the undistorted image. This is the double precision version.

Returns:
GAN_TRUE on successfully building camera structure, or GAN_FALSE on failure.
See also:
gan_cameraf_build_radial_distortion_1_inv().

Gan_Bool gan_camera_build_radial_distortion_2 Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0,
double  K1,
double  K2
 

Builds a structure representing a non-linear camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
K1 First radial distortion parameter
K2 Second radial distortion parameter
Constructs a structure representing a camera, under a non-linear camera model with two parameters of radial distortion. This is the double precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_radial_distortion_2().

Gan_Bool gan_camera_build_radial_distortion_3 Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0,
double  K1,
double  K2,
double  K3
 

Builds a structure representing a non-linear camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
K1 First radial distortion parameter
K2 Second radial distortion parameter
K3 Third radial distortion parameter
Constructs a structure representing a camera, under a non-linear camera model with three parameters of radial distortion. This is the double precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_radial_distortion_3().

Gan_Bool gan_camera_build_sine_law Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0
 

Builds a structure representing a sine law camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
Constructs a structure representing a camera, under the sine law camera model. This is the double precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_sine_law().

Gan_Bool gan_camera_build_stereographic Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0
 

Builds a structure representing a stereographic camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
Constructs a structure representing a camera, under the stereographic camera model. This is the double precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_stereographic().

Gan_Bool gan_camera_build_va Gan_Camera camera,
Gan_CameraType  type,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0,
  ...
 

Constructs a structure representing a camera.

Parameters:
camera Pointer to the camera structure to be filled
type Type of camera e.g. GAN_LINEAR_CAMERA
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
... Extra arguments depending on camera type
Returns:
GAN_TRUE on successfully building camera structure, GAN_FALSE on failure.
Constructs a structure representing a camera.

See also:
gan_cameraf_build_va().

Gan_Bool gan_camera_build_xy_distortion_4 Gan_Camera camera,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0,
double  cxx,
double  cxy,
double  cyx,
double  cyy
 

Builds a structure representing a xy-distortion camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
cxx Coefficient of x-distortion in x-direction
cxy Coefficient of y-distortion in x-direction
cyx Coefficient of x-distortion in y-direction
cyy Coefficient of y-distortion in y-direction
Constructs a structure representing a camera, under the model that the distortion has independent quadratic x & y components in both x & y directions. This model is used in inverted form by 3D Equalizer. This is the double precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_xy_distortion_4().

Gan_Matrix33 gan_camera_fill_fullmatrix_s const Gan_Camera camera  ) 
 

Fills and returns a full 3x3 camera matrix.

Parameters:
camera Pointer to the camera structure to be read
Fills and returns a 3x3 camera matrix using the linear parameters of the provided camera.

Double precision version of gan_cameraf_fill_fullmatrix_s().

Returns:
The filled 3x3 matrix.

Gan_SquMatrix33 gan_camera_fill_matrix_s const Gan_Camera camera  ) 
 

Fills and returns a 3x3 upper triangular camera matrix.

Parameters:
camera Pointer to the camera structure to be read
Fills and returns a 3x3 upper triangular camera matrix using the linear parameters of the provided camera. Gandalf only stores lower triangular matrices explicitly, so the transpose camera matrix is actually returned.

Double precision version of gan_cameraf_fill_matrix_s().

Returns:
The filled 3x3 upper triangular matrix.

Gan_Bool gan_camera_identical const Gan_Camera camera1,
const Gan_Camera pcamera2
 

Checks whether two cameras have identical parameters.

Parameters:
camera1 Pointer to first camera
camera2 Pointer to second camera
Returns:
GAN_TRUE if they have the same parameters, GAN_FALSE if they don't.

Gan_Bool gan_camera_internalize Gan_Camera camera  ) 
 

Builds the internals of a camera.

Parameters:
camera Pointer to the camera structure to be filled
Returns:
GAN_TRUE on successfully internalising camera structure, GAN_FALSE on failure.
Builds the internal thresholds and callbacks of a camera given that the type and parameters have already been set.

See also:
gan_cameraf_internalize().

Gan_Bool gan_camera_project_line_i const Gan_Camera camera,
Gan_Vector3 L
 

Macro: Projects a line from the scene onto the image.

Parameters:
camera Pointer to the camera structure
L Pointer to the line coordinates (input/output)
Given a 3D line L in homogeneous camera coordinates so that the line actually represents a plane $L.X=0$ through the optical centre, projects L onto the image according to the parameters of the given camera. The operation is performed in-place in the vector L.

This is a macro call to gan_camera_project_line_q().

Returns:
GAN_TRUE on successfully computing image coordinates of line, GAN_FALSE on failure.
See also:
gan_camera_project_line_q().

Gan_Bool gan_camera_project_line_q const Gan_Camera camera,
Gan_Vector3 L,
Gan_Vector3 l
 

Macro: Projects a line from the scene onto the image.

Parameters:
camera Pointer to the camera structure
L Pointer to the 3D scene line in camera-centred
l Pointer to the output homogeneous image coordinate vector
Given a 3D line L in homogeneous camera coordinates so that the line actually represents a plane $L.X=0$ through the optical centre, projects L onto the image according to the parameters of the given camera.

Returns:
GAN_TRUE on successfully computing the image coordinates of the line, GAN_FALSE on failure.
See also:
gan_camera_project_point_q(), gan_camera_backproject_line_q() gan_camera_project_line_i().

Gan_Bool gan_camera_project_point const Gan_Camera camera,
Gan_Vector3 X,
Gan_Vector3 p,
int *  error_code
 

Macro: Projects a point from the scene onto the image.

Parameters:
camera Pointer to the camera structure
X Pointer to the 3D scene point in camera-centred coordinates
p Pointer to the output homogeneous image coordinate vector
error_code Pointer to error code or NULL
Given a 3D point X in camera coordinates (X/Y axes parallel to image x/y coordinates but in opposite directions, Z axis out into the world along the optic axis, origin at optical centre), projects X onto the image according to the parameters of the given camera.

Returns:
GAN_TRUE on successfully computing image coordinates of point, GAN_FALSE on failure.
See also:
gan_camera_project_point_gen().

Gan_Bool gan_camera_project_point_gen const Gan_Camera camera,
Gan_Vector3 X,
Gan_Vector3 p,
Gan_PositionState Xpprev,
Gan_Matrix22 HX,
Gan_Camera  HC[2],
int *  error_code
 

Macro: Projects a point from the scene onto the image.

Parameters:
camera Pointer to the camera structure
X Pointer to the 3D scene point in camera-centred coordinates
p Pointer to the output homogeneous image coordinate vector
Xpprev Pointer to previous input/output position or NULL
HX Jacobian of image coordinates w.r.t camera coordinates or NULL
HC Jacobian of image coordinates w.r.t camera parameters or NULL
error_code Pointer to error code or NULL
Given a 3D point X in camera coordinates (X/Y axes parallel to image x/y coordinates but in opposite directions, Z axis out into the world along the optic axis, origin at optical centre), projects X onto the image according to the parameters of the given camera.

This function also computes the Jacobians of the projection w.r.t. the x & y coordinates of the camera coordinates X and the camera parameters in the matrix HX and the array HC, which may be passed as NULL if the Jacobians are not required.

Returns:
GAN_TRUE on successfully computing image coordinates of point, GAN_FALSE on failure.
See also:
gan_camera_project_point_q().

Gan_Bool gan_camera_project_point_i const Gan_Camera camera,
Gan_Vector3 X
 

Macro: Projects a point from the scene onto the image.

Parameters:
camera Pointer to the camera structure
X Pointer to the 3D scene/image point (input/output)
Given a 3D point X in camera coordinates (X/Y axes parallel to image x/y coordinates but in opposite directions, Z axis out into the world along the optic axis, origin at optical centre), projects X onto the image according to the parameters of the given camera. The operation is performed in-place in the vector X.

This is a macro call to gan_camera_project_point_q().

Returns:
GAN_TRUE on successfully computing image coordinates of point, GAN_FALSE on failure.
See also:
gan_camera_project_point_q().

Gan_Bool gan_camera_project_point_q const Gan_Camera camera,
Gan_Vector3 X,
Gan_Vector3 p
 

Macro: Projects a point from the scene onto the image.

Parameters:
camera Pointer to the camera structure
X Pointer to the 3D scene point in camera-centred coordinates
p Pointer to the output homogeneous image coordinate vector
Given a 3D point X in camera coordinates (X/Y axes parallel to image x/y coordinates but in opposite directions, Z axis out into the world along the optic axis, origin at optical centre), projects X onto the image according to the parameters of the given camera.

Implemented as a macro call to gan_camera_project_point_gen().

Returns:
GAN_TRUE on successfully computing image coordinates of point, GAN_FALSE on failure.
See also:
gan_camera_project_line_q(), gan_camera_backproject_point_q() gan_camera_project_point_i().

Gan_Bool gan_camera_remove_distortion const Gan_Camera camera,
Gan_Vector3 p,
Gan_Vector3 pu,
int *  error_code
 

Macro: Removes non-linear distortion from an image point.

Parameters:
camera Pointer to the camera structure
p Pointer to the distorted image point coordinates
pu Pointer to the output image point without distortion
error_code Pointer to error code or NULL
Given a homogeneous 2D image point p with non-linear distortion, removes the distortion from the coordinates, writing the result into the pointer pu. The camera parameters are read from the given camera.
Returns:
GAN_TRUE on successfully removing the distortion, GAN_FALSE on failure.
See also:
gan_camera_add_distortion().

Gan_Bool gan_camera_remove_distortion_gen const Gan_Camera camera,
Gan_Vector3 p,
Gan_Vector3 pu,
Gan_PositionState ppuprev,
int *  error_code
 

Macro: Removes non-linear distortion from an image point.

Parameters:
camera Pointer to the camera structure
p Pointer to the distorted image point coordinates
pu Pointer to the output image point without distortion
ppuprev Pointer to previous input/output position or NULL
error_code Pointer to error code or NULL
Given a homogeneous 2D image point p with non-linear distortion, removes the distortion from the coordinates, writing the result into the pointer pu. The camera parameters are read from the given camera.
Returns:
GAN_TRUE on successfully removing the distortion, GAN_FALSE on failure.
See also:
gan_camera_add_distortion().

Gan_Bool gan_camera_remove_distortion_i const Gan_Camera camera,
Gan_Vector3 p
 

Macro: Removes non-linear distortion from an image point.

Parameters:
camera Pointer to the camera structure
p Pointer to the image point coordinates (input/output)
Given a homogeneous 2D image point p with non-linear distortion, removes the distortion from the coordinates, overwriting p with the result. The camera parameters are read from the given camera.

This is a macro call to gan_camera_remove_distortion_q().

Returns:
GAN_TRUE on successfully removing the distortion, GAN_FALSE on failure.
See also:
gan_camera_remove_distortion_q().

Gan_Bool gan_camera_remove_distortion_q const Gan_Camera camera,
Gan_Vector3 p,
Gan_Vector3 pu
 

Macro: Removes non-linear distortion from an image point.

Parameters:
camera Pointer to the camera structure
p Pointer to the distorted image point coordinates
pu Pointer to the output image point without distortion
Given a homogeneous 2D image point p with non-linear distortion, removes the distortion from the coordinates, overwriting p with the result. The camera parameters are read from the given camera.

This is a macro call to gan_camera_remove_distortion_q().

Returns:
GAN_TRUE on successfully removing the distortion, GAN_FALSE on failure.
See also:
gan_camera_remove_distortion_q().

Gan_Bool gan_camera_set_common_fields Gan_Camera camera,
Gan_CameraType  type,
double  zh,
double  fx,
double  fy,
double  x0,
double  y0
 

Set common fields of camera structure.

Not a user function.

Gan_Bool gan_cameraf_add_distortion const Gan_Camera_f camera,
Gan_Vector3_f pu,
Gan_Vector3_f p,
int *  error_code
 

Macro: Applies non-linear distortion to an image point.

Parameters:
camera Pointer to the camera structure
pu Pointer to the image point coordinates without distortion
p Pointer to the output distorted image point coordinates
error_code Pointer to error code or NULL
Given a homogeneous 2D image point pu assumed to be the linear projection of a scene point (i.e. having no non-linear distortion), adds distortion to the coordinates, writing the result into the pointer p. The camera parameters are read from the given camera.

Returns:
GAN_TRUE on successfully applying the distortion, GAN_FALSE on failure.
See also:
gan_cameraf_remove_distortion().

Gan_Bool gan_cameraf_add_distortion_gen const Gan_Camera_f camera,
Gan_Vector3_f pu,
Gan_Vector3_f p,
Gan_PositionState_f pupprev,
int *  error_code
 

Macro: Applies non-linear distortion to an image point.

Parameters:
camera Pointer to the camera structure
pu Pointer to the image point coordinates without distortion
p Pointer to the output distorted image point coordinates
pupprev Pointer to previous input/output position or NULL
error_code Pointer to error code or NULL
Given a homogeneous 2D image point pu assumed to be the linear projection of a scene point (i.e. having no non-linear distortion), adds distortion to the coordinates, writing the result into the pointer p. The camera parameters are read from the given camera.

Returns:
GAN_TRUE on successfully applying the distortion, GAN_FALSE on failure.
See also:
gan_cameraf_remove_distortion_gen().

Gan_Bool gan_cameraf_add_distortion_i const Gan_Camera_f camera,
Gan_Vector3_f p
 

Macro: Applies non-linear distortion to an image point.

Parameters:
camera Pointer to the camera structure
p Pointer to the image point coordinates (input/output)
Given a homogeneous 2D image point p assumed to be the linear projection of a scene point (i.e. having no non-linear distortion), adds distortion to the coordinates, overwriting the vector p with the result. The camera parameters are read from the given camera.

This is a macro call to gan_cameraf_add_distortion_q().

Returns:
GAN_TRUE on successfully applying the distortion, GAN_FALSE on failure.
See also:
gan_cameraf_add_distortion_q().

Gan_Bool gan_cameraf_add_distortion_q const Gan_Camera_f camera,
Gan_Vector3_f pu,
Gan_Vector3_f p
 

Macro: Applies non-linear distortion to an image point.

Parameters:
camera Pointer to the camera structure
pu Pointer to the image point coordinates without distortion
p Pointer to the output distorted image point coordinates
Given a homogeneous 2D image point p assumed to be the linear projection of a scene point (i.e. having no non-linear distortion), adds distortion to the coordinates, overwriting the vector p with the result. The camera parameters are read from the given camera.

This is a macro call to gan_cameraf_add_distortion_q().

Returns:
GAN_TRUE on successfully applying the distortion, GAN_FALSE on failure.
See also:
gan_cameraf_add_distortion_q().

Gan_Bool gan_cameraf_backproject_line_i const Gan_Camera_f camera,
Gan_Vector3_f l
 

Macro: Back-projects an image line into the scene.

Parameters:
camera Pointer to the camera structure
l Pointer to image coordinates of the line (input/output)
Given the homogeneous coordinates of an image line l, back-projects the line into the scene, so that the output line is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected line actually represents a plane through the origin (optical centre). The operation is performed in-place in the vector l.

This is a macro call to gan_cameraf_backproject_line_q().

Returns:
GAN_TRUE on successfully computing scene coordinates of line, GAN_FALSE on failure.
See also:
gan_cameraf_backproject_line_q(), gan_cameraf_project_line_q() gan_cameraf_backproject_line_i().

Gan_Bool gan_cameraf_backproject_line_q const Gan_Camera_f camera,
Gan_Vector3_f l,
Gan_Vector3_f L
 

Macro: Back-projects an image line into the scene.

Parameters:
camera Pointer to the camera structure
l Pointer to homogeneous image coordinates of the line
L Pointer to the output 3D line camera-centred coordinates
Given the homogeneous coordinates of an image line l, back-projects the line into the scene, so that the output line L is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected line actually represents a plane $L.X=0$ through the origin (optical centre).

Returns:
GAN_TRUE on successfully computing scene coordinates of line, GAN_FALSE on failure.
See also:
gan_cameraf_backproject_point_q(), gan_cameraf_project_line_q() gan_cameraf_backproject_line_i().

Gan_Bool gan_cameraf_backproject_point const Gan_Camera_f camera,
Gan_Vector3_f p,
Gan_Vector3_f X,
int *  error_code
 

Macro: Back-projects an image point into the scene.

Parameters:
camera Pointer to the camera structure
p Pointer to homogeneous image coordinates of the point
X Pointer to the output 3D point camera-centred coordinates
error_code Pointer to error code or NULL
Given the homogeneous coordinates of an image point p, back-projects the point into the scene, so that the output point X is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected point is chosen to lie on the plane Z=1.

Returns:
GAN_TRUE on successfully computing scene coordinates of point, GAN_FALSE on failure.
See also:
gan_cameraf_backproject_line_q(), gan_cameraf_project_point_q() gan_cameraf_backproject_point_i().

Gan_Bool gan_cameraf_backproject_point_gen const Gan_Camera_f camera,
Gan_Vector3_f p,
Gan_Vector3_f X,
Gan_PositionState_f pXprev,
int *  error_code
 

Macro: Back-projects an image point into the scene.

Parameters:
camera Pointer to the camera structure
p Pointer to homogeneous image coordinates of the point
X Pointer to the output 3D point camera-centred coordinates
pXprev Pointer to previous input/output position or NULL
error_code Pointer to error code or NULL
Given the homogeneous coordinates of an image point p, back-projects the point into the scene, so that the output point X is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected point is chosen to lie on the plane Z=1.

Returns:
GAN_TRUE on successfully computing scene coordinates of point, GAN_FALSE on failure.
See also:
gan_cameraf_backproject_line_q(), gan_cameraf_project_point_q() gan_cameraf_backproject_point_i().

Gan_Bool gan_cameraf_backproject_point_i const Gan_Camera_f camera,
Gan_Vector3_f p
 

Macro: Back-projects an image point into the scene.

Parameters:
camera Pointer to the camera structure
p Homogeneous image/camera point coordinates (input/output)
Given the homogeneous coordinates of an image point p, back-projects the point into the scene, so that the output point is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected point is chosen to lie on the plane Z=1. The operation is performed in-place in the vector p.

This is a macro call to gan_cameraf_backproject_point_q().

Returns:
GAN_TRUE on successfully computing scene coordinates of point, GAN_FALSE on failure.
See also:
gan_cameraf_backproject_point_q().

Gan_Bool gan_cameraf_backproject_point_q const Gan_Camera_f camera,
Gan_Vector3_f p,
Gan_Vector3_f X
 

Macro: Back-projects an image point into the scene.

Parameters:
camera Pointer to the camera structure
p Pointer to homogeneous image coordinates of the point
X Pointer to the output 3D point camera-centred coordinates
Given the homogeneous coordinates of an image point p, back-projects the point into the scene, so that the output point X is in camera-centred 3D coordinates, defined such that the scene X/Y axes are parallel to the image x/y coordinates but in opposite directions, the Z axis points out into the world along the optic axis, and the origin is at the optical centre. The backprojected point is chosen to lie on the plane Z=1.

Implemented as a macro call to gan_cameraf_backproject_point().

Returns:
GAN_TRUE on successfully computing scene coordinates of point GAN_FALSE on failure.
See also:
gan_cameraf_backproject_line_q(), gan_cameraf_project_point_q() gan_cameraf_backproject_point_i().

Gan_Bool gan_cameraf_build_affine Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0,
float  skew,
float  kyx
 

Builds a structure representing a affine camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
skew Affine off-diagonal component xy
kyx Affine off-diagonal component yx
Constructs a structure representing a camera, under the affine pinhole camera model. This is the single precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_cameraf_build_affine().

Gan_Bool gan_cameraf_build_cubic_Bspline Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0,
float  skew,
float  kyx,
float  kzx,
float  kzy,
Gan_Vector2_f  weight[1+(1<< 4)][1+(1<< 4)],
Gan_CubicBSplineSupportF support
 

Builds a structure representing a cubic B-spline mesh.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
skew Skew coefficient (xy element of camera matrix)
kyx Element of camera matrix at position YX
kzx Element of camera matrix at position ZX
kzy Element of camera matrix at position ZY
weight Array of B-spline basis function weights
support Pointer to support structure for projection
Constructs a structure representing a camera, under the model that the distortion follows a B-spline mesh.

This is the single precision version.

NB allocation/freeing of the weight and support arrays should be handled by calling function!

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_camera_build_cubic_Bspline().

Gan_Bool gan_cameraf_build_cubic_Bspline_inv Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0,
float  skew,
float  kyx,
float  kzx,
float  kzy,
Gan_Vector2_f  weight[1+(1<< 4)][1+(1<< 4)],
Gan_CubicBSplineSupportF support
 

Builds a structure representing an inverse cubic B-spline mesh.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
skew Skew coefficient (xy element of camera matrix)
kyx Element of camera matrix at position YX
kzx Element of camera matrix at position ZX
kzy Element of camera matrix at position ZY
weight Array of B-spline basis function weights
support Pointer to support structure for projection
Constructs a structure representing a camera, under the model that the distortion follows a B-spline mesh.

This is the single precision version.

NB allocation/freeing of the weight and support arrays should be handled by calling function!

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_camera_build_cubic_Bspline_inv().

Gan_Bool gan_cameraf_build_equi_solid_angle Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0
 

Builds a structure representing a equi-solid angle camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
Constructs a structure representing a camera, under the equi-solid angle camera model. This is the single precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_camera_build_equi_solid_angle().

Gan_Bool gan_cameraf_build_equidistant Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0
 

Builds a structure representing a equidistant camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
Constructs a structure representing a camera, under the equidistant camera model. This is the single precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_camera_build_equidistant().

Gan_Bool gan_cameraf_build_linear Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0
 

Builds a structure representing a linear camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
Constructs a structure representing a camera, under the linear pinhole camera model. This is the single precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_camera_build_linear().

Gan_Bool gan_cameraf_build_radial_distortion_1 Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0,
float  K1
 

Builds a structure representing a non-linear camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
K1 Radial distortion parameter
Constructs a structure representing a camera, under a non-linear camera model with one parameter of radial distortion. This is the single precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_camera_build_radial_distortion_1().

Gan_Bool gan_cameraf_build_radial_distortion_1_inv Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0,
float  K1
 

Builds a structure representing a non-linear camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
K1 Radial distortion parameter
Constructs a structure representing a camera, under an inverse non-linear camera model with one parameter of radial distortion, wherein the model is applied to the distorted image to recover the undistorted image. This is the double precision version.

Returns:
GAN_TRUE on successfully building camera structure, or GAN_FALSE on failure.
See also:
gan_cameraf_build_radial_distortion_1_inv(),

Gan_Bool gan_cameraf_build_radial_distortion_2 Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0,
float  K1,
float  K2
 

Builds a structure representing a non-linear camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
K1 First radial distortion parameter
K2 Second radial distortion parameter
Constructs a structure representing a camera, under a non-linear camera model with two parameters of radial distortion. This is the single precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_camera_build_radial_distortion_2().

Gan_Bool gan_cameraf_build_radial_distortion_3 Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0,
float  K1,
float  K2,
float  K3
 

Builds a structure representing a non-linear camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
K1 First radial distortion parameter
K2 Second radial distortion parameter
K3 Third radial distortion parameter
Constructs a structure representing a camera, under a non-linear camera model with three parameters of radial distortion. This is the single precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_camera_build_radial_distortion_3().

Gan_Bool gan_cameraf_build_sine_law Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0
 

Builds a structure representing a sine law camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
Constructs a structure representing a camera, under the sine law camera model. This is the single precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_camera_build_sine_law().

Gan_Bool gan_cameraf_build_stereographic Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0
 

Builds a structure representing a stereographic camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
Constructs a structure representing a camera, under the stereographic camera model. This is the single precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_camera_build_stereographic().

Gan_Bool gan_cameraf_build_va Gan_Camera_f camera,
Gan_CameraType  type,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0,
  ...
 

Constructs a structure representing a camera.

Parameters:
camera Pointer to the camera structure to be filled
type Type of camera e.g. GAN_LINEAR_CAMERA
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
... Extra arguments depending on camera type
Returns:
GAN_TRUE on successfully building camera structure, GAN_FALSE on failure.
Constructs a structure representing a camera.

See also:
gan_camera_build_va().

Gan_Bool gan_cameraf_build_xy_distortion_4 Gan_Camera_f camera,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0,
float  cxx,
float  cxy,
float  cyx,
float  cyy
 

Builds a structure representing a xy-distortion camera.

Parameters:
camera Pointer to the camera structure to be filled
zh Third homogeneous image coordinate
fx Focal distance measured in x-pixels
fy Focal distance measured in y-pixels
x0 x-coordinate of image centre
y0 y-coordinate of image centre
cxx Coefficient of x-distortion in x-direction
cxy Coefficient of y-distortion in x-direction
cyx Coefficient of x-distortion in y-direction
cyy Coefficient of y-distortion in y-direction
Constructs a structure representing a camera, under the model that the distortion has independent quadratic x & y components in both x & y directions. This model is used in inverted form by 3D Equalizer. This is the single precision version.

Returns:
GAN_TRUE on successfully building the camera structure, GAN_FALSE on failure.
See also:
gan_camera_build_xy_distortion_4().

Gan_Matrix33_f gan_cameraf_fill_fullmatrix_s const Gan_Camera_f camera  ) 
 

Fills and returns a full 3x3 camera matrix.

Parameters:
camera Pointer to the camera structure to be read
Fills and returns a 3x3 camera matrix using the linear parameters of the provided camera.

Single precision version of gan_camera_fill_fullmatrix_s().

Returns:
The filled 3x3 matrix.

Gan_SquMatrix33_f gan_cameraf_fill_matrix_s const Gan_Camera_f camera  ) 
 

Fills and returns a 3x3 upper triangular camera matrix.

Parameters:
camera Pointer to the camera structure to be read
Fills and returns a 3x3 upper triangular camera matrix using the linear parameters of the provided camera. Gandalf only stores lower triangular matrices explicitly, so the transpose camera matrix is actually returned.

Single precision version of gan_camera_fill_matrix_s().

Returns:
The filled 3x3 upper triangular matrix.

Gan_Bool gan_cameraf_identical const Gan_Camera_f camera1,
const Gan_Camera_f pcamera2
 

Checks whether two cameras have identical parameters.

Parameters:
camera1 Pointer to first camera
camera2 Pointer to second camera
Returns:
GAN_TRUE if they have the same parameters, GAN_FALSE if they don't.

Gan_Bool gan_cameraf_internalize Gan_Camera_f camera  ) 
 

Builds the internals of a camera.

Parameters:
camera Pointer to the camera structure to be filled
Returns:
GAN_TRUE on successfully internalising camera structure, GAN_FALSE on failure.
Builds the internal thresholds and callbacks of a camera given that the type and parameters have already been set.

See also:
gan_camera_internalize().

Gan_Bool gan_cameraf_project_line_i const Gan_Camera_f camera,
Gan_Vector3_f L
 

Macro: Projects a line from the scene onto the image.

Parameters:
camera Pointer to the camera structure
L Pointer to the line coordinates (input/output)
Given a 3D line L in homogeneous camera coordinates so that the line actually represents a plane $L.X=0$ through the optical centre, projects L onto the image according to the parameters of the given camera. The operation is performed in-place in the vector L.

This is a macro call to gan_cameraf_project_line_q().

Returns:
GAN_TRUE on successfully computing image coordinates of line, GAN_FALSE on failure.
See also:
gan_cameraf_project_line_q().

Gan_Bool gan_cameraf_project_line_q const Gan_Camera_f camera,
Gan_Vector3_f L,
Gan_Vector3_f l
 

Macro: Projects a line from the scene onto the image.

Parameters:
camera Pointer to the camera structure
L Pointer to the 3D scene line in camera-centred
l Pointer to the output homogeneous image coordinate vector
Given a 3D line L in homogeneous camera coordinates so that the line actually represents a plane $L.X=0$ through the optical centre, projects L onto the image according to the parameters of the given camera.

Returns:
GAN_TRUE on successfully computing the image coordinates of the line, GAN_FALSE on failure.
See also:
gan_cameraf_project_point_q(), gan_cameraf_backproject_line_q() gan_cameraf_project_line_i().

Gan_Bool gan_cameraf_project_point const Gan_Camera_f camera,
Gan_Vector3_f X,
Gan_Vector3_f p,
int *  error_code
 

Macro: Projects a point from the scene onto the image.

Parameters:
camera Pointer to the camera structure
X Pointer to the 3D scene point in camera-centred coordinates
p Pointer to the output homogeneous image coordinate vector
error_code Pointer to error code or NULL
Given a 3D point X in camera coordinates (X/Y axes parallel to image x/y coordinates but in opposite directions, Z axis out into the world along the optic axis, origin at optical centre), projects X onto the image according to the parameters of the given camera.

Returns:
GAN_TRUE on successfully computing image coordinates of point, GAN_FALSE on failure.
See also:
gan_cameraf_project_point_gen().

Gan_Bool gan_cameraf_project_point_gen const Gan_Camera_f camera,
Gan_Vector3_f X,
Gan_Vector3_f p,
Gan_PositionState_f Xpprev,
Gan_Matrix22_f HX,
Gan_Camera_f  HC[2],
int *  error_code
 

Macro: Projects a point from the scene onto the image.

Parameters:
camera Pointer to the camera structure
X Pointer to the 3D scene point in camera-centred coordinates
p Pointer to the output homogeneous image coordinate vector
Xpprev Pointer to previous input/output position or NULL
HX Jacobian of image coordinates w.r.t camera coordinates or NULL
HC Jacobian of image coordinates w.r.t camera parameters or NULL
error_code Pointer to error code or NULL
Given a 3D point X in camera coordinates (X/Y axes parallel to image x/y coordinates but in opposite directions, Z axis out into the world along the optic axis, origin at optical centre), projects X onto the image according to the parameters of the given camera.

This function also computes the Jacobians of the projection w.r.t. the x & y coordinates of the camera coordinates X and the camera parameters in the matrix HX and the array HC, which may be passed as NULL if the Jacobians are not required.

Returns:
GAN_TRUE on successfully computing image coordinates of point, GAN_FALSE on failure.
See also:
gan_cameraf_project_point_q().

Gan_Bool gan_cameraf_project_point_i const Gan_Camera_f camera,
Gan_Vector3_f X
 

Macro: Projects a point from the scene onto the image.

Parameters:
camera Pointer to the camera structure
X Pointer to the 3D scene/image point (input/output)
Given a 3D point X in camera coordinates (X/Y axes parallel to image x/y coordinates but in opposite directions, Z axis out into the world along the optic axis, origin at optical centre), projects X onto the image according to the parameters of the given camera. The operation is performed in-place in the vector X.

This is a macro call to gan_cameraf_project_point_q().

Returns:
GAN_TRUE on successfully computing image coordinates of point, GAN_FALSE on failure.
See also:
gan_cameraf_project_point_q().

Gan_Bool gan_cameraf_project_point_q const Gan_Camera_f camera,
Gan_Vector3_f X,
Gan_Vector3_f p
 

Macro: Projects a point from the scene onto the image.

Parameters:
camera Pointer to the camera structure
X Pointer to the 3D scene point in camera-centred coordinates
p Pointer to the output homogeneous image coordinate vector
Given a 3D point X in camera coordinates (X/Y axes parallel to image x/y coordinates but in opposite directions, Z axis out into the world along the optic axis, origin at optical centre), projects X onto the image according to the parameters of the given camera.

Implemented as a macro call to gan_cameraf_project_point_gen().

Returns:
GAN_TRUE on successfully computing image coordinates of point, GAN_FALSE on failure.
See also:
gan_cameraf_project_line_q(), gan_cameraf_backproject_point_q() gan_cameraf_project_point_i().

Gan_Bool gan_cameraf_remove_distortion const Gan_Camera_f camera,
Gan_Vector3_f p,
Gan_Vector3_f pu,
int *  error_code
 

Macro: Removes non-linear distortion from an image point.

Parameters:
camera Pointer to the camera structure
p Pointer to the distorted image point coordinates
pu Pointer to the output image point without distortion
error_code Pointer to error code or NULL
Given a homogeneous 2D image point p with non-linear distortion, removes the distortion from the coordinates, writing the result into the pointer pu. The camera parameters are read from the given camera.
Returns:
GAN_TRUE on successfully removing the distortion, GAN_FALSE on failure.
See also:
gan_cameraf_add_distortion().

Gan_Bool gan_cameraf_remove_distortion_gen const Gan_Camera_f camera,
Gan_Vector3_f p,
Gan_Vector3_f pu,
Gan_PositionState_f ppuprev,
int *  error_code
 

Macro: Removes non-linear distortion from an image point.

Parameters:
camera Pointer to the camera structure
p Pointer to the distorted image point coordinates
pu Pointer to the output image point without distortion
ppuprev Pointer to previous input/output position or NULL
error_code Pointer to error code or NULL
Given a homogeneous 2D image point p with non-linear distortion, removes the distortion from the coordinates, writing the result into the pointer pu. The camera parameters are read from the given camera.
Returns:
GAN_TRUE on successfully removing the distortion, GAN_FALSE on failure.
See also:
gan_cameraf_add_distortion().

Gan_Bool gan_cameraf_remove_distortion_i const Gan_Camera_f camera,
Gan_Vector3_f p
 

Macro: Removes non-linear distortion from an image point.

Parameters:
camera Pointer to the camera structure
p Pointer to the image point coordinates (input/output)
Given a homogeneous 2D image point p with non-linear distortion, removes the distortion from the coordinates, overwriting p with the result. The camera parameters are read from the given camera.

This is a macro call to gan_cameraf_remove_distortion_q().

Returns:
GAN_TRUE on successfully removing the distortion, GAN_FALSE on failure.
See also:
gan_cameraf_remove_distortion_q().

Gan_Bool gan_cameraf_remove_distortion_q const Gan_Camera_f camera,
Gan_Vector3_f p,
Gan_Vector3_f pu
 

Macro: Removes non-linear distortion from an image point.

Parameters:
camera Pointer to the camera structure
p Pointer to the distorted image point coordinates
pu Pointer to the output image point without distortion
Given a homogeneous 2D image point p with non-linear distortion, removes the distortion from the coordinates, overwriting p with the result. The camera parameters are read from the given camera.

This is a macro call to gan_cameraf_remove_distortion_q().

Returns:
GAN_TRUE on successfully removing the distortion, GAN_FALSE on failure.
See also:
gan_cameraf_remove_distortion_q().

Gan_Bool gan_cameraf_set_common_fields Gan_Camera_f camera,
Gan_CameraType  type,
float  zh,
float  fx,
float  fy,
float  x0,
float  y0
 

Set common fields of camera structure.

Not a user function.


Generated on Fri Mar 17 12:45:02 2006 by  doxygen 1.3.9.1