Skip to content

Free Motion Capture for Everyone πŸ’€βœ¨

TypeScript

merge bug fixes

Aaron Cherian06c0cf6f4e14
diff --git a/freemocap/calibrate.py b/freemocap/calibrate.py
index 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 pipeline
diff --git a/freemocap/parameters.yaml b/freemocap/parameters.yaml
index 9f050b70..718b3f3c 100644
--- a/freemocap/parameters.yaml
+++ b/freemocap/parameters.yaml
@@ -20,12 +20,10 @@ default:
saved:
rotations:
- 0: 0
1: 0
2: 0
- 3: 0
parameters:
- exposure: -8
+ exposure: -6
resWidth: 640
resHeight: 480
framerate: 30
diff --git a/freemocap/webcam/timesync.py b/freemocap/webcam/timesync.py
index 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 second
masterTimelineBegin = np.ceil(max(timeStampData.iloc[0]))
lastPoints = []
diff --git a/freemocap/webcamGUI.py b/freemocap/webcamGUI.py
index 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 dataframe
camIDs = 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 videos
vidNames = []
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 pipeline
session.timeStampData = timeStampData
session.camIDs = camIDs
session.numCamRange = numCamRange