Lumiavis
Lumiavis is a lightweight Rust library for camera capture, image processing, and simple video pipelines.
It provides a minimal, clean abstraction over:
- webcam capture (V4L2)
- image decoding (MJPEG → RGB)
- image operations (resize, crop, grayscale, draw)
- preview rendering
- video export (JPEG sequence → MP4 via ffmpeg)
✨ Features
- 📷 Camera capture (V4L2)
- 🖼️ Image decoding (MJPEG → RGB)
- 🧩 Image ops:
- resize
- crop
- grayscale
- draw rectangle
- 🖥️ Preview window (via examples)
- 🎞️ Capture to JPEG sequence
- 🎬 Export MP4 using ffmpeg
🚀 Quick Example
Capture and Save One Frame
use ;
Capture Video (JPEG Sequence)
use ;
let config = new
.with_resolution
.with_fps
.with_format;
let camera = open?;
let mut session = new;
let stats = session.capture_to_jpeg_sequence?;
println!;
Export to MP4
Requires ffmpeg:
use ;
let options = default;
export_jpeg_sequence_to_mp4?;
📦 Architecture
Camera → Frame → decode → Image → ops → render/export
⚠️ Notes
- MJPEG decoding is CPU-heavy
- MP4 export uses external ffmpeg
- Preview is provided via examples
License
MIT