Lumiavis provides a minimal and clean abstraction over V4L2 (Linux) and Media Foundation (Windows) to capture high-quality webcam frames. Beyond simple capture, it includes a robust image processing pipeline to load, manipulate, and export images and video sequences effortlessly.
✨ Features
- 🎥 Cross-Platform Capture: Automatically negotiates the best resolution and framerate without messy boilerplate.
- 🖼️ Image Processing: Easily load images from disk, resize, crop, and apply grayscale filters.
- 🖌️ Annotations: Draw geometric shapes, text, bounding boxes, and real-time FPS overlays.
- 🎞️ Video Export: Capture a sequence of JPEGs and compile them into an MP4 video using our FFmpeg bridge.
🚀 Quick Start
1. Camera Capture
Lumiavis makes it incredibly simple to find your camera, negotiate the maximum quality, and capture a photo:
use ;
2. Image Processing
No webcam? No problem. Lumiavis can also serve as a standalone image manipulation tool:
use ;
use CropRect;
📚 Documentation
Dive deeper into Lumiavis by reading our dedicated tutorials:
- Camera Capture Guide: Learn about device enumeration, hardware acceleration, and frame reading.
- Image Processing Guide: Learn how the internal NV12/YUY2 to RGB conversions work, and how to apply annotations.
- Video Export Guide: Learn how to use
CaptureSessionto record JPEG sequences and export them to MP4.
💡 Examples
We provide heavily-commented, practical examples to get you started quickly. Run them using cargo:
(Note: High-resolution software pixel conversions are CPU-intensive. It is recommended to run camera examples in --release mode for a smooth 30+ FPS experience).
License
This project is licensed under the Apache License 2.0.