Borrar filtros
Borrar filtros

How Can we extract the green channel matrix alone from colour image? Is there any formula apart from matlab extraction

12 visualizaciones (últimos 30 días)
How Can we extract the green channel matrix alone from colour image

Respuestas (2)

Guillaume
Guillaume el 4 de Mzo. de 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.

Walter Roberson
Walter Roberson el 4 de Mzo. de 2016
If you need to do it by mathematical formula, then you can use a Projection Matrix
[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.

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by