@@ -72,80 +72,42 @@ def create_labeled_video_3d(
7272 fps = 30 ,
7373 dpi = 300 ,
7474):
75- """Creates a video with views from the two cameras and the 3d reconstruction for a
76- selected number of frames.
77-
78- Parameters
79- ----------
80- config : string
81- Full path of the config.yaml file as a string.
82-
83- path : list
84- A list of strings containing the full paths to triangulated files for analysis or a path to the directory,
85- where all the triangulated files are stored.
86-
87- videofolder: string
88- Full path of the folder where the videos are stored.
89- Use this if the videos are stored in a different location other than
90- where the triangulation files are stored.
91- By default is ``None`` and therefore looks for video files in the
92- directory where the triangulation file is stored.
93-
94- start: int
95- Integer specifying the start of frame index to select.
96- Default is set to 0.
97-
98- end: int
99- Integer specifying the end of frame index to select.
100- Default is set to None, where all the frames of the video are used for creating the labeled video.
101-
102- trailpoints: int
103- Number of revious frames whose body parts are plotted in a frame (for displaying history).
104- Default is set to 0.
105-
106- videotype: string, optional
107- Checks for the extension of the video in case the input to the video is a directory.\n
108- Only videos with this extension are analyzed.
109- If left unspecified, videos with common extensions ('avi', 'mp4', 'mov', 'mpeg', 'mkv') are kept.
110-
111- view: list
112- A list that sets the elevation angle in z plane and azimuthal angle in x,y plane of 3d view.
113- Useful for rotating the axis for 3d view
114-
115- xlim: list
116- A list of integers specifying the limits for xaxis of 3d view.
117- By default it is set to [None,None], where the x limit is set by t
118- aking the minimum and maximum value of the x coordinates for all the bodyparts.
119-
120- ylim: list
121- A list of integers specifying the limits for yaxis of 3d view.
122- By default it is set to [None,None], where the y limit is set by
123- taking the minimum and maximum value of the y coordinates for all the bodyparts.
124-
125- zlim: list
126- A list of integers specifying the limits for zaxis of 3d view.
127- By default it is set to [None,None], where the z limit is set by
128- taking the minimum and maximum value of the z coordinates for all the bodyparts.
129-
130- draw_skeleton: bool
131- If ``True`` adds a line connecting the body parts making a skeleton on on each frame.
132- The body parts to be connected and the color of these connecting lines are specified in the config file.
133- By default: ``True``
134-
135- color_by : string, optional (default='bodypart')
136- Coloring rule. By default, each bodypart is colored differently.
137- If set to 'individual', points belonging to a single individual are colored the same.
138-
139- Example:
140- -------
141- Linux/MacOs
142- >>> deeplabcut.create_labeled_video_3d(config, ["/data/project1/videos/3d.h5"], start=100, end=500)
143-
144- To create labeled videos for all the triangulated files in the folder
145- >>> deeplabcut.create_labeled_video_3d(config, ["/data/project1/videos"], start=100, end=500)
146-
147- To set the xlim, ylim, zlim and rotate the view of the 3d axis
148- >>> deeplabcut.create_labeled_video_3d(config,['/data/project1/videos'],start=100,
75+ """Create a video with two camera views and 3D reconstruction for selected frames.
76+
77+ Args:
78+ config (string): Full path of the config.yaml file as a string.
79+ path (list): Full paths to triangulated files for analysis, or a directory containing them.
80+ videofolder (string): Full path of the folder where videos are stored.
81+ Use when videos are not co-located with triangulation files.
82+ Defaults to None (videos searched next to the triangulation file).
83+ start (int): Start frame index to select. Defaults to 0.
84+ end (int): End frame index to select.
85+ Defaults to None (all frames used).
86+ trailpoints (int): Number of previous frames whose body parts are plotted (history).
87+ Defaults to 0.
88+ videotype (string, optional): When ``path`` is a directory, only videos with this extension are
89+ analyzed. If unspecified, common extensions ('avi', 'mp4', 'mov', 'mpeg', 'mkv') are kept.
90+ view (list): Elevation (z plane) and azimuth (x,y plane) angles for the 3D view.
91+ xlim (list): Limits for the 3D x-axis.
92+ Defaults to [None, None] (min/max over all bodyparts).
93+ ylim (list): Limits for the 3D y-axis.
94+ Defaults to [None, None] (min/max over all bodyparts).
95+ zlim (list): Limits for the 3D z-axis.
96+ Defaults to [None, None] (min/max over all bodyparts).
97+ draw_skeleton (bool): If True, draw skeleton lines on each frame (from config).
98+ Defaults to True.
99+ color_by (string, optional): Coloring rule. Each bodypart colored differently by default.
100+ Use 'individual' to color all points of one individual the same. Defaults to 'bodypart'.
101+
102+ Examples:
103+ Linux/MacOs
104+ >>> deeplabcut.create_labeled_video_3d(config, ["/data/project1/videos/3d.h5"], start=100, end=500)
105+
106+ To create labeled videos for all the triangulated files in the folder
107+ >>> deeplabcut.create_labeled_video_3d(config, ["/data/project1/videos"], start=100, end=500)
108+
109+ To set the xlim, ylim, zlim and rotate the view of the 3d axis
110+ >>> deeplabcut.create_labeled_video_3d(config,['/data/project1/videos'],start=100,
149111 end=500,view=[30,90],xlim=[-12,12],ylim=[15,25],zlim=[20,30])
150112 """
151113 os .getcwd ()
0 commit comments