Skip to content

getClosestEllipsePoints

geometryfunctionOpenCV 5.0.0
import { getClosestEllipsePoints } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSellipse_params, points, closest_pts
FUNCTIONgetClosestEllipsePoints
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

example: samples/python/snippets/fitline.py An example for fitting line in python Compute for each 2d point the nearest 2d point located on a given ellipse.

The function computes the nearest 2d location on a given ellipse for a vector of 2d points and is based on [Chatfield2017] code. This function can be used to compute for instance the ellipse fitting error.

Note: Input point types are Point2i or Point2f See: fitEllipse, fitEllipseAMS, fitEllipseDirect

getClosestEllipsePoints(ellipse_params: RotatedRect, points: Mat, closest_pts: Mat): void;
ellipse_params

Ellipse parameters

points

Input 2d points

closest_pts

Output destination, filled by the native operation. For each 2d point, their corresponding closest 2d point located on a given ellipse

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.