Qt World Summit: Register Today!

Qt + OpenCV concate window

  • Dear all,

    Using OpenCV within Qt 5, I would like to create an automatic formated window of concatenated images.
    I have a specific loop which enable the concatenation of various images, and I would like to plot it inside the main window through QTCreator.

    The function is:

    		Size sz(100,100);
    		Mat rois;
    		vector<Rect2d> rects = trackers.getObjects();
    		for(unsigned i=0; i<rects.size(); i++)
    			Mat patch;
    			resize(frame(rects[i]), patch, sz);
    			if (rois.empty())
    				rois = patch.clone();
    				hconcat(rois, patch, rois);

    How can I show the "rois" image within a preformed window ?

    Thanks for your help and support.


  • Lifetime Qt Champion


    Once you have your final image, make a QImage out of it and apply it to a QLabel.

Log in to reply