I'm new to both Android development and OpenCV. I downloaded the OpenCV library for Android from http://sourceforge.net/projects/opencvlibrary/files/opencv-android/ and set up a phone using the Virtual Device Manager. When I try to run "OpenCV Tutorial 0 - Android Camera" in Eclipse, the phone's screen says "Fatal error: can't open camera!" and I get these errors in the log:
08-07 15:02:57.322: E/Trace(708): error opening trace file: No such file or directory (2)
08-07 15:02:57.772: E/Sample::SurfaceView(708): Can't open camera!
I also tried running a simple project:
package com.example;
import org.opencv.core.Mat;
import org.opencv.highgui.Highgui;
public class Test{
public static void main(String[] args) {
Mat example = Highgui.imread("/image.jpg");
return;
}
}
which gives me the error
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.highgui.Highgui.imread_1(Ljava/lang/String;)J
How can I fix these errors? On a side note, /image.jpg looks in the parent directory of the project, not the SD card on the Android virtual device, right?
Thanks so much.