convert movie frames to RGB format
Browse files- .gitignore +3 -0
- app.py +5 -5
.gitignore
CHANGED
|
@@ -123,3 +123,6 @@ yolov8n.pt
|
|
| 123 |
# Keep empty models dir
|
| 124 |
models/*
|
| 125 |
!models/.gitkeep
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
# Keep empty models dir
|
| 124 |
models/*
|
| 125 |
!models/.gitkeep
|
| 126 |
+
|
| 127 |
+
# All cached movie files
|
| 128 |
+
*.mp4
|
app.py
CHANGED
|
@@ -314,11 +314,11 @@ def process_video(video_path):
|
|
| 314 |
if not ret:
|
| 315 |
break # Exit the loop if no more frames are available
|
| 316 |
|
| 317 |
-
#
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
)
|
| 322 |
publish_frame() # Publish the results
|
| 323 |
|
| 324 |
cap.release() # Release the video capture object
|
|
|
|
| 314 |
if not ret:
|
| 315 |
break # Exit the loop if no more frames are available
|
| 316 |
|
| 317 |
+
# Convert the frame from BGR to RGB format
|
| 318 |
+
rgb_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
| 319 |
+
|
| 320 |
+
# Analyze the frame for face detection and sentiment analysis
|
| 321 |
+
analyze_frame(rgb_frame)
|
| 322 |
publish_frame() # Publish the results
|
| 323 |
|
| 324 |
cap.release() # Release the video capture object
|