Hussein El-Hadidy commited on
Commit ·
dfd6226
1
Parent(s): 8469f00
Comment cv2.destroy
Browse files- CPR/CPRAnalyzer.py +3 -3
CPR/CPRAnalyzer.py
CHANGED
|
@@ -41,7 +41,7 @@ class CPRAnalyzer:
|
|
| 41 |
|
| 42 |
# Window configuration
|
| 43 |
self.window_name = "CPR Analysis"
|
| 44 |
-
cv2.namedWindow(self.window_name, cv2.WINDOW_NORMAL)
|
| 45 |
print("[INIT] System components initialized successfully")
|
| 46 |
|
| 47 |
def run_analysis(self):
|
|
@@ -203,7 +203,7 @@ class CPRAnalyzer:
|
|
| 203 |
pos_y = (self.screen_height - new_h) // 2
|
| 204 |
cv2.moveWindow(self.window_name, pos_x, pos_y)
|
| 205 |
|
| 206 |
-
cv2.imshow(self.window_name, resized)
|
| 207 |
print(f"[DISPLAY] Resized to {new_w}x{new_h} (scale: {scale:.2f}) in {(time.time()-display_start)*1000:.1f}ms")
|
| 208 |
|
| 209 |
def _finalize_analysis(self):
|
|
@@ -234,7 +234,7 @@ class CPRAnalyzer:
|
|
| 234 |
|
| 235 |
finally:
|
| 236 |
self.cap.release()
|
| 237 |
-
cv2.destroyAllWindows()
|
| 238 |
print(f"\n[ANALYSIS] Completed in {time.time()-start_time:.1f}s")
|
| 239 |
print("[CLEANUP] Resources released")
|
| 240 |
|
|
|
|
| 41 |
|
| 42 |
# Window configuration
|
| 43 |
self.window_name = "CPR Analysis"
|
| 44 |
+
#cv2.namedWindow(self.window_name, cv2.WINDOW_NORMAL)
|
| 45 |
print("[INIT] System components initialized successfully")
|
| 46 |
|
| 47 |
def run_analysis(self):
|
|
|
|
| 203 |
pos_y = (self.screen_height - new_h) // 2
|
| 204 |
cv2.moveWindow(self.window_name, pos_x, pos_y)
|
| 205 |
|
| 206 |
+
#cv2.imshow(self.window_name, resized)
|
| 207 |
print(f"[DISPLAY] Resized to {new_w}x{new_h} (scale: {scale:.2f}) in {(time.time()-display_start)*1000:.1f}ms")
|
| 208 |
|
| 209 |
def _finalize_analysis(self):
|
|
|
|
| 234 |
|
| 235 |
finally:
|
| 236 |
self.cap.release()
|
| 237 |
+
#cv2.destroyAllWindows()
|
| 238 |
print(f"\n[ANALYSIS] Completed in {time.time()-start_time:.1f}s")
|
| 239 |
print("[CLEANUP] Resources released")
|
| 240 |
|