title: Convert an image to matrix
body: <p>I'm trying to convert an simple image to an matrix M*N, where M and N are the width and the heigth of my image.
  But at this point i don't understand the best way to work out the steps.</p>
  
  <p>There is my code at this moment:</p>
  
  <pre><code>  public double[][] img2matriz(BufferedImage bi){
      double[][] C;
      for(int i=0;i&lt;bi.getHeight();i++) 
      {
          for(int j=0;j&lt;bi.getWidth();j++)
          {
              C[i][j]
          }
      }     
  } 
  </code></pre>
  
  <p>In [i] and [j] i want to put the values of the matrix RGB respectively.</p>