View Single Post
  #3   Spotlight this post!  
Unread 14-11-2012, 20:11
2185Bilal's Avatar
2185Bilal 2185Bilal is offline
Driver, Ld. Programmer, Electrical
AKA: Bilal Majeed
FRC #2185 (Ramazoidz)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Toronto, Canada
Posts: 110
2185Bilal will become famous soon enough
Post Re: Camera Programming

Okay thanks,

So I do have one question:

So here I have a snippet of the sample code given for Java programming:
Code:
//ColorImage image = camera.getImage();     // comment if using stored images
ColorImage image;                           // next 2 lines read image from flash on cRIO
image =  new RGBImage("/10ft2.jpg");
BinaryImage thresholdImage = image.thresholdRGB(255, 255, 0, 0, 0, 0);   // keep only red objects
BinaryImage bigObjectsImage = thresholdImage.removeSmallObjects(false, 2);  // remove small artifacts
BinaryImage convexHullImage = bigObjectsImage.convexHull(false);          // fill in occluded rectangles
BinaryImage filteredImage = convexHullImage.particleFilter(cc);           // find filled in rectangles
Now, the part that I have in bold, when I remove the "//" from the "ColourImage image = camera.getImage();" and comment out the other two lines. Netbeans gives me the error saying:
Code:
unreported exception AxisCameraException; must be caught or declared to be thrown
So what does this mean, and am I supposed to get this error, because I want to use my camera to obtain my image, not the sample images.

Also, I was just wondering. If I do happen to use the sample image, how do I get it on the cRIO. I know in the documentations it says, ftp to the root directory. But what does that actually mean, like how do i ftp to the cRIO, which software do I use and etc.

Thanks in advance
__________________
RAMAZOIDZ

2009 Toronto West Regional - Regional Winners
2009 Waterloo Regional - Regional Winners
Reply With Quote