def getcolor(event,x,y,flags,param): if event == cv2.EVENT_LBUTTONDBLCLK: print str([x,y])+" "+str(clearance(int(townList[0][0]),int(townList[0][1]),x,y))