Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to remove drawings from Mat ?

I have to draw few rectangles in image in such a way than when new rectangles arrives the previous rectangles i.e drawings has to be gone from the Mat. I tried to use image.release() but its not working. This is the line of code which is executed multiple time for different object detected in image.

for(auto v : obj_pixel)
{
    cv::rectangle(cv_ptr->image,cv::Point( v.x-0.1,v.y-0.1),cv::Point( v.x+0.1,v.y+0.1),cv::Scalar( 0, 0, 0 ),cv::FILLED);
}

How can i perform this task?