HELP! How to store pictures in array ?

raorao
edited September 2016 in Questions about Code

I am going to filter the kinect depth img with guidedfilter, I want to put pictures(pixels) into the matrix, then processing it ...like in matlab. But in processing, I have some problems, and I don't know how to debug them... Here is my code...

translationDepthImg.loadPixels();
resizeHDFillImg.loadPixels();

int  hei= translationDepthImg.height;
int  wid=translationDepthImg.width;
 float  []I=new  float[hei*wid];
 float  []p=new  float[hei*wid];
  float  []q=new  float[hei*wid];
 PApplet.arrayCopy(resizeHDFillImg.pixels,  I);/////???here have bug?
 PApplet.arrayCopy(translationDepthImg.pixels,  p);
q=guidedfilter(I,p, 5, 0.01);
float[] guidedfilter(float[]I,float[]p,int r,float eps)
{.....
}

please help me ....thanks

Tagged:

Answers

  • are both images of same size?

    because in line 9 you are not using the same as in line 6 (4/5)

    also why not PImage[]=........?

Sign In or Register to comment.