Skip to content

clipLine

Image processingfunctionOpenCV 5.0.0
import { clipLine } from '@banou/opencv-wasm'

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

ARGUMENTSimgRect
FUNCTIONclipLine
RETURN TYPEclipLineResult
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Clips the line against the image rectangle.

The function cv::clipLine calculates a part of the line segment that is entirely within the specified rectangle. It returns false if the line segment is completely outside the rectangle. Otherwise, it returns true .

clipLine(imgRect: Rect): clipLineResult;
imgRect

Image rectangle.

Returns

The clipLineResult result. Scalar output parameters are returned as named fields in this object. Release returned native handles with using or delete(), including handles nested in results.

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.