def test_wiener(self): F = self.f(self.img) g = wiener(F, predefined_filter=self.f) assert_equal(g.shape, self.img.shape) g1 = wiener(F[::-1, ::-1], predefined_filter=self.f) assert_((g - g1[::-1, ::-1]).sum() < 1) g1 = wiener(F[::-1, ::-1], self.filt_func) assert_((g - g1[::-1, ::-1]).sum() < 1)
def test_wiener(self): F = self.f(self.img) g = wiener(F, predefined_filter=self.f) assert_equal(g.shape, self.img.shape) g1 = wiener(F[::-1, ::-1], predefined_filter=self.f) assert_((g - g1[::-1, ::-1]).sum() < 1) g1 = wiener(F[::-1, ::-1], self.filt_func) assert_((g - g1[::-1, ::-1]).sum() < 1)
def test_wiener(self): with expected_warnings([SCIPY_ND_INDEXING_WARNING]): F = self.f(self.img) g = wiener(F, predefined_filter=self.f) assert_equal(g.shape, self.img.shape) g1 = wiener(F[::-1, ::-1], predefined_filter=self.f) assert_((g - g1[::-1, ::-1]).sum() < 1) g1 = wiener(F[::-1, ::-1], self.filt_func) assert_((g - g1[::-1, ::-1]).sum() < 1)
lap = laplace(gray0, ksize=100) plt.imshow(lap) pre = prewitt(gray0, mask=None) plt.imshow(pre) pre_v = prewitt_v(gray0, mask=None) plt.imshow(pre_v) from skimage import filters edges2 = filters.roberts(gray0) plt.imshow(edges2) plt.imshow(scharr(gray0)) plt.imshow(threshold_mean(gray0)) plt.imshow(wiener(gray0)) ####################################### plt.imshow(img) plt.imshow(gray0) plt.imshow(image) ### TREES plt.imshow(segmentation) ### CONTOURS plt.imshow(img_back, cmap='gray') ### STREET plt.imshow(gy) plt.imshow(angle) plt.imshow(binary_adaptive) plt.imshow(binary_global) #### STREET CALÇADA TREES BEST
lap=laplace(gray0,ksize=100) plt.imshow(lap) pre=prewitt(gray0, mask=None) plt.imshow(pre) pre_v=prewitt_v(gray0, mask=None) plt.imshow(pre_v) from skimage import filters edges2 = filters.roberts(gray0) plt.imshow(edges2) plt.imshow(scharr(gray0)) plt.imshow(threshold_mean(gray0)) plt.imshow(wiener(gray0)) ####################################### plt.imshow(img) plt.imshow(gray0) plt.imshow(image) ### TREES plt.imshow(segmentation) ### CONTOURS plt.imshow(img_back, cmap = 'gray') ### STREET plt.imshow(gy) plt.imshow(angle) plt.imshow(binary_adaptive) plt.imshow(binary_global) #### STREET CALÇADA TREES BEST
def wiener_deblur(frame): return wiener(frame,filt_func)