Changeset 12392


Ignore:
Timestamp:
06/08/12 12:20:34 (13 years ago)
Author:
Mathieu Morlighem
Message:

Fixed saturation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/model/plot/plot_overlay.m

    r12391 r12392  
    113113else
    114114        colorm = getcolormap(options);
    115         len = size(colorm,1);
     115        len    = size(colorm,1);
     116        size(colorm)
    116117
    117         ind = round((len-1)*(data_grid-data_min)/(data_max - data_min + eps) +1);
     118        ind = ceil((len-1)*(data_grid-data_min)/(data_max - data_min + eps) +1);
    118119        ind(find(ind>len))=len;
     120        max(ind(:))
    119121        image_rgb=zeros(size(data_grid,1),size(data_grid,2),3);
    120122        r=colorm(:,1); image_rgb(:,:,1)=r(ind); clear r;
     
    125127        image_hsv=rgb2hsv(image_rgb);
    126128        radar = (md.radaroverlay.pwr).^(contrast);
    127         h=radar/max(radar(:));
     129        h=image_hsv(:,:,3);
     130        h=h.*radar/max(radar(:));
    128131        image_hsv(:,:,3)=h;
    129132        s=image_hsv(:,:,2);
Note: See TracChangeset for help on using the changeset viewer.