2007 Taichi Kawasaki Kinki University School of Engineerings
1 2 2 (POC) 6 3 7 4 12 5 13 6 18 7 24 8 26 9 27 10 31 1
1 [1]. 1 [2] P.Chazal [3] 2 3 2
1: 3
2: 4
3: 5
2 (POC) f(n 1, n 2 ) g(n 1, n 2 ) 2 F (k 1, k 2 ) G(k 1, k 2 ) F (k 1, k 2 ) G(k 1, k 2 ) R F G (k 1, k 2 ) R F G (k 1, k 2 ) = F (k 1, k 2 )G(k 1, k 2 ) F (k 1, k 2 )G(k 1, k 2 ) (1) G(k 1, k 2 ) G(k 1, k 2 ) r fg (n 1, n 2 ) R F G (k 1, k 2 ) 2 r fg (n 1, n 2 ) = IDF T [R F G (k 1, k 2 )] (2) IDFT 6
3 4 Lenna 5 MANDRILL Lenna 6 2 POC r fg (n 1, n 2 ) Lenna MANDRILL 7 2 POC r fg (n 1, n 2 ) 2 7
4: Lenna 8
5: MANDRILL 9
6: 2 POC 10
7: POC 11
4 MAT- LAB MATLAB (GUI) [4, 5] 12
5 8 9 POC 2 10 11 ( ) 13
8: 14
9: 15
10: 16
11: ( ) 17
6 12: 18
13: 19
14: 20
15: 21
16: 22
17: 23
7 MATLAB 24
[1] 51 1976. [2] 2005. [3] P.Chazal, J.Flynn, and B.Rcilly Automatcd Processing of Images Based on the Fourier Transform for Use in Forensic Science IEEE Trans., Vol. PAMI-27, 3, pp.341-350 (Mar. 2005). [4] MATLAB 2002. [5] MATLAB 2001. 25
8 26
9 function varargout = lab2(varargin) gui Singleton = 1; gui State = struct( gui Name, mfilename,... gui Singleton, gui Singleton,... gui OpeningFcn, @lab2 OpeningFcn,... gui OutputFcn, @lab2 OutputFcn,... gui LayoutFcn, [],... gui Callback, []); if nargin && ischar(varargin1) gui State.gui Callback = str2func(varargin1); end if nargout [varargout1:nargout] = gui mainfcn(gui State, varargin:); else gui mainfcn(gui State, varargin:); end function lab2 OpeningFcn(hObject, eventdata, handles, varargin) handles.output = hobject; guidata(hobject, handles); function varargout = lab2 OutputFcn(hObject, eventdata, handles) varargout1 = handles.output; // function Untitled 1 Callback(hObject, eventdata, handles) // function Untitled 2 Callback(hObject, eventdata, handles) axes(handles.axes1); [fname, dpath] = uigetfile( *.bmp,, C:\Documents and Settings\04167025\My Documents\MATLAB\ ); IMG=imread(fname); handles.img=img; imagesc(img); 27
colormap(gray); guidata(hobject,handles); // function Untitled 3 Callback(hObject, eventdata, handles) axes(handles.axes2); [fname, dpath] = uigetfile( *.bmp,, C:\Documents and Settings\04167025\My Documents\MATLAB\ ); IMG2=imread(fname); handles.img2=img2; imagesc(img2); colormap(gray); guidata(hobject,handles); // function Untitled 5 Callback(hObject, eventdata, handles) axes(handles.axes3); x=fft2(double(handles.img)); y=fft2(double(handles.img2)); p=(y.*conj(x))./abs(y.*conj(x)); IMG=fftshift(ifft2(p)); imagesc([-256,256],[-256,256],img); // function Untitled 7 Callback(hObject, eventdata, handles) axes(handles.axes4); x=fft2(double(handles.img)); y=fft2(double(handles.img2)); p=(y.*conj(x))./abs(y.*conj(x)); IMG=fftshift(ifft2(p)); xx = 1; yy = 1; max=img(1,1); [y,x]=size(img); for y1=1:y for x1=1:x if (IMG(y1,x1) max) 28
max = IMG(y1,x1); // yy = y1; xx = x1; end end end x2=xx-257; y2=yy-257; mesh(img); // xlabel( x ); ylabel( y ); // HT=uicontrol(lab2, style, text ); set(ht, position,[890 285 100 20]); set(ht, string,max); set(ht, BackgroundColor,[1,1,1]); set(ht, fontsize,15); set(ht, ForegroundColor,[0,0,0]); // (x ) HT=uicontrol(lab2, style, text ); set(ht, position,[920 233 50 20]); set(ht, string,xx); set(ht, BackgroundColor,[1,1,1]); set(ht, fontsize,15); set(ht, ForegroundColor,[0,0,0]); // (y ) HT=uicontrol(lab2, style, text ); set(ht, position,[920 195 50 20]); set(ht, string,yy); set(ht, BackgroundColor,[1,1,1]); set(ht, fontsize,15); set(ht, ForegroundColor,[0,0,0]); 29
//x HT=uicontrol(lab2, style, text ); set(ht, position,[950 145 50 20]); set(ht, string,x2); set(ht, BackgroundColor,[1,1,1]); set(ht, fontsize,15); set(ht, ForegroundColor,[0,0,0]); //y HT=uicontrol(lab2, style, text ); set(ht, position,[950 110 50 20]); set(ht, string,y2); set(ht, BackgroundColor,[1,1,1]); set(ht, fontsize,15); set(ht, ForegroundColor,[0,0,0]); // function Untitled 4 Callback(hObject, eventdata, handles) // function Untitled 9 Callback(hObject, eventdata, handles) exit 30
10 31