Compare tesseract.js and face++ convert text from image function
Face++ Recognize Text API (V1) English Image Test
- Register an account for trying this API.
- I want to recognize English text from this image.
- The Recognize Text API has max image size limit 800x800 pixel. If the image exceeds the size, you have to resize it.
- Start cmd and type bellow command.
"C:\Program Files\Git\usr\bin\curl.exe" -X POST "https://api-cn.faceplusplus.com/imagepp/v1/recognizetext" -F "api_key=<YOUR_API_KEY" -F "api_secret=YOUR_API_SECRET" -F "image_file=@<YOUR_IMAGE_NAME>">outupt.txt - It will output some json string. A JSON converter will make the output string more readable.
- Find the text "textline".
"type": "textline", "value": "Lehck" - This is all text line. It looks not available in English.
Lehck
et
emembergbuyorctbouewlnot
Face++ Recognize Text API (V1) Chinese Image Test
- I want to recognize a Chinese quote text from this image.
- It is so small size. So I don't need to resize it.
- Start cmd and type bellow command.
"C:\Program Files\Git\usr\bin\curl.exe" -X POST "https://api-cn.faceplusplus.com/imagepp/v1/recognizetext" -F "api_key=<YOUR_API_KEY" -F "api_secret=YOUR_API_SECRET" -F "image_file=@<YOUR_IMAGE_NAME>">outupt.txt - It will output some json string. A JSON converter will make the output string more readable.
- Find the text "textline". You need a unicode converter to convert the unicode encode string to Chinese character.
"type": "textline", "value": "\u81ea\u5df2\u4e0d\u52aa\u529b" - This is all text line. It looks less accuracy translation.
tesseract.js recognize English test
- I want to recognize English text from this image.
- Launch Web Server for Chome and choose the root folder.
- Edit tesseract_test.html
- Go to the url http://127.0.0.1:8887/tesseract_test.html
- Paste the image link https://i.imgur.com/2AFFicU.jpg
- Click run button
tesseract.js recognize Chinese test
- I want to recognize a Chinese quote text from this image.
- Launch Web Server for Chome and choose the root folder.
- Edit tesseract_test.html
- Go to the url http://127.0.0.1:8887/tesseract_test.html
- Paste the image link http://www.meiyulu.com/tupian/1504/150412/1-150412133033115.jpg
- Click run button
Comments
Post a Comment