Aquibjaved commited on
Commit
479b076
·
verified ·
1 Parent(s): 8d8d2fc

Update ProcessVideo.py

Browse files
Files changed (1) hide show
  1. ProcessVideo.py +1 -13
ProcessVideo.py CHANGED
@@ -47,20 +47,8 @@ def process_video(video_path):
47
  break
48
 
49
  frame = all_frames[frame_idx]
50
-
51
- # Increase the font size
52
- font_scale = 1.5 # You can adjust this for size
53
- thickness = 3 # You can adjust this for thickness
54
-
55
- # Get the text size for centering
56
- text_size = cv2.getTextSize(label, cv2.FONT_HERSHEY_SIMPLEX, font_scale, thickness)[0]
57
-
58
- # Calculate the position to center the text
59
- text_x = (width - text_size[0]) // 2
60
- text_y = (height + text_size[1]) // 2 # Adjust for vertical centering
61
-
62
  # Add label to the frame in the center
63
- cv2.putText(frame, label, (text_x, text_y), cv2.FONT_HERSHEY_SIMPLEX, font_scale, color, thickness)
64
 
65
  out.write(frame)
66
  frame_idx += 1
 
47
  break
48
 
49
  frame = all_frames[frame_idx]
 
 
 
 
 
 
 
 
 
 
 
 
50
  # Add label to the frame in the center
51
+ cv2.putText(frame, label, (100,100), cv2.FONT_HERSHEY_SIMPLEX, font_scale, color, thickness)
52
 
53
  out.write(frame)
54
  frame_idx += 1