Expand description
Fixed-buffer preprocess helpers (Phase 1/V1).
Hot path: no heap. Caller supplies workspace and output buffers.
Functions§
- iou_u16
- IoU of two axis-aligned boxes in normalized u16 coordinates.
- letterbox_
rgb8 - Letterbox RGB into square/out buffer with grey pad (114). Returns scale and pad (x,y) as u32 pixels.
- letterbox_
workspace_ bytes - Workspace bytes for letterbox RGB8 of size
out_w × out_h. - nms_
class_ agnostic - Class-agnostic NMS into
out(copies survivors). Returns count written.workspacemust hold at leastnbool flags as bytes (0/1). - normalize_
rgb8_ to_ f32_ chw - Normalize RGB8 to planar f32 CHW in
out(len ≥ 3 * w * h). Mean/std per channel. - resize_
nearest_ rgb8 - Nearest-neighbour resize RGB8 → RGB8 into caller buffer (
out_w * out_h * 3bytes).