Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

cv2.imread() gives None, but the path/cwd is correct

$
0
0
Hello, I had this problem already and it was solved without any clear reason. I had my Jupyter Notebook tab open and didn't change anything and then it worked. I already read articles and other threads on this, but couldn't find a solution for this; just look at my screenshot: PATH = "savefig/plotXBIC_singlecell/01.png" img = cv2.imread(PATH) print(img) print(path.exists(PATH)) None True ![image description](/upfiles/15949332709427477.png) On a PyImageSearch blog post I read that this can happen with bad compiling, such as JPEGs. But this doesn't make sense: It already worked a few hours ago and I could display the img with plt.imshow(). (Not with cv2.imshow(), that leads to my kernel crashing.)

Viewing all articles
Browse latest Browse all 41027

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>