Skip to main content
. 2020 Sep 22;20(18):5427. doi: 10.3390/s20185427
Algorithm 1 QIM-based watermark embedding procedure.
  • 1:

    Input: curvelet coefficients Cs,l(i,j) over scale s and direction l

  • 2:

    Output: modified curvelet coefficients Cms,l(i,j)

  • 3:

    q: quantization step

  • 4:

    b: bit to be inserted

  • 5:

     

  • 6:

    As,l=1mni=1mj=1nabs(Cs,l(i,j))

  • 7:

    if mod[round(As,l/q),2] = b then

  • 8:

      c=0

  • 9:

    else

  • 10:

      if mod(abs(As,l)/q,1)0.5 then

  • 11:

        c=0.5

  • 12:

      else if mod(abs(As,l)/q,1)>0.5 then

  • 13:

        c=0.5

  • 14:

      end if

  • 15:

    end if

  • 16:

    Qs,l=(round(abs(As,l)/q+c)·q)/As,l

  • 17:

    Cms,l(i,j)=Cs,l(i,j)·Qs,l