7/14/2016

OpenCV Mouse event example code

You can capture mouse event very easy using callback function.
"setMouseCallback” function is that callback function setting.

And many another events, so we can do various of application.
EVENT_MOUSEMOVE      = 0, 
EVENT_LBUTTONDOWN    = 1, 
EVENT_RBUTTONDOWN    = 2, 
EVENT_MBUTTONDOWN    = 3, 
EVENT_LBUTTONUP      = 4, 
EVENT_RBUTTONUP      = 5, 
EVENT_MBUTTONUP      = 6, 
EVENT_LBUTTONDBLCLK  = 7, 
EVENT_RBUTTONDBLCLK  = 8, 
EVENT_MBUTTONDBLCLK  = 9, 
EVENT_MOUSEWHEEL     = 10, 
EVENT_MOUSEHWHEEL    = 11 








< gist start >

< gist end >


#tags
setMouseCallback,

No comments:

Post a Comment