def test_sobel_y_big_values(self):
     output = tolist(
         ndimage.sobel(self.array_big_values, axis=1, mode='reflect'))
     result = sobel(self.array_big_values, direction='x', mode='odd')
     self.assertEqual(output, result)
 def test_sobel_y_even(self):
     output = [[16, 16, 16, 16], [32, 32, 32, 32], [16, 16, 16, 16]]
     result = sobel(self.array, direction='y', mode='even')
     self.assertEqual(output, result)
 def test_sobel_y_rep(self):
     output = tolist(ndimage.sobel(self.array, axis=0, mode='nearest'))
     result = sobel(self.array, direction='y', mode='rep')
     self.assertEqual(output, result)
 def test_sobel_x_even(self):
     output = [[4, 8, 8, 4], [4, 8, 8, 4], [4, 8, 8, 4]]
     result = sobel(self.array, direction='x', mode='even')
     self.assertEqual(output, result)
Exemplo n.º 5
0
def sobel_command(*args, **kwargs):
    res = sobel.sobel(*args, **kwargs)
    res = normalize.shift(res, 128)
    res = normalize.suppress_ejection(res)
    return res