- OpenCV 3.0 Computer Vision with Java
- Daniel Lélis Baggio
- 273字
- 2021-07-16 13:17:31
The NetBeans configuration
In case you are more comfortable working with NetBeans, the configuration process is pretty much like Eclipse:
- Select File | New Project.... On the Projects tab, select Java Application and click on Next. Give the new project an appropriate name and click on Finish.
- Now, right-click on your Libraries folder and click on Add Library..., as shown in the following screenshot:
- As we haven't gone through this process before, a library for OpenCV won't exist. Click on the Create... button on the right-hand side of the pane. It will open a dialog asking for the library name—name it as
OpenCV
—and the Library type, for which you should leave the default option Class Libraries. In the next screen, on the Classpath tab, click Add JAR/Folder... like in the next screenshot: - Now point to your library, which is where the
opencv-300.jar
file is present—usually inopencv/build/java/
. As your library is properly configured, select it in the Add Library dialog. - The last detail to provide is the path for the libraries' native files. Right-click on your project name in the Projects tab and select Properties. Go to the Run item on the tree and under VM Options, set the library path by typing
-Djava.library.path=C:\Users\baggio\Downloads\opencv\build\java\x64
in the text box.
Make sure you change the given path to the one where your OpenCV installation is, and that it points to the folder where the native libraries are, that is, opencv_java300.dll
in Windows, or libopencv_java300.so
in Linux. Now, add the SimpleSample
class code in your project, as pointed. Run the sample and make sure that you don't get any errors.
推薦閱讀
- Arduino開發實戰指南:LabVIEW卷
- Mastering Articulate Storyline
- 新編Premiere Pro CC從入門到精通
- Practical Game Design
- 名師講壇:Spring實戰開發(Redis+SpringDataJPA+SpringMVC+SpringSecurity)
- Spring Boot Cookbook
- 數據結構與算法分析(C++語言版)
- Instant Lucene.NET
- 后臺開發:核心技術與應用實踐
- Solutions Architect's Handbook
- 區塊鏈架構之美:從比特幣、以太坊、超級賬本看區塊鏈架構設計
- C語言從入門到精通
- Get Your Hands Dirty on Clean Architecture
- Visual Basic語言程序設計上機指導與練習(第3版)
- KnockoutJS Blueprints