Skip to content

Commit

Permalink
Merge pull request #572 from grlee77/replace_camera
Browse files Browse the repository at this point in the history
Replace camera image with a CC0-licensed equivalent
  • Loading branch information
rgommers committed Oct 13, 2020
2 parents 7450b55 + 462f835 commit 2c44a67
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
5 changes: 5 additions & 0 deletions doc/release/1.2.0-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ New features
Backwards incompatible changes
==============================

- The image returned by ``pywt.data.camera`` has been replaced by a similar,
CC0-licensed image because the original image was determined to only be
licensed for non-commercial use. Any users who still need the prior camera
image for non-commercial use can find it many places online by performing a
web search for "cameraman test image".

Bugs Fixed
==========
Expand Down
13 changes: 13 additions & 0 deletions pywt/data/_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@ def camera():
camera : ndarray
convenient image to use for testing and demonstration
Notes
-----
No copyright restrictions. CC0 by the photographer (Lav Varshney).
.. versionchanged:: 0.18
This image was replaced due to copyright restrictions. For more
information, please see [1]_, where the same change was made in
scikit-image.
References
----------
.. [1] https://github.com/scikit-image/scikit-image/issues/3927
Examples
--------
>>> import pywt.data
Expand Down
Binary file modified pywt/data/camera.npz
Binary file not shown.
10 changes: 5 additions & 5 deletions pywt/tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ def test_data_ascent():


def test_data_camera():
ascent = pywt.data.camera()
camera = pywt.data.camera()

ref = np.array([[156, 157, 160],
[156, 157, 159],
[158, 157, 156]])
ref = np.array([[200, 200, 200],
[200, 199, 199],
[199, 199, 199]])

assert_allclose(ascent[:3, :3], ref)
assert_allclose(camera[:3, :3], ref)


def test_data_ecg():
Expand Down

0 comments on commit 2c44a67

Please sign in to comment.