ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to detect mouse input in ecto?

asked 2012-02-26 11:19:31 -0600

Pi Robot gravatar image

updated 2012-02-26 11:25:34 -0600

Hello Ecto Gurus,

I have run through the various parts of the Ecto Kitchen (very cool!) and have succeeded in getting basic feature detection to work using both a webcam and a Kinect. I would like to be able to select rectangular regions on an imshow window with a mouse and use the selected region as a mask for feature detection. This is something that can be done with OpenCV using the SetMouseCallback() function. I tried that alongside the ecto code in my Python script, but it doesn't seem to fire when clicking and dragging on the ecto imshow window.

Is there a way to do this? I see the 'trigger' parameter for keyboard input but I'm not sure if this can be adapted for mouse input.

Thanks!
patrick

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-04-19 23:41:39 -0600

Vincent Rabaud gravatar image

maybe the easiest here is to have a different thread dealing with your input. That is how pressed keys are figured out in imshow. Look at :

https://github.com/plasmodic/ecto_opencv/blob/master/cells/opencv/highgui/imshow.cpp

edit flag offensive delete link more

Comments

Thanks @Vincent Rabaud. I'll take a look.

Pi Robot gravatar image Pi Robot  ( 2012-04-25 03:46:58 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-02-26 11:19:31 -0600

Seen: 290 times

Last updated: Apr 19 '12