Android的OpenCV的:不能dlopen的相机包装库 [英] Android OpenCV: cannot dlopen camera wrapper library
问题描述
类似<一个href=\"http://stackoverflow.com/questions/7198912/opencv-2-3-how-to-capture-frames-from-android-camera\">OpenCV 2.3:如何从Android的摄像头捕捉帧
I'm trying to get OpenCV to run on my Samsung Fascinate (v2.2.1) following this tutorial
当我尝试运行,例如样品(样15拼图),我收到以下错误:
When I try to run the samples (like sample 15-puzzle) for instance, I get the following errors:
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
所以库不能被打开。为什么任何想法?难道不是被发现的?
So the library cannot be opened. Any ideas on why? Is it not being found?
更新:这也发生在模拟器上
Update:This also happens on the emulator.
推荐答案
确认 libnative_camera_r2.2.2.so
是库/
。该文件应当被打包,以便它可以通过的dlopen
动态加载。
Make sure libnative_camera_r2.2.2.so
is in libs/
. That file should be packaged so that it can be loaded dynamically by dlopen
.
这篇关于Android的OpenCV的:不能dlopen的相机包装库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!