Skip to content

cameraui/rust-detector

Repository files navigation

@camera.ui/rust-detector

Native Rust motion/object detector for the camera.ui ecosystem.

Built with napi-rs — ships prebuilt binaries for Linux (glibc/musl), macOS, Windows and FreeBSD across x64, arm64 and riscv64, so there is no compile step on install.

Installation

npm install @camera.ui/rust-detector

Usage

import { ImageProcessor } from '@camera.ui/rust-detector';

const processor = new ImageProcessor(width, height);

// frame: grayscale Uint8Array of length width * height
const boxes = processor.processImage(frame, threshold, kernelSize, dilateSize, minArea);
// boxes: Array<[x, y, w, h]>

reconfigure(width, height) resizes the processor and resetState() clears the internal frame state between streams.

Development

npm install
npm run build        # release build (napi build --platform --release)
npm run build:debug  # debug build
npm run lint         # cargo clippy + eslint

Part of the camera.ui ecosystem - A comprehensive camera management solution.

About

Native Rust motion/object detector for camera.ui.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors