Zum Inhalt
HALOWERK

Medienwerk

oss opencv robust planar homography

Fits a 2D projective transform between two point sets with RANSAC at a caller-chosen reprojection threshold, and returns both the homography and the inlier mask. The mask is what makes this useful beyond a plain fit: bad correspondences are named rather than quietly averaged in, so a caller can re-run detection, drop a frame or raise an alarm. Suitable for document rectification, planar tracking and image stitching where the scene really is flat.

POST https://medien.halowerk.com/v1/oss-opencv-robust-planar-homography

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
source_pointsarrayJa
target_pointsarrayJa
reprojection_thresholdnumberJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "source_points": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number",
          "minimum": -1000000000,
          "maximum": 1000000000
        },
        "minItems": 2,
        "maxItems": 2
      },
      "minItems": 4,
      "maxItems": 2048
    },
    "target_points": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number",
          "minimum": -1000000000,
          "maximum": 1000000000
        },
        "minItems": 2,
        "maxItems": 2
      },
      "minItems": 4,
      "maxItems": 2048
    },
    "reprojection_threshold": {
      "type": "number",
      "minimum": 0.1,
      "maximum": 10
    }
  },
  "required": [
    "source_points",
    "target_points",
    "reprojection_threshold"
  ],
  "additionalProperties": false,
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Numeric JSON arrays only. Additionally enforce equal paired dimensions, nondegenerate geometry, maximum 32768 pixels/image, 131072 scalars/array, and 1048576 encoded bytes. No paths or network resources."
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "source_points": [
    [
      5,
      10
    ],
    [
      35,
      10
    ],
    [
      70,
      10
    ],
    [
      100,
      10
    ],
    [
      5,
      50
    ],
    [
      35,
      50
    ],
    [
      70,
      50
    ],
    [
      100,
      50
    ],
    [
      5,
      90
    ],
    [
      35,
      90
    ],
    [
      70,
      90
    ],
    [
      100,
      90
    ]
  ],
  "target_points": [
    [
      16.923842707814835,
      4.081632653061225
    ],
    [
      51.986267778322706,
      4.61010299166258
    ],
    [
      91.61041465766635,
      5.207328833172614
    ],
    [
      124.52471482889733,
      5.703422053231939
    ],
    [
      20.74074074074074,
      39.604938271604944
    ],
    [
      55.47445255474452,
      39.61070559610705
    ],
    [
      94.73684210526316,
      39.61722488038278
    ],
    [
      127.35849056603773,
      39.62264150943396
    ],
    [
      24.497795198432144,
      74.57128858402744
    ],
    [
      58.90873973925639,
      74.07049734427812
    ],
    [
      97.81576448243115,
      73.50427350427351
    ],
    [
      180.1498127340824,
      13.033707865168537
    ]
  ],
  "reprojection_threshold": 1
}

Ergebnis & Dokumentation

Veröffentlichtes Ergebnisschema anzeigen
{
  "$ref": "https://medien.halowerk.com/v1/oss-opencv-robust-planar-homography/schema#/outputSchema"
}

Veröffentlichtes Ergebnisbeispiel öffnen

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →