<?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 how can i take video stream in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041456#M46199</link>
    <description>&lt;P&gt;how can i take video stream such as rgb, depth, ir in mat variable for processing.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;thanks !!&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jan 2015 11:51:49 GMT</pubDate>
    <dc:creator>Deepak_k_</dc:creator>
    <dc:date>2015-01-07T11:51:49Z</dc:date>
    <item>
      <title>Use openCV with Intel Realsense SDK</title>
      <link>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041454#M46197</link>
      <description>&lt;P style="font-size: 12px;"&gt;hi,&lt;/P&gt;

&lt;P style="font-size: 12px;"&gt;I want to do some image processing using depth and RGB stram of realsense camera. but i am not able to integrate opencv with realsense sdk. how can i receive depth frame in Mat variable of opencv so that i can do some processing in it.&lt;/P&gt;

&lt;P style="font-size: 12px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 12px;"&gt;thanks !!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2015 16:37:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041454#M46197</guid>
      <dc:creator>Deepak_k_</dc:creator>
      <dc:date>2015-01-06T16:37:36Z</dc:date>
    </item>
    <item>
      <title>RealSense SDK doesn't provide</title>
      <link>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041455#M46198</link>
      <description>&lt;P&gt;RealSense SDK doesn't provide frames in mat format, but you can easily convert to mat&lt;/P&gt;

&lt;P&gt;first you access frame data as follows&lt;/P&gt;

&lt;P class="p_CodeExample"&gt;&lt;SPAN class="f_CodeExample"&gt;&lt;SPAN&gt;// &lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;image&lt;/SPAN&gt; is a PXC&lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;Image&lt;/SPAN&gt; instance&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample"&gt;&lt;SPAN class="f_CodeExample"&gt;&lt;SPAN&gt;PXC&lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;Image&lt;/SPAN&gt;::&lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;Image&lt;/SPAN&gt;&lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;Data&lt;/SPAN&gt; &lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;data&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample"&gt;&lt;SPAN class="f_CodeExample"&gt;&lt;SPAN&gt;&lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;image&lt;/SPAN&gt;-&amp;gt;AcquireAccess(PXC&lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;Image&lt;/SPAN&gt;::ACCESS_READ,&amp;amp;&lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;data&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample"&gt;&lt;SPAN class="f_CodeExample"&gt;&lt;SPAN&gt;Note: &amp;nbsp;&lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;image&lt;/SPAN&gt; planes are in &lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;data&lt;/SPAN&gt;.planes[0-3] with pitch &lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;data&lt;/SPAN&gt;.pitches[0-3]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P class="p_CodeExample"&gt;&lt;SPAN class="f_CodeExample"&gt;&lt;SPAN&gt;Then you create an empty Mat using a constructor like this&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample"&gt;&lt;A href="http://docs.opencv.org/2.4/modules/core/doc/basic_structures.html#mat"&gt;&lt;STRONG&gt;&lt;U&gt;&lt;FONT color="#0066cc" face="Courier New"&gt;Mat&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;mat(int&amp;nbsp;rows, int&amp;nbsp;cols, int&amp;nbsp;type)&lt;/FONT&gt;&lt;/P&gt;

&lt;P class="p_CodeExample"&gt;after that you can copy data in to your&amp;nbsp; mat from&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;data&lt;/EM&gt; &lt;/STRONG&gt;above.&lt;/P&gt;

&lt;P class="p_CodeExample"&gt;finally release access to &lt;EM&gt;&lt;STRONG&gt;data &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P class="p_CodeExample"&gt;&lt;SPAN class="f_CodeExample"&gt;&lt;SPAN&gt;&lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;image&lt;/SPAN&gt;-&amp;gt;ReleaseAccess(&amp;amp;&lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;data&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2015 18:27:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041455#M46198</guid>
      <dc:creator>Pubudu-Silva_Intel</dc:creator>
      <dc:date>2015-01-06T18:27:00Z</dc:date>
    </item>
    <item>
      <title>how can i take video stream</title>
      <link>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041456#M46199</link>
      <description>&lt;P&gt;how can i take video stream such as rgb, depth, ir in mat variable for processing.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;thanks !!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 11:51:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041456#M46199</guid>
      <dc:creator>Deepak_k_</dc:creator>
      <dc:date>2015-01-07T11:51:49Z</dc:date>
    </item>
    <item>
      <title>Well the type of stream you</title>
      <link>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041457#M46200</link>
      <description>&lt;P&gt;Well the type of stream you get by the AquireAccess() is based on the type of PXCImage you called that method on :)&lt;/P&gt;

&lt;P&gt;So if you want get RGB image frame, for example then you do the following&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;psm = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;PXCSenseManager&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;::CreateInstance();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;then for each&amp;nbsp;frame you do&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;PXCCapture&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;::&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Sample&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; *sample = psm-&amp;gt;QuerySample();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;PXCImage&amp;nbsp;*rgbImage = sample-&amp;gt;color;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;PXCImage::ImageData frmData;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;rgbImage-&amp;gt;AcquireAccess(PXCImage::ACCESS_READ, PXCIMAGE::PIXEL_FORMAT_NV12, &amp;amp;frmData);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;then you create a mat and copy the data over from frmData. Once you no longer need frmData, you just release the access&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;rgbImage-&amp;gt;ReleaseAccess(&amp;amp;frmData);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;Hope this helps&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 18:59:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041457#M46200</guid>
      <dc:creator>Pubudu-Silva_Intel</dc:creator>
      <dc:date>2015-01-07T18:59:08Z</dc:date>
    </item>
    <item>
      <title>This is what I am currently</title>
      <link>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041458#M46201</link>
      <description>&lt;P&gt;This is what I am currently using:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;cv::Mat frameColor = cv::Mat::zeros(resolutionColor.height, resolutionColor.width, CV_8UC3);
cv::Mat frameDepth = cv::Mat::zeros(resolutionDepth.height, resolutionDepth.width, CV_32FC1);
cv::Mat frameIR = cv::Mat::zeros(resolutionIR.height, resolutionIR.width, CV_8UC1);&lt;/PRE&gt;

&lt;P&gt;color stream:&lt;/P&gt;

&lt;P&gt;PXCImage::PIXEL_FORMAT_RGB32, and then read the image as BGRA unsigned ints.&lt;/P&gt;

&lt;P&gt;depth stream:&lt;BR /&gt;
	PXCImage::PIXEL_FORMAT_DEPTH_F32, and then read the image as floats.&lt;/P&gt;

&lt;P&gt;IR stream:&lt;BR /&gt;
	PXCImage::PIXEL_FORMAT_Y8, and then read the image as unsigned chars.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 00:04:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041458#M46201</guid>
      <dc:creator>samontab</dc:creator>
      <dc:date>2015-01-08T00:04:54Z</dc:date>
    </item>
    <item>
      <title>this is what i am doing to</title>
      <link>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041459#M46202</link>
      <description>&lt;P&gt;this is what i am doing to get depth stream.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;/* Creates an instance of the PXCSenseManager */&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; PXCSenseManager *pp = PXCSenseManager::CreateInstance();&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; if (!pp)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wprintf_s(L"Unable to create the SenseManager\n");&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 3;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; }&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Collects command line arguments */&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; UtilCmdLine cmdl(pp-&amp;gt;QuerySession());&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; if (!cmdl.Parse(L"-listio-nframes-sdname-csize-dsize-isize-file-record-noRender-mirror",argc,argv)) return 3;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Create stream renders&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; UtilRender renderd(L"Depth");&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; pxcStatus sts;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; do {&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Apply command line arguments */&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (cmdl.m_dsize.size()&amp;gt;0)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pp-&amp;gt;EnableStream(PXCCapture::STREAM_TYPE_DEPTH, cmdl.m_dsize.front().first.width, cmdl.m_dsize.front().first.height, (pxcF32)cmdl.m_dsize.front().second);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Sets file recording or playback */&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;PXCCaptureManager *cm=pp-&amp;gt;QueryCaptureManager();&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cm-&amp;gt;SetFileName(cmdl.m_recordedFile, cmdl.m_bRecord);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (cmdl.m_sdname) cm-&amp;gt;FilterByDeviceInfo(cmdl.m_sdname,0,0);&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (cmdl.m_csize.size()==0 &amp;amp;&amp;amp; cmdl.m_dsize.size()==0 &amp;amp;&amp;amp; cmdl.m_isize.size()==0)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PXCVideoModule::DataDesc desc={};&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (cm-&amp;gt;QueryCapture())&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cm-&amp;gt;QueryCapture()-&amp;gt;QueryDeviceInfo(0, &amp;amp;desc.deviceInfo);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; desc.deviceInfo.streams = PXCCapture::STREAM_TYPE_DEPTH;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pp-&amp;gt;EnableStreams(&amp;amp;desc);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Initializes the pipeline */&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sts = pp-&amp;gt;Init();&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sts&amp;lt;PXC_STATUS_NO_ERROR) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wprintf_s(L"Failed to locate any video stream(s)\n");&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Stream Data */&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int nframes=0;nframes&amp;lt;cmdl.m_nframes;nframes++) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Waits until new frame is available and locks it for application processing */&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sts=pp-&amp;gt;AcquireFrame(false);&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sts&amp;lt;PXC_STATUS_NO_ERROR) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sts==PXC_STATUS_STREAM_CONFIG_CHANGED) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cerr &amp;lt;&amp;lt; "Stream configuration was changed, re-initilizing\n" &amp;lt;&amp;lt; endl;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pp-&amp;gt;Close();&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Render streams, unless -noRender is selected */&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (cmdl.m_bNoRender == false)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const PXCCapture::Sample *sample = pp-&amp;gt;QuerySample();&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sample)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sample-&amp;gt;depth &amp;amp;&amp;amp; !renderd.RenderFrame(sample-&amp;gt;depth)) break;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Releases lock so pipeline can process next frame */&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pp-&amp;gt;ReleaseFrame();&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if( _kbhit() ) { // Break loop&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int c = _getch() &amp;amp; 255;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if( c == 27 || c == 'q' || c == 'Q') break; // ESC|q|Q for Exit&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;} while (sts == PXC_STATUS_STREAM_CONFIG_CHANGED);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cerr &amp;lt;&amp;lt;"Exiting..."&amp;lt;&amp;lt;endl;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;now where should i add&amp;nbsp;&lt;/P&gt;

&lt;PRE style="color: rgb(0, 0, 0); line-height: normal;"&gt;cv::Mat frameDepth = cv::Mat::zeros(resolutionDepth.height, resolutionDepth.width, CV_32FC1);&lt;/PRE&gt;

&lt;P&gt;in the code so that i can get depth stream in Mat frameDepth.&lt;/P&gt;

&lt;P&gt;i am not able to get depth stream in Mat variable.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;can you please provide me full source code where mat access any stream . I am stucked from last 10 days into same place.&lt;/P&gt;

&lt;P&gt;please help me&amp;nbsp;&lt;/P&gt;

&lt;P&gt;thanks !!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 10:36:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041459#M46202</guid>
      <dc:creator>Deepak_k_</dc:creator>
      <dc:date>2015-01-08T10:36:04Z</dc:date>
    </item>
    <item>
      <title>You will find a solution here</title>
      <link>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041460#M46203</link>
      <description>&lt;P&gt;You will find a solution here: &lt;A href="http://stackoverflow.com/questions/32609341/comvert-a-pxcimage-into-an-opencv-mat/32609342" target="_blank"&gt;http://stackoverflow.com/questions/32609341/comvert-a-pxcimage-into-an-opencv-mat/32609342&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Rémy&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2015 13:05:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041460#M46203</guid>
      <dc:creator>Rémy_B_</dc:creator>
      <dc:date>2015-09-16T13:05:59Z</dc:date>
    </item>
    <item>
      <title>hey!</title>
      <link>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041461#M46204</link>
      <description>&lt;P&gt;hey!&lt;/P&gt;

&lt;P&gt;how do u get a good depth result with librealsense?&lt;/P&gt;

&lt;P&gt;I am currently using this:&lt;/P&gt;

&lt;P&gt;const uint16_t * depth_frame = reinterpret_cast&amp;lt;const uint16_t *&amp;gt;(dev-&amp;gt;get_frame_data(rs::stream::depth));&lt;BR /&gt;
	cv::Mat depth16(360, 480, CV_16U, (void*)depth_frame);&lt;BR /&gt;
	cv::Mat depthM(depth16.size().height, depth16.size().width, CV_8UC1);&lt;BR /&gt;
	depth16.convertTo(depthM, CV_8UC1);&lt;/P&gt;

&lt;P&gt;// min/max distance from the camera&lt;BR /&gt;
	unsigned short min = 0.5, max = 2.5;&lt;BR /&gt;
	cv::Mat img0 = cv::Mat::zeros(depthM.size().height, depthM.size().width, CV_8UC1);&lt;BR /&gt;
	cv::Mat depth_show;&lt;BR /&gt;
	double scale_ = 255.0 / (max-min);&lt;/P&gt;

&lt;P&gt;depthM.convertTo(img0, CV_8UC1, scale_);&lt;BR /&gt;
	cv::applyColorMap(img0, depth_show, cv::COLORMAP_COOL);&lt;/P&gt;

&lt;P&gt;cv::imshow("DEPTH", depth_show);&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;it returns a "depth image" from the video, but it is really noise with grains, not possible to see details of depth.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 10:29:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Use-openCV-with-Intel-Realsense-SDK/m-p/1041461#M46204</guid>
      <dc:creator>Lesly_Z_</dc:creator>
      <dc:date>2016-08-11T10:29:54Z</dc:date>
    </item>
  </channel>
</rss>

