Free Motion Capture for Everyone πβ¨
TypeScript
building something to bypass the pre-alpha recorder
Jon PC Win Hallway9581ff5a8465
diff --git a/freemocap/dev_scratchpad/dev_alpha/FMC_Camera.py b/freemocap/dev_scratchpad/dev_alpha/FMC_Camera.pyindex 4d4e5886..27549d52 100644--- a/freemocap/dev_scratchpad/dev_alpha/FMC_Camera.py+++ b/freemocap/dev_scratchpad/dev_alpha/FMC_Camera.py@@ -25,7 +25,7 @@ from rich.console import Consolecap_default_parameters_dict = {- 'exposure': -6,+ 'exposure': -8,'cap_resolution_width': 640,'cap_resolution_height': 480,}diff --git a/freemocap/dev_scratchpad/dev_alpha/FMC_MultiCamera.py b/freemocap/dev_scratchpad/dev_alpha/FMC_MultiCamera.pyindex bc973188..49a4d1c8 100644--- a/freemocap/dev_scratchpad/dev_alpha/FMC_MultiCamera.py+++ b/freemocap/dev_scratchpad/dev_alpha/FMC_MultiCamera.py@@ -13,9 +13,7 @@from FMC_Camera import FMC_Camera-import concurrent.futures-import logging-import queue+import threadingimport pathos.multiprocessing as pathos_mpfrom pathos.helpers import mp as pathos_mp_helper@@ -65,7 +63,7 @@ class FMC_MultiCamera:self._init_start_time = time.time_ns()#the precision is aspirational, lolif rec_name is None:- self._rec_name = datetime.datetime.now().strftime("FMC_MultiCamRecording_%Y-%b-%d_%H_%M_%S")+ self._rec_name = datetime.datetime.now().strftime("sesh_%Y-%m-%d_%H_%M_%S_mc")else:self._rec_name = rec_name@@ -73,7 +71,7 @@ class FMC_MultiCamera:if save_path is None:self._save_path = Path('data/' + self._rec_name)else:- self._save_path = Path(save_path)+ self._save_path = Path(save_path) / self._rec_nameif save_path or save_to_mp4 or save_to_h5 or save_log_file:self._save_path.mkdir(parents=True)@@ -100,6 +98,7 @@ class FMC_MultiCamera:rich_console.rule('Starting FreeMoCap MultiCam!')+diff --git a/freemocap/dev_scratchpad/dev_alpha/fmc_alpha_runme.py b/freemocap/dev_scratchpad/dev_alpha/fmc_alpha_runme.pynew file mode 100644index 00000000..2fe7fbdc--- /dev/null+++ b/freemocap/dev_scratchpad/dev_alpha/fmc_alpha_runme.py@@ -0,0 +1,13 @@+import freemocap as fmc++from FMC_MultiCamera import FMC_MultiCamera++from pathos.helpers import mp as pathos_mp_helper++if __name__ =='__main__':+ pathos_mp_helper.freeze_support()++ multi_cam = FMC_MultiCamera(save_path='C:/Users/WindowsPC_Hallway/Dropbox/FreeMoCapProject/FreeMocap_Data')+ sessionID = multi_cam._rec_name+ multi_cam.start(standalone_mode=True)+ f=9diff --git a/freemocap/webcam/startcamrecording.py b/freemocap/webcam/startcamrecording.pyindex 49453b4d..5d55866d 100644--- a/freemocap/webcam/startcamrecording.py+++ b/freemocap/webcam/startcamrecording.py@@ -90,9 +90,7 @@ def CamRecording(else:success = False- while (- success- ): # while the camera is opened, record the data until the escape button is hit+ while ( success): # while the camera is opened, record the data until the escape button is hitif flag: # when the flag is triggered, stop recording and dump the datawith open(session.rawVidPath/camID, "wb") as f:pickle.dump(timeStamps, f)@@ -100,9 +98,9 @@ def CamRecording(success, frame = cam.read()cv2.imshow(camWindowName, frame)- frame_sized = cv2.resize(frame, (resWidth, resHeight))+ # frame_sized = cv2.resize(frame, (resWidth, resHeight))# frame_sized = frame- out.write(frame_sized)+ out.write(frame)timeStamps.append(time.time() - beginTime) # add each timestamp to the listkey = cv2.waitKey(20)