Saving Image onto cRIO

In my code i have

ColorImage image = camera.getImage();
BinaryImage threshImage = image.threshold(....);
threshImage.write("test.jpg");

but when I ftp into my cRIO, i can’t find the image. I don’t get any exceptions when it writes the binary image onto the cRIO so it should have been successful. I checked in the root directory of the cRIO but i can’t find the image. Anybody have any ideas as to what is going on?

This is all from memory but it writes to system/ni-rt or is in one of those directories. Also you’re going to want to write a png file rather than a jpeg otherwise your binary file will just be a blank, black image.

As I recall, It writes straight to the root. Make sure you are FTPing in properly.

I type ftp://10.28.69.2 into my browser. I think I’m ftping it correctly, i just can’t find the image that was supposed to be saved onto the cRIO. Do I need to turn my cRIO off and then back on before I can find the image maybe?

See this thread http://www.chiefdelphi.com/forums/showthread.php?t=101778

Nothing but “/tmp/particles.png” works for me.

I get this error when I try to write the image to the cRIO. Anyone know how to fix this?


edu.wpi.first.wpilibj.image.NIVisionException: No error.
[cRIO]     at edu.wpi.first.wpilibj.image.NIVision.assertCleanStatus(edu.wpi.first.wpilibj.image.NIVisionException: No error.
[cRIO]     at edu.wpi.first.wpilibj.image.NIVision.assertCleanStatus(NIVision.java:959)
[cRIO]     at edu.wpi.first.wpilibj.image.NIVision.writeFile(NIVision.java:1043)
[cRIO]     at edu.wpi.first.wpilibj.image.Image.wNIVision.java:959)
[cRIO]     at edu.wpi.first.wpilibj.image.NIVision.writeFile(NIVision.java:1043)
[cRIO]     at edu.wpi.first.wpilibj.image.Image.write(Image.java:51)
[cRIO]     at edu.wpi.first.wpilibj.templates.RobotTemplate.operatorControl(RobotTemplate.java:277)
[cRIO]     at edu.wpi.first.wpilibj.Sirite(Image.java:51)
[cRIO]     at edu.wpi.first.wpilibj.templates.RobotTemplate.operatorControl(RobotTemplate.java:277)
[cRIO]     at edu.wpi.first.wpilibj.SimpleRobot.startCompetition(SimpleRobot.java:118)
[cRIO]     at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase.java:156)
[cRIO]     impleRobot.startCompetition(SimpleRobot.java:118)
[cRIO]     at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase.java:156)
[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.mn 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.ain(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 #3run(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)
[cRIO]  of com.sun.squawk.VM(bci=6)