Go to Post 1 alliance wins a given tournament but all teams teams have a chance to define, chart, and create their own success. - PayneTrain [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-02-2010, 20:16
The Engineer The Engineer is offline
Registered User
FRC #2607
 
Join Date: Jan 2010
Location: America
Posts: 14
The Engineer is an unknown quantity at this point
Java Camera display on Classmate

I am new to java programming and i am completely lost if someone could explain to me how to get the camera image to display on the classmate it would be greatly appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 26-02-2010, 12:00
The Engineer The Engineer is offline
Registered User
FRC #2607
 
Join Date: Jan 2010
Location: America
Posts: 14
The Engineer is an unknown quantity at this point
Re: Java Camera display on Classmate

I am not trying for tracking or anything fancy i just want to get the image and display it on the classmate can someone please help
Reply With Quote
  #3   Spotlight this post!  
Unread 26-02-2010, 12:20
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Java Camera display on Classmate

There's actually some decent sample code for getting the camera working using Java:

(For ease of description, I am assuming you are developing on the Classmate and everything has been updated)
1. Open NetBeans
2. Choose New Project under the File menu
3. Under Categories scroll down to Samples
4. In Samples choose FRC Java
5. Under project choose CircleTrackerDemoProject.zip
6. Click Next
7. Name your project TheEngineerIsAHeroNow
8. Assuming your robot is on and your Classmate has communications with the robot, "Run" your project (Right click it in the Projects tab and find Run)

This should build and deploy your code to the robot. I believe it sets up an arcade style drive with two PWMs and one joystick. If your driver station is up and running you should see moving pictures from your cam. We added:

cam.writeCompression(30);

to ensure smooth frame rates. I think you might need to have a gyro installed, too, or modify the code to not use it. Finally, with a target in the field of view, pull the trigger and the code will lock on and line up the robot.

At least that's how it worked for us.

Last edited by TubaMorg : 26-02-2010 at 12:22. Reason: For Some Reason I Used a Lot of Capital Letters, Still Too Many, but What Can I Do?
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classmate Camera Portion is gone Dr. J-Hoganski FRC Control System 3 27-01-2010 19:20
Java/Netbeans Camera Code for Classmate PC and Axis Camera joshholat Programming 1 23-01-2010 14:59
Axis camera on classmate Radical Pi FRC Control System 1 23-01-2010 05:47
Java Camera Video on ClassMate Thomas4019 Java 8 16-01-2010 00:18
Setting up your new Classmate for Java technology techplex Java 2 10-01-2010 23:46


All times are GMT -5. The time now is 11:03.

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