Face Detection samples with Augmented Reality (AR)
This sample app is basically made to support the following talks:
Pre requirements to play the sample apps
- For OpenCV you will need to install the OpenCV manager prior to execute this OpenCV sample on your device or making an in app native OpenCV installation with the .so file.
- I would fairly suggest to start Camera 2 sample first to allow camera permissions on your device, since OpenCV is looking for both permissions and OpenCV library, might fail at some point if there is a race condition.
- Last suggestion, don´t use any emulator for those sample apps, it is a camera specific project, it does not work well with emulators.
Screenshot of Use case 1
Screenshot of Use case 2
- Use case 1 uses OpenCV with its camera widget, in addition to detecting face or eyes as well as rendering basic graphics to show areas recognised.
- Use case 2 uses Camera 2 for camera stream (using a TextureView for the preview), face detection. Then it uses a View with Canvas to render the augmented reality object.
Support SDKs from 21 to 25
Disclosure - Libraries used
- This is not a finished app, and it is only made for supporting presentations content.
- Don´t expect to have complete functionalities or being error proof. For this you would need to contribute to the sample app or creating a brand new project with further support on other devices. It is only checked on Nexus 5 phone for instance.
Please read first CONTRIBUTING
About the author
Raul Hernandez Lopez,
Copyright (C) 2017 Raul Hernandez Lopez
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.