---
title: "Calculate Homography"
method: POST
path: "/images/calculate-homography"
tags: ["images"]
---

# Calculate Homography

`POST /images/calculate-homography`

Calculate homography matrix from image points to real-world points.

Args:
    request: HomographyRequest containing:
        - image_points: List of [x, y] coordinates in image space
        - real_world_points: List of [x, y] coordinates in real-world space

Returns:
    HomographyResponse with the 3x3 homography matrix

## Request body

- HomographyRequest
  - `image_points` array[], required
    - number[]
  - `real_world_points` array[], required
    - number[]

## Response `200`

Successful Response

- HomographyResponse
  - `homography_matrix` array[], required
    - number[]

## Other responses

- `404` — Not found
- `422` — Validation Error

---

[API](https://skmtc.dev/rmfg/apis/fastapi.md) · [All operations](https://skmtc.dev/rmfg/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rmfg/fastapi/revisions/17a4ad42a016/schema)
