<?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 Re: vertices values are all zero from QueryVertices in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/vertices-values-are-all-zero-from-QueryVertices/m-p/452920#M3439</link>
    <description>&lt;P&gt;Hi MonaJalal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;I have noticed that you have this other thread: /message/474808# 474808 why all the pos3d values are zero while posUVZ values are not zero and how to fix it?, regarding the same issue. I'd like to let you know that in order to avoid duplicates I'll close this thread and you will be helped by Leonardo in the other one.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Regards,&lt;P&gt;&amp;nbsp;&lt;/P&gt;-Yermi A.&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 May 2017 22:51:38 GMT</pubDate>
    <dc:creator>idata</dc:creator>
    <dc:date>2017-05-22T22:51:38Z</dc:date>
    <item>
      <title>vertices values are all zero from QueryVertices</title>
      <link>https://community.intel.com/t5/Items-with-no-label/vertices-values-are-all-zero-from-QueryVertices/m-p/452916#M3435</link>
      <description>&lt;P&gt;I have the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/***&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Reads the depth data from the sensor and fills in the matrix&lt;P&gt;&amp;nbsp;&lt;/P&gt;***/&lt;P&gt;&amp;nbsp;&lt;/P&gt;void SR300Camera::fillInZCoords()&lt;P&gt;&amp;nbsp;&lt;/P&gt;{&lt;P&gt;&amp;nbsp;&lt;/P&gt; //int res = pmdGet3DCoordinates(hnd, dists, 3 * numPixels * sizeof(float)); //store x,y,z coordinates dists (type: float*)&lt;P&gt;&amp;nbsp;&lt;/P&gt; ////float * zCoords = new float[1]; //store z-Coordinates of dists in zCoords&lt;P&gt;&amp;nbsp;&lt;/P&gt; //xyzMap = cv::Mat(xyzMap.size(), xyzMap.type(), dists);&lt;P&gt;&amp;nbsp;&lt;/P&gt; Projection *projection = pp-&amp;gt;QueryCaptureManager()-&amp;gt;QueryDevice()-&amp;gt;CreateProjection();&lt;P&gt;&amp;nbsp;&lt;/P&gt; std::vector vertices;&lt;P&gt;&amp;nbsp;&lt;/P&gt; vertices.resize(depth_width * depth_height);&lt;P&gt;&amp;nbsp;&lt;/P&gt; projection-&amp;gt;QueryVertices(sample-&amp;gt;depth, vertices.data());&lt;P&gt;&amp;nbsp;&lt;/P&gt; xyzBuffer.clear();&lt;P&gt;&amp;nbsp;&lt;/P&gt; //for (int i = 0; i &amp;lt; bufferSize.width*bufferSize.height; i++) {&lt;P&gt;&amp;nbsp;&lt;/P&gt; for (int i=0; i&amp;lt; depth_width*depth_height; i++) {&lt;P&gt;&amp;nbsp;&lt;/P&gt;  //cv::Point3f p;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  //p.x = vertices[i].x;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  //p.y = vertices[i].y;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  //p.z = vertices[i].z;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  //xyzBuffer.push_back(p);&lt;P&gt;&amp;nbsp;&lt;/P&gt;  cout &amp;lt;&amp;lt; "x= " &amp;lt;&amp;lt; vertices[i].x &amp;lt;&amp;lt; endl;&amp;lt;p&amp;gt;&amp;nbsp;  cout &amp;lt;&amp;lt; "y= " &amp;lt;&amp;lt; vertices[i].y &amp;lt;&amp;lt; endl;&amp;lt;p&amp;gt;&amp;nbsp;  cout &amp;lt;&amp;lt; "z= " &amp;lt;&amp;lt; vertices[i].z &amp;lt;&amp;lt; endl;&lt;P&gt;  xyzBuffer.push_back(cv::Point3f(vertices[i].x, vertices[i].y, vertices[i].z));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt; }&lt;P&gt;&lt;/P&gt;&lt;P&gt; xyzMap = cv::Mat(xyzBuffer);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt; cout &amp;lt;&amp;lt; "xyzMap = " &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; xyzMap &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;P&gt; projection-&amp;gt;Release();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;}&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it returns zero for all the x, y, z. Basically, I am trying to write the same function as below for RealSense:&lt;/P&gt;&lt;P&gt;void PMDCamera::fillInZCoords()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; int res = pmdGet3DCoordinates(hnd, dists, 3 * numPixels * sizeof(float)); //store x,y,z coordinates dists (type: float*)&lt;/P&gt;&lt;P&gt; //float * zCoords = new float[1]; //store z-Coordinates of dists in zCoords&lt;/P&gt;&lt;P&gt; xyzMap = cv::Mat(xyzMap.size(), xyzMap.type(), dists);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thought on how to fix my RealSense counterpart to get the correct values instead of zero is really appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cv::Mat xyzMap;&lt;/P&gt;&lt;P&gt;std::vector xyzBuffer;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is similar to &lt;A href="https://software.intel.com/en-us/forums/realsense/topic/675750"&gt;https://software.intel.com/en-us/forums/realsense/topic/675750&lt;/A&gt; The PXCProjection::ProjectDepthToCamera function  in that I am trying to get the xyzMap from the realsense. Unfortunately, I couldn't find a working piece of code yet for so.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 21:30:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/vertices-values-are-all-zero-from-QueryVertices/m-p/452916#M3435</guid>
      <dc:creator>MJala</dc:creator>
      <dc:date>2017-05-15T21:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: vertices values are all zero from QueryVertices</title>
      <link>https://community.intel.com/t5/Items-with-no-label/vertices-values-are-all-zero-from-QueryVertices/m-p/452917#M3436</link>
      <description>&lt;P&gt;Hi MonaJalal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Thanks for your interest in the Intel RealSense Technology.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;I'd like to suggest you to take a look at this other thread: /message/468049# 468049 how can i change sr300 hw setting  room hand face body, there is a discussion regarding the value of the vertices that they are sometimes (0,0,0) or (-1,-1-,1) depending on the distance from the object to the camera, please look at that thread for more information. Also, if I'm right, you are using the SR300 camera (looking at your code), which its range is .2m – 1.5m, so you could test if at different distances you still get 0 values.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Hope this information helps.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Regards,&lt;P&gt;&amp;nbsp;&lt;/P&gt;-Yermi A.&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 20:44:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/vertices-values-are-all-zero-from-QueryVertices/m-p/452917#M3436</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2017-05-16T20:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: vertices values are all zero from QueryVertices</title>
      <link>https://community.intel.com/t5/Items-with-no-label/vertices-values-are-all-zero-from-QueryVertices/m-p/452918#M3437</link>
      <description>&lt;P&gt;Hi Yermi,&lt;/P&gt;&lt;P&gt;The values from posUVZ are non-zero and when fed to &lt;CODE&gt;projection-&amp;gt;ProjectDepthToCamera(wxhDepth, posUVZ, pos3D); &lt;/CODE&gt; they all become zero. I have tested the projection separately and it never errs. &lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/43991565/all-the-pos3d-values-are-zero-while-posuvz-values-are-not-zero"&gt;http://stackoverflow.com/questions/43991565/all-the-pos3d-values-are-zero-while-posuvz-values-are-not-zero&lt;/A&gt; c++ - all the pos3d values are zero while posUVZ values are not zero - Stack Overflow &lt;/P&gt;&lt;P&gt;Any insight about what goes wrong in that method?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mona Jalal&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 18:36:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/vertices-values-are-all-zero-from-QueryVertices/m-p/452918#M3437</guid>
      <dc:creator>MJala</dc:creator>
      <dc:date>2017-05-19T18:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: vertices values are all zero from QueryVertices</title>
      <link>https://community.intel.com/t5/Items-with-no-label/vertices-values-are-all-zero-from-QueryVertices/m-p/452919#M3438</link>
      <description>&lt;P&gt;Hi MonaJalal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Please let us investigate a little bit more regarding that and as soon as I have useful information I'll let you know.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;I'll appreciate your patience during the meantime.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Regards,&lt;P&gt;&amp;nbsp;&lt;/P&gt;-Yermi A.&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 18:04:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/vertices-values-are-all-zero-from-QueryVertices/m-p/452919#M3438</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2017-05-22T18:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: vertices values are all zero from QueryVertices</title>
      <link>https://community.intel.com/t5/Items-with-no-label/vertices-values-are-all-zero-from-QueryVertices/m-p/452920#M3439</link>
      <description>&lt;P&gt;Hi MonaJalal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;I have noticed that you have this other thread: /message/474808# 474808 why all the pos3d values are zero while posUVZ values are not zero and how to fix it?, regarding the same issue. I'd like to let you know that in order to avoid duplicates I'll close this thread and you will be helped by Leonardo in the other one.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Regards,&lt;P&gt;&amp;nbsp;&lt;/P&gt;-Yermi A.&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 22:51:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/vertices-values-are-all-zero-from-QueryVertices/m-p/452920#M3439</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2017-05-22T22:51:38Z</dc:date>
    </item>
  </channel>
</rss>

