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!
