MATLAB Answers

0

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

Ulvi 님이 질문을 제출함. 3 Mar 2014
İ need to switch red and blue colors in RGB picture. How i can do that? my version of matlab is R2013a

  댓글 수: 0

로그인 to comment.

답변 수: 1

Answer by Thomas
on 3 Mar 2014
Edited by Thomas
on 3 Mar 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

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);

로그인 to comment.



Translated by