İ need to switch red and blue colors in RGB picture. How i can do that? my version of matlab is R2013a
5 次查看(过去 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 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!