Skip to content

Conversation

@Kletternaut
Copy link
Contributor

Summary:

This pull request introduces a new ObjectBlurStage for rpicam-apps. The stage provides real-time blurring of detected objects based on their COCO class names, making it easy to anonymize specific objects (like faces, persons, or license plates) directly during video recording or streaming.

Key Features:

Blurs detected objects based on configurable COCO class names (e.g., "person", "cup", "wine glass").
Three blur algorithms: pixelate (fast), gaussian (smooth), median (noise reduction).
All parameters (blur type, strength, box expansion) are configurable via JSON.
Works seamlessly with hailo_yolo_inference or other detection stages providing object_detect.results.
Enables clean privacy-focused recordings without visible bounding boxes.
Includes English and German documentation and sample configuration files.
Why?

Privacy protection and object anonymization are increasingly important for video recordings. This stage enables automatic, real-time blurring of sensitive objects without post-processing, which is especially useful for surveillance systems, public installations, or content that needs to comply with privacy regulations.

Notes:

Requires OpenCV (opencv-postproc library).
Depends on a detection stage providing object_detect.results
metadata (e.g., hailo_yolo_inference).
Supports 80 COCO object classes for flexible use cases.

object_blur_stage

Demo: See the example video below showing the blur effect in action.
Watch Demo Video

This adds a new post-processing stage that automatically blurs detected objects
in the video stream based on their COCO class names. Useful for privacy
applications and real-time object obscuring.

Key features:
- Blur objects by COCO class name (e.g., "person", "cup", "wine glass")
- Multiple blur types: pixelate (fast), gaussian (smooth), median (noise reduction)
- Configurable blur strength and bounding box expansion
- Live processing - no post-production editing needed
- Works seamlessly with hailo_yolo_inference and other detection stages
- Clean recordings possible by omitting object_detect_draw_cv (no bounding boxes)

The stage depends on object detection results from stages like hailo_yolo_inference
and applies blur effects directly to the main video stream.

Example configuration:
{
    "hailo_yolo_inference": { ... },
    "object_blur": {
        "overlay_blur": ["person", "cell phone"],
        "blur_type": "pixelate",
        "blur_strength": 16
    }
}

Includes:
- object_blur_stage.cpp: Implementation with OpenCV
- object_blur.json: Example configuration
- object_blur_stage.md: Comprehensive bilingual documentation (EN/DE)
- meson.build: Build configuration (added to opencv-postproc)

Signed-off-by: Kletternaut <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant