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:

    i1

  •   3:

    for alli1toM1do

  •   4:

    BboxesilocateobjectsinframeIi

  •   5:

    BGiIi

  •   6:

    for all k1tolen(Bboxesi) do

  •   7:

      Ri,kBboxesi[k]

  •   8:

      BGiIiRi,k                {Mask out foreground regions}

  •   9:

      magi,k,αi,kOpticalflow(Ri,kRi+1,k)

  • 10:

      avgopti,kj=1Kmagi,k,jK

  • 11:

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

  • 12:

    end for

  • 13:

    end for

  • 14:

    for alli1toM1do

  • 15:

    for all k1toN do

  • 16:

                          {N is the number of regions in the frame}

  • 17:

      wi,k=avgopti,km=1M1n=1Navs.goptm,n

  • 18:

          

  • 19:

    end for

  • 20:

    end for

  • 21:

    FGfeature=m=1M1n=1Nwm,n·IQA(Rm,n)m=1M1n=1N1

  • 22:

          

  • 23:

    BGfeature=m=1MIQA(BGi)M

  • 24:

                                 {IQA can be PSNR or SSIM}