

Reading Handwritten Pages With Azure and Optical Character Recognition
source link: https://www.irisclasson.com/2022/05/10/reading-handwritten-pages-with-azure-and-optical-character-recognition/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Reading Handwritten Pages With Azure and Optical Character Recognition
As you might have noticed from previous posts, I absolutely love Azure Cognitive Services and use them a lot. Last week we had an offsite with work and my team planned a dinner activity for everybody. Divided into 7 groups, they had to write a story together. The first person writes a short paragraph, folds down the paper so only the last sentence can be seen and passes the paper to the next one. We had not thought about the amount of work required to read 14 pages of drunken handwriting from 45 different people!

However, I had the sampled from my last Azure Cognitive Services session for a user group (you can find the Azure Cognitive Services Samples on GitHub) and used them to digitalize the pages. It worked surprisingly well. We only had to tidy up a tiny bit. And once I had the digital format I created some audio versions, and even had fun translating them to different languages (using the same services and my samples) as we are a multicultural company.
What are Azure Cognitive Services?
Azure Cognitive Services is a set of machine learning algorithms that can add cognitive features to applications. These features include but are not limited to text and image recognition, natural language processing, sentiment analysis, and speech recognition. These powerful algorithms are available through APIs that can be easily integrated into applications, making it easy for developers to add advanced cognitive features to their applications. Some of the most popular Azure Cognitive Services APIs include the Text Analytics API for analyzing text, the Computer Vision API for recognizing and classifying images, the Language Understanding Intelligent Service (LUIS) for understanding natural language input. The capabilities of Azure Cognitive Services are extremely powerful, and they can be used to create a wide range of applications that are capable of understanding and interacting with humans. Expect more posts from me on the topic, but for now, here is the tiny code snipped that saved us hours of work!
Code sample:
public async Task ReadFromLocalImage(string endpoint, string key, string localFile) {
var client = new ComputerVisionClient(new ApiKeyServiceClientCredentials(key)) { Endpoint = endpoint };
var textHeaders = await client.ReadInStreamAsync(File.OpenRead(localFile));
string operationLocation = textHeaders.OperationLocation;
Thread.Sleep(2000);
const int numberOfCharsInOperationId = 36;
string operationId = operationLocation.Substring(operationLocation.Length - numberOfCharsInOperationId);
ReadOperationResult results;
do {
results = await client.GetReadResultAsync(Guid.Parse(operationId));
}
while ((results.Status == OperationStatusCodes.Running ||
results.Status == OperationStatusCodes.NotStarted));
var textInImageResult = results.AnalyzeResult.ReadResults;
foreach (ReadResult page in textInImageResult) {
foreach (Line line in page.Lines) {
Console.WriteLine(line.Text);
}
}
}
Comments
Leave a comment (via email)
Last modified on 2022-05-10
Next
No newer posts.
Previous
(Not So) Stupid Question 328: What Is a Rage Click?
Recommend
-
6
What is Optical character recognition? 06/21/2021 2 minutes to read In this article Optical character recognition (OCR) allows you to extra...
-
6
Optical character recognition From Wikipedia, the free encyclopedia Jump to navigation
-
11
Optical Character Recognition: How the Hell Does It Work?September 23rd 2021 new story
-
10
Optical character recognition with TensorFlow Lite Optical character recognition with TensorFlow Lite: A new example app September 27, 2021 Posted by Wei Wei, TensorFlow Developer Advocate
-
10
Laravel 8 Optical Character Recognition using Google Cloud Vision 20 views 2 days ago Laravel Google clou...
-
8
Using the Google Optical Character Recognition APIJune 17th 2022 new story4
-
16
This article was published as a part of the Data Science Blogathon. Introduction In this article, we will see how to build an application that can recognize digits...
-
4
Welcome to DeskTranslate!
-
8
Dig Security adds optical character recognition to help find sensitive information in image files
-
11
Exploring Optical Character Recognition (OCR): An Experiment with OpenCV and PyTesseract
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK