MCPcopy Index your code
hub / github.com/FoundationVision/ByteTrack / img2video

Function img2video

tools/txt2video.py:189–203  ·  view source on GitHub ↗
(visual_path="visual_val_gt")

Source from the content-addressed store, hash-verified

187
188
189def img2video(visual_path="visual_val_gt"):
190 print("Starting img2video")
191
192 img_paths = gb.glob(visual_path + "/*.png")
193 fps = 16
194 size = (1920,1080)
195 videowriter = cv2.VideoWriter(visual_path + "_video.avi",cv2.VideoWriter_fourcc('M','J','P','G'), fps, size)
196
197 for img_path in sorted(img_paths):
198 img = cv2.imread(img_path)
199 img = cv2.resize(img, size)
200 videowriter.write(img)
201
202 videowriter.release()
203 print("img2video Done")
204
205
206if __name__ == '__main__':

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected