"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "skimage/registration/tests/test_phase_cross_correlation.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_phase_cross_correlation.py  (scikit-image-0.19.2):test_phase_cross_correlation.py  (scikit-image-0.19.3)
skipping to change at line 127 skipping to change at line 127
# Size mismatch # Size mismatch
image = np.ones((5, 5)) image = np.ones((5, 5))
template = np.ones((4, 4)) template = np.ones((4, 4))
with pytest.raises(ValueError): with pytest.raises(ValueError):
phase_cross_correlation(template, image) phase_cross_correlation(template, image)
# NaN values in data # NaN values in data
image = np.ones((5, 5)) image = np.ones((5, 5))
image[0][0] = np.nan image[0][0] = np.nan
template = np.ones((5, 5)) template = np.ones((5, 5))
with expected_warnings([r'invalid value encountered in true_divide|\A\Z']): with expected_warnings(
[
r"invalid value encountered in true_divide"
+ r"|"
+ r"invalid value encountered in divide"
+ r"|\A\Z"
]
):
with pytest.raises(ValueError): with pytest.raises(ValueError):
phase_cross_correlation(template, image, return_error=True) phase_cross_correlation(template, image, return_error=True)
def test_4d_input_pixel(): def test_4d_input_pixel():
phantom = img_as_float(binary_blobs(length=32, n_dim=4)) phantom = img_as_float(binary_blobs(length=32, n_dim=4))
reference_image = fft.fftn(phantom) reference_image = fft.fftn(phantom)
shift = (-2., 1., 5., -3) shift = (-2., 1., 5., -3)
shifted_image = fourier_shift(reference_image, shift) shifted_image = fourier_shift(reference_image, shift)
result, error, diffphase = phase_cross_correlation(reference_image, result, error, diffphase = phase_cross_correlation(reference_image,
shifted_image, shifted_image,
 End of changes. 1 change blocks. 
1 lines changed or deleted 8 lines changed or added

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