I keep getting pylint errors saying:
module 'cv2' has no "something" member
and my cv2 module doesn't work.
I'm clueless as to why; as far as I know I installed it correctly. I even uninstalled and reinstalled about 20 times.
When i print out the modules i have in my python lib cv2 is printed; its functions are printed correctly. I'm using python 3.6.6 and don't have another version of python installed.
For example, this code will print: "the images are the same" no matter what images I'm giving it, as the 2 images will always be equal to "None".
import cv2
import numpy as np
image1 = cv2.imread("1.jpg")
image2 = cv2.imread("2.jpg")
difference = cv2.subtract(image1, image2)
result = not np.any(difference) #if difference is all zeros it will return False
if result is True:
print ("The images are the same")
else:
cv2.imwrite("result.jpg", difference)
print ("the images are different")
Anyone know whats going on?