Ask Your Question
0

face-detect with portrait mode

asked 2014-10-22 05:22:45 -0600

I tried to make my own face detect app on Android. The app should be used in portrait display, using front-camera. but Front camera is not working if i change coding in AndroidManifest.xml. How to detect face in portrait mode.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-02-16 07:33:33 -0600

When i change the orientation with these codes (deliverAndDrawFrame method on CameraBridgeViewBase)

            Matrix matrix = new Matrix();
            matrix.preTranslate(
                    (canvas.getWidth() - mCacheBitmap.getWidth()) / 2,
                    (canvas.getHeight() - mCacheBitmap.getHeight()) / 2);

            matrix.postRotate(270f, (canvas.getWidth()) / 2,
                    (canvas.getHeight()) / 2);
            canvas.drawBitmap(mCacheBitmap, matrix, null);

the face detector has disappeared. How can i arrange this issue?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-10-22 05:22:45 -0600

Seen: 313 times

Last updated: Oct 22 '14