Pane
Pane

Reputation: 21

how to start ML Kit Face Detection in real time, when face is located in desired frame

I need face detection but not on full screen, of the camera preview, just in my dedicated frame, something like MSQRD app. When the center of this frame / image in the camera view aligns with the detected face, the frame disappears.

Face Frame

Upvotes: 1

Views: 1227

Answers (1)

Shiyu
Shiyu

Reputation: 935

There are two ways you could do this.

  1. Crop the image before sending to ML Kit, so that ML Kit only detect the faces in the desired region.

  2. Send the whole image to ML Kit, but do a filter on the detected faces. Say if the face is within the region, show the results. Otherwise, ignore it.

Upvotes: 1

Related Questions