nicetoolbox.detectors.feature_detectors.leaning.utils.frame_with_linegraph

nicetoolbox.detectors.feature_detectors.leaning.utils.frame_with_linegraph(frame, current_frame, data, fig, canvas, axL, axR)[source]

Combine a video frame with the plots for PersonL and PersonR up to the current frame.

Parameters:
  • frame (numpy.ndarray) – The current video frame as a numpy array.

  • current_frame (int) – The index of the current frame.

  • data (list) – A list containing two numpy arrays, dataL and dataR, representing the leaning angles for PersonL and PersonR respectively.

  • fig (matplotlib.figure.Figure) – 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.

Returns:

A numpy array representing the combined video frame and the plots.

Return type:

numpy.ndarray