In [1]:
import cv2 

clicked = False 
def onMouse( event, x, y, flags, param): 
    global clicked 
    if event == cv2.EVENT_LBUTTONUP: 
        clicked = True 

cameraCapture = cv2.VideoCapture(0) 
cv2.namedWindow('MyWindow') 
cv2.setMouseCallback('MyWindow', onMouse) 
print 'Showing camera feed. Click window or press any key to stop.' 
success, frame = cameraCapture.read() 
print success
while success and cv2. waitKey( 1) == -1 and not clicked: 
    cv2. imshow('MyWindow', frame) 
    success, frame = cameraCapture.read()

cameraCapture.release()
cv2. destroyWindow('MyWindow')


---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-b7ce820de564> in <module>()
----> 1 import cv2
      2 
      3 clicked = False
      4 def onMouse( event, x, y, flags, param):
      5     global clicked

ImportError: DLL load failed: The specified procedure could not be found.

In [ ]:


In [ ]: