Log in

View Full Version : Camera Extension not appearing in SmartDashboard


dhe95
26-01-2013, 20:17
Our team is trying to write our own custom image processing extension for SmartDashboard but whenever we compile and move the .jar to the extensions folder, nothing shows up in the add menu.

Here is the code we are using
import edu.wpi.first.smartdashboard.camera.WPICameraExten sion;
import edu.wpi.first.wpijavacv.WPIColorImage;
import edu.wpi.first.wpijavacv.WPIImage;

public class VisionSystem extends WPICameraExtension {

@Override
public WPIImage processImage(WPIColorImage rawImage) {
return rawImage.getRedChannel();
}
}

Any suggestions?

Johnbot
26-01-2013, 23:54
We had a similar problem. We just re-installed the SmartDashboard from FIRSTForge and used its extensions folder and its jar, and everything was fine afterwards.

dhe95
27-01-2013, 15:33
We tried that and it still doesn't show up. Could it be because it extends WPICameraExtension and not StaticWidget?

Johnbot
28-01-2013, 19:49
No, it should be WPICameraExtension if you want it to display the camera image.
Are you sure you are putting your jar in the extensions folder in C:\Program Files\Smart Dashboard, and that you are running the exe in that folder?

dhe95
28-01-2013, 22:36
Yes, our extensions folder contains WPICameraExtension.jar and our vision jar file. It also includes a folder named lib which contains javacpp.jar, javacv.jar, javacv-windows-x86.jar, and WPIJavaCV.jar

In the view->Add menu, the extensions that show up are Image, Connection Indicator, Label, Robot Preferences, Camera, and Laptop Camera

EDIT: We got it to work by running SmartDashboard through command prompt. Just set directory to SmartDashboard and run
java -jar smartdashboard.jar