Free Motion Capture for Everyone πβ¨
TypeScript
calibrate video creation only looks for mp4 files in syncedVids folder
aaroncherian441472bc14c6
diff --git a/freemocap/calibrate.py b/freemocap/calibrate.pyindex bb44147a..08d70d3d 100644--- a/freemocap/calibrate.py+++ b/freemocap/calibrate.py@@ -1,7 +1,8 @@import osimport copyimport json-import pickle+import pickle+import globfrom aniposelib.cameras import CameraGroupfrom aniposelib.utils import load_pose2d_fnames@@ -219,7 +220,7 @@ def createCalibrationVideos(session, calVideoFrameLength):Based on the desired length of the calibration videos (for the anipose functions), create new videos trimmedto that specific length"""- vidList = os.listdir(session.syncedVidPath)+ vidList = glob.glob(str(session.syncedVidPath) + "/*.mp4")if len(calVideoFrameLength)==1:framelist = list(range(calVideoFrameLength))elif len(calVideoFrameLength)==2:@@ -230,7 +231,7 @@ def createCalibrationVideos(session, calVideoFrameLength):codec = "DIVX"for count, vid in enumerate(vidList, start=1):cam_name = "Cam{}".format(count)- cap = cv2.VideoCapture(str(session.syncedVidPath / vid))+ cap = cv2.VideoCapture(vid)fourcc = cv2.VideoWriter_fourcc(*codec)# grab resolution parameters from the videos