| ARX 1.0 The next-generation open source augmented reality toolkit.

Loading...
Searching...
No Matches
Functions
kpmHandle.cpp File Reference
`#include <stdio.h>`
`#include <ARX/AR/ar.h>`
`#include <ARX/KPM/kpm.h>`
`#include "kpmPrivate.h"`
`#include "AnnMatch.h"`
`#include "AnnMatch2.h"`
Include dependency graph for kpmHandle.cpp:

## Functions
KpmHandle * | kpmCreateHandle (ARParamLT *cparamLT)
| Allocate and initialise essential structures for KPM tracking, using full six degree-of-freedom tracking.
KpmHandle * | kpmCreateHandleHomography (int xsize, int ysize)
| Allocate and initialise essential structures for KPM tracking, using homography-only tracking.
KpmHandle * | kpmCreateHandle2 (int xsize, int ysize)
int | kpmHandleGetXSize (const KpmHandle *kpmHandle)
int | kpmHandleGetYSize (const KpmHandle *kpmHandle)
int | kpmSetProcMode (KpmHandle *kpmHandle, KPM_PROC_MODE mode)
int | kpmGetProcMode (KpmHandle *kpmHandle, KPM_PROC_MODE *mode)
int | kpmSetDetectedFeatureMax (KpmHandle *kpmHandle, int detectedMaxFeature)
int | kpmGetDetectedFeatureMax (KpmHandle *kpmHandle, int *detectedMaxFeature)
int | kpmSetSurfThreadNum (KpmHandle *kpmHandle, int surfThreadNum)
int | kpmDeleteHandle (KpmHandle **kpmHandle)
| Finalise and dispose of structures for KPM tracking.

## Function Documentation

## ◆ kpmCreateHandle()

KpmHandle * kpmCreateHandle | ( | ARParamLT * | cparamLT | ) |

Allocate and initialise essential structures for KPM tracking, using full six degree-of-freedom tracking.

Parameters

  cparamLT | Pointer to an ARParamLT structure holding camera parameters in lookup-table form. The pointer only is copied, and the ARParamLT structure itself is NOT copied, and must remain valid for the lifetime of the KpmHandle. This structure also specifies the size of video frames which will be later supplied to the kpmMatching() function as cparamLT->param.xsize and cparamLT->param.ysize.

Returns
  Pointer to a newly-allocated KpmHandle structure. This structure must be deallocated via a call to kpmDeleteHandle() when no longer needed.

See also
  kpmCreateHandleHomography kpmCreateHandleHomography
  kpmDeleteHandle kpmDeleteHandle

## ◆ kpmCreateHandle2()

KpmHandle * kpmCreateHandle2 | ( | int | xsize,
|  | int | ysize
| ) |  |

## ◆ kpmCreateHandleHomography()

KpmHandle * kpmCreateHandleHomography | ( | int | xsize,
|  | int | ysize
| ) |  |

Allocate and initialise essential structures for KPM tracking, using homography-only tracking.

Homography tracking assumes that the camera has zero lens-distortion, and this does not depend on camera parameters. It is therefore unable to provide correctly calibrated position measurements, but the resulting pose is suitable for visual overlay purposes.

Parameters

  xsize | Width of video frames which will be later supplied to the kpmMatching() function.
  ysize | Height of video frames which will be later supplied to the kpmMatching() function.

Returns
  Pointer to a newly-allocated KpmHandle structure. This structure must be deallocated via a call to kpmDeleteHandle() when no longer needed.

See also
  kpmCreateHandle kpmCreateHandle
  kpmDeleteHandle kpmDeleteHandle

## ◆ kpmDeleteHandle()

int kpmDeleteHandle | ( | KpmHandle ** | kpmHandle | ) |

Finalise and dispose of structures for KPM tracking.

Once KPM processing has completed, this routine should be called to dispose of memory allocated.

Parameters

  kpmHandle | Pointer to a location which holds a pointer to a KpmHandle structure. On return, the location pointed to will be set to NULL.

Returns
  0 if successful, or value <0 in case of error.

See also
  kpmCreateHandle kpmCreateHandle
  kpmCreateHandleHomography kpmCreateHandleHomography

## ◆ kpmGetDetectedFeatureMax()

int kpmGetDetectedFeatureMax | ( | KpmHandle * | kpmHandle,
|  | int * | detectedMaxFeature
| ) |  |

## ◆ kpmGetProcMode()

int kpmGetProcMode | ( | KpmHandle * | kpmHandle,
|  | KPM_PROC_MODE * | mode
| ) |  |

## ◆ kpmHandleGetXSize()

int kpmHandleGetXSize | ( | const KpmHandle * | kpmHandle | ) |

## ◆ kpmHandleGetYSize()

int kpmHandleGetYSize | ( | const KpmHandle * | kpmHandle | ) |

## ◆ kpmSetDetectedFeatureMax()

int kpmSetDetectedFeatureMax | ( | KpmHandle * | kpmHandle,
|  | int | detectedMaxFeature
| ) |  |

## ◆ kpmSetProcMode()

int kpmSetProcMode | ( | KpmHandle * | kpmHandle,
|  | KPM_PROC_MODE | mode
| ) |  |

## ◆ kpmSetSurfThreadNum()

int kpmSetSurfThreadNum | ( | KpmHandle * | kpmHandle,
|  | int | surfThreadNum
| ) |  |