-
Notifications
You must be signed in to change notification settings - Fork 11
Python Binding StripeFilter
Anders Kaestner edited this page Jul 17, 2019
·
4 revisions
Return to Python bindings manual
import numpy as np
import skimage.io as io
import matplotlib.pyplot as plt
import imagalg as ia
sino = io.imread('../../UnitTests/data/woodsino_0200.tif')
sf=ia.StripeFilter([sino.shape[1],sino.shape[0]],"daub7",2,0.1)
s2=sino.copy().astype("float32")
sf.process(s2,ia.eStripeFilterOperation.VerticalComponentFFT)
plt.figure(figsize=[12,4])
plt.subplot(1,3,1)
plt.imshow(sino)
plt.title('Original')
plt.subplot(1,3,2)
plt.imshow(s2)
plt.title('Filtered')
plt.subplot(1,3,3)
plt.imshow(sino-s2)
plt.title('Difference')
plt.tight_layout()
plt.savefig('striperesults.png')
Running this script should produce figure like this: