![]() |
ARX
1.0
The next-generation open source augmented reality toolkit.
|
#include <stdio.h>#include <stdarg.h>#include <string.h>#include <ARX/AR/ar.h>#include <errno.h>Classes | |
| struct | ARParamd |
Functions | |
| int | arParamSave (const char *filename, const int num, const ARParam *param,...) |
| Save camera intrinsics (pinhole lens model and distortion parameters) to a file. | |
| int | arParamLoad (const char *filename, int num, ARParam *param,...) |
| Load camera intrinsics (pinhole lens model and distortion parameters) from a file. | |
| int | arParamLoadFromBuffer (const void *buffer, size_t bufsize, ARParam *param) |
| Load camera intrinsics (pinhole lens model and distortion parameters) from a buffer. | |
| int | arParamSaveExt (const char *filename, ARdouble para[3][4]) |
| Save camera extrinsic parameters from a matrix to a binary file. | |
| int | arParamLoadExt (const char *filename, ARdouble para[3][4]) |
| Load camera extrinsic parameters into a matrix from a binary file. | |
| int | arParamLoadExtFromBuffer (const void *buffer, size_t bufsize, ARdouble para[3][4]) |
| Load camera extrinsic parameters into a matrix from a binary buffer. | |
| int | arParamSaveOptical (const char *filename, const ARdouble fovy, const ARdouble aspect, const ARdouble m[16]) |
| int | arParamLoadOptical (const char *filename, ARdouble *fovy_p, ARdouble *aspect_p, ARdouble m[16]) |
| int | arParamLoadOpticalFromBuffer (const void *buffer, size_t bufsize, ARdouble *fovy_p, ARdouble *aspect_p, ARdouble m[16]) |
Variables | |
| const arParamVersionInfo_t | arParamVersionInfo [AR_DIST_FUNCTION_VERSION_MAX] |
| Constant array with parameters applicable to each version of the camera parameter distortion function. | |
| int arParamLoad | ( | const char * | filename, |
| int | num, | ||
| ARParam * | param, | ||
| ... | |||
| ) |
Load camera intrinsics (pinhole lens model and distortion parameters) from a file.
See the discussion under ARParam for more info.
| filename | Path to file from which to load the parameters. The file pointed to should be a file saved with arParamSave. |
| num | Number of ARParams to be loaded, normally 1. |
| param | Pointer to the ARParam structure into which the parameters will be read. |
| int arParamLoadExt | ( | const char * | filename, |
| ARdouble | para[3][4] | ||
| ) |
Load camera extrinsic parameters into a matrix from a binary file.
A typical use of this function is to load the transform expressing the pose of the right camera in a stereo-camera pair, relative to the left camera.
| para | A 3x4 matrix in row-major order, specifying the camera extrinsic transform. (This corresponds to the first 3 rows of a 4x4 homogenous coordinate transform matrix, where the fourth row is assumed to be {0.0, 0.0, 0.0, 1.0}.) |
| filename | The path to the filename from which to load the parameters in binary format. |
| int arParamLoadExtFromBuffer | ( | const void * | buffer, |
| size_t | bufsize, | ||
| ARdouble | para[3][4] | ||
| ) |
Load camera extrinsic parameters into a matrix from a binary buffer.
A typical use of this function is to load the transform expressing the pose of the right camera in a stereo-camera pair, relative to the left camera.
| buffer | Buffer from which the parameter(s) will be loaded. The buffer could be (for example) the contents of a parameter file read with fread(). |
| bufsize | Size of the contents of buffer. |
| para | A 3x4 matrix in row-major order, specifying the camera extrinsic transform. (This corresponds to the first 3 rows of a 4x4 homogenous coordinate transform matrix, where the fourth row is assumed to be {0.0, 0.0, 0.0, 1.0}.) |
| int arParamLoadFromBuffer | ( | const void * | buffer, |
| size_t | bufsize, | ||
| ARParam * | param | ||
| ) |
Load camera intrinsics (pinhole lens model and distortion parameters) from a buffer.
See the discussion under ARParam for more info.
| buffer | Buffer from which the parameter(s) will be loaded. The buffer could be (for example) the contents of a parameter file read with fread(). |
| bufsize | Size of the contents of buffer. |
| param | Pointer to the ARParam structure into which the parameters will be read. |
| int arParamLoadOptical | ( | const char * | filename, |
| ARdouble * | fovy_p, | ||
| ARdouble * | aspect_p, | ||
| ARdouble | m[16] | ||
| ) |
| int arParamLoadOpticalFromBuffer | ( | const void * | buffer, |
| size_t | bufsize, | ||
| ARdouble * | fovy_p, | ||
| ARdouble * | aspect_p, | ||
| ARdouble | m[16] | ||
| ) |
| int arParamSave | ( | const char * | filename, |
| const int | num, | ||
| const ARParam * | param, | ||
| ... | |||
| ) |
Save camera intrinsics (pinhole lens model and distortion parameters) to a file.
See the discussion under ARParam for more info.
| filename | Path to file to which to save the parameters. The file pointed to may later be reloaded with arParamLoad. |
| num | Number of ARParams to be saved, normally 1. |
| param | Pointer to the ARParam structure to save. |
| int arParamSaveExt | ( | const char * | filename, |
| ARdouble | para[3][4] | ||
| ) |
Save camera extrinsic parameters from a matrix to a binary file.
A typical use of this function is to save the transform expressing the pose of the right camera in a stereo-camera pair, relative to the left camera.
| para | A 3x4 matrix in row-major order, specifying the camera extrinsic transform. (This corresponds to the first 3 rows of a 4x4 homogenous coordinate transform matrix, where the fourth row is assumed to be {0.0, 0.0, 0.0, 1.0}.) |
| filename | The path to the filename in which to store the parameters in binary format. |
| int arParamSaveOptical | ( | const char * | filename, |
| const ARdouble | fovy, | ||
| const ARdouble | aspect, | ||
| const ARdouble | m[16] | ||
| ) |
| const arParamVersionInfo_t arParamVersionInfo[AR_DIST_FUNCTION_VERSION_MAX] |
Constant array with parameters applicable to each version of the camera parameter distortion function.
1.9.6