I created a Graphic App that Extracts Text from Image with C++, Qt and OpenCV

🔊 Img2Txt is a graphical application that extracts text from an image. Developed with C++, Qt, OpenCV and other libraries.


I created a Graphic App that Extracts Text from Image with C++, Qt and OpenCV

🔊 Img2Txt is a graphical application that extracts text from an image. Developed with C++, Qt, OpenCV and other libraries.


How to install

First you will need the dependencies:

Dependencies

Example of dependencies on Ubuntu:

Download and install Qt from here, like this video .

Remember the path where you installed it and add Qt6 support and Qt5 compatibility

And now install the packages:

sudo apt install build-essential cmake make g++ \
  libtesseract-dev wget unzip libopencv-dev \
  libgtk-3-dev tesseract-ocr tesseract-ocr-por \
  libpng++-dev libpng16-16 libpng-dev

Install OpenCV:

wget -O opencv.zip https://github.com/opencv/opencv/archive/master.zip
unzip opencv.zip
mv opencv-master opencv
mkdir -p build && cd build
cmake ../opencv
make
sudo make install

Building and Install

And then clone, build and install:

NOTE: [PATH/TO]/Qt/[VERSION] is the location you installed Qt and the Version number, example: ${HOME}/Qt/6.3.0

git clone https://github.com/terroo/img2txt
cd img2txt
mkdir build && cd build
cmake -DQT_DIR_VER="[PATH/TO]/Qt/[VERSION]" ..
make
sudo make install
sudo chmod +x /usr/local/bin/img2txt # IMPORTANT POS INSTALL

Img2Txt source code:

https://github.com/terroo/img2txt


Watch the video

The video is in Portuguese, but in addition to being able to use Youtube’s automatic translation, the procedures are universal regardless of the language.


cpp opencv qt gui


Share


YouTube channel

Subscribe


Marcos Oliveira

Marcos Oliveira

Software developer
https://github.com/terroo

Related articles