Returns the four vertex coordinates of the document in the image. If no document is present, returns the four vertex coordinates of the image. If some vertices of the document are outside the image, returns the intersection of the document boundary and image boundary.
POST /v1/document/corners
| Parameter Name | Data Type | Required | Description |
|---|---|---|---|
| image | file | Yes | Document image. Currently supports most formats like jpg, png, bmp, etc. Note that the data format of the request body should be FormData. File size should not exceed 10M, and image width and height should be between 50 and 10000 pixels. |
| Parameter Name | Data Type | Description |
|---|---|---|
| code | int | 0 indicates a normal return; other values refer to the error code description. |
| data | object | |
| exists | bool | Indicates if a document exists. |
| corners | array | The four vertex coordinates of the document. If no document is detected, corners will return the four vertext coordinates of the original input image. |
{
"code": 0,
"data": {
"corners": [
[
283,
6
],
[
283,
4013
],
[
2633,
6
],
[
2633,
4013
]
],
"exists": true
}
}