This is the code
import cv2, sys
from numpy import array
img = cv2.imread(sys.argv[1])
img2 = array( 200 * (img[:,:,2] > img[:,:, 1]), dtype='uint8')
objects = cv2.CascadeClassifier.detectMultiScale(img2)
print (objects)
I have the error in the title at line 5. (I have tried also with cv2.CascadeClassifier.detectMultiScale(img)
and I have the same error).
Many thanks!
You have to call the function
detectMultiScale()
on an instance ofCascadeClassifier()