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
319b6a44
Commit
319b6a44
authored
Sep 03, 2015
by
Dmitry Melnichenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change SURF to ORB in Java-Sbt sample to remove dependency on external non-free modules
parent
b484f377
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ScalaCorrespondenceMatchingDemo.scala
.../sbt/src/main/scala/ScalaCorrespondenceMatchingDemo.scala
+4
-4
No files found.
samples/java/sbt/src/main/scala/ScalaCorrespondenceMatchingDemo.scala
View file @
319b6a44
...
...
@@ -21,8 +21,8 @@ object ScalaCorrespondenceMatchingDemo {
def
detectAndExtract
(
mat
:
Mat
)
=
{
// A special container class for KeyPoint.
val
keyPoints
=
new
MatOfKeyPoint
// We're using the
SURF
detector.
val
detector
=
FeatureDetector
.
create
(
FeatureDetector
.
SURF
)
// We're using the
ORB
detector.
val
detector
=
FeatureDetector
.
create
(
FeatureDetector
.
ORB
)
detector
.
detect
(
mat
,
keyPoints
)
println
(
s
"There were ${keyPoints.toArray.size} KeyPoints detected"
)
...
...
@@ -34,8 +34,8 @@ object ScalaCorrespondenceMatchingDemo {
// arguments.
val
bestKeyPoints
:
MatOfKeyPoint
=
new
MatOfKeyPoint
(
sorted
:
_
*
)
// We're using the
SURF
descriptor.
val
extractor
=
DescriptorExtractor
.
create
(
DescriptorExtractor
.
SURF
)
// We're using the
ORB
descriptor.
val
extractor
=
DescriptorExtractor
.
create
(
DescriptorExtractor
.
ORB
)
val
descriptors
=
new
Mat
extractor
.
compute
(
mat
,
bestKeyPoints
,
descriptors
)
...
...
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