<?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 Undistorting 415 colour images in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/Undistorting-415-colour-images/m-p/546662#M8266</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although 415 image distortion coefficients do not seem to be calculated (seem to be all 0), I have been trying to calculate these myself. If these are known, is there a way to get an undistorted RGB image through librealsense? To explain my use case: I created a mesh from all my depth images. Now I want to texture it with the colour images. But I am getting a shift on my mesh. I presume this may be due to the RGB image being projected is not undistorted. I have tried to undistort the images using the left/right distortion coefficients in OpenCV (since these may be quite similar) but my code is just crashing on using those values. I remember reading somewhere that the coefficients were a 'modified' brown conrady model. Is this a model which is used just by RealSense? Or is it a common model.&lt;/P&gt;</description>
    <pubDate>Sat, 07 Apr 2018 18:41:02 GMT</pubDate>
    <dc:creator>JStev1</dc:creator>
    <dc:date>2018-04-07T18:41:02Z</dc:date>
    <item>
      <title>Undistorting 415 colour images</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Undistorting-415-colour-images/m-p/546662#M8266</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although 415 image distortion coefficients do not seem to be calculated (seem to be all 0), I have been trying to calculate these myself. If these are known, is there a way to get an undistorted RGB image through librealsense? To explain my use case: I created a mesh from all my depth images. Now I want to texture it with the colour images. But I am getting a shift on my mesh. I presume this may be due to the RGB image being projected is not undistorted. I have tried to undistort the images using the left/right distortion coefficients in OpenCV (since these may be quite similar) but my code is just crashing on using those values. I remember reading somewhere that the coefficients were a 'modified' brown conrady model. Is this a model which is used just by RealSense? Or is it a common model.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Apr 2018 18:41:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Undistorting-415-colour-images/m-p/546662#M8266</guid>
      <dc:creator>JStev1</dc:creator>
      <dc:date>2018-04-07T18:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Undistorting 415 colour images</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Undistorting-415-colour-images/m-p/546663#M8267</link>
      <description>&lt;P&gt;Yes, D415 uses Modified Brown-Conrady. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Others have modified (or 'extended') the Brown-Conrady model, suggesting that whilst the Modified Brown Conrady model may be unique to RealSense, modified models in themselves are not unusual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.researchgate.net/publication/43067483_Modeling_of_radial_asymmetry_in_lens_distortion_facilitated_by_modern_optimization_techniques"&gt;https://www.researchgate.net/publication/43067483_Modeling_of_radial_asymmetry_in_lens_distortion_facilitated_by_modern_optimization_techniques&lt;/A&gt; Modeling of radial asymmetry in lens... (PDF Download Available)&lt;/P&gt;</description>
      <pubDate>Sat, 07 Apr 2018 19:58:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Undistorting-415-colour-images/m-p/546663#M8267</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-04-07T19:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Undistorting 415 colour images</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Undistorting-415-colour-images/m-p/546664#M8268</link>
      <description>&lt;P&gt;Is there any info on what modifications are made for RealSense? So that I can translate this model into a more conventional one that I can undistort with OpenCV.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 08:59:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Undistorting-415-colour-images/m-p/546664#M8268</guid>
      <dc:creator>JStev1</dc:creator>
      <dc:date>2018-04-09T08:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Undistorting 415 colour images</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Undistorting-415-colour-images/m-p/546665#M8269</link>
      <description>&lt;P&gt;A technical paper that had one of the 400 Series camera's engineers as an author says about the modified model: "The modification comes in the form of computing tangential terms with radially-corrected x, y. The open-source library for accessing the Intel RealSense cameras details the distortion model exactly".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a link to the full paper:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://arxiv.org/pdf/1705.05548.pdf" target="_self" alt="https://arxiv.org/pdf/1705.05548.pdf"&gt;&lt;/A&gt;&lt;A href="https://arxiv.org/pdf/1705.05548.pdf"&gt;https://arxiv.org/pdf/1705.05548.pdf&lt;/A&gt; &lt;A href="https://arxiv.org/pdf/1705.05548.pdf" target="_self" alt="https://arxiv.org/pdf/1705.05548.pdf"&gt;&lt;/A&gt;&lt;A href="https://arxiv.org/pdf/1705.05548.pdf"&gt;https://arxiv.org/pdf/1705.05548.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Digging through the Librealsense code for Modified Brown-Conrady formulas, the closest I found to such a thing was the code below that is applied when Modified Brown-Conrady is the distortion mode. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const r2 = x * x + y * y;&lt;/P&gt;&lt;P&gt; const f = 1 + intrinsics.coeffs[0] * r2 + intrinsics.coeffs[1] * r2 * r2 +&lt;/P&gt;&lt;P&gt; intrinsics.coeffs[4] * r2 * r2 * r2;&lt;/P&gt;&lt;P&gt; x *= f;&lt;/P&gt;&lt;P&gt; y *= f;&lt;/P&gt;&lt;P&gt; const dx = x + 2 * intrinsics.coeffs[2] * x * y + intrinsics.coeffs[3] * (r2 + 2 * x * x);&lt;/P&gt;&lt;P&gt; const dy = y + 2 * intrinsics.coeffs[3] * x * y + intrinsics.coeffs[2] * (r2 + 2 * y * y);&lt;/P&gt;&lt;P&gt; x = dx;&lt;/P&gt;&lt;P&gt; y = dy;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 09:18:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Undistorting-415-colour-images/m-p/546665#M8269</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-04-09T09:18:05Z</dc:date>
    </item>
  </channel>
</rss>

