Reputation: 51
I want to draw lines around face (including forehead) and cut that face out from the image. Can I use Google Vision API to realize my goal? I have tested Google Vision API to detect face in some images, and it only returns the bounding poly (the rectangle area) around the face, the landmarks and face expression. It cannot detects the coordinates of outline around face. How to do that with Vision API? If Vision API cannot do it, than what library should I use?
Upvotes: 0
Views: 509
Reputation: 2270
The Vision API service offers a Face Detection feature that can be used to detect multiple faces within an image along with the associated key facial attributes. Based on this, Vision API feature that fits the most to your current requirement is the usage of the fdBoundingPoly
. As mentioned in the official documentation:
The fdBoundingPoly bounding polygon is tighter than the boundingPoly, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the "amount of skin" visible in an image
I recommend you to check the FACE_DETECTION Responses example that you can use as a reference to know more about this functionality.
In case this feature doesn't cover your current needs, you can use the Send Feedback button, located at the lower left and upper right corners of the service public documentation, as well as take a look the Issue Tracker tool, in order to raise a Vision API feature request and notify to Google about this desired functionality.
Upvotes: 0