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

Loading...
Searching...
No Matches
Functions
kpmRefDataSet.cpp File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <stdint.h>`
`#include <ARX/AR/ar.h>`
`#include <ARX/KPM/kpm.h>`
`#include <ARX/KPM/kpmType.h>`
`#include "kpmPrivate.h"`
`#include "kpmFopen.h"`
`#include <ARX/KPM/surfSub.h>`
Include dependency graph for kpmRefDataSet.cpp:

## Functions
int | kpmGenRefDataSet (ARUint8 *refImage, int xsize, int ysize, float dpi, int procMode, int compMode, int maxFeatureNum, int pageNo, int imageNo, KpmRefDataSet **refDataSetPtr)
int | kpmAddRefDataSet (ARUint8 *refImage, int xsize, int ysize, float dpi, int procMode, int compMode, int maxFeatureNum, int pageNo, int imageNo, KpmRefDataSet **refDataSetPtr)
int | kpmMergeRefDataSet (KpmRefDataSet **refDataSetPtr1, KpmRefDataSet **refDataSetPtr2)
| Merge a second KPM dataset into the first, and dispose of second.
int | kpmDeleteRefDataSet (KpmRefDataSet **refDataSetPtr)
| Dispose of a reference data set and its allocated memory.
int | kpmSaveRefDataSet (const char *filename, const char *ext, KpmRefDataSet *refDataSet)
int | kpmLoadRefDataSet (const char *filename, const char *ext, KpmRefDataSet **refDataSetPtr)
| Load a reference data set from the filesystem into memory.
int | kpmLoadRefDataSetOld (const char *filename, const char *ext, KpmRefDataSet **refDataSetPtr)
int | kpmChangePageNoOfRefDataSet (KpmRefDataSet *refDataSet, int oldPageNo, int newPageNo)

## Function Documentation

## ◆ kpmAddRefDataSet()

int kpmAddRefDataSet | ( | ARUint8 * | refImage,
|  | int | xsize,
|  | int | ysize,
|  | float | dpi,
|  | int | procMode,
|  | int | compMode,
|  | int | maxFeatureNum,
|  | int | pageNo,
|  | int | imageNo,
|  | KpmRefDataSet ** | refDataSetPtr
| ) |  |

Here is the call graph for this function:

## ◆ kpmChangePageNoOfRefDataSet()

int kpmChangePageNoOfRefDataSet | ( | KpmRefDataSet * | refDataSet,
|  | int | oldPageNo,
|  | int | newPageNo
| ) |  |

Parameters

  refDataSet |
  oldPageNo |
  newPageNo |

Returns

## ◆ kpmDeleteRefDataSet()

int kpmDeleteRefDataSet | ( | KpmRefDataSet ** | refDataSetPtr | ) |

Dispose of a reference data set and its allocated memory.

Once a data set has been loaded into a KPM handle, or is otherwise no longer required to be held in memory, it should be deleted (i.e. disposed) from memory by calling this function.

Parameters

  refDataSetPtr | Pointer to memory location which points to the dataset. On success, this location will be set to NULL.

Returns
  0 if the delete succeeded, or a value < 0 in case of error.

See also
  kpmLoadRefDataSet kpmLoadRefDataSet

## ◆ kpmGenRefDataSet()

int kpmGenRefDataSet | ( | ARUint8 * | refImage,
|  | int | xsize,
|  | int | ysize,
|  | float | dpi,
|  | int | procMode,
|  | int | compMode,
|  | int | maxFeatureNum,
|  | int | pageNo,
|  | int | imageNo,
|  | KpmRefDataSet ** | refDataSetPtr
| ) |  |

Here is the call graph for this function:

## ◆ kpmLoadRefDataSet()

int kpmLoadRefDataSet | ( | const char * | filename,
|  | const char * | ext,
|  | KpmRefDataSet ** | refDataSetPtr
| ) |  |

Load a reference data set from the filesystem into memory.

This does not set the reference data as the current tracking set. To do that, call kpmSetRefDataSet after this load completes. Alternately, the loaded set can be merged with another loaded set by calling kpmMergeRefDataSet. To dispose of the loaded dataset, call kpmDeleteRefDataSet.

Parameters

  filename | Path to the dataset. Either full path, or a relative path if supported by the operating system.
  ext | If non-NULL, a '.' charater and this string will be appended to 'filename'. Often, this parameter is a pointer to the string "fset3".

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

Parameters

  refDataSetPtr | Pointer to a location which after loading will point to the loaded reference data set.

Returns
  0 if the load succeeded, or a value < 0 in case of error.

See also
  kpmSetRefDataSet kpmSetRefDataSet
  kpmMergeRefDataSet kpmMergeRefDataSet
  kpmDeleteRefDataSet kpmDeleteRefDataSet

Here is the call graph for this function:

## ◆ kpmLoadRefDataSetOld()

int kpmLoadRefDataSetOld | ( | const char * | filename,
|  | const char * | ext,
|  | KpmRefDataSet ** | refDataSetPtr
| ) |  |

Here is the call graph for this function:

## ◆ kpmMergeRefDataSet()

int kpmMergeRefDataSet | ( | KpmRefDataSet ** | refDataSetPtr1,
|  | KpmRefDataSet ** | refDataSetPtr2
| ) |  |

Merge a second KPM dataset into the first, and dispose of second.

This function merges two KPM datasets by adding the reference points in the second into the first (allocating a new set if the location pointed to by refDataSetPtr1 is NULL) and then deleting the second set.

Parameters

  refDataSetPtr1 | Pointer to a location which points to the first data set, or pointer to NULL if a new dataset is to be created. This will hold the results of the merge.
  refDataSetPtr2 | Pointer to a location which points to the second data set. After the merge, the dataset pointed to will be deleted and the location pointed to set to NULL.

Returns
  0 if the merge succeeded, or a value < 0 in case of error.

Here is the call graph for this function:

## ◆ kpmSaveRefDataSet()

int kpmSaveRefDataSet | ( | const char * | filename,
|  | const char * | ext,
|  | KpmRefDataSet * | refDataSet
| ) |  |

Parameters

  filename |
  ext |
  refDataSet |

Returns

Here is the call graph for this function: