Even though the QML libraries have grown into a fully-fledged collection of types that can handle visuals, networking, cameras, and so on, it's still important to be able to extend them by using the power of C++ classes. Fortunately, QML and the Qt Framework provides enough provisions to be able to easily handle this. In this section, we are going to learn how to create a non-visual C++ class that can be used within QML codes to process images using OpenCV. Then, we'll create a C++ class that can be used as a visual item within QML codes to display images.
Integrating C++ and QML codes
Note that there is an Image type by default in QML that can be used to display images saved on disk by providing their URL to the Image item. However, we'll ...
Get Computer Vision with OpenCV 3 and Qt5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.