matlab imagesc

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.

matlab imagesc_第1张图片

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

  • load clown
    imagesc(X)
    colormap(gray)
    

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

  • load clown
    clims = [10 60];
    imagesc(X,clims)
    colormap(gray)
    
    
    matlab imagesc_第2张图片
    

你可能感兴趣的:(matlab imagesc)