Understanding how cv :: detail :: leaveBiggestComponent () works in opencv 3.2

I am having trouble understanding how the cv :: detail :: leaveBiggestComponent function works as there is no documentation available.

I know what the function is supposed to do, i.e. given a set of keyword matches between images, returning the largest subset of images with matched matches. In addition, according to its implementation states, it should also remove duplicate images.

This feature is part of the opencv Stitching Pipeline , and should act as a panorama recognition engine for Brown and Lowe.

However, when it comes to breaking code, I can't figure out how it's done.

TL; DR I am looking for pseudocode explaining the flowchart of cv :: detail :: leaveBiggestComponent (), please help.

Code implementation here . It calls the relevant code (no documentation) from here (implementation) and here (headers).

Of particular interest is how cv :: detail :: DisjointSets () works.

+3


source to share





All Articles