FLANN kd-tree - how to run in parallel?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

FLANN kd-tree - how to run in parallel?

opencv-users mailing list
     I'd like to understand how can I increase performance when using the FLANN kd-tree. I
know that it allows using several trees that can be searched in parallel when doing
Nearest Neighbor Search.
     More exactly, following
when I give
           tree = new cv::flann::Index(
                                   kdtreeIndex, //all_quads,
                                   cv::flann::KDTreeIndexParams(2)); // but also 4, 8, etc
         I create a kd-tree with several trees to look for in parallel.

     Is it the case several threads are created, one for each tree?

     I noticed that in OpenCV, for a set of 4D points, more than 1 tree for kd-tree
actually degrades performance (for the same NNS queries performed).
     So, is it possible to improve performance for e.g., 4D points, with 2 or 4 trees in

   Thank you,