<?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: SDK R3 use ImageData.ToBitmap parameters? in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/SDK-R3-use-ImageData-ToBitmap-parameters/m-p/456101#M3600</link>
    <description>&lt;P&gt;Hi Pedro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got some data from the "projection.QueryVertices" function. I don't know yet how to further use this data but it might be the way to go. I will first try to validate the data to see if it makes sense. I too will post any updates i find. If you're interested I can upload my project on monday once more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: &lt;/P&gt;&lt;P&gt;It works! I exported the data to a csv file which in turn I imported into a Unity scene an created a sphere on each point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really need the data I originally asked for anymore, this is much better for my usecase! &lt;/P&gt;&lt;P&gt;If you find a solution I'd still be interested, but currently I am completely satisfied with what I have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &amp;amp; thanks so far!&lt;/P&gt;&lt;P&gt;Toby&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2017 07:46:59 GMT</pubDate>
    <dc:creator>TWern1</dc:creator>
    <dc:date>2017-05-19T07:46:59Z</dc:date>
    <item>
      <title>SDK R3 use ImageData.ToBitmap parameters?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/SDK-R3-use-ImageData-ToBitmap-parameters/m-p/456097#M3596</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm fairly new to the game - I would like to analyse depth data to estimate the distance of the objects in front of the camera.&lt;/P&gt;&lt;P&gt;I prefer writing in c#  so I used the RawStreams.cs sample as my source. In the "StreamColorDepth"-while(!stop)-loop I call a new task with the image of that frame. The code of that thread is posted below:&lt;/P&gt;&lt;P&gt;public void getImage(RS.Image img)&lt;/P&gt;&lt;P&gt;        {&lt;/P&gt;&lt;P&gt;            Bitmap bitmap = new Bitmap(img.Info.width,img.Info.height);&lt;/P&gt;&lt;P&gt;            RS.ImageData idata;&lt;/P&gt;&lt;P&gt;            img.AcquireAccess(RS.ImageAccess.ACCESS_WRITE, out idata);&lt;/P&gt;&lt;P&gt;            idata.ToBitmap(0, bitmap);&lt;/P&gt;&lt;P&gt;            img.ReleaseAccess(idata);&lt;/P&gt;&lt;P&gt;        }&lt;/P&gt;&lt;P&gt;Line 6 throws "System.ArgumentException" with the additional information being "Parameter is not valid.".&lt;/P&gt;&lt;P&gt;The documentation lists .ToBitmap(Bitmap bitmap), so there's actually no int in the beginning. Visual Studio requests that int though..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;it seems that the problem is already in Line 5!&lt;/P&gt;&lt;P&gt;I added a RS.status before the img.AcquireAccess, and I get a "STATUS_PARAM_UNSUPPORTED".&lt;/P&gt;&lt;P&gt;I also tried RS.ImageAccess.ACCESS_READ_WRITE -&amp;gt; same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT2:&lt;/P&gt;&lt;P&gt;I also tried istatus = img.ExportData(idata,0); -&amp;gt; same result. I'm not sure about the ",0", there is no mention of this in the documentation. The parameter is an integer called "flags".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Toby&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 11:59:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/SDK-R3-use-ImageData-ToBitmap-parameters/m-p/456097#M3596</guid>
      <dc:creator>TWern1</dc:creator>
      <dc:date>2017-05-17T11:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: SDK R3 use ImageData.ToBitmap parameters?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/SDK-R3-use-ImageData-ToBitmap-parameters/m-p/456098#M3597</link>
      <description>&lt;P&gt;Hello Toby,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Thanks for reaching out!&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;First of all, I would like to ask you which camera you are using in order to make sure we have the same environment.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;I would like to test this to see if I'm able to see the same behavior as you, for this I would like to request for the complete code. I am aware that your code is based in RawStreams.cs but in order to make sure that we are running the same application I would like you to share the full code.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;I'll be waiting for your response.&lt;P&gt;&amp;nbsp;&lt;/P&gt;Pedro M.</description>
      <pubDate>Wed, 17 May 2017 19:01:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/SDK-R3-use-ImageData-ToBitmap-parameters/m-p/456098#M3597</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2017-05-17T19:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: SDK R3 use ImageData.ToBitmap parameters?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/SDK-R3-use-ImageData-ToBitmap-parameters/m-p/456099#M3598</link>
      <description>&lt;P&gt;Hi Pedro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a Windows 10 Notebook, the camera I'm using is the new SR300.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I uploaded the project to &lt;A href="https://we.tl/6NxzHvrwP1"&gt;https://we.tl/6NxzHvrwP1&lt;/A&gt; WeTransfer (I couldn't find an "attach file" function in the forum) and will also try some more things (and edit this post if something possibly meaningful comes up).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply and effort,&lt;/P&gt;&lt;P&gt;Toby&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 06:17:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/SDK-R3-use-ImageData-ToBitmap-parameters/m-p/456099#M3598</guid>
      <dc:creator>TWern1</dc:creator>
      <dc:date>2017-05-18T06:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: SDK R3 use ImageData.ToBitmap parameters?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/SDK-R3-use-ImageData-ToBitmap-parameters/m-p/456100#M3599</link>
      <description>&lt;P&gt;Thank you for letting us know the camera that you are using. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;I've been testing your code and I'm indeed able to see the same behavior as you. I've been trying to analyze why AcquireAccess throws a STATUS_PARAM_UNSUPPORTED but I'm not able to see why. I even, tried to use the full command like:&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;istatus = image.AcquireAccess(Intel.RealSense.ImageAccess.ACCESS_READ_WRITE, Intel.RealSense.PixelFormat.PIXEL_FORMAT_DEPTH_RAW, Intel.RealSense.ImageRotation.ROTATION_ANY, Intel.RealSense.ImageOption.OPTION_ANY, out idata);&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;I noticed that that you set the pixel format of idata to depth, so I tried to change the pixel format in AcquireAccess to the different formats of depth available but the same thing happens every time even if I try with the option any.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Let me see what I can find out about this. I'll get back to you as soon as I have any useful update.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Pedro M.</description>
      <pubDate>Thu, 18 May 2017 19:03:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/SDK-R3-use-ImageData-ToBitmap-parameters/m-p/456100#M3599</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2017-05-18T19:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: SDK R3 use ImageData.ToBitmap parameters?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/SDK-R3-use-ImageData-ToBitmap-parameters/m-p/456101#M3600</link>
      <description>&lt;P&gt;Hi Pedro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got some data from the "projection.QueryVertices" function. I don't know yet how to further use this data but it might be the way to go. I will first try to validate the data to see if it makes sense. I too will post any updates i find. If you're interested I can upload my project on monday once more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: &lt;/P&gt;&lt;P&gt;It works! I exported the data to a csv file which in turn I imported into a Unity scene an created a sphere on each point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really need the data I originally asked for anymore, this is much better for my usecase! &lt;/P&gt;&lt;P&gt;If you find a solution I'd still be interested, but currently I am completely satisfied with what I have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &amp;amp; thanks so far!&lt;/P&gt;&lt;P&gt;Toby&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 07:46:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/SDK-R3-use-ImageData-ToBitmap-parameters/m-p/456101#M3600</guid>
      <dc:creator>TWern1</dc:creator>
      <dc:date>2017-05-19T07:46:59Z</dc:date>
    </item>
  </channel>
</rss>

