getClosestEllipsePoints
import { getClosestEllipsePoints } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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_paramsEllipse parameters
pointsInput 2d points
closest_ptsOutput 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.