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
04e946b2
Commit
04e946b2
authored
Sep 13, 2012
by
yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make ocl surf sample compile on Linux
parent
35b671ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
surf_matcher.cpp
samples/ocl/surf_matcher.cpp
+5
-5
No files found.
samples/ocl/surf_matcher.cpp
View file @
04e946b2
...
...
@@ -44,7 +44,7 @@
//M*/
#include <iostream>
#include <stdio.h>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
...
...
@@ -58,7 +58,7 @@ using namespace cv::ocl;
//#define USE_CPU_DESCRIPTOR // use cpu descriptor extractor until ocl descriptor extractor is fixed
//#define USE_CPU_BFMATCHER
void
help
();
void
help
()
{
...
...
@@ -169,7 +169,7 @@ int main(int argc, char* argv[])
double
max_dist
=
0
;
double
min_dist
=
100
;
//-- Quick calculation of max and min distances between keypoints
for
(
in
t
i
=
0
;
i
<
keypoints1
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
keypoints1
.
size
();
i
++
)
{
double
dist
=
matches
[
i
].
distance
;
if
(
dist
<
min_dist
)
min_dist
=
dist
;
...
...
@@ -182,7 +182,7 @@ int main(int argc, char* argv[])
//-- Draw only "good" matches (i.e. whose distance is less than 2.5*min_dist )
std
::
vector
<
DMatch
>
good_matches
;
for
(
in
t
i
=
0
;
i
<
keypoints1
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
keypoints1
.
size
();
i
++
)
{
if
(
matches
[
i
].
distance
<
3
*
min_dist
)
{
...
...
@@ -200,7 +200,7 @@ int main(int argc, char* argv[])
std
::
vector
<
Point2f
>
obj
;
std
::
vector
<
Point2f
>
scene
;
for
(
in
t
i
=
0
;
i
<
good_matches
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
good_matches
.
size
();
i
++
)
{
//-- Get the keypoints from the good matches
obj
.
push_back
(
keypoints1
[
good_matches
[
i
].
queryIdx
].
pt
);
...
...
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