<?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: How to find 3 or 5 center pixels from depth image in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579159#M10664</link>
    <description>&lt;P&gt;Hi MartyG, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please how can I use R2 since R3 is compatible with R2?&lt;/P&gt;</description>
    <pubDate>Tue, 04 Sep 2018 12:29:34 GMT</pubDate>
    <dc:creator>FMusa</dc:creator>
    <dc:date>2018-09-04T12:29:34Z</dc:date>
    <item>
      <title>How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579153#M10658</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to find few center pixels from the depth image. I am trying to implement segmentation, I need to find distance of the segmented object.&lt;/P&gt;&lt;P&gt;This is how I was thinking, this will work. while the colored image is used for segmentation, the full frame depth image will be used to find the distance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my code below. I found the diagonal of the depth image, I am trying to find 3 or 5 pixels. I do not how to find the value from the array. I only have the index printed on my &lt;A href="http://console.as"&gt;console.as&lt;/A&gt; print 40,35 but no value. &lt;/P&gt;&lt;P&gt;I hope i did not confuse you. Everything is new to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried this;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  void SampleArrived(object sender, SampleArrivedEventArgs args)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if (args.sample.Depth == null)&lt;/P&gt;&lt;P&gt;        {&lt;/P&gt;&lt;P&gt;            return;&lt;/P&gt;&lt;P&gt;        }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        else&lt;/P&gt;&lt;P&gt;        {&lt;/P&gt;&lt;P&gt;            var depthImageArray = args.sample.Depth;&lt;/P&gt;&lt;P&gt;            Debug.Log("my depth value is" + depthImageArray);&lt;/P&gt;&lt;P&gt;            var diagonal = Math.Sqrt((depthWidth*depthWidth)+ (depthHeight*depthHeight))/2;&lt;/P&gt;&lt;P&gt;            texPlugin.UpdateTextureNative(args.sample.Depth, depthTex2DPtr);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            for (int y =0; y &amp;lt; diagonal; ++y)&lt;/P&gt;&lt;P&gt;            {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                for (int x = 0; x &amp;lt; diagonal; ++x)&lt;/P&gt;&lt;P&gt;                {&lt;/P&gt;&lt;P&gt;                    Debug.Log(string.Format("print {0}, {1}", x, y ));&lt;/P&gt;&lt;P&gt;                    var path = (@"&lt;A&gt;C:\Users\Admin\Downloads\builtin_shaders-5.2.2f1\DefaultResourcesExtra\Unlit\sample.txt&lt;/A&gt;");&lt;/P&gt;&lt;P&gt;                    var content = (string.Format("print {0}, {1}", x, y));&lt;/P&gt;&lt;P&gt;                    StreamWriter File = new StreamWriter(path)&lt;/P&gt;&lt;P&gt;                    File.WriteLine(content);&lt;/P&gt;&lt;P&gt;                    File.Close();&lt;/P&gt;&lt;P&gt;                }&lt;/P&gt;&lt;P&gt;            }&lt;/P&gt;&lt;P&gt;            Debug.Log("diagonal pixels"  + StreamType.ToIndex[40,35];&lt;/P&gt;&lt;P&gt;        }&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 13:23:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579153#M10658</guid>
      <dc:creator>FMusa</dc:creator>
      <dc:date>2018-08-29T13:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579154#M10659</link>
      <description>&lt;P&gt;The link below provides code for getting the depth of a pixel at a specific XY coordinate on the image (e.g 100, 100).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/issues/1413"&gt;https://github.com/IntelRealSense/librealsense/issues/1413&lt;/A&gt; deprojection pixels to 3d point · Issue # 1413 · IntelRealSense/librealsense · GitHub &lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 13:54:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579154#M10659</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-08-29T13:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579155#M10660</link>
      <description>&lt;P&gt;Hi MartyG,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax does not look familiar to Intel RealSense R3000 SDK. I really do not understand how she is getting her raw depth value&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 17:07:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579155#M10660</guid>
      <dc:creator>FMusa</dc:creator>
      <dc:date>2018-08-29T17:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579156#M10661</link>
      <description>&lt;P&gt;I apologize, I did not see that you had tagged your entry as SR300 and 2016 R3 SDK.  I do not read the tags at the bottom of posts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SR300 is compatible with the current RealSense SDK 2.0.  Would it be possible for your project to use it instead of R3?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not: it has been a while since I used R2 and R3, but I believe the appropriate instruction for mapping 3D depth coordinates to 2D image coordinates is ProjectCameraToDepth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://software.intel.com/sites/landingpage/realsense/camera-sdk/v2016r3/documentation/html/index.html?projectcameratodepth_pxcprojection.html"&gt;https://software.intel.com/sites/landingpage/realsense/camera-sdk/v2016r3/documentation/html/index.html?projectcameratodepth_pxcprojection.html&lt;/A&gt; Intel® RealSense™ SDK 2016 R3 Documentation &lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 17:25:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579156#M10661</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-08-29T17:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579157#M10662</link>
      <description>&lt;P&gt;That is no problem I did not tag the question properly myself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The documentation is not clear on how the syntax should be. Like with a sample code showing how it is done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will play around with it and see what it will be returning.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 17:36:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579157#M10662</guid>
      <dc:creator>FMusa</dc:creator>
      <dc:date>2018-08-29T17:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579158#M10663</link>
      <description>&lt;P&gt;I located a previous example where ProjectCameraToDepth was discussed on this forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the link below, which has example scripts, example 6 shows what you were asking for - mapping depth to a few pixels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://csharp.hotexamples.com/examples/intel.rssdk/PXCMPoint3DF32/-/php-pxcmpoint3df32-class-examples.html"&gt;https://csharp.hotexamples.com/examples/intel.rssdk/PXCMPoint3DF32/-/php-pxcmpoint3df32-class-examples.html&lt;/A&gt; &lt;A href="https://csharp.hotexamples.com/examples/intel.rssdk/PXCMPoint3DF32/-/php-pxcmpoint3df32-class-examples.html"&gt;https://csharp.hotexamples.com/examples/intel.rssdk/PXCMPoint3DF32/-/php-pxcmpoint3df32-class-examples.html&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 17:55:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579158#M10663</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-08-29T17:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579159#M10664</link>
      <description>&lt;P&gt;Hi MartyG, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please how can I use R2 since R3 is compatible with R2?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 12:29:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579159#M10664</guid>
      <dc:creator>FMusa</dc:creator>
      <dc:date>2018-09-04T12:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579160#M10665</link>
      <description>&lt;P&gt;Yes, they are closely compatible.  The main difference is that in '2016 R2' you download the entire SDK as a 1.8 gb download, whilst R3 was split into a series of optional modules.  You can launch a download of R2 directly in your browser by using the link below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe"&gt;http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe&lt;/A&gt; &lt;A href="http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe"&gt;http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 12:37:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579160#M10665</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-09-04T12:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579161#M10666</link>
      <description>&lt;P&gt;I downloaded R2 and installed but it say I have installed the latest version already but in visual studio I can not access PXCMProjection namespace. &lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 13:14:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579161#M10666</guid>
      <dc:creator>FMusa</dc:creator>
      <dc:date>2018-09-04T13:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579162#M10667</link>
      <description>&lt;P&gt;To use Visual Studio with R2 or R3, you should build a 'development environment'.  To do this, please choose a link below depending on whether you plan to use C++ or C#  in Visual Studio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;C++&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;With C++ you can set the dev environment up with a Proert Sheet  OR do the settings directly.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Using a Proerty Sheet&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?doc_devguide_property_sheets.html"&gt;https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?doc_devguide_property_sheets.html&lt;/A&gt; Intel® RealSense™ SDK 2016 R2 Documentation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Setting the project settings directly&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?doc_devguide_project_settings.html"&gt;https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?doc_devguide_project_settings.html&lt;/A&gt; Intel® RealSense™ SDK 2016 R2 Documentation &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;C# &lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?doc_devguide_csharp_application.html"&gt;https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?doc_devguide_csharp_application.html&lt;/A&gt; Intel® RealSense™ SDK 2016 R2 Documentation&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 13:25:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579162#M10667</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-09-04T13:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579163#M10668</link>
      <description>&lt;P&gt;Hi MartG, &lt;/P&gt;&lt;P&gt;I tried to setup R2 but I realized i do not have UnityCSharp.unitypackage like this in the directory " $(RSSDK_DIR)/framework/Unity/UnityCSharp.unitypackage" so I went ahead with the working sample codes others got working. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Please have a look at my codes. I am trying to get the distance of the depth image. But anytime I run unity it crashes &lt;/P&gt;&lt;P&gt;void OnSampleArrived(object sender, SampleArrivedEventArgs args)&lt;/P&gt;&lt;P&gt;    {&lt;/P&gt;&lt;P&gt;        Image image = args.sample.Depth;&lt;/P&gt;&lt;P&gt;        if (image == null)&lt;/P&gt;&lt;P&gt;        {&lt;/P&gt;&lt;P&gt;            Debug.Log("Null depthImage");&lt;/P&gt;&lt;P&gt;        }&lt;/P&gt;&lt;P&gt;        else&lt;/P&gt;&lt;P&gt;        {&lt;/P&gt;&lt;P&gt;            if (image != null)&lt;/P&gt;&lt;P&gt;            {&lt;/P&gt;&lt;P&gt;                ImageInfo cinfo = new ImageInfo() { width = colorWidth, height = colorHeight, format = PixelFormat.PIXEL_FORMAT_BGR }&lt;/P&gt;&lt;P&gt;                ImageData outBuffer;&lt;/P&gt;&lt;P&gt;                image.AcquireAccess(ImageAccess.ACCESS_READ, PixelFormat.PIXEL_FORMAT_DEPTH_F32, out outBuffer);&lt;/P&gt;&lt;P&gt;                var imageHeight = image.Info.height;&lt;/P&gt;&lt;P&gt;                var imageWidth = image.Info.width;&lt;/P&gt;&lt;P&gt;                float[] pixel = outBuffer.ToFloatArray(0, imageWidth * imageHeight);&lt;/P&gt;&lt;P&gt;                image.ReleaseAccess(outBuffer);&lt;/P&gt;&lt;P&gt;                Projection projection = device.CreateProjection();&lt;/P&gt;&lt;P&gt;                PointF32[] uvmap = new PointF32[cinfo.height * cinfo.width];&lt;/P&gt;&lt;P&gt;                projection.QueryUVMap(image, uvmap);&lt;/P&gt;&lt;P&gt;                var mappedPixels = new float[cinfo.height * cinfo.width];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                for (int i = 0; i &amp;lt; uvmap.Length; i++)&lt;/P&gt;&lt;P&gt;                {&lt;/P&gt;&lt;P&gt;                    int u = (int)(uvmap[i].x * imageWidth);&lt;/P&gt;&lt;P&gt;                    int v = (int)(uvmap[i].y * imageHeight);&lt;/P&gt;&lt;P&gt;                    if (u &amp;gt;= 0 &amp;amp;&amp;amp; v &amp;gt;= 0 &amp;amp;&amp;amp; u + v * imageWidth &amp;lt; pixel.Length)&lt;/P&gt;&lt;P&gt;                    {&lt;/P&gt;&lt;P&gt;                        mappedPixels[i] = pixel[u + v * imageWidth];&lt;/P&gt;&lt;P&gt;                        Debug.Log("distance is:" + mappedPixels);&lt;/P&gt;&lt;P&gt;                    }&lt;/P&gt;&lt;P&gt;                }&lt;/P&gt;&lt;P&gt;           for (int y = 0; y &amp;lt; depthHeight; ++y)&lt;/P&gt;&lt;P&gt;            {&lt;/P&gt;&lt;P&gt;                for (int x = 0; x &amp;lt; depthWidth; ++x)&lt;/P&gt;&lt;P&gt;                {&lt;/P&gt;&lt;P&gt;                    Debug.Log(string.Format("print {0}, {1}", x, y));&lt;/P&gt;&lt;P&gt;                    int pixelIndex = (y * depthWidth) + x;&lt;/P&gt;&lt;P&gt;                    Debug.Log(pixelIndex);&lt;/P&gt;&lt;P&gt;                }&lt;/P&gt;&lt;P&gt;            }&lt;/P&gt;&lt;P&gt;            // Clean up&lt;/P&gt;&lt;P&gt;            projection.Dispose();&lt;/P&gt;&lt;P&gt;            image.ReleaseAccess(outBuffer);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 21:37:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579163#M10668</guid>
      <dc:creator>FMusa</dc:creator>
      <dc:date>2018-09-06T21:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579164#M10669</link>
      <description>&lt;P&gt;I've never had to use the Unity_CSharp file with R2.  What I have always done is create a new Unity project and then when the new scene is open at the start of the project, run the UnityToolkit file in the RSSDK framework folder with a double-leftclick on it whilst Unity is open.  This imports all the RealSense files and tools into the project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I do develop extensively in Unity, when I was using R2 I always used the Unity Toolkit's tools (where you drag and drop pre-defined scripts into objects and configure menus in the Inspector panel) to create RealSense controls rather than writing my own RealSense scripts from new (I mostly edited the Toolkit scripts to my needs).  So I would be of no help in debugging your script, unfortunately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are interested in using the RealSense tools that the Toolkit installs in Unity, I wrote an extensive range of very detailed step by step guides in the past.  An idnex of them can be found at the link below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://software.intel.com/en-us/forums/realsense/topic/676139"&gt;https://software.intel.com/en-us/forums/realsense/topic/676139&lt;/A&gt; Index of Marty G's RealSense Unity How-To Guides&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 21:53:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579164#M10669</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-09-06T21:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579165#M10670</link>
      <description>&lt;P&gt;Hi MartG,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was the code I finally used to access the depth image, get the center depth pixel and the value. It works well.&lt;/P&gt;&lt;P&gt;Image dimage = args.sample.Depth;&lt;/P&gt;&lt;P&gt;if (dimage != null)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        {&lt;/P&gt;&lt;P&gt;            ImageData outBuffer;&lt;/P&gt;&lt;P&gt;            Status acquireAccessStatus = dimage.AcquireAccess(ImageAccess.ACCESS_READ, PixelFormat.PIXEL_FORMAT_DEPTH_F32, out outBuffer);&lt;/P&gt;&lt;P&gt;            if (acquireAccessStatus != Status.STATUS_NO_ERROR)&lt;/P&gt;&lt;P&gt;            {&lt;/P&gt;&lt;P&gt;                Debug.Log(string.Format("Failed to acquire access to the image. Return code:{0}", acquireAccessStatus));&lt;/P&gt;&lt;P&gt;            }&lt;/P&gt;&lt;P&gt;            var dwidth = dimage.Info.width;&lt;/P&gt;&lt;P&gt;            var dheight = dimage.Info.height;&lt;/P&gt;&lt;P&gt;            var centerIndex = ((640 * 190) + 320);&lt;/P&gt;&lt;P&gt;            var dpixels = outBuffer.ToFloatArray(0, 640 * dheight);&lt;/P&gt;&lt;P&gt;            var result = dpixels[centerIndex];&lt;/P&gt;&lt;P&gt;            test = result / (float)2047;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        dimage.ReleaseAccess(outBuffer);&lt;/P&gt;&lt;P&gt;        }&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 21:10:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579165#M10670</guid>
      <dc:creator>FMusa</dc:creator>
      <dc:date>2018-10-23T21:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to find 3 or 5 center pixels from depth image</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579166#M10671</link>
      <description>&lt;P&gt;Thanks so much for sharing your code with the community!  &lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 21:13:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-find-3-or-5-center-pixels-from-depth-image/m-p/579166#M10671</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-10-23T21:13:17Z</dc:date>
    </item>
  </channel>
</rss>

