nicetoolbox.detectors.feature_detectors.kinematics.utils.frame_with_linegraph¶
- nicetoolbox.detectors.feature_detectors.kinematics.utils.frame_with_linegraph(frame, data, categories, current_frame, global_min, global_max)[source]¶
Combines a video frame with the plots for PersonL and PersonR up to the current frame.
This function takes a video frame and data for two people, and combines the frame with line graphs of the data up to the current frame.
- Parameters:
frame (numpy.ndarray) – The video frame to which the line graphs will be added.
data (list of numpy.ndarray) – The data to be plotted. Each array represents data for a person.
categories (list of str) – The categories for the data. Each category corresponds to a line on the graph.
current_frame (int) – The current frame number. Only data up to this frame will be plotted.
global_min (float) – The minimum value across all data. Used to set the y-axis limit.
global_max (float) – The maximum value across all data. Used to set the y-axis limit.
- Returns:
The video frame combined with the line graphs.
- Return type:
combined_img (numpy.ndarray)