# EasyDeepOCRReadConsole

| Support            | ![](assets/images/sample_programs/applies_to/cmake.svg) ![](assets/images/sample_programs/applies_to/python.svg)   |
|--------------------|--------------------------------------------------------------------------------------------------------------------|
| Required licenses  | **EasyDeepOCR**                                                                                                    |
| Recommended images | Any image from the folder `Sample Images/EasyDeepOCR`                                                              |
| Location           | `Text and Code Reading/EasyDeepOCRReadConsole` and `Text and Code Reading` *with Python*                           |

## Purpose

This sample program demonstrates how to:

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

## Code highlights

1. Load a model.
   ```c++
   reader.Load(modelPath);
   ```
2. Set a topology line.
   ```c++
   EasyDeepOCR::ETopology topology({EasyDeepOCR::ETopologyLine(topologyStr)});
   reader.SetTopology(topology);
   ```
3. Initialize the reader.
   ```c++
   reader.Initialize();
   ```
4. Find all the text lines in the image.
   ```c++
   texts = reader.Read(image);
   ```
