objectDetectForImage(params: Object)
Requires:
AIKit≥1.1.0@ray-js/ray≥1.6.29
Platforms:
iOSAndroid
Description
Run object recognition on an image
Parameters
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
inputPath | string | Yes | - | Image input path |
outputPath | string | Yes | - | Image output path |
detectType | 1 | 2 | No | 1 | Recognition type |
imageEditType | 1 | 2 | 3 | No | 1 | Image processing type |
complete | () => void | No | - | Completion callback (executed on both success and failure) |
success | (params: Object) => void | No | - | Callback on successful API call |
fail | (params: Object) => void | No | - | Failure callback |
success callback parameters
| Property | Type | Description |
|---|---|---|
path | string | Output path |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None
Valid Values
detectType
| Value | Description | AIKit Since |
|---|---|---|
1 | Pets | - |
2 | People | - |
imageEditType
| Value | Description | AIKit Since |
|---|---|---|
1 | No effect | - |
2 | Emphasize subject | - |
3 | Privacy protection | v1.2.0 |