Skip to content

Instantly share code, notes, and snippets.

@kamiyaowl
Created May 13, 2014 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kamiyaowl/57f72a70e20db161a691 to your computer and use it in GitHub Desktop.
Save kamiyaowl/57f72a70e20db161a691 to your computer and use it in GitHub Desktop.
scala + opencv with sbt
$sudo apt-get install libopencv-dev
$mkdir hellocv
$cd hellocv
$mkdir lib
#get opencv-2XX.jar and copy into hellocv/lib
#sudo dpkg -L libopencv-dev
$cp /usr/share/OpenCV/java/opencv-248.jar lib/
$sbt run
import org.opencv.core.Core
import org.opencv.core.Mat
import org.opencv.core.CvType
object hellocv {
def main(args:Array[String]) {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME)
val mat = Mat.eye(3,3, CvType.CV_8UC1)
println(mat.dump)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment