<?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 intrinsics, laser power python in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/intrinsics-laser-power-python/m-p/566815#M9744</link>
    <description>&lt;P&gt;item 1) I cannot find python code to actively manage the laser power or to toggle the emitter.  My attempts to translate the C++ code were (as expected:) no good.&lt;/P&gt;&lt;P&gt;item 2) Intrinsic Madness-&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not exactly sure what I am doing wrong here.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code is a lightly modified version posted by Intel in answer to a similar question.&lt;/P&gt;&lt;P&gt;I'm using a D435 with most recent updates across the board.  Windows 8.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Trying to get intrinsics (fx, etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;#  First import the library&lt;P&gt;&amp;nbsp;&lt;/P&gt;import pyrealsense2 as rs&lt;P&gt;&lt;/P&gt;&lt;P&gt;pipe = rs.pipeline()&lt;/P&gt;&lt;P&gt;cfg = rs.config&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;cfg.enable_stream(rs.stream.color, 1920, 1080, rs.format. rgb8, 30)&lt;P&gt;cfg.enable_stream(rs.stream.infrared, 1,848,480,rs.format.y8,30)&lt;/P&gt;&lt;P&gt;cfg.enable_stream(rs.stream.infrared, 2,848,480,rs.format.y8,30)&lt;/P&gt;&lt;P&gt;cfg.enable_stream(rs.stream.depth,848,480,rs.format.z16,30)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prof = pipe.start(cfg)&lt;/P&gt;&lt;P&gt;ds = prof.get_stream(rs.stream.depth)&lt;/P&gt;&lt;P&gt;intr = ds.as_video_stream_profile().get_intrinsics()&lt;/P&gt;&lt;P&gt;print "depth"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;print intr&lt;P&gt;s = prof.get_stream(rs.stream.infrared, 1)&lt;/P&gt;&lt;P&gt;intr = ds.as_video_stream_profile().get_intrinsics()&lt;/P&gt;&lt;P&gt;print"IR1:"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;print intr&lt;P&gt;s = prof.get_stream(rs.stream.infrared, 2)&lt;/P&gt;&lt;P&gt;intr = ds.as_video_stream_profile().get_intrinsics()&lt;/P&gt;&lt;P&gt;print"IR2:"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;print intr&lt;P&gt;ds = prof.get_stream(rs.stream.color)&lt;/P&gt;&lt;P&gt;intr = ds.as_video_stream_profile().get_intrinsics()&lt;/P&gt;&lt;P&gt;print"color:"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;print intr&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this gives the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;depth&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;IR1:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;IR2:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;color:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady&lt;P&gt;Process finished with exit code 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;BUT:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;B&gt;If I change the order of getting the streams so that the color stream is looked at just after depth and before IR1 and IR2 I get:&lt;/B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;depth&amp;nbsp;&lt;/B&gt;&lt;/P&gt;width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;color:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;IR1:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;IR2:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady&lt;P&gt;&lt;B&gt;Process finished with exit code 0&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt; &lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;item 3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I convert from fx(pixel relative) to:   fx(mm) = image_width/fx. For the Depth camera I get a reasonable answer(about 2), but for the color camera the answer is about 1.3... way far off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&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;B&gt;&lt;/B&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Aug 2018 01:23:42 GMT</pubDate>
    <dc:creator>ROhle</dc:creator>
    <dc:date>2018-08-23T01:23:42Z</dc:date>
    <item>
      <title>intrinsics, laser power python</title>
      <link>https://community.intel.com/t5/Items-with-no-label/intrinsics-laser-power-python/m-p/566815#M9744</link>
      <description>&lt;P&gt;item 1) I cannot find python code to actively manage the laser power or to toggle the emitter.  My attempts to translate the C++ code were (as expected:) no good.&lt;/P&gt;&lt;P&gt;item 2) Intrinsic Madness-&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not exactly sure what I am doing wrong here.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code is a lightly modified version posted by Intel in answer to a similar question.&lt;/P&gt;&lt;P&gt;I'm using a D435 with most recent updates across the board.  Windows 8.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Trying to get intrinsics (fx, etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;#  First import the library&lt;P&gt;&amp;nbsp;&lt;/P&gt;import pyrealsense2 as rs&lt;P&gt;&lt;/P&gt;&lt;P&gt;pipe = rs.pipeline()&lt;/P&gt;&lt;P&gt;cfg = rs.config&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;cfg.enable_stream(rs.stream.color, 1920, 1080, rs.format. rgb8, 30)&lt;P&gt;cfg.enable_stream(rs.stream.infrared, 1,848,480,rs.format.y8,30)&lt;/P&gt;&lt;P&gt;cfg.enable_stream(rs.stream.infrared, 2,848,480,rs.format.y8,30)&lt;/P&gt;&lt;P&gt;cfg.enable_stream(rs.stream.depth,848,480,rs.format.z16,30)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prof = pipe.start(cfg)&lt;/P&gt;&lt;P&gt;ds = prof.get_stream(rs.stream.depth)&lt;/P&gt;&lt;P&gt;intr = ds.as_video_stream_profile().get_intrinsics()&lt;/P&gt;&lt;P&gt;print "depth"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;print intr&lt;P&gt;s = prof.get_stream(rs.stream.infrared, 1)&lt;/P&gt;&lt;P&gt;intr = ds.as_video_stream_profile().get_intrinsics()&lt;/P&gt;&lt;P&gt;print"IR1:"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;print intr&lt;P&gt;s = prof.get_stream(rs.stream.infrared, 2)&lt;/P&gt;&lt;P&gt;intr = ds.as_video_stream_profile().get_intrinsics()&lt;/P&gt;&lt;P&gt;print"IR2:"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;print intr&lt;P&gt;ds = prof.get_stream(rs.stream.color)&lt;/P&gt;&lt;P&gt;intr = ds.as_video_stream_profile().get_intrinsics()&lt;/P&gt;&lt;P&gt;print"color:"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;print intr&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this gives the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;depth&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;IR1:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;IR2:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;color:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady&lt;P&gt;Process finished with exit code 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;BUT:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;B&gt;If I change the order of getting the streams so that the color stream is looked at just after depth and before IR1 and IR2 I get:&lt;/B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;depth&amp;nbsp;&lt;/B&gt;&lt;/P&gt;width: 848, height: 480, ppx: 424.713, ppy: 242.321, fx: 420.367, fy: 420.367, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;color:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;IR1:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady&lt;P&gt;&amp;nbsp;&lt;/P&gt;IR2:&lt;P&gt;&amp;nbsp;&lt;/P&gt;width: 1920, height: 1080, ppx: 968.251, ppy: 536.9, fx: 1392.01, fy: 1392.87, model: Brown Conrady&lt;P&gt;&lt;B&gt;Process finished with exit code 0&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt; &lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;item 3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I convert from fx(pixel relative) to:   fx(mm) = image_width/fx. For the Depth camera I get a reasonable answer(about 2), but for the color camera the answer is about 1.3... way far off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&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;B&gt;&lt;/B&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 01:23:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/intrinsics-laser-power-python/m-p/566815#M9744</guid>
      <dc:creator>ROhle</dc:creator>
      <dc:date>2018-08-23T01:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: intrinsics, laser power python</title>
      <link>https://community.intel.com/t5/Items-with-no-label/intrinsics-laser-power-python/m-p/566816#M9745</link>
      <description>&lt;P&gt;&lt;B&gt;tem 1&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The link below contains a sample script provided by Intel for controlling the laser power with Python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/issues/1258"&gt;https://github.com/IntelRealSense/librealsense/issues/1258&lt;/A&gt; How to control the laser with python wrapper · Issue # 1258 · IntelRealSense/librealsense · GitHub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Item 2&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RealSense user edgar.altamirano recently posted a script for getting intrinsics with Python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jb455, whom I have linked into this conversation.  JB, rjo's question is "I convert from fx(pixel relative) to fx(mm) = image_width/fx.  For the Depth camera I get a reasonable answer(about 2), but for the color camera the answer is about 1.3... way far off."&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 05:58:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/intrinsics-laser-power-python/m-p/566816#M9745</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-08-23T05:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: intrinsics, laser power python</title>
      <link>https://community.intel.com/t5/Items-with-no-label/intrinsics-laser-power-python/m-p/566817#M9746</link>
      <description>&lt;P&gt;Item 2 looks like a bug. I'd suggest posting it on &lt;A href="https://github.com/IntelRealSense/librealsense/issues"&gt;https://github.com/IntelRealSense/librealsense/issues&lt;/A&gt; Issues · IntelRealSense/librealsense · GitHub  to see what the devs say.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Item 3... I don't really know about converting focal lengths from pixels to mm. The &lt;A href="https://www.intel.com/content/dam/support/us/en/documents/emerging-technologies/intel-realsense-technology/Intel-RealSense-D400-Series-Datasheet.pdf"&gt;https://www.intel.com/content/dam/support/us/en/documents/emerging-technologies/intel-realsense-technology/Intel-RealSense-D400-Series-Datasheet.pdf&lt;/A&gt; datasheet has the specifications for the cameras, including their focal lengths in mm; but if you find the factory intrinsic parameters are wrong you can recalibrate yourself using OpenCV or similar then write to the camera using the &lt;A href="https://downloadcenter.intel.com/download/27955/Intel-RealSense-D400-Series-Calibration-Tools-and-API"&gt;https://downloadcenter.intel.com/download/27955/Intel-RealSense-D400-Series-Calibration-Tools-and-API&lt;/A&gt; calibration tools.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 09:27:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/intrinsics-laser-power-python/m-p/566817#M9746</guid>
      <dc:creator>jb455</dc:creator>
      <dc:date>2018-08-23T09:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: intrinsics, laser power python</title>
      <link>https://community.intel.com/t5/Items-with-no-label/intrinsics-laser-power-python/m-p/566818#M9747</link>
      <description>&lt;P&gt;Thanks guys.  Have to wait til tonight to go through it all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 14:22:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/intrinsics-laser-power-python/m-p/566818#M9747</guid>
      <dc:creator>ROhle</dc:creator>
      <dc:date>2018-08-23T14:22:47Z</dc:date>
    </item>
  </channel>
</rss>

