HELP! How to store pictures in array ?

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 in matlab. But in processing, I have some problems, and I don't know how to debug them... Here is my code...


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



  • 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.