Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace camera image with a CC0-licensed equivalent #572

Merged
merged 2 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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).
rgommers marked this conversation as resolved.
Show resolved Hide resolved

.. 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