<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic After further investigation, in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Weird-Depth-Values/m-p/1023100#M39062</link>
    <description>&lt;P&gt;After further investigation, it appears that I only get the weird depth values when I am running the Kinect One at the same time.&lt;/P&gt;</description>
    <pubDate>Sat, 20 Dec 2014 22:08:11 GMT</pubDate>
    <dc:creator>Thomas_Burnett</dc:creator>
    <dc:date>2014-12-20T22:08:11Z</dc:date>
    <item>
      <title>Weird Depth Values</title>
      <link>https://community.intel.com/t5/Software-Archive/Weird-Depth-Values/m-p/1023098#M39060</link>
      <description>&lt;P&gt;I’ve been playing with the RealSensor sensor in an effort to get a point cloud to project from a light-field display.&amp;nbsp;&amp;nbsp; I have an existing application that can take multiple sensor streams from xbox Kinects, or a higher density stream from an Kinect One.&amp;nbsp;&amp;nbsp; It is a thread pool/task based application where for every processing frame, a bunch of tasks are queued up to capture, filter, fuse and render point clouds.&amp;nbsp;&amp;nbsp;&amp;nbsp; I can’t seem to get a good depth image from the RealSense sensor and I’ve tried to duplicate the data access provided by the demos.&amp;nbsp; What I see, it a depth image that temporally fades in and out.&amp;nbsp; These pixels actually don’t appear to be valid depth values, and I have to multiply them by 32 to even see them, so I’m not sure what is going on.&amp;nbsp;&amp;nbsp; I’ve included the &lt;SPAN style="font-family: Consolas, 'Lucida Console', Menlo, Monaco, 'DejaVu Sans Mono', monospace, sans-serif; line-height: 19.5120010375977px;"&gt;TaskSensorRealSense.cpp&amp;nbsp;&lt;/SPAN&gt;code, a few screenshots and a link to an AVI that shows what I am seeing.&amp;nbsp;&amp;nbsp;&amp;nbsp; The Kinect One stream is on the left and the RealSense is on the right.&amp;nbsp;&amp;nbsp; Image over depth.&amp;nbsp; The Kinect One point cloud is being rendered in the background.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=rPBcFL49uWs&amp;amp;feature=youtu.be" target="_blank"&gt;https://www.youtube.com/watch?v=rPBcFL49uWs&amp;amp;feature=youtu.be&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The operator() method calls the two methods to grab the RGB and depth values. &amp;nbsp; I'm just trying to get good data out at the moment. &amp;nbsp;Any ideas on what is going on? &amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Ps. the code follows the images.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="IMG_0407.jpg"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/7187i8373FA31EE463368/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="IMG_0407.jpg" alt="IMG_0407.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="PointView 2014-12-05 11-31-31-93.png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/7188iE1B514DF7812702A/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="PointView 2014-12-05 11-31-31-93.png" alt="PointView 2014-12-05 11-31-31-93.png" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="PointView 2014-12-05 11-31-37-40.png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/7189i3B10E7C6F1B66047/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="PointView 2014-12-05 11-31-37-40.png" alt="PointView 2014-12-05 11-31-37-40.png" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="PointView 2014-12-05 11-31-59-66.png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/7190i7F67A19A3136E405/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="PointView 2014-12-05 11-31-59-66.png" alt="PointView 2014-12-05 11-31-59-66.png" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="PointView 2014-12-05 11-32-00-73.png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/7191i45EE34A037A73F3B/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="PointView 2014-12-05 11-32-00-73.png" alt="PointView 2014-12-05 11-32-00-73.png" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;SPAN style="font-family: Consolas, 'Lucida Console', Menlo, Monaco, 'DejaVu Sans Mono', monospace, sans-serif; font-size: 1em; line-height: 1.5;"&gt;// TaskSensorRealSense.cpp&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;// Thomas Burnett
// December 4, 2014

//---------------------------------------------------------------------
// Includes
#include &amp;lt;boost/threadpool.hpp&amp;gt;
#include &amp;lt;pcl/io/pcd_io.h&amp;gt;

#include "Sensors/pvSensor.h"
#include "Tasks/pvTaskSensorRealSense.h"

using namespace pv;
//---------------------------------------------------------------------


//---------------------------------------------------------------------
// Globals
//---------------------------------------------------------------------


//---------------------------------------------------------------------
// fetchImage
//---------------------------------------------------------------------
void  TaskSensorRealSense::fetchImage(PXCImage *pI)
{
  if (pI)
  {
  PXCImage::ImageInfo info = pI-&amp;gt;QueryInfo();
  PXCImage::ImageData imgData;

    if (pI-&amp;gt;AcquireAccess(PXCImage::ACCESS_READ,PXCImage::PIXEL_FORMAT_RGB24,&amp;amp;imgData) == PXC_STATUS_NO_ERROR)
    {
      _image.create(info.height,info.width,CV_8UC3);

      {
      unsigned char *pS     = (unsigned char *)imgData.planes[0];
      unsigned char *pD     = (unsigned char *)_image.data;
      unsigned char *pDEnd  = pD + (info.height * info.width * 3);

        while (pD &amp;lt; pDEnd)
        {
          *pD++ = *pS++;
          *pD++ = *pS++;
          *pD++ = *pS++;
        }

        pI-&amp;gt;ReleaseAccess(&amp;amp;imgData);
      }
    }
  }
}


//---------------------------------------------------------------------
// fetchDepth
//---------------------------------------------------------------------
void  TaskSensorRealSense::fetchDepth(PXCImage *pI)
{
  if (pI)
  {
  PXCImage::ImageInfo info = pI-&amp;gt;QueryInfo();

    if (info.format == PXCImage::PIXEL_FORMAT_DEPTH)
    {
    PXCImage::ImageData imgData;

      if (pI-&amp;gt;AcquireAccess(PXCImage::ACCESS_READ,PXCImage::PIXEL_FORMAT_DEPTH,&amp;amp;imgData) == PXC_STATUS_NO_ERROR)
      {
        _depth.create(info.height,info.width,CV_16UC1);

        {
        unsigned short *pS     = (unsigned short *)imgData.planes[0];
        unsigned short *pD     = (unsigned short *)_depth.data;
        unsigned short *pDEnd  = pD + (info.height * info.width);

          while (pD &amp;lt; pDEnd)
            *pD++ = *pS++ * 32;
//            *pD++ = *pS++;
        }

        pI-&amp;gt;ReleaseAccess(&amp;amp;imgData);
      }
    }
  }
}


//---------------------------------------------------------------------
// exec 
//---------------------------------------------------------------------
void  TaskSensorRealSense::operator()()
{
  if (_pRS-&amp;gt;AcquireFrame(true) == PXC_STATUS_NO_ERROR) 
  {
  PXCCapture::Sample  *pSample  = _pRS-&amp;gt;QuerySample();

    if (pSample-&amp;gt;depth)
      fetchDepth(pSample-&amp;gt;depth);

    if (pSample-&amp;gt;color)
      fetchImage(pSample-&amp;gt;color);

    _pRS-&amp;gt;ReleaseFrame();

    _pSensor-&amp;gt;update(_image,_depth,_cloud);
  } 
}


//---------------------------------------------------------------------
// init 
//---------------------------------------------------------------------
int TaskSensorRealSense::init(void)
{ 
int rc = -1;

  _pRS = PXCSenseManager::CreateInstance();
  
  if (_pRS)
  {
  PXCVideoModule::DataDesc desc={};

    desc.deviceInfo.streams = PXCCapture::STREAM_TYPE_COLOR | PXCCapture::STREAM_TYPE_DEPTH;
    
    _pRS-&amp;gt;EnableStreams(&amp;amp;desc);
    _pRS-&amp;gt;Init();

    rc = 0;
  }

  return rc;
}


//---------------------------------------------------------------------
// TaskSensorRealSense 
//---------------------------------------------------------------------
TaskSensorRealSense::TaskSensorRealSense(void) :  TaskSensor(),
                                                  _pRS(0)
{
}


//---------------------------------------------------------------------
// TaskSensorRealSense 
//---------------------------------------------------------------------
TaskSensorRealSense::~TaskSensorRealSense(void)
{
}&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Dec 2014 21:18:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Weird-Depth-Values/m-p/1023098#M39060</guid>
      <dc:creator>Thomas_Burnett</dc:creator>
      <dc:date>2014-12-12T21:18:14Z</dc:date>
    </item>
    <item>
      <title>The camera works reliably for</title>
      <link>https://community.intel.com/t5/Software-Archive/Weird-Depth-Values/m-p/1023099#M39061</link>
      <description>&lt;P&gt;The camera works reliably for the distances less than 1.5 meters, hope you are with in that range..&lt;/P&gt;

&lt;P&gt;PIXEL_FORMAT_DEPTH provides depth with mm precision, however a special depth value will be assigned to indicate low-confidence depths...you can dig in to this using &amp;nbsp;&lt;SPAN class="f_CodeExample"&gt;&lt;A class="topiclink" href="https://software.intel.com/sites/landingpage/realsense/camera-sdk/2014gold/documentation/html/querydepthlowconfidencevalue_device_pxccapture.html"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;QueryDepthLowConfidenceValue&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;(). The typical reasons for this are too close/far away&amp;nbsp;from the&amp;nbsp;camera and objects with low IR reflectivity. &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN class="f_CodeExample"&gt;Please check whether your issue is down the above lines..&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Dec 2014 17:59:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Weird-Depth-Values/m-p/1023099#M39061</guid>
      <dc:creator>Pubudu-Silva_Intel</dc:creator>
      <dc:date>2014-12-15T17:59:00Z</dc:date>
    </item>
    <item>
      <title>After further investigation,</title>
      <link>https://community.intel.com/t5/Software-Archive/Weird-Depth-Values/m-p/1023100#M39062</link>
      <description>&lt;P&gt;After further investigation, it appears that I only get the weird depth values when I am running the Kinect One at the same time.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Dec 2014 22:08:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Weird-Depth-Values/m-p/1023100#M39062</guid>
      <dc:creator>Thomas_Burnett</dc:creator>
      <dc:date>2014-12-20T22:08:11Z</dc:date>
    </item>
    <item>
      <title>There you go, hope you have</title>
      <link>https://community.intel.com/t5/Software-Archive/Weird-Depth-Values/m-p/1023101#M39063</link>
      <description>&lt;P&gt;There you go, hope you have resolved your issue with that finding... :)&lt;/P&gt;</description>
      <pubDate>Mon, 22 Dec 2014 18:19:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Weird-Depth-Values/m-p/1023101#M39063</guid>
      <dc:creator>Pubudu-Silva_Intel</dc:creator>
      <dc:date>2014-12-22T18:19:35Z</dc:date>
    </item>
    <item>
      <title>Hi, because the Realsense</title>
      <link>https://community.intel.com/t5/Software-Archive/Weird-Depth-Values/m-p/1023102#M39064</link>
      <description>&lt;P&gt;Hi, because the Realsense camera peripheral operates using infrared light that sweeps across the scene, it is very possible and another source of infrared could interfere with its operation, depending on the camera type. &amp;nbsp;Because the sensor cannot predict the state of the other camera's infrared output, it leads to unpredictable values in the depth map, usually striping or dead zones. &amp;nbsp;There are clever tricks that can be employed to get around this limitation, if you are interested, otherwise it is often safest to avoid pointing multiple cameras at the same scene. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Dec 2014 21:28:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Weird-Depth-Values/m-p/1023102#M39064</guid>
      <dc:creator>Jonathan_M_Intel</dc:creator>
      <dc:date>2014-12-22T21:28:01Z</dc:date>
    </item>
  </channel>
</rss>

