Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

First, don't draw circles, it's a very slow operation. Use the img.at<...>(i,j) (or its python equivalent) to set a pixel directly.

To draw continuously, just draw a line between the last and the actual position (replace the circle functions with the following code):

cv2.line(img,(ix,iy),(x,y),(0,0,255),10)
ix=x
iy=y