Android,FaceDetection,LibC
问题描述:
09-17 14:06:18.128: A/libc(27454): Fatal signal 11 (SIGSEGV) at 0x00000010 (code=1)
只要我的应用程序似乎认出一张脸,就会弹出这个可爱的错误。Android,FaceDetection,LibC
代码:
private void startFaceDetection() {
// Try starting Face Detection
Camera.Parameters params = mCamera.getParameters();
// start face detection only *after* preview has started
if (params.getMaxNumDetectedFaces() > 0) {
// camera supports face detection, so can start it:
mCamera.startFaceDetection();
}
}
@Override
public void onResume() {
super.onResume();
mCamera = Camera.open();
mCamera.setFaceDetectionListener(this);
mCamera.setDisplayOrientation(90);
}
而且在surfaceCreated,surfaceChanged我启动人脸检测。
有谁知道为什么会发生这种情况?难道我做错了什么?
打开摄像头,设置探测监听器,旋转摄像头90°以便我纵向显示,然后在创建用于预览的曲面视图后开始探测。
答
这里是链接可能会帮助你,这是我发现有关人脸检测的最佳教程。 http://www.edumobile.org/android/android-programming-tutorials/face-detection-example-tutorials-in-android/和 http://trivedihardik.wordpress.com/2011/09/13/android-face-detection-example/
+0
这个项目也非常适合人脸检测。 https://github.com/ProjPossibility/2014-CSUN-Cam4Blind – portfoliobuilder
对我来说,它看起来像Android中的一个错误:在C库中出现错误:如果你做错了什么,你应该得到一个不错的异常或错误代码。也许它是由你做错了事情引发的,但系统应该以更好的方式报告这个 –
是的,这就是我的想法。我正在测试运行Sense 4.1的HTC Sensation上的应用程序,该程序是另一个HTC手机的“已移植的ROM”,也许存在一些已损坏的C库。我将降级到不是“实验性”的较低版本,以看看它是否有效.. – damian