EasyOcr2Read

Support

Required licenses

EasyOCR2

Recommended images

Any image from the folder Sample Images\EasyOCR2\EasyOcr2

Location

[…]C:\Users\Public\Documents\Euresys\Open eVision 24.02\Sample Programs
\[LANGUAGE] samples
\Text and Code Reading\EasyOcr2Read

Purpose

This sample program demonstrates how to:

Read a text inside the ROI of an image.

Code highlights

1. Load the model file including the parameters about the text to read.
2 EasyOcr2ReadDoc.cpp - line 151
m_OCR2.Load(ToUtf8(LoadFont.GetPathName()).GetString());
2. Read the text present in the ROI of the image.
2 EasyOcrReadDoc.cpp - lines 156 and 176
m_ReadText = m_OCR2.Read(m_Roi);
3. Draw the blob candidates on the image.
2 EasyOcr2ReadView.cpp - line 104
OCR2.DrawSegmentation(render_hdc, EasyOCR2DrawSegmentationStyle_DrawBlobs, 1.0, 1.0, 0, 0);
4. Draw the detected character boxes on the image.
2 EasyOcr2ReadView.cpp - line 107
OCR2.DrawDetection(render_hdc, EasyOCR2DrawDetectionStyle_DrawChars, 1.0, 1.0);
5. Draw the recognized character next to each character box on the image.
2 EasyOcr2ReadView.cpp - line 110
OCR2.DrawRecognition(render_hdc, EasyOCR2DrawRecognitionStyle_LeftTop, 15, 1.0, 1.0);