Created
May 13, 2014 02:08
-
-
Save kamiyaowl/57f72a70e20db161a691 to your computer and use it in GitHub Desktop.
scala + opencv with sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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