EasyOcr2Read

Support

Required licenses

EasyOCR2

Recommended images

Any image from the folder Sample Images/EasyOCR2

Location

Text and Code Reading/EasyOcr2Read and Console samples/Text and Code Reading

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.

    m_OCR2.Load(ToUtf8(LoadFont.GetPathName()).GetString());
    
  2. Read the text present in the ROI of the image.

    m_ReadText = m_OCR2.Read(m_Roi);
    
  3. Draw the blob candidates on the image.

    OCR2.DrawSegmentation(drawAdapter, EasyOCR2DrawSegmentationStyle_DrawBlobs, 1.0, 1.0, 0, 0);
    
  4. Draw the detected character boxes on the image.

    OCR2.DrawDetection(drawAdapter, EasyOCR2DrawDetectionStyle_DrawChars, 1.0, 1.0);
    
  5. Draw the recognized character next to each character box on the image.

    OCR2.DrawRecognition(drawAdapter, EasyOCR2DrawRecognitionStyle_LeftTop, 15, 1.0, 1.0);