Ask Your Question
2

destroy a mousecallback

asked May 20 '14

Stoo gravatar image

updated Sep 20 '0

Hi everyone,

In an MFC application i sometimes have to start and stop my camera. The frames are displayed in a MFC picture control which is linked to an opencv Window. So far, so good. I used the mousecallback to perform some algorithms and it works

The only problem is that when i stop the camera and destroy the opencv window, the program bugs. I guess it's because i set the mousecallback on that windows which no longer exists. So my question is, how can i destroy the mousecallback?

Thanks beforehand =)

Preview: (hide)

1 answer

Sort by » oldest newest most voted
1

answered May 21 '14

berak gravatar image

setMouseCallback(windowname,NULL);

Preview: (hide)

Question Tools

Stats

Asked: May 20 '14

Seen: 1,616 times

Last updated: May 20 '14