Free Motion Capture for Everyone πβ¨
TypeScript
parameters.yaml is now a part of the freemocap module
Aaron Cherian9d11ca17d893
diff --git a/parameters.yaml b/freemocap/parameters.yamlsimilarity index 73%rename from parameters.yamlrename to freemocap/parameters.yamlindex 718b3f3c..ff03bdc4 100644--- a/parameters.yaml+++ b/freemocap/parameters.yaml@@ -1,30 +1,27 @@-#default parameters-----default:- rotations: {}- parameters:- exposure: -5- resWidth: 640- resHeight: 480- framerate: 25- codec: DIVX--#saved parameters------saved:- rotations:- 1: 0- 2: 0- parameters:- exposure: -6- resWidth: 640- resHeight: 480- framerate: 30- codec: H264+#default parameters++++default:+ rotations: {}+ parameters:+ exposure: -5+ resWidth: 640+ resHeight: 480+ framerate: 25+ codec: DIVX++#saved parameters+++++saved:+ rotations:+ 0: 0+ parameters:+ exposure: -6+ resWidth: 640+ resHeight: 480+ framerate: 30+ codec: H264diff --git a/freemocap/session.py b/freemocap/session.pyindex 0a3c7b68..3ee61d41 100644--- a/freemocap/session.py+++ b/freemocap/session.py@@ -84,7 +84,7 @@ class Session: #self like "recording self"recording_parameters = {'numCams': self.numCams, 'numFrames': self.numFrames, 'numTrackedPoints': self.numTrackedPoints}#create a dictionary with the folder names (taken from the recordingconfig.py file) and the folder paths from pathList- #NOTE -6/30/21 - as of right now, the order of folder names in the recordingconfig.folder_setup list needs to match the+ #NOTE AC- 6/30/21 - as of right now, the order of folder names in the recordingconfig.folder_setup list needs to match the# the order of folder paths in the pathListsession_paths = {}diff --git a/freemocap/webcamGUI.py b/freemocap/webcamGUI.pyindex 8e22570f..7275c845 100644--- a/freemocap/webcamGUI.py+++ b/freemocap/webcamGUI.py@@ -25,8 +25,9 @@ def initialize(session, stage, board):sessionID_in = datetime.datetime.now().strftime("sesh_%y-%m-%d_%H%M%S")session.sessionID = sessionID_in- #load the parameters YAML and extract the saved parameters if possible, and the default otherwise- parameter_path = filepath/'parameters.yaml'+ #load the parameters YAML and extract the saved parameters if possible, and the default otherwise+ here = Path(__file__).parent+ parameter_path = here/'parameters.yaml'parameters_yaml = YAML()parameters = parameters_yaml.load(parameter_path)@@ -34,7 +35,7 @@ def initialize(session, stage, board):rotation_entry = parameters['saved']['rotations']parameter_entry = parameters['saved']['parameters']except:- print("Using Default Config")+ print("Could not load saved parameters, using default parameters")rotation_entry = parameters['default']['rotations']parameter_entry = parameters['default']['parameters']@@ -45,6 +46,8 @@ def initialize(session, stage, board):task, cam_inputs, rotDict, paramDict, session.sessionID = recordGUI.RunGUI(sessionID_in,rotation_entry,parameter_entry)#update the saved parameters in the YAML+ #recordingconfig.rotation_settings['saved'] = rotDict+ #recordingconfig.camera_parameters['saved'] = paramDictparameters['saved']['rotations'] = rotDictparameters['saved']['parameters'] = paramDictparameters_yaml.dump(parameters, parameter_path)