This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal. |
Hello, I am working on an app that uses google vision api for object detection. I am trying to draw a square or a rectangle around the detected object to show it clearly to the user.
I receive the vertices of the shape from the google api and I can read them successfully.
If there is a function like addPolygon in map api that could take the vertices and draw the shape on the image widget that would be great.
Below is an example of the received JSON response.
Thanks in advance.
{
"responses": [
{
"localizedObjectAnnotations": [
{
"mid": "/m/01bqk0",
"name": "Bicycle wheel",
"score": 0.89648587,
"boundingPoly": {
"normalizedVertices": [
{
"x": 0.32076266,
"y": 0.78941387
},
{
"x": 0.43812272,
"y": 0.78941387
},
{
"x": 0.43812272,
"y": 0.97331065
},
{
"x": 0.32076266,
"y": 0.97331065
}
]
}
},
]
}
]
}