Using OpenGL in Qt for Processing Images

Utilizing the power of the GPU, and OpenGL in particular, for Computer Vision and Image Processing purposes has always been a favorite topic of mine. It’s quite easy to find many examples around (even among official Qt example projects) to deal with and learn more about this topic but I figured there are no clear and step by step examples for people who are absolutely new to it. This post aims to cover a number of topics, including the following, in a step by step and simple manner:

  • How to use QOffscreenSurface class for off-screen rendering using OpenGL
  • How to use QOpenGLFramebufferObject to create Frame Buffer objects
  • How to use Vertex Shaders to perform Geometric Image Transformations
  • How to use Fragment Shaders to perform Image Filtering and per-pixel operations
  • How to convert a texture to QImage
Continue reading “Using OpenGL in Qt for Processing Images”

Deploying Qt+OpenCV Applications on macOS

Qt provides an extremely simple mechanism for deploying applications on macOS, thanks to macdeployqt tool. Unfortunately, the same does not apply to Qt for macOS applications that reference 3rd party libraries such as OpenCV. In this post, I’ll describe the manual but simple process of adding 3rd party libraries into macOS Application packages in order to eliminate the need for installing those libraries on our target computers.

Continue reading “Deploying Qt+OpenCV Applications on macOS”

Qt Installer Framework – How to Run an Executable During Installation

Qt Installer Framework provides a simple way of creating cross-platform installers and setup files. Some of the questions that are asked quite a lot, but unfortunately are not as well-documented as they should be, is about the “Execute” method which is used to run executable files during installation. In this post I’ve tried to clarify a couple of points about it with a couple of simple examples.

Continue reading “Qt Installer Framework – How to Run an Executable During Installation”

Configuring Qt for Windows Projects to Use OpenCV 4.1.0

I usually build OpenCV with the BUILD_opencv_world option which makes it quite easy to configure my Qt projects and work fast. But when it comes to deploying OpenCV powered applications, I still prefer to use the modular and default OpenCV build in order to deploy only the required DLLs and end up with a smaller installer file size.

Continue reading “Configuring Qt for Windows Projects to Use OpenCV 4.1.0”

Creating a Pure C++11 Generic Timer Class

One thing I noticed while searching for a simple, generic and pure C++ Timer class online, was the huge amount of answers that were floating around and none of them fit the exact description I was looking for. As a Qt Framework user I wanted to have something as close to QTimer as possible, or maybe even something like Timer class in .NET Framework and C# language. Well, I ended up writing one myself using what I could gather and this post is the summary of it all.

Continue reading “Creating a Pure C++11 Generic Timer Class”

Implementing Minimize To Tray Functionality Using Qt/C++

I wanted to create my own personal stand-alone YouTube Player with Minimize to System Tray functionality. In other words I wanted it to be minimized to the System Tray when I closed it and displayed again when I clicked its icon in System Tray. I actually did it the other day and the whole thing led to this post. So, in this post I’ll describe How to use Qt/C++ to create your own YouTube Player with Minimize to Tray functionality in less than 10 minutes.

Continue reading “Implementing Minimize To Tray Functionality Using Qt/C++”