You can create a QPixmap and convert it to QImage if you just want to have a QImage for modification and manipulation. Here, you can use the following code to achieve this:
int width = 100;
int height = 200;
QImage image = QPixmap(width, height).toImage();
Qt offers convenient classes for basic image processing and pixel manipulation. In this article I am going to describe how you can change the hue level of a whole image using QImage class in Qt.
Continue reading “How to Change Hue Level of an Image in Qt”
Qt allows you to easily grab an screenshot and save it using grabWindow function implemented in QScreen. Here is how you can use it:
Continue reading “How to Take Screenshots Using Qt”
In this post I am going to share a very simple but crucial parts of my QRecorder program which is recording images into videos. At the time of writing this article, Qt doesn’t allow recording of video files and OpenCV with its multi-platform support seems to be the best solution.
Continue reading “How to Record Videos Using OpenCV”
Finding edges is crucial in many image processing applications because it gives a better understanding of the elements in a picture. This post contains download link to an example project (ready to build and run) in Qt that uses nothing but the existing Qt classes, namely QImage, to detect and display edges in a QImage.
Continue reading “How to find Edges in a Qt QImage”
You can use this method to convert an OpenCV Mat image to a Qt QImage which then can be easily turned into a QPixmap and then displayed on a QLabel. It might sound a little bit confusing but I’ll explain all of its parts. Check the method and my descriptions below:
Continue reading “How to display a Mat image in Qt”
Today I want to share the source code of an example project that shows you how to blur (Gaussian blur) an image (QImage to be precise) without using any third party image processing libraries such as OpenCV. Sometimes it might be useful to avoid deploying OpenCV libs just for achieving a blur effect.
Continue reading “How to blur an image in Qt”