Skip to main content

No project description provided

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

filter_vizcal-2.0.5-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file filter_vizcal-2.0.5-py3-none-any.whl.

File metadata

  • Download URL: filter_vizcal-2.0.5-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for filter_vizcal-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 15eec7f61231f4c5efcfed11399c5fcfdceec0e64519e1ee9f89d42352443e73
MD5 a48463d33f156eb6cb735370a99db618
BLAKE2b-256 3804241180a5c9e18de8b5a60e75f1231f611658dc7bbb27276dcb2e2612b979

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page