赞
踩
scikit-image是为scipy科学计算库打造的图像处理算法库,在python下安装:
该图像库最新版已更新到0.16版本,博主安装的为0.15版本,例程在该版本下运行
pip install scikit-image==0.15
或在Anaconda下安装:
conda install -c conda-forge scikit-image
scikit-image库主要包含以下模块:
模块 | 功能 |
---|---|
color | 颜色空间转换 |
data | 测试图像/示例数据 |
draw | 画(线条、文本等), 操作NumPy数组 |
exposure | 图像亮度调整,例如,直方图均衡化等 |
feature | 特征检测与提取 |
filters | 锐化、边缘检测等 |
graph | 图论运算 |
io | 读取/保存/显示图像和视频 |
measure | 测量图像的轮廓和相似性 |
morphology | 形态学操作 |
novice | 用于教学的简化接口 |
restoration | 图像恢复算法 |
segmentation | 图像分割算法 |
transform | 几何变换和其他变换 |
util | 通用工具 |
viewer | 结果可视化界面 |
函数 | 功能 |
---|---|
img_as_float | 将图像转换为浮点格式,值在[0,1] |
img_as_float32 | 将图像转换为单精度浮点格式(32位)、 值在[0,1]。 |
img_as_float64 | 将图像转换为双精度浮点格式(64位), 值在[0,1]。 |
img_as_uint | 将图像转换为无符号整数格式,值在[0,65535]。 |
img_as_int | 将图像转换为带符号整数格式,值(-32768、32767)。 |
img_as_ubyte | 将图像转换为无符号字节格式,值在[0,255]。 |
img_as_bool | 将图像转换为布尔值格式,价值观或真或假。 |
dtype_limits | 返回强度极限,即(最小,最大)元组 |
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from skimage import data
from skimage import img_as_float
image=data.coins()
image1=img_as_float(data.coins())
print(image.max,image1.max)
>>>252 0.988235294118
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。