DIP File
DIP File
Code:
Output:
Program 2: Read an image and partition it into four equal quadrants.
Code:
% Read the image
image_data = imread('your_image.jpg');
% Determine the size of the image
[rows, cols, ~] = size(image_data);
subplot(2, 2, 2);
imshow(quad2);
title('Quadrant 2');
subplot(2, 2, 3);
imshow(quad3);
title('Quadrant 3');
subplot(2, 2, 4);
imshow(quad4);
title('Quadrant 4');
output:
Program 3: Write a script to perform identity function on an image.
Code:
% Read the image
image_data = imread('kola.jpg');
Output:
Program 4: Write a script to find the negative of an image.
Code:
subplot(1, 2, 2);
imshow(negative_image);
title('Negative Image');
Output: