Free Motion Capture for Everyone πβ¨
TypeScript
Fixed unequal number of frames issue
Aaron Cheriand43ee6b55de0
diff --git a/freemocap/webcam/videotrim.py b/freemocap/webcam/videotrim.pyindex 97802cc0..33d36808 100644--- a/freemocap/webcam/videotrim.py+++ b/freemocap/webcam/videotrim.py@@ -38,6 +38,7 @@ def VideoTrim(session, vidList, ft, parameterDictionary, rotationState, numCamRaout = cv2.VideoWriter(saveSyncedVidPath, fourcc, framerate, (resWidth, resHeight)) # change resolution as needed+ count = 0for frame in track(frameTable): # start looking through the frames we needif frame == -1: # this is a buffer frameblankFrame = np.zeros_like(image) # create a blank frame@@ -45,8 +46,9 @@ def VideoTrim(session, vidList, ft, parameterDictionary, rotationState, numCamRablankFrame = imutils.rotate_bound(blankFrame, angle=rotationState[camNum])- image = cv2.resize(image, (resWidth, resHeight))+ blankFrame = cv2.resize(blankFrame, (resWidth, resHeight))out.write(blankFrame) # write that frame to the video+ count += 1else:cap.set(cv2.CAP_PROP_POS_FRAMES, frame@@ -56,6 +58,8 @@ def VideoTrim(session, vidList, ft, parameterDictionary, rotationState, numCamRaimage = imutils.rotate_bound(image, angle=rotationState[camNum])image = cv2.resize(image, (resWidth, resHeight))out.write(image)+ f = 2+resWidth = trueWidthresHeight = trueHeightcap.release()diff --git a/freemocap/webcamGUI.py b/freemocap/webcamGUI.pyindex a91bae7e..c29773e9 100644--- a/freemocap/webcamGUI.py+++ b/freemocap/webcamGUI.py@@ -96,7 +96,7 @@ def initialize(session, stage, board):else:- sys.exit('Recording Cancelled')+ sys.exit('Recording Canceled')# %% Stage Two Initalizationif stage == 2:# session.sessionPath = filepath/'Data'/session.sessionID #create a session path based on the sessionID