Represent data as image using color amplitude and hue

5 Ansichten (letzte 30 Tage)
Chuck37
Chuck37 am 4 Aug. 2020
Beantwortet: Image Analyst am 4 Aug. 2020
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?

Akzeptierte Antwort

Image Analyst
Image Analyst am 4 Aug. 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.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by