How to represent RGB color information using matlab?
古いコメントを表示
I want to hold the RGB color information of colored images using matlab; so as i can distinctly differentiate different objects using color information?
Very Thanks.
回答 (1 件)
Michael Haderlein
2015 年 3 月 12 日
Images are represented by (m x n x 3) arrays. This is basically three two-dimensional arrays behind each other. The first layer is R, the second is G and the third is B. Means, if you want to get the three layers separated:
img=imread('myimage.png');
R=img(:,:,1);
G=img(:,:,2);
B=img(:,:,3);
3 件のコメント
Minale Habtemichael
2015 年 3 月 12 日
Image Analyst
2015 年 3 月 12 日
Why a tensor? What's wrong with a 3D array like the rest of the world? What form do you even use tensors in in MATLAB? If not arrays, then what? Structures, tables, cell arrays, what????
Minale Habtemichael
2015 年 3 月 13 日
カテゴリ
ヘルプ センター および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!