The above demonstration is by default OCR options which the interpretation is in ENGLISH OCR. If you wish to perform an OCR applied with different language, simply modify the parameter of API parsing as below:
Simply append the parameter of "apikey" + "url" + "language" at the end of the API address:
Let's try with a image with Chinese characters.
Edit the PHP coding and append with the parameter.
<?php
$gateway = 'https://api.ocr.space/parse/imageurl';
$key = 'helloworld'; //input your API KEY, this is test key
$img='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5trq6LDiAKgR_FavIeEI5y4iPlxdvYDKW58iZFowgm8JHmSkTsPsqOme4aqsIkxtLuBVYNCMxR_kxjqRmENPiuQusQ5mm-106ezXTr7AzMmOCdPP4oc-VbBuIlxQ4ZVs4WGMjDVsotZ4/s400/cccc.png';
$lang = 'chs';
$url = $gateway."?"."apikey=".$key."&url=".$img."&language=".$lang; //establish the url
?>
The results are perfect!
Note that the OCR language parameter's parsing option as below, simply change the $lang parameter with any of the below validated with the text appeared in the parsed image.
Arabic=ara
Bulgarian=bul
Chinese(Simplified)=chs
Chinese(Traditional)=cht
Croatian = hrv
Czech = cze
Danish = dan
Dutch = dut
English = eng
Finnish = fin
French = fre
German = ger
Greek = gre
Hungarian = hun
Korean = kor
Italian = ita
Japanese = jpn
Norwegian = nor
Polish = pol
Portuguese = por
Russian = rus
Slovenian = slv
Spanish = spa
Swedish = swe
Turkish = tur
The application of OCR is widely applied in automated processing invalided images to text or to obtain valid values from pictures. The OCR is working in AI, integrated environment or to be a part of a processing node in a system to perform text extraction from provided inputs. Happy Explore & Have a nice day, do leave us any comments and we will reply you shortly.
Feel free to share this article around and do like & follow at our Facebook page. We would like to talk about IoT applications in the next post, stay tune.
OCR API Setup & Deploy with PHP
keyword, keywords, google,
php, apache, web, ocr, api, optical, character, recognition, ocespace, ocr.space, how to, ocr api, introduction, deploy api, use api, apply api, ocr apply api, what is api, what is ocr, how to use ocr api, ocr api intro, intro, ocr api introduction, ocr space intro, ocr.space introduction, nit, ideas, blog, blogger, blogging, science, hacks, computer, computing, sharing, engineering, knowledge, caring, guide, post, posting, news, technology, information
links, url, link, http, https,
nit.blogspot.com, fb.com/nitforall, nitforall@gmail.com, contact nit, contact us, email nit, website nit, facebook nit, web nit, fb nit