Skip to main content
. 2018 Nov 10;18(11):3865. doi: 10.3390/s18113865
Algorithm 1 Graph construction: Here, δD and δC are threshold values to split a node into four children.
  • 1:

    Input: image I={depth(D),color(C)}, init tree depth tD=0

  • 2:

     

  • 3:

    Output: decomposed image with quadtree structure

  • 4:

     

  • 5:

    functionQuadtree(I,tD)

  • 6:

     

  • 7:

    if (tD>=tmax) then

  • 8:

     

  • 9:

      return node(I)

  • 10:

     

  • 11:

    else

  • 12:

     

  • 13:

      σD= standard deviation of ID

  • 14:

     

  • 15:

      δD= divider of ID

  • 16:

     

  • 17:

      σC= standard deviation of IC

  • 18:

     

  • 19:

      δC= divider of IC

  • 20:

     

  • 21:

      if (σD>δDσC>δC) then

  • 22:

     

  • 23:

       Isub = split I as four sub images

  • 24:

     

  • 25:

       return QuadTree(Isub,tD+1)

  • 26:

     

  • 27:

      end if

  • 28:

     

  • 29:

    end if

  • 30:

     

  • 31:

    end function