Use Google mobile vision api to determine numbers only?

I would like to know how can I filter only to detect numbers (integers)? for example 1,2, ...., 10. Currently, the api detects all "text" formats.

+4
source share
1 answer

You must do this processing on your side. Use Regex to filter numbers from a string received from the Vision API:

str="Text received 123,0";
number = str.replace(/\D/g,'');

result: 123
+1
source

Source: https://habr.com/ru/post/1660020/


All Articles