Appery Image Labeling
Image Labeling
ImageLabelRecognizer.recognizeImageLabel
Parameters
- {string} filePath - path to image
- {function} success - callback function which takes a parameter data which will be invoked on success
- {function} error - callback function which takes a parameter err which will be invoked on failure
Supported Options
property | value | description |
---|---|---|
customModel | Custom model file name | |
useBase64 | false (default) / true | Whether or not filePath is a base64 encoded string. |
Example:
window.ApperyioMLCordovaPlugin.ImageLabelRecognizer.recognizeImageLabel('filePath', successCallback, errorCallback)
Sample JSON callback: image_label_recognition.json
ImageLabelRecognizer.startRealTimeDetection
Parameters
- {function} success - callback function which takes a parameter data which will be invoked on success
- {function} error - callback function which takes a parameter err which will be invoked on failure
Supported Options
property | value | description |
---|---|---|
frameImageData | true (default) / false | Whether include base64 of captured photo or not |
frameImageResultType | CameraResultType.BASE64_STRING (default) / CameraResultType.DATA_URL | include captured photo as only base64 string or as full data url |
encodingType | EncodingType.JPEG (default) / EncodingType.PNG | format of output photo base64 |
cameraDirection | CameraDirection.BACK (default) / CameraDirection.FRONT | Use back or front camera of device during object detection |
delay | 500 (default) | Time interval in msec, for performing detection each interval value |
showDetectedLabels | false/ true (default) | Whether or not show detected labels text on video overlay |
Example:
window.ApperyioMLCordovaPlugin.ImageLabelRecognizer.recognizeImageLabel(successCallback, errorCallback,
{
frameImageData: true,
frameImageResultType: this.window.ApperyioMLCordovaPlugin.ImageLabelRecognizerOptions.CameraResultType.BASE64_STRING,
delay: 100,
encodingType: this.window.ApperyioMLCordovaPlugin.ImageLabelRecognizerOptions.EncodingType.JPEG,
cameraDirection: this.window.ApperyioMLCordovaPlugin.ImageLabelRecognizerOptions.CameraDirection.BACK,
showDetectedLabels: true
})
Sample JSON callback: image_label_recognition_realtime.json
ImageLabelRecognizer.stopRealTimeDetection
Parameters
- {function} success - callback function which takes a parameter data which will be invoked on success
- {function} error - callback function which takes a parameter err which will be invoked on failure
Example:
window.ApperyioMLCordovaPlugin.ImageLabelRecognizer.stopRealTimeDetection(successCallback, errorCallback)
Updated 3 months ago