How to display MR image of type double with Matlab ?

조회 수: 3 (최근 30일)
MMSAAH
MMSAAH 2018년 5월 17일
댓글: Majid Farzaneh 2018년 5월 17일
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.

답변 (1개)

Majid Farzaneh
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
MMSAAH
MMSAAH 2018년 5월 17일
Thank you for your reply.
I've tried all of your suggestions but this still change the gray value intensity of the inputImage. Because when comparing the image shown by matlab with the image shown by ITKsnap, I find a very big difference between two images.
Majid Farzaneh
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);

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by