Sanjayraju30 commited on
Commit
b17dec2
·
verified ·
1 Parent(s): b2af60f

Update services/thermal_service.py

Browse files
Files changed (1) hide show
  1. services/thermal_service.py +3 -6
services/thermal_service.py CHANGED
@@ -1,9 +1,6 @@
1
- import numpy as np
2
  import cv2
3
 
4
- # Simulate thermal anomaly by analyzing red channel brightness
5
  def detect_thermal_anomalies(image_path):
6
- image = cv2.imread(image_path)
7
- red_channel = image[:, :, 2]
8
- avg_temp = red_channel.mean()
9
- return avg_temp > 180 # Simulate overheat detection (like >75°C)
 
 
1
  import cv2
2
 
 
3
  def detect_thermal_anomalies(image_path):
4
+ img = cv2.imread(image_path)
5
+ red_channel = img[:, :, 2]
6
+ return red_channel.mean() > 180