<?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: Good way to save and load device intrinsics? in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594525#M11532</link>
    <description>&lt;P&gt;If anyone is interested, I have successfully serialized and saved the intrinsics to disk. they are simple data-type structs, so a memcpy to a char* array and using ofstream to write the file (and ifstream to read it back) does indeed work, and reversing is also very simple as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;haven't done super-deep testing yet but the initial results are promising.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2017 17:12:10 GMT</pubDate>
    <dc:creator>kfind</dc:creator>
    <dc:date>2017-12-20T17:12:10Z</dc:date>
    <item>
      <title>Good way to save and load device intrinsics?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594520#M11527</link>
      <description>&lt;P&gt;If I capture data with a realsense device, and later want to load images from the dataset (which may have been modified/saved with opencv)  is there a good way with Librealsense v1 (legacy one) to serialize/save the device intrinsics/extrinsics to file and load them along with the dataset for re-running/post-processing and having all the rs::intrinsic objects readily available?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone done this yet, or does the API have a neat way to handle this kind of thing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: the specific use-case for why I need the intrinsics is to call the  rs::intrinsics::deproject( rs::float2 px, float depth)  function on old data without a live connection to a realsense camera (where i'd normally have the intrinsics easily available) or perhaps you DO have a live camera connected, but it's not the same camera (either type, or just has slightly different intrinsics so the values will be different). &lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 16:54:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594520#M11527</guid>
      <dc:creator>kfind</dc:creator>
      <dc:date>2017-12-14T16:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Good way to save and load device intrinsics?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594521#M11528</link>
      <description>&lt;P&gt;Hello KFindlater,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Thank you for your interest on Intel® RealSense™ Technology.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;For future references, your ticket number is 03162709. Please keep this number handy in case you are asked for it.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Actually, there is no "good" way to save and load intrinsics. The librealsense API does not provide a native mechanism to achieve this. &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;One approach is to save the intrinsics into a .json file and save the file in the same directory as the image file.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Otherwise, you can use ROS to somehow capture the stream and intrinsics into a ROS Bag file. But this can get very complex and will require a lot of work.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;In other words, there is no easy way to do this.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;I hope you find this information useful.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Please do not hesitate to contact us again if you need further assistance.&lt;P&gt;&amp;nbsp;&lt;/P&gt;   &lt;P&gt;&amp;nbsp;&lt;/P&gt;Thank you for your patience and understanding on this matter.&lt;P&gt;&amp;nbsp;&lt;/P&gt;   &lt;P&gt;&amp;nbsp;&lt;/P&gt;Best regards.&lt;P&gt;&amp;nbsp;&lt;/P&gt;   &lt;P&gt;&amp;nbsp;&lt;/P&gt;Josh B.&lt;P&gt;&amp;nbsp;&lt;/P&gt;Intel Customer Support.</description>
      <pubDate>Fri, 15 Dec 2017 23:58:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594521#M11528</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2017-12-15T23:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Good way to save and load device intrinsics?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594522#M11529</link>
      <description>&lt;P&gt;Hi Josh, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dug around in the source code a bit.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seeing as the rs::intrinsics appears to be a struct, is it not possible to save the object ("serialize" it) and use an output filestream ( using ios::base::binary options to preserve the format exactly) into some random binary object (lets call it a .bin file) and it can be loaded by reading it back and copying it into a new rs::intrinsic struct object in the program which is re-running data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the ROS nodes and bag recording do not have access to the intrinsics either...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a possibly useful tool/idea for the librealsense devs, if you could pass it along for me!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2017 00:26:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594522#M11529</guid>
      <dc:creator>kfind</dc:creator>
      <dc:date>2017-12-16T00:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Good way to save and load device intrinsics?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594523#M11530</link>
      <description>&lt;P&gt;Hello KFindlater,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Thank you for your reply.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;I will pass your suggestion to the development team. &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;On the meantime, our suggestion is to continue using Librealsense and to code any mechanism you may need in order to accomplish your goal for your specific situation.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Please, let us know if further assistance is required or if we can close this case.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;We will be looking forward for your reply.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Best regards,&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;Josh B.&lt;P&gt;&amp;nbsp;&lt;/P&gt;Intel Customer Support</description>
      <pubDate>Mon, 18 Dec 2017 20:27:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594523#M11530</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2017-12-18T20:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Good way to save and load device intrinsics?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594524#M11531</link>
      <description>&lt;P&gt;You may close this support case. I will do what I can until/if librealsense gets a native way to save/load intrinsics for the purpose of re-running datasets. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 20:31:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594524#M11531</guid>
      <dc:creator>kfind</dc:creator>
      <dc:date>2017-12-18T20:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Good way to save and load device intrinsics?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594525#M11532</link>
      <description>&lt;P&gt;If anyone is interested, I have successfully serialized and saved the intrinsics to disk. they are simple data-type structs, so a memcpy to a char* array and using ofstream to write the file (and ifstream to read it back) does indeed work, and reversing is also very simple as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;haven't done super-deep testing yet but the initial results are promising.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 17:12:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Good-way-to-save-and-load-device-intrinsics/m-p/594525#M11532</guid>
      <dc:creator>kfind</dc:creator>
      <dc:date>2017-12-20T17:12:10Z</dc:date>
    </item>
  </channel>
</rss>

