enhanceCalibrationForImage(params: Object)
Requires:
AIKit≥1.4.1@ray-js/ray≥1.7.37
Platforms:
iOSAndroid
Description
Image distortion correction
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 |
inputImagePath | string | Yes | - | Image input path | - |
outputImagePath | string | Yes | - | Image output path | - |
interpolationType | 1 | 2 | 3 | 4 | 5 | No | 1 | Interpolation type | - |
ratio | number | Yes | - | Scale | - |
fCx | number | Yes | - | Camera intrinsic Cx | - |
fCy | number | Yes | - | Camera intrinsic Cy | - |
fFx | number | Yes | - | Camera intrinsic Fx | - |
fFy | number | Yes | - | Camera intrinsic Fy | - |
fK1 | number | Yes | - | Camera radial distortion coefficient K1 | - |
fK2 | number | Yes | - | Camera radial distortion coefficient K2 | - |
fK3 | number | Yes | - | Camera radial distortion coefficient K3 | - |
fP1 | number | Yes | - | Camera tangential distortion coefficient P1 | - |
fP2 | number | Yes | - | Camera tangential distortion coefficient P2 | - |
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
interpolationType
| Value | Description | AIKit Since |
|---|---|---|
1 | Default, BILINEAR | - |
2 | BILINEAR | - |
3 | BICUBIC | - |
4 | LANZCOS | - |
5 | EDGE | - |