python 中值滤波

代码在git
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 8 09:46:29 2021

@author: ledi
"""

import numpy as np
import cv2
from matplotlib import pyplot as plt

def medianBlur(image,ksize=2,):
'''
中值滤波,去除椒盐噪声

args:
image:输入图片数据,要求为灰度图片
ksize:滤波窗口大小
return:
中值滤波之后的图片
'''
rows,cols = image.shape[:2]
#输入校验
half = ksize//2

python 中值滤波最先出现在Python成神之路

版权声明:
作者:zhangchen
链接:https://www.techfm.club/p/8725.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>