O'Reilly logo

Computer Vision with OpenCV 3 and Qt5 by Amin Ahmadi Tazehkandi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The QImage class

Perhaps the most important computer vision-related class in Qt, QImage is the main Qt class for handling image data and it provides pixel-level access to images, along with many other functions for working with image data. We are going to cover the most important subset of its constructors and functionalities, especially the ones important when working with OpenCV.

QImage contains many different constructors which allow the creation of a QImage from files or raw image data, or an empty image to work with and manipulate its pixels. We can create an empty QImage class with a given size and format, as seen in the following example:

    QImage image(320, 240, QImage::Format_RGB888); 

This creates a standard RGB color image that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required