[go: nahoru, domu]

Vés al contingut

Fitxer:Dandelion clock quarter dft dct.png

El contingut de la pàgina no s'admet en altres llengües.
De la Viquipèdia, l'enciclopèdia lliure

Fitxer original(1.140 × 1.428 píxels, mida del fitxer: 542 Ko, tipus MIME: image/png)

Descripció a Commons

Resum

Descripció the picture shows the difference between the DFT and a DCT of an image
Data
Font I made it by myself
Autor Alessio Damato
Permís
(Com reutilitzar aquest fitxer)
multilicensed (see below)
Altres versions the original image that was processed was Image:Dandelion_clock.jpg

I used Image:Dandelion_clock.jpg to create this image. I wanted to show clearly the different behavior between the DFT and the DCT in the frequency domain.

The pictures are made of other figures. The first one on the top is just the original image: I used its gray-scale version. On the second line there is the DFT: its magnitude on the left, its histogram on the right. On the third line there is the DCT, with both magnitude and histogram.

The spectrum of the DFT has cropped so that the lowest frequencies are on the top-left of the picture, just like in the DCT. It is not such a rigorous process: the DFT in general is composed of two symmetric halves, but I put on the picture just one quarter, thus removing one quarter of necessary information. I did so to create an output that could be easily be compared with the DCT. Because of symmetry, I cropped to 1/4 the DCT as well, keeping the lower frequencies. Anyway it is clear how the DCT concentrates most of the energy into the lowest frequencies.

I created the single images with the following Matlab code:

% read the image
RGB = imread('Dandelion_clock.jpg');
% convert pixels to the [0 1] range
RGB = im2double(RGB);
% convert to grayscale
I = rgb2gray(RGB);

% calculate the size of the image and then divide
% by two, in order to crop it later
[X Y] = size(I);
Y = round(Y/2);
X = round(X/2);

% evaluate magnitude of the DFT
F = abs(fft2(I));
% take only a quarter
F = imcrop(F,[0 0 Y X]);
% use log scale
F = log(1 + F);
F = log(1 + F);
% normalize
F = F/max(F(:));

% evaluate magnitude of the DCT
C = abs(dct2(I));
% take only a quarter
C = imcrop(C,[0 0 Y X]);
% use log scale
C = log(1 + C);
C = log(1 + C);
% normalize
C = C/max(C(:));

% show all the results
imshow(F), colorbar, colormap(jet);
figure, imhist(F);
figure, imshow(C), colorbar, colormap(jet);
figure, imhist(C);

First it imports the RGB image and converts it to gray-scale. Then calculates the magnitude of both the transforms. Both pictures had a huge dynamic, so I calculated the logarithm of both, twice, in order to be able to show the transforms properly. Once all the pictures were shown on the screen, I just selected File -> Save as on Matlab to save all the pictures. I put them all together using Gimp.

(comment by RCL) I cant speak english very well, but I'm going to try it. The use of this code it's WRONG, we can't use this MATLAB code for comparing both transforms, because in MATLAB the definition of the DFT isn't normalized and the definition of the DCT in MATLB it's normalized. So we should multiply the result of the fft by a factor of 1.0/N², before we use the function abs. The result between the DFT and the DCT is very similar if we do this, but we can obtain the shannon entropy of the energy of both transforms and the result is that the entropy of the energy in the DCT is lower than the DFT, for that reason we say that the DCT compact the energy more than the DFT. I made my master thesis on the DCT.

Llicència

Jo, el titular dels drets d'autor d'aquest treball, el public sota les següents llicències:
GNU head S'autoritza la còpia, la distribució i la modificació d'aquest document sota els termes de la llicència de documentació lliure GNU versió 1.2 o qualsevol altra versió posterior que publiqui la Free Software Foundation; sense seccions invariants, ni textos de portada, ni textos de contraportada. S'inclou una còpia d'aquesta llicència en la secció titulada GNU Free Documentation License.
w:ca:Creative Commons
reconeixement compartir igual
Aquest fitxer està subjecte a la llicència de Creative Commons Reconeixement i Compartir Igual 3.0 No adaptada.
Sou lliure de:
  • compartir – copiar, distribuir i comunicar públicament l'obra
  • adaptar – fer-ne obres derivades
Amb les condicions següents:
  • reconeixement – Heu de donar la informació adequada sobre l'autor, proporcionar un enllaç a la llicència i indicar si s'han realitzat canvis. Podeu fer-ho amb qualsevol mitjà raonable, però de cap manera no suggereixi que l'autor us dóna suport o aprova l'ús que en feu.
  • compartir igual – Si modifiqueu, transformeu, o generareu amb el material, haureu de distribuir les vostres contribucions sota una llicència similar o una de compatible com l'original
Aquest avís de llicència s'ha afegit a aquest fitxer d'acord amb l'actualització de la llicència GFDL.
w:ca:Creative Commons
reconeixement compartir igual
Aquest fitxer està llicenciat sota les llicències de Creative Commons Reconeixement - CompartirIgual 2.5 Genèrica, 2.0 Genèrica i 1.0 Genèrica.
Sou lliure de:
  • compartir – copiar, distribuir i comunicar públicament l'obra
  • adaptar – fer-ne obres derivades
Amb les condicions següents:
  • reconeixement – Heu de donar la informació adequada sobre l'autor, proporcionar un enllaç a la llicència i indicar si s'han realitzat canvis. Podeu fer-ho amb qualsevol mitjà raonable, però de cap manera no suggereixi que l'autor us dóna suport o aprova l'ús que en feu.
  • compartir igual – Si modifiqueu, transformeu, o generareu amb el material, haureu de distribuir les vostres contribucions sota una llicència similar o una de compatible com l'original
Podeu seleccionar la llicència que vulgueu.

Llegendes

Afegeix una explicació d'una línia del que representa aquest fitxer

Elements representats en aquest fitxer

representa l'entitat

amb drets d'autor<\/a>"}},"text\/plain":{"ca":{"P6216":"amb drets d'autor"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P6216 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
Creative Commons Reconeixement-CompartirIgual 3.0 No adaptada<\/a>"}},"text\/plain":{"ca":{"P275":"Creative Commons Reconeixement-CompartirIgual 3.0 No adaptada"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":19113751,\"id\":\"Q19113751\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"ca":{"P275":"Creative Commons Atribuci\u00f3 - Compartir Igual 2.5 Gen\u00e8ric<\/a>"}},"text\/plain":{"ca":{"P275":"Creative Commons Atribuci\u00f3 - Compartir Igual 2.5 Gen\u00e8ric"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":19068220,\"id\":\"Q19068220\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"ca":{"P275":"Creative Commons Atribuci\u00f3 - Compartir Igual 2.0 Gen\u00e8ric<\/a>"}},"text\/plain":{"ca":{"P275":"Creative Commons Atribuci\u00f3 - Compartir Igual 2.0 Gen\u00e8ric"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":50829104,\"id\":\"Q50829104\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"ca":{"P275":"GNU Free Documentation License, version 1.2 or later<\/a>\u00a0angl\u00e8s<\/sup>"}},"text\/plain":{"ca":{"P275":"GNU Free Documentation License, version 1.2 or later"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":47001652,\"id\":\"Q47001652\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"ca":{"P275":"Creative Commons Atribuci\u00f3 - Compartir Igual 1.0 Gen\u00e8ric<\/a>"}},"text\/plain":{"ca":{"P275":"Creative Commons Atribuci\u00f3 - Compartir Igual 1.0 Gen\u00e8ric"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P275 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
m\u00e8tode de determinaci\u00f3<\/a>"}},"text\/plain":{"ca":{"":"m\u00e8tode de determinaci\u00f3"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":13414952,\"id\":\"Q13414952\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"ca":{"P459":"Secure Hash Algorithm 1<\/a>"}},"text\/plain":{"ca":{"P459":"Secure Hash Algorithm 1"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P4092 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

554.552 byte

1.428 píxel

1.140 píxel

Historial del fitxer

Cliqueu una data/hora per veure el fitxer tal com era aleshores.

Data/horaMiniaturaDimensionsUsuari/aComentari
actual20:50, 13 maig 2006Miniatura per a la versió del 20:50, 13 maig 20061.140 × 1.428 (542 Ko)Alejo2083 == Summary == {{Information| |Description= the picture shows the difference between the DFT and a DCT of an image |Source= I made it by myself |Date= 13/05/2006 |Author= Alessio Damato |Permission= multilicensed (see below) |other_versions= the original

La pàgina següent utilitza aquest fitxer:

Ús global del fitxer

Utilització d'aquest fitxer en altres wikis: