これが私の解決策です。ヒストグラム画像強度。ゼロに最も近いものを見つけてから、白に設定します。例えば:
m=peaks(100); % generate data
imagesc(m);
colormap_range=64; % default colormap_range is 64, but change it to your needs
[n,xout] =hist(m(:),colormap_range); % hist intensities according to the colormap range
[val ind]=sort(abs(xout)); % sort according to values closest to zero
j = jet;
j(ind(1),:) = [ 1 1 1 ]; % also see comment below
% you can also use instead something like j(ind(1:whatever),:)=ones(whatever,3);
colormap(j);
の代わりにsort
を使用できますがmin
、ソートすることで、そのレベル以上の行を追加して編集することもできると思いましたj(ind(1:3),:)=ones(3);
。以下の添付図は、これを使用して作成されました...
