imshow(I,[low high]) 显示的图像的矩阵怎么得出?是跟I的矩阵一样吗?imshow(I,[ ]) 显示的图像的矩阵怎么得出?是跟 I 的矩阵一样吗?matlab图像处理问题,

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/05 10:46:50
imshow(I,[low high]) 显示的图像的矩阵怎么得出?是跟I的矩阵一样吗?imshow(I,[ ]) 显示的图像的矩阵怎么得出?是跟 I 的矩阵一样吗?matlab图像处理问题,

imshow(I,[low high]) 显示的图像的矩阵怎么得出?是跟I的矩阵一样吗?imshow(I,[ ]) 显示的图像的矩阵怎么得出?是跟 I 的矩阵一样吗?matlab图像处理问题,
imshow(I,[low high]) 显示的图像的矩阵怎么得出?是跟I的矩阵一样吗?
imshow(I,[ ]) 显示的图像的矩阵怎么得出?是跟 I 的矩阵一样吗?matlab图像处理问题,

imshow(I,[low high]) 显示的图像的矩阵怎么得出?是跟I的矩阵一样吗?imshow(I,[ ]) 显示的图像的矩阵怎么得出?是跟 I 的矩阵一样吗?matlab图像处理问题,
imshow(I,[low high]) ,用指定的灰度范围 [low high]显示灰度图像 I.显示结果,图像中灰度值等于或低于low的都将用黑色显示,而灰度值大于等于high的都显示为白色,介于low和high之间的用其灰度级的默认值的中间色调显示.
如果你用了一个空矩阵 ([]) 来代替 [low high],imshow 函数将使用 [min(I(:))max(I(:))]作为第二个参数.
imshow(I,[low high]) 显示的图像的矩阵,跟I的矩阵不一定一样(除非low=0,high=255),可以用如下代码得到imshow(I,[low high]) 显示的图像的矩阵.
A=imread(I);
[m,n]=size(A);
for i=1:m
for j=1:n
if A(i,j)=high
A(i,j)=255;
end
end
end
end
这样得到的矩阵A就是imshow(I,[low high]) 显示的图像的矩阵.(同理,将代码中low,high分别换成min(I(:)),及max(I(:)))就得到imshow(I,[ ]) 显示的图像的矩阵.
附matlab中imshow函数的英文解释:
IMSHOW(I,[LOW HIGH]) displays I as a grayscale intensity image,specifying the data range for I.The value LOW (and any value less than LOW)displays as black,
the value HIGH (and any value greater than HIGH) displays as white,
and values in between display as intermediate shades of gray.
IMSHOW uses the default number of gray levels.If you use an empty matrix ([]) for [LOW HIGH],IMSHOW uses [min(I(:)) max(I(:))]; the minimum value in I displays as black,and the maximum value displays as white.