%[r g b]=loadpnm('pork.ppm');
[pork yn pork]=loadpnm('porknoflash.ppm');
[pork yf pork]=loadpnm('porkflash.ppm');
[pork ya pork]=loadpnm('porkadd.ppm');
[pork yc pork]=loadpnm('porkcombined.ppm');

star=loadpnm('/mann/a/a/flakes/lightspaces/lightspace_leith_upatnieks/star.pgm');

star=undsamavg(star);
star=undsamavg(star);
star=undsamavg(star);
star=max2(star)-star;

yn=undsamavg(yn);
yf=undsamavg(yf);
ya=undsamavg(ya);
yc=undsamavg(yc);

% blur
yb=conv2(yc,star,'same');
figure(1);tvs(yb)

yb=conv2(ya,star,'same'); figure(1);tvs(yb)

% power4 blur
yb4=(conv2(yc.^4.22,star,'same')).^(1/4.22); figure(2);tvs(yb4)
figure(2);tvs(yb4)

yb4n=(conv2(yn.^4.22,star,'same')).^(1/4.22);
splitdiffusion=((yb4n.^4+(5*yf).^4).^.25); figure(3);tvs(splitdiffusion)

