<?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: Multicam in C#  -- processing the frameset in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/Multicam-in-C-processing-the-frameset/m-p/547768#M8364</link>
    <description>&lt;P&gt;Thanks so much for sharing your results with the community, Wiredchop!    C#  resources are always especially welcome.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Apr 2018 16:29:42 GMT</pubDate>
    <dc:creator>MartyG</dc:creator>
    <dc:date>2018-04-10T16:29:42Z</dc:date>
    <item>
      <title>Multicam in C#  -- processing the frameset</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Multicam-in-C-processing-the-frameset/m-p/547766#M8362</link>
      <description>&lt;P&gt;Hello, I'm looking at processing the data from multiple cameras in C#  and I have a few questions with regards to the appropriate way of processing the dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;With a single camera&lt;P&gt;When there's only a single camera connected, I use the Pipeline class to get a frameset&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pipeline = new Pipeline();&lt;/P&gt;&lt;P&gt;cfg = new Config();&lt;/P&gt;&lt;P&gt;PipelineProfile profile = pipeline.Start(cfg);&lt;/P&gt;&lt;P&gt;frames = pipeline.WaitForFrames();&lt;/P&gt;&lt;P&gt;depthframe = frames.DepthFrame;&lt;/P&gt;&lt;P&gt;colourframe = frames.ColorFrame;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To align the colour frame to the depth camera I use the Align class on the resulting frameset&lt;/P&gt;&lt;P&gt;FrameSet colourindepth = align.Process(frames);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;With multiple cameras&lt;P&gt;Using code snippets from the examples, for multiple cameras I'm using a different approach. (Code simplified for brevity)&lt;/P&gt;&lt;P&gt;using (var ctx = new Context())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;            {&lt;P&gt;&amp;nbsp;&lt;/P&gt;                DeviceList cameras = ctx.QueryDevices();&lt;P&gt;                // For now, going to loop through the cameras&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;                foreach (Device camera in cameras)&lt;P&gt;&amp;nbsp;&lt;/P&gt;                {&lt;P&gt;                    FrameQueue depthqueue = new FrameQueue();&lt;/P&gt;&lt;P&gt;                      FrameQueue colourqueue = new FrameQueue();&lt;/P&gt;&lt;P&gt;                    SensorList sensors = camera.QuerySensors();           &lt;/P&gt;&lt;P&gt;                    Sensor depthsensor = sensors[0];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;                    var depth_profile = depthsensor.VideoStreamProfiles.First();&lt;P&gt;&amp;nbsp;&lt;/P&gt;                    Sensor coloursensor = sensors[1];     &lt;P&gt;&amp;nbsp;&lt;/P&gt;                    var colour_profile = coloursensor.VideoStreamProfiles.First(); &lt;P&gt;&amp;nbsp;&lt;/P&gt;                    //Start sensors&lt;P&gt;&amp;nbsp;&lt;/P&gt;                    depthsensor.Open(depth_profile);&lt;P&gt;&amp;nbsp;&lt;/P&gt;                    depthsensor.Start(depthqueue);&lt;P&gt;                    coloursensor.Open(colour_profile);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;                    coloursensor.Start(colourqueue);&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;                    // Receive frames&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;                    Frame colourframe = colourqueue.WaitForFrame();&lt;P&gt;&amp;nbsp;&lt;/P&gt;                    Frame depthframe = depthqueue.WaitForFrame();&lt;P&gt;                }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Questions&lt;P&gt;However, in this case I only fetch a single 'Frame' object at a time. &lt;B&gt;How do I align the colourframe to depth?&lt;/B&gt;&lt;/P&gt;&lt;P&gt;I've tried to use the .waitforframeset method but it doesn't seem to be supported for this method. Also, the Align class requires a Frameset object?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get a frameset in this instance? Should I be using a pipeline to get the frames? Do I pass the handle to the camera when constructing a new pipeline?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 14:12:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Multicam-in-C-processing-the-frameset/m-p/547766#M8362</guid>
      <dc:creator>SChop3</dc:creator>
      <dc:date>2018-04-09T14:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Multicam in C#  -- processing the frameset</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Multicam-in-C-processing-the-frameset/m-p/547767#M8363</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've worked on this looking for a workaround and have found that the key is to &lt;B&gt;stick with the pipeline method&lt;/B&gt;. The configuration class allows you to create a custom pipeline based on a camera's serial number&lt;/P&gt;&lt;P&gt;I'm still starting with the camera context as before but this time I'm using a pipeline with a specified camera&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;using (var ctx = new Context())  &lt;/LI&gt;&lt;LI&gt;            {  &lt;/LI&gt;&lt;LI&gt;                DeviceList cameras = ctx.QueryDevices();  &lt;/LI&gt;&lt;LI&gt;                // For now, going to loop through the cameras  &lt;/LI&gt;&lt;LI&gt;                foreach (Device camera in cameras)  &lt;/LI&gt;&lt;LI&gt;                {  &lt;/LI&gt;&lt;LI&gt;                 cfg = new Config();  &lt;/LI&gt;&lt;LI&gt;                 cfg.Enabledevice(&lt;A href="http://camera.Info"&gt;camera.Info&lt;/A&gt;[CameraInfo.SerialNumber])&lt;/LI&gt;&lt;LI&gt;                 PipelineProfile profile = pipeline.Start(cfg);  &lt;/LI&gt;&lt;LI&gt;                }  &lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Then, when you use that profile object to wait for frames, it will wait for frames from the specified device and give you a frameset you can use in an Align object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone else is using C#  for multicam I'd reccomend this approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies if the code is slightly wrong, it's from memory.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 16:26:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Multicam-in-C-processing-the-frameset/m-p/547767#M8363</guid>
      <dc:creator>SChop3</dc:creator>
      <dc:date>2018-04-10T16:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Multicam in C#  -- processing the frameset</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Multicam-in-C-processing-the-frameset/m-p/547768#M8364</link>
      <description>&lt;P&gt;Thanks so much for sharing your results with the community, Wiredchop!    C#  resources are always especially welcome.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 16:29:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Multicam-in-C-processing-the-frameset/m-p/547768#M8364</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-04-10T16:29:42Z</dc:date>
    </item>
  </channel>
</rss>

