Represent data as image using color amplitude and hue

6 次查看(过去 30 天)
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?

采纳的回答

Image Analyst
Image Analyst 2020-8-4
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by