how to display the output?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hai, As a part of my project i want to calculate the dct of given image and compute the inverse dct to get back the original image. And the invrese transformed image undergo some attacks like awgn and the histogram equalization etc. But i couldn't display the output properly getting a white image in the figure...how can I get the original image in figure.code is below.
I=imread('pout.tif');
k=dct2(I);
L=idct2(k);
attack=histeq(L);
figure;imshow(attack)
channel=awgn(L,40);
figure;imshow(channel);
0 Commenti
Risposte (2)
Guillaume
il 5 Dic 2014
What is the type of your image? And what is the range of intensities in that image.
Possibly your image is of type double while the intensities are in the range 0-255. In which case if you call imshow with just the image you'll get a mostly white image as imshow assumes an intensity range of 0-1 for double images.
If that is the case, either pass the intensity range to imshow (or [] to use min-max of your image), or divide your image by the max intensity:
imshow(attack, []); %or
imshow(attack/255);
Vedere anche
Categorie
Scopri di più su Histograms in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!