本文簡要介紹 python 語言中 scipy.datasets.face
的用法。
用法:
scipy.datasets.face(gray=False)#
獲取浣熊臉的 1024 x 768 彩色圖像。
raccoon-procyon-lotor.jpg 在http://www.public-domain-image.com
- gray: 布爾型,可選
如果 True 返回 8 位 grey-scale 圖像,否則返回彩色圖像
- face: ndarray
浣熊臉的圖像
參數 ::
返回 ::
例子:
>>> import scipy.datasets >>> face = scipy.datasets.face() >>> face.shape (768, 1024, 3) >>> face.max() 255 >>> face.dtype dtype('uint8')
>>> import matplotlib.pyplot as plt >>> plt.gray() >>> plt.imshow(face) >>> plt.show()
相關用法
- Python SciPy datasets.clear_cache用法及代碼示例
- Python SciPy datasets.electrocardiogram用法及代碼示例
- Python SciPy datasets.ascent用法及代碼示例
- Python SciPy distance.sokalmichener用法及代碼示例
- Python SciPy distance.dice用法及代碼示例
- Python SciPy distance.braycurtis用法及代碼示例
- Python SciPy dok_array.diagonal用法及代碼示例
- Python SciPy distance.cityblock用法及代碼示例
- Python SciPy dia_array.diagonal用法及代碼示例
- Python SciPy dok_matrix.diagonal用法及代碼示例
- Python SciPy dia_array.dot用法及代碼示例
- Python SciPy dok_matrix.nonzero用法及代碼示例
- Python SciPy distance.jensenshannon用法及代碼示例
- Python SciPy distance.sokalsneath用法及代碼示例
- Python SciPy dia_matrix.diagonal用法及代碼示例
- Python SciPy distance.kulczynski1用法及代碼示例
- Python SciPy distance.jaccard用法及代碼示例
- Python SciPy distance.minkowski用法及代碼示例
- Python SciPy distance.pdist用法及代碼示例
- Python SciPy distance.rogerstanimoto用法及代碼示例
- Python SciPy distance.canberra用法及代碼示例
- Python SciPy dlti.bode用法及代碼示例
- Python SciPy dia_matrix.dot用法及代碼示例
- Python SciPy distance.is_valid_y用法及代碼示例
- Python SciPy distance.chebyshev用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.datasets.face。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。