对于一个项目,我正在使用 libfreenect2,并且因为我正在从控制台读取一些命令,所以我想隐藏 libfreenect2 在 kinect 获取数据时输出的消息*。我怎么能那样做?*我的意思是所有关于跳过数据等的消息
问问题
240 次
2 回答
1
谷歌是你的朋友:https ://openkinect.github.io/libfreenect2/group__logging.html
void libfreenect2::setGlobalLogger ( Logger * logger )
Set the logger for all log output in this library.
Parameters
logger Pointer to your logger, or NULL to disable logging. The memory will be freed automatically. You should not free the pointer.
所以只需使用libfreenect2::setGlobalLogger(NULL);
于 2016-02-16T16:09:28.510 回答
0
如果您无法直接访问 API(例如,使用 OpenNI2 驱动程序时),另一种方法也可以使用,即设置 LIBFREENECT2_LOGGER_LEVEL 环境变量。可能的值为:
None
Error
Warning
Info
Debug
于 2019-08-26T02:25:42.700 回答