Path: blob/master/samples/java/sbt/src/main/scala/Main.scala
16354 views
/*1* The main runner for the Java demos.2* Demos whose name begins with "Scala" are written in the Scala language,3* demonstrating the generic nature of the interface.4* The other demos are in Java.5* Currently, all demos are run, sequentially.6*7* You're invited to submit your own examples, in any JVM language of8* your choosing so long as you can get them to build.9*/1011import org.opencv.core.Core1213object Main extends App {14// We must load the native library before using any OpenCV functions.15// You must load this library _exactly once_ per Java invocation.16// If you load it more than once, you will get a java.lang.UnsatisfiedLinkError.17System.loadLibrary(Core.NATIVE_LIBRARY_NAME)1819ScalaCorrespondenceMatchingDemo.run()20ScalaDetectFaceDemo.run()21new DetectFaceDemo().run()22}232425