Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Camera Extension not appearing in SmartDashboard (http://www.chiefdelphi.com/forums/showthread.php?t=112132)

dhe95 26-01-2013 20:17

Camera Extension not appearing in SmartDashboard
 
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
Code:

import edu.wpi.first.smartdashboard.camera.WPICameraExtension;
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

Re: Camera Extension not appearing in SmartDashboard
 
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

Re: Camera Extension not appearing in SmartDashboard
 
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

Re: Camera Extension not appearing in SmartDashboard
 
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

Re: Camera Extension not appearing in SmartDashboard
 
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
Code:

java -jar smartdashboard.jar


All times are GMT -5. The time now is 10:09.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi