Image resize img1=imread('C:\Users\vignan\Documents\221fa04719\tiger.jpg'); img2=imresize(img1, size(100,100)); imshow(img2); Arithematic operations image1= imread("bts7.jpeg"); image2=imread("bts8.jpeg"); addsize= imresize(image2,[size(image1,1),size(image1,2)]); add= image1 + addsize; imshow(add); subtract= image1 - addsize; imshow(subtract); mul= image1 .* addsize; imshow(mul); div= image1 ./ addsize; imshow(div); Operations img1=imread('C:\Users\vignan\Downloads\squarrell.jpg'); img2=imread('C:\Users\vignan\Downloads\flower.jpg'); img2=imresize(img1,[size(100,100)]); img1=im2bw(img1); img2=im2bw(img2); img3=img1 & img2; img4=img1 | img2; img5=xor(img1,img2); img6=~img1; subplot(141),imshow(img3),title('logical and'); subplot(142),imshow(img4),title('logical or'); subplot(143),imshow(img5),title('logical xor'); subplot(144),imshow(img6),title('logical not'); Negative image skl=imread('C:\Users\vignan\Downloads\flowers1.jpg'); subplot(1,2,1); imshow(skl); title('Original image'); L=2^8; neg=(L-1)-skl; subplot(1,2,2); imshow(neg); title('Negative Image'); Log transformation img=imread('C:\Users\vignan\Downloads\prabhas photos 13.jpg'); r=double(img); C=1; S=C*log(1+r); T=255/(C*log(256)); B=uint8(T*S); figure,imshow(B); title('Log Transformation'); Power log transformation img=imread('C:\Users\vignan\Downloads\mickey.jpg'); r=double(img); G=3; C=1; S=C*(r.^G); T=255/(C*(255.^G)); O=uint8(T.*S); figure, imshow(O); title('Power Law Transformation'); Gray level slicing i=imread('C:\Users\vignan\Downloads\cutie.jpg'); j=double(i); k=double(i); [row,col]=size(j); T1=input('Enter the Lowest threshold value:'); T2=input('Enter the Highest threshold value:'); for x=1:row for y=1:col if((j(x,y)>T1)&&(j(x,y)radius); F_HPF=Fshift.*HPF; img_HPF=real(ifft2(ifftshift(F_HPF))); figure; subplot(1,3,1),imshow(img,[]),title('Original image'); subplot(1,3,2),imshow(img_LPF,[]),title('Low-Pass Filtered image'); subplot(1,3,3),imshow(img_HPF,[]),title('High-pass Filtered Image'); Edge detection I = rgb2gray(imread('C:\Users\vignan\Documents\leena1.jpg')); subplot(2, 2, 1), imshow(I); title('Gray Scale Image'); % Sobel Edge Detection J = edge(I, 'Sobel'); subplot(2, 2, 2), imshow(J); title('Sobel'); % Prewitt Edge detection K = edge(I, 'Prewitt'); subplot(2, 2, 3), imshow(K); title('Prewitt'); % Robert Edge Detection L = edge(I, 'Roberts'); subplot(2, 2, 4), imshow(L); title('Robert'); Sobel edge detection k=imread('C:\Users\vignan\Documents\leena1.jpg'); k=rgb2gray(k); k1=double(k); p_msk=[-1 0 1; -2 0 2; -1 0 1]; kx=conv2(k1, p_msk, 'same'); ky=conv2(k1, p_msk', 'same'); subplot (2,2,1); imshow(k); subplot (2,2,2); imshow(kx); subplot (2,2,3); imshow(ky); Perwitt edge detection k=imread('C:\Users\vignan\Documents\leena1.jpg'); k=rgb2gray(k); k1=double(k); p_msk=[-1 0 1; -1 0 1; -1 0 1]; kx=conv2(k1, p_msk, 'same'); ky=conv2(k1, p_msk', 'same'); subplot (2,2,1); imshow(k); subplot (2,2,2); imshow(kx); subplot (2,2,3); imshow(ky); Line detection k=imread('C:\Users\vignan\Downloads\IMG-20240221-WA0004.jpg'); k=im2bw(k); w1=1/3*[1 0 -1;1 0 -1;1 0 -1]; g=(imfilter(double(k),w1)); g(g<1)=0; subplot (2,2,1); imshow(g); title('Horizontal line'); w1=1/3*[1 1 1;0 0 0;-1 -1 -1]; g=(imfilter(double(k),w1)); g(g<1)=0; subplot (2,2,2); imshow(g); title('Vertical line'); w1=1/3*[-1 -1 0;-1 0 1;0 1 1]; g=(imfilter(double(k),w1)); g(g<1)=0; subplot (2,2,3); imshow(g); title('+45 Diagonal line'); w1=1/3*[0 -1 -1;1 0 -1;1 1 0]; g=(imfilter(double(k),w1)); g(g<1)=0; subplot (2,2,4); imshow(g); title(‘-45 diagonal’); Image segmentation I=imread('C:\Users\vignan\Downloads\cam1.tif'); imshow(I); title('Original Image'); mask=false(size(I)); mask(170,70)=true; W=graydiffweight(I,mask,'GrayDifferenceCutoff',25); thresh=0.01; [BW,D]=imsegfmm(W,mask,thresh); figure; imshow(BW); title('Segmented Image'); Morphological Thinning and Thickening I=imread("bts8.jpeg"); subplot(2,2,1),imshow(I),title("Original Image"); binaryImg= im2bw(I); subplot(2,2,2),imshow(binaryImg),title("Binary Image"); I_thin= bwmorph(binaryImg,'thin',5); subplot(2,2,3),imshow(I_thin),title("Morphological Thinned Image"); I_thick= bwmorph(binaryImg, 'thick',5); subplot(2,2,4),imshow(I_thick),title("Morphological Thicked Image"); Morphological operations I=imread("bts8.jpeg"); subplot(2,3,1),imshow(I),title("Original Image"); SE= strel('line',7,7); I_dil= imdilate(I,SE); subplot(2,3,2),imshow(I_dil),title("Dilated Image"); I_erode= imerode(I,SE); subplot(2,3,3),imshow(I_erode),title("Eroded Image"); I_open= imopen(I,SE); subplot(2,3,4),imshow(I_open),title("Opened Image"); I_close= imclose(I,SE); subplot(2,3,5),imshow(I_close),title("Closed Image");