mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-04-30 14:50:39 +00:00
83d7ce0fcf
Build and push containers / metadata (push) Has been cancelled
Build and push containers / build-push-containers (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built package works basically. (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been cancelled
ChangeDetection.io App Test / lint-code (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-10 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-11 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-12 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-13 (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/amd64 (alpine) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm64 (alpine) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/amd64 (main) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm/v7 (main) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm/v8 (main) (push) Has been cancelled
ChangeDetection.io Container Build Test / Build linux/arm64 (main) (push) Has been cancelled
40 lines
1.3 KiB
Python
40 lines
1.3 KiB
Python
"""
|
|
Visual/screenshot change detection using fast image comparison algorithms.
|
|
|
|
This processor compares screenshots using OpenCV (cv2.absdiff),
|
|
which is 10-100x faster than SSIM while still detecting meaningful visual changes.
|
|
"""
|
|
|
|
import os
|
|
from pathlib import Path
|
|
|
|
processor_description = "Visual/Screenshot change detection (Fast)"
|
|
processor_name = "image_ssim_diff"
|
|
processor_weight = 2 # Lower weight = appears at top, heavier weight = appears lower (bottom)
|
|
|
|
# Processor capabilities
|
|
supports_visual_selector = True
|
|
supports_browser_steps = True
|
|
supports_text_filters_and_triggers = False
|
|
supports_text_filters_and_triggers_elements = False
|
|
supports_request_type = True
|
|
|
|
PROCESSOR_CONFIG_NAME = f"{Path(__file__).parent.name}.json"
|
|
|
|
# Subprocess timeout settings
|
|
# Maximum time to wait for subprocess operations (seconds)
|
|
POLL_TIMEOUT_ABSOLUTE = int(os.getenv('OPENCV_SUBPROCESS_TIMEOUT', '20'))
|
|
|
|
# Template tracking filename
|
|
CROPPED_IMAGE_TEMPLATE_FILENAME = 'cropped_image_template.png'
|
|
|
|
SCREENSHOT_COMPARISON_THRESHOLD_OPTIONS = [
|
|
('200', 'Low sensitivity (only major changes)'),
|
|
('80', 'Medium sensitivity (moderate changes - recommended)'),
|
|
('20', 'High sensitivity (small changes)'),
|
|
('0', 'Very high sensitivity (any change)')
|
|
]
|
|
|
|
SCREENSHOT_COMPARISON_THRESHOLD_OPTIONS_DEFAULT=0.999
|
|
OPENCV_BLUR_SIGMA=float(os.getenv("OPENCV_BLUR_SIGMA", "3.0"))
|