Update visualization.py
Browse files- visualization.py +0 -7
visualization.py
CHANGED
@@ -203,13 +203,6 @@ def plot_posture(df, posture_scores, color='blue', anomaly_threshold=3):
|
|
203 |
plt.close()
|
204 |
return fig
|
205 |
|
206 |
-
def fig_to_img(fig):
|
207 |
-
canvas = FigureCanvasAgg(fig)
|
208 |
-
canvas.draw()
|
209 |
-
img = np.frombuffer(canvas.tostring_rgb(), dtype='uint8')
|
210 |
-
img = img.reshape(canvas.get_width_height()[::-1] + (3,))
|
211 |
-
plt.close(fig)
|
212 |
-
return img
|
213 |
|
214 |
def create_video_with_heatmap(video_path, df, mse_embeddings, mse_posture, output_path, desired_fps):
|
215 |
cap = cv2.VideoCapture(video_path)
|
|
|
203 |
plt.close()
|
204 |
return fig
|
205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
def create_video_with_heatmap(video_path, df, mse_embeddings, mse_posture, output_path, desired_fps):
|
208 |
cap = cv2.VideoCapture(video_path)
|