Skip to main content
Version: Next

Function: decodeBox()

decodeBox<F>(tuple, format): BoundingBox<F>

Defined in: extensions/cv/ops/box.ts:57

Decodes bounding box coordinates from a 4-tuple into a structured BoundingBox object.

Type Parameters

F

F extends "xyxy" | "xywh" | "cxcywh"

Bounding box coordinate format.

Parameters

tuple

[number, number, number, number]

A 4-tuple array containing coordinates.

format

F

The coordinate format to decode into.

Returns

BoundingBox<F>

The decoded BoundingBox object.