Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

unable to compile java opencv file

I have copied the opencv-xxx.jar file to the local lib directory but I am getting errors shown below:

[root@hadoop1 lib]# pwd

/root/Vision/opencv/samples/java/sbt/lib copy_opencv_jar_here opencv-248.jar

/root/Vision/opencv/samples/java/sbt/src/main/java

DetectFaceDemo.java target

[root@hadoop1 java]# sbt compile

[info] Set current project to java (in build file:/root/Vision/opencv/samples/java/sbt/src/main/java/) [info] Updating {file:/root/Vision/opencv/samples/java/sbt/src/main/java/}java... [info] Resolving org.fusesource.jansi#jansi;1.4 ... [info] Done updating. [info] Compiling 1 Java source to /root/Vision/opencv/samples/java/sbt/src/main/java/target/scala-2.10/classes... [error] /root/Vision/opencv/samples/java/sbt/src/main/java/DetectFaceDemo.java:1: error: package org.opencv.core does not exist [error] import org.opencv.core.Core; [error] ^ [error] /root/Vision/opencv/samples/java/sbt/src/main/java/DetectFaceDemo.java:2: error: package org.opencv.core does not exist [error] import org.opencv.core.Mat; [error] ^ [error] /root/Vision/opencv/samples/java/sbt/src/main/java/DetectFaceDemo.java:3: error: package org.opencv.core does not exist [error] import org.opencv.core.MatOfRect;

unable to compile java opencv file

I have copied the opencv-xxx.jar file to the local lib directory but I am getting errors shown below:

[root@hadoop1 lib]# pwd

/root/Vision/opencv/samples/java/sbt/lib copy_opencv_jar_here opencv-248.jar

/root/Vision/opencv/samples/java/sbt/src/main/java/root/Vision/opencv/samples/java/sbt/src/main/java NOTE>: I am trying to attach this file but the site is not letting me . This is the standard sample program that comes with the openCV installation.

DetectFaceDemo.java targettarget

[root@hadoop1 java]# sbt compile

[info] Set current project to java (in build file:/root/Vision/opencv/samples/java/sbt/src/main/java/) [info] Updating {file:/root/Vision/opencv/samples/java/sbt/src/main/java/}java... [info] Resolving org.fusesource.jansi#jansi;1.4 ... [info] Done updating. [info] Compiling 1 Java source to /root/Vision/opencv/samples/java/sbt/src/main/java/target/scala-2.10/classes... [error] /root/Vision/opencv/samples/java/sbt/src/main/java/DetectFaceDemo.java:1: error: package org.opencv.core does not exist [error] import org.opencv.core.Core; [error] ^ [error] /root/Vision/opencv/samples/java/sbt/src/main/java/DetectFaceDemo.java:2: error: package org.opencv.core does not exist [error] import org.opencv.core.Mat; [error] ^ [error] /root/Vision/opencv/samples/java/sbt/src/main/java/DetectFaceDemo.java:3: error: package org.opencv.core does not exist [error] import org.opencv.core.MatOfRect;