Main Page   Modules   Compound List   File List   Compound Members   File Members  

Camera geometric/photometric transformations
[Vision Package]


Compounds

struct  Gan_Camera
 Structure containing camera parameters in double precision. More...

struct  Gan_Camera_f
 Structure containing camera parameters in single precision. More...


Defines

#define CFX   camera->fx
#define CFY   camera->fy
#define CX0   camera->x0
#define CY0   camera->y0
#define CZH   camera->zh
#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 CK2   camera->nonlinear.radial2.K2
#define CK3   camera->nonlinear.radial3.K3
#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

Typedefs

typedef Gan_Camera Gan_Camera
 Structure containing camera parameters in double precision.

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
}
 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_set_gamma (Gan_Camera *camera, double gamma)
 Sets the gamma for images taken with this camera.

Gan_SquMatrix33 gan_camera_fill_matrix_s (Gan_Camera *camera)
 Fills and returns a 3x3 upper triangular camera matrix.

Gan_Bool gan_camera_project_point_gen (Gan_Camera *camera, Gan_Vector3 *X, Gan_Vector3 *p, 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 (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 (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 (Gan_Camera *camera, Gan_Vector3 *X)
 Macro: Projects a point from the scene onto the image.

Gan_Bool gan_camera_backproject_point (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 (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 (Gan_Camera *camera, Gan_Vector3 *p)
 Macro: Back-projects an image point into the scene.

Gan_Bool gan_camera_add_distortion (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 (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 (Gan_Camera *camera, Gan_Vector3 *p)
 Macro: Applies non-linear distortion to an image point.

Gan_Bool gan_camera_remove_distortion (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 (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 (Gan_Camera *camera, Gan_Vector3 *p)
 Macro: Removes non-linear distortion from an image point.

Gan_Bool gan_camera_project_line_q (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 (Gan_Camera *camera, Gan_Vector3 *L)
 Macro: Projects a line from the scene onto the image.

Gan_Bool gan_camera_backproject_line_q (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 (Gan_Camera *camera, Gan_Vector3 *l)
 Macro: Back-projects an image line into the scene.

Gan_Bool gan_cameraf_from_camera_q (Gan_Camera *camera, Gan_Camera_f *cameraf)
 Converts camera from double to single precision representation.

Gan_Bool gan_camera_from_cameraf_q (Gan_Camera_f *cameraf, Gan_Camera *camera)
 Converts camera from single to double precision representation.

Gan_Camera_f gan_cameraf_from_camera_s (Gan_Camera *camera)
 Converts camera from double to single precision representation.

Gan_Camera gan_camera_from_cameraf_s (Gan_Camera_f *cameraf)
 Converts camera from single to double precision representation.

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_set_gamma (Gan_Camera_f *camera, float gamma)
 Sets the gamma for images taken with this camera.

Gan_SquMatrix33_f gan_cameraf_fill_matrix_s (Gan_Camera_f *camera)
 Fills and returns a 3x3 upper triangular camera matrix.

Gan_Bool gan_cameraf_project_point_gen (Gan_Camera_f *camera, Gan_Vector3_f *X, Gan_Vector3_f *p, 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 (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 (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 (Gan_Camera_f *camera, Gan_Vector3_f *X)
 Macro: Projects a point from the scene onto the image.

Gan_Bool gan_cameraf_backproject_point (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 (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 (Gan_Camera_f *camera, Gan_Vector3_f *p)
 Macro: Back-projects an image point into the scene.

Gan_Bool gan_cameraf_add_distortion (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 (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 (Gan_Camera_f *camera, Gan_Vector3_f *p)
 Macro: Applies non-linear distortion to an image point.

Gan_Bool gan_cameraf_remove_distortion (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 (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 (Gan_Camera_f *camera, Gan_Vector3_f *p)
 Macro: Removes non-linear distortion from an image point.

Gan_Bool gan_cameraf_project_line_q (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 (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 (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 (Gan_Camera_f *camera, Gan_Vector3_f *l)
 Macro: Back-projects an image line into the scene.

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_Camera Gan_Camera
 

Structure containing camera parameters in double precision.

typedef struct Gan_Camera_f Gan_Camera_f
 

Structure containing camera parameters in single precision.


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


Function Documentation

Gan_Bool gan_camera_add_distortion 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_i 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 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 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 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 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 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_i 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 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_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 single precision version.

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

Gan_SquMatrix33 gan_camera_fill_matrix_s 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_q().

Returns:
The filled 3x3 upper triangular matrix.

Gan_Bool gan_camera_from_cameraf_q Gan_Camera_f   cameraf,
Gan_Camera   camera
 

Converts camera from single to double precision representation.

Gan_Camera gan_camera_from_cameraf_s Gan_Camera_f   cameraf
 

Converts camera from single to double precision representation.

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 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 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 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 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 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 Gan_Camera   camera,
Gan_Vector3   X,
Gan_Vector3   p,
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
HX Jacobian of image coordinates w.r.t camera coordinates
HC Jacobian of image coordinates w.r.t camera parameters
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 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 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 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_i 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 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_gamma Gan_Camera   camera,
double    gamma
 

Sets the gamma for images taken with this camera.

Parameters:
camera Pointer to the camera structure
gamma The new gamma value
Sets the gamma for images taken with this camera. The default value is one, set when the camera structure was built. This is the double precision version of the function.

Returns:
GAN_TRUE on successfully setting the gamma, GAN_FALSE on failure.

Gan_Bool gan_cameraf_add_distortion 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_i 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 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 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 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 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 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_i 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 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_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_SquMatrix33_f gan_cameraf_fill_matrix_s 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_q().

Returns:
The filled 3x3 upper triangular matrix.

Gan_Bool gan_cameraf_from_camera_q Gan_Camera   camera,
Gan_Camera_f   cameraf
 

Converts camera from double to single precision representation.

Gan_Camera_f gan_cameraf_from_camera_s Gan_Camera   camera
 

Converts camera from double to single precision representation.

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 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 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 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 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 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 Gan_Camera_f   camera,
Gan_Vector3_f   X,
Gan_Vector3_f   p,
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
HX Jacobian of image coordinates w.r.t camera coordinates
HC Jacobian of image coordinates w.r.t camera parameters
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 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 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 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_i 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 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_gamma Gan_Camera_f   camera,
float    gamma
 

Sets the gamma for images taken with this camera.

Parameters:
camera Pointer to the camera structure
gamma The new gamma value
Sets the gamma for images taken with this camera. The default value is one, set when the camera structure was built. This is the single precision version of the function.

Returns:
GAN_TRUE on successfully setting the gamma, GAN_FALSE on failure.


Generated on Mon Oct 13 16:15:01 2003 by doxygen1.3-rc1