Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
90f74e2b
Commit
90f74e2b
authored
7 years ago
by
Angel Santamaria-Navarro
Browse files
Options
Downloads
Patches
Plain Diff
fix examples with opencv3 api change
parent
c80b39c1
No related branches found
No related tags found
1 merge request
!197
Vision devel
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/examples/test_ROI_ORB.cpp
+11
-0
11 additions, 0 deletions
src/examples/test_ROI_ORB.cpp
src/examples/test_opencv.cpp
+10
-2
10 additions, 2 deletions
src/examples/test_opencv.cpp
src/examples/test_tracker_ORB.cpp
+15
-1
15 additions, 1 deletion
src/examples/test_tracker_ORB.cpp
with
36 additions
and
3 deletions
src/examples/test_ROI_ORB.cpp
+
11
−
0
View file @
90f74e2b
...
...
@@ -52,6 +52,7 @@ int main(int argc, char** argv)
unsigned
int
scoreType
=
0
;
//#enum { kBytes = 32, HARRIS_SCORE=0, FAST_SCORE=1 };
unsigned
int
patchSize
=
31
;
#if defined (HAVE_OPENCV3)
detector_descriptor_ptr_
=
cv
::
ORB
::
create
(
nfeatures
,
//
scaleFactor
,
//
nlevels
,
//
...
...
@@ -60,6 +61,16 @@ int main(int argc, char** argv)
WTA_K
,
//
scoreType
,
//
patchSize
);
//,
#else
detector_descriptor_ptr_
=
cv
::
ORB
(
nfeatures
,
//
scaleFactor
,
//
nlevels
,
//
edgeThreshold
,
//
firstLevel
,
//
WTA_K
,
//
scoreType
,
//
patchSize
);
#endif
std
::
vector
<
cv
::
KeyPoint
>
target_keypoints
;
cv
::
KeyPointsFilter
keypoint_filter
;
...
...
This diff is collapsed.
Click to expand it.
src/examples/test_opencv.cpp
+
10
−
2
View file @
90f74e2b
...
...
@@ -81,8 +81,16 @@ int main(int argc, char** argv)
cv
::
moveWindow
(
"Feature tracker"
,
0
,
0
);
// set image processors
cv
::
Ptr
<
cv
::
FeatureDetector
>
detector_descriptor_ptr
=
cv
::
ORB
::
create
(
1000
,
2
,
8
,
16
,
0
,
3
,
0
,
31
);
cv
::
Ptr
<
cv
::
DescriptorMatcher
>
matcher_ptr
=
cv
::
DescriptorMatcher
::
create
(
"BruteForce-Hamming(2)"
);
cv
::
Ptr
<
cv
::
FeatureDetector
>
detector_descriptor_ptr
;
cv
::
Ptr
<
cv
::
DescriptorMatcher
>
matcher_ptr
;
#if defined (HAVE_OPENCV3)
detector_descriptor_ptr
=
cv
::
ORB
::
create
(
1000
,
2
,
8
,
16
,
0
,
3
,
0
,
31
);
matcher_ptr
=
cv
::
DescriptorMatcher
::
create
(
"BruteForce-Hamming(2)"
);
#else
detector_descriptor_ptr
=
cv
::
ORB
(
1000
,
2
,
8
,
16
,
0
,
3
,
0
,
31
);
matcher_ptr
=
cv
::
BFMatcher
();
#endif
// declare all variables
std
::
vector
<
cv
::
KeyPoint
>
keypoints_1
,
keypoints_2
;
...
...
This diff is collapsed.
Click to expand it.
src/examples/test_tracker_ORB.cpp
+
15
−
1
View file @
90f74e2b
...
...
@@ -74,6 +74,7 @@ int main(int argc, char** argv)
unsigned
int
roi_width
=
200
;
unsigned
int
roi_heigth
=
200
;
#if defined (HAVE_OPENCV3)
detector_descriptor_ptr_
=
cv
::
ORB
::
create
(
nfeatures
,
//
scaleFactor
,
//
nlevels
,
//
...
...
@@ -82,12 +83,25 @@ int main(int argc, char** argv)
WTA_K
,
//
scoreType
,
//
patchSize
);
//
matcher_ptr_
=
cv
::
DescriptorMatcher
::
create
(
"BruteForce-Hamming(2)"
);
#else
detector_descriptor_ptr_
=
cv
::
ORB
(
nfeatures
,
//
scaleFactor
,
//
nlevels
,
//
edgeThreshold
,
//
firstLevel
,
//
WTA_K
,
//
scoreType
,
//
patchSize
);
//
matcher_ptr_
=
cv
::
DescriptorMatcher
::
create
(
"BruteForce-Hamming(2)"
);
matcher_ptr
=
cv
::
BFMatcher
();
#endif
unsigned
int
pattern_radius
=
(
unsigned
int
)(
patchSize
);
unsigned
int
size_bits
=
detector_descriptor_ptr_
->
descriptorSize
()
*
8
;
matcher_ptr_
=
cv
::
DescriptorMatcher
::
create
(
"BruteForce-Hamming(2)"
);
//=====================================================
unsigned
int
buffer_size
=
20
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment