<?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: Depth of a Pixel in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558508#M9222</link>
    <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a way of getting distance values for all pixels at once?&lt;/P&gt;</description>
    <pubDate>Tue, 29 May 2018 15:41:50 GMT</pubDate>
    <dc:creator>MAlde3</dc:creator>
    <dc:date>2018-05-29T15:41:50Z</dc:date>
    <item>
      <title>Depth of a Pixel</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558504#M9218</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the correct way of reading the depth of individual pixels in C++?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to copy depth matrix (without colorizing) to an OpenCV Mat and then make calculations with it.&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 14:39:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558504#M9218</guid>
      <dc:creator>MAlde3</dc:creator>
      <dc:date>2018-05-29T14:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Depth of a Pixel</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558505#M9219</link>
      <description>&lt;P&gt;Are you using RealSense SDK 2.0 or the older '2016 R2' or '2016 R3' RealSense SDK, please?&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 14:49:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558505#M9219</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-05-29T14:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Depth of a Pixel</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558506#M9220</link>
      <description>&lt;P&gt;I am using RealSense SDK 2.0  on a RS300, which will be replaced with D435&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 15:31:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558506#M9220</guid>
      <dc:creator>MAlde3</dc:creator>
      <dc:date>2018-05-29T15:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Depth of a Pixel</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558507#M9221</link>
      <description>&lt;P&gt;Here's some C++ code for getting pixel depth in meters in SDK 2.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs2::depth_frame dpt_frame = &lt;A href="http://frame.as"&gt;frame.as&lt;/A&gt;();&lt;/P&gt;&lt;P&gt;float pixel_distance_in_meters = dpt_frame.get_distance(x,y);&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 15:35:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558507#M9221</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-05-29T15:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Depth of a Pixel</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558508#M9222</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a way of getting distance values for all pixels at once?&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 15:41:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558508#M9222</guid>
      <dc:creator>MAlde3</dc:creator>
      <dc:date>2018-05-29T15:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Depth of a Pixel</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558509#M9223</link>
      <description>&lt;P&gt;I wonder if a Point Cloud would be a suitable way for you to get all depth points at the same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/tree/master/examples/pointcloud"&gt;https://github.com/IntelRealSense/librealsense/tree/master/examples/pointcloud&lt;/A&gt; librealsense/examples/pointcloud at master · IntelRealSense/librealsense · GitHub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also get a point cloud in the RealSense Viewer software by clicking on the '3D' option next to '2D' in the top corner of the Viewer program when a stream is playing.&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 15:52:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558509#M9223</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-05-29T15:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Depth of a Pixel</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558510#M9224</link>
      <description>&lt;P&gt;I need the depth of every pixel for calculations in OpenCV. It will be running on an embedded device with Ubuntu, so Realsense Viewer is not an option.&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 16:13:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558510#M9224</guid>
      <dc:creator>MAlde3</dc:creator>
      <dc:date>2018-05-29T16:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Depth of a Pixel</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558511#M9225</link>
      <description>&lt;P&gt;rs2_deproject_pixel_to_point may do the job.  Deprojection takes a 2D pixel location on a stream's images, as well as a depth, specified in meters, and maps it to a 3D point location within the stream's associated 3D coordinate space. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/issues/1413"&gt;https://github.com/IntelRealSense/librealsense/issues/1413&lt;/A&gt; deprojection pixels to 3d point · Issue # 1413 · IntelRealSense/librealsense · GitHub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may also be interested in a pre-made depth program for OpenCV by developer UnaNancyOwen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/UnaNancyOwen/RealSense2Sample/tree/master/sample/Depth"&gt;https://github.com/UnaNancyOwen/RealSense2Sample/tree/master/sample/Depth&lt;/A&gt; RealSense2Sample/sample/Depth at master · UnaNancyOwen/RealSense2Sample · GitHub &lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 16:48:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558511#M9225</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-05-29T16:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Depth of a Pixel</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558512#M9226</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done it this way;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quote&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;float darray [480 * 640];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;{&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; //Contruct a pipeline which abstracts the device&lt;P&gt;&amp;nbsp;&lt;/P&gt; rs2::pipeline pipe;&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; //Create a configuration for configuring the pipeline with a non default profile&lt;P&gt;&amp;nbsp;&lt;/P&gt; rs2::config cfg;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  &lt;P&gt;&amp;nbsp;&lt;/P&gt; //Add desired streams to configuration&lt;P&gt;&amp;nbsp;&lt;/P&gt; cfg.enable_stream(RS2_STREAM_COLOR, 640, 480, RS2_FORMAT_BGR8, 15);&lt;P&gt;&amp;nbsp;&lt;/P&gt; cfg.enable_stream(RS2_STREAM_INFRARED, 640, 480, RS2_FORMAT_Y8, 15);&lt;P&gt;&amp;nbsp;&lt;/P&gt; cfg.enable_stream(RS2_STREAM_DEPTH, 640, 480, RS2_FORMAT_Z16, 15);&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt; //Instruct pipeline to start streaming with the requested configuration&lt;P&gt;&amp;nbsp;&lt;/P&gt; pipe.start(cfg);&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; namedWindow("Colour", WINDOW_AUTOSIZE); namedWindow("IR", WINDOW_AUTOSIZE); &lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt; while (1) {&lt;P&gt;  rs2::frameset frames;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  &lt;P&gt;&amp;nbsp;&lt;/P&gt;   //Wait for all configured streams to produce a frame&lt;P&gt;&amp;nbsp;&lt;/P&gt;   frames = pipe.wait_for_frames();&lt;P&gt;&amp;nbsp;&lt;/P&gt;  &lt;P&gt;&amp;nbsp;&lt;/P&gt;   // Try to get a frame of a depth image&lt;P&gt;&amp;nbsp;&lt;/P&gt;   rs2::depth_frame d = frames.get_depth_frame();&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   // darray contains distance meters of all the x,y&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;   for (int j = 0; j &amp;lt; 480; j++)&lt;P&gt;&amp;nbsp;&lt;/P&gt;   {&lt;P&gt;    for (int i = 0; i&amp;lt; 640; i++)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;    {&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;     darray[i + (j * 640)]= d.get_distance(i, j);&lt;P&gt;&amp;nbsp;&lt;/P&gt;     &lt;P&gt;&amp;nbsp;&lt;/P&gt;    }&lt;P&gt;&amp;nbsp;&lt;/P&gt;    &lt;P&gt;&amp;nbsp;&lt;/P&gt;   }&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  &lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  //Get each frame&lt;P&gt;&amp;nbsp;&lt;/P&gt;  rs2::frame color_frame = frames.get_color_frame();&lt;P&gt;&amp;nbsp;&lt;/P&gt;  rs2::frame ir_frame = frames.first(RS2_STREAM_INFRARED);&lt;P&gt;&amp;nbsp;&lt;/P&gt;      &lt;P&gt;&amp;nbsp;&lt;/P&gt;  // Creating OpenCV Matrix from a color image&lt;P&gt;&amp;nbsp;&lt;/P&gt;  Mat color(Size(640, 480), CV_8UC3, (void*)color_frame.get_data(), Mat::AUTO_STEP);&lt;P&gt;&amp;nbsp;&lt;/P&gt;  Mat ir(Size(640, 480), CV_8UC1, (void*)ir_frame.get_data(), Mat::AUTO_STEP);&lt;P&gt;&amp;nbsp;&lt;/P&gt;   &lt;P&gt;  // Display in a GUI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  &lt;P&gt;&amp;nbsp;&lt;/P&gt;  &lt;P&gt;  imshow("Colour", color); imshow("IR", ir); &lt;/P&gt;&lt;P&gt;  char key = waitKey(30);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  if (key == 27) {&lt;P&gt;&amp;nbsp;&lt;/P&gt;   cout &amp;lt;&amp;lt; "key pressed" &amp;lt;&amp;lt; endl;&lt;P&gt;   color.release(); ir.release(); &lt;/P&gt;&lt;P&gt;   break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;  }&lt;P&gt; }&lt;/P&gt;&lt;P&gt; destroyAllWindows();&lt;/P&gt;&lt;P&gt; return 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;}&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unquote&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jun 2018 10:14:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558512#M9226</guid>
      <dc:creator>JRomu</dc:creator>
      <dc:date>2018-06-10T10:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Depth of a Pixel</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558513#M9227</link>
      <description>&lt;P&gt;Awesome, thanks so much for sharing your script with the community, JJR  &lt;/P&gt;</description>
      <pubDate>Sun, 10 Jun 2018 10:17:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Depth-of-a-Pixel/m-p/558513#M9227</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-06-10T10:17:16Z</dc:date>
    </item>
  </channel>
</rss>

