Functions | |
bool | CreateMCFromImageList (SIL ImageList, const char *MantoControlWord, TMantoNotify Notify, void *NotifyData, TDecisionBoundary Boundary, MCF &MC) |
This is the principal learning function, which creates a MCF object from the specified Sample Image List using the specified preprocessing code. More... | |
TDecisionBoundary | GetMCBoundaryType (MCF MC) |
This function returns the permeability of the decision surface. More... | |
const char * | GetMCComment (MCF MC) |
This function returns a pointer to the comment field within the MCF object. More... | |
const char * | GetMCControlword (MCF MC) |
This function returns the preprocessing code which was used for generation of the MCF object. More... | |
void | GetMCDimensions (MCF MC, cvbdim_t &Width, cvbdim_t &Height, cvbdim_t &X, cvbdim_t &Y, cvbdim_t &Dimension) |
This function returns the image format and origin position of the MCF object. More... | |
const char * | GetMCExcludedClass (MCF MC) |
If a class is excluded from pattern matching, this function returns its ID or an empty string otherwise. More... | |
double | GetMCLearnResult (MCF MC) |
This function returns a characteristic number describing approximately the classifiers capability to separate the feature space during learning. More... | |
int | GetMCNumClasses (MCF MC) |
This function returns the number of classes contained in the MCF object. More... | |
bool | LoadMC (const char *Filename, MCF &MC) |
This function creates a MCF object by loading it from disk. More... | |
bool | MantoColourTransform (IMG Image, IMG &ImgOut) |
This function creates a nine-planar colour image from a three-planar colour image by adding colour planes containing the information of R*R, R*G, R*B, G*G, G*B, B*B in plane 4 to 9 (normalised to a dynamic range of 0...255). More... | |
bool | MCAppendResults (SEARCHRESULTS &Results1, SEARCHRESULTS Results2) |
This function appends the items of Results2 onto the end of Results1. More... | |
cvbval_t | MCClassIDToClassIndex (MCF MC, const char *ClassID) |
This function returns the class label for the specified class index. More... | |
const char * | MCClassIndexToClassID (OBJ MC, cvbval_t ClassIndex) |
This function returns the index of the specified class in the MCF. More... | |
bool | MCReadToken (MCF MC, IMG AImage, long Left, long Top, long Right, long Bottom, bool Vote, bool PointSensity, long MaxCount, double Threshold, long ASearchID, long Xadvance, long YAdvance, long Radius, SEARCHRESULTS &String) |
This function scans the frame (Left, Top, Right, Bottom) of the image AImage to generate a list (results) of pattern matches. More... | |
bool | MCReleaseResults (SEARCHRESULTS Results) |
This function frees the memory resources associated with a list of search results. More... | |
bool | MCRetractSearchResult (SEARCHRESULTS Results, long Index) |
This function removes an individual search result from the list. More... | |
bool | MCSearch (MCF MC, IMG AImage, cvbdim_t Left, cvbdim_t Top, cvbdim_t Right, cvbdim_t Bottom, bool Vote, bool DotSensitivity, bool CreateResultImage, double &XPos, double &YPos, double &Quality, char *ClassID, IMG &ResultImage) |
This function scans the frame (Left, Top, Right, Bottom) of the image AImage for best pattern match. More... | |
bool | MCSearchAll (MCF MC, IMG AImage, cvbdim_t Left, cvbdim_t Top, cvbdim_t Right, cvbdim_t Bottom, bool Vote, bool DotSensitivity, long MaxCount, double Threshold, long ASearchID, SEARCHRESULTS &Results) |
This function scans the frame (Left, Top, Right, Bottom) of the image AImage to generate a list (Results) of pattern matches. More... | |
bool | MCSearchAllEx (MCF MC, IMG AImage, cvbdim_t Left, cvbdim_t Top, cvbdim_t Right, cvbdim_t Bottom, bool Vote, bool DotSensitivity, long MaxCount, double Threshold, long ASearchID, long Granularity, SEARCHRESULTS &Results) |
This function scans the frame (Left, Top, Right, Bottom) of the image AImage to generate a list (Results) of pattern matches. More... | |
PSRESULT | MCSearchResult (SEARCHRESULTS Results, long Index) |
This function returns a pointer to a record to access the data corresponding to an individual search result. More... | |
bool | MCSearchResultRef (SEARCHRESULTS Results, long Index, PSRESULT Result) |
This function returns a pointer to a record to access the data corresponding to an individual search result from a SEARCHRESULTS result list. More... | |
long | MCSearchResultsCount (SEARCHRESULTS Results) |
This function returns the number of records in the specified list. More... | |
bool | MCSeparateResults (SEARCHRESULTS Results, long Separation) |
This function thins out the list by a given separation parameter. More... | |
bool | MCSortResultsByConfidence (SEARCHRESULTS Results) |
This function sorts the list of results by decreasing confidence, so that the best results come first in the list. More... | |
bool | MCSortResultsByPosition (SEARCHRESULTS Results, double X, double Y) |
This function sorts the list in the direction specified by the vector (X,Y). More... | |
bool | MCTestCLFWithImageList (MCF MC, SIL TestList, bool Vote, double &ErrorRate) |
This function probes the classification capabilities of a MCF object by means of a SIL TestList containing appropriate test samples. More... | |
bool | MCTruncateResults (SEARCHRESULTS Results, long N) |
This function retains the first N items in the list, deleting the rest. More... | |
void | ReleaseMC (MCF MC) |
This function decrements the internal reference counter of the MCF object by one. More... | |
void | SetMCComment (MCF MC, const char *Comment) |
This function specifies an arbitrary comment for the MCF object. More... | |
void | SetMCExcludedClass (MCF MC, const char *ClassID) |
This function specifies the excluded class during subsequent calls of MCSearch. More... | |
void | ShareMC (MCF MC) |
This function increments the internal reference counter of the MCF object by one. More... | |
bool | StoreMC (const char *Filename, MCF MC) |
This function writes the MCF object to disk. More... | |
bool CreateMCFromImageList | ( | SIL | ImageList, |
const char * | MantoControlWord, | ||
TMantoNotify | Notify, | ||
void * | NotifyData, | ||
TDecisionBoundary | Boundary, | ||
MCF & | MC | ||
) |
This is the principal learning function, which creates a MCF object from the specified Sample Image List using the specified preprocessing code.
If the callback function Notify is nonzero, it is executed regularly, gives information about execution progress and enables execution interruption. For more information and the definition see TMantoNotify function.
[in] | ImageList | Pointer to a Sample Image List (SIL) object. |
[in] | MantoControlWord | Preprocessing code for multi resolution filter. |
[in] | Notify | Callback function as described in the TMantoNotify function. |
[in] | NotifyData | Pointer to a window which handles the callback function calls. |
[in] | Boundary | This is an enumerated type to control the permeability of the decision surface. See TDecisionBoundary for a detailed description. See section Binary Classifiers, Decision Surfaces and Pattern Quality for an explanation. When in doubt pick TDB_Soft. |
[out] | MC | Pointer to the newly created MCF object. |
TRUE
if generated MCF object is given in the parameter MC, FALSE
otherwise. TDecisionBoundary GetMCBoundaryType | ( | MCF | MC | ) |
const char * GetMCComment | ( | MCF | MC | ) |
const char * GetMCControlword | ( | MCF | MC | ) |
void GetMCDimensions | ( | MCF | MC, |
cvbdim_t & | Width, | ||
cvbdim_t & | Height, | ||
cvbdim_t & | X, | ||
cvbdim_t & | Y, | ||
cvbdim_t & | Dimension | ||
) |
This function returns the image format and origin position of the MCF object.
[in] | MC | Pointer to a MCF object. |
[out] | Width | Width of feature window. |
[out] | Height | Height of feature window. |
[out] | X | X-position of sample origin. |
[out] | Y | Y-position of sample origin. |
[out] | Dimension | Number of colour planes. |
const char * GetMCExcludedClass | ( | MCF | MC | ) |
double GetMCLearnResult | ( | MCF | MC | ) |
This function returns a characteristic number describing approximately the classifiers capability to separate the feature space during learning.
[in] | MC | Pointer to a MCF object. |
int GetMCNumClasses | ( | MCF | MC | ) |
bool LoadMC | ( | const char * | Filename, |
MCF & | MC | ||
) |
bool MantoColourTransform | ( | IMG | Image, |
IMG & | ImgOut | ||
) |
This function creates a nine-planar colour image from a three-planar colour image by adding colour planes containing the information of R*R, R*G, R*B, G*G, G*B, B*B in plane 4 to 9 (normalised to a dynamic range of 0...255).
[in] | Image | Handle to the source image used for the transformation. |
[out] | ImgOut | Handle to the output image that will receive the newly created result image. |
TRUE
on success, FALSE
otherwise. bool MCAppendResults | ( | SEARCHRESULTS & | Results1, |
SEARCHRESULTS | Results2 | ||
) |
This function appends the items of Results2 onto the end of Results1.
If Results1 is initialised to a Nil pointer, a copy of Results2 is created. The \a SearchID parameter in #MCSearchAll and in the individual item records lets you keep track from which call to #MCSearchAll a given record originates.
[in,out] | Results1 | Pointer to the list of search results to which Results2 is to be appended. |
[in] | Results2 | Pointer to a list of search results. |
TRUE
on success, FALSE
if the calling parameters contain illegal data. cvbval_t MCClassIDToClassIndex | ( | MCF | MC, |
const char * | ClassID | ||
) |
const char * MCClassIndexToClassID | ( | OBJ | MC, |
cvbval_t | ClassIndex | ||
) |
This function returns the index of the specified class in the MCF.
[in] | MC | Pointer to the MCF object. |
[in] | ClassIndex | Index of class. |
bool MCReadToken | ( | MCF | MC, |
IMG | AImage, | ||
long | Left, | ||
long | Top, | ||
long | Right, | ||
long | Bottom, | ||
bool | Vote, | ||
bool | PointSensity, | ||
long | MaxCount, | ||
double | Threshold, | ||
long | ASearchID, | ||
long | Xadvance, | ||
long | YAdvance, | ||
long | Radius, | ||
SEARCHRESULTS & | String | ||
) |
This function scans the frame (Left, Top, Right, Bottom) of the image AImage to generate a list (results) of pattern matches.
After the first found pattern, the search window will be moved by Xadvance and YAdvance and the resulting window is again searched for a result and so on. The result is a list of results in the form of a SEARCHRESULTS structure as commonly used in Manto (see also MCSearchAll, MCSearchAllEx).
[in] | MC | Pointer to the MCF object. |
[in] | AImage | Handle to the source image to scan. |
[in] | Left | Left coordinate of the search area. |
[in] | Top | Top coordinate of the search area. |
[in] | Right | Right coordinate of the search area. |
[in] | Bottom | Bottom coordinate of the search area. |
[in] | Vote | Use voting mechanism for classification quality (see section Multiclass Classifiers, Vote and Multiclass Performance). |
[in] | PointSensity | Switch for sensitivity on dot-signs in class labels. |
[in] | MaxCount | Maximal number of results to be returned. To really get all the instances that are present, however, you should set this value significantly higher than the number of instances you expect to be present. |
[in] | Threshold | A threshold for the minimal confidence quality, for which a match is entered into the list of results. |
[in] | ASearchID | Search operation within the results list (see MCAppendResults). |
[in] | Xadvance | X-component of the advance vector. |
[in] | YAdvance | Y-component of the advance vector. |
[in] | Radius | Relative expectation window (as circle) for the next pattern. |
[out] | String | Result list for further treatment (e.g., with MCSearchResultsCount, MCSearchResultRef). |
TRUE
on success, FALSE
otherwise. bool MCReleaseResults | ( | SEARCHRESULTS | Results | ) |
This function frees the memory resources associated with a list of search results.
[in] | Results | A pointer to a list of search results as created by the function MCSearchAll. |
TRUE
on success, FALSE
if the calling parameters contain illegal data. bool MCRetractSearchResult | ( | SEARCHRESULTS | Results, |
long | Index | ||
) |
This function removes an individual search result from the list.
[in] | Results | A pointer to a list of search as created by the function MCSearchAll. |
[in] | Index | Zero-based position of the record to be removed. |
TRUE
on success, FALSE
if the calling parameters contain illegal data. bool MCSearch | ( | MCF | MC, |
IMG | AImage, | ||
cvbdim_t | Left, | ||
cvbdim_t | Top, | ||
cvbdim_t | Right, | ||
cvbdim_t | Bottom, | ||
bool | Vote, | ||
bool | DotSensitivity, | ||
bool | CreateResultImage, | ||
double & | XPos, | ||
double & | YPos, | ||
double & | Quality, | ||
char * | ClassID, | ||
IMG & | ResultImage | ||
) |
This function scans the frame (Left, Top, Right, Bottom) of the image AImage for best pattern match.
If the return value is TRUE
, the values of XPos and YPos give the position of the best match, Model is the corresponding class label and Quality is the classification quality. If no pattern was found, ClassID is an empty string and Quality equals zero.
For purposes of post processing the creation of a ResultImage can be requested by setting CreateResultImage to TRUE
. Note that a requested ResultImage should be released after use! For a more detailed description of the ResultImage see section The Search Function.
The parameter DotSensitivity controls the format of the returned ClassID name by building equivalent class names for class labels differing only after the control character "." (dot). If DotSensitive is activated and the best match pattern label is part of such a set of equivalent class names, ClassID will merely contain the first part of the class name i.e., the characters up to the dot sign. If DotSensitivity is FALSE
, the dot in a class name does not have a special meaning. Note that the excluded-class property of the classifier plays an important role during searching, since it can be used to condemn a class to inactivity during pattern match. For a thorough description of this important possibility see section Searching and Excluded Classes.
[in] | MC | Pointer to the MCF object. |
[in] | AImage | Handle to the source image to be scanned. |
[in] | Left | Left coordinate of the search area. |
[in] | Top | Top coordinate of the search area. |
[in] | Right | Right coordinate of the search area. |
[in] | Bottom | Bottom coordinate of the search area. |
[in] | Vote | Use voting mechanism for classification quality (see section Multiclass classifiers, vote and multiclass performance). |
[in] | DotSensitivity | Switch for sensitivity on dot-signs in class labels (see section Searching and Excluded Classes). |
[in] | CreateResultImage | Controls whether the ResultImage is created or not. |
[out] | XPos | X-coordinate of best match pattern. |
[out] | YPos | Y-coordinate of best match pattern. |
[out] | Quality | Classification quality for best match pattern. |
[out] | ClassID | Class label of best match pattern. |
[out] | ResultImage | Handle to the result image which can be used for post processing. |
TRUE
on success, FALSE
if either the colour dimension of AImage is not compatible to the MCF object or the search frame cannot hold any possible origins of a feature window without exceeding the image dimensions. bool MCSearchAll | ( | MCF | MC, |
IMG | AImage, | ||
cvbdim_t | Left, | ||
cvbdim_t | Top, | ||
cvbdim_t | Right, | ||
cvbdim_t | Bottom, | ||
bool | Vote, | ||
bool | DotSensitivity, | ||
long | MaxCount, | ||
double | Threshold, | ||
long | ASearchID, | ||
SEARCHRESULTS & | Results | ||
) |
This function scans the frame (Left, Top, Right, Bottom) of the image AImage to generate a list (Results) of pattern matches.
If the return value is TRUE
, the value of Results points to a corresponding list. Each entry of the list describes a corresponding match as explained in the description of MCSearchResult. The list can be manipulated by the functions MCReleaseResults, MCSearchResult, MCRetractSearchResult, MCSortResultsByConfidence, MCSortResultsByPosition, MCTruncateResults and MCAppendResults.
The parameter DotSensitivity functions as in MCSearch.
[in] | MC | Pointer to a MCF object. |
[in] | AImage | Handle to source image to be scanned. |
[in] | Left | Left coordinate of the search area. |
[in] | Top | Top coordinate of the search area. |
[in] | Right | Right coordinate of the search area. |
[in] | Bottom | Bottom coordinate of the search area. |
[in] | Vote | Use voting mechanism for classification quality (see section Multiclass Classifiers, Vote and Multiclass Performance). |
[in] | DotSensitivity | Switch for sensitivity on dot-signs in class labels. |
[in] | MaxCount | Maximal number of results to be returned. To really get all the instances that are present, however, you should set this value significantly higher than the number of instances you expect to be present. |
[in] | Threshold | A threshold for the minimal confidence quality, for which a match is entered into the list of results. |
[in] | ASearchID | ID to identify the search operation within the results list (see MCAppendResults). |
[out] | Results | Pointer to the list of results. The memory resources associated with this list must eventually be freed with a call to MCReleaseResults. See SEARCHRESULTS for further description. |
TRUE
on success, FALSE
if either the colour dimension of AImage is not compatible to the MCF object or the search frame cannot hold any possible origins of a feature window without exceeding the image dimensions. bool MCSearchAllEx | ( | MCF | MC, |
IMG | AImage, | ||
cvbdim_t | Left, | ||
cvbdim_t | Top, | ||
cvbdim_t | Right, | ||
cvbdim_t | Bottom, | ||
bool | Vote, | ||
bool | DotSensitivity, | ||
long | MaxCount, | ||
double | Threshold, | ||
long | ASearchID, | ||
long | Granularity, | ||
SEARCHRESULTS & | Results | ||
) |
This function scans the frame (Left, Top, Right, Bottom) of the image AImage to generate a list (Results) of pattern matches.
If the return value is TRUE
, the value of Results points to a corresponding list. Each entry of the list describes a corresponding match as explained in the description of MCSearchResult. The list can be manipulated by the functions MCReleaseResults, MCSearchResult, MCRetractSearchResult, MCSortResultsByConfidence, MCSortResultsByPosition, MCTruncateResults and MCAppendResults.
The parameter DotSensitivity functions as in MCSearch.
[in] | MC | Pointer to a MCF object. |
[in] | AImage | Handle to source image to be scanned. |
[in] | Left | Left coordinate of the search area. |
[in] | Top | Top coordinate of the search area. |
[in] | Right | Right coordinate of the search area. |
[in] | Bottom | Bottom coordinate of the search area. |
[in] | Vote | Use voting mechanism for classification quality (see section Multiclass Classifiers, Vote and Multiclass Performance). |
[in] | DotSensitivity | Switch for sensitivity on dot-signs in class labels. |
[in] | MaxCount | Maximal number of results to be returned. To really get all the instances that are present, however, you should set this value significantly higher than the number of instances you expect to be present. |
[in] | Threshold | A threshold for the minimal confidence quality, for which a match is entered into the list of results. |
[in] | ASearchID | ID to identify the search operation within the results list (see MCAppendResults). |
[in] | Granularity | Granularity with which the image will be searched. Every (2^Granularity)th pixel will be classified. The default is Granularity = Length of Preprocessing Code (this setting is used by MCSearchAll). Attention: Lowering Granularity will drastically increase processing time! |
[out] | Results | Pointer to the list of results. The memory resources associated with this list must eventually be freed with a call to MCReleaseResults. See SEARCHRESULTS for further description. |
TRUE
on success, FALSE
if either the colour dimension of AImage is not compatible to the MCF object or the search frame cannot hold any possible origins of a feature window without exceeding the image dimensions. PSRESULT MCSearchResult | ( | SEARCHRESULTS | Results, |
long | Index | ||
) |
This function returns a pointer to a record to access the data corresponding to an individual search result.
\a Results specifies the list, \a Index the zero based position within the list.
[in] | Results | A pointer to a list of search results as created by the function MCSearchAll. |
[in] | Index | Zero-based position of the record. |
bool MCSearchResultRef | ( | SEARCHRESULTS | Results, |
long | Index, | ||
PSRESULT | Result | ||
) |
This function returns a pointer to a record to access the data corresponding to an individual search result from a SEARCHRESULTS result list.
Results specifies the list, Index the zero based position within the list.
[in] | Results | A pointer to a list of search results as created by the function MCSearchAll. |
[in] | Index | Zero-based position of the record. |
[out] | Result | Extracted result as defined in PSRESULT. |
TRUE
on success, FALSE
if the calling parameters contain illegal data. long MCSearchResultsCount | ( | SEARCHRESULTS | Results | ) |
This function returns the number of records in the specified list.
[in] | Results | A pointer to a list of search as created by the function MCSearchAll. |
bool MCSeparateResults | ( | SEARCHRESULTS | Results, |
long | Separation | ||
) |
This function thins out the list by a given separation parameter.
This function first sorts the list by decreasing confidence. Then it considers all items, starting with the best, and deletes all those entries from the rest of the list, whose coordinates differ from the given item by less than the Separation parameter. The effect is to thin out the list, retaining the best items in each square of side length 2*\a Separation.
[in,out] | Results | A pointer to a list of search as created by the function MCSearchAll. |
[in] | Separation | Spatial separation (in pixels) of the items of the resulting list. |
TRUE
on success, if
the calling parameters contain illegal data. bool MCSortResultsByConfidence | ( | SEARCHRESULTS | Results | ) |
This function sorts the list of results by decreasing confidence, so that the best results come first in the list.
[in] | Results | A pointer to a list of search as created by the function MCSearchAll. |
TRUE
on success, if
the calling parameters contain illegal data. bool MCSortResultsByPosition | ( | SEARCHRESULTS | Results, |
double | X, | ||
double | Y | ||
) |
This function sorts the list in the direction specified by the vector (X,Y).
[in] | Results | A pointer to a list of search as created by the function MCSearchAll. |
[in] | X | X-direction of the vector whose argument gives the sorting direction. The modulus is ignored. |
[in] | Y | Y-direction of the vector whose argument gives the sorting direction. The modulus is ignored. |
TRUE
on success, if
the calling parameters contain illegal data. This function probes the classification capabilities of a MCF object by means of a SIL TestList containing appropriate test samples.
[in] | MC | Pointer to the MCF object. |
[in] | TestList | Pointer to the SIL object containing test samples. |
[in] | Vote | Specifies the voting mechanism for classification quality. |
[out] | ErrorRate | Determined rate of misclassification in percent. |
TRUE
on success, FALSE
if the MC and TestList are not compatible that means that either feature window dimensions or sample origins or colour resolutions differ. bool MCTruncateResults | ( | SEARCHRESULTS | Results, |
long | N | ||
) |
This function retains the first N items in the list, deleting the rest.
[in,out] | Results | A pointer to a list of search as created by the function MCSearchAll. |
[in] | N | Number of leading items to be kept. |
TRUE
on success, if
the calling parameters contain illegal data. void ReleaseMC | ( | MCF | MC | ) |
void SetMCComment | ( | MCF | MC, |
const char * | Comment | ||
) |
void SetMCExcludedClass | ( | MCF | MC, |
const char * | ClassID | ||
) |
This function specifies the excluded class during subsequent calls of MCSearch.
Specify an empty string for \a ClassID if no class should be excluded (default). See section <i>Searching and Excluded Classes</i> for further details.
[in] | MC | Pointer to a MCF object. |
[in] | ClassID | ID of excluded class or empty string. |
void ShareMC | ( | MCF | MC | ) |
bool StoreMC | ( | const char * | Filename, |
MCF | MC | ||
) |