nicetoolbox.detectors.feature_detectors.leaning.utils.create_video_canvas

nicetoolbox.detectors.feature_detectors.leaning.utils.create_video_canvas(num_of_frames, global_min, global_max)[source]

Create a matplotlib figure and canvas for creating a video with two subplots for PersonL and PersonR.

Parameters:
  • num_of_frames (int) – The total number of frames in the video.

  • global_min (float) – The global minimum value for the y-axis.

  • global_max (float) – The global maximum value for the y-axis.

Returns:

The matplotlib figure object. canvas (matplotlib.backends.backend_agg.FigureCanvasAgg): The matplotlib canvas

object.

axL (matplotlib.axes._subplots.AxesSubplot): The left subplot axis for PersonL. axR (matplotlib.axes._subplots.AxesSubplot): The right subplot axis for PersonR.

Return type:

fig (matplotlib.figure.Figure)