View Single Post
  #2   Spotlight this post!  
Unread 13-02-2012, 08:56
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 102
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: unable to compile camera code

I'm guessing that you haven't added the SmartDashboard JAR files to your NetBeans project. Here are my suggestions:
  • Right click on your project in the NetBeans project browser (left side navigation) and select properties
  • Select the "Libraries" category
  • Click on the "Add Library" button, then click the "Create" button and add a library named "SmartDashboard"
  • You will then be asked to add a collection of JAR files to include in the library.
  • Click the "Add JAR/Folder" button, and the SmartDashboard.jar file (look under "C:\Program Files\SmartDashboard").
  • Click the "Add JAR/Folder" button, and the WPICameraExtension.jar file (look under "C:\Program Files\SmartDashboard\extensions").
  • Click the "Add JAR/Folder" button, and the javacpp.jar file (look under "C:\Program Files\SmartDashboard\extensions\lib").
  • Click the "Add JAR/Folder" button, and the javacv-windows-x86.jar file (look under "C:\Program Files\SmartDashboard\extensions\lib").
  • Click the "Add JAR/Folder" button, and the javacv.jar file (look under "C:\Program Files\SmartDashboard\extensions\lib").
  • Click the "Add JAR/Folder" button, and the WPIJavaCV.jar file (look under "C:\Program Files\SmartDashboard\extensions\lib").

This should include all of the JAR files necessary to work on SmartDashboard plugins and driver station side image processing.

If you decide to create additional SmartDashboard projects, you should just be able to select the new "SmartDashboard" library we created above (you won't have to add all of the JAR files again).

NOTE: We ran across a memory leak in the WPIJavaCV.jar file that causes the system to run out of memory and crash after processing too many images. There was a fix - but I'm not sure it's been pushed out. If you find your program crashing, use Window's Task Manager to observe it when running and see if it consumes a lot of memory when running. If so, you may want to refer to this post:

http://www.chiefdelphi.com/forums/sh...67&postcount=6

It has a unofficial replacement for the WPIJavaCV.jar file which was built from the updated source files at the SmartDashboard project.
Reply With Quote