title: How to extract the pixel data Use R's pixmap package?
body: <p>How to extract the pixel data Use R's pixmap package?</p>
  
  <p>so I read the image file using:</p>
  
  <blockquote>
    <p>picture &lt;- read.pnm("picture.pgm")
    picture
    Pixmap image
      Type          : pixmapGrey 
      Size          : 749x745 
      Resolution    : 1x1 
      Bounding box  : 0 0 745 749 </p>
  </blockquote>
  
  <p>How to extract the pixel data into some matrix?</p>