clipping               package:rimage               R Documentation

_C_l_i_p_p_i_n_g _i_m_a_g_e

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

     This function returns the image which restricts pixel value from
     the specified lowest value to the specified highest value in the
     original image. This means that the pixels which have lower value
     than the given lowest (default: 0) are replaced to the lowest and
     the pixels have greater value than the given highest (default: 1)
     are replaced to the highest.

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

     clipping(img, low=0, high=1)

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

     img: target image

     low: lowest value

    high: highest value

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

     Data of the same mode as 'img'

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

       data(logo)
       op <- par(mfrow=c(2,2))
       plot(logo, main="Source Image")

       # the appearance of next one doesn't change because of normalization.
       plot(normalize(2*logo), main="Doubled pixel value with normalization")

       # the next one is saturated as expected
       plot(clipping(2*logo), main="Doubled pixel value with clipping")

