MCPcopy Index your code
hub / github.com/Vegetebird/GraphMLP / img2video

Function img2video

demo/vis.py:117–133  ·  view source on GitHub ↗
(video_path, output_dir)

Source from the content-addressed store, hash-verified

115
116
117def img2video(video_path, output_dir):
118 cap = cv2.VideoCapture(video_path)
119 fps = int(cap.get(cv2.CAP_PROP_FPS))
120
121 fourcc = cv2.VideoWriter_fourcc(*"mp4v")
122
123 names = sorted(glob.glob(os.path.join(output_dir + 'pose/', '*.png')))
124 img = cv2.imread(names[0])
125 size = (img.shape[1], img.shape[0])
126
127 videoWrite = cv2.VideoWriter(output_dir + video_name + '.mp4', fourcc, fps, size)
128
129 for name in names:
130 img = cv2.imread(name)
131 videoWrite.write(img)
132
133 videoWrite.release()
134
135
136def showimage(ax, img):

Callers 1

vis.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected