I need to write a code that flips the image across y-axis. This code is working but it turns the image to grayscale. I want it to stay in RGB. Lastly, I am not able to use any functions. (imrotate etc.)
subplot(1,2,1);
imshow(A);
title('original')
[r c ~]= size(A)
for i=1:r
for j=1:c
Aa(i,j)=A(i,c-j+1);
end
end
subplot(1,2,2);
imshow(Aa);
title('flipped across vertical axis')