Stacking elements of RGB array in a single array

Hello,
i want to read all the elements of 1st coloumn of 'r','g' and 'b' into a single array. i need it to look like how 'col1' looks.
i = imread ('img.png');
r = i(:,:,1);
g = i(:,:,2);
b = i(:,:,3);
col1 = [r(1,1) g(1,1) b(1,1); r(1,2) g(1,2) b(1,2); r(1,3) g(1,3) b(1,3)];

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

質問済み:

2016 年 1 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by