![]() |
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.
|
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
|
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. |
| All times are GMT -5. The time now is 09:27. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi