역시 매트랩으로 했구요....코드는 아래와 같습니다.
a = imread('2108818074_06150699_IMG_0673.JPG');
b = uint8(zeros(size(a)));
b(:,:,1) = a(:,:,2);
b(:,:,2) = a(:,:,1);
b(:,:,3) = a(:,:,3);
imshow(b);
c = rgb2gray(a);
imshow(c);
d = uint8(abs(double(c) -255));
imshow(d);
e = uint8(zeros(size(a)));
e(:,:,1) = a(:,:,1);
e(:,:,2) = a(:,:,3);
e(:,:,3) = a(:,:,2);
imshow(e);
%%
imwrite(b,'back_red.jpg','Quality', 100);
imwrite(c,'back_gray.jpg','Quality', 100);
imwrite(d,'back_inverse_gray.jpg', 'Quality', 100);
imwrite(e,'back_blue.jpg','Quality', 100);
감사합니다.~!