import cv2 def detect_thermal_anomalies(image_path): img = cv2.imread(image_path) red_channel = img[:, :, 2] return red_channel.mean() > 180