【发布时间】:2015-12-29 02:20:00
【问题描述】:
我在 MATLAB 中使用 flipdim 命令的项目遇到问题。我需要用它来翻转 RGB 图像的红色和绿色。我设法用flipdim(e,3); 翻转了红色和蓝色,但不知道如何解决这个问题。有人可以帮忙吗?
这是我目前的代码:
%call an image
d=uigetfile('*.jpg','choose an image file');
%read an image ito an array
e=imread(d);
%define plot 1
subplot(1,2,1)
%show image original image
imshow(e)
%hold figure
hold
%rotate original image 90 degreesR
l=flip(e(:,:,1:2),3);
%define plot 2
subplot(1,2,2)
%show altered image
imshow(l)
【问题讨论】:
-
我需要使用 Flipdim 来做这个
标签: image matlab image-processing rgb