Skip to content

arcLength

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

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

ARGUMENTScurve, closed
FUNCTIONarcLength
RETURN TYPEnumber
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Calculates a contour perimeter or a curve length.

The function computes a curve length or a closed contour perimeter.

arcLength(curve: Mat, closed: boolean): number;
curve

Input vector of 2D points, stored in std::vector or Mat.

closed

Flag indicating whether the curve is closed or not.

Returns

The number result.

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.