<?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 @Dan in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Saving-color-and-depth-frames/m-p/1059660#M53474</link>
    <description>&lt;P&gt;@Dan&lt;/P&gt;

&lt;P&gt;As you have suggested I have tried the same using a function. But I'm not able to record the frames to a specified folder. I have attached the file, please correct me if I'm wrong&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Sep 2015 08:25:26 GMT</pubDate>
    <dc:creator>varsha_h_</dc:creator>
    <dc:date>2015-09-03T08:25:26Z</dc:date>
    <item>
      <title>Saving color and depth frames</title>
      <link>https://community.intel.com/t5/Software-Archive/Saving-color-and-depth-frames/m-p/1059657#M53471</link>
      <description>&lt;P&gt;Hey all, I'm working on Intel RealSense SDK (R2). I want to save the image from Camera_viewer. I have worked till saving the frame to specific buffers and retrieving from the same. I want to know how to save those frames/images to a specified location/folder.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Here's my code:&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; PXCImage *colorIm, *depthIm;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;for (int i=0; i&amp;lt;MAX_FRAMES; i++) {&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// This function blocks until all streams are ready (depth and color)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// if false streams will be unaligned&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (psm-&amp;gt;AcquireFrame(true)&amp;lt;PXC_STATUS_NO_ERROR) break;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// retrieve all available image samples&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;PXCCapture::Sample *sample = psm-&amp;gt;QuerySample();&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// retrieve the image or frame by type from the sample&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;colorIm = sample-&amp;gt;color;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;depthIm = sample-&amp;gt;depth;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// render the frame&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (!renderColor-&amp;gt;RenderFrame(colorIm)) break;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (!renderDepth-&amp;gt;RenderFrame(depthIm)) break;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// release or unlock the current frame to fetch the next frame&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;psm-&amp;gt;ReleaseFrame();&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;

&lt;P&gt;I'm able to retrieve the frames/images successfully, but I want to save those files for further use. So I want to know how to save those files in a folder.&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2015 02:45:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Saving-color-and-depth-frames/m-p/1059657#M53471</guid>
      <dc:creator>varsha_h_</dc:creator>
      <dc:date>2015-08-24T02:45:27Z</dc:date>
    </item>
    <item>
      <title>The CaptureManager has a</title>
      <link>https://community.intel.com/t5/Software-Archive/Saving-color-and-depth-frames/m-p/1059658#M53472</link>
      <description>&lt;P&gt;The CaptureManager has a SetFileName method that will let you record to a file. &amp;nbsp;There's an example in the SDK documentation you might find helpful:&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;void RecordORPlayback(pxcCHAR *file, bool record) {&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;// Create a SenseManager instance&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;PXCSenseManager *sm=PXCSenseManager::CreateInstance();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;// Set file recording or playback&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;sm-&amp;gt;QueryCaptureManager()-&amp;gt;SetFileName(file,record);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;// Select the color stream&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;sm-&amp;gt;EnableStream(PXCCapture.STREAM_TYPE_COLOR,640,480,0);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;// Initialize and Record 300 frames&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;sm-&amp;gt;Init();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;for (int i=0;i&amp;lt;300;i++) {&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// This function blocks until a color sample is ready&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (sm-&amp;gt;AcquireFrame(true)&amp;lt;PXC_STATUS_NO_ERROR) break;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Retrieve the sample&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PXCCapture::Sample *sample=sm-&amp;gt;QuerySample();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Work on the image sample-&amp;gt;color&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Go fetching the next sample&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sm-&amp;gt;ReleaseFrame();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;// close down&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;sm-&amp;gt;Release();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: 'Intel Clear'; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2015 20:41:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Saving-color-and-depth-frames/m-p/1059658#M53472</guid>
      <dc:creator>Dan_Middleton</dc:creator>
      <dc:date>2015-08-24T20:41:42Z</dc:date>
    </item>
    <item>
      <title>Thank you so much. Do i have</title>
      <link>https://community.intel.com/t5/Software-Archive/Saving-color-and-depth-frames/m-p/1059659#M53473</link>
      <description>&lt;P&gt;Thank you so much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2015 03:10:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Saving-color-and-depth-frames/m-p/1059659#M53473</guid>
      <dc:creator>varsha_h_</dc:creator>
      <dc:date>2015-08-25T03:10:00Z</dc:date>
    </item>
    <item>
      <title>@Dan</title>
      <link>https://community.intel.com/t5/Software-Archive/Saving-color-and-depth-frames/m-p/1059660#M53474</link>
      <description>&lt;P&gt;@Dan&lt;/P&gt;

&lt;P&gt;As you have suggested I have tried the same using a function. But I'm not able to record the frames to a specified folder. I have attached the file, please correct me if I'm wrong&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 08:25:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Saving-color-and-depth-frames/m-p/1059660#M53474</guid>
      <dc:creator>varsha_h_</dc:creator>
      <dc:date>2015-09-03T08:25:26Z</dc:date>
    </item>
    <item>
      <title>hey!</title>
      <link>https://community.intel.com/t5/Software-Archive/Saving-color-and-depth-frames/m-p/1059661#M53475</link>
      <description>&lt;P&gt;hey!&lt;/P&gt;

&lt;P&gt;how can I apply the same for librealsense?&lt;/P&gt;

&lt;P&gt;I am trying to use:&lt;/P&gt;

&lt;P&gt;&lt;CODE class="plain"&gt;RS_STREAM_COLOR_ALIGNED_TO_DEPTH&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;for getting something similar to the example in cpp-align&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 16:48:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Saving-color-and-depth-frames/m-p/1059661#M53475</guid>
      <dc:creator>Lesly_Z_</dc:creator>
      <dc:date>2016-08-11T16:48:18Z</dc:date>
    </item>
  </channel>
</rss>

