Question

Hi I am working on Android app which uses frames to capture image where the user has to place the face in some position, for example in old mobiles we used some frame like monkey, some funny frames. How can i open camera within the application, so that i can use frames to capture. Anyone help me out this.

I need to create app like this. The user has to adjust his face to come into the frame. How can i proceed?

enter image description here.

Was it helpful?

Solution

You can simply overlay the camera preview surface with an image view which has a drawable with partial transparency. PNG is just fine.

You can use built-in face detection library to find whether the face is in right position. This library is very limited, e.g. it will not recognize faces slanted by more that are not upright. Also, this library is not very fast, so you can check the result only few times per second (YMMV depending on the CPU power and preview image resolution).

You can use OpenCV if you need more power and sophistication, but it will not be much faster.

Android does not provide tools to blend the frame with the picture for the final satge, you will need a 3rd party library.

OTHER TIPS

Maybe I don't understand what you're asking, but all the answers to what I think you're asking should be here: http://developer.android.com/guide/topics/media/camera.html#preview-layout

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top