From dda48d409b3a9ebf6e86ed88a9adda1795dce00f Mon Sep 17 00:00:00 2001 From: Prince Kalu Date: Wed, 31 Jul 2024 14:36:35 +0100 Subject: [PATCH] Clean up --- camera.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/camera.py b/camera.py index 10806aa..0a595cf 100644 --- a/camera.py +++ b/camera.py @@ -153,4 +153,12 @@ def upload_to_firebase(file_path, blob_name): print(f'File {file_path} uploaded to {blob_name}.') upload_to_firebase(mp4_video_path_macbook, f'motion_detected_macbook_{timestamp}.mp4') -upload_to_firebase(mp4_video_path_iphone, f'motion_detected_iphone_{timestamp}.mp4') \ No newline at end of file +upload_to_firebase(mp4_video_path_iphone, f'motion_detected_iphone_{timestamp}.mp4') + +# Clean up +macbook_camera.release() +out_macbook.release() +if iphone_camera.isOpened(): + iphone_camera.release() + out_iphone.release() +cv2.destroyAllWindows() \ No newline at end of file