<?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 Conflict in sample RF_ScenePerception while using QueryVertices() in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/Conflict-in-sample-RF-ScenePerception-while-using-QueryVertices/m-p/285589#M423</link>
    <description>&lt;P&gt;There came the read access conflict when I tried to use projection-&amp;gt;QueryVertices() to get vertices from depth data in sample RF_ScenePerception(C++ R200).&lt;/P&gt;&lt;P&gt;Part of code(bold font added by myself):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void ScenePerceptionApp::Process()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  while (!m_bTerminateProcessing)&lt;/P&gt;&lt;P&gt;  {&lt;/P&gt;&lt;P&gt;  PXCCapture::Sample *pSample = NULL;&lt;/P&gt;&lt;P&gt;  float cameraPose[12] = { 0 };&lt;/P&gt;&lt;P&gt;  if (!m_pScenePerceptionController-&amp;gt;ProcessNextFrame(pSample, cameraPose, m_trackingAccuracy, m_fCurrentSceneQuality))&lt;/P&gt;&lt;P&gt;  {&lt;/P&gt;&lt;P&gt;  m_processingCallQuit = true;&lt;/P&gt;&lt;P&gt;  return;&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;  UpdateLocalImages(pSample);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;B&gt;PXCProjection *projection = m_pScenePerceptionController-&amp;gt;QueryProjection();&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;  PXCPoint3DF32 *vertices = new PXCPoint3DF32[m_iDepthWidth * m_iDepthHeight];&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;  projection-&amp;gt;QueryVertices(pSample-&amp;gt;depth, vertices);&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;  projection-&amp;gt;Release();&lt;/B&gt;&lt;/P&gt;&lt;P&gt;  ......&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that QueryProjection() returned a null pointer while there is another *projection being used? What is the correct way to get vertices in this C++ sample?&lt;/P&gt;</description>
    <pubDate>Mon, 17 Apr 2017 07:37:04 GMT</pubDate>
    <dc:creator>SL4</dc:creator>
    <dc:date>2017-04-17T07:37:04Z</dc:date>
    <item>
      <title>Conflict in sample RF_ScenePerception while using QueryVertices()</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Conflict-in-sample-RF-ScenePerception-while-using-QueryVertices/m-p/285589#M423</link>
      <description>&lt;P&gt;There came the read access conflict when I tried to use projection-&amp;gt;QueryVertices() to get vertices from depth data in sample RF_ScenePerception(C++ R200).&lt;/P&gt;&lt;P&gt;Part of code(bold font added by myself):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void ScenePerceptionApp::Process()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  while (!m_bTerminateProcessing)&lt;/P&gt;&lt;P&gt;  {&lt;/P&gt;&lt;P&gt;  PXCCapture::Sample *pSample = NULL;&lt;/P&gt;&lt;P&gt;  float cameraPose[12] = { 0 };&lt;/P&gt;&lt;P&gt;  if (!m_pScenePerceptionController-&amp;gt;ProcessNextFrame(pSample, cameraPose, m_trackingAccuracy, m_fCurrentSceneQuality))&lt;/P&gt;&lt;P&gt;  {&lt;/P&gt;&lt;P&gt;  m_processingCallQuit = true;&lt;/P&gt;&lt;P&gt;  return;&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;  UpdateLocalImages(pSample);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;B&gt;PXCProjection *projection = m_pScenePerceptionController-&amp;gt;QueryProjection();&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;  PXCPoint3DF32 *vertices = new PXCPoint3DF32[m_iDepthWidth * m_iDepthHeight];&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;  projection-&amp;gt;QueryVertices(pSample-&amp;gt;depth, vertices);&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;  projection-&amp;gt;Release();&lt;/B&gt;&lt;/P&gt;&lt;P&gt;  ......&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that QueryProjection() returned a null pointer while there is another *projection being used? What is the correct way to get vertices in this C++ sample?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 07:37:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Conflict-in-sample-RF-ScenePerception-while-using-QueryVertices/m-p/285589#M423</guid>
      <dc:creator>SL4</dc:creator>
      <dc:date>2017-04-17T07:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Conflict in sample RF_ScenePerception while using QueryVertices()</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Conflict-in-sample-RF-ScenePerception-while-using-QueryVertices/m-p/285590#M424</link>
      <description>&lt;P&gt;Hi HelloIntelWorld,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Thanks for reaching out.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;To be honest, we are not sure if the issue with QueryProjection() is because you are using another projection.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Did you check the DF_Projection sample?  &lt;A href="https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?sample_projection_cpp.html"&gt;https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?sample_projection_cpp.html&lt;/A&gt;, I recommend you to check that sample to know how the function is used, and use it as a reference for your code.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;I hope you find this useful.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Have a nice day.&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;Leonardo R.</description>
      <pubDate>Mon, 17 Apr 2017 20:57:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Conflict-in-sample-RF-ScenePerception-while-using-QueryVertices/m-p/285590#M424</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2017-04-17T20:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Conflict in sample RF_ScenePerception while using QueryVertices()</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Conflict-in-sample-RF-ScenePerception-while-using-QueryVertices/m-p/285591#M425</link>
      <description>&lt;P&gt;Actually the way to use the function is the same as sample DF_Projection.&lt;/P&gt;&lt;P&gt;However the code in C++ samples looks very strange and unusual(for me at least). For example,&lt;/P&gt;&lt;P&gt;&lt;B&gt;wcout &amp;lt;&amp;lt; L"RF_ScenePerception: Starts." &amp;lt;&amp;lt; endl;&amp;lt;/strong&amp;gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;What is common I think is &lt;B&gt;cout&amp;lt;&amp;lt;"text"&amp;lt;&amp;lt;endl;&amp;lt;/strong&amp;gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Thus I sincerely recommend you to provide a guide of how to use the "uncommon code" or add some annotations for beginner developers like me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well back to the topic, I have solved the problem by myself.&lt;/P&gt;&lt;P&gt;Before using &lt;B&gt;m_pScenePerceptionController-&amp;gt;QueryProjection() &lt;/B&gt;you need to initialize projection firstly. That is why &lt;B&gt;QueryProjection() &lt;/B&gt;returned  a null pointer when I tried first time.&lt;/P&gt;&lt;P&gt;I found &lt;B&gt;InitializeProjection()&lt;/B&gt; in sp_controller.h. It puzzled me that the function has been declared but never used. Then I added &lt;B&gt;m_pScenePerceptionController-&amp;gt;InitializeProjection();&lt;/B&gt; to initialize and used &lt;B&gt;m_pScenePerceptionController-&amp;gt;QueryProjection()-&amp;gt;QueryVertices(pSample-&amp;gt;depth, &amp;amp;myVertices[0]);&lt;/B&gt; in the main loop. Finally I got the vertices successfully.&lt;/P&gt;&lt;P&gt;Thank you a lot for your help! Hope that my work is helpful for others who need.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 07:01:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Conflict-in-sample-RF-ScenePerception-while-using-QueryVertices/m-p/285591#M425</guid>
      <dc:creator>SL4</dc:creator>
      <dc:date>2017-04-18T07:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Conflict in sample RF_ScenePerception while using QueryVertices()</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Conflict-in-sample-RF-ScenePerception-while-using-QueryVertices/m-p/285592#M426</link>
      <description>&lt;P&gt;Hi HelloIntelWorld,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;That's awesome. It is good to know that you solved your issue.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;We really appreciate that you have posted the solution, it definitely will be very helpful for the community, thank you so much.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Have a nice day.&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;Leonardo R.&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 20:28:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Conflict-in-sample-RF-ScenePerception-while-using-QueryVertices/m-p/285592#M426</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2017-04-18T20:28:29Z</dc:date>
    </item>
  </channel>
</rss>

