How could I do face detect during recording video mode
I want to do some image processing work like face detection or something during the camera is under recording video mode开发者_开发百科 .
now I can recording video and save file and transfer it to my server. but if I want to detect human face during recording,(I don't need any algorithm , I'll take it) how can I do this? use what kind of library ? I think I should use some method to get each frame of the recording video. but how ?
now, I use "MediaRecorder" to capture the video . SurfaceView , SurfaceHolder : to show the preview screen
is anyone can give me some suggestions ? thank you very much in advance ^^
You need to provide a PreviewCallback when you set your Camera object. More info here.
That listener will give you a pixel buffer of the preview frame from time to time, which you can use to perform your face detect Algorithm.
you may also find opencv.org helpful. as you have experienced, Android does not allow FaceDetection when recording is in progress. I am facing the same problem and after some searches I found opencv.org and I am working on it... it seems very promissing.
精彩评论