Represent data as image using color amplitude and hue

6 visualizzazioni (ultimi 30 giorni)
I have 4D data, which is really 2D data with two properties for each location in the 2D array. I would like to represent this data as an image by encoding the first feature as brightness (0=black) and the second feature as color/hue around the color wheel. Does MATLAB have any built in functions to make this easier?

Risposta accettata

Image Analyst
Image Analyst il 4 Ago 2020
You could try something like this:
Sounds like 3-D data to me. Or even two separate 2-D images. So try
[rows, columns, numColors] = size(yourBrightnessImage);
hsvImage = ones(rows, columns, 3);
hsvImage(:, :, 3) = 255 * mat2gray(yourBrightnessImage); % Assign intensity channel.
hsvImage(:, :, 1) = yourHueImage; % Assign hue channel.
rgbImage = hsv2rgb(hsvImage);
imshow(rgbImage);
If you need more help, attach your data.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by