1 | initial version |
Check argument tyope : this program is good
img = np.zeros((256,256,3),np.uint8)
x = cv.putText(img,'test',(100,10), cv.FONT_HERSHEY_SIMPLEX, 1.0,(255,255,255),lineType=cv.LINE_AA)
but this is wrong :
x = cv.putText(img,['test'],(100,10), cv.FONT_HERSHEY_SIMPLEX, 1.0,(255,255,255),lineType=cv.LINE_AA)
File "<stdin>", line 1, in <module>
TypeError: bad argument type for built-in operation
or this one
x = cv.putText(img,49,(100,10), cv.FONT_HERSHEY_SIMPLEX, 1.0,(255,255,255),lineType=cv.LINE_AA)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: bad argument type for built-in operation
2 | No.2 Revision |
Check argument tyope type : this program is good
img = np.zeros((256,256,3),np.uint8)
x = cv.putText(img,'test',(100,10), cv.FONT_HERSHEY_SIMPLEX, 1.0,(255,255,255),lineType=cv.LINE_AA)
but this is wrong :
x = cv.putText(img,['test'],(100,10), cv.FONT_HERSHEY_SIMPLEX, 1.0,(255,255,255),lineType=cv.LINE_AA)
File "<stdin>", line 1, in <module>
TypeError: bad argument type for built-in operation
or this one
x = cv.putText(img,49,(100,10), cv.FONT_HERSHEY_SIMPLEX, 1.0,(255,255,255),lineType=cv.LINE_AA)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: bad argument type for built-in operation