Polimago (Polimago.dll) 15.0
Search

Data Structures

struct  TSearchResult
 Type of result returned by the Polimago search functions. More...
 

Typedefs

typedef TSearchResult TDiagnostics[11]
 

Functions

void PMGetMatrix (TSCLF searchClf, TSearchResult searchResult, TMatrix &mat)
 Returns the components of the transformation matrix associated with the perspective described by a search result. More...
 
void PMGetScaleAngle (TSCLF searchClf, TSearchResult searchResult, double &scale, double &angle)
 Returns the scale and rotation angle associated with the perspective described by a search result. More...
 
void PMGetXY (TSCLF searchClf, TSearchResult searchResult, double &X, double &Y)
 Returns the position coordinates associated with the perspective described by a search result. More...
 
cvbval_t PMGridSearch (TSCLF searchClf, IMG img, cvbdim_t left, cvbdim_t top, cvbdim_t right, cvbdim_t bottom, double step, double threshold, double locality, cvbval_t maxNumResults, TSearchResult *results, cvbval_t &numCalls)
 Search function of Polimago. More...
 
cvbbool_t PMInspect (TSCLF searchClf, IMG img, TSearchResult &searchResult, cvbval_t &searchDepth)
 Executes an elementary search process. More...
 
cvbbool_t PMInspectD (TSCLF searchClf, IMG img, TSearchResult &searchResult, cvbval_t &searchDepth, TDiagnostics diagnostics)
 Same as PMInspect with an additional diagnostic array returned. More...
 
cvbbool_t PMSearchResultToImage (TSCLF searchClf, IMG imgSrc, TTransformation trans, IMG &imgTarget)
 Construct an image representation of a search predictor result. More...
 

Detailed Description

Typedef Documentation

◆ TDiagnostics

typedef TSearchResult TDiagnostics[11]

Array of search results as used in PMInspectD.

Function Documentation

◆ PMGetMatrix()

void PMGetMatrix ( TSCLF  searchClf,
TSearchResult  searchResult,
TMatrix &  mat 
)

Returns the components of the transformation matrix associated with the perspective described by a search result.

Parameters
[in]searchClfThe search classifier that has been used for generating the searchResult.
[in]searchResultSearch result (TSearchResult) defining the perspective.
[out]matThe result's transformation matrix.

◆ PMGetScaleAngle()

void PMGetScaleAngle ( TSCLF  searchClf,
TSearchResult  searchResult,
double &  scale,
double &  angle 
)

Returns the scale and rotation angle associated with the perspective described by a search result.

Scale and angle are not available if the classifier has been generated with the TInvarianceType TI_Translations. If the search classifier was generated to using affine invariance (TI_AffineGroup) scale and angle are approximations based on the singular value decomposition of the affine transformation matrix.

Parameters
[in]searchClfThe search classifier that has been used for generating the searchResult.
[in]searchResultSearch result (TSearchResult) defining the perspective.
[out]scaleReference to scale.
[out]angleReference to rotation angle in radians.

◆ PMGetXY()

void PMGetXY ( TSCLF  searchClf,
TSearchResult  searchResult,
double &  X,
double &  Y 
)

Returns the position coordinates associated with the perspective described by a search result.

Parameters
[in]searchClfThe search classifier which was used for generating the searchResult.
[in]searchResultSearch result (TSearchResult) defining the result's perspective.
[out]XX position of the search result in the image.
[out]YY position of the search result in the image.

◆ PMGridSearch()

cvbval_t PMGridSearch ( TSCLF  searchClf,
IMG  img,
cvbdim_t  left,
cvbdim_t  top,
cvbdim_t  right,
cvbdim_t  bottom,
double  step,
double  threshold,
double  locality,
cvbval_t  maxNumResults,
TSearchResult results,
cvbval_t &  numCalls 
)

Search function of Polimago.

PMGridSearch searches an image with the prescribed search classifier and collects the properties of found objects in a list of search results (see description of TSearchResult). For additional information please see the tutorial on search functions of Polimago.

Parameters
[in]searchClfThe search classifier to be used.
[in]imgHandle of the input image.
[in]leftLeft edge of AOI to be searched.
[in]topTop edge of AOI to be searched.
[in]rightRight edge of AOI to be searched.
[in]bottomBottom edge of AOI to be searched.
[in]stepSpecifies the step size of the grid that the function PMGridSearch superimposes on the image. Grid Step Size is given in units of the size of the feature window (more precisely the unit is the minimum of height and width of the feature window) and defines the spacing of the grid points that are going to be evaluated in the sense that they are going to be starting points for attempts at iterating to a result. The grid size has a huge impact on the perceived speed of the classifier. Note that it is usually a good idea to have an overlap between the Extraction Radius (training parameter) and the grid size by e.g. setting the former one to 0.6 and the latter one to 0.5 (if no such overlap is given, gaps between the classifier's "knowledge" and the search grid will occur that are likely to give rise to false negatives, i. e. objects that are missed during a search operation).
[in]thresholdQuality threshold for acceptable solutions. Note that unlike its predecessor Manto, Polimago may yield sensible results with a quality in the range 0... 0.5. 0.2 seems a good starting point for experiments.
[in]localityThe Locality controls how closely together valid solutions may be located to each other spatially. This parameter is, again, given in terms of the classifier's feature window (i.e. a value of 0.5 for example means that no two results may overlap by more than 50% of the width or height of the feature window - whichever is smaller).
[in]maxNumResultsMaximal number of results to report.
[out]resultsPointer to an array of TSearchResult structs where PMGridSearch may store the results. The array must be allocated with at least maxNumResults * sizeof(TSearchResult) bytes.
[out]numCallsNumber of perspectives processed.
Returns
Number of objects found.

◆ PMInspect()

cvbbool_t PMInspect ( TSCLF  searchClf,
IMG  img,
TSearchResult searchResult,
cvbval_t &  searchDepth 
)

Executes an elementary search process.

PMInspect carries out the operation that PMGridSearch executes for grid point, starting at the perspective and position defined by the initial value of the parameter SearchResult. When PMInspect returns successfully, SearchResult will contain the final perspective and result quality. For additional information please see the tutorial on search functions of Polimago.

Parameters
[in]searchClfThe search classifier to be used.
[in]imgHandle of input image.
[in]searchResultReference to variable holding initial perspective and which receives the final result.
[out]searchDepthNumber of perspectives processed.
Returns
TRUE if search was successful at the specified position, FALSE if not

◆ PMInspectD()

cvbbool_t PMInspectD ( TSCLF  searchClf,
IMG  img,
TSearchResult searchResult,
cvbval_t &  searchDepth,
TDiagnostics  diagnostics 
)

Same as PMInspect with an additional diagnostic array returned.

For additional information please see the tutorial on search functions of Polimago.

Parameters
[in]searchClfThe search classifier to be used.
[in]imgHandle of input image.
[in]searchResultReference to variable holding initial perspective and which receives the final result.
[out]searchDepthNumber of perspectives processed.
[out]diagnosticsArray that receives up to 11 intermediate results of the inspect call.
Returns
TRUE if search was successful at the specified position, FALSE if not

◆ PMSearchResultToImage()

cvbbool_t PMSearchResultToImage ( TSCLF  searchClf,
IMG  imgSrc,
TTransformation  trans,
IMG &  imgTarget 
)

Construct an image representation of a search predictor result.

During a PMGridSearch operation an iteration of search steps will be carried out which can be inspected using the output of PMInspectD. PMInspectD will output the trace that leads from a given (grid-)point to the final result, and each individual step of this trace may be visualized as an image with PMSearchResultToImage.

Parameters
[in]searchClfHandle of search classifier.
[in]imgSrcHandle of the source image.
[out]imgTargetReceives the Handle of the target image.
[in]transTransformation between both images as returned by PMInspectD.
Returns
TRUE if successful, FALSE otherwise.