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

ImageRectificationControlPointsApiModel

Four corner control points for rectification. The origin is at top-left.

url True

string

Source image blob URL.

Responses

Name Type Description
200 OK

file

Success

Media Types: "image/jpeg", "application/json"

Other Status Codes

ErrorResponse

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
ErrorResponse

Response returned when an error occurs.

ErrorResponseDetails

Error info.

ErrorResponseInnerError

Detailed error.

ImageRectificationControlPointsApiModel

Four corner control points for rectification. The origin is at top-left.

ImageRectificationRequestApiModel

Image rectification input.

NormalizedCoordinateApiModel

Normalized XY-coordinate.

ErrorResponse

Response returned when an error occurs.

Name Type Description
error

ErrorResponseDetails

Error info.

ErrorResponseDetails

Error info.

Name Type Description
code

string

Error code.

details

ErrorResponseDetails[]

List of detailed errors.

innererror

ErrorResponseInnerError

Detailed error.

message

string

Error message.

target

string

Target of the error.

ErrorResponseInnerError

Detailed error.

Name Type Description
code

string

Error code.

innererror

ErrorResponseInnerError

Detailed error.

message

string

Error message.

ImageRectificationControlPointsApiModel

Four corner control points for rectification. The origin is at top-left.

Name Type Description
bottomLeft

NormalizedCoordinateApiModel

Normalized XY-coordinate.

bottomRight

NormalizedCoordinateApiModel

Normalized XY-coordinate.

topLeft

NormalizedCoordinateApiModel

Normalized XY-coordinate.

topRight

NormalizedCoordinateApiModel

Normalized XY-coordinate.

ImageRectificationRequestApiModel

Image rectification input.

Name Type Description
controlPoints

ImageRectificationControlPointsApiModel

Four corner control points for rectification. The origin is at top-left.

url

string

Source image blob URL.

NormalizedCoordinateApiModel

Normalized XY-coordinate.

Name Type Description
x

number

Horizontal coordinate.

y

number

Vertical coordinate.