Commit 319b6a44 authored by Dmitry Melnichenko's avatar Dmitry Melnichenko

Change SURF to ORB in Java-Sbt sample to remove dependency on external non-free modules

parent b484f377
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment