Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Removing certain pixels with threshold

For example, there are 9 region of interest. I need to remove those that are bigger than 1000 and smaller than 65. What is the best way to do it? I was using this method but it is not working.

double max_area=1000; double min_area=65; for( int i = 0; i< contours.size(); i++ ) { double area=contourArea( contours[i],false);
if((area>max_area) || (area<min_area)) contours.erase(contours.begin()="" +="" i);="" }<="" p="">

Removing certain pixels with threshold

For example, there are 9 region of interest. I need to remove those that are bigger than 1000 and smaller than 65. What is the best way to do it? I was using this method but it is not working.working. image description

double max_area=1000; double min_area=65; for( int i = 0; i< contours.size(); i++ ) { double area=contourArea( contours[i],false);
if((area>max_area) || (area<min_area)) contours.erase(contours.begin()="" +="" i);="" }<="" p="">

Removing certain pixels with threshold

For example, there are 9 region of interest. I need to remove those that are bigger than 1000 and smaller than 65. What is the best way to do it? I was using this method but it is not working. working.

image description

Removing certain pixels with threshold

For example, there are 9 region of interest. I need to remove those that are bigger than 1000 and smaller than 65. What is the best way to do it? I was using this method but it is not working.

image description