Cherry-picked mariusmuja/flann@8c8b0e0cb879666797ab2ac51b9ee438bf84a183.
Cherry-picked mariusmuja/flann@8c8b0e0cb879666797ab2ac51b9ee438bf84a183.

Original author: me.

apavlenko/opencv,opencv/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv