Android Camera APP development issues (1) -- about FaceDetection

Source: Internet
Author: User

This article is a summary of my personal development of the Camera APP. It mainly introduces the basic usage and precautions of FaceDetection. If you have any mistakes or deficiencies in this article, you are welcome to criticize and correct them.1. FaceDetection1. Version supportFaceDetection is Android (Android Version 4.0, ADT 14). Whether the feature is supported depends on the limitations of the device itself (Camera. Parameters. getMaxNumDetectedFaces () > 0).2. FaceDetectionListenerThe following is the source code of the FaceDetectionListener interface: FaceDetectionListener faces The detected faces in a list camera The service object onFaceDetection (Face [] faces, Camera camera); there is only one method for FaceDetection (Face [] faces, Camera camera ). Faces is the array of detected faces (which may not be detected), and camera is the current Camera object. In use, you need to create a FaceDetectionListener and override the onFaceDetection method to traverse faces in the method for processing. Example: NodinFaceDetectionListener (); NodinFaceDetectionListener FaceDetectionListener {String =; onFaceDetection (Face [] faces, Camera camera) {Auto-generated method stub (= faces | faces. = 0) {Hide face frame. (,); {Calculate the size of face frame and show. (,);4. Stop FaceDetection5,

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.