# FaceDetector **Repository Path**: rubberbox/FaceDetector ## Basic Information - **Project Name**: FaceDetector - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-27 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FaceDetector Want to detect human faces on a camera preview stream in real time? Well, you came to the right place. FaceDetector is a library which: - detects faces - works on Android - very simple to use - works greatly with [Fotoapparat](https://github.com/Fotoapparat/Fotoapparat) - you can use it with whichever camera library or source you like - uses C++ core which can easily be ported to iOS (we have plans for that) Detecting faces with `Fotoapparat` is as simple as: ```java Fotoapparat .with(context) .into(cameraView) .frameProcessor( FaceDetectorProcessor .with(context) .build() ) .build() ``` ## How it works ### Step One (optional) To display detected faces on top of the camera view, set up your layout as following. ```xml ``` ### Step Two Create `FaceDetectorProcessor`: Java: ```java FaceDetectorProcessor processor = FaceDetectorProcessor.with(this) .listener(faces -> { rectanglesView.setRectangles(faces); // (Optional) Show detected faces on the view. // ... or do whatever you want with the result }) .build() ``` or Kotlin: ```kotlin private val processor = FaceDetectorProcessor.with(this) .listener({ faces -> rectanglesView.setRectangles(faces) // (Optional) Show detected faces on the view. // ... or do whatever you want with the result }) .build() ``` ### Step Three Attach the processor to `Fotoapparat` ```java Fotoapparat.with(this) .into(cameraView) // the rest of configuration .frameProcessor(processor) .build() ``` And you are good to go! ## Set up Add dependency to your `build.gradle` ```groovy repositories { maven { url "http://dl.bintray.com/fotoapparat/fotoapparat" } } implementation 'io.fotoapparat:facedetector:1.0.0' // If you are using Fotoapparat add this one as well implementation 'io.fotoapparat.fotoapparat:library:1.2.0' // or later version ``` ## Contact us Impressed? We are actually open for your projects. If you want some particular computer vision algorithm (document recognition, photo processing or more), drop us a line at fotoapparat.team@gmail.com. ## License ``` Copyright 2017 Fotoapparat 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 http://www.apache.org/licenses/LICENSE-2.0 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. ```