Skip to main content

Visual Calibration Environment Calibration Filter

PyPI version Docker Version License: Apache 2.0

Visual Calibration is a lightweight video analysis filter designed for computer vision applications. It provides real-time analysis of camera stability, movement detection, and video properties to help you understand your hardware setup and environment. Supports multi-topic processing - analyze multiple video streams independently with separate analysis states.

Quick Start

The easiest way to run the Visual Calibration filter is using the provided usage script:

# Basic usage with default settings (single video, multi-topic analysis)
python scripts/filter_usage.py

# Custom video input
VIDEO_INPUT="./data/your-video.mp4" python scripts/filter_usage.py

# Custom configuration
FILTER_SHAKE_THRESHOLD=10 FILTER_MOVEMENT_THRESHOLD=2.0 python scripts/filter_usage.py

Environment Variables

The filter can be configured using environment variables:

Variable Default Description
VIDEO_INPUT ./data/sample-video.mp4 Input video file path
OUTPUT_FPS 30 Output video frames per second
WEBVIS_PORT 8002 Port for Webvis visualization
FILTER_CALCULATE_CAMERA_STABILITY True Enable camera stability analysis
FILTER_CALCULATE_VIDEO_PROPERTIES True Enable video properties calculation
FILTER_CALCULATE_MOVEMENT True Enable movement detection
FILTER_SHAKE_THRESHOLD 5 Camera shake detection threshold
FILTER_MOVEMENT_THRESHOLD 1.0 Movement detection threshold
FILTER_FORWARD_UPSTREAM_DATA True Forward data from upstream filters
FILTER_SHOW_TEXT_OVERLAYS True Show analysis overlays on video
FILTER_LOG_INTERVAL 3 Log analysis results every N frames

Viewing Results

After running the filter, you can view the results at:

  • Webvis: http://localhost:8002 - Real-time video streams with analysis overlays
    • Main stream: http://localhost:8002/main - First topic analysis
    • Stream2: http://localhost:8002/stream2 - Second topic analysis

Features

  • Multi-Topic Processing: Analyze multiple video streams independently with separate analysis states
  • Camera Stability Analysis: Detects camera shake and movement patterns per topic
  • Video Properties Calculation: Analyzes frame properties and quality metrics per topic
  • Movement Detection: Optional optical flow-based movement tracking per topic
  • Per-Topic State Management: Independent analysis states prevent cross-contamination
  • Environment Variable Configuration: No command-line arguments needed
  • Real-time Visualization: Live analysis overlays via Webvis for multiple streams
  • Upstream Data Forwarding: Passes through data from upstream filters
  • Text Overlays: Optional visual analysis information on video frames
  • Non-Image Frame Support: Forwards non-image frames as-is

How to Run

Prerequisites

  • Python 3.10 or higher
  • OpenCV and other dependencies (see pyproject.toml)

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd filter-vizcal
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Run the filter:

    python scripts/filter_usage.py
    

Docker Support

The filter also supports Docker deployment:

  1. Build the Docker image:

    docker build -t vizcal-filter .
    
  2. Run with Docker:

    docker run -p 8002:8002 -v $(pwd)/data:/app/data -v $(pwd)/output:/app/output vizcal-filter
    

Configuration Examples

Basic Analysis:

python scripts/filter_usage.py

High Sensitivity:

FILTER_SHAKE_THRESHOLD=2 FILTER_MOVEMENT_THRESHOLD=0.5 python scripts/filter_usage.py

Disable Overlays:

FILTER_SHOW_TEXT_OVERLAYS=false python scripts/filter_usage.py

Custom Video:

VIDEO_INPUT="./path/to/your/video.mp4" python scripts/filter_usage.py

Documentation

For detailed information about configuration options, performance tuning, and advanced usage, see the comprehensive documentation.

Release files for filter-vizcal 2.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for filter-vizcal 2.0.10
File Interpreter ABI Platform
filter_vizcal-2.0.10-py3-none-any.whl Python 3 none any Details

Release files / filter_vizcal-2.0.10-py3-none-any.whl

Download URL filter_vizcal-2.0.10-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c3165efba03f5140a2d26d6c49048bcbd946f2ca4a7e88bc6c7b46761459dc5
BLAKE2b-256 checksum
How to use checksums
ae5e450a5c22cfde7be0b3ae0c51d7b442e079ca68d916a468baf00946d7c203
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release history Release notifications | RSS feed

This release

2.0.10 This release

1 release file

2.0.9

1 release file

2.0.8

1 release file

2.0.7

1 release file

2.0.6

1 release file

2.0.5

1 release file

2.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page