How to separate an image to rgb?
古いコメントを表示
how to divide an image into its r,g,and b colour planes,
採用された回答
その他の回答 (3 件)
Sailesh Sidhwani
2018 年 10 月 25 日
編集済み: Sailesh Sidhwani
2019 年 7 月 29 日
2 投票
Starting R2018b, Image Processing Toolbox has a new function "imsplit" which does exactly this: https://www.mathworks.com/help/images/ref/imsplit.html
ES
2013 年 12 月 31 日
I=imread('image.jpg')
will give I (a 3d array, of size [x,y,3] )where x and y are the dimensions of the image. 3 is for R, G, and B components.
To separate out the three components, you can do a
R = reshape(I(:,:,1),[],1);
G = reshape(I(:,:,2),[],1);
B = reshape(I(:,:,3),[],1);
Negesse Tadesse
2019 年 7 月 29 日
編集済み: DGM
2023 年 2 月 12 日
how about imsplit function?
[R G B] = imsplit(myImage);
カテゴリ
ヘルプ センター および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!