Gallad

Untitled

Mar 20th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. %Lecture de l'image
  2. img = imread('A.bmp')
  3. %Conversion en nuances de gris
  4. It = rgb2gray(img)
  5. %Division par 255 de chaque valeur
  6. it = double(It)/255
  7. %Placement
  8. subplot(3,3,1)
  9. %Affichage de l'image
  10. imshow(img)
  11. title('Image A')
  12. subplot(3, 3, 4)
  13. %Affichage du module
  14. modA = mat2gray(log(abs(fftshift(fft2(it)))+1));
  15. imshow(modA,[]);
  16. title('Module centré de A')
  17. subplot(3, 3, 7)
  18. %Affichage de la phase centrée
  19. imshow(fftshift(angle(fftshift(fft2(it)))))
  20. title('phase centrée de A')
  21.  
  22. M = fftshift(modA)
  23.  
  24. for j=1:32
  25. for i=1:64
  26. Ma(i,j) = M(i,j);
  27. Ma(i,j) = M(i,j+32);
  28. end
  29. end
  30. SC = sum(McAd) ;
  31. SL = sum(transpose(McAd)) ;
  32. for j=1:32 ;
  33. SLd(1,j) = SL(1,j+32);
  34. end
  35. S = max(SL) ;
  36. C = SL / S ;
  37.  
  38. for i=1:32
Advertisement
Add Comment
Please, Sign In to add comment