pnm                  package:e1071                  R Documentation

_P_o_r_t_a_b_l_e _A_n_y_m_a_p _I_m_a_g_e_s

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

     `read.pnm' reads a pnm file and loads the image into an object of
     class `pnm', which is basically a matrix (pbm, pgm) or a
     3-dimensional arry with 3 matrices for red, green and blue.

     `write.pgm' writes an object of class `pnm' to a pgm file.
     Generalizations for writing pbm and ppm files are yet to be
     written.

     `plot.pnm' plots a pnm object using the command `image'. The only
     difference is that the element `[1,1]' of `pnmobj' is plotted as
     the upper left corner (plain `image' would plot `[1,1]' as the
     lower left corner.

     `channel.pnm' extracts a black-and-white picture corresponding to
     one of the three color channels.

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

     read.pnm(file)
     plot(pnmobj, xlab="", ylab="", axes=FALSE, ...)
     write.pgm(pnmobj, file="Rimage.pgm", forceplain=FALSE)
     channel.pnm(pnmobj, chan = "red")

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

  pnmobj: an object of class `pnm'

    file: name of the pnm file

forceplain: If `TRUE', an ASCII pgm file is written. Default is to
          write a binary (raw) pgm file.

    chan: Channel to extract (one of `"red"', `"green"' and `"blue"').

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

     `read.pnm' returns an object of class `pnm'. The maximum value (of
     either grey or the red/green/blue channels) is stored as attribute
     `"maxval"'). The type (pbm, pgm or pnm) is stored as attribute
     `"type"').

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

     Friedrich Leisch

_S_e_e _A_l_s_o:

     `image'

