Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Openni Kinect校准和深度图像_Openni_Point Cloud Library - Fatal编程技术网

Openni Kinect校准和深度图像

Openni Kinect校准和深度图像,openni,point-cloud-library,Openni,Point Cloud Library,我已经开始研究PCL及其用于Kinect的SDK。我有一个非常基本的问题。我已经使用带有棋盘格图案的RGBDemo作为控制图像校准了RGB和IR相机。我已经收到了失真系数和偏移量。我在使用系数接收校准点云时遇到问题 我想弄明白的是接收输入深度图像以实现校准模型的过程。我找到了带有getDepthMetaData().Data()函数的openni_包装器::DepthImage类,该函数提供以毫米为单位的深度 这是原始深度吗 如果没有,是否有其他功能可以在不使用PCL事先校准的情况下接收原始深度

我已经开始研究PCL及其用于Kinect的SDK。我有一个非常基本的问题。我已经使用带有棋盘格图案的RGBDemo作为控制图像校准了RGB和IR相机。我已经收到了失真系数和偏移量。我在使用系数接收校准点云时遇到问题

我想弄明白的是接收输入深度图像以实现校准模型的过程。我找到了带有
getDepthMetaData().Data()
函数的
openni_包装器::DepthImage
类,该函数提供以毫米为单位的深度

这是原始深度吗


如果没有,是否有其他功能可以在不使用PCL事先校准的情况下接收原始深度图像?

这听起来像是grabber教程中提供的信息:

您可以将教程更改为使用以下任一选项:

void (const boost::shared_ptr<openni_wrapper::DepthImage>&)
//This provides the depth image, without any color or intensity information
void(const boost::shared_ptr&)
//这提供了深度图像,没有任何颜色或强度信息

void(const boost::shared_ptr&,const
boost::shared_ptr&,float常量)
//当注册此类型的回调时,抓取器将发送两个RGB图像
//深度图像和常数(1/焦距),如果需要
//想做你自己的视差转换。
在代码中,这变成:

#include <pcl/io/openni_grabber.h>

class KinectGrabber
{
public:
 void cloud_cb_ (const boost::shared_ptr<openni_wrapper::DepthImage> &depthImage)
 {
    // Do something with depthImage
 }

 void run ()
 {
   pcl::Grabber* interface = new pcl::OpenNIGrabber();

   boost::function<void (const boost::shared_ptr<openni_wrapper::DepthImage>&)> f =
     boost::bind (&KinectGrabber::cloud_cb_, this, _1);

   interface->registerCallback (f);

   interface->start ();

   while (//place something to stop on)
   {
     //boost::this_thread::sleep (boost::posix_time::seconds (1));
     // or other function
   }

   interface->stop ();
 }
};

int main ()
{
   KinectGrabber v;
   v.run ();
   return 0;
}
#包括
类动态抓取器
{
公众:
无效云(const boost::shared_ptr&depthImage)
{
//用depthImage做点什么
}
无效运行()
{
pcl::Grabber*接口=新pcl::OpenNIGrabber();
boost::函数f=
boost::bind(&KinectGrabber::cloud\u cb\u,this,\u 1);
接口->寄存器回调(f);
接口->开始();
while(//放置要停止的对象)
{
//boost::this_线程::sleep(boost::posix_时间::秒(1));
//或其他功能
}
接口->停止();
}
};
int main()
{
电动抓取器v;
v、 运行();
返回0;
}

那么我们不能使用PCL和OpenNI获得未校准的图像吗?我已经试过了,这似乎已经为我们提供了最终校准的深度图像,深度单位为mm。根据指南,原始深度图像的值应为0-2047(11位)。
#include <pcl/io/openni_grabber.h>

class KinectGrabber
{
public:
 void cloud_cb_ (const boost::shared_ptr<openni_wrapper::DepthImage> &depthImage)
 {
    // Do something with depthImage
 }

 void run ()
 {
   pcl::Grabber* interface = new pcl::OpenNIGrabber();

   boost::function<void (const boost::shared_ptr<openni_wrapper::DepthImage>&)> f =
     boost::bind (&KinectGrabber::cloud_cb_, this, _1);

   interface->registerCallback (f);

   interface->start ();

   while (//place something to stop on)
   {
     //boost::this_thread::sleep (boost::posix_time::seconds (1));
     // or other function
   }

   interface->stop ();
 }
};

int main ()
{
   KinectGrabber v;
   v.run ();
   return 0;
}