I just noticed that GridAdaptedFeatureDetector::detectImpl (in modules/features2d/src/detectors.cpp) uses cv::parallel_for_ in its implementation. I'm assuming that means that it uses multithreading to speed up the feature detection process. My question is: is there a way I can force this to run in serial? The motivation to turn off multithreading is to do performance testing, to see how my code runs faster or slower, serially, based on different code changes. Is there a compile flag or function call I need to do?