Stacking elements of RGB array in a single array
Afficher commentaires plus anciens
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)];
Réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!