I am trying to load an image using cv2.imread, but keep getting this error
error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'
I googled the error and it seems that most of the time the problem is related to misspelling the file name/path. However, I copied the file path using the "copy path" option on mac. What can be the problem?
My code:
import cv2
import numpy as np
from matplotlib import pyplot as plt
from scipy import ndimage
from skimage import measure, color, io
path='/Users/snysdh/Desktop/A1_Combined_T01.png'
img1=cv2.imread(path)
cv2.imshow("Red Image", img1)