matlab 互换 函数,matlab相关函数(matlab相关函数).doc

matlab相关函数(matlab相关函数)

matlab相关函数(matlab相关函数)

% imshow

Imshow is used to display pictures, such as

"I = imread ('moon.tif')";

> figure, imshow (I);

Sometimes, in order to process data, the read picture information is converted to higher precision,

"I = Double" (imread ('moon.tif'));

In order to ensure accuracy, after the operation of the image matrix I, the data type will change from Unit8 to double. If you run imshow (I) directly, we'll see a white image. This is because when imshow () displays the image, the double is thought to be white in the 0~1 range, or greater than 1, while the imshow shows the 0~255 range when the uint8 type is displayed. The double data passing through the range of 0-255 is abnormally displayed as a white image.

There are two solutions:

1> imshow (I/256); - transforms an image matrix to 0-1

2> imshow (I, []); - automatically adjust the range of data for display.

From the experimental results, the two methods have solved the problem, but from the image shown, the second methods show a strong picture of black and white contrast!

+++++++++++++++++++++++++++++++++++++++

IMSHOW (I), displays, the, grayscale, image, I.

IMSHOW (I [LOW HIGH]) displays the grayscale image I, specifying the display range for I in [LOW HIGH]. The value LOW (and any value less than LOW displays as black), the value HIGH (and any value greater than HIGH displays white. Values in) as between are displayed as intermediate shades of gray, using the default number of gray levels.

If you use an empty matrix (for[LOW HIGH] IMSHOW uses []), [min (I (:) (max) (I: that))]; is the, minimum value in I is displayed as black, and the maximum value is displayed as white.

+++++++++++++++++++++++++++++++++++++++

The image is y, why is imshow (uint8 (y)) and imshow (y, []) when the images show different results?

Answer:

Imshow (uint8 (y)) is in accordance with the 256 gray scale display, y absolute data. 0 stands for black, 255 means white, and values greater than 255 in y are forced to 255.

Imshow (y, y, []

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值