floodFill              package:EBImage              R Documentation

_R_e_g_i_o_n _f_i_l_l_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     Fill regions in images.

_U_s_a_g_e:

       floodFill(x, pt, col, tolerance=0)

_A_r_g_u_m_e_n_t_s:

       x: An 'Image' object or an array.

      pt: Coordinates of the start filling point.

     col: Fill color. This argument should be a numeric for Grayscale
          images and an R color for Color images.

tolerance: Color tolerance used during the fill.

_D_e_t_a_i_l_s:

     Flood fill is performed using the fast scan line algorithm.
     Filling starts at 'pt' and grows in connected areas where the
     absolute difference of the pixels intensities (or colors) remains
     below 'tolerance'.

_V_a_l_u_e:

     An 'Image' object or an array, containing the transformed version
     of 'x'.

_A_u_t_h_o_r(_s):

     Gregoire Pau, Oleg Sklyar; 2007

_E_x_a_m_p_l_e_s:

       x = readImage(system.file("images", "shapes.png", package="EBImage"))
       y = floodFill(x, c(67, 146), 0.5)
       if (interactive()) display(y)

       y = channel(y, 'rgb')
       y = floodFill(y, c(48, 78), 'red')
       y = floodFill(y, c(156, 52), 'orange')        
       if (interactive()) display(y)

       x = readImage(system.file("images", "lena.gif", package="EBImage"))
       y = floodFill(x, c(226, 121), 1, tolerance=0.1)
       if (interactive()) display(y)

