img = imread('C:\Users\C010\Documents\zaamin\1.jpg');
flip = flipdim(img, 1);

add = imadd(img, flip);
sub = imsubtract(img, flip);
and_img = img & flip;
and2 = bitand(img, flip);
or2 = bitor(img, flip);
intersect_img = min(img, flip);
figure;
subplot(3,3,1); imshow(img); title('Original');
subplot(3,3,2); imshow(add); title('Add');
subplot(3,3,3); imshow(sub); title('Subtract');
subplot(3,3,4); imshow(and_img); title('Logical AND');
subplot(3,3,5); imshow(and2); title('Bitwise AND');
subplot(3,3,6); imshow(or2); title('Bitwise OR');
subplot(3,3,7); imshow(intersect_img); title('Intersection');
