Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Actually I had the same problem.All you need to do is img = np.zeros((512,512,3), np.uint8) img1= cv2.line(img,(0,0),(511,511),(255,0,0),5)

Thats it..renaming the variable for line does the trick.Now you can use imshow to display the image. Do visit my blog li8bot for further info on opencv with python

click to hide/show revision 2
No.2 Revision

Actually I had the same problem.All you need to do is is:

img = np.zeros((512,512,3), np.uint8)
img1= cv2.line(img,(0,0),(511,511),(255,0,0),5)

cv2.line(img,(0,0),(511,511),(255,0,0),5)

Thats it..renaming the variable for line does the trick.Now you can use imshow to display the image. Do visit my blog li8bot for further info on opencv with python