Opencv: Function Arguments Useful For What?
I do not understand this code taken from OpenCV documentation: import cv2 import numpy as np # mouse callback function def draw_circle(event,x,y,flags,param): if event == cv2.
Solution 1:
Bellow my code is working fine just check it out..
import cv2
import numpy as np
img1=cv2.imread('Image/Desert.jpg')
def draw(event,x,y,flage,param):
if event==cv2.EVENT_LBUTTONDBLCLK:
cv2.circle(img1,(x,y),4,(0,0,0),4)
cv2.namedWindow('Image')
cv2.setMouseCallback('Image',draw)
while(1):
cv2.imshow('Image',img1)
if cv2.waitKey(20) & 0xFF ==27:
break
cv2.destroyAllWindows()
Post a Comment for "Opencv: Function Arguments Useful For What?"