How Can we extract the green channel matrix alone from colour image? Is there any formula apart from matlab extraction
18 次查看(过去 30 天)
显示 更早的评论
How Can we extract the green channel matrix alone from colour image
0 个评论
回答(2 个)
Guillaume
2016-3-4
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 个评论
Walter Roberson
2016-3-4
[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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!