本文整理汇总了C++中xn::ImageGenerator::GetMirrorCap方法的典型用法代码示例。如果您正苦于以下问题:C++ ImageGenerator::GetMirrorCap方法的具体用法?C++ ImageGenerator::GetMirrorCap怎么用?C++ ImageGenerator::GetMirrorCap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xn::ImageGenerator
的用法示例。
在下文中一共展示了ImageGenerator::GetMirrorCap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConfigureGenerators
XnStatus ConfigureGenerators(const RecConfiguration& config, xn::Context& context, xn::DepthGenerator& depthGenerator, xn::ImageGenerator& imageGenerator)
{
XnStatus nRetVal = XN_STATUS_OK;
xn::EnumerationErrors errors;
// Configure the depth, if needed
if (config.bRecordDepth)
{
nRetVal = context.CreateAnyProductionTree(XN_NODE_TYPE_DEPTH, NULL, depthGenerator, &errors);
CHECK_RC_ERR(nRetVal, "Create Depth", errors);
nRetVal = depthGenerator.SetMapOutputMode(*config.pDepthMode);
CHECK_RC(nRetVal, "Set Mode");
if (config.bMirrorIndicated && depthGenerator.IsCapabilitySupported(XN_CAPABILITY_MIRROR))
{
depthGenerator.GetMirrorCap().SetMirror(config.bMirror);
}
// Set Hole Filter
depthGenerator.SetIntProperty("HoleFilter", TRUE);
}
// Configure the image, if needed
if (config.bRecordImage)
{
nRetVal = context.CreateAnyProductionTree(XN_NODE_TYPE_IMAGE, NULL, imageGenerator, &errors);
CHECK_RC_ERR(nRetVal, "Create Image", errors);
nRetVal = imageGenerator.SetMapOutputMode(*config.pImageMode);
CHECK_RC(nRetVal, "Set Mode");
if (config.bMirrorIndicated && imageGenerator.IsCapabilitySupported(XN_CAPABILITY_MIRROR))
{
imageGenerator.GetMirrorCap().SetMirror(config.bMirror);
}
}
// Configuration for when there are both streams
if (config.bRecordDepth && config.bRecordImage)
{
// Registration
if (config.bRegister && depthGenerator.IsCapabilitySupported(XN_CAPABILITY_ALTERNATIVE_VIEW_POINT))
{
nRetVal = depthGenerator.GetAlternativeViewPointCap().SetViewPoint(imageGenerator);
CHECK_RC(nRetVal, "Registration");
}
// Frame Sync
if (config.bFrameSync && depthGenerator.IsCapabilitySupported(XN_CAPABILITY_FRAME_SYNC))
{
if (depthGenerator.GetFrameSyncCap().CanFrameSyncWith(imageGenerator))
{
nRetVal = depthGenerator.GetFrameSyncCap().FrameSyncWith(imageGenerator);
CHECK_RC(nRetVal, "Frame sync");
}
}
}
return XN_STATUS_OK;
}