İ need to switch red and blue colors in RGB picture. How i can do that? my version of matlab is R2013a

5 visualizaciones (últimos 30 días)
İ need to switch red and blue colors in RGB picture. How i can do that? my version of matlab is R2013a

Respuestas (1)

Thomas
Thomas el 3 de Mzo. de 2014
Editada: Thomas el 3 de Mzo. de 2014
Similar question:
or
ii=imread('1.jpg'); % load original
figure()
imshow(ii) % show orignal
newii(:,:,1)=ii(:,:,2);
newii(:,:,2)=ii(:,:,1);
newii(:,:,3)=ii(:,:,3);
figure()
imshow(newii) % show new
  1 comentario
Scott Staniewicz
Scott Staniewicz el 16 de En. de 2018
Doesn't this swap the Red with the Green (if it's RGB)? To swap red/blue, they would want
newii(:,:,1)=ii(:,:,3);
newii(:,:,2)=ii(:,:,2);
newii(:,:,3)=ii(:,:,1);

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by