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
3569e18f
Commit
3569e18f
authored
Aug 10, 2011
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed compile errors and warning on ubuntu64
parent
8bb9e430
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
build3dmodel.cpp
samples/cpp/build3dmodel.cpp
+1
-1
camshiftdemo.cpp
samples/cpp/camshiftdemo.cpp
+6
-6
chamfer.cpp
samples/cpp/chamfer.cpp
+12
-12
No files found.
samples/cpp/build3dmodel.cpp
View file @
3569e18f
...
...
@@ -251,7 +251,7 @@ static void findConstrainedCorrespondences(const Mat& _F,
if
(
dist
<
threshold
)
break
;
}
if
(
i1
==
keypoints1
.
size
()
)
if
(
i1
==
(
int
)
keypoints1
.
size
()
)
matches
.
push_back
(
Vec2i
(
i
,
bestIdx1
));
}
}
...
...
samples/cpp/camshiftdemo.cpp
View file @
3569e18f
...
...
@@ -47,19 +47,19 @@ void onMouse( int event, int x, int y, int, void* )
void
help
()
{
printf
(
"
\n
This is a demo that shows mean-shift based tracking
\n
"
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
"
"Usage:
\n
"
" ./camshiftdemo [camera number]
\n
"
)
;
" ./camshiftdemo [camera number]
\n
"
;
printf
(
"
\n\n
Hot keys:
\n
"
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
"
"
\t
p - pause video
\n
"
"To initialize tracking, select the object with mouse
\n
"
)
;
"To initialize tracking, select the object with mouse
\n
"
;
}
const
char
*
keys
=
...
...
@@ -85,8 +85,8 @@ int main( int argc, const char** argv )
if
(
!
cap
.
isOpened
()
)
{
help
();
printf
(
"***Could not initialize capturing...***
\n
"
)
;
printf
(
"Current parameter's value:
\n
"
)
;
cout
<<
"***Could not initialize capturing...***
\n
"
;
cout
<<
"Current parameter's value:
\n
"
;
parser
.
printParams
();
return
-
1
;
}
...
...
samples/cpp/chamfer.cpp
View file @
3569e18f
...
...
@@ -2,19 +2,19 @@
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/contrib/contrib.hpp"
#include <iostream>
using
namespace
cv
;
using
namespace
std
;
void
help
()
{
printf
(
"
\n
This program demonstrates Chamfer matching -- computing a distance between an
\n
"
"edge template and a query edge image.
\n
"
"Usage:
\n
"
"./chamfer <image edge map> <template edge map>,"
" By default the inputs are logo_in_clutter.png logo.png
\n
"
);
cout
<<
"
\n
This program demonstrates Chamfer matching -- computing a distance between an
\n
"
"edge template and a query edge image.
\n
"
"Usage:
\n
"
"./chamfer <image edge map> <template edge map>,"
" By default the inputs are logo_in_clutter.png logo.png
\n
"
;
}
const
char
*
keys
=
...
...
@@ -35,10 +35,10 @@ int main( int argc, const char** argv )
Mat
tpl
=
imread
(
templ
.
c_str
(),
0
);
if
(
img
.
empty
()
||
tpl
.
empty
())
{
printf
(
"Could not read image file %s or %s
\n
"
,
image
.
c_str
(),
templ
.
c_str
())
;
return
-
1
;
}
{
cout
<<
"Could not read image file "
<<
image
<<
" or "
<<
templ
<<
"."
<<
endl
;
return
-
1
;
}
Mat
cimg
;
cvtColor
(
img
,
cimg
,
CV_GRAY2BGR
);
...
...
@@ -54,7 +54,7 @@ int main( int argc, const char** argv )
int
best
=
chamerMatching
(
img
,
tpl
,
results
,
costs
);
if
(
best
<
0
)
{
printf
(
"matching not found
\n
"
)
;
cout
<<
"matching not found"
<<
endl
;
return
-
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