我希望LogCat能够#onPreviewFrame()多次记录,但它只能在以下选定的设备上运行:
但不适用于以下设备:
以下是代码段:
public CameraSurfaceView(Context context, AttributeSet set) {
super(context, set);
Log.d(TAG, "CameraSurfaceView(context, set)");
// Get the Surface Holder
this.holder = this.getHolder();
this.holder.addCallback(this);
this.holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}
@Override
public void surfaceCreated(SurfaceHolder holder) {
try {
// Turn on the Camera
this.camera = Camera.open();
} catch (Exception ex) {
Log.e(TAG, "#surfaceCreated() error=" + ex.getMessage(), ex);
}
}
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
Log.d(TAG, …Run Code Online (Sandbox Code Playgroud) 我编译了面部识别并成功运行在LG Leon(armv7I)上.当我在具有类似CPU架构(armv7I)的MyPhone UNO上安装应用程序时,会出现以下错误:
06-03 22:09:41.538 30619-30619/org.opencv.javacv.facerecognition E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.opencv.javacv.facerecognition, PID: 30619
java.lang.UnsatisfiedLinkError: dlopen failed: library "../../lib/libtbb.so" not found
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:593)
at com.googlecode.javacpp.Loader.load(Loader.java:489)
at com.googlecode.javacpp.Loader.load(Loader.java:431)
at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:136)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:97)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:85)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_calib3d.<clinit>(opencv_calib3d.java:94)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_contrib.<clinit>(opencv_contrib.java:104)
at org.opencv.javacv.facerecognition.PersonRecognizer.<init>(PersonRecognizer.java:44)
at org.opencv.javacv.facerecognition.FdActivity$1.onManagerConnected(FdActivity.java:109)
at org.opencv.android.AsyncServiceHelper$3.onServiceConnected(AsyncServiceHelper.java:320)
at …Run Code Online (Sandbox Code Playgroud)