double2rgb

Converts an array of double (2D or 3D) to an RGB image using specified colormap
1,6K Downloads
Aktualisiert 2. Feb 2011

Lizenz anzeigen

Computes the min and max values within the input array, convert to 256 values, and apply a colormap to produce a color image (RGB).

It is possible to specifies the range of values to consider, as well as the background color (used for NaN values).

Example:
% Display a default matrix
subplot(1, 2, 1);
imshow(peaks(128), []);
title('as double')
% display the coresponding RGB image
subplot(1, 2, 2); imshow(double2rgb(peaks(128), jet, [-8 8]));
title('as RGB');

Zitieren als

David Legland (2024). double2rgb (https://www.mathworks.com/matlabcentral/fileexchange/30264-double2rgb), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2009b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und MATLAB Answers
Quellenangaben

Inspiriert: Easy Plot EEG Brain Network Matlab

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0