Free Motion Capture for Everyone πβ¨
TypeScript
making cool mermaid flowchart of basic use of FMC_Camera
jon3e9d734b357c
diff --git a/freemocap/dev_scratchpad/dev_alpha/FreeMoCap_Alpha_Mermaid_Flow_Diagram.md b/freemocap/dev_scratchpad/dev_alpha/FreeMoCap_Alpha_Mermaid_Flow_Diagram.mdindex e56f1b56..593b090e 100644--- a/freemocap/dev_scratchpad/dev_alpha/FreeMoCap_Alpha_Mermaid_Flow_Diagram.md+++ b/freemocap/dev_scratchpad/dev_alpha/FreeMoCap_Alpha_Mermaid_Flow_Diagram.md@@ -1,13 +1,41 @@# FMC_Camera-+## Run as __Main__ file```mermaid-graph TD- M[__Main__]--1-create-as-context-manger-->I[FMC_Camera.__init__];- I--2-creates-->C[FMC_Camera_Object->'cam']- I--3-returns-cam-obj-->M- M--4-calls-->Cs[cam.Show]-```+%%{init: {"securityLevel": "loose","theme": "base", "themeVariables": { "fontSize":"24px","primaryColor": "#fff4dd", "primaryTextColor":"#f4f4fd", "actorBkg":"#FF0000", "loopTextColor":"#fff000"}}}%%++sequenceDiagram+autonumber+ participant M as __Main__+ participant I as FMC_Camera.__init__()+ participant S as cam.show()+ participant R as self.read_next_frame()+ activate M+++ M->>+I:create "cam" as context manger+ Note right of I: create "cam" with default values+ I->>-M:return "cam"+ M->>+S:Launch video stream window (OpenCV)+ loop Display Video - cam.show()+ S->>+R:self.read_next_frame()+ deactivate S+ R->>R:read frame - self.cv2_cap.read()+ R->>R:record timestamp to self+ R->>-S:return (success, image, timestamp_unix_ns)+ activate S+ S->>S:Display image: cv2.imshow()+ S->>S:print "camName read an image at.." to console+ S->>S:Exit on window close of ESC key+ end+ S->>-M:break++++ deactivate M+++``````mermaidclassDiagram