Typedefs | |
typedef double | TTransformation[16] |
Generic description of a transformation. More... | |
Functions | |
cvbbool_t | PMClassify (TCLF simpleClf, IMG img, cvbdim_t X, cvbdim_t Y, char *szClassLabel, size_t len, double &confidence, double *confidences) |
Classifies the neighborhood of a point (X,Y) in an image according to the specified classifier. More... | |
cvbbool_t | PMClassifyW (TCLF simpleClf, IMG img, cvbdim_t X, cvbdim_t Y, wchar_t *szClassLabel, size_t len, double &confidence, double *confidences) |
Classifies the neighborhood of a point (X,Y) in an image according to the specified classifier. More... | |
void | PMFormatTransformation (TSCLF searchClf, double(&t)[16], TGeometrySpec &specification) |
Translate a geometry description. More... | |
cvbbool_t | PMGetClfClassLabel (TCLF clf, cvbval_t classIndex, char *szClassLabel) |
Get the class label corresponding to a given index. More... | |
cvbbool_t | PMGetClfClassLabelW (TCLF clf, cvbval_t classIndex, wchar_t *szClassLabel) |
Get the class label corresponding to a given index. More... | |
void | PMGetClfTrainParams (TCLF clf, TTrainParams ¶ms) |
Returns the training parameters that have been used during classifier creation in a TTrainParams structure. More... | |
cvbval_t | PMGetGranularity (const char *szCode) |
The function returns the granularity (see tutorial) associated with a preprocessing code. More... | |
cvbval_t | PMGetNumClasses (TCLF clf) |
Returns the number of classes trained in a classifier if its usage is CU_ClassifyOneVersusAll or CU_ClassifyOneVersusOne. More... | |
cvbval_t | PMGetOutputDimension (TCLF clf) |
Returns the number of parameters estimated for numerical prediction by the classifier if the classifier's usage mode is CU_Regression. More... | |
cvbbool_t | PMInterpretSpecification (TSCLF searchClf, const TGeometrySpec &specification, double(&t)[16]) |
Translate a geometry description. More... | |
cvbbool_t | PMPredictVector (TCLF simpleClf, IMG img, cvbdim_t X, cvbdim_t Y, double *resultVector) |
Numerical prediction of vector-valued function depending on the neighborhood of a point (X,Y) in an image according to the specified classifier. More... | |
typedef double TTransformation[16] |
Generic description of a transformation.
The TTransformation type generically describes transformations as an array of double
values. The interpretation of these double
values is dependent on the actually described transformation, and therefore the type TTransformation is usually never used directly. It is instead defined by the results of PMGridSearch or PMFormatTransformation and used in PMSearchResultToImage as well as PMInterpretSpecification.
cvbbool_t PMClassify | ( | TCLF | simpleClf, |
IMG | img, | ||
cvbdim_t | X, | ||
cvbdim_t | Y, | ||
char * | szClassLabel, | ||
size_t | len, | ||
double & | confidence, | ||
double * | confidences | ||
) |
Classifies the neighborhood of a point (X,Y) in an image according to the specified classifier.
The classifier usage setting (retrieve with PMGetClfTrainParams) must be either CU_ClassifyOneVersusAll or CU_ClassifyOneVersusOne.
[in] | simpleClf | Pointer to classifier. |
[in] | img | Image handle. |
[in] | X | X coordinate of the point in the image to classify. |
[in] | Y | Y coordinate of the point in the image to classify. |
[in] | szClassLabel | Pointer to a string buffer where the resulting class label is returned. Generally, class labels are limited to up to 255 characters (not including the terminating zero). |
[in] | len | Length of the class label string buffer pointed to by szClassLabel . |
[out] | confidence | Maximal confidence. |
[in] | confidences | Array where the confidence may be returned for each class label. Set to NULL if the individual confidences should not be returned; otherwise have confidences point to an array of PMGetNumClasses * sizeof(double) bytes. |
TRUE
if classification was successful, FALSE
if not cvbbool_t PMClassifyW | ( | TCLF | simpleClf, |
IMG | img, | ||
cvbdim_t | X, | ||
cvbdim_t | Y, | ||
wchar_t * | szClassLabel, | ||
size_t | len, | ||
double & | confidence, | ||
double * | confidences | ||
) |
Classifies the neighborhood of a point (X,Y) in an image according to the specified classifier.
The classifier usage setting (retrieve with PMGetClfTrainParams) must be either CU_ClassifyOneVersusAll or CU_ClassifyOneVersusOne.
[in] | simpleClf | Pointer to classifier. |
[in] | img | Image handle. |
[in] | X | X coordinate of the point in the image to classify. |
[in] | Y | Y coordinate of the point in the image to classify. |
[in] | szClassLabel | Pointer to a string buffer where the resulting class label is returned. Generally, class labels are limited to up to 255 characters (not including the terminating zero). |
[in] | len | Length of the class label string buffer pointed to by szClassLabel . |
[out] | confidence | Maximal confidence. |
[in] | confidences | Array where the confidence may be returned for each class label. Set to NULL if the individual confidences should not be returned; otherwise have confidences point to an array of PMGetNumClasses * sizeof(double) bytes. |
TRUE
if classification was successful, FALSE
if not void PMFormatTransformation | ( | TSCLF | searchClf, |
double(&) | t[16], | ||
TGeometrySpec & | specification | ||
) |
Translate a geometry description.
This method translates a classifier's geometry description as given by a TTransformation array into a readable geometry description as given by a TGeometrySpec struct, taking into account the classifier's view on geometries.
[in] | searchClf | The search classifiers whose geometry interpretation is to be used for formatting. |
[in] | t | Classifier-dependent geometry to be interpreted. |
[out] | specification | Struct that makes the classifier's view at the parameter t readable |
cvbbool_t PMGetClfClassLabel | ( | TCLF | clf, |
cvbval_t | classIndex, | ||
char * | szClassLabel | ||
) |
Get the class label corresponding to a given index.
szClassLabel
must be big enough to hold the entire class label, otherwise a write access violation may occur. To be on the safe side, alway allocate at least 256 bytes.[in] | clf | Handle of the classifier to be queried. |
[in] | classIndex | Index of the class in question. Must be nonnegative and smaller than the return value of PMGetNumClasses. |
[in] | szClassLabel | Pointer to a buffer that will receive the class label string (zero-terminated!). |
TRUE
if the call was successful (i.e. all parameters are valid) FALSE
otherwise. cvbbool_t PMGetClfClassLabelW | ( | TCLF | clf, |
cvbval_t | classIndex, | ||
wchar_t * | szClassLabel | ||
) |
Get the class label corresponding to a given index.
szClassLabel
must be big enough to hold the entire class label, otherwise a write access violation may occur. To be on the safe side, alway allocate at least 256 bytes.[in] | clf | Handle of the classifier to be queried. |
[in] | classIndex | Index of the class in question. Must be nonnegative and smaller than the return value of PMGetNumClasses. |
[in] | szClassLabel | Pointer to a buffer that will receive the class label string (zero-terminated!). |
TRUE
if the call was successful (i.e. all parameters are valid) FALSE
otherwise. void PMGetClfTrainParams | ( | TCLF | clf, |
TTrainParams & | params | ||
) |
Returns the training parameters that have been used during classifier creation in a TTrainParams structure.
Note that this function should not be called on a search classifier. To retrieve the parameters that have been used for a search classifier please use PMGetSearchClfTrainParams.
[in] | clf | pointer to classifier. |
[out] | params | The training parameters used during generation of the classifier. |
cvbval_t PMGetGranularity | ( | const char * | szCode | ) |
The function returns the granularity (see tutorial) associated with a preprocessing code.
[in] | szCode | Pointer to 0-terminated string containing the preprocessing code. |
cvbval_t PMGetNumClasses | ( | TCLF | clf | ) |
Returns the number of classes trained in a classifier if its usage is CU_ClassifyOneVersusAll or CU_ClassifyOneVersusOne.
Otherwise it returns zero.
[in] | clf | Pointer to classifier. |
cvbval_t PMGetOutputDimension | ( | TCLF | clf | ) |
Returns the number of parameters estimated for numerical prediction by the classifier if the classifier's usage mode is CU_Regression.
For classifiers generated with CU_ClassifyOneVersusAll the returned value is the number of classes; for classifiers generated with CU_ClassifyOneVersusOne the returned value is PMGetNumClasses*(PMGetNumClasses-1)/2 (the number of possible pairs of classes).
[in] | clf | Pointer to classifier. |
cvbbool_t PMInterpretSpecification | ( | TSCLF | searchClf, |
const TGeometrySpec & | specification, | ||
double(&) | t[16] | ||
) |
Translate a geometry description.
This method translates a geometry description as given by a TGeometrySpec structure into an array of doubles that corresponds to the specified classifier's view on geometries. This is necessary for example when using the function PMInspect or PMInspectD to correctly specify the starting point for the iteration.
[in] | searchClf | The search classifiers whose geometry interpretation is to be used for interpretation. |
[in] | specification | Geometry description to be interpreted. |
[out] | t | Array of 16 doubles that describes the classifier's interpretation of the specification parameter |
TRUE
if reformatting succeeded, FALSE
if interpretation was not possible because the classifier referenced by searchClf
is invalid. cvbbool_t PMPredictVector | ( | TCLF | simpleClf, |
IMG | img, | ||
cvbdim_t | X, | ||
cvbdim_t | Y, | ||
double * | resultVector | ||
) |
Numerical prediction of vector-valued function depending on the neighborhood of a point (X,Y) in an image according to the specified classifier.
The classifier usage setting (retrieve with PMGetClfTrainParams) must be CU_Regression for this function to be able to work with the classifier.
[in] | simpleClf | Pointer to classifier. |
[in] | img | Image handle. |
[in] | X | X coordinate of the point in the image to classify. |
[in] | Y | Y coordinate of the point in the image to classify. |
[out] | resultVector | Pointer to a double array to be filled with the components of the prediction result vector. Length of the array must be PMGetOutputDimension * sizeof(double) . |
TRUE
if numerical prediction was successful, FALSE
if not.