Reputation: 351
I'm trying to outline the whole image with a path so I could crop it out, but the path is not following the face's outline. Here's my code :
for (Landmark landmark : face.getLandmarks()) {
if (face.getLandmarks().indexOf(landmark) == 0) {
path.moveTo(landmark.getPosition().x, landmark.getPosition().y);
} else {
path.lineTo(landmark.getPosition().x, landmark.getPosition().y);
}
}
How do I make it so that the path only follows the outer outline of the face
Upvotes: 1
Views: 126