Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Google Cloud Vision TEXT_DETECTION support to recognize multiple languages in one image?

Please see the two test results.

There are two languages, but Cloud vision api always returns results in one language.
Could we tell which language(s) are expected in the image, so that the engine can try to find to recognize all characters even they are in different languages?

1. Original image has three Chinese characters but was not recognized.

Original image

2. Then I tried to crop the image to make it has only Chinese characters.
The three Chinese characters can be recognized successfully.

Cropped image with Chinese only

like image 639
Jack Fan Avatar asked Nov 08 '22 13:11

Jack Fan


1 Answers

Yes, you can tell the API which languages to expect.

According to the API's ImageContext documentation, you can direct the API to look for a list of particular languages for TEXT_DETECTION. Multiple values are accepted for a single image:

"languageHints": [ "en", "zh-TW" ]
like image 72
rmtheis Avatar answered Dec 20 '22 16:12

rmtheis