matlab imagesc jet,matlab imagesc

该博客介绍了MATLAB中imagesc函数的使用,特别是如何通过CLIM参数进行颜色归一化,将图像数据映射到JET颜色空间。JET颜色模式从深蓝到深红,博客展示了不同数据范围如何在图像上呈现不同的颜色。通过实例,解释了如何将数据值10到60缩放到灰度 colormap 的全范围内。
摘要由CSDN通过智能技术生成

imagesc Scale data and display as image.

imagesc(...) is the same as IMAGE(...) except the data is scaled

to use the full colormap.

imagesc(...,CLIM) where CLIM = [CLOW CHIGH] can specify the

scaling.

其中,imagesc(...,CLIM),将图像颜色归一化至[CLOW CHIGH],其中颜色模式是JET,也即颜色空间是从深蓝到深红色!

r          g        b

0         0    0.5625

0         0    0.6250

0         0    0.6875

0         0    0.7500

0         0    0.8125

0         0    0.8750

0         0    0.9375

0         0    1.0000

0    0.0625    1.0000

0    0.1250    1.0000

0    0.1875    1.0000

0    0.2500    1.0000

0    0.3125    1.0000

0    0.3750    1.0000

0    0.4375    1.0000

0    0.5000    1.0000

0    0.5625    1.0000

0    0.6250    1.0000

0    0.6875    1.0000

0    0.7500    1.0000

0    0.8125    1.0000

0    0.8750    1.0000

0    0.9375    1.0000

0    1.0000    1.0000

0.0625    1.0000    0.9375

0.1250    1.0000    0.8750

0.1875    1.0000    0.8125

0.2500    1.0000    0.7500

0.3125    1.0000    0.6875

0.3750    1.0000    0.6250

0.4375    1.0000    0.5625

0.5000    1.0000    0.5000

0.5625    1.0000    0.4375

0.6250    1.0000    0.3750

0.6875    1.0000    0.3125

0.7500    1.0000    0.2500

0.8125    1.0000    0.1875

0.8750    1.0000    0.1250

0.9375    1.0000    0.0625

1.0000    1.0000         0

1.0000    0.9375         0

1.0000    0.8750         0

1.0000    0.8125         0

1.0000    0.7500         0

1.0000    0.6875         0

1.0000    0.6250         0

1.0000    0.5625         0

1.0000    0.5000         0

1.0000    0.4375         0

1.0000    0.3750         0

1.0000    0.3125         0

1.0000    0.2500         0

1.0000    0.1875         0

1.0000    0.1250         0

1.0000    0.0625         0

1.0000         0         0

0.9375         0         0

0.8750         0         0

0.8125         0         0

0.7500         0         0

0.6875         0         0

0.6250         0         0

0.5625         0         0

0.5000         0         0

Examples

If the size of the current colormap is 81-by-3, the statements

clims = [ 10 60 ]

imagesc(C,clims)

map the data values in C to the colormap as shown in this illustration.

0818b9ca8b590ca3270a3433284dd417.png

In this example, the left image maps to the gray colormap using the statements

imagesc(X)

colormap(gray)

load clown

The right image has values between 10 and 60 scaled to the full range of the gray colormap using the statements

imagesc(X,clims)

colormap(gray)

0818b9ca8b590ca3270a3433284dd417.png

load clownclims = [10 60];

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值