Free Motion Capture for Everyone πβ¨
TypeScript
merge bug fixes
Aaron Cherian06c0cf6f4e14
diff --git a/freemocap/calibrate.py b/freemocap/calibrate.pyindex f66ac250..5e5ba186 100644--- a/freemocap/calibrate.py+++ b/freemocap/calibrate.py@@ -75,21 +75,6 @@ def CalibrateCaptureVolume(session,board):# init_extrinsics=True)#%% End of the copy-paste of the inner bits of `cgroup.calibrate_videos` - END- # JSM NOTE - need add method to extract Charuco board points from the calibrate_videos pipeline-- ## if you need to save and load- ## example saving and loading for later- if not session.cameraCalFilePath.is_file():- error, merged = cgroup.calibrate_videos(vidnames, board)- cgroup.dump(- session.cameraCalFilePath- ) # JSM NOTE - let's just use .yaml's unless there is some reason to use .toml- mergename = session.sessionPath / "merged.npy"- np.save(mergename, merged)- else:- cgroup = CameraGroup.load(- session.cameraCalFilePath- ) # load previous calibration config#JSM NOTE - need add method to extract Charuco board points from the calibrate_videos pipelinediff --git a/freemocap/parameters.yaml b/freemocap/parameters.yamlindex 9f050b70..718b3f3c 100644--- a/freemocap/parameters.yaml+++ b/freemocap/parameters.yaml@@ -20,12 +20,10 @@ default:saved:rotations:- 0: 01: 02: 0- 3: 0parameters:- exposure: -8+ exposure: -6resWidth: 640resHeight: 480framerate: 30diff --git a/freemocap/webcam/timesync.py b/freemocap/webcam/timesync.pyindex 9485cc1a..8f508af0 100644--- a/freemocap/webcam/timesync.py+++ b/freemocap/webcam/timesync.py@@ -12,11 +12,6 @@ def TimeSync(session,timeStampData,numCamRange,camNames):closestPoint = (np.abs(camera - point)).argmin()return closestPoint-def TimeSync(timeStampData, numCamRange, camNames):- def CloseNeighb(camera, point):- closestPoint = (np.abs(camera - point)).argmin()- return closestPoint-# this section auto-finds the start and end points for our master timeline to the nearest secondmasterTimelineBegin = np.ceil(max(timeStampData.iloc[0]))lastPoints = []diff --git a/freemocap/webcamGUI.py b/freemocap/webcamGUI.pyindex d7ddef72..97188d0c 100644--- a/freemocap/webcamGUI.py+++ b/freemocap/webcamGUI.py@@ -105,54 +105,27 @@ def initialize(session, stage, board):session.parameterDictionary = session.session_settings['recording_parameters']['ParameterDict']session.rotationInputs = session.session_settings['recording_parameters']['RotationInputs']- print("Proceeding to Stage One")+ #initialize the path to the timestamp csv+ csvName = session.sessionID + '.csv'+ csvPath = session.sessionPath/csvName- else:+ #read CSV data, turn it into a data frame+ timeStampData = pd.read_csv (csvPath)+ timeStampData = timeStampData.iloc[:,1:]- sys.exit("Recording Cancelled")- # %% Stage Two Initalization- if stage == 2:- session.sessionPath = (- filepath / "Data" / session.sessionID- ) # create a session path based on the sessionID-- # load the config yaml for this session, and add all the paths to the session file- session.yamlPath = session.sessionPath / "{}_config.yaml".format(- session.sessionID- )- session.config_settings = recordingconfig.load_config_yaml(- session.yamlPath- ) # config settings = paths and camera parameter inputs- recordingconfig.load_session_paths(- session, session.config_settings- ) # add paths to session class-- # from the config settings add the camera input parameters to parameter dictionary- session.parameterDictionary = session.config_settings["CamInputs"][- "ParameterDict"- ]- session.rotationInputs = session.config_settings["CamInputs"]["RotationInputs"]-- # initialize the path to the timestamp csv- csvName = session.sessionID + ".csv"- csvPath = session.sessionPath / csvName-- # read CSV data, turn it into a data frame- timeStampData = pd.read_csv(csvPath)- timeStampData = timeStampData.iloc[:, 1:]-- # get the camIDs and number of cameras (numCamRange) from the dataframe+ #get the camIDs and number of cameras (numCamRange) from the dataframecamIDs = list(timeStampData.columns)numCams = len(camIDs)- numCamRange = range(len(camIDs))-- # create names for each of the raw videos+ numCamRange = range(len(camIDs))++ #create names for each of the raw videosvidNames = []for x in numCamRange:- singleVidName = "raw_cam{}.mp4".format(x + 1)- vidNames.append(singleVidName)+ singleVidName = 'raw_cam{}.mp4'.format(x+1)+ vidNames.append(singleVidName)+- # initialize all the session variables we'll need to run the rest of the pipeline+ #initialize all the session variables we'll need to run the rest of the pipelinesession.timeStampData = timeStampDatasession.camIDs = camIDssession.numCamRange = numCamRange