Double The Size of an Image using Bi-linear Interpolation
%================== Program to double the size of an Image ===================% A=imread('pic1.tif'); [M N]=size(A); B=uint8(zeros(2*M,2*N)); for i=1:M for j=1:N B(2*i-1,2*j-1)=A(i,j); B(2*i,2*j-1)=A(i,j); B(2*i-1,2*j)=A(i,j); B(2*i,2*j)=A(i,j); end end C=B; [M N]=size(B); mask=[0, 1, 0;1, 0, 1;0, 1, 0;]; const_mat=zeros(1,4); for i=1:M for j=1:N mat=zeros(1,4); S=zeros(4,4); m=1; for x=1:3 for y=1:3 if(((i+x-2)<M &&(j+y-2)<N)&&((i+x-2)>0 && (j+y-2)>0)) if(mask(x,y)) ...