How to Implement an “imshow” function?
이전 댓글 표시
How to Implement an “imshow” function by transforming the range [min, max] on the gray scale into the interval determined by 0 ≤ a, b ≤ 1? I need use variables and it should be suitable for any image not particular. Thank you!
채택된 답변
추가 답변 (3개)
Image Analyst
2018년 12월 2일
To display a gray scale image without changing the values of the array, but only changing the displayed values, do this:
imshow(grayImage, []);
To change the actual matrix, use mat2gray():
% Scale grayImage to between 0 and 1: min goes to 0, max goes to 1
grayImage = mat2gray(grayImage);
댓글 수: 5
Anna Nazarova
2018년 12월 3일
Anna Nazarova
2018년 12월 8일
편집: Image Analyst
2018년 12월 9일
Image Analyst
2018년 12월 9일
Not sure what you're asking.
imshow(grayImage, []);
works, as does
imshow(imadjust(grayImage));
The [] are not needed if you use imadjust since the output of imadjust is already scaled from 0 to 255.
Anna Nazarova
2018년 12월 9일
Image Analyst
2018년 12월 9일
Yes, you can find it here
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
