Merge pull request #5298 from slothspot:master

pull/4110/head
Maksim Shabunin 9 years ago
commit 0d29774401
  1. 2
      samples/java/sbt/project/plugins.sbt
  2. 1
      samples/java/sbt/src/main/java/DetectFaceDemo.java
  3. 8
      samples/java/sbt/src/main/scala/ScalaCorrespondenceMatchingDemo.scala
  4. 1
      samples/java/sbt/src/main/scala/ScalaDetectFaceDemo.scala

@ -1 +1 @@
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

@ -5,6 +5,7 @@ import org.opencv.core.Point;
import org.opencv.core.Rect;
import org.opencv.core.Scalar;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.imgproc.Imgproc;
import org.opencv.objdetect.CascadeClassifier;
/*

@ -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)

@ -3,6 +3,7 @@ import org.opencv.core.MatOfRect
import org.opencv.core.Point
import org.opencv.core.Scalar
import org.opencv.imgcodecs.Imgcodecs
import org.opencv.imgproc.Imgproc
import org.opencv.objdetect.CascadeClassifier
import reflect._

Loading…
Cancel
Save