add separate video loader class

This commit is contained in:
Bart Moyaers
2019-11-29 10:32:37 +01:00
parent 8ac9d97398
commit c4170aa3b5
4 changed files with 117 additions and 55 deletions

12
videoloader_test.py Normal file
View File

@@ -0,0 +1,12 @@
from video_loader import VideoLoader
import cv2
from cv2util import to_8_bit_image
projects_path = "C:\\UntrackedGit\\opencv_test\\him_projects"
loader = VideoLoader(projects_path)
for recording in loader.get_all_recordings():
frames = loader.extract_frames(recording)
for frame in frames:
cv2.imshow("test", frame)
cv2.waitKey(1)