diff --git a/opensd_project/visualize.py b/opensd_project/visualize.py index 15d0b0a..845c9ec 100644 --- a/opensd_project/visualize.py +++ b/opensd_project/visualize.py @@ -2,6 +2,7 @@ import matplotlib.pyplot as plt from matplotlib import animation from matplotlib import patches +import cv2 def show_reference_image(images, points=[], roi_size=None, bit_depth=12): @@ -57,3 +58,8 @@ def updatefig(i): ani = animation.FuncAnimation(fig, updatefig, blit=True, frames=images.shape[0], interval=1000/fps) return ani + +def image_save(image,save_path): + filename = 'savedImage.jpg' + cv2.imwrite(save_path+filename,image) + print('Successfully saved') \ No newline at end of file