Manto OCX Reference 14.0
Methods

Functions

long ClassIndexFromClassID (BSTR ClassID)
 This method returns the class index for the specified class ID. More...
 
boolean Execute (void)
 Executes the search task that has been defined through the settings of the search parameter related properties (#Entire, #X0,#Y0, #X1, #Y1, #SearchTask, #Threshold, #ExcludedClassID, #UseVoting, #UseDotSensitivity, #Locality and #Image, potentially also #AdvanceX, #AdvanceY and #Radius). More...
 
boolean LoadClassifier (BSTR FileName)
 Loads the classifier from the file with the name specified in the #FileName parameter. More...
 
boolean LoadClassifierByDialog (void)
 Displays a standard file browsing dialog that allows a user to select a classifier file to be loaded. More...
 

Detailed Description

Function Documentation

◆ ClassIndexFromClassID()

long ClassIndexFromClassID ( BSTR  ClassID)

This method returns the class index for the specified class ID.

Manto uses two approaches for referencing classes inside a classifier (classes and 
their IDs are defined during generation of the Sample Image List from which the 
classifier is subsequently generated). One is index-based (with the index 
ranging from 0 to #NumClasses - 1) and one is through the \ref ClassID "class IDs" (their 
user-defined literal names). The method #ClassIndexFromClassID provides a 
mapping from a class's ID to its index.
Attention
Note that class indices start at zero.
Parameters
[in]ClassIDSpecified class ID.
Returns
< 0 if either no classifier has been loaded yet or the indicated #ClassID was not found in the classifier.
Supported platforms:
Win32

◆ Execute()

boolean Execute ( void  )

Executes the search task that has been defined through the settings of the search parameter related properties (#Entire, #X0,#Y0, #X1, #Y1, #SearchTask, #Threshold, #ExcludedClassID, #UseVoting, #UseDotSensitivity, #Locality and #Image, potentially also #AdvanceX, #AdvanceY and #Radius).

The number of found patterns is stored in the #ObjectCount property after the search has been successfully carried out. If no pattern was found, #ObjectCount is 0.

The function performs a validation of the property values in advance. If the search fails or the parameter set is inconsistent, #Execute returns FALSE. Keep in mind that for a Manto search to succeed, the dimension of the classifier (see property #Dimension) and the dimension of the image must match, and also the Image must be big enough to hold at least one complete feature window of the Manto classifier (accessible through the properties #FeatureWindowWidth and #FeatureWindowHeight).

Returns
TRUE if succeeded, FALSE on failure.
Supported platforms:
Win32

◆ LoadClassifier()

boolean LoadClassifier ( BSTR  FileName)

Loads the classifier from the file with the name specified in the #FileName parameter.

Attention
Notice that you have to load a classifier that was generated using the Manto Teach application or with the CreateMCFromImageList function of the Manto library before you can perform any searches or classifications with the Manto OCX.
Parameters
[in]FileNamePath to the classifier file to be loaded.
Returns
TRUE if succeeded, FALSE on failure.
If file does not exist or is corrupt, the method returns FALSE. If the method returns successfully the #Classifier property will change as well as the #FileName property.
Supported platforms:
Win32

◆ LoadClassifierByDialog()

boolean LoadClassifierByDialog ( void  )

Displays a standard file browsing dialog that allows a user to select a classifier file to be loaded.

If the method returns successfully the #Classifier property will change as well as the #FileName property. 
Attention
Note that you have to load a classifier that was generated using the Manto Teach application or with the CreateMCFromImageList function of the Manto library before you can perform any searches or classifications with the Manto OCX.
Returns
TRUE if succeeded, FALSE on failure.
If the dialog is closed by selecting "Ok", an attempt to load the indicated classifier file will be made. If this attempt fails or the dialog is closed by clicking "Cancel", the function will return FALSE.
Supported platforms:
Win32