Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Saving Image onto cRIO (http://www.chiefdelphi.com/forums/showthread.php?t=102565)

2869Robotics 11-02-2012 15:54

Saving Image onto cRIO
 
In my code i have
Code:

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?

kingofirony 11-02-2012 17:51

Re: Saving Image onto cRIO
 
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.

cgmv123 12-02-2012 11:51

Re: Saving Image onto cRIO
 
As I recall, It writes straight to the root. Make sure you are FTPing in properly.

2869Robotics 12-02-2012 12:49

Re: Saving Image onto cRIO
 
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?

loafdog 12-02-2012 21:50

Re: Saving Image onto cRIO
 
See this thread http://www.chiefdelphi.com/forums/sh...d.php?t=101778

nickpeq 12-02-2012 22:05

Re: Saving Image onto cRIO
 
Nothing but "/tmp/particles.png" works for me.

2869Robotics 14-02-2012 19:38

Re: Saving Image onto cRIO
 
I get this error when I try to write the image to the cRIO. Anyone know how to fix this?

Code:

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)



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

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