// Estimate features
FeatureEstimationT fest;
//fest.setRadiusSearch (0.025); //PCD格式
fest.setRadiusSearch (1.0); //AC格式
fest.setInputCloud (object);
fest.setInputNormals (object);
fest.compute (*object_features);
fest.setInputCloud (scene);
fest.setInputNormals (scene);
fest.compute (*scene_features);
如上所示代码,在win64位工程中运行正常,没有警告信息;
可是在win32位程序中却报num_threads 子句的参数必须为正值的警告信息,这对于控制台程序到无所谓,但是对于GUI程序却会有弹框。
后经调试和查询相关信息,得知是在compute出弹出警告,只需在此前加入compute的线程数即可(setNumberOfThreads),比如:
// Estimate features
FeatureEstimationT fest;
//fest.setRadiusSearch (0.025); //PCD格式
fest.setRadiusSearch (1.0); //AC格式
fest.setNumberOfThreads(4);
fest.setInputCloud (object);
fest.setInputNormals (object);
fest.compute (*object_features);
fest.setInputCloud (scene);
fest.setInputNormals (scene);
fest.compute (*scene_features);
至于64位和32位的不同表现可能在于编译的lib库中64位setNumOfThreads的默认参数为1,而32位的为0.