- OpenCV 3.0 Computer Vision with Java
- Daniel Lélis Baggio
- 286字
- 2021-07-16 13:17:30
The Java OpenCV project in Eclipse
Using OpenCV in any IDE is pretty simple. It is as simple as adding OpenCV JAR, that is, opencv-300.jar
to your classpath. But, as it relies on the native code, you need to point out the dynamic link libraries—so
for Linux, .dll
for Windows, and dylib
for MacOsX.
- In Eclipse, go to File | New | Java Project.
- Give the new project a descriptive name, such as
SimpleSample
. Select the project in the Package Explorer, go to the Project menu and click on Properties. On the Java Build Path tab, go to the Libraries tab, and click on the Add Library… button on the right-hand side, as shown in the following screenshot: - Select User Library in the Add Library dialog, and then click Next.
- Now, click on the User Libraries… button.
- Click on New…. Name your library appropriately, for example,
opencv-3.0.0
. It's time to reference the JAR files. - Click on Add JARs….
- Select the
opencv-300.jar
file in your filesystem; it should be in theopencv\build\java
folder. Then, point to the native library location expanding your JAR as in the following screenshot: - Now, select Native library location by clicking on the Edit… button on the right-hand side of the window and set your native libraries' location folder, for example,
opencv\build\java\x64\
. - Now that OpenCV is properly configured, just select it in your Add library dialog by pressing Finish.
Notice that your project now points to the OpenCV JAR. You can also browse the main classes from the Package Explorer, as seen in the following screenshot:

After the The NetBeans configuration section, a source code to create a simple OpenCV application can be found.
推薦閱讀
- Spring 5企業級開發實戰
- 三維圖形化C++趣味編程
- 區塊鏈:以太坊DApp開發實戰
- Rust Cookbook
- Python高級機器學習
- 從學徒到高手:汽車電路識圖、故障檢測與維修技能全圖解
- Reactive Android Programming
- 深入淺出Serverless:技術原理與應用實踐
- Getting Started with Hazelcast(Second Edition)
- Python全棧數據工程師養成攻略(視頻講解版)
- Natural Language Processing with Java and LingPipe Cookbook
- 從Excel到Python數據分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應用
- 黑莓(BlackBerry)開發從入門到精通
- Learning Unreal Engine Game Development
- Java程序設計教程