rgb2grey               package:rimage               R Documentation

_C_o_n_v_e_r_t _c_o_l_o_r _i_m_a_g_e_m_a_t_r_i_x _t_o _g_r_e_y _i_m_a_g_e_m_a_t_r_i_x

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

     This function convert color imagematrix to grey imagematrix.

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

     rgb2grey(img, coefs=c(0.30, 0.59, 0.11))

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

     img: target image

   coefs: coefficients for red plane, green plane, and blue plane.

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

     grey imagematrix

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

       x <- read.jpeg(system.file("data", "cat.jpg", package="rimage"))
       plot(rgb2grey(x))

