Polimago (Polimago.dll) 14.0
AccessVerification

Functions

cvbbool_t PMAccTestBuildIndexMaps (TLEARNINGDATAACCESS acc)
 Update a learning data access index map. More...
 
cvbbool_t PMAccTestFeatureWindow (TLEARNINGDATAACCESS acc, cvbdim_t &numImagePlanes, cvbdim_t &fwLeft, cvbdim_t &fwTop, cvbdim_t &fwRight, cvbdim_t &fwBottom)
 Retrieve geometry information from a generalized data access object. More...
 
cvbbool_t PMAccTestGetExampleClassLabel (TLEARNINGDATAACCESS acc, cvbval_t imageIndex, cvbval_t exampleIndex, char *szLabel, size_t &len)
 Retrieve an example's class label. More...
 
cvbbool_t PMAccTestGetExampleClassLabelW (TLEARNINGDATAACCESS acc, cvbval_t imageIndex, cvbval_t exampleIndex, wchar_t *szLabel, size_t &len)
 Retrieve an example's class label. More...
 
cvbbool_t PMAccTestGetExampleGeometry (TLEARNINGDATAACCESS acc, cvbval_t imageIndex, cvbval_t exampleIndex, TGeometrySpec &specification)
 Retrieve information about an example's geometry. More...
 
cvbbool_t PMAccTestGetExamplePosition (TLEARNINGDATAACCESS acc, cvbval_t imageIndex, cvbval_t exampleIndex, double &X, double &Y)
 Retrieve information about an example's geometry. More...
 
cvbbool_t PMAccTestGetExampleVector (TLEARNINGDATAACCESS acc, cvbval_t imageIndex, cvbval_t exampleIndex, double *vector)
 Retrieve an example's regression value. More...
 
IMG PMAccTestGetImage (TLEARNINGDATAACCESS acc, cvbval_t imageIndex)
 Retrieve a sample image. More...
 
cvbval_t PMAccTestGetNumExamplesInImage (TLEARNINGDATAACCESS acc, cvbval_t imageIndex)
 Retrieve the number of samples inside an image. More...
 
cvbval_t PMAccTestGetNumImages (TLEARNINGDATAACCESS acc)
 Retrieve the number of sample images. More...
 
cvbval_t PMAccTestGetOutputDimension (TLEARNINGDATAACCESS acc)
 Retrieve the output dimension for regression training sets. More...
 
cvbbool_t PMAccTestQueryUsage (TLEARNINGDATAACCESS acc, cvbbool_t &canDoClassification, cvbbool_t &canDoRegression, cvbbool_t &canDoSearch)
 Query the possible uses of a TLEARNINGDATAACCESS object. More...
 

Detailed Description

Function Documentation

◆ PMAccTestBuildIndexMaps()

cvbbool_t PMAccTestBuildIndexMaps ( TLEARNINGDATAACCESS  acc)

Update a learning data access index map.

Each object created with PMCreateLearningDataAccess or PMCreateLearningDataAccessSearch internally maintains a list of all available examples along with the image and sample indices required for accessing it. This list must be initialized after the TLEARNINGDATACCESS object has been created and before it is being in one of the access verification functions (the functions for classifier generation and leave out testing will initialize the index maps automatically). It must be re-initialized whenever the content of the training database changed.

Parameters
[in]accData access object as returned by PMCreateLearningDataAccess.
Returns
True if the operation succeeded, False otherwise.

◆ PMAccTestFeatureWindow()

cvbbool_t PMAccTestFeatureWindow ( TLEARNINGDATAACCESS  acc,
cvbdim_t &  numImagePlanes,
cvbdim_t &  fwLeft,
cvbdim_t &  fwTop,
cvbdim_t &  fwRight,
cvbdim_t &  fwBottom 
)

Retrieve geometry information from a generalized data access object.

Queries an object created with PMCreateLearningDataAccessSearch or PMCreateLearningDataAccess for the feature window size and depth.

Parameters
[in]accData access object as returned by PMCreateLearningDataAccess or PMCreateLearningDataAccessSearch.
[out]numImagePlanesNumber of images planes in the feature window.
[out]fwLeftLeft edge of the feature window.
[out]fwTopTop edge of the feature window.
[out]fwRightRight edge of the feature window.
[out]fwBottomBottom edge of the feature window.
Returns
True if the access succeeded, false otherwise.

◆ PMAccTestGetExampleClassLabel()

cvbbool_t PMAccTestGetExampleClassLabel ( TLEARNINGDATAACCESS  acc,
cvbval_t  imageIndex,
cvbval_t  exampleIndex,
char *  szLabel,
size_t &  len 
)

Retrieve an example's class label.

Retrieves the class label of a given example from an object created with PMCreateLearningDataAccess. Note that class labels can only be retrieved from data access objects for which a class label callback has been specified. This can be queried with the function PMAccTestQueryUsage.

Attention
Make sure that the function PMAccTestBuildIndexMaps has been called before this function is invoked.
Parameters
[in]accData access object as returned by PMCreateLearningDataAccess.
[in]imageIndexIndex of the image in which a sample is located.
[in]exampleIndexIndex of the example inside the iamge referenced by the imageIndex.
[in]szLabelPointer to a character buffer that receives the class label. imageIndex and the exampleIndex.
[in,out]lenLength of the buffer pointed to by szBuffer. Upon return, this parameter will receive the number of characters that have been written to the buffer.
Returns
True if the referenced sample exists, False otherwise.

◆ PMAccTestGetExampleClassLabelW()

cvbbool_t PMAccTestGetExampleClassLabelW ( TLEARNINGDATAACCESS  acc,
cvbval_t  imageIndex,
cvbval_t  exampleIndex,
wchar_t *  szLabel,
size_t &  len 
)

Retrieve an example's class label.

Retrieves the class label of a given example from an object created with PMCreateLearningDataAccess. Note that class labels can only be retrieved from data access objects for which a class label callback has been specified. This can be queried with the function PMAccTestQueryUsage.

Attention
Make sure that the function PMAccTestBuildIndexMaps has been called before this function is invoked.
Parameters
[in]accData access object as returned by PMCreateLearningDataAccess.
[in]imageIndexIndex of the image in which a sample is located.
[in]exampleIndexIndex of the example inside the iamge referenced by the imageIndex.
[in]szLabelPointer to a character buffer that receives the class label. imageIndex and the exampleIndex.
[in,out]lenLength of the buffer pointed to by szBuffer. Upon return, this parameter will receive the number of characters that have been written to the buffer.
Returns
True if the referenced sample exists, False otherwise.

◆ PMAccTestGetExampleGeometry()

cvbbool_t PMAccTestGetExampleGeometry ( TLEARNINGDATAACCESS  acc,
cvbval_t  imageIndex,
cvbval_t  exampleIndex,
TGeometrySpec specification 
)

Retrieve information about an example's geometry.

Retrieves information about the geometry (transformation state) of a given example from an object created with PMCreateLearningDataAccessSearch or PMCreateLearningDataAccess.

Attention
Make sure that the function PMAccTestBuildIndexMaps has been called before this function is invoked.
Parameters
[in]accData access object as returned by PMCreateLearningDataAccess or PMCreateLearningDataAccessSearch.
[in]imageIndexIndex of the image in which a sample is located.
[in]exampleIndexIndex of the example inside the iamge referenced by the imageIndex.
[out]specificationGeometry/Transformation specification for the example references the imageIndex and exampleIndex.
Returns
True if the referenced sample exists, False otherwise.

◆ PMAccTestGetExamplePosition()

cvbbool_t PMAccTestGetExamplePosition ( TLEARNINGDATAACCESS  acc,
cvbval_t  imageIndex,
cvbval_t  exampleIndex,
double &  X,
double &  Y 
)

Retrieve information about an example's geometry.

Retrieves the position of a given example from an object created with PMCreateLearningDataAccessSearch or PMCreateLearningDataAccess.

Attention
Make sure that the function PMAccTestBuildIndexMaps has been called before this function is invoked.
Parameters
[in]accData access object as returned by PMCreateLearningDataAccess or PMCreateLearningDataAccessSearch.
[in]imageIndexIndex of the image in which a sample is located.
[in]exampleIndexIndex of the example inside the iamge referenced by the imageIndex.
[out]XHorizontal position of the sample referenced by the imageIndex and the exampleIndex.
[out]YVertical position of the sample referenced by the imageIndex and the exampleIndex.
Returns
True if the referenced sample exists, False otherwise.

◆ PMAccTestGetExampleVector()

cvbbool_t PMAccTestGetExampleVector ( TLEARNINGDATAACCESS  acc,
cvbval_t  imageIndex,
cvbval_t  exampleIndex,
double *  vector 
)

Retrieve an example's regression value.

Retrieves the regression value for given example from an object created with PMCreateLearningDataAccess. Note that regression values can only be retrieved from data access objects for which a regression value callback has been specified. This can be queried with the function PMAccTestQueryUsage.

Attention
Make sure that the function PMAccTestBuildIndexMaps has been called before this function is invoked.
Parameters
[in]accData access object as returned by PMCreateLearningDataAccess.
[in]imageIndexIndex of the image in which a sample is located.
[in]exampleIndexIndex of the example inside the iamge referenced by the imageIndex.
[in]vectorPointer to a buffer that will receive the regression value. The buffer's size must be the return value of the function PMAccTestGetOutputDimension times sizeof(double). imageIndex and the exampleIndex.
Returns
True if the referenced sample exists, False otherwise.

◆ PMAccTestGetImage()

IMG PMAccTestGetImage ( TLEARNINGDATAACCESS  acc,
cvbval_t  imageIndex 
)

Retrieve a sample image.

Retrieves a sample image from an object created with PMCreateLearningDataAccessSearch or PMCreateLearningDataAccess.

Parameters
[in]accData access object as returned by PMCreateLearningDataAccess or PMCreateLearningDataAccessSearch.
[in]imageIndexIndex of the image to be retrieved.
Returns
Image handle or NULL.

◆ PMAccTestGetNumExamplesInImage()

cvbval_t PMAccTestGetNumExamplesInImage ( TLEARNINGDATAACCESS  acc,
cvbval_t  imageIndex 
)

Retrieve the number of samples inside an image.

Retrieves the number of samples for a given image from an object created with PMCreateLearningDataAccessSearch or PMCreateLearningDataAccess.

Attention
Make sure that the function PMAccTestBuildIndexMaps has been called before this function is invoked.
Parameters
[in]accData access object as returned by PMCreateLearningDataAccess or PMCreateLearningDataAccessSearch.
[in]imageIndexIndex of the image for which to query the number of samples.
Returns
Number of samples inside the selected image.

◆ PMAccTestGetNumImages()

cvbval_t PMAccTestGetNumImages ( TLEARNINGDATAACCESS  acc)

Retrieve the number of sample images.

Retrieves the sample image count from an object created with PMCreateLearningDataAccessSearch or PMCreateLearningDataAccess.

Parameters
[in]accData access object as returned by PMCreateLearningDataAccess or PMCreateLearningDataAccessSearch.
Returns
Number of available sample images.

◆ PMAccTestGetOutputDimension()

cvbval_t PMAccTestGetOutputDimension ( TLEARNINGDATAACCESS  acc)

Retrieve the output dimension for regression training sets.

Retrieves the regression output dimension from an object created with PMCreateLearningDataAccess. Note that the output dimension can only be retrieved from data access objects for which an output dimension callback has been specified. This can be queried with the function PMAccTestQueryUsage.

Parameters
[in]accData access object as returned by PMCreateLearningDataAccess.
Returns
Output dimension or zero.

◆ PMAccTestQueryUsage()

cvbbool_t PMAccTestQueryUsage ( TLEARNINGDATAACCESS  acc,
cvbbool_t &  canDoClassification,
cvbbool_t &  canDoRegression,
cvbbool_t &  canDoSearch 
)

Query the possible uses of a TLEARNINGDATAACCESS object.

When creating a learning data access object with PMCreateLearningDataAccess different sets of callbacks may be specified that make the access object suitable for either classification training or regression training or both. Classifiers created with PMCreateLearningDataAccessSearch are suitable for neither.

Parameters
[in]accData access object as returned by PMCreateLearningDataAccess.
[out]canDoClassificationTrue if the callback for classification labels is available, False otherwise.
[out]canDoSearchTrue if the acc parameter is usable for search classifier training, False otherwise.
[out]canDoRegressionTrue if the callback for regression training has been specified. False otherwise.
Returns
True if the operation succeeded, False otherwise.