İ need to switch red and blue colors in RGB picture. How i can do that? my version of matlab is R2013a
조회 수: 12 (최근 30일)
이전 댓글 표시
İ need to switch red and blue colors in RGB picture. How i can do that? my version of matlab is R2013a
댓글 수: 0
답변 (1개)
Thomas
2014년 3월 3일
편집: Thomas
2014년 3월 3일
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
Scott Staniewicz
2018년 1월 16일
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);
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!