Skip to content Skip to sidebar Skip to footer

Mat Is Not A Numerical Tuple : Opencv Error

i have write down a code showing error i ma not getting it: Please help: Its showing mat is not a numerical tuple: import cv import cv2 capture = cv2.VideoCapture('j.3gp') while(

Solution 1:

I got the answer myself: cv2.threshold returns two values and adding an extra variable at the start rectifies the error like given below as I did in capture.read()

thresholdImage = cv2.threshold(differenceImage,25,255,cv2.THRESH_BINARY)

should be:

_ ,thresholdImage = cv2.threshold(differenceImage,25,255,cv2.THRESH_BINARY)

Solution 2:

_ ,thresholdImage = cv2.threshold(differenceImage,25,255,cv2.THRESH_BINARY)

could also be

thresholdImage = cv2.threshold(differenceImage,25,255,cv2.THRESH_BINARY)**[1]**

Post a Comment for "Mat Is Not A Numerical Tuple : Opencv Error"