báo cáo xly

10
 nh và âm thanh  GVHD: VÕ TRUNG DŨNG Thành viên nhm : H! tên: "##V:  N$%&'n ()n$ B*nh +,---...  N$%&'n Vi/t (01n$ +,---23+  N$%&'n Thành N$%&ên +,--.44 T5 Hoàn$ #7n +,--  N$%&'n V8n Thi9n +,-- ; tài ,<: =ma$> t?an@Ao?m

Upload: nguyen-viet-cuong

Post on 04-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

8/14/2019 Báo cáo xly

http://slidepdf.com/reader/full/bao-cao-xly 1/10

 lý ảnh và âm

than 

GVHD: VÕ TRUNG DŨNG

Thành viên nhm :

H! tên: "##V:

 N$%&'n ()n$ B*nh +,---...

 N$%&'n Vi/t (01n$ +,---23+

 N$%&'n Thành N$%&ên +,--.44

T5 6ê Hoàn$ #7n +,--

 N$%&'n V8n Thi9n +,--

; tài ,<: =ma$> t?an@Ao?m

8/14/2019 Báo cáo xly

http://slidepdf.com/reader/full/bao-cao-xly 2/10

; tài ,<:

 =ma$> T?an@Ao?m: ?>aC an o?i$inal ima$> nam>C l>na,.4tiA  AinC th> Eo%?i>? t?an@Ao?m oA th> ima$>4 Hint: %@> AAt@hiAt anC AAt.F  lot th> lo$ ma$nit%C> oA  th> .D DET oA  th> $?a&@cal> ima$> Iith c>nt>? @hiAt>C4 C>@i$n anC al& th> t?%ncation IinCoI@ Ci@c%@@>C in th> cla@@ to J>> .K,.4K anC L4.K oA th> DET co>AAici>nt@4 al& th> .D inv>?@> DET to ?>con@t?%ct th> ima$> Ao?  >ach oA  th> t?%ncat>C@>ct?a4 lot th> ?>con@t?%ct>C ima$>@4 com%t> th> M#NR val%> Ao? >ach oA th> ?>con@t?%ct>C ima$>@4

8/14/2019 Báo cáo xly

http://slidepdf.com/reader/full/bao-cao-xly 3/10

(oC> cho toàn ài:

function baitaplon_xu_ly_anh 

%%%%%%%% nhap anh va FFTI = imread('C:\!er!\"I#$\e!&top\lena)*tif'+,

  im!ho-(I+,  fi.ure,  FF = fft)(I+, 

ima.e!c(//0lo.(1ab!(FF+++,  colormap(.ray+,  fi.ure,  ima.e!c(an.le(FF++,  colormap(.ray+,  fi.ure, 

%%%%%%%%%%%%%%%%%%%%%%%%%%

ima.e!c(//0lo.(1ab!(fft!hift(FF++++,  colormap(.ray+,  fi.ure,  ima.e!c(an.le(FF++,  colormap(.ray+,  fi.ure, 

%%%%%%%%%%%%%%%%%%tao bo loc thon. thap  cutoff = /*2, cutoff = /*2 l3y )% h4 !5 FT

  %%%%%%%%%%%%% /*/6266 l3y )*% h4 !5 FT  %%%%%%%%%%%%%% /*/726$$ l3y 8*)% h4 !5 FT

 n = //////,if cutoff 9 / cutoff ; /*

  error('cutoff fre<uency mu!t be bet-een / and /*'+,  end  if rem(n+ >= / n 9   error('n mu!t be an inte.er ;= '+,  end  ro-! = ),  col! = ),

x = (one!(ro-!+ 0 ?:col!@ A (fix(col!B)+1++Bcol!,  y = (?:ro-!@' 0 one!(col!+ A (fix(ro-!B)+1++Bro-!,

radiu! = !<rt(x*) 1 y*)+,

f = *B (*/ 1 (radiu! *B cutoff+*()0n++,

%%%%%%%%%%%%%%%%%%%%%%%%%%%% nhan tron. mien tan !o  FFcen = fft!hift(FF+,  FFf = FFcen *0 f, 

%%%%%%%%%%%%%%%%%%%%%%%% ve lai pho !au &hi loc  ima.e!c(//0lo.(1ab!(FFf+++,  colormap(.ray+,

8/14/2019 Báo cáo xly

http://slidepdf.com/reader/full/bao-cao-xly 4/10

  fi.ure,  ima.e!c(an.le(FFf++,  colormap(.ray+,  fi.ure,  %%%%%%%%%%%%%%%%%%%%% &hoi phuc anh 

reFFf = fft!hift(FFf+, 

D = ifft)(reFFf+,  D = uint$(D+,  im!ho-(D+  %%%%%%%%%tinh E#G  = /,  for i = dran.e(:)+  for H = dran.e(:)+  = 1 (I(iH+AD(iH++),  end,  end,  = double(+,

  J = B()0)+,  KLi = )M,  K = (KLi0KLi+BJ,

E#G = /0lo.(K+

?>aC an o?i$inal ima$> nam>C l>na,.4tiA 

8/14/2019 Báo cáo xly

http://slidepdf.com/reader/full/bao-cao-xly 5/10

coC> :

I = imread('C:\!er!\"I#$\e!&top\lena)*tif'+,  im!ho-(I+,

AinC th> Eo%?i>? t?an@Ao?m oA th> ima$>4(oC> :

FF = fft)(I+,  ima.e!c(//0lo.(1ab!(FF+++,  colormap(.ray+,

  fi.ure,  ima.e!c(an.le(FF++,  colormap(.ray+,

8/14/2019 Báo cáo xly

http://slidepdf.com/reader/full/bao-cao-xly 6/10

 lot th> lo$ ma$nit%C> oA  th> .D DET oA  th> $?a&@cal> ima$> Iith c>nt>? @hiAt>C4

(oC>:

ima.e!c(//0lo.(1ab!(fft!hift(FF++++,  colormap(.ray+,

  fi.ure,  ima.e!c(an.le(FF++,  colormap(.ray+,  fi.ure,

C>@i$n anC al& th> t?%ncation IinCoI@ Ci@c%@@>C in th> cla@@ to J>> .K,.4K anC L4.K oA th> DET co>AAici>nt@4

(oC> :

cutoff = /*/726$$,%%%%%%%%% cutoff = /*2 l3y )% h4 !5 FT  %%%%%%%%%%%%% /*/6266 l3y )*% h4 !5 FT  %%%%%%%%%%%%%% /*/726$$ l3y 8*)% h4 !5 FT

 n = //////,if cutoff 9 / cutoff ; /*

  error('cutoff fre<uency mu!t be bet-een / and /*'+,  end  if rem(n+ >= / n 9   error('n mu!t be an inte.er ;= '+,

  end  ro-! = ),

col! = ),x = (one!(ro-!+ 0 ?:col!@ A (fix(col!B)+1++Bcol!,y = (?:ro-!@' 0 one!(col!+ A (fix(ro-!B)+1++Bro-!,radiu! = !<rt(x*) 1 y*)+,f = *B (*/ 1 (radiu! *B cutoff+*()0n++,im!ho-(f+ 

8/14/2019 Báo cáo xly

http://slidepdf.com/reader/full/bao-cao-xly 7/10

8/14/2019 Báo cáo xly

http://slidepdf.com/reader/full/bao-cao-xly 8/10

al& th> .D inv>?@> DET to ?>con@t?%ct th> ima$> Ao?  >ach oA  th> t?%ncat>C@>ct?a4 lot th> ?>con@t?%ct>C ima$>@4

  com%t> th> M#NR val%> Ao? >ach oA th> ?>con@t?%ct>C ima$>@4

(oC>:%%%%%%%%%%%%%%%%%%%%%%%%%%%% nhan tron. mien tan !o

  FFcen = fft!hift(FF+,  FFf = FFcen *0 f, 

%%%%%%%%%%%%%%%%%%%%%%%% ve lai pho !au &hi loc  ima.e!c(//0lo.(1ab!(FFf+++,  colormap(.ray+,  fi.ure,  ima.e!c(an.le(FFf++,  colormap(.ray+,  fi.ure,  %%%%%%%%%%%%%%%%%%%%% &hoi phuc anh

 reFFf = fft!hift(FFf+,

 D = ifft)(reFFf+,

  D = uint$(D+,  im!ho-(D+

  %%%%%%%%%tinh E#G  = /,  for i = dran.e(:)+  for H = dran.e(:)+

  = 1 (I(iH+AD(iH++),  end,

  end,  = double(+,  J = B()0)+,  KLi = )M,  K = (KLi0KLi+BJ,

E#G = /0lo.(K+

8/14/2019 Báo cáo xly

http://slidepdf.com/reader/full/bao-cao-xly 9/10

  M#NR O ,3<423<-

  M#NR O ,3<423<-

8/14/2019 Báo cáo xly

http://slidepdf.com/reader/full/bao-cao-xly 10/10

 M#NR O ,3<423<-