How Can we extract the green channel matrix alone from colour image? Is there any formula apart from matlab extraction
11 views (last 30 days)
Show older comments
How Can we extract the green channel matrix alone from colour image
0 Comments
Answers (2)
Guillaume
on 4 Mar 2016
greenchannel = rgbimage(:, :, 2);
The first page of an rgb image is the red channel, the 2nd is the green channel and the 3rd is the blue channel, hence the name rgb.
0 Comments
Walter Roberson
on 4 Mar 2016
[r, c, p] = size(YourRGBArray);
GreenPlane = reshape(reshape(YourRGBArray,[], 3) * [0; 1; 0], r, c);
I do not recommend this for practical use; matrix indexing is faster and clearer.
0 Comments
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!