As the title suggests, I stumbled upon trying to use the java version of OpenCV with IntelliJ IDEA, so make a note.
Download and install the latest one from https://opencv.org/releases.html.
In File-> Profect Structure-> Libraries,
Select [+]-> java and specify C: \ opencv \ build \ java \ opencv \ -340.jar
.
Run-> Edit Configurations ...
Enter -Djava.library.path = C: \ opencv \ build \ java \ x64
in VM Options:
x64
-> x32
C: \ opencv
to the installation location as appropriate.public class OpenCVMain(){
public static void main(String[] args){
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
System.out.println("Hello, OpenCV");
}
}
Hello, OpenCV
Recommended Posts