【问题标题】:Kinect Calibration and Depth ImageKinect 校准和深度图像
【发布时间】:2013-11-24 00:45:04
【问题描述】:

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

我想弄清楚的是接收输入深度图像以实现校准模型的过程。我找到了openni_wrapper::DepthImageclass 和getDepthMetaData().Data()function,它提供了以毫米为单位的深度。

这是原始深度吗?

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

【问题讨论】:

    标签: openni point-cloud-library


    【解决方案1】:

    这听起来像是在抓取器教程中可以找到的信息: http://pointclouds.org/documentation/tutorials/openni_grabber.php

    您可以更改教程以使用:

    void (const boost::shared_ptr<openni_wrapper::DepthImage>&)
    //This provides the depth image, without any color or intensity information
    

    或

    void (const boost::shared_ptr<openni_wrapper::Image>&, const  
          boost::shared_ptr<openni_wrapper::DepthImage>&, float constant)
    // When a callback of this type is registered, the grabber sends both RGB image 
    // and depth image and the constant (1 / focal length), which you need if you 
    // want to do your own disparity conversion.
    

    在代码中变成:

    #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;
    }
    

    【讨论】:

    • 那我们不能用PCL和OpenNI得到未校准的图像吗?我已经尝试过了,似乎这已经为我们提供了深度以 mm 为单位的最终校准深度图像。根据指南,原始深度图像的值应为 0-2047(11 位)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-16
    • 2014-11-17
    • 1970-01-01
    • 2016-02-18
    • 1970-01-01
    相关资源
    最近更新 更多