作業題目(Image noise processing):
撰寫一個程式(a)在一張圖片中將上雜訊,(b)設計方法將雜訊去除。 (a) 說明加上的雜訊類型(Gaussian, Uniform, Salt-and-Pepper 等)與數量(20%, 50%等) (b)說明所設計去除雜訊的方法 設計與測試多種雜訊分數越高
使用環境:
- Spyder(Python3.7)
- opencv-python 4.2.0
cv2.imread()讀入原檔原圖

如果2D就跑2D,3D就跑3D
random.random()來設黑白值
paper and salt 的部分
random.random()不是0就是255非0極黑

salt&paper 30% 和50%
很明顯易見的圖片經過平滑化失真的感覺還是很明顯


原圖

基本上s為雜訊在gbr+s裡面的雜訊達到高斯
cv2.GaussianBlur達到高斯


沒有留言:
張貼留言