scipy.misc.

ascent#

scipy.misc.ascent()[原始碼]#

取得一張 8 位元灰階、512 x 512 的衍生圖像,方便在示範中使用

此圖像衍生自 http://www.public-domain-image.com/people-public-domain-images-pictures/ 的 accent-to-the-top.jpg

自版本 1.10.0 起已棄用: ascent 已於 SciPy 1.10.0 中從 scipy.misc.ascent 棄用,並將在 SciPy 1.12.0 中完全移除。資料集方法已移至 scipy.datasets 模組。請改用 scipy.datasets.ascent

參數:
回傳:
ascentndarray

方便用於測試和示範的圖像

範例

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