octave> g=readpgm('ganymede.pgm'); magic number = P2 rows = 128 cols = 128 grey levels = 255 octave> gdisplay(g);
octave> c=readpgm('callisto.pgm'); magic number = P2 rows = 128 cols = 128 grey levels = 255 octave> gdisplay(c);
octave> gh=histogram(g/2,256); octave> gh=gh/sum(gh); # make it a pmf octave> ch=histogram(c/2,256); octave> ch=ch/sum(ch); # make it a pmf octave> mplot(0:255,gh,0:255,ch);
octave> cg=(c+g)/2; octave> gdisplay(cg);
octave> cgh=histogram(cg,256); octave> cgx=conv(ch,gh); octave> mplot(0:255,cgh,0:255,cgx(1:256));