A = imread("C:\Users\C010\Documents\zaamin\1.jpg");

if size(A,3) == 3
    A_gray = rgb2gray(A);
else
    A_gray = A;
end

complement = 255 - A;



subplot(2,3,1);
imshow(A);
title("ORIGINAL IMAGE");

subplot(2,3,2);
imshow(A_gray);
title("GRAY IMAGE");

subplot(2,3,3);
imshow(complement);
title("COMPLEMENT IMAGE");

