Skip to content

Latest commit

 

History

History

README.md

Wombat Camera Software

STATUS: DUAL-SENSOR INTEGRATION COMPLETE ✅

This directory contains the complete camera software suite for the Wombat night vision system, featuring both the original proven 30 FPS NoIR camera system and the new integrated thermal overlay capabilities.

Files Overview

🔥 NEW: Dual-Sensor System (Thermal + NoIR)

  • wombat_dual_sensor.py - Main integrated dual-sensor system
  • wombat_dual_sensor.sh - Field-hardened launcher with comprehensive checks
  • thermal_sensor.py - MLX90640 thermal camera interface
  • thermal_overlay.py - Real-time thermal overlay system
  • wombat_config.py - Field configuration management
  • wombat-dual-sensor.service - Production systemd service

📹 Original NoIR System (Preserved)

  • wombat_night_vision.sh - Original 30 FPS libcamera launcher
  • wombat_libcamera_direct.py - Python wrapper for hardware-accelerated night vision
  • wombat_zerocopy.py - Fallback zero-copy processing implementation
  • wombat-nightvision.service - Original systemd service

Quick Start

🔥 Dual-Sensor System (RECOMMENDED)

# Run system checks and start dual-sensor system
./wombat_dual_sensor.sh

# Apply mission-specific preset
python3 wombat_config.py preset woodland

# Check system status
./wombat_dual_sensor.sh --status

# Production deployment
sudo cp wombat-dual-sensor.service /etc/systemd/system/
sudo systemctl enable wombat-dual-sensor.service
sudo systemctl start wombat-dual-sensor.service

📹 Original NoIR System

# Make executable (first time only)
chmod +x wombat_night_vision.sh

# Run night vision system
./wombat_night_vision.sh

Python Interface

# Hardware-accelerated version
python3 wombat_libcamera_direct.py

# Fallback version
python3 wombat_zerocopy.py

Auto-Start Service

# Copy service file to system directory
sudo cp wombat-nightvision.service /etc/systemd/system/

# Enable auto-start
sudo systemctl enable wombat-nightvision.service

# Start service now
sudo systemctl start wombat-nightvision.service

# Check status
sudo systemctl status wombat-nightvision.service

High-Performance Command

The core discovery from extensive testing is this optimal libcamera command:

libcamera-vid \
  --width 720 \
  --height 480 \
  --framerate 30 \
  --timeout 0 \
  --exposure long \
  --gain 12 \
  --brightness 0.3 \
  --contrast 1.5 \
  --verbose

Performance achieved:

  • ✅ 30 FPS hardware-accelerated
  • ✅ 720x480 resolution
  • ✅ Zero dropped frames
  • ✅ Optimized for NoIR sensor

Requirements

Hardware

  • Raspberry Pi Zero 2 WH
  • Camera Module 3 NoIR (12MP)
  • Proper camera cable connection

Software

  • Raspberry Pi OS (Bullseye or newer)
  • libcamera-apps package
  • Python 3.7+ (for Python scripts)
  • OpenCV (for fallback script)

Installation

# Update system
sudo apt update && sudo apt upgrade -y

# Install libcamera tools
sudo apt install libcamera-apps

# Install Python dependencies (for Python scripts)
sudo apt install python3-opencv python3-numpy

# Enable camera
sudo raspi-config
# Navigate to Interface Options > Camera > Enable

Troubleshooting

Camera Not Detected

# Check camera connection
libcamera-hello --list-cameras

# Verify camera is enabled
vcgencmd get_camera

Performance Issues

# Monitor system resources
htop

# Check temperature
vcgencmd measure_temp

# Monitor GPU memory
vcgencmd get_mem gpu

Service Issues

# Check service logs
sudo journalctl -u wombat-nightvision.service -f

# Restart service
sudo systemctl restart wombat-nightvision.service

Development Notes

These files represent the culmination of extensive testing documented in ../project-history.md. The key breakthrough was discovering the optimal libcamera parameters for 30 FPS performance on Pi Zero 2 WH hardware.

The software architecture provides multiple approaches:

  1. Shell script - Direct libcamera for maximum performance
  2. Python wrapper - Programmatic control with error handling
  3. Zero-copy fallback - Alternative processing when needed
  4. Systemd service - Production deployment with auto-start