<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># coding: utf-8
import cv2

clk=False
def mson(event,x,y,flags,param):
    global clk
    if event==cv2.EVENT_LBUTTONUP:
        clk=True
    
vdocap = cv2.VideoCapture(0)
cv2.namedWindow('qq')
cv2.setMouseCallback('qq',mson)

print "start"
ret,frame=vdocap.read()
while ret and cv2.waitKey(1)==-1 and not clk :
    cv2.imshow('qq',frame)
    ret,frame=vdocap.read()

cv2.destroyWindow('qq')    
vdocap.release()
print "OK"</pre></body></html>