"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "skimage/feature/tests/test_canny.py" between
scikit-image-0.19.2.tar.gz and scikit-image-0.19.3.tar.gz

About: scikit-image is a collection of algorithms for image processing in Python.

test_canny.py  (scikit-image-0.19.2):test_canny.py  (scikit-image-0.19.3)
skipping to change at line 88 skipping to change at line 88
# of 0.8 and 0.6 for high and low respectively # of 0.8 and 0.6 for high and low respectively
correct_output = np.array( correct_output = np.array(
[[False, False, False, False, False, False], [[False, False, False, False, False, False],
[False, True, True, True, False, False], [False, True, True, True, False, False],
[False, False, False, True, False, False], [False, False, False, True, False, False],
[False, False, False, True, False, False], [False, False, False, True, False, False],
[False, False, True, True, False, False], [False, False, True, True, False, False],
[False, False, False, False, False, False]]) [False, False, False, False, False, False]])
result = feature.canny(image, low_threshold=0.6, high_threshold=0.8, result = feature.canny(image, low_threshold=0.6, high_threshold=0.8,
use_quantiles=True, mode='nearest') use_quantiles=True)
assert_equal(result, correct_output) assert_equal(result, correct_output)
def test_img_all_ones(self):
image = np.ones((10, 10))
assert np.all(feature.canny(image) == 0)
def test_invalid_use_quantiles(self): def test_invalid_use_quantiles(self):
image = img_as_float(data.camera()[::50, ::50]) image = img_as_float(data.camera()[::50, ::50])
self.assertRaises(ValueError, feature.canny, image, use_quantiles=True, self.assertRaises(ValueError, feature.canny, image, use_quantiles=True,
low_threshold=0.5, high_threshold=3.6) low_threshold=0.5, high_threshold=3.6)
self.assertRaises(ValueError, feature.canny, image, use_quantiles=True, self.assertRaises(ValueError, feature.canny, image, use_quantiles=True,
low_threshold=-5, high_threshold=0.5) low_threshold=-5, high_threshold=0.5)
self.assertRaises(ValueError, feature.canny, image, use_quantiles=True, self.assertRaises(ValueError, feature.canny, image, use_quantiles=True,
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)