Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to perform changes in both sub-image and original image ?

I have limited a region of interest in a binary image with a rectangle . I have convert this rectangle to a new matrix . now whenever I perform an operation in this matrix there is no change in the original image , but what I want is to have a change in the original image .

     // region of interest 
       Rect roi(maxloc.x,maxloc.y, m2.cols,m2.rows);
    //new matrix  
       Mat image_roi = m1(roi);
    //perform operations 
       bitwise_not(image_roi,image_roi);
      image_roi=choice(image_roi);
     imshow("image",m1);//there is no change in m2

How to perform changes in both sub-image and original image ?

I have limited a region of interest in a binary image with a rectangle . I have convert this rectangle to a new matrix . now whenever I perform an operation in this matrix there is no change in the original image , but what I want is to have a change in the original image .

     // region of interest 
       Rect roi(maxloc.x,maxloc.y, m2.cols,m2.rows);
    //new matrix  
       Mat image_roi = m1(roi);
    //perform operations 
       bitwise_not(image_roi,image_roi);
      image_roi=choice(image_roi);
     imshow("image",m1);//there is no change in m2
m1

How to perform changes in both sub-image and original image ?

I have limited a region of interest in a binary image with a rectangle . I have convert this rectangle to a new matrix . now whenever I perform an operation in this matrix there is no change in the original image , but what I want is to have a change in the original image .

     // region of interest 
       Rect roi(maxloc.x,maxloc.y, m2.cols,m2.rows);
    //new matrix  
       Mat image_roi = m1(roi);
    //perform operations 
       bitwise_not(image_roi,image_roi);
      image_roi=choice(image_roi);
     imshow("image",m1);//there is no change in m1