function Do = oznaci(D, alpha, W)

% oznaci(D, alpha, W) - oznacava odabranu matricu
% D - odabrana matrica (detalji wavelet transformacije)
% alpha - jacina oznacavanja
% W - vodeni zig (vektor)

Wbr = 0; %brojac za W
koef = 0;
novikoef = 0;

Wsize = size (W);
Dsize = size (D);

for i=5:Dsize(1)-5
   for j=5:Dsize(2)-5
     koef = D(i,j);
     if abs(koef) > 20
         %newcoeff = coeff +  alpha * pow(fabs(coeff), 1.2) * watermark[w++ % n];
         pom = mod(Wbr, Wsize(1)) + 1;
         novikoef = koef + alpha * abs(koef)^1.2 * W(pom,1);
         D(i,j) = novikoef;
         Wbr = Wbr + 1;         
     end
 end
end

Do = D;