Android,FaceDetection,LibC

时间:2012-09-17 12:10:48

标签: android face-detection

09-17 14:06:18.128: A/libc(27454): Fatal signal 11 (SIGSEGV) at 0x00000010 (code=1)

只要我的应用程序似乎识别出一张脸,就会弹出这个可爱的错误。

代码:

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°以使我处于人像状态,然后在创建用于预览的surfaceview之后开始检测。

1 个答案:

答案 0 :(得分:0)

相关问题