"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "skimage/exposure/tests/test_histogram_matching.py" between
scikit-image-0.19.1.tar.gz and scikit-image-0.19.2.tar.gz

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

test_histogram_matching.py  (scikit-image-0.19.1):test_histogram_matching.py  (scikit-image-0.19.2)
skipping to change at line 63 skipping to change at line 63
@pytest.mark.parametrize('channel_axis', (0, 1, -1)) @pytest.mark.parametrize('channel_axis', (0, 1, -1))
def test_match_histograms_channel_axis(self, channel_axis): def test_match_histograms_channel_axis(self, channel_axis):
"""Assert that pdf of matched image is close to the reference's pdf for """Assert that pdf of matched image is close to the reference's pdf for
all channels and all values of matched""" all channels and all values of matched"""
image = np.moveaxis(self.image_rgb, -1, channel_axis) image = np.moveaxis(self.image_rgb, -1, channel_axis)
reference = np.moveaxis(self.template_rgb, -1, channel_axis) reference = np.moveaxis(self.template_rgb, -1, channel_axis)
matched = exposure.match_histograms(image, reference, matched = exposure.match_histograms(image, reference,
channel_axis=channel_axis) channel_axis=channel_axis)
assert matched.dtype == image.dtype
matched = np.moveaxis(matched, channel_axis, -1) matched = np.moveaxis(matched, channel_axis, -1)
reference = np.moveaxis(reference, channel_axis, -1) reference = np.moveaxis(reference, channel_axis, -1)
matched_pdf = self._calculate_image_empirical_pdf(matched) matched_pdf = self._calculate_image_empirical_pdf(matched)
reference_pdf = self._calculate_image_empirical_pdf(reference) reference_pdf = self._calculate_image_empirical_pdf(reference)
for channel in range(len(matched_pdf)): for channel in range(len(matched_pdf)):
reference_values, reference_quantiles = reference_pdf[channel] reference_values, reference_quantiles = reference_pdf[channel]
matched_values, matched_quantiles = matched_pdf[channel] matched_values, matched_quantiles = matched_pdf[channel]
for i, matched_value in enumerate(matched_values): for i, matched_value in enumerate(matched_values):
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

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