[英]how to Hide the output messages from libfreenect2?
For a project, I am working with libfreenect2 and because I am reading some commands from console I want to hide the messages* that libfreenect2 outputs when the kinect is acquiring data. 对于一个项目,我正在使用libfreenect2,并且因为我正在从控制台读取一些命令,所以我想隐藏kinect获取数据时libfreenect2输出的消息*。 How could I do that?
我该怎么办? *I mean all the messages about skipping data and so on
*我的意思是所有有关跳过数据的消息等等
Google is your friend: https://openkinect.github.io/libfreenect2/group__logging.html Google是您的朋友: 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.
So just use libfreenect2::setGlobalLogger(NULL);
因此,只需使用
libfreenect2::setGlobalLogger(NULL);
Another way, that also works if you don't have direct access to the API (eg when using the OpenNI2 driver), is to set the LIBFREENECT2_LOGGER_LEVEL environment variable. 如果您没有直接访问API的方法(例如,在使用OpenNI2驱动程序时),也可以使用另一种方法是设置LIBFREENECT2_LOGGER_LEVEL环境变量。 Possible values are:
可能的值为:
None
Error
Warning
Info
Debug
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.