Reputation: 1121
I am new to python. Just trying to get the basic idea of python. Here is how I try and get error msg, after I installed the package.
import cv2
import numpy as np
img = cv2.imread('lena.jpg')
print(img.shape)
but i just get a 'NoneType' msg.
It seems I successfully import the openCV
package, but I just can't use its functions.
I did move the 'lena.jpg' to the same directory, but still get error msg.
Please advise how I can move on.
Upvotes: 1
Views: 61
Reputation: 1651
It's most likely that lena.jpg
is not in your current working directory. Try specifying the exact path to your image or moving the file to the same directory as your test.py
.
Upvotes: 1