Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,7 +51,7 @@ def process_frame(frame):
|
|
| 51 |
_, thresh = cv2.threshold(avg_frame, 25, 255, cv2.THRESH_BINARY)
|
| 52 |
coords = cv2.findNonZero(thresh)
|
| 53 |
analyzer.hot_pixels = [(p[0][0], p[0][1]) for p in coords] if coords is not None else []
|
| 54 |
-
analyzer.msg = f"
|
| 55 |
|
| 56 |
elif analyzer.mode == "FLAT_CALIB":
|
| 57 |
# Dead Pixel Analizi
|
|
@@ -60,14 +60,14 @@ def process_frame(frame):
|
|
| 60 |
_, thresh = cv2.threshold(avg_frame, threshold_val, 255, cv2.THRESH_BINARY_INV)
|
| 61 |
coords = cv2.findNonZero(thresh)
|
| 62 |
analyzer.dead_pixels = [(p[0][0], p[0][1]) for p in coords] if coords is not None else []
|
| 63 |
-
analyzer.msg = f"
|
| 64 |
|
| 65 |
# Analiz bitince Live moda dön ama verileri sakla
|
| 66 |
analyzer.mode = "LIVE"
|
| 67 |
analyzer.accumulated_frame = None
|
| 68 |
analyzer.frame_count = 0
|
| 69 |
else:
|
| 70 |
-
analyzer.msg = f"Kalibrasyon
|
| 71 |
|
| 72 |
# --- GÖRSELLEŞTİRME ---
|
| 73 |
|
|
|
|
| 51 |
_, thresh = cv2.threshold(avg_frame, 25, 255, cv2.THRESH_BINARY)
|
| 52 |
coords = cv2.findNonZero(thresh)
|
| 53 |
analyzer.hot_pixels = [(p[0][0], p[0][1]) for p in coords] if coords is not None else []
|
| 54 |
+
analyzer.msg = f"Karanlik Kalibrasyon Bitti! {len(analyzer.hot_pixels)} sicak piksel bulundu."
|
| 55 |
|
| 56 |
elif analyzer.mode == "FLAT_CALIB":
|
| 57 |
# Dead Pixel Analizi
|
|
|
|
| 60 |
_, thresh = cv2.threshold(avg_frame, threshold_val, 255, cv2.THRESH_BINARY_INV)
|
| 61 |
coords = cv2.findNonZero(thresh)
|
| 62 |
analyzer.dead_pixels = [(p[0][0], p[0][1]) for p in coords] if coords is not None else []
|
| 63 |
+
analyzer.msg = f"Duz Alan Kalibrasyonu Bitti! {len(analyzer.dead_pixels)} olu piksel bulundu."
|
| 64 |
|
| 65 |
# Analiz bitince Live moda dön ama verileri sakla
|
| 66 |
analyzer.mode = "LIVE"
|
| 67 |
analyzer.accumulated_frame = None
|
| 68 |
analyzer.frame_count = 0
|
| 69 |
else:
|
| 70 |
+
analyzer.msg = f"Kalibrasyon yapiliyor... {analyzer.frame_count}/30"
|
| 71 |
|
| 72 |
# --- GÖRSELLEŞTİRME ---
|
| 73 |
|