Image Processing Toolbox    

Filling a Region

You can use the roifill function to fill a region of interest, interpolating from the borders of the region. This function is useful for image editing, including removal of extraneous details or artifacts.

roifill performs the fill operation using an interpolation method based on Laplace's equation. This method results in the smoothest possible fill, given the values on the boundary of the region.

As with roipoly, you select the region of interest with the mouse. When you complete the selection, roifill returns an image with the selected region filled in.

This example uses roifill to modify the trees image. The border of the selected region is shown in red on the original image.

Figure 11-5: A Region of Interest Selected for Filling

Figure 11-6: The Region of Interest Shown in Figure 11-5 Has Been Filled


  Filtering a Region Image Deblurring