官术网_书友最值得收藏!

The NetBeans configuration

In case you are more comfortable working with NetBeans, the configuration process is pretty much like Eclipse:

  1. 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.
  2. Now, right-click on your Libraries folder and click on Add Library..., as shown in the following screenshot:
  3. 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:
  4. Now point to your library, which is where the opencv-300.jar file is present—usually in opencv/build/java/. As your library is properly configured, select it in the Add Library dialog.
  5. 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.

主站蜘蛛池模板: 营山县| 鲁甸县| 京山县| 巴楚县| 喀喇沁旗| 栾城县| 澄江县| 隆昌县| 亳州市| 陕西省| 维西| 乌兰浩特市| 莎车县| 磐安县| 德惠市| 宁乡县| 历史| 政和县| 象州县| 永和县| 南皮县| 湖北省| 沙坪坝区| 通化县| 黔西县| 宜都市| 闻喜县| 峡江县| 乐亭县| 罗定市| 西峡县| 科技| 肇东市| 曲水县| 剑河县| 吐鲁番市| 丹寨县| 浦东新区| 卫辉市| 凉城县| 松潘县|