forked from olincollege/just-dance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjust_dance_view.py
41 lines (32 loc) · 1.02 KB
/
just_dance_view.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
Set 'JustDanceView' class for the application
"""
import cv2
class JustDanceView:
"""
A class to display frames using OpenCV
Attributes:
model (object): An object representing the model
Methods:
__init__: Initialize a new instance of the JustDanceView class
display_frame: Display a frame in a window using OpenCV
"""
def __init__(self, model):
"""
Initialize a new instance of the JustDanceView class
Args:
model: An object representing the model used in the application
"""
self.model = model
@staticmethod
def display_frame(frame, window_name):
"""
Display a frame in a window using OpenCV
Args:
frame (ndarray): The frame to be displayed.
window_name (str): The name of the window to display the frame in
Returns:
None
"""
cv2.imshow(window_name, frame) # pylint: disable=no-member
cv2.waitKey(10) # pylint: disable=no-member