| Algorithm 6 Merging local K-CoverPicTrees on sensor a |
| 1: Tree(a) = Local K-CoverPicTree of sensor a |
| 2: Tree(b) = Local K-CoverPicTree of sensor b |
| 3: New Combined Tree(a) = [] |
| 4: New Combined Tree(a) = Tree(a) |
| 5: for S’ = 1:size(S-common) do |
| 6: Merge all child nodes of common Node(S’) of Tree(b) into the common Node(S’) of the New Combined Tree(a) |
| 7: end for |
| 8: Call Algorithm 4 to remove redundant photos in the New Combined Tree(a) |
| 9: Requested Photos from sensor b = Photos IDs that generated from subtracting Tree(a) from New Combined Tree(a) |
| 10: Local K-CoverPicTree of sensor a = New Combined Tree(a). |