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... | |
typedef TSearchResult TDiagnostics[11] |
Array of search results as used in PMInspectD.
void PMGetMatrix | ( | TSCLF | searchClf, |
TSearchResult | searchResult, | ||
TMatrix & | mat | ||
) |
Returns the components of the transformation matrix associated with the perspective described by a search result.
[in] | searchClf | The search classifier that has been used for generating the searchResult . |
[in] | searchResult | Search result (TSearchResult) defining the perspective. |
[out] | mat | The result's transformation matrix. |
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.
[in] | searchClf | The search classifier that has been used for generating the searchResult . |
[in] | searchResult | Search result (TSearchResult) defining the perspective. |
[out] | scale | Reference to scale. |
[out] | angle | Reference to rotation angle in radians. |
void PMGetXY | ( | TSCLF | searchClf, |
TSearchResult | searchResult, | ||
double & | X, | ||
double & | Y | ||
) |
Returns the position coordinates associated with the perspective described by a search result.
[in] | searchClf | The search classifier which was used for generating the searchResult . |
[in] | searchResult | Search result (TSearchResult) defining the result's perspective. |
[out] | X | X position of the search result in the image. |
[out] | Y | Y position of the search result in the image. |
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.
[in] | searchClf | The search classifier to be used. |
[in] | img | Handle of the input image. |
[in] | left | Left edge of AOI to be searched. |
[in] | top | Top edge of AOI to be searched. |
[in] | right | Right edge of AOI to be searched. |
[in] | bottom | Bottom edge of AOI to be searched. |
[in] | step | Specifies 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] | threshold | Quality 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] | locality | The 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] | maxNumResults | Maximal number of results to report. |
[out] | results | Pointer 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] | numCalls | Number of perspectives processed. |
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.
[in] | searchClf | The search classifier to be used. |
[in] | img | Handle of input image. |
[in] | searchResult | Reference to variable holding initial perspective and which receives the final result. |
[out] | searchDepth | Number of perspectives processed. |
TRUE
if search was successful at the specified position, FALSE
if not 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.
[in] | searchClf | The search classifier to be used. |
[in] | img | Handle of input image. |
[in] | searchResult | Reference to variable holding initial perspective and which receives the final result. |
[out] | searchDepth | Number of perspectives processed. |
[out] | diagnostics | Array that receives up to 11 intermediate results of the inspect call. |
TRUE
if search was successful at the specified position, FALSE
if not 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
.
[in] | searchClf | Handle of search classifier. |
[in] | imgSrc | Handle of the source image. |
[out] | imgTarget | Receives the Handle of the target image. |
[in] | trans | Transformation between both images as returned by PMInspectD. |
TRUE
if successful, FALSE
otherwise.