# EasyDeepOCRRead

| Support            | ![](assets/images/sample_programs/applies_to/cpp.svg) ![](assets/images/sample_programs/applies_to/cs.svg) ![](assets/images/sample_programs/applies_to/qt.svg)   |
|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Required licenses  | **EasyDeepOCR**                                                                                                                                                   |
| Recommended images | Any image from the folder `Sample Images/EasyDeepOCR`                                                                                                             |
| Location           | `Text and Code Reading/EasyDeepOCRRead`                                                                                                                           |

## Purpose

This sample program demonstrates how to:

- Read all the texts in an image with a single read call.
- Load a model.

![](assets/images/sample_programs/text_and_code-easydeepocrread.webp)

## Code highlights

1. Load a model.
   ```c++
   reader_.Load(openFileDialog.FileName);
   ```
2. Initialize the reader.
   ```c++
   reader_.Initialize();
   ```
3. Find all the text lines in the image.
   ```c++
   texts_ = reader_.Read(currentImage_);
   ```
4. Draw the position of the text lines on the image.
   ```c++
   text.Draw(drawAdapter, zoom, zoom, x / zoom, y / zoom);
   ```
