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?
0 件のコメント
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!