ARX  1.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
Classes | Functions | Variables
paramFile.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <ARX/AR/ar.h>
#include <errno.h>
Include dependency graph for paramFile.c:

Classes

struct  ARParamd
 

Functions

int arParamSave (const char *filename, const int num, const ARParam *param,...)
 Save lens parameters to a file. More...
 
int arParamLoad (const char *filename, int num, ARParam *param,...)
 Load lens parameters from a file. More...
 
int arParamLoadFromBuffer (const void *buffer, size_t bufsize, ARParam *param)
 Load lens parameters from a buffer. More...
 
int arParamSaveExt (const char *filename, ARdouble para[3][4])
 
int arParamLoadExt (const char *filename, ARdouble para[3][4])
 
int arParamLoadExtFromBuffer (const void *buffer, size_t bufsize, ARdouble para[3][4])
 
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. More...
 

Function Documentation

◆ arParamLoad()

int arParamLoad ( const char *  filename,
int  num,
ARParam param,
  ... 
)

Load lens parameters from a file.

See the discussion under ARParam for more info.

Parameters
filenamePath to file from which to load the parameters. The file pointed to should be a file saved with arParamSave.
numNumber of ARParams to be loaded, normally 1.
paramPointer to the ARParam structure into which the parameters will be read.
Returns
0 if successful, or -1 if an error occured.
See also
ARParam
arParamLoadFromBuffer
arParamSave

◆ arParamLoadExt()

int arParamLoadExt ( const char *  filename,
ARdouble  para[3][4] 
)

◆ arParamLoadExtFromBuffer()

int arParamLoadExtFromBuffer ( const void *  buffer,
size_t  bufsize,
ARdouble  para[3][4] 
)

◆ arParamLoadFromBuffer()

int arParamLoadFromBuffer ( const void *  buffer,
size_t  bufsize,
ARParam param 
)

Load lens parameters from a buffer.

See the discussion under ARParam for more info.

Parameters
bufferBuffer from which the parameter(s) will be loaded. The buffer could be (for example) the contents of a parameter file read with fread().
bufsizeSize of the contents of buffer.
paramPointer to the ARParam structure into which the parameters will be read.
Returns
0 if successful, or -1 if an error occured.
See also
ARParam
arParamLoad
arParamSave

◆ arParamLoadOptical()

int arParamLoadOptical ( const char *  filename,
ARdouble fovy_p,
ARdouble aspect_p,
ARdouble  m[16] 
)

◆ arParamLoadOpticalFromBuffer()

int arParamLoadOpticalFromBuffer ( const void *  buffer,
size_t  bufsize,
ARdouble fovy_p,
ARdouble aspect_p,
ARdouble  m[16] 
)

◆ arParamSave()

int arParamSave ( const char *  filename,
const int  num,
const ARParam param,
  ... 
)

Save lens parameters to a file.

See the discussion under ARParam for more info.

Parameters
filenamePath to file to which to save the parameters. The file pointed to may later be reloaded with arParamLoad.
numNumber of ARParams to be saved, normally 1.
paramPointer to the ARParam structure to save.
Returns
0 if successful, or -1 if an error occured.
See also
ARParam
arParamLoad
arParamLoadFromBuffer

◆ arParamSaveExt()

int arParamSaveExt ( const char *  filename,
ARdouble  para[3][4] 
)

◆ arParamSaveOptical()

int arParamSaveOptical ( const char *  filename,
const ARdouble  fovy,
const ARdouble  aspect,
const ARdouble  m[16] 
)

Variable Documentation

◆ arParamVersionInfo

Initial value:
= {
{4, 136},
{5, 144},
{6, 152},
{9, 176},
{17, 240},
}

Constant array with parameters applicable to each version of the camera parameter distortion function.