How to convert 2D image into matrix 3D ? ?
古いコメントを表示
Hi everyone, I have a duty from my lecturer before the 25th of August 2017 about image compression. I am assigned to make compression image analysis with three methods (Wavelet haar, Huffman coding, and Run Length Encoding) at once in a single runing compression program. I am given the pseudocode logic flow as a hint for the compression process, which I inserted in the notepad file. The image I have is a color image with dimensions of 1285 x 720. Please help me to complete my task. Thank you in advance.
回答 (1 件)
Walter Roberson
2017 年 8 月 22 日
color images are already 3D arrays when they are read in.
The exception to this is "pseudocolor images" (.gif are sometimes pseudocolor), which which case you get a 2D array and a colormap:
[image_data, color_map] = imread('TheFileNameGoesHere');
if ~isempty(color_map)
image_data = ind2rgb(image_data, color_map);
end
カテゴリ
ヘルプ センター および File Exchange で Denoising and Compression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!