how to display the output?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Guillaume
2014 年 12 月 5 日
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);
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!