turn masked_frame into 2d mask
Browse files
app.py
CHANGED
@@ -135,6 +135,8 @@ def track_and_mask(vid, masked_frame, original_list, mask_list, in_fps, dt_strin
|
|
135 |
x, y, w, h = getBoundaries(masked_frame)
|
136 |
f = 0
|
137 |
|
|
|
|
|
138 |
#add first mask frame of the video by default
|
139 |
mask_list.append(masked_frame)
|
140 |
video_capture = cv2.VideoCapture()
|
|
|
135 |
x, y, w, h = getBoundaries(masked_frame)
|
136 |
f = 0
|
137 |
|
138 |
+
#turn 3d mask into 2d mask
|
139 |
+
masked_frame = cv2.cvtColor(masked_frame, cv2.COLOR_BGR2GRAY)
|
140 |
#add first mask frame of the video by default
|
141 |
mask_list.append(masked_frame)
|
142 |
video_capture = cv2.VideoCapture()
|