File size: 309 Bytes
0291f7c
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import numpy as np
import cv2

# Simulate thermal anomaly by analyzing red channel brightness
def detect_thermal_anomalies(image_path):
    image = cv2.imread(image_path)
    red_channel = image[:, :, 2]
    avg_temp = red_channel.mean()
    return avg_temp > 180  # Simulate overheat detection (like >75°C)