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.
Asked
Active
Viewed 1,286 times
0
-
Till date, there is no such feature in GVision. – ExtractTable.com Mar 28 '18 at 11:47
1 Answers
0
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.
- Get the GVision text using FULL_TEXT_DETECTION
- Get the co-ordinates of user action, i.e., user touch, or mouse click
- Get the application length & width of the mobile device
- Make a proportion or ratio function from points 2 & 3
- Using the value from point 4, get extract the text of based on GVision bounds of the blocks
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

ExtractTable.com
- 762
- 10
- 20