/// 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...";
double getHFov()const{ return m_stream.getHorizontalFieldOfView(); }