When segmenting an image based on threshold, ROIs may be too near or overlap adjacent areas of interest. Thus when counting, the connected ROIs will be counted as one object instead of two. By processing the image, after the binary operation, the surrounding pixels that bridge ROIs can be eroded away by systematically removing edge pixels. This process is called erosion. Conversely, pixels may be added systematically to fill holes and close spaces between objects. This operation is called dilation. Sequential erosion/dilation operations can be used to make noisy images solid in the process of opening. The converse of this is the closing operation, which can bridge adjacent binary ROIs.