Kofax Mobile SDK API Reference
|
Go to the source code of this file.
Functions | |
int | loadConfigurationFile: (NSString *configFileName) |
Loads a file that contains the configuration values for the classifier. More... | |
int | loadModel: (NSString *modelFileName) |
Loads a model file that contains the knowledge source for classification. More... | |
int | classifyImage: (kfxKEDImage *imageToClassify) |
Starts the image classification process. More... | |
Variables | |
__deprecated_msg("Deprecated in SDK 3.4.")@protocol kfxKCLDelegate< NSObject > @optional-(void) imageClassifier end __deprecated_msg("Deprecated in SDK 3.4.")@interface kfxKCLImageClassifier int | maxNumberOfResults |
Image Classification Protocol. More... | |
|
virtual |
Starts the image classification process.
A configuration and model must be loaded before calling classifyImage. Classification will be performed asynchronously. Once classification is complete, the delegate will receive a imageClassifier:status:statusMsg:image: message.
After classification, an array of classification results will be saved in the input image.
imageToClassify | A kfxKEDImage object containing the image that needs classification. |
KMC_SUCCESS | Classification started without error. |
KMC_EV_LICENSING | A valid license has not yet been set. |
KMC_CL_CONFIG_NOT_LOADED | A configuration has not been loaded. |
KMC_CL_MODEL_NOT_LOADED | A model has not been loaded. |
KMC_CL_CLASSIFIER_BUSY | A classification is already in progress. |
KMC_CL_NO_IMAGE_SUPPLIED | A null image was passed in. |
KMC_CL_INVALID_IMAGE_SUPPLIED | The input image had no valid bitmap or file. |
|
virtual |
Loads a file that contains the configuration values for the classifier.
Both a configuration and model must be loaded before starting a classify operation.
configFileName | Full path to the configuration file. |
KMC_SUCCESS | The configuration loaded without error. |
KMC_EV_LICENSING | A valid license has not yet been set. |
KMC_CL_CONFIG_NULL | The configFileName parameter was null or empty. |
KMC_CL_CLASSIFIER_BUSY | A classification is already in progress. |
KMC_GN_FILE_NOT_FOUND | The configuration file could not be found. |
|
virtual |
Loads a model file that contains the knowledge source for classification.
Both a configuration and model must be loaded before starting a classify operation.
modelFileName | Full path to the model file. |
KMC_SUCCESS | The model loaded without error. |
KMC_EV_LICENSING | A valid license has not yet been set. |
KMC_CL_MODEL_NULL | The modelFileName parameter was null or empty. |
KMC_CL_CLASSIFIER_BUSY | A classification is already in progress. |
KMC_GN_FILE_NOT_FOUND | The model file could not be found. |
|
readwriteassign |
Image Classification Protocol.
The kfxKCLDelegate defines the protocol for all the delegates the Image Classification Engine during processing. Only a single delegate is defined, which signals the completion of asynchronous classification operations.Classification Complete Delegate The engine calls this delegate when a classification operation is complete. The image parameter is the same image that was passed into the corresponding classifyImage call. The classification results are available through the image's classificationResults property.
imageClassifier | The imageClassifier instance that invoked the delegate. |
status | The status of the completed classification. |
statusMsg | A message corresponding to the given status. |
image | The image classification was performed on, with results set internally.The Image Classifier Class Framework: libKfxEngines Import suggestion: #import <kfxLibEngines/kfxEngines.h> Relevant Header File: kfxKCLImageClassifier.h An instance of this class contains methods to classify images based on a given configuration and model. An example of classification would be taking captured images of drivers licenses and classifying them by the issuing state. The configuration files for use with this API are contained in the SDK in the "Configuration Files" folder of the SDK deliverable. Use the Configuration file (driverslicense_config.xml) with the loadConfigurationFile method to setup the classifier to classify United States drivers licenses. Use the model file (driverslicense_model.xml) with the loadModel method to setup the model for the classifier. Once these files are loaded, you can use the classifyImage method to determine what type of drivers license is contained in the kfxKEDImage object. Example of how to get an object to work with the classifier, initializing the classifier and classifying an image. 7 NSString* procImage = [myBundle pathForResource:@"imageToClassify" ofType:@"jpg"]; // a picture of a US Driver's license.
Licensing** This is a license protected class. Certain methods in this object are protected by a license mechanism. If you attempt to use these methods without setting the license, then you will receive the KMC_IP_LICENSE_INVALID error code. Refer to the method descriptions to determine what methods are license protected. In order to set your license, you need to use the setMobileSDKLicense method on the kfxKUTLicensing object. Example code is provided to show you how to set your license, which can be found in the kfxKUTLicensing class of the kfxUtilities framework. You must set this delegate to the reference of an object that will process messages at the end of classification. This is usually "self" of the object using the classifier.The maximum number of results to return from a classify operation. Acceptable values are in the range [1, 64]. The default value is 1. |