Ask Your Question
0

alternate to opencv cv.waitkey in python or pygtk

asked 2013-12-09 01:47:01 -0600

Katri gravatar image

updated 2013-12-09 02:03:11 -0600

I am writing a code which saves an image, when space bar is pressed. I used opencv's cv.waitkey() but this functions only if a GUI window is active. I donot want to depend on a GUI Window.

I tried using pygtk's key-press-event, but this doesnot wait for key press. It only does the specified function when a key is presses. I have a pygtk window open

How do i wait for a particular key press in python or pygtk??

Any help is appreciated. Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-12-09 07:16:19 -0600

pyro gravatar image

This really isn't related to OpenCV is it? The official docs for event handling in PyGTK are here: http://www.pygtk.org/pygtk2tutorial/s... There is an example at the end of the page.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-12-09 01:47:01 -0600

Seen: 737 times

Last updated: Dec 09 '13