
logoPoliba = imread('logo poliba.jpg','jpg');
imshow(logoPoliba);
SIZE = size(logoPoliba);
M = SIZE(1,1)
N = SIZE(1,2)
alpha  = ones([M N]).*255;
logo = uint32(logoPoliba);
alpha = uint8(alpha);
threshold = 600

for l = 1:M
   for k = 1:N
      if (logo(l,k,1)+logo(l,k,2)+logo(l,k,3)) >= threshold
          alpha(l,k) = 0; 
      end
   end
end

clear logo M N SIZE treshold l k
figure, imshow(alpha);

imwrite(logoPoliba,'poliba.png','png','alpha',alpha);

