0

I am developing a face detector with the camera2 API and I have to make the button "take picture" appear only if there is one face detected.

I am a student and this is my first try on Android Development. I used the sample Android-camera2-api-face-recon in JAVA, the detection work, but now I have to make a button appear if a face is detected. I tried to put a condition in process like

if(faces.lenght>0) {good condition=true} but it don't work.

I expect my button appears when there is a face detected, have you some advises?

Hasitha Jayawardana
  • 2,326
  • 4
  • 18
  • 36
  • You may find an approach in this question. Check the callback method process(CaptureResult result) and how they're extracting info about faces. https://stackoverflow.com/questions/48435370/face-detection-draw-circle-using-android-camera2-api – Robin Vinzenz May 09 '19 at 08:12
  • I works thank you ! – Nicolas Borowicz May 10 '19 at 01:43

0 Answers0