{"id":178,"date":"2020-12-04T00:17:15","date_gmt":"2020-12-04T00:17:15","guid":{"rendered":"http:\/\/med-space.org\/youssef-zaz-master\/?page_id=178"},"modified":"2020-12-16T19:03:05","modified_gmt":"2020-12-16T19:03:05","slug":"transformee-fourier","status":"publish","type":"page","link":"https:\/\/yzaz.net\/master\/transformee-fourier\/","title":{"rendered":"Transform\u00e9e de Fourier pour images"},"content":{"rendered":"<h3>Transform\u00e9e de Fourier<\/h3>\n<p>La transform\u00e9e de Fourier permet la d\u00e9composition d&#8217;un signal f en combinaison lin\u00e9aire de sinuso\u00efdes complexes<br \/>\n\u2022 Les coefficients F[u,v] dit coefficients de Fourier, fournissent des informations sur les fr\u00e9quences (u,v) et permettent des manipulations dans le domaine fr\u00e9quentiel<\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-586 \" src=\"http:\/\/med-space.org\/youssef-zaz-master\/wp-content\/uploads\/2020\/12\/TF.png\" alt=\"\" width=\"450\" height=\"221\" \/><\/h3>\n<h3>Transformation de Fourier discr\u00e8te<\/h3>\n<p>On appelle la fonction F(u,v) le spectre<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-587 \" src=\"http:\/\/med-space.org\/youssef-zaz-master\/wp-content\/uploads\/2020\/12\/TF-D.png\" alt=\"\" width=\"452\" height=\"140\" \/><\/p>\n<p><strong>Code Matlab:<\/strong><\/p>\n<pre class=\"brush: matlabkey; title: ; notranslate\" title=\"\">\r\n[f, p]=uigetfile('*','selection de fichier');\r\nS=imread(fullfile(p,f));\r\nsubplot(1,3,1); imshow (S);  title ( 'Image originale');\r\nFS=fft2(double(S)); \r\nmodule=abs(fftshift(FS)); \r\nMax=max(max(max(abs(module))));\r\nsubplot(1,3,2), imshow(module *255 \/Max);colormap gray ; title ( 'Spectre d''amplitude');\r\nphase=angle(fftshift(FS)); \r\nsubplot(1,3,3); imshow(phase,[-pi,pi]); colormap gray; title ( 'Spectre de phase');\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-583 size-full aligncenter\" src=\"http:\/\/med-space.org\/youssef-zaz-master\/wp-content\/uploads\/2020\/12\/fourier-1.jpg\" alt=\"\" width=\"728\" height=\"260\" srcset=\"https:\/\/yzaz.net\/master\/wp-content\/uploads\/2020\/12\/fourier-1.jpg 728w, https:\/\/yzaz.net\/master\/wp-content\/uploads\/2020\/12\/fourier-1-300x107.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" \/><\/p>\n<pre><strong>Exemple d'utilisation de la Transform\u00e9e de Fourier:<\/strong>\r\nMixer 2 images: L'amplitude de l'image A et la phase de l'image B.<\/pre>\n<pre class=\"brush: matlabkey; title: ; notranslate\" title=\"\">\r\nimageA = imread('imA.jpg'); \r\nimageB = imread('imB.jpg'); \r\nfftA = fft2(double(imageA));\r\nfftB = fft2(double(imageB));\r\nfftC = abs(fftA).*exp(1i*angle(fftB));\r\nfftD = abs(fftB).*exp(1i*angle(fftA)); \r\nfftE= abs(fftA).*exp(1i*angle(fftA));\r\nfftF= abs(fftB).*exp(1i*angle(fftB));\r\nimageC = ifft2(fftC);\r\nimageD = ifft2(fftD);\r\nimageE = ifft2(fftE);\r\nimageF = ifft2(fftF);\r\n%Calculate limits for plotting\r\ncmin = min(min(min(abs(imageC))));\r\ncmax = max(max(max(abs(imageC))));\r\ndmin = min(min(min(abs(imageD))));\r\ndmax = max(max(max(abs(imageD))));\r\nsubplot (2,3,1), imshow(imageA), title('Image originale A');\r\nsubplot (2,3,2), imshow(imageB), title('Image originale B');\r\nsubplot (2,3,3), imshow(abs(imageC\/255), [cmin cmax]), colormap gray, title('Amplitude A avec phase B');\r\nsubplot (2,3,4), imshow(abs(imageD\/255), [cmin cmax]), colormap gray, title('Amplitude B avec phase A');\r\nsubplot (2,3,5), imshow(abs(imageE\/255), [cmin cmax]), colormap gray, title('image A reconstruite');\r\nsubplot (2,3,6), imshow(abs(imageF\/255), [cmin cmax]), colormap gray, title('image B reconstruite');\r\n<\/pre>\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-631 size-full\" src=\"http:\/\/med-space.org\/youssef-zaz-master\/wp-content\/uploads\/2020\/12\/fourrier2.jpg\" alt=\"\" width=\"988\" height=\"567\" srcset=\"https:\/\/yzaz.net\/master\/wp-content\/uploads\/2020\/12\/fourrier2.jpg 988w, https:\/\/yzaz.net\/master\/wp-content\/uploads\/2020\/12\/fourrier2-300x172.jpg 300w, https:\/\/yzaz.net\/master\/wp-content\/uploads\/2020\/12\/fourrier2-768x441.jpg 768w\" sizes=\"(max-width: 988px) 100vw, 988px\" \/><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Transform\u00e9e de Fourier La transform\u00e9e de Fourier permet la d\u00e9composition d&#8217;un signal f en combinaison lin\u00e9aire de sinuso\u00efdes complexes \u2022 Les coefficients F[u,v] dit coefficients <a class=\"mh-excerpt-more\" href=\"https:\/\/yzaz.net\/master\/transformee-fourier\/\" title=\"Transform\u00e9e de Fourier pour images\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":80,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/yzaz.net\/master\/wp-json\/wp\/v2\/pages\/178"}],"collection":[{"href":"https:\/\/yzaz.net\/master\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/yzaz.net\/master\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/yzaz.net\/master\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yzaz.net\/master\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":7,"href":"https:\/\/yzaz.net\/master\/wp-json\/wp\/v2\/pages\/178\/revisions"}],"predecessor-version":[{"id":635,"href":"https:\/\/yzaz.net\/master\/wp-json\/wp\/v2\/pages\/178\/revisions\/635"}],"wp:attachment":[{"href":"https:\/\/yzaz.net\/master\/wp-json\/wp\/v2\/media?parent=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}