Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Basic Camera Program? (http://www.chiefdelphi.com/forums/showthread.php?t=80254)

I am error 15-01-2010 16:50

Basic Camera Program?
 
Does anyone have a basic camera script example for the camera. I am pulling my hair out trying to find one. If anyone can help that would be great.

jtdowney 17-01-2010 11:18

Re: Basic Camera Program?
 
Below is my attempt to port the simple C++ example in the WPILib guide. The arguments to EllipseDescriptor need to be changes and I didn't include any of the exception handling code. This code may not work at all because I haven't tested it with a robot but the ellipse matches have an X/Y position to the ellipses it detects.

Code:

MonoImage image = AxisCamera.getInstance().getImage().getLuminancePlane();
EllipseMatch[] matches = image.detectEllipses(new EllipseDescriptor(1.0, 2.0, 3.0, 4.0));
           
// do something with the matches


James Dempsey 17-01-2010 11:36

Re: Basic Camera Program?
 
If you are using NetBeans as an IDE, source code is provided. Start a new project, click samples, click Java FRC, and then click on the camer example. If those instructions are slightly out of order I apologize, I do not have the FRC libraries on this computer. Hope this helps
-
James D

jtdowney 17-01-2010 11:51

Re: Basic Camera Program?
 
After reading James suggestion the sample they include looks like a great starting point. I hadn't received any updates to the NetBeans plugins until today this this sample is a useful new addition.

James Dempsey 18-01-2010 03:06

Re: Basic Camera Program?
 
Quote:

Originally Posted by jtdowney (Post 900989)
After reading James suggestion the sample they include looks like a great starting point. I hadn't received any updates to the NetBeans plugins until today this this sample is a useful new addition.

They really did not do a good job documenting where to find their sample code. I hope future release will provide better instructions on where to find it because me and a few others spent well over 4 hours scouring through files to find the things. Someone from my team should be posting some code that incorporates a drive system as well as camera target recognition and an updating dashboard interface.

-
James D

synth3tk 20-01-2010 20:25

Re: Basic Camera Program?
 
Quote:

Originally Posted by James Dempsey (Post 901461)
They really did not do a good job documenting where to find their sample code. I hope future release will provide better instructions on where to find it because me and a few others spent well over 4 hours scouring through files to find the things. Someone from my team should be posting some code that incorporates a drive system as well as camera target recognition and an updating dashboard interface.

-
James D

Let us know when you have this ready! It would really help us out greatly. :)


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

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