Important: Please read the Qt Code of Conduct -

[Solved]Threshold on partial of image

  • Hi guys..
    I am doing a project with opencv and Qt...
    I have a image which is displayed on Qgraphicsview...Then I drew a rectangle by cv::rect on it...
    CvRect rectn;
    This rectangle is drawn on my image which is loaded in Qgraphicsview.

    Now I want to separate this rectangle from my image and do thresholding on it....
    How can I do that?I do not want do thresholding on whole of the image just on this rectangle...

    please help me...
    thanks in advance...

  • You have the full rect information in rectn (x, y, width, height), so just loop over that rect with QImage::scanLine and do the thresholding.

Log in to reply