mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 11:51:24 +08:00
Add RGBA image
This commit is contained in:
+18
-10
@@ -16,21 +16,22 @@ from ._binary_blobs import binary_blobs
|
||||
from .. import img_as_bool
|
||||
|
||||
__all__ = ['load',
|
||||
'astronaut',
|
||||
'camera',
|
||||
'lena',
|
||||
'text',
|
||||
'checkerboard',
|
||||
'chelsea',
|
||||
'clock',
|
||||
'coffee',
|
||||
'coins',
|
||||
'horse',
|
||||
'hubble_deep_field',
|
||||
'immunohistochemistry',
|
||||
'lena',
|
||||
'logo',
|
||||
'moon',
|
||||
'page',
|
||||
'horse',
|
||||
'clock',
|
||||
'immunohistochemistry',
|
||||
'chelsea',
|
||||
'coffee',
|
||||
'hubble_deep_field',
|
||||
'rocket',
|
||||
'astronaut']
|
||||
'text',
|
||||
'rocket']
|
||||
|
||||
|
||||
def load(f, as_grey=False):
|
||||
@@ -142,6 +143,13 @@ def coins():
|
||||
return load("coins.png")
|
||||
|
||||
|
||||
def logo():
|
||||
"""Scikit-image logo, a RGBA image.
|
||||
|
||||
"""
|
||||
return load("logo.png")
|
||||
|
||||
|
||||
def moon():
|
||||
"""Surface of the moon.
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 176 KiB |
@@ -57,6 +57,13 @@ def test_immunohistochemistry():
|
||||
data.immunohistochemistry()
|
||||
|
||||
|
||||
def test_logo():
|
||||
""" Test that "logo" image can be loaded. """
|
||||
logo = data.logo()
|
||||
assert_equal(logo.ndim, 3)
|
||||
assert_equal(logo.shape[2], 4)
|
||||
|
||||
|
||||
def test_moon():
|
||||
""" Test that "moon" image can be loaded. """
|
||||
data.moon()
|
||||
|
||||
Reference in New Issue
Block a user