I am trying to execute the following code in Google Colab:
#Library load
from skimage import io, util
import numpy as np
import matplotlib.pyplot as plt
import cv2
try:
img = io.imread("database/tiburon.png")
#Show image
plt.figure(1)
plt.imshow(img)
#Select ROI
r = cv2.selectROI(img)
except:
print("Image doesn't exist. Please, select a correct path")
However, when I execute it, the session crashes in the command r = cv2.selectROI(img) and I haven't found another way to select the ROI of an image. Hence, I'd like to know if there is a solution or an equivalent function to calculate the ROI of an image.
Thank you in advance.