Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Qt 5 and OpenCV 4 Computer Vision Projects

You're reading from   Qt 5 and OpenCV 4 Computer Vision Projects Get up to speed with cross-platform computer vision app development by building seven practical projects

Arrow left icon
Product type Paperback
Published in Jun 2019
Publisher Packt
ISBN-13 9781789532586
Length 348 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Zhuo Qingliang Zhuo Qingliang
Author Profile Icon Zhuo Qingliang
Zhuo Qingliang
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Building an Image Viewer 2. Editing Images Like a Pro FREE CHAPTER 3. Home Security Applications 4. Fun with Faces 5. Optical Character Recognition 6. Object Detection in Real Time 7. Real-Time Car Detection and Distance Measurement 8. Using OpenGL for the High-Speed Filtering of Images 9. Assessments 10. Other Books You May Enjoy

Recognizing characters on the screen

In the previous sections, we finished discussing almost all of the features of our Literacy application. In this section, in order to improve the user experience of the application, we will add a feature to allow the user to grab a part of the screen as the input image of the application. With this feature, the user can click the mouse button and then drag it to select a rectangular region of the screen as an image. Then, they can either save the image as a file or perform OCR on it.

We will create a new class to implement this feature. The new class is called ScreenCapturer, and is defined in the header file, screencapturer.h:

    class ScreenCapturer : public QWidget {
Q_OBJECT

public:
explicit ScreenCapturer(MainWindow *w);
~ScreenCapturer();

protected:
void paintEvent(QPaintEvent *event) override;
...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime