python包用于移除2d图像中的峰值
despike的Python项目详细描述
python包用于删除2d图像中的峰值
说明
二维图像中的峰值对应于产生的高能像素 由宇宙射线,传感器噪声或死像素。他们过去有价值观 和他们的邻居很不一样。
为了找到它们,我们在 图像,我们将此子图像的平均值/中值与中心 像素。如果该值大于观测值的n(默认为3)倍 标准差我们使用周围像素的中值a (默认为8像素)以替换峰值。
安装
使用pip:
$ pip install despike
使用source files:
$ git clone https://github.com/seignovert/despike.git $ cd despike ; python setup.py install
用法
>>>importdespike>>>despike.spikes(img)# Search the location of spikes in the image>>>despike.clean(img)# Clean the image from spikes
一个例子可以在这个Jupyter NoteBook中找到。