title: DIsplaying matrix in image view in android
body: <p>I am doing some image processing in android but I got an initial problem in the following code.</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
  
  private Bitmap bmp; 
  private int[][] rgbValues,redv,redg,redb;
  public int[] nn ; 
  int values,val, c;
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      //load the image and use the bmp object to access it  
      bmp = BitmapFactory.decodeResource(getResources(), R.drawable.capture);  
  
      //define the array size  
      rgbValues = new int[bmp.getWidth()][bmp.getHeight()];  
  
      //Print in LogCat's console each of one the RGB and alpha values from the 4 corners of the image  
      //Top Left  
  
      Log.i("Pixel Value", "Top Left pixel: " + Integer.toHexString(bmp.getPixel(0, 0)));  
      //Top Right  
      Log.i("Pixel Value", "Top Right pixel: " + Integer.toHexString(bmp.getPixel(31, 0)));  
      //Bottom Left  
      Log.i("Pixel Value", "Bottom Left pixel: " + Integer.toHexString(bmp.getPixel(0, 31)));  
      //Bottom Right  
      Log.i("Pixel Value", "Bottom Right pixel: " + Integer.toHexString(bmp.getPixel(31, 31)));  
  
      //get the ARGB value from each pixel of the image and store it into the array
  
      for(int i=0; i &lt; bmp.getWidth(); i++)  
      {  
          for(int j=0; j &lt; bmp.getHeight(); j++)  
          {  
              //This is a great opportunity to filter the ARGB values  
              rgbValues[i][j] = bmp.getPixel(i, j);  
               values = rgbValues[i][j];
               int rvalue = Color.red(values);
               Log.i("Pixel Value", "Red pixel: " + rvalue);
               int gvalue = Color.green(values);
               Log.i("Pixel Value", "Green pixel: " + gvalue);
               int bvalue = Color.blue(values);
               Log.i("Pixel Value", "Blue pixel " + bvalue);
  
          }  
      } 
      ImageView miamageview ;
  
      miamageview = ( ImageView) findViewById (R.id.imageView1);
      miamageview.setImageMatrix(rgbValues);
  
  }  
  </code></pre>
  
  <p>I want to display the rgbValues matrix as an image in ImageView (or any other view) but I got that error : </p>
  
  <pre><code>"The method setImageMatrix(Matrix) in the type ImageView is not applicable for the arguments `(int[][])`". 
  </code></pre>
  
  <p>How can i display rgbValues matrix as an image?</p>