|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Saving Image onto cRIO
In my code i have
Code:
ColorImage image = camera.getImage();
BinaryImage threshImage = image.threshold(....);
threshImage.write("test.jpg");
|
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
||||
|
||||
|
Re: Saving Image onto cRIO
As I recall, It writes straight to the root. Make sure you are FTPing in properly.
|
|
#4
|
|||
|
|||
|
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?
|
|
#5
|
|||
|
|||
|
Re: Saving Image onto cRIO
See this thread http://www.chiefdelphi.com/forums/sh...d.php?t=101778
|
|
#6
|
|||
|
|||
|
Re: Saving Image onto cRIO
Nothing but "/tmp/particles.png" works for me.
|
|
#7
|
|||
|
|||
|
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) |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|