FacePreview on Android with native libraries
Android has its own face recognition and we don’t need OpenCV to find faces on pictures or while shooting with camera. In this example I used FaceDetector to find faces on Bitmap image which I had to create from Raw data. The biggest problem of this solution is the conversion. Since FaceDetector supports RGB_565 and many android cameras support only YUV. I tested this on my Huawei Honor 2 with NV21 bitmap image type. If your device supports other image format feel free to edit code and/or post your conversion function in comments or ask for help if needed. Second…
Read more