与OpenCV 2.3: how to capture frames from Android camera?类似
我正试图在Samsung Fascinate后面的this tutorial(v2.2.1)上运行OpenCV
当我尝试运行样本(例如样本15-puzzle)时,我收到以下错误:
03-31 14:05:39.399: D/dalvikvm(4915): Trying to load lib /data/data/org.opencv.samples.puzzle15/lib/libopencv_java.so 0x47c22ef8
03-31 14:05:39.399: D/dalvikvm(4915): Shared lib '/data/data/org.opencv.samples.puzzle15/lib/libopencv_java.so' already loaded in same CL 0x47c22ef8
03-31 14:05:39.399: D/CAMERA_ACTIVITY(4915): Library name: libopencv_java.so
03-31 14:05:39.399: D/CAMERA_ACTIVITY(4915): Library base address: 0x81800000
03-31 14:05:39.418: D/CAMERA_ACTIVITY(4915): Libraries folder found: /data/data/org.opencv.samples.puzzle15/lib/
03-31 14:05:39.426: D/CAMERA_ACTIVITY(4915): CameraWrapperConnector::connectToLib: folderPath=/data/data/org.opencv.samples.puzzle15/lib/
03-31 14:05:39.426: E/CAMERA_ACTIVITY(4915): ||libnative_camera_r2.2.2.so
03-31 14:05:39.426: E/CAMERA_ACTIVITY(4915): ||libnative_camera_r2.3.3.so
03-31 14:05:39.426: D/CAMERA_ACTIVITY(4915): try to load library 'libnative_camera_r2.2.2.so'
03-31 14:05:39.434: D/CAMERA_ACTIVITY(4915): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/data/org.opencv.samples.puzzle15/lib/libnative_camera_r2.2.2.so, dlerror="Cannot load library: link_image[1995]: failed to link libnative_camera_r2.2.2.so
03-31 14:05:39.434: D/CAMERA_ACTIVITY(4915): "
03-31 14:05:39.434: D/CAMERA_ACTIVITY(4915): try to load library 'libnative_camera_r2.3.3.so'
03-31 14:05:39.434: D/CAMERA_ACTIVITY(4915): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/data/org.opencv.samples.puzzle15/lib/libnative_camera_r2.3.3.so, dlerror="Cannot load library: link_image[1995]: failed to link libnative_camera_r2.3.3.so
03-31 14:05:39.434: D/CAMERA_ACTIVITY(4915): "
03-31 14:05:39.434: E/CAMERA_ACTIVITY(4915): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library
03-31 14:05:39.434: E/CV_CAP(4915): Native_camera returned opening error: 4
03-31 14:05:39.434: E/Sample::SurfaceView(4915): Failed to open native camera
因此无法打开库。有什么想法吗?是不是被发现了?
更新:这也发生在模拟器上。
答案 0 :(得分:2)
确保libnative_camera_r2.2.2.so
位于libs/
。该文件应打包,以便dlopen
可以动态加载。