def goFilterImpulses(): xa, s1, s2, clip = getImage() xb = makeImpulses(12, len(xa[0]), len(xa)) t = diffusionTensors(2.0, xa) plot(xa, s1, s2, 1.3) #plot(xb,s1,s2,0.9) for sigmaR in [0.1, 1.0, 100.0]: #for sigmaR in [100.0]: y = like(xa) bf = BilateralFilter(30.0, sigmaR) bf.setType(BilateralFilter.Type.TUKEY) bf.applyAB(t, xa, xb, y) y = smoothS(y) #plot(y,s1,s2,0.5*max(y)) plot(y, s1, s2, 0.1)
def goFilterImpulses(): xa,s1,s2,clip = getImage() xb = makeImpulses(12,len(xa[0]),len(xa)) t = diffusionTensors(2.0,xa) plot(xa,s1,s2,1.3) #plot(xb,s1,s2,0.9) for sigmaR in [0.1,1.0,100.0]: #for sigmaR in [100.0]: y = like(xa) bf = BilateralFilter(30.0,sigmaR) bf.setType(BilateralFilter.Type.TUKEY) bf.applyAB(t,xa,xb,y) y = smoothS(y) #plot(y,s1,s2,0.5*max(y)) plot(y,s1,s2,0.1)
def goFilterRandom(): xa, s1, s2, clip = getImage() plot(xa, s1, s2, clip) n1, n2 = len(xa[0]), len(xa) xb = makeRandom(n1, n2) t = diffusionTensors(2.0, xa) #plot(xa,s1,s2,1.3) #plot(xb,s1,s2,0.5) xqqd = qqd(x) for sigmaR in [xqqd, 100 * xqqd]: y = like(xa) bf = BilateralFilter(30.0, sigmaR) bf.setType(BilateralFilter.Type.TUKEY) bf.applyAB(t, xa, xb, y) plot(y, s1, s2, 0.1) bf.apply(t, xa, y) plot(y, s1, s2, clip)
def goFilterRandom(): xa,s1,s2,clip = getImage() plot(xa,s1,s2,clip) n1,n2 = len(xa[0]),len(xa) xb = makeRandom(n1,n2) t = diffusionTensors(2.0,xa) #plot(xa,s1,s2,1.3) #plot(xb,s1,s2,0.5) xqqd = qqd(x) for sigmaR in [xqqd,100*xqqd]: y = like(xa) bf = BilateralFilter(30.0,sigmaR) bf.setType(BilateralFilter.Type.TUKEY) bf.applyAB(t,xa,xb,y) plot(y,s1,s2,0.1) bf.apply(t,xa,y) plot(y,s1,s2,clip)