Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
eec30b08
Commit
eec30b08
authored
May 18, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added cv::setMouseCallback and cv::startWindowThread
parent
47c3e794
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
highgui.hpp
modules/highgui/include/opencv2/highgui/highgui.hpp
+6
-0
window.cpp
modules/highgui/src/window.cpp
+10
-0
No files found.
modules/highgui/include/opencv2/highgui/highgui.hpp
View file @
eec30b08
...
...
@@ -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
>
());
...
...
modules/highgui/src/window.cpp
View file @
eec30b08
...
...
@@ -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
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment