Djur
06-01-2013, 22:56
Hi all,
I've been trying to work on vision processing on the driverstation, but I can't seem to get OpenCV working correctly. I have a test file that should and display an image with OpenCV:
import com.googlecode.javacv.CanvasFrame;
import com.googlecode.javacv.cpp.opencv_core.IplImage;
import static com.googlecode.javacv.cpp.opencv_highgui.cvLoadIma ge;
public class TestClass {
public static void main(String[] args) {
//Load image img1 as IplImage
final IplImage image = cvLoadImage("img1.png");
final CanvasFrame canvas = new CanvasFrame("Demo");
canvas.showImage(image);
canvas.setDefaultCloseOperation(javax.swing.JFrame .EXIT_ON_CLOSE);
}
}
But I get an UnsatisfiedLinkError with the message "no jniopencv_core in java.library.path" when I run it. I have a feeling that OpenCV isn't installed correctly based on some research I've done. Are there any good tutorials for getting JavaCV working with the SmartDashboard?
I've been trying to work on vision processing on the driverstation, but I can't seem to get OpenCV working correctly. I have a test file that should and display an image with OpenCV:
import com.googlecode.javacv.CanvasFrame;
import com.googlecode.javacv.cpp.opencv_core.IplImage;
import static com.googlecode.javacv.cpp.opencv_highgui.cvLoadIma ge;
public class TestClass {
public static void main(String[] args) {
//Load image img1 as IplImage
final IplImage image = cvLoadImage("img1.png");
final CanvasFrame canvas = new CanvasFrame("Demo");
canvas.showImage(image);
canvas.setDefaultCloseOperation(javax.swing.JFrame .EXIT_ON_CLOSE);
}
}
But I get an UnsatisfiedLinkError with the message "no jniopencv_core in java.library.path" when I run it. I have a feeling that OpenCV isn't installed correctly based on some research I've done. Are there any good tutorials for getting JavaCV working with the SmartDashboard?