-1

My need is: If user is recording a video from my app then face detection should work. I mean during video recording if user is too far from camera or too close to camera and so on.. then i should alert him/her for improper position.

I did some R & D on it but unable to found desired example. What i found is, we can not perform both operation parallel on same View.

If any body have solution for my problem then please share. Please don't suggest openGL. I dont want to use it.

Thanks in advance

Mr Code
  • 124
  • 10
  • 1
    Wondering if you looked at this: https://stackoverflow.com/questions/32513379/how-to-record-screen-and-take-screenshots-using-android-api – Morrison Chang Aug 10 '17 at 06:38
  • Did you find any solution?@rahul-gupta – Nitin Sep 06 '19 at 09:56
  • @NitinKhanna - I think We need to work with 2 video mode in which one mode will record the video and other one will detect the face. This is my theory. But there is one more issue that either we can use two mode for recording video and detection or not? – Mr Code Sep 06 '19 at 11:14
  • @RahulGupta Thanks for quick response. Well, actually I'm able to apply color filters while recording but in case of face detection It doesn't work. It skips face position view while recording. – Nitin Sep 06 '19 at 12:12

1 Answers1

1

You can use Google's MOBILE VISION API for face detection .

check here for documentation and check here for sample source code , application using this api .

some basics creating detector

FaceDetector detector = new FaceDetector.Builder()
        .build(getApplicationContext());

detector.setProcessor(
    new MultiProcessor.Builder<Face>()
        .build(new GraphicFaceTrackerFactory()));

//Create a camera source to capture video images from the camera, 
    mCameraSource = new CameraSource.Builder()
            .setRequestedPreviewSize(640, 480)
            .setFacing(CameraSource.CAMERA_FACING_BACK)
            .setRequestedFps(30.0f)
            .build(getApplicationContext(), detector);
Omar Dhanish
  • 885
  • 7
  • 18