Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 43fca41

Browse files
DFT
1 parent 2d3ceea commit 43fca41

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
112 KB
Loading[フレーム]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
%Discrete Fourier Transform
2+
3+
clc;
4+
a=imread('cameraman.tif');
5+
figure(1)
6+
imshow(a)
7+
a=double(a);
8+
[row col]=size(a);
9+
const=sqrt(row*col);
10+
for n=0:1:row-1
11+
for k=0:1:col-1
12+
W(n+1,k+1)=exp(-i*2*pi*n*k/const);
13+
end
14+
end
15+
X=W*a*W.';
16+
figure(2)
17+
imshow(X)
18+
ff=fft2(a)
19+
20+
aimg=ifft2(ff);
21+
figure(3)
22+
imshow(abs(mat2gray(aimg)))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /