Java + OpenCV 3.X in IntelliJ IDEA

As the title suggests, I stumbled upon trying to use the java version of OpenCV with IntelliJ IDEA, so make a note.

environment

Install OpenCV

Download and install the latest one from https://opencv.org/releases.html.

Pass Path to IntelliJ

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:

test

code

public class OpenCVMain(){
  public static void main(String[] args){
    System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
    System.out.println("Hello, OpenCV");
  }
}

Execution result

Hello, OpenCV

Referenced site

Recommended Posts

Java + OpenCV 3.X in IntelliJ IDEA
Optimize Java import declarations in IntelliJ IDEA
Write Processing in IntelliJ IDEA
Do HelloWorld in Java / IntelliJ / Gradle
Create Java Spring Boot project in IntelliJ
I did OpenCV camera calibration in Java
About Stream Debugger in IntelliJ IDEA plugin
Creating a project (and GitHub repository) using Java and Gradle in IntelliJ IDEA
Partization in Java
Rock-paper-scissors in Java
Pi in Java
IntelliJ IDEA settings
FizzBuzz in Java
Java --Introduce CheckStyle plugin to IntelliJ IDEA and reflect it in formatter
Detect similar videos in Java and OpenCV rev.2
About the idea of anonymous classes in Java
Settings to display Japanese Javadoc in IntelliJ IDEA
Detect similar videos in Java and OpenCV rev.3
Detect similar videos in Java and OpenCV rev.1
What to do when you think you can't do Groovy-> Java in IntelliJ IDEA CE
Deploy Java application developed in IntelliJ IDEA environment to Alibaba Cloud ECS instance
[java] sort in list
Read JSON in Java
Interpreter implementation in Java
Make Blackjack in Java
Rock-paper-scissors app in Java
Constraint programming in Java
Put java8 in centos7
NVL-ish guy in Java
Combine arrays in Java
"Hello World" in Java
Callable Interface in Java
How to use java non-standard library on IntelliJ IDEA
Azure functions in java
Simple htmlspecialchars in Java
Boyer-Moore implementation in Java
Hello World in Java
webApi memorandum in java
Type determination in Java
Ping commands in Java
Various threads in java
Heapsort implementation (in java)
ASCII art in Java
Compare Lists in Java
POST JSON in Java
Express failure in Java
Create JSON in Java
Date manipulation in Java 8
What's new in Java 8
Use PreparedStatement in Java
What's new in Java 9,10,11
Parallel execution in Java
Initializing HashMap in Java
[Java] A technique for writing constructors, getters, and setters in one shot with IntelliJ IDEA.
Failed to launch checking at Kotlin Koans in IntelliJ IDEA
[Java] A story about IntelliJ IDEA teaching Map's putIfAbsent method
Try using RocksDB in Java
Read binary files in Java 1
Get EXIF information in Java
Save Java PDF in Excel
[Neta] Sleep Sort in Java