[Image-SIG] Displaying Images and getting input from Mouse

Wynand Singels 13812327 at sun.ac.za
Thu May 4 14:47:58 CEST 2006

Hi there everyone

I'm trying to figure out the best (and fastest way) to display a JPEG image
and then input several (x,y) coordinate pairs from mouse clicks on the

I figured out how to do this in pylab using matplotlib as follows:

	img = 256 - S.misc.pilutil.imread('pic1.jpg')

The function click() gets the coordinates form the event.xdata and
event.ydata, but this is very slow and cumbersome. 

The other option I was looking at was using wxPython - a staticbitmap with
EVT_LEFT_DOWN or something like that. But I'm struggling to get this to
work. I also looked at the Python Image Library (PIL) but there does not
seem to be one conclusive way of doing this.

Please take into account that my end product will have to have a full GUI.

Is there some other package I can use? Or am I missing some part of wxPython
that can do this? Is there anyone that has done anything similar?


More information about the Image-SIG mailing list