Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %Lecture de l'image
- img = imread('A.bmp')
- %Conversion en nuances de gris
- It = rgb2gray(img)
- %Division par 255 de chaque valeur
- it = double(It)/255
- %Placement
- subplot(3,3,1)
- %Affichage de l'image
- imshow(img)
- title('Image A')
- subplot(3, 3, 4)
- %Affichage du module
- modA = mat2gray(log(abs(fftshift(fft2(it)))+1));
- imshow(modA,[]);
- title('Module centré de A')
- subplot(3, 3, 7)
- %Affichage de la phase centrée
- imshow(fftshift(angle(fftshift(fft2(it)))))
- title('phase centrée de A')
- M = fftshift(modA)
- for j=1:32
- for i=1:64
- Ma(i,j) = M(i,j);
- Ma(i,j) = M(i,j+32);
- end
- end
- SC = sum(McAd) ;
- SL = sum(transpose(McAd)) ;
- for j=1:32 ;
- SLd(1,j) = SL(1,j+32);
- end
- S = max(SL) ;
- C = SL / S ;
- for i=1:32
Advertisement
Add Comment
Please, Sign In to add comment