for d in d_list: smmoth_img,manitude_img,mask_img = getIdealFilterPassImg(original_img, "lpf" , d) showTwoImg(smmoth_img,manitude_img,f"Smooth Img with $D_0$ = {d}", f"Manitude with $D_0$ = {d}")
for d in d_list: fre_mask=getIdealMask((688,688),d,"lpf") spa_mask=frequencyToSpatial(fre_mask) X = [i for i inrange(spa_mask.shape[0])] Y = spa_mask[spa_mask.shape[0]//2] plt.figure(figsize=(8,4)) ax1 = plt.subplot(121) ax2 = plt.subplot(122) ax1.set_title(f"Spatial Img with $D_0 = {d}$") ax2.set_title(f"Grayscale with $D_0 = {d}$") ax1.imshow(spa_mask,cmap = "gray") ax2.plot(X,Y) ax2.spines['left'].set_color('none') ax2.spines['top'].set_color('none') ax2.spines['right'].set_color('none') ax2.set_yticks([]) ax2.set_yticklabels([])