Go to Post well yeah, but we can dream, can't we? - Nuttyman54 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 03-02-2012, 11:37
dominique dominique is offline
Registered User
FTC #0211 (MK211)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Rochester,NY
Posts: 9
dominique is an unknown quantity at this point
Re: Standalone image analysis.

Ok - I will reply to myself as it may help others.
1- I downloaded and installed smartDashboard on my laptop (has a built-in camera).
2- In Netbeans, I created the following (from New Project but no Main Class - in other words it is a class - bot a package).
Quote:
import edu.wpi.first.smartdashboard.camera.WPICameraExten sion;
import edu.wpi.first.wpijavacv.WPIColorImage;
import edu.wpi.first.wpijavacv.WPIImage;

public class BasicCameraExtension extends WPICameraExtension {
@Override
public WPIImage processImage(WPIColorImage rawImage) {
return rawImage.getRedChannel();
}
}
3- Right click on project - select properties and add the following jar to the libraries (Compile):
Quote:
C:\Program Files\SmartDashboard\extension\WPICameraExtension. jar
C:\Program Files\SmartDashboard\SmartDashboard.jar
C:\Program Files\SmartDashboard\extension\WPICameraExtension. jar
This should solve the problems with the imports.

4- Right click on the project and select BUILD
5- Copy the resulting jar file from folder NetBeansProjects\projectname\dist
to folder C:\Program Files\SmartDashboard\extensions (next to WPICameraExtension.jar)
6- Double click on C:\Program Files\SmartDashboard\SmartDashboard.jar, the smartdashboard should launch. Click on View\Add and select the class name of your program : BasicCameraExtension in this example.

You should see the red channel of the image taken by the laptop camera since this is what is returned.

Now...from this how to do image analysis is another story...

Last edited by dominique : 03-02-2012 at 13:24.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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