title: Get pixel location using mouse click/events
body: <p>I wish to collect the pixel location (row-i, col-i) by right-clicking the mouse when the image is displayed. </p>
  
  <p>This is a simple example about a picture downloaded from the internet:</p>
  
  <pre><code>import urllib
  import cv2
  from win32api import GetSystemMetrics
  
  path_image = urllib.urlretrieve("http://www.bellazon.com/main/uploads/monthly_06_2013/post-37737-0-06086500-1371727837.jpg", "local-filename.jpg")[0]
  img = cv2.imread(path_image,0)
  width = GetSystemMetrics(0)
  height = GetSystemMetrics(1)
  scale_width = width / img.shape[1]
  scale_height = height / img.shape[0]
  scale = min(scale_width, scale_height)
  window_width = int(img.shape[1] * scale)
  window_height = int(img.shape[0] * scale)
  cv2.namedWindow('image', cv2.WINDOW_NORMAL)
  cv2.resizeWindow('image', window_width, window_height)
  cv2.imshow('image', img)
  cv2.waitKey(0)
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>At this point, I wish to understand the best way to collect and store the pixel locations in a <code>list</code>.</p>