圖像濾波作用:
去除圖像中的干擾(噪聲),噪聲一般是由外界干擾產生的,比如灰塵、熱噪聲等
均值濾波:對於模糊圖像以及圖像內部的噪聲具有很好的作用
中值濾波:對單個噪聲具有很好的平滑作用,特備是椒鹽噪聲
高斯濾波:根據高斯函數,考慮權重的濾波,遠處的像素對目標影響越來越小
導向濾波:對於邊緣具有很好的保持作用,同時能夠對其他地方去除噪聲, 很受歡迎且常用
1 dev_open_file_dialog ('read_image', 'default', 'default', Selection) 2 read_image (Image, Selection) 3 4 *均值濾波 5 mean_image (Image, ImageMean, 25,25) 6 7 *中值濾波 8 median_image (Image, ImageMedian, 'circle', 7, 'mirrored') 9 *添加噪聲 10 add_noise_white (Image, ImageNoise, 10) 11 *中值濾波 12 median_image (ImageNoise, ImageMedian1, 'circle', 3, 'mirrored') 13 *高斯濾波 14 gauss_filter (ImageNoise, ImageGauss, 5) 15 *導向濾波 16 guided_filter (ImageNoise, ImageNoise, ImageGuided, 3, 20)
效果圖: