scipy.datasets.

ascent#

scipy.datasets.ascent()[源代码]#

获取一个8位灰度位深度、512 x 512的派生图像,便于在演示中使用。

该图像源自 https://pixnio.com/people/accent-to-the-top

参数:
返回:
ascentndarray

一个便于测试和演示的图像

示例

>>> import scipy.datasets
>>> ascent = scipy.datasets.ascent()
>>> ascent.shape
(512, 512)
>>> ascent.max()
np.uint8(255)
>>> import matplotlib.pyplot as plt
>>> plt.gray()
>>> plt.imshow(ascent)
>>> plt.show()
../../_images/scipy-datasets-ascent-1.png