python - cv2.polylines gives wrong shape -
i try draw reversed triangle code below,but gives normal triangle, though points give these of reversed triangle! tell me wrong?
import cv2 import numpy np f=cv2.imread("c:\desktop\image.jpg") pts = np.array([[195,327],[378,327],[286,144]]) pts = pts.reshape((-1,1,2)) cv2.polylines(f,np.int32([pts]),true,(0,0,255),3) cv2.namedwindow('img') cv2.imshow('img', f) cv2.waitkey() cv2.destroywindow('img')
in opencv coordinates start top-left, (0,0) top-left pixel on view.
try pts = np.array([[195,327],[378,327],[286,500]])
Comments
Post a Comment