本文整理汇总了C++中openni::VideoStream::getHorizontalFieldOfView方法的典型用法代码示例。如果您正苦于以下问题:C++ VideoStream::getHorizontalFieldOfView方法的具体用法?C++ VideoStream::getHorizontalFieldOfView怎么用?C++ VideoStream::getHorizontalFieldOfView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类openni::VideoStream
的用法示例。
在下文中一共展示了VideoStream::getHorizontalFieldOfView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tan
/// Fetch the camera intrinsics
#if 0
float w = g_depthStream.getVideoMode().getResolutionX();protected:
Camera*const camera;
/// Device
kinect::Device device;
bool initialized;
/// Streams
kinect::VideoStream g_depthStream;
kinect::VideoStream g_colorStream;
/// Frames
kinect::VideoFrameRef g_depthFrame;
kinect::VideoFrameRef g_colorFrame;
float fov_h = g_depthStream.getHorizontalFieldOfView();
float fl_h = .5*w / tan(.5*fov_h);
float h = g_depthStream.getVideoMode().getResolutionY();
float fov_v = g_depthStream.getVerticalFieldOfView();
float fl_v = .5*h / tan(.5*fov_v);
std::cout << "cameras focal lengths" << fl_h << fl_v;
#endif
initialized = true;
return true;
}
SensorOpenNI::~SensorOpenNI()
{
if(initialized){
LOG(INFO) << "Shutting down Kinect...";
示例2: getHFov
double getHFov()const{ return m_stream.getHorizontalFieldOfView(); }