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

dims=size(im);
if length(dims) ==3 then
    im_gray = rgb2gray(im)
   else
       im_gray=im;
   end
   
im_gray=im2double(im_gray);
kernal_smooth= ones(3,3)/9;
im_smooth =conv2(im_gray,kernal_smooth,'same');

laplacian_kernal=[0 -1 0;-1 4 -1;0 -1 0];

im_laplacian=conv2(im_gray,laplacian_kernal,'same');

im_sharp=im_gray+im_laplacian;


subplot(2,2,1);
imshow(im);
title('Original Image');

subplot(2,2,2);
imshow(im_gray);
title('Gray Image');


subplot(2,2,3);
imshow(im_smooth);
title('im_smooth');

subplot(2,2,4);
imshow(im_sharp);
title('im_sharp');
