I am trying to use google vision API to detect text from camera preview. However, I want the detected text to be within a specific region/rectangle in the camera review.
Till date, there is no such feature in GVision. But I handled a similar situation by filtering at the backend of my application, as follows.
Update: 4/8/2018
{
"requests": [
{
"imageContext": {
"latLongRect": {
"minLatLng": {
"latitude": 0,
"longitude": 0
},
"maxLatLng": {
"latitude": 0,
"longitude": 0
}
}
}
}
]
}
minLatLng
is TopLeft, maxLatLng
is BottomRight of the your region
For more check: https://cloud.google.com/vision/docs/reference/rest/v1/images/annotate#ImageContext