Help with gray scale images
1 回表示 (過去 30 日間)
古いコメントを表示
I have a gray scale image which I after thresholding and histogram equalization write using imwrite. But when I read back this stored image, the gray scale values change. 255 changes to 63 and so on. The data type I am using in imread is uint8 type and if I use double, the entire image is white except the pixels having 0 value. I am unable to store the intermediate images. Please can anyone tell me why this is so?
Thanks in advance
0 件のコメント
採用された回答
Sean de Wolski
2011 年 6 月 9 日
If you could show us the code with a sample image (e.g. 'cameraman.tif') it would help us.
More than likely when you're viewing it as double, the view range is set from [0 1] so everything 1 or greater (all values in uint8) appear white. Use the second input argument to imshow to change this, e.g:
Igraydouble = double(imread('cameraman.tif'));
figure;
subplot(121)
imshow(Igraydouble)
subplot(122)
imshow(Igraydouble,[])
7 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Red についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!