<?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: Looping through all pixels for depth is too slow in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/Looping-through-all-pixels-for-depth-is-too-slow/m-p/664131#M15342</link>
    <description>&lt;P&gt;First, thank you for all your help! I have seen you are very active in responding to everyone's posts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the info, I tried to create a .bag file and it was created successfully. But the file is too huge (for 1 min).&lt;/P&gt;&lt;P&gt;Is it possible to reduce the frequency of frames in .bag file? I only care about few fps, not many. Can this be configured?&lt;/P&gt;&lt;P&gt;Or is it possible to only record depth values in .bag file, not everything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2019 03:31:53 GMT</pubDate>
    <dc:creator>SMath17</dc:creator>
    <dc:date>2019-03-20T03:31:53Z</dc:date>
    <item>
      <title>Looping through all pixels for depth is too slow</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Looping-through-all-pixels-for-depth-is-too-slow/m-p/664129#M15340</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to save all the depth values in a frame. But if I loop through all pixels, it's too slow for 640 x 480.&lt;/P&gt;&lt;P&gt;I want to save all the depth values in a frame to a text file, but by the time it's done with first frame, we we already missed many many frames. How can I get around this? thanks&lt;/P&gt;&lt;CODE&gt;private void print_DepthFrameData(DepthFrame depth)
        {
            int skipPixels = 1;
            for (int i = 0; i &amp;lt; depth.Width; i += skipPixels)
            {
                for (int j = 0; j &amp;lt; depth.Height; j += skipPixels)
                {
                    string frameNumber = depth.Number.ToString();
                    int pixelPointX = i;
                    int pixelPointY = j;
                    float distanceMM = depth.GetDistance(pixelPointX, pixelPointY);
                    Console.WriteLine(frameNumber + " - " + "(" + pixelPointX + "," + pixelPointY + "): " + distanceMM);
                }
            }
        }&lt;/CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Capture.PNG"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/3589i8AC48CD036631042/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 12:33:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Looping-through-all-pixels-for-depth-is-too-slow/m-p/664129#M15340</guid>
      <dc:creator>SMath17</dc:creator>
      <dc:date>2019-03-19T12:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through all pixels for depth is too slow</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Looping-through-all-pixels-for-depth-is-too-slow/m-p/664130#M15341</link>
      <description>&lt;P&gt;An SDK program called 'rs-depth' in the &lt;B&gt;C &lt;/B&gt;language (&lt;B&gt;not C++ or C#) &lt;/B&gt;prints a text-based representation of the depth image,  This may give you some insights about approaches for optimizing your own script if you prefer to stick with that method.  The script breaks the image into 10x5 pixel regions and approximates the coverage of pixels within one meter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/tree/master/examples/C/depth" target="_self" alt="https://github.com/IntelRealSense/librealsense/tree/master/examples/C/depth"&gt;&lt;/A&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/tree/master/examples/C/depth"&gt;https://github.com/IntelRealSense/librealsense/tree/master/examples/C/depth&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The most efficient way to record data is to save it into a 'bag' file.  Other types of file saving, such as text or 'ply' point cloud data, may be considerably slower to record in real-time.  The long discussion linked to below on the subject of file saving may be useful to you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/issues/1485" target="_self" alt="https://github.com/IntelRealSense/librealsense/issues/1485"&gt;&lt;/A&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/issues/1485"&gt;https://github.com/IntelRealSense/librealsense/issues/1485&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It includes a script provided by Dorodnic the RealSense SDK Manager to save raw depth data into a file as bytes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/issues/1485#issuecomment-379703868" target="_self" alt="https://github.com/IntelRealSense/librealsense/issues/1485#issuecomment-379703868"&gt;&lt;/A&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/issues/1485#issuecomment-379703868"&gt;https://github.com/IntelRealSense/librealsense/issues/1485#issuecomment-379703868&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A bag file recording can also be converted outside of a program to a text file format called .csv that is suited to spreadsheets and databases.  This can be done with a tool in the RealSense SDK called &lt;B&gt;Convert&lt;/B&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/tree/master/tools/convert" target="_self" alt="https://github.com/IntelRealSense/librealsense/tree/master/tools/convert"&gt;&lt;/A&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/tree/master/tools/convert"&gt;https://github.com/IntelRealSense/librealsense/tree/master/tools/convert&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 14:17:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Looping-through-all-pixels-for-depth-is-too-slow/m-p/664130#M15341</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2019-03-19T14:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through all pixels for depth is too slow</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Looping-through-all-pixels-for-depth-is-too-slow/m-p/664131#M15342</link>
      <description>&lt;P&gt;First, thank you for all your help! I have seen you are very active in responding to everyone's posts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the info, I tried to create a .bag file and it was created successfully. But the file is too huge (for 1 min).&lt;/P&gt;&lt;P&gt;Is it possible to reduce the frequency of frames in .bag file? I only care about few fps, not many. Can this be configured?&lt;/P&gt;&lt;P&gt;Or is it possible to only record depth values in .bag file, not everything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 03:31:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Looping-through-all-pixels-for-depth-is-too-slow/m-p/664131#M15342</guid>
      <dc:creator>SMath17</dc:creator>
      <dc:date>2019-03-20T03:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through all pixels for depth is too slow</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Looping-through-all-pixels-for-depth-is-too-slow/m-p/664132#M15343</link>
      <description>&lt;P&gt;Thanks for your kind words!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I responded to your post on the GitHub.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/issues/3537?language=en_US#issuecomment-474578076"&gt;https://github.com/IntelRealSense/librealsense/issues/3537?language=en_US#issuecomment-474578076&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 05:39:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Looping-through-all-pixels-for-depth-is-too-slow/m-p/664132#M15343</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2019-03-20T05:39:05Z</dc:date>
    </item>
  </channel>
</rss>

