<?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: [C API] processing blocks in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408400#M2480</link>
    <description>&lt;P&gt;I think I know what the problem is.  My experience is in communicating with the SDK DLL file directly instead of using the SDK 2.0 Librealsense interface as a go-between.  Librealsense seems to give some instructions different names to those inside the DLL file.  I apologize for causing confusion. &lt;/P&gt;</description>
    <pubDate>Thu, 12 Oct 2017 13:07:38 GMT</pubDate>
    <dc:creator>MartyG</dc:creator>
    <dc:date>2017-10-12T13:07:38Z</dc:date>
    <item>
      <title>[C API] processing blocks</title>
      <link>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408395#M2475</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since I can't use the C++ API to implement the RealSense D435 into the framework of our company, I'm currently trying to figure out the C API.&lt;/P&gt;&lt;P&gt;One of the last things I'm struggeling with are processing blocks. Even after reading the C API docs and how the C++ API makes use of the C API in this case, I still don't quite understand how to make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently reimplementing the 'Capture'-example with the C API. So I need to create a colorize processing block to transform the depth frame to a color frame to display it.&lt;/P&gt;&lt;P&gt;So at the start of the programm I create a colorize block and a framequeue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs2_processing_block* color_map = rs2_create_colorizer(&amp;amp;e);&lt;/P&gt;&lt;P&gt;rs2_frame_queue* queue = rs2_create_frame_queue(1, &amp;amp;e);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I am supposed to call rs2_start_processing with a callback to queue up the processed frame.&lt;/P&gt;&lt;P&gt;However I can not find anything about rs2_frame_callback in the C API. The C++ API contains a struct with said name, but I don't think that's what I'm looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs2_start_processing(color_map, ???, &amp;amp;e);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the callback I then will have to enqueue the processed frame:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs2_enqueue_frame(frame, queue);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When getting a depth frame:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs2_process_frame(color_map, frame, &amp;amp;e);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And finally wait for the queue to have a processed frame ready for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs2_frame* colorized_depth = rs2_wait_for_frame(queue, 500, &amp;amp;e);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I correct with my assumptions so far?&lt;/P&gt;&lt;P&gt;And how do I implement the missing part about the rs2_frame_callback with the C API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any kind of advice &lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 10:54:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408395#M2475</guid>
      <dc:creator>JGern</dc:creator>
      <dc:date>2017-10-12T10:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: [C API] processing blocks</title>
      <link>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408396#M2476</link>
      <description>&lt;P&gt;I have only recently started investigating D-camera programming so I may be of limited help in this case, but I will try to offer some insights from my own experience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do have some experience that is relevant to your problem, since I am currently working on an interface to connect the Unity game engine's C#  scripting to the C++ DLL library file of RealSense SDK 2.0 (the file named Realsense2.dll, located in the bin folder of SDK 2.0).  Getting C#  code to talk to the C++ library is not easy, and currently I have got as far as printing out the contents of some of the DLL's variables in Unity's debug console.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think your boot-up routine for SDK 2.0 is generally in the right order (create pipeline, start pipeline, wait for frames, process frame).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you open up the realsense2.lib file in the Lib folder of SDK 2.0 in a text editing program then you can see a list of supported functions.  Going through the library list, the closest to rs2_frame_callback may be rs2_start_pipeline_with_callback&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone else recently was trying to convert the Colorize function from C++ to Python.  In that post, I suggested using the frameset instruction instead of frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 11:18:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408396#M2476</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2017-10-12T11:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: [C API] processing blocks</title>
      <link>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408397#M2477</link>
      <description>&lt;P&gt;Our projects indeed seem to be similar. I am working on integrating the D435 into our camera abstraction framework that is also written in C# .&lt;/P&gt;&lt;P&gt;I had troubles wirting a plugin in managed C++ for the framework because of a mutex being used somewhere in the C++ API (wouldn't compile). There seems to be a way to make it work indirecting the C++ API via something called PIMPL. But I thought I could just as well use  the C API here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sadly I don't think the answer is of any help. Or maybe I just don't understand exactly what you're suggesting.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 12:38:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408397#M2477</guid>
      <dc:creator>JGern</dc:creator>
      <dc:date>2017-10-12T12:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: [C API] processing blocks</title>
      <link>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408398#M2478</link>
      <description>&lt;P&gt;I would suggest trying rs2_start_pipeline_with_callback in your program instead of rs2_frame_callback.  I don't have firm knowledge that this is correct - it is simply the function in the SDK 2.0 library that seems to be closest in purpose to the frame_callback instruction you were previously using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During my dissection of the DLL in a text editor, I noted that it included the Extern "C" instruction, which is designed to prevent "name mangling" errors when trying to get a C#  system to read C++ format names.  So the SDK 2.0 DLL ought to be able to talk to a C#  program.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 12:45:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408398#M2478</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2017-10-12T12:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: [C API] processing blocks</title>
      <link>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408399#M2479</link>
      <description>&lt;P&gt;I don't see any symbol named rs2_start_pipeline_with_callback in the C API headers. There is only rs2_pipeline_start and rs2_pipeline_start_with_config. I already ported to and am using the latest version of the SDK made today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as I include the C++ API header into the manged C++ project I get ' is not supported when compiling with /clr or /clr:pure.'&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 13:00:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408399#M2479</guid>
      <dc:creator>JGern</dc:creator>
      <dc:date>2017-10-12T13:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: [C API] processing blocks</title>
      <link>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408400#M2480</link>
      <description>&lt;P&gt;I think I know what the problem is.  My experience is in communicating with the SDK DLL file directly instead of using the SDK 2.0 Librealsense interface as a go-between.  Librealsense seems to give some instructions different names to those inside the DLL file.  I apologize for causing confusion. &lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 13:07:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/C-API-processing-blocks/m-p/408400#M2480</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2017-10-12T13:07:38Z</dc:date>
    </item>
  </channel>
</rss>

