how to display the output?

1 visualización (últimos 30 días)
Neethu
Neethu el 5 de Dic. de 2014
Respondida: Neethu el 5 de Dic. de 2014
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);

Respuestas (2)

Guillaume
Guillaume el 5 de Dic. de 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);
  1 comentario
Neethu
Neethu el 5 de Dic. de 2014
thank you.Now i can display the output figure..But when channel=awgn(L,0); in above code coludnt produce the noise affected specially the random out put?what is the reason?

Iniciar sesión para comentar.


Neethu
Neethu el 5 de Dic. de 2014
clc close all clear all
I=imread('cameraman.tif'); k=dct2(I); L=idct2(k);
channel=awgn(L,0); figure;imshow(channel,[]);
while running this code didnt get the noise affected version of image (L)..how to get the noise affected image?

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by