enhanceClarityForImage(params: Object)
Requires:
AIKit≥1.4.1@ray-js/ray≥1.7.37
Platforms:
iOSAndroid
Description
Image clarity enhancement processing
Parameters
| Property | Type | Required | Default | Description | AIKit Since |
|---|---|---|---|---|---|
trace_id | string | Yes | - | Link ID | v2.1.0 |
device_id | string | Yes | - | Device ID | v2.1.0 |
scene_type | string | Yes | - | Business type | v2.1.0 |
devId | string | Yes | - | Device ID | v2.0.1 |
inputImagePath | string | Yes | - | Image input path | - |
outputImagePath | string | Yes | - | Image output path | - |
enhanceOutputResolution | 1 | 2 | 3 | No | 1 | Desired output image resolution Default maximum output is 1080p; if lower than 1080p, the output follows the input size | - |
enhanceType | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | No | 1 | Image enhancement 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 |
|---|---|---|
outputImagePath | string | Image URL |
enhanceSuccess | boolean | Whether processing succeeded |
enhanceFaileReason | string | Failure reason |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None
Valid Values
enhanceOutputResolution
| Value | Description | AIKit Since |
|---|---|---|
1 | Native size | - |
2 | 640 | - |
3 | 720 | - |
enhanceType
| Value | Description | AIKit Since |
|---|---|---|
1 | No action, default | - |
2 | Noise reduction | - |
3 | Low-light enhancement | - |
4 | Super-resolution | - |
5 | Noise reduction + low-light enhancement | - |
6 | Noise reduction + super-resolution | - |
7 | Low-light enhancement + super-resolution | - |
8 | Noise reduction + low-light enhancement + super-resolution | - |