How to display MR image of type double with Matlab ?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello, I want to display MR image of type double with [384,384] as size. I used
imshow(inputImage,[])
But it does change the gray value intensity of the inputImage.
Any help please ?
Thanks.
0 件のコメント
回答 (1 件)
Majid Farzaneh
2018 年 5 月 17 日
編集済み: Majid Farzaneh
2018 年 5 月 17 日
Hello, You can use this for resize image as [384,384]:
I=imresize(inputImage,[384,384]);
imshow(I);
but if your image is double you can use this to make it grayscale:
I=uint8(inputImage);
imshow(I);
if your original image is rgb you can use this to make it gray:
I=rgb2gray(inputImage);
2 件のコメント
Majid Farzaneh
2018 年 5 月 17 日
Your welcome. In the gray-scale mode of images, pixel intensity values must be between 0-255. If your pixel values of double image has a range out of 0-255, normalize your image first, then use uint8. You can use this for normalization:
I= (inputImage-min(min(inputImage))) / (max(max(inputImage)) - min(min(inputImage)));
I=uint8(I);
imshow(I);
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!