Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Save an Face Detection

Hi all!!!

Sorry...I can't English.(Using Google Translation)

I want to save in the detection window as an image from the movie by using the Face Detection of OpenCV sample program.

1)Run the application and error does not occur

2)It can not be saved image in the detection window

3)Even stored, stores the same image in a large amount or app is shutdown feel uneasy.

Is there a solution for this problem?

Please help me.

Thanks for reading.

My code is follow.

enter code here

    Rect[] facesArray = faces.toArray();
    for (int i = 0; i < facesArray.length; i++){
        Core.rectangle(mRgba, facesArray[i].tl(), facesArray[i].br(), FACE_RECT_COLOR, 3 );

    File mediaStorageDir = new File(
             Environment.getExternalStorageDirectory().getPath() + "/DCIM/100ANDRO/");
        Mat face = mRgba.submat(facesArray[i].clone());
        Highgui.imwrite(mediaStorageDir + Integer.toString(i) + ".jpg", face);
    }

Save an Face Detection

Hi all!!!

Sorry...I can't English.(Using Google Translation)

I want to save in the detection window as an image from the movie by using the Face Detection of OpenCV sample program.

1)Run the application and error does not occur

2)It can not be saved image in the detection window

3)Even stored, stores the same image in a large amount or app is shutdown feel uneasy.

Is there a solution for this problem?

Please help me.

Thanks for reading.

My code is follow.

enter code here

    Rect[] facesArray = faces.toArray();
    for (int i = 0; i < facesArray.length; i++){
        Core.rectangle(mRgba, facesArray[i].tl(), facesArray[i].br(), FACE_RECT_COLOR, 3 );

    File mediaStorageDir = new File(
             Environment.getExternalStorageDirectory().getPath() + "/DCIM/100ANDRO/");
        Mat face = mRgba.submat(facesArray[i].clone());
        Highgui.imwrite(mediaStorageDir + Integer.toString(i) + ".jpg", face);
    }