Text is everywhere! Text is not always where we want it, or in the format we need. We often find ourselves needing the text from images. You might have a scanned document containing financial information like an invoice you want to input into an accounts system, or maybe you are building an archive of photographs that you want to index against any text detected? Whatever your use case, if you need to get some text from an image, you can achieve this with ease in Delphi programming software using Amazon Textract using the latest version of Appercept AWS SDK for Delphi.
What is Amazon Textract and what does it do?
Amazon Textract provides text detection and analysis for image documents. Textract can analyse the relationships between detected text objects and provide information relating to forms, financial, and identity documents.
Let’s detect some text…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
program DetectText; {$APPTYPE CONSOLE} implementation uses AWS.Textract; var Client: ITextractClient; Request: ITextractDetectDocumentTextRequest; Response: ITextractDetectDocumentTextResponse; begin Request := TTextractDetectDocumentTextRequest.Create; Request.Document := TTextractDocument.FromFile('C:image.png'); Client := TTextractClient.Create; Response := Client.DetectDocumentText(Request); if Response.IsSuccessful then begin for var LBlock in Response.Blocks do WriteLn(Format('Detected %s: %s', [LBlock.BlockType, LBlock.Text])); end; end. |
Is there an example of using Amazon Textract?
To help you experiment and get started, check out the Textract demo in the AWS SDK for Delphi Samples repository.
About Appercept AWS SDK for Delphi
Appercept AWS SDK for Delphi is available exclusively on GetIt with active Enterprise or Architect subscriptions for Embarcadero Delphi or RAD Studio. You can install the SDK through the GetIt Package Manager within Delphi or RAD Studio if you have an active subscription.
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition