ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
7
Blaise Pascal Magazine 109 2022
Starter Expert
maXbox
maXbox
maXbox Starter 103 ¨C Text recognition of characters in images.
Image to Text API Article Page 1/14
¡°A picture is worth a thousand words. An interface is worth a thousand pictures.¡±.
This register allows you a monthly usage of 30 successful calls.
Almost all API's has a free plan to subscribe. Looking at the following book-cover, it will extract the text
information easily, even though the cover has shadows and positioned with angle.
We use WinHttp.WinHttpRequest, JSONObjects and TGraphics library with loading and testing the
REST-client. Also we pass the API-key as a request-header, so get a key first at:
https://apilayer.com/marketplace
You can also use a powerful 'OCR' feature (text in picture recognition) to extract text from an image
during the conversion process. In this case, you will get an editable text document as a result that you
can adjust and
modify as you need.
The data represents is JSON data with all the text extracted and even the language of the text to scan is
auto detected. Before we dive into code this is the main part of the script:
This API recognizes and reads a text embedded in pictures or photos.
Image to Text API uses a neural net (LSTM) based OCR engine which is focused on line
recognition, but also supports recognizing the character patterns.
It supports both handwriting and printed materials as well as street maps.
APILayer is an API marketplace where also your API can reach a broader audiences,
but first you need an API-key for free:
The result of a simple subscription will be the screenshot below:
maXbox
maXbox Starter 103 ¨C Text recognition of characters in images.
Image to Text API
8
Blaise Pascal Magazine 109 2022
Article Page 1/14
maXbox
maXbox
function Image_to_text_API2(AURL, url_imgpath, aApikey: string): string;
var httpq: THttpConnectionWinInet;
rets: TStringStream;
heads: TStrings; iht:IHttpConnection2;
begin
httpq:= THttpConnectionWinInet.Create(true);
rets:= TStringStream.create('');
heads:= TStringlist.create;
try
heads.add('apikey='+aAPIkey);
iht:= httpq.setHeaders(heads);
httpq.Get(Format(AURL,[url_imgpath]),rets);
if httpq.getresponsecode=200 Then result:= rets.datastring
else result:='Failed:'+
itoa(Httpq.getresponsecode)+Httpq.GetResponseHeader('message');
except
writeln('EWI_HTTP: '+ExceptiontoString(exceptiontype,exceptionparam));
finally
httpq:= Nil;
heads.Free;
rets.Free;
end;
end;
The main part function opens a connection, invokes the API and results a stream which we convert to a
datastring.
Image2Text or Image to Text live demo is providing an API service on its APILayer publication platform.
Live Demo feature allows you to test the API within your browser; no need to install or code anything.
You can modify all the parameters as you like and interact with the API from many languages. The API
export format is JSON, e.g. our book cover see below:
maXbox
9
Blaise Pascal Magazine 109 2022
Article Page 1/14
maXbox
maXbox
The published result datasets are based on LSTM in combination with a OCR. LSTM
stands for Long Short-Term Memory and is a type of Recurrent Neural Network(RNN).
Talking about RNN, it is a network that works on the present input by taking into
consideration the previous output (feedback) and storing in its memory as memory cells
for a short period of time (short-term memory). For example take our book-cover as input:
LSTMs have feedback connections and cells which
make them different to more traditional feed-forward
neural networks with the still existing vanishing gradient
problem.
This property enables LSTMs to process entire sequences
of data (e.g. time series, handwriting or sentences) without
treating each point in the sequence independently,
but rather, retaining useful information about previous
data in the sequence like "Objektorientiert", "modellieren",
"und", "entwickeln" as a context.
The output of the call
writeln(Image_to_text_API2(URL_APILAY,
URLIMAGEPATH4,
DNwCF9Rf6y1AmSSednjn8ZhAxYXr----'));
is the JSON datastring in about Runtime:
0:0:3.859:
{"lang": "de", "all_text":
"ih u00bb Der EntwicklernFachwissen
fu00fcr Programmierer
nMax KleinernUMLnmit DelphinObjektorientiert modellieren
nund entwickelnnSoftware & Support", "annotations": ["ih", "u00bb",
"Der", "Entwickler", "Fachwissen", "fu00fcr", "Programmierer", "Max",
"Kleiner", "UML", "mit", "Delphi", "Objektorientiert", "modellieren",
"und", "entwickeln", "Software", "&", "Support"]}
maXbox Starter 103 ¨C Text recognition of characters in images.
Image to Text API
maXbox
Also the well known Tesseract 4.0 (like OmniPage) added a new OCR engine based on
LSTM neural networks.
The API can also be triggered with this few lines of P4D code:
procedure PyCode(imgpath: string);
begin
with TPythonEngine.Create(Nil) do begin
pythonhome:= 'C:UsersmaxAppDataLocalProgramsPythonPython36-32';
try
loadDLL;
ExecString('import requests');
ExecStr('url= "https://api.apilayer.com/image_to_text/url?
url='+imgpath+'"');
ExecStr('payload = {}');
ExecStr('headers= {"apikey": "dy5L70eQx72794XBZ8sewEgYTZR85----"}');
Println(EvalStr('requests.request("GET",url, headers=headers,
data=payload).text'));
except
raiseError;
finally
unloadDLL;
free;
end;
end;
end;
Our final example is an interesting one. What about an old
wine bottle (1993) with shapes (and grapes ?)), an old historic
painting from 1619, dates, symbols and position angles:
https://my6code.files.wordpress.com/2022/12/
wine_1993_20221230_141947.jpg?w=768
10
Blaise Pascal Magazine 109 2022
Article Page 1/14
maXbox
maXbox
When you fail with a restricted call or an
invalid key you get a bunch of exceptions like the following:
maXbox Starter 103 ¨C Text recognition of characters in images.
Image to Text API
maXbox
function GetWinInetError(ErrorCode:Cardinal): string;
const
winetdll = 'wininet.dll';
var
Len : Integer;
Buffer: PChar;
begin
Len := FormatMessage(
FORMAT_MESSAGE_FROM_HMODULE or FORMAT_MESSAGE_FROM_SYSTEM or
FORMAT_MESSAGE_ALLOCATE_BUFFER or FORMAT_MESSAGE_IGNORE_INSERTS or
FORMAT_MESSAGE_ARGUMENT_ARRAY,
Pointer(GetModuleHandle(winetdll)), ErrorCode,0, @Buffer,SizeOf(Buffer),
nil);
try
while (Len > 0) and {$IFDEF UNICODE}(CharInSet(Buffer[Len - 1],[#0.
.#32,
'.'])) {$ELSE}(Buffer[Len- 1] in [#0..#32, '.']) {$ENDIF} do
Dec(Len);
SetString(Result, Buffer, Len);
finally
LocalFree(HLOCAL(Buffer));
end;
end;
winininet_error: Unauthorized (401). or
{"message":"Invalid authentication credentials"}
The fact that error code is not "one of the expected return values" tells for the versions
that the error comes from an underlying layer and this API just passes it up on internal
failure.To shine a bit more light on those errors a function exists to convert the ErrorCode to
a string for better understanding:
And the result is convincing, also the fact that the year
in the label image was recognized correctly as 1619:
{"lang": "it", "all_text":
"DSnPODERE CAPACCIAn1619nLuggo deffo apacia
nQUERCIAGRANDEnVino da tavola della Toscanan1993
nProdotto e imbottigliato all'originenPodere Capaccia
nPacini Giampaolo & C. s.a.s.nRadda in Chianti (SI) - ItalianItalia",
"annotations": ["DS", "PODERE", "CAPACCIA", "1619", "Luggo", "deffo",
"apacia", "QUERCIAGRANDE", "Vino", "da", "tavola", "della", "Toscana",
"1993", "Prodotto", "e", "imbottigliato", "all'origine", "Podere", "Capaccia",
"Pacini", "Giampaolo", "&", "C.", "s.a.s.", "Radda", "in", "Chianti", "(", "SI", ")", "-", "Italia", "Italia"]}
11
Blaise Pascal Magazine 109 2022
Article Page 1/14
maXbox
maXbox
maXbox Starter 103 ¨C Text recognition of characters in images.
Image to Text API
maXbox
Any missing or incomplete data is difficult to find without knowing the original.
But on the other side, it is very easy to use since users just need to screenshot the
part they wish to convert and then copy the text after.
Furthermore the API access is provided in a REST-like interface (Representational State Transfer)
exposing database resources or pre-trained models in a JSON format with content-type
in the Response Header.
NOTE: If a programming language is not listed in the Code Example from the live demo,
you can still make API calls by using a HTTP request library written in our programming
language, as we did with GET or POST.
12
Blaise Pascal Magazine 109 2022
Article Page 1/14
maXbox
maXbox
Conclusion:
The Image to Text API from APILayer detects and extracts text from images using
state-of-the-art optical character recognition (OCR) algorithms in combination with a
neural network called LSTM.
It can detect texts of different sizes, fonts, and even handwriting or difficult numbers.
Reference:
https://apilayer.com/marketplace/image_to_text-api
https://apilayer.com/docs
https://my6.code.blog/2022/09/02/webpostdata/
http://www.kleiner.ch/kleiner/images/uml_buch.jpg
Doc and Tool: https://maxbox4.wordpress.com
Script Ref: 1176_APILayer_Demo1.txt
Appendix: A Delphi REST client API to consume REST services written in any programming
language with a class from maXbox4 integration:
https://github.com/fabriciocolombo/delphi-rest-client-api/blob/master/
src/HttpConnectionWinInet.pas
The API it is designed to work with Delphi 7 or later; newer versions takes advantage of
Generics Methods.
https://github.com/fabriciocolombo/delphi-rest-client-api
maXbox
maXbox Starter 103 ¨C Text recognition of characters in images.
Image to Text API
Saturday 15th April 2023

More Related Content

Similar to Blaise_UK_109_Max Kleiner_image2textAPI.pdf (20)

PPT
Smoothing Your Java with DSLs
intelliyole
?
PPT
RESTful API In Node Js using Express
Jeetendra singh
?
PDF
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
PVS-Studio
?
PPTX
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Codemotion
?
PPTX
Axis2 Landscape
Eran Chinthaka Withana
?
PDF
9800-2016-poster
Vasilij Nevlev
?
PDF
Building API Powered Chatbot & Application using AI SDK.pdf
diliphembram121
?
PDF
Building API Powered Chatbot & Application using AI SDK (1).pdf
diliphembram121
?
PDF
Divide and Conquer ¨C Microservices with Node.js
Sebastian Springer
?
DOC
Oss questions
rameshbavi
?
PPT
Jassa la GeekMeet Bucuresti
alexnovac
?
PDF
Networked APIs with swift
Tim Burks
?
PDF
Ironmq slides
Mikko Koivunalho
?
PDF
Buffer overflow tutorial
hughpearse
?
PPT
Implementing the Genetic Algorithm in XSLT: PoC
jimfuller2009
?
PDF
Why SQL? | Kenny Gorman, Cloudera
HostedbyConfluent
?
PDF
Nt1310 Unit 3 Language Analysis
Nicole Gomez
?
PDF
PHP Reviewer
Cecilia Pamfilo
?
PPTX
Silverlight Developer Introduction
Tomy Ismail
?
PDF
Simon Elliston Ball ¨C When to NoSQL and When to Know SQL - NoSQL matters Barc...
NoSQLmatters
?
Smoothing Your Java with DSLs
intelliyole
?
RESTful API In Node Js using Express
Jeetendra singh
?
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
PVS-Studio
?
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Codemotion
?
Axis2 Landscape
Eran Chinthaka Withana
?
9800-2016-poster
Vasilij Nevlev
?
Building API Powered Chatbot & Application using AI SDK.pdf
diliphembram121
?
Building API Powered Chatbot & Application using AI SDK (1).pdf
diliphembram121
?
Divide and Conquer ¨C Microservices with Node.js
Sebastian Springer
?
Oss questions
rameshbavi
?
Jassa la GeekMeet Bucuresti
alexnovac
?
Networked APIs with swift
Tim Burks
?
Ironmq slides
Mikko Koivunalho
?
Buffer overflow tutorial
hughpearse
?
Implementing the Genetic Algorithm in XSLT: PoC
jimfuller2009
?
Why SQL? | Kenny Gorman, Cloudera
HostedbyConfluent
?
Nt1310 Unit 3 Language Analysis
Nicole Gomez
?
PHP Reviewer
Cecilia Pamfilo
?
Silverlight Developer Introduction
Tomy Ismail
?
Simon Elliston Ball ¨C When to NoSQL and When to Know SQL - NoSQL matters Barc...
NoSQLmatters
?

Recently uploaded (20)

PDF
Informatics Market Insights AI Workforce.pdf
karizaroxx
?
PDF
Kafka Use Cases Real-World Applications
Accentfuture
?
PPTX
MENU-DRIVEN PROGRAM ON ARUNACHAL PRADESH.pptx
manvi200807
?
PDF
ilide.info-tg-understanding-culture-society-and-politics-pr_127f984d2904c57ec...
jed P
?
PDF
11_L2_Defects_and_Trouble_Shooting_2014[1].pdf
gun3awan88
?
DOCX
COT Feb 19, 2025 DLLgvbbnnjjjjjj_Digestive System and its Functions_PISA_CBA....
kayemorales1105
?
PDF
Digital-Transformation-for-Federal-Agencies.pdf.pdf
One Federal Solution
?
PDF
Prescriptive Process Monitoring Under Uncertainty and Resource Constraints: A...
Mahmoud Shoush
?
PPTX
Presentation by Tariq & Mohammed (1).pptx
AbooddSandoqaa
?
PPTX
@Reset-Password.pptx presentakh;kenvtion
MarkLariosa1
?
PDF
SaleServicereport and SaleServicereport
2251330007
?
PDF
CT-2-Ancient ancient accept-Criticism.pdf
DepartmentofEnglishC1
?
PDF
624753984-Annex-A3-RPMS-Tool-for-Proficient-Teachers-SY-2024-2025.pdf
CristineGraceAcuyan
?
DOCX
Cat_Latin_America_in_World_Politics[1].docx
sales480687
?
DOCX
Udemy - data management Luisetto Mauro.docx
M. Luisetto Pharm.D.Spec. Pharmacology
?
PDF
A Web Repository System for Data Mining in Drug Discovery
IJDKP
?
PPTX
english9quizw1-240228142338-e9bcf6fd.pptx
rossanthonytan130
?
DOCX
Starbucks in the Indian market through its joint venture.
sales480687
?
PPTX
25 items quiz for practical research 1 in grade 11
leamaydayaganon81
?
PPT
Reliability Monitoring of Aircrfat commerce
Rizk2
?
Informatics Market Insights AI Workforce.pdf
karizaroxx
?
Kafka Use Cases Real-World Applications
Accentfuture
?
MENU-DRIVEN PROGRAM ON ARUNACHAL PRADESH.pptx
manvi200807
?
ilide.info-tg-understanding-culture-society-and-politics-pr_127f984d2904c57ec...
jed P
?
11_L2_Defects_and_Trouble_Shooting_2014[1].pdf
gun3awan88
?
COT Feb 19, 2025 DLLgvbbnnjjjjjj_Digestive System and its Functions_PISA_CBA....
kayemorales1105
?
Digital-Transformation-for-Federal-Agencies.pdf.pdf
One Federal Solution
?
Prescriptive Process Monitoring Under Uncertainty and Resource Constraints: A...
Mahmoud Shoush
?
Presentation by Tariq & Mohammed (1).pptx
AbooddSandoqaa
?
@Reset-Password.pptx presentakh;kenvtion
MarkLariosa1
?
SaleServicereport and SaleServicereport
2251330007
?
CT-2-Ancient ancient accept-Criticism.pdf
DepartmentofEnglishC1
?
624753984-Annex-A3-RPMS-Tool-for-Proficient-Teachers-SY-2024-2025.pdf
CristineGraceAcuyan
?
Cat_Latin_America_in_World_Politics[1].docx
sales480687
?
Udemy - data management Luisetto Mauro.docx
M. Luisetto Pharm.D.Spec. Pharmacology
?
A Web Repository System for Data Mining in Drug Discovery
IJDKP
?
english9quizw1-240228142338-e9bcf6fd.pptx
rossanthonytan130
?
Starbucks in the Indian market through its joint venture.
sales480687
?
25 items quiz for practical research 1 in grade 11
leamaydayaganon81
?
Reliability Monitoring of Aircrfat commerce
Rizk2
?
Ad

Blaise_UK_109_Max Kleiner_image2textAPI.pdf

  • 1. 7 Blaise Pascal Magazine 109 2022 Starter Expert maXbox maXbox maXbox Starter 103 ¨C Text recognition of characters in images. Image to Text API Article Page 1/14 ¡°A picture is worth a thousand words. An interface is worth a thousand pictures.¡±. This register allows you a monthly usage of 30 successful calls. Almost all API's has a free plan to subscribe. Looking at the following book-cover, it will extract the text information easily, even though the cover has shadows and positioned with angle. We use WinHttp.WinHttpRequest, JSONObjects and TGraphics library with loading and testing the REST-client. Also we pass the API-key as a request-header, so get a key first at: https://apilayer.com/marketplace You can also use a powerful 'OCR' feature (text in picture recognition) to extract text from an image during the conversion process. In this case, you will get an editable text document as a result that you can adjust and modify as you need. The data represents is JSON data with all the text extracted and even the language of the text to scan is auto detected. Before we dive into code this is the main part of the script: This API recognizes and reads a text embedded in pictures or photos. Image to Text API uses a neural net (LSTM) based OCR engine which is focused on line recognition, but also supports recognizing the character patterns. It supports both handwriting and printed materials as well as street maps. APILayer is an API marketplace where also your API can reach a broader audiences, but first you need an API-key for free: The result of a simple subscription will be the screenshot below: maXbox
  • 2. maXbox Starter 103 ¨C Text recognition of characters in images. Image to Text API 8 Blaise Pascal Magazine 109 2022 Article Page 1/14 maXbox maXbox function Image_to_text_API2(AURL, url_imgpath, aApikey: string): string; var httpq: THttpConnectionWinInet; rets: TStringStream; heads: TStrings; iht:IHttpConnection2; begin httpq:= THttpConnectionWinInet.Create(true); rets:= TStringStream.create(''); heads:= TStringlist.create; try heads.add('apikey='+aAPIkey); iht:= httpq.setHeaders(heads); httpq.Get(Format(AURL,[url_imgpath]),rets); if httpq.getresponsecode=200 Then result:= rets.datastring else result:='Failed:'+ itoa(Httpq.getresponsecode)+Httpq.GetResponseHeader('message'); except writeln('EWI_HTTP: '+ExceptiontoString(exceptiontype,exceptionparam)); finally httpq:= Nil; heads.Free; rets.Free; end; end; The main part function opens a connection, invokes the API and results a stream which we convert to a datastring. Image2Text or Image to Text live demo is providing an API service on its APILayer publication platform. Live Demo feature allows you to test the API within your browser; no need to install or code anything. You can modify all the parameters as you like and interact with the API from many languages. The API export format is JSON, e.g. our book cover see below: maXbox
  • 3. 9 Blaise Pascal Magazine 109 2022 Article Page 1/14 maXbox maXbox The published result datasets are based on LSTM in combination with a OCR. LSTM stands for Long Short-Term Memory and is a type of Recurrent Neural Network(RNN). Talking about RNN, it is a network that works on the present input by taking into consideration the previous output (feedback) and storing in its memory as memory cells for a short period of time (short-term memory). For example take our book-cover as input: LSTMs have feedback connections and cells which make them different to more traditional feed-forward neural networks with the still existing vanishing gradient problem. This property enables LSTMs to process entire sequences of data (e.g. time series, handwriting or sentences) without treating each point in the sequence independently, but rather, retaining useful information about previous data in the sequence like "Objektorientiert", "modellieren", "und", "entwickeln" as a context. The output of the call writeln(Image_to_text_API2(URL_APILAY, URLIMAGEPATH4, DNwCF9Rf6y1AmSSednjn8ZhAxYXr----')); is the JSON datastring in about Runtime: 0:0:3.859: {"lang": "de", "all_text": "ih u00bb Der EntwicklernFachwissen fu00fcr Programmierer nMax KleinernUMLnmit DelphinObjektorientiert modellieren nund entwickelnnSoftware & Support", "annotations": ["ih", "u00bb", "Der", "Entwickler", "Fachwissen", "fu00fcr", "Programmierer", "Max", "Kleiner", "UML", "mit", "Delphi", "Objektorientiert", "modellieren", "und", "entwickeln", "Software", "&", "Support"]} maXbox Starter 103 ¨C Text recognition of characters in images. Image to Text API maXbox Also the well known Tesseract 4.0 (like OmniPage) added a new OCR engine based on LSTM neural networks. The API can also be triggered with this few lines of P4D code: procedure PyCode(imgpath: string); begin with TPythonEngine.Create(Nil) do begin pythonhome:= 'C:UsersmaxAppDataLocalProgramsPythonPython36-32'; try loadDLL; ExecString('import requests'); ExecStr('url= "https://api.apilayer.com/image_to_text/url? url='+imgpath+'"'); ExecStr('payload = {}'); ExecStr('headers= {"apikey": "dy5L70eQx72794XBZ8sewEgYTZR85----"}'); Println(EvalStr('requests.request("GET",url, headers=headers, data=payload).text')); except raiseError; finally unloadDLL; free; end; end; end;
  • 4. Our final example is an interesting one. What about an old wine bottle (1993) with shapes (and grapes ?)), an old historic painting from 1619, dates, symbols and position angles: https://my6code.files.wordpress.com/2022/12/ wine_1993_20221230_141947.jpg?w=768 10 Blaise Pascal Magazine 109 2022 Article Page 1/14 maXbox maXbox When you fail with a restricted call or an invalid key you get a bunch of exceptions like the following: maXbox Starter 103 ¨C Text recognition of characters in images. Image to Text API maXbox function GetWinInetError(ErrorCode:Cardinal): string; const winetdll = 'wininet.dll'; var Len : Integer; Buffer: PChar; begin Len := FormatMessage( FORMAT_MESSAGE_FROM_HMODULE or FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_ALLOCATE_BUFFER or FORMAT_MESSAGE_IGNORE_INSERTS or FORMAT_MESSAGE_ARGUMENT_ARRAY, Pointer(GetModuleHandle(winetdll)), ErrorCode,0, @Buffer,SizeOf(Buffer), nil); try while (Len > 0) and {$IFDEF UNICODE}(CharInSet(Buffer[Len - 1],[#0. .#32, '.'])) {$ELSE}(Buffer[Len- 1] in [#0..#32, '.']) {$ENDIF} do Dec(Len); SetString(Result, Buffer, Len); finally LocalFree(HLOCAL(Buffer)); end; end; winininet_error: Unauthorized (401). or {"message":"Invalid authentication credentials"} The fact that error code is not "one of the expected return values" tells for the versions that the error comes from an underlying layer and this API just passes it up on internal failure.To shine a bit more light on those errors a function exists to convert the ErrorCode to a string for better understanding: And the result is convincing, also the fact that the year in the label image was recognized correctly as 1619: {"lang": "it", "all_text": "DSnPODERE CAPACCIAn1619nLuggo deffo apacia nQUERCIAGRANDEnVino da tavola della Toscanan1993 nProdotto e imbottigliato all'originenPodere Capaccia nPacini Giampaolo & C. s.a.s.nRadda in Chianti (SI) - ItalianItalia", "annotations": ["DS", "PODERE", "CAPACCIA", "1619", "Luggo", "deffo", "apacia", "QUERCIAGRANDE", "Vino", "da", "tavola", "della", "Toscana", "1993", "Prodotto", "e", "imbottigliato", "all'origine", "Podere", "Capaccia", "Pacini", "Giampaolo", "&", "C.", "s.a.s.", "Radda", "in", "Chianti", "(", "SI", ")", "-", "Italia", "Italia"]}
  • 5. 11 Blaise Pascal Magazine 109 2022 Article Page 1/14 maXbox maXbox maXbox Starter 103 ¨C Text recognition of characters in images. Image to Text API maXbox Any missing or incomplete data is difficult to find without knowing the original. But on the other side, it is very easy to use since users just need to screenshot the part they wish to convert and then copy the text after. Furthermore the API access is provided in a REST-like interface (Representational State Transfer) exposing database resources or pre-trained models in a JSON format with content-type in the Response Header. NOTE: If a programming language is not listed in the Code Example from the live demo, you can still make API calls by using a HTTP request library written in our programming language, as we did with GET or POST.
  • 6. 12 Blaise Pascal Magazine 109 2022 Article Page 1/14 maXbox maXbox Conclusion: The Image to Text API from APILayer detects and extracts text from images using state-of-the-art optical character recognition (OCR) algorithms in combination with a neural network called LSTM. It can detect texts of different sizes, fonts, and even handwriting or difficult numbers. Reference: https://apilayer.com/marketplace/image_to_text-api https://apilayer.com/docs https://my6.code.blog/2022/09/02/webpostdata/ http://www.kleiner.ch/kleiner/images/uml_buch.jpg Doc and Tool: https://maxbox4.wordpress.com Script Ref: 1176_APILayer_Demo1.txt Appendix: A Delphi REST client API to consume REST services written in any programming language with a class from maXbox4 integration: https://github.com/fabriciocolombo/delphi-rest-client-api/blob/master/ src/HttpConnectionWinInet.pas The API it is designed to work with Delphi 7 or later; newer versions takes advantage of Generics Methods. https://github.com/fabriciocolombo/delphi-rest-client-api maXbox maXbox Starter 103 ¨C Text recognition of characters in images. Image to Text API Saturday 15th April 2023