<?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 RealSense Python API: Construct BufData or frame in Graphics</title>
    <link>https://community.intel.com/t5/Graphics/RealSense-Python-API-Construct-BufData-or-frame/m-p/1257628#M94529</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to call the rs2_project_color_pixel_to_depth_pixel from Python with synthetic data. The data are generated in Python and do not come directly from the RealSense.&lt;/P&gt;
&lt;P&gt;The first argument is the depth map of type BufData. How do I construct a BufData object in Python from a bytestream or an array? BufData does not seem to have a Python constructor, and I have not seen a way to get it from another type. BufData does support the buffer protocol, though it still might need a constructor. Another way would be to construct a frame, which has a method to provide BufData.&lt;/P&gt;
&lt;P&gt;The binding to rs2_project_color_pixel_to_depth_pixel is defined here:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/blob/d8f5d4212df85522a14b4a7b83bf4d54219b06fa/wrappers/python/pyrsutil.cpp#L69" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/IntelRealSense/librealsense/blob/d8f5d4212df85522a14b4a7b83bf4d54219b06fa/wrappers/python/pyrsutil.cpp#L69&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;BufData is defined here:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/blob/bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d/wrappers/python/python.hpp#L197" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/IntelRealSense/librealsense/blob/bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d/wrappers/python/python.hpp#L197&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;And the binding apparently here:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/blob/4f37f2ef0874c1716bce223b20e46d00532ffb04/wrappers/python/pyrs_frame.cpp#L8" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/IntelRealSense/librealsense/blob/4f37f2ef0874c1716bce223b20e46d00532ffb04/wrappers/python/pyrs_frame.cpp#L8&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;</description>
    <pubDate>Fri, 19 Feb 2021 15:46:42 GMT</pubDate>
    <dc:creator>Irxy</dc:creator>
    <dc:date>2021-02-19T15:46:42Z</dc:date>
    <item>
      <title>RealSense Python API: Construct BufData or frame</title>
      <link>https://community.intel.com/t5/Graphics/RealSense-Python-API-Construct-BufData-or-frame/m-p/1257628#M94529</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to call the rs2_project_color_pixel_to_depth_pixel from Python with synthetic data. The data are generated in Python and do not come directly from the RealSense.&lt;/P&gt;
&lt;P&gt;The first argument is the depth map of type BufData. How do I construct a BufData object in Python from a bytestream or an array? BufData does not seem to have a Python constructor, and I have not seen a way to get it from another type. BufData does support the buffer protocol, though it still might need a constructor. Another way would be to construct a frame, which has a method to provide BufData.&lt;/P&gt;
&lt;P&gt;The binding to rs2_project_color_pixel_to_depth_pixel is defined here:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/blob/d8f5d4212df85522a14b4a7b83bf4d54219b06fa/wrappers/python/pyrsutil.cpp#L69" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/IntelRealSense/librealsense/blob/d8f5d4212df85522a14b4a7b83bf4d54219b06fa/wrappers/python/pyrsutil.cpp#L69&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;BufData is defined here:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/blob/bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d/wrappers/python/python.hpp#L197" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/IntelRealSense/librealsense/blob/bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d/wrappers/python/python.hpp#L197&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;And the binding apparently here:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/blob/4f37f2ef0874c1716bce223b20e46d00532ffb04/wrappers/python/pyrs_frame.cpp#L8" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/IntelRealSense/librealsense/blob/4f37f2ef0874c1716bce223b20e46d00532ffb04/wrappers/python/pyrs_frame.cpp#L8&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 15:46:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/RealSense-Python-API-Construct-BufData-or-frame/m-p/1257628#M94529</guid>
      <dc:creator>Irxy</dc:creator>
      <dc:date>2021-02-19T15:46:42Z</dc:date>
    </item>
    <item>
      <title>Re:RealSense Python API: Construct BufData or frame</title>
      <link>https://community.intel.com/t5/Graphics/RealSense-Python-API-Construct-BufData-or-frame/m-p/1258229#M94601</link>
      <description>&lt;P&gt;Irxy, Thank you for posting in the Intel® Communities Support.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In order to gather the information that you are looking for and for us to be able to provide the most accurate assistance on this matter, please submit your inquiry at the link below, they will help you in there as soon as possible and provide further assistance on this topic :&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.intelrealsense.com/hc/en-us" target="_blank"&gt;https://support.intelrealsense.com/hc/en-us&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Albert R.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Intel Customer Support Technician&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Feb 2021 18:12:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/RealSense-Python-API-Construct-BufData-or-frame/m-p/1258229#M94601</guid>
      <dc:creator>Alberto_Sykes</dc:creator>
      <dc:date>2021-02-22T18:12:44Z</dc:date>
    </item>
  </channel>
</rss>

