Skip to main content
. 2021 Aug 15;21(16):5489. doi: 10.3390/s21165489
Algorithm 1: Proposed RAVA algorithm.

RAVA(I,M):    I represents list of all the frames of a video, and M is the number of frames.

  •   1:

          

  •   2:

    i←1

  •   3:

    for alli←1toM−1do

  •   4:

     Bboxesi←locateobjectsinframeIi

  •   5:

     BGi←Ii

  •   6:

     for all k←1tolen(Bboxesi) do

  •   7:

      Ri,k←Bboxesi[k]

  •   8:

      BGi←Ii⊖Ri,k                {Mask out foreground regions}

  •   9:

      magi,k,αi,k←Opticalflow(Ri,k→Ri+1,k)

  • 10:

      avg−opti,k←∑j=1Kmagi,k,jK

  • 11:

                        {K is the number of pixels in this region Ri,k}

  • 12:

     end for

  • 13:

    end for

  • 14:

    for alli←1toM−1do

  • 15:

     for all k←1toN do

  • 16:

                          {N is the number of regions in the frame}

  • 17:

      wi,k=avg−opti,k∑m=1M−1∑n=1Navs.g−optm,n

  • 18:

          

  • 19:

     end for

  • 20:

    end for

  • 21:

    FGfeature=∑m=1M−1∑n=1Nwm,n·IQA(Rm,n)∑m=1M−1∑n=1N1

  • 22:

          

  • 23:

    BGfeature=∑m=1MIQA(BGi)M

  • 24:

                                 {IQA can be PSNR or SSIM}