function [out]=convolution(In,maska)

out=zeros(size(In,1),size(In,2));

maska_x=floor(size(maska,1)/2);

maska_y=floor(size(maska,2)/2);


for i=1:size(In,1)-size(maska,1)
     for j=1:size(In,2)-size(maska,2)
           sum=0;
           for a=1:size(maska,1);
               for b=1:size(maska,2)
                   po=maska(a,b);
                   pom=double(In(i+a-1,j+b-1));
                   cit=pom*po;
                   sum=sum+(cit);
               end
           end
           out(i+maska_x,j+maska_y)=sum;
     end
end

 