Borrar filtros
Borrar filtros

RGB image masking ....

1 visualización (últimos 30 días)
Piyum Rangana
Piyum Rangana el 25 de Mzo. de 2017
Respondida: Jan el 25 de Mzo. de 2017
How do I create a mask of an whole image using a defined threshold value ? The output should have a three channels(R, G, B). Could you please support me ?
  1 comentario
Jan
Jan el 25 de Mzo. de 2017
A threshold for what? The R-channel, the intensity, the contrast?

Iniciar sesión para comentar.

Respuesta aceptada

Jan
Jan el 25 de Mzo. de 2017
If you want e.g. a mask for a certain level of the red channel:
Img = rand(64, 48, 3); % Test data
Mask = Imd(:, :, 1) > 0.8; % Test mask
Mask3 = cat(3, Mask, Mask, Mask);
Img(Mask3) = 0; % Apply 3D mask: set red channels > 0.8 to 0.0

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by