imshow() displays a white image for a grey image

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了imshow() displays a white image for a grey image相关的知识,希望对你有一定的参考价值。

Matlab expects images of type double to be in the 0..1 range and images that are uint8 in the 0..255 range. You can convert the range yourself (but change values in the process), do an explicit cast (and potentially loose precision) or instruct Matlab to use the minimum and maximum value found in the image matrix as the white and black value to scale to when visualising.

See the following example with an uint8 image present in Matlab:

im = imread(‘moon.tif‘);
figure; imshow(im);
figure; imshow(double(im));
figure; imshow(double(im), []);
figure; imshow(im2double(im));

use imshow(uint8(image)); on the image before displaying it.

以上是关于imshow() displays a white image for a grey image的主要内容,如果未能解决你的问题,请参考以下文章

white-space: nowrap; 元素获取不到真实宽度

Matlab常用图像处理命令108例

a标签截字

CSS 宝典

display: flex;

labview 怎么删除ROI范围内的图像,例如删除图片中的白点?