Get from Ico-github-logo

Highlights from
SC - powerful image rendering

  • autumn(varargin)
    AUTUMN Red-yellow colormap
  • bled(varargin)
    BLED Black to red variation of the hsv colormap
  • bone(varargin)
    BONE Black-blue-white colormap
  • bright(varargin)
    BRIGHT Black-bright-white colormap
  • cold(varargin)
    COLD Black-blue-cyan-white colormap
  • colormap_helper(map, len,...
    COLORMAP_HELPER Helper function for colormaps
  • cool(varargin)
    COOL Cyan-magenta colormap
  • copper(varargin)
    COPPER Black-copper colormap
  • copper2(varargin)
    COPPER2 Black-copper-white colormap
  • disco(varargin)
    DISCO High contrast colormap with strong gradient discontinuities
  • disparity(varargin)
    DISPARITY High contrast colormap with subtle gradient discontinuities
  • dusk(varargin)
    DUSK Black-blue-green-gray-red-yellow-white colormap
  • earth(varargin)
    EARTH Black-green-white colormap
  • gray(varargin)
    GRAY Black-white colormap
  • hicontrast(varargin)
    HICONTRAST Black-blue-red-magenta-green-cyan-yellow-white colormap
  • hot(varargin)
    HOT Black-red-yellow-white colormap
  • hsv(varargin)
    HSV Red-yellow-green-cyan-blue-magenta-red colormap
  • hsv2(varargin)
    HSV2 Black to red variation of the hsv colormap
  • imdisp(I, varargin)
    IMDISP Display one or more images nicely
  • imsc(varargin)
    IMSC Wrapper function to SC which replicates display behaviour of IMAGESC
  • jet(varargin)
    JET Variant of HSV colormap
  • pastel(varargin)
    PASTEL Black-pastel-white colormap
  • pink(len, varargin)
    PINK Black-pink-white colormap
  • pink2(varargin)
    PINK2 Black-pink-white colormap
  • real2rgb(A, cmap, lims)
    REAL2RGB Converts a real-valued matrix into a truecolor image
  • rescale(A, lims, out_lims)
    RESCALE Linearly rescale values in an array
  • sc(I, varargin)
    SC Display/output truecolor images with a range of colormaps
  • sepia(varargin)
    SEPIA Black-brown-white colormap
  • spring(varargin)
    SPRING Magenta-yellow colormap
  • summer(varargin)
    SUMMER Green-yellow colormap
  • temp(varargin)
    TEMP Blue-pale-dark red colormap
  • thermal(varargin)
    THERMAL Black-purple-red-yellow-white colormap
  • whed(varargin)
    WHED White to red variation of the hsv colormap
  • winter(varargin)
    WINTER Blue-green colormap
  • View all files
image thumbnail

SC - powerful image rendering

by

 

04 Sep 2007 (Updated )

Useful tool for rendering and outputting information rich images

disparity(varargin)
%DISPARITY  High contrast colormap with subtle gradient discontinuities
%
% Examples:
%   map = disparity;
%   map = disparity(len);
%   B = disparity(A);
%   B = disparity(A, lims);
%
% A colormap designed for depth and disparity maps. It has subtle gradient
% discontinuities to bring out contours, and maximizes the range of colors
% used in order to improve contrast between intensity levels. It converts
% linearly to grayscale, such that black & white prints come out nicely.
%
% The function can additionally be used to convert a real valued array into
% a truecolor array using the colormap.
%
% IN:
%   len - Scalar length of the output colormap. If len == Inf the concise
%         table is returned. Default: len = size(get(gcf, 'Colormap'), 1);
%   A - Non-scalar numeric array of real values to be converted into
%       truecolor.
%   lims - 1x2 array of saturation limits to be used on A. Default:
%          [min(A(:)) max(A(:))].
%
% OUT:
%   map - (len)xJ colormap table. J = 3, except in the concise case, when
%         J = 4, map(1:end-1,4) giving the relative sizes of the 
%         inter-color bins.
%   B - size(A)x3 truecolor array.

% Copyright: Oliver Woodford, 2012

function map = disparity(varargin)
map = [            0                   0                   0   1.000000000000000; ...
                   0                   0   0.548245614035088                   0; ...
   0.105761794654448   0.000000000000013   0.270852836827302   1.000000000000000; ...
   0.059459459459459                   0   0.940540540540541                   0; ...
   0.162903903427862   0.002287878882682   0.657445157639783   1.000000000000000; ...
   0.366693676801250   0.059947169013601   0.374294758117918                   0; ...
   0.397297297297297                   0   0.602702702702703   1.000000000000000; ...
   0.735135135135135                   0   0.264864864864865                   0; ...
   0.619346855510299   0.046614971192608   0.328528965897891   1.000000000000000; ...
   1.000000000000000                   0   0.118421052631579                   0; ...
   0.878236661421783   0.026878650964249   0.299381316832219   1.000000000000000; ...
   0.879983391744831   0.020603479222390   0.875357224252214                   0; ...
   1.000000000000000                   0   0.666666666666667   1.000000000000000; ...
   0.859195402298851   0.140804597701150   0.859195402298851                   0; ...
   0.796752292660960   0.203005124169332   0.702693479008556   1.000000000000000; ...
   0.500000000000000   0.500000000000000   0.500000000000000                   0; ...
   0.591584728266931   0.512311475905112   0.196397630630585   1.000000000000000; ...
   0.140804597701149   0.859195402298851   0.140804597701149                   0; ...
   0.237154669316016   0.801555080604367   0.184894048769717   1.000000000000000; ...
                   0   1.000000000000000   0.333333333333334                   0; ...
   0.099802756002636   0.943534783080114   0.362316300764779   1.000000000000000; ...
                   0   1.000000000000000   0.881578947368421                   0; ...
   0.122068579355955   0.967299920607226   0.729793345404631   1.000000000000000; ...
   0.264864864864865   1.000000000000000   0.735135135135135                   0; ...
   0.371207986455179   0.946429224305391   0.732060152479271   1.000000000000000; ...
   0.602702702702703   1.000000000000000   0.397297297297297                   0; ...
   0.626666491156471   0.941072277957457   0.637870982308667   1.000000000000000; ...
   0.940540540540541   1.000000000000000   0.059459459459459                   0; ...
   0.842450533320871   0.992890454106401   0.353338543654404   1.000000000000000; ...
   0.894238205345540   0.999999999999999   0.729147163172666                   0; ...
   1.000000000000000   1.000000000000000   0.451754385964912   1.000000000000000; ...
   1.000000000000000   1.000000000000000   1.000000000000000                   0];
map = colormap_helper(map, varargin{:});

Contact us