An intelligent image filtering system for 3D printer timelapses that automatically removes frames captured during filament changes, warmup sequences, and other non-printing activities to create smooth, professional-quality timelapse videos.
- Smart Image Detection: Uses similarity-based analysis with histogram correlation and brightness comparison
- Automatic Filtering: Identifies and removes images where the build plate is not properly positioned
- Statistical Analysis: Employs outlier detection with configurable sensitivity
- Home Assistant Integration: Seamless automation with 3D printer monitoring
- ESPHome Camera Support: Direct integration with ESP32/ESP8266 camera modules
- Batch Processing: Efficiently processes hundreds of images with detailed progress reporting
- Python 3.9 or higher
- OpenCV, NumPy, PIL, PyYAML, SciPy
- Home Assistant (optional, for automation)
- ESPHome compatible camera (optional)
- Clone the repository:
git clone https://github.com/schmacka/FlickerFree.git
cd FlickerFree- Install Python dependencies:
pip install opencv-python numpy pillow pyyaml scipy- Configure your settings in
config.yaml
python image_filter.py /path/to/timelapse/imagesThe system will:
- Analyze all images in the specified directory
- Identify problematic frames using similarity analysis
- Move filtered images to a review folder
- Generate a processing report
The filter uses multiple detection methods:
- Histogram Correlation: Compares color distribution patterns
- Center Region Brightness: Analyzes build plate visibility
- Edge Density Detection: Identifies proper frame composition
- Statistical Outlier Detection: Uses 2Ο threshold for anomaly identification
The system includes pre-configured automations for seamless integration:
- Print Completion Detection: Automatically triggers filtering when prints finish
- Photo Capture Timing: Coordinates with printer states for optimal image capture
- Processing Notifications: Alerts when filtering is complete
See home-assistant/README.md for detailed setup instructions.
Supports ESP32/ESP8266 camera modules with optimized configurations:
- High-Quality Capture: Configured for optimal timelapse quality
- WiFi Integration: Seamless network connectivity
- Power Management: Efficient operation during long prints
See esphome/README.md for camera setup and configuration.
Edit config.yaml to customize detection sensitivity:
similarity_threshold: 0.95 # Histogram correlation threshold
brightness_threshold: 0.8 # Center region brightness threshold
edge_threshold: 500 # Edge density threshold
outlier_std_dev: 2.0 # Statistical outlier sensitivityTypical performance on a modern system:
- Processing Speed: ~16 images/second
- Accuracy: 98%+ correct identification
- Filter Rate: 2-5% of total images (varies by print complexity)
- Memory Usage: <200MB for 1000+ images
The system can be integrated into existing timelapse workflows:
# Basic filtering
python image_filter.py /path/to/images
# With custom output directory
python image_filter.py /path/to/images --output /path/to/filtered
# Dry run (analyze only, don't move files)
python image_filter.py /path/to/images --dry-runThe included home-assistant/do_timelapse.sh script shows how to integrate filtering with video generation:
- Capture images during printing
- Filter problematic frames
- Generate smooth timelapse video
- Clean up temporary files
FlickerFree/
βββ image_filter.py # Main filtering system
βββ config.yaml # Configuration settings
βββ home-assistant/ # Home Assistant integration
β βββ README.md
β βββ do_timelapse.sh # Timelapse generation script
β βββ automation_print_finished.yaml
β βββ automation_trigger_photo.yaml
βββ esphome/ # ESPHome camera configuration
β βββ README.md
β βββ esphome.yaml
βββ README.md
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
This project is open source and available under the MIT License.
- OpenCV community for computer vision tools
- Home Assistant developers for automation platform
- ESPHome project for camera integration capabilities
If you encounter any issues or have questions:
- Check the Issues page for existing solutions
- Review the component-specific README files for detailed setup instructions
- Create a new issue with detailed information about your setup and problem
Transform your 3D printing timelapses from choppy documentation to smooth, professional videos with intelligent automated filtering.