So we can see times are very similar and my code is very unefficiently putting a list of arrays into a numpy array. OpenCV with a simple while loop took a total execution time of 3.72s whereas skvideo took 3.32s. We can see that both methods will return numpy arrays of shape (1000, 480, 1280) and Videodata = skvideo.io.vread("rec_q26b_10min.mp4", num_frames=n_frames) Scikit-video code def read_video_sk(n_frames=1000): OpenCV Code def read_video_cv2(n_frames=1000):Ĭap = cv2.VideoCapture("rec_q26b_10min.mp4") We will read 1000 frames and compare the speeds. ![]() OpenCV and skvideo are mentioned by others before me here, so will compare them here. Some of the comments here are interested in a speed comparision.
0 Comments
Leave a Reply. |