# count = 0 # for cut in cutout: # print(cut) # mask = isn.gaussianHighpassFilter(mask_size2, cut) # a = util.applyMask(img_copy, mask) # b = util.writableDFT(a) # c = util.normalizeImage(b) # d = util.post_process_image(c) # count += 1 # print(count) # util.displayImage(d) nmask_size = (h2, w2) img_copy = util.getImage(img3) mask = isn.idealHighpassFilter(nmask_size, 100) mask1 = isn.idealLowpassFilter(nmask_size, 100) mask2 = isn.gaussianHighpassFilter(nmask_size, 100) mask3 = isn.ringLowpassFilter(nmask_size, 100, 10) mask4 = isn.butterworthHighpassFilter(nmask_size, 50, 2) masks = (mask, mask1, mask2, mask3, mask4) count = 0 for mask in masks: a = util.applyMask(mask, img_copy) count += 1 print(count) util.displayImage(a)
def test_butterworthHighpassFilter_high_width_high_order(self): expected = self.setup.getExpectedOutput(self._testMethodName) self.actual = noise.butterworthHighpassFilter(self.emptymask, 50, 3) self.actual = self.setup.normalizeImage(self.actual) self.assertTrue(self.setup.imagesEqual(expected, self.actual))