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
ffc3a58c
Commit
ffc3a58c
authored
Nov 30, 2010
by
Gary Bradski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added help docs
parent
8af2d0ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
camshiftdemo.cpp
samples/cpp/camshiftdemo.cpp
+22
-7
No files found.
samples/cpp/camshiftdemo.cpp
View file @
ffc3a58c
...
...
@@ -8,6 +8,23 @@
using
namespace
cv
;
using
namespace
std
;
void
help
()
{
cout
<<
"
\n
This is a demo that shows mean shift based tracking
\n
"
<<
"You select a color objects such as your face and it tracks it.
\n
"
<<
"This reads from video camera (0 by default, or the camera number the user enters
\n
"
<<
"Call:
\n
"
<<
"
\n
./camshiftdemo [camera number]"
<<
"
\n
"
<<
endl
;
cout
<<
"
\n\n
Hot keys:
\n
"
"
\t
ESC - quit the program
\n
"
"
\t
c - stop the tracking
\n
"
"
\t
b - switch to/from backprojection view
\n
"
"
\t
h - show/hide object histogram
\n
"
"To initialize tracking, select the object with mouse
\n
"
<<
endl
;
}
Mat
image
;
bool
backprojMode
=
false
;
...
...
@@ -45,6 +62,8 @@ void onMouse( int event, int x, int y, int flags, void* param )
}
}
int
main
(
int
argc
,
char
**
argv
)
{
VideoCapture
cap
;
...
...
@@ -61,16 +80,12 @@ int main( int argc, char** argv )
if
(
!
cap
.
isOpened
()
)
{
cout
<<
"Could not initialize capturing...
\n
"
;
help
();
cout
<<
"***Could not initialize capturing...***
\n
"
;
return
0
;
}
cout
<<
"Hot keys:
\n
"
"
\t
ESC - quit the program
\n
"
"
\t
c - stop the tracking
\n
"
"
\t
b - switch to/from backprojection view
\n
"
"
\t
h - show/hide object histogram
\n
"
"To initialize tracking, select the object with mouse
\n
"
;
help
();
namedWindow
(
"Histogram"
,
1
);
namedWindow
(
"CamShift Demo"
,
1
);
...
...
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