UNPKG

homography-transform

Version:

A robust TypeScript implementation of homography-based transformation between 2D planes, ideal for computer vision and image mapping

17 lines (16 loc) 518 B
import { Plane, Point } from './Plane.js'; export interface PointPair { source: Point; target: Point; } export declare class PlaneTransformer { private readonly sourcePlane; private readonly targetPlane; private readonly correspondingPoints; private homographyMatrix; constructor(sourcePlane: Plane, targetPlane: Plane, correspondingPoints: PointPair[]); private validatePoints; private computeHomography; transform(point: Point): Point; getTransformationError(): number; }