Open Deepthi-Kairali opened 3 years ago
try this code
import numpy as np import cv2
img = cv2.imdecode(np.fromfile(im_path, dtype=np.uint8), cv2.IMREAD_UNCHANGED)
inplace of img = cv2.imread(filename)
try this code
import numpy as np import cv2
img is in BGR format if the underlying image is a color image
img = cv2.imdecode(np.fromfile(im_path, dtype=np.uint8), cv2.IMREAD_UNCHANGED)
inplace of img = cv2.imread(filename)