Putting text in front of image [ OpenCV2 ]

Hey everyone,

I have the following code to do it:

cv2.putText(image,"My Sample Text", (x,y), cv2.CV_FONT_HERSHEY_SIMPLEX, 2, 255)

…but I can see error that says there is no CV_FONT_HERSHEY_SIMPLEX attr for Module object

Maybe there is a way to use cv2 puttext to fix it?

Thanks :slight_smile:

try using cv2.FONT_HERSHEY_SIMPLEX instead of cv2.CV_FONT_HERSHEY_SIMPLEX