mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
added cv::setMouseCallback and cv::startWindowThread
This commit is contained in:
parent
47c3e79423
commit
eec30b08d4
@ -58,6 +58,7 @@ enum { WINDOW_AUTOSIZE=1 };
|
||||
|
||||
CV_EXPORTS void namedWindow( const string& winname, int flags CV_DEFAULT(WINDOW_AUTOSIZE) );
|
||||
CV_EXPORTS void destroyWindow( const string& winname );
|
||||
CV_EXPORTS int startWindowThread();
|
||||
|
||||
CV_EXPORTS void setWindowProperty(const string& winname, int prop_id, double prop_value);//YV
|
||||
CV_EXPORTS double getWindowProperty(const string& winname, int prop_id);//YV
|
||||
@ -74,6 +75,11 @@ CV_EXPORTS int createTrackbar( const string& trackbarname, const string& winname
|
||||
CV_EXPORTS int getTrackbarPos( const string& trackbarname, const string& winname );
|
||||
CV_EXPORTS void setTrackbarPos( const string& trackbarname, const string& winname, int pos );
|
||||
|
||||
typedef void (*MouseCallback )(int event, int x, int y, int flags, void* param);
|
||||
|
||||
//! assigns callback for mouse events
|
||||
CV_EXPORTS void setMouseCallback( const string& windowName, MouseCallback onMouse, void* param=0);
|
||||
|
||||
CV_EXPORTS Mat imread( const string& filename, int flags=1 );
|
||||
CV_EXPORTS bool imwrite( const string& filename, const Mat& img,
|
||||
const vector<int>& params=vector<int>());
|
||||
|
@ -154,6 +154,16 @@ int getTrackbarPos( const string& trackbarName, const string& winName )
|
||||
{
|
||||
return cvGetTrackbarPos(trackbarName.c_str(), winName.c_str());
|
||||
}
|
||||
|
||||
void setMouseCallback( const string& windowName, MouseCallback onMouse, void* param)
|
||||
{
|
||||
cvSetMouseCallback(windowName.c_str(), onMouse, param);
|
||||
}
|
||||
|
||||
int startWindowThread()
|
||||
{
|
||||
return cvStartWindowThread();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user