Image Composition - Rectify Image
Run the image rectification operation against an image with 4 control points provided in the parameter.
POST /imagecomposition:rectify?api-version=2023-04-01-preview
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
api-version
|
query | True |
string |
Requested API version. |
Request Body
Media Types: "application/json-patch+json"
| Name | Required | Type | Description |
|---|---|---|---|
| controlPoints | True |
Four corner control points for rectification. The origin is at top-left. |
|
| url | True |
string (uri) |
Source image blob URL. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
file |
Success Media Types: "image/jpeg", "application/json" |
| Other Status Codes |
Error Media Types: "image/jpeg", "application/json" Headers x-ms-error-code: string |
Examples
ImageComposition_Rectify
Sample request
POST /imagecomposition:rectify?api-version=2023-04-01-preview
{
"url": "https://example.com/image.jpg",
"controlPoints": {
"topLeft": {
"x": 0.1,
"y": 0.1
},
"topRight": {
"x": 0.9,
"y": 0.1
},
"bottomLeft": {
"x": 0.1,
"y": 0.9
},
"bottomRight": {
"x": 0.9,
"y": 0.9
}
}
}
Sample response
"Ynl0ZXM="
Definitions
| Name | Description |
|---|---|
|
Error |
Response returned when an error occurs. |
|
Error |
Error info. |
|
Error |
Detailed error. |
|
Image |
Four corner control points for rectification. The origin is at top-left. |
|
Image |
Image rectification input. |
|
Normalized |
Normalized XY-coordinate. |
ErrorResponse
Response returned when an error occurs.
| Name | Type | Description |
|---|---|---|
| error |
Error info. |
ErrorResponseDetails
Error info.
| Name | Type | Description |
|---|---|---|
| code |
string |
Error code. |
| details |
List of detailed errors. |
|
| innererror |
Detailed error. |
|
| message |
string |
Error message. |
| target |
string |
Target of the error. |
ErrorResponseInnerError
Detailed error.
| Name | Type | Description |
|---|---|---|
| code |
string |
Error code. |
| innererror |
Detailed error. |
|
| message |
string |
Error message. |
ImageRectificationControlPointsApiModel
Four corner control points for rectification. The origin is at top-left.
| Name | Type | Description |
|---|---|---|
| bottomLeft |
Normalized XY-coordinate. |
|
| bottomRight |
Normalized XY-coordinate. |
|
| topLeft |
Normalized XY-coordinate. |
|
| topRight |
Normalized XY-coordinate. |
ImageRectificationRequestApiModel
Image rectification input.
| Name | Type | Description |
|---|---|---|
| controlPoints |
Four corner control points for rectification. The origin is at top-left. |
|
| url |
string (uri) |
Source image blob URL. |
NormalizedCoordinateApiModel
Normalized XY-coordinate.
| Name | Type | Description |
|---|---|---|
| x |
number (double) minimum: 0maximum: 1 |
Horizontal coordinate. |
| y |
number (double) minimum: 0maximum: 1 |
Vertical coordinate. |