File I/O Error

Our team has begun working with image processing and camera tracking, so I’m hoping this is something simple that I missed.

I deployed the 2013 Vision Sample Project to the robot, and when I run Autonomous on the robot I get an error in the netbeans console.
It repeats this error in the console until I disable the robot:


[cRIO] edu.wpi.first.wpilibj.image.NIVisionException: File I/O error.
[cRIO]     at edu.wpi.first.wpilibj.image.NIVision.assertCleanStatus(NIVision.java:1076)
[cRIO]     at edu.wpi.first.wpilibj.image.NIVision.readFile(NIVision.java:1204)
[cRIO]     at edu.wpi.first.wpilibj.image.RGBImage.<init>(RGBImage.java:33)
[cRIO]     at edu.wpi.first.wpilibj.templates.VisionSampleProject2013.autonomous(VisionSampleProject2013.java:85)
[cRIO]     at edu.wpi.first.wpilibj.SimpleRobot.startCompetition(SimpleRobot.java:130)
[cRIO]     at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase.java:169)
[cRIO]     in virtual method #10 of javax.microedition.midlet.MIDlet(bci=17)
[cRIO]     at javax.microedition.midlet.MIDletTunnelImpl.callStartApp(64)
[cRIO]     at com.sun.squawk.imp.MIDletMainWrapper.main(110)
[cRIO]     in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO]     at com.sun.squawk.Isolate.run(1506)
[cRIO]     at java.lang.Thread.run(231)
[cRIO]     in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO]     in static method #3 of com.sun.squawk.VM(bci=6)

I’m not really sure what this means, but I hope someone can at least give me an idea of what is happening.

If you go to 10.xx.yy.11 in an internet browser and log in with Username: FRC password:FRC are you able to see the image?

If that’s working try using an FTP client (chrome has one built in) to go to ftp://10.xx.yy.2 and see if the images from you camera are saved there.

[cRIO]     at edu.wpi.first.wpilibj.templates.VisionSampleProject2013.autonomous(VisionSampleProject2013.java:85)

This shows the problem is happening in line 85 of the project. Did you uncomment the following line?

//thresholdImage.write("/threshold.bmp");

By default, the example project reads data from testImage.jpg on the cRIO (which probably doesn’t exist). Have you either uploaded the testImage, or modified the code to use the camera?

Have you read the vision processing tutorial? http://wpilib.screenstepslive.com/s/3120/m/8731

Thanks for the help guys! I guess I never thought of the fact that I might have to upload the test image… Thanks for putting me on the right track