reab5555 commited on
Commit
1ca7095
·
verified ·
1 Parent(s): c8eabf7

Update visualization.py

Browse files
Files changed (1) hide show
  1. visualization.py +3 -0
visualization.py CHANGED
@@ -270,6 +270,9 @@ def create_video_with_heatmap(video_path, df, mse_embeddings, mse_posture, outpu
270
  heatmap_img = heatmap_img.reshape(canvas.get_width_height()[::-1] + (3,))
271
  heatmap_img = cv2.resize(heatmap_img, (width, 200))
272
 
 
 
 
273
  combined_frame = np.vstack((frame, heatmap_img))
274
 
275
  seconds = frame_count / original_fps
 
270
  heatmap_img = heatmap_img.reshape(canvas.get_width_height()[::-1] + (3,))
271
  heatmap_img = cv2.resize(heatmap_img, (width, 200))
272
 
273
+ # Convert heatmap_img from RGB to BGR
274
+ heatmap_img = cv2.cvtColor(heatmap_img, cv2.COLOR_RGB2BGR)
275
+
276
  combined_frame = np.vstack((frame, heatmap_img))
277
 
278
  seconds = frame_count / original_fps