ForSfMthe approach used assumesan ordered sequence of views. The tracks are computed from pairwise point correspondence. The functionviewSetmaintains the pairwise correspondence and tracks. In the given exampleupdateConnectionandupdateViewsfunctions clears the old matches and populates with the new matches in theviewSet.
For a detailed understanding of theviewSetfunction refer the following link:
Best Answer