日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

数字图像处理实验(12):PROJECT 05-03,Periodic Noise Reduction Using a Notch Filter

發布時間:2025/3/21 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 数字图像处理实验(12):PROJECT 05-03,Periodic Noise Reduction Using a Notch Filter 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

實驗要求:

Objective:
To understand the principle of the notch filter and its periodic noise reducing ability.
Main requirements:
Ability of programming with C, C++, or Matlab.
Instruction manual:
(a) Write a program that implements sinusoidal noise of the form given in Problem 5.14. The inputs to the program must be the amplitude, A, and the two frequency components u0 and v0 shown in the problem equation.
(b) Download image 5.26(a) and add sinusoidal noise to it, with u0 = M/2 (the image is square) and v0 = 0. The value of A must be high enough for the noise to be quite visible in the image.
(c) Compute and display the spectrum of the image. If the FFT program you developed in Project 4.01 can only handle images of size equal to an integer power of 2, reduce the size of the image to 512 x 512 or 256 x 256 using the program from Project 02-04. Resize the image before adding noise to it.
(d) Notch-filter the image using a notch filter of the form shown in Fig. 5.19(c).

這個實驗的要求是使用陷波濾波器消除周期噪聲。
對于某種周期噪聲常常是以一對共軛的點的形式,出現在圖像的頻譜中,所以為我們使用一個陷波濾波器,使其正好對應那對共軛點以消除周期噪聲。

實驗代碼:

% close all; clc; clear all;% img = imread('Fig5.26(a).jpg'); [M, N] = size(img); figure; subplot(2,3,1); imshow(img); title('原圖像');% 產生周期噪聲 C = [343, 0]; [noise, R, S] = imnoise3(M, N, C, 40000000); subplot(2,3,2); imshow(noise, []); title('噪聲');% 計算傅里葉變換 img1 = double(img); img2 = img1 + noise; img3 = fft2(img2); subplot(2,3,3); imshow(img3); title('傅里葉變換');% 生成濾波器 sig = 100; H = lpfilter('gaussian', M, N,sig); subplot(2,3,4); imshow(H); title('濾波器');% 頻率域濾波 img_G = H .* img3; subplot(2,3,5); imshow(img_G); title('頻域陷波濾波');% 傅里葉逆變換還原圖像到時域 img_g = real(ifft2(img_G)); img_g = mat2gray(img_g); subplot(2,3,6); imshow(img_g); title('陷波濾波結果');

實驗結果:

總結

以上是生活随笔為你收集整理的数字图像处理实验(12):PROJECT 05-03,Periodic Noise Reduction Using a Notch Filter的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。