Skip to content

Commit

Permalink
LazyLoad cv2 because it's not mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaudier committed Sep 5, 2024
1 parent e69c175 commit 1249138
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spas/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
print('ueye DLL not installed')
# import pyueye as ueye
# from pyueye import ueye
import cv2
import time

def spectral_binning(F: np.ndarray, wavelengths: np.ndarray, lambda_min: int,
Expand Down Expand Up @@ -484,6 +483,7 @@ def displayVid(camPar):
start_time = time.time()

#...and finally display it
import cv2
cv2.imshow(window_name, frame*fac)

# if cv2.waitKey(1) & 0xFF == ord('p'):
Expand Down Expand Up @@ -659,7 +659,9 @@ def extract_ROI_coord(DMD_params, acquisition_parameters, all_path, data_folder_
Returns:
No return, just display the coordinate to be inserted in the "SETUP" section
"""


import cv2

if data_name != all_path.data_name and data_name != '':
print('Warning, you read an old acquisition')
print('')
Expand Down Expand Up @@ -805,4 +807,4 @@ def extract_ROI_coord(DMD_params, acquisition_parameters, all_path, data_folder_





0 comments on commit 1249138

Please sign in to comment.