petsPictureQualityDetectForImage(params: Object)
Requires:
AIKit≥1.3.0@ray-js/ray≥1.7.20
Platforms:
iOSAndroid
Description
Pet image quality detection
Parameters
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
inputImagePath | string | Yes | - | Image input path |
labelAllow | 1 | 2 | No | 1 | Recognition type enum |
objectAreaPercent | number | Yes | - | Ratio of the detected object size to the entire image; default 30, meaning: filter out if less than 30% |
objectFaceRotationAngle | number | Yes | - | Face rotation angle of the detected object; default 45, meaning: filter out if over 45% |
objectFaceSideAngle | number | Yes | - | Face profile angle of the detected object; default 40, meaning: filter out if over 40% |
maximumPictureBrightness | number | Yes | - | Maximum brightness |
minimumPictureBrightness | number | Yes | - | Minimum brightness |
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 |
|---|---|---|
imagePath | string | Image URL |
lowQuality | boolean | Whether the image is low quality |
lowQualityReason | number | Reason for low quality |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None
Valid Values
labelAllow
| Value | Description | AIKit Since |
|---|---|---|
1 | Cat | v1.7.0 |
2 | Dog | v1.7.0 |