# rust-detector — plugins ViON

Source : https://vionvision.tech/fr/plugins/analytics/rust-detector

Native Rust motion/object detector of VION

- Paquet : @vionvision/rust-detector
- Groupe: Analyse vidéo et audio
- Version: 0.0.13
- Licence: MIT
- https://npm.vionvision.tech/-/web/detail/@vionvision/rust-detector
- https://github.com/atva0408-create/Vion-platform/tree/main/rust-detector#readme

## Description technique

Native Rust motion/object detector of VION.

Built with [napi-rs](https://napi.rs) — ships prebuilt binaries for Linux x64 and arm64 (glibc) and Windows x64, the platforms of VION, so there is no compile step on install.

## Installation

```bash
npm install @vionvision/rust-detector --registry https://npm.vionvision.tech
```

## Usage

```ts
import { ImageProcessor } from '@vionvision/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

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

---

Built and published by VION from atva0408-create/Vion-platform (`packaging/napi/build.sh`), from the code of the camera.ui author.
