<?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 compute object's height for D435? in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546903#M8304</link>
    <description>&lt;P&gt;It is hard to say if calibration will solve your issue.  Doing so is much easier on the 400 Series cameras though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Tue, 27 Mar 2018 19:55:05 GMT</pubDate>
    <dc:creator>MartyG</dc:creator>
    <dc:date>2018-03-27T19:55:05Z</dc:date>
    <item>
      <title>How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546892#M8293</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to convert an object's height in pixels to its actual height in meters. The equation I use is simple geometry. See the diagram below. PH = (D * bh)/f, where PH is the object height I want to measure, D is the measured distance (in meters) between the object and the camera, bh is the object's height in pixels, and f is the focal length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that D is accurate (checked against the ground truth); bh is accurate (visually checked on display); f is generated by the SDK API ('intrinsic.fx' or 'intrinsic.fy'). At resolution 848x480, f is reported to be 423.499. Note f is obtained from the depth frame, as shown in the wiki API how-to ( &lt;A href="https://github.com/IntelRealSense/librealsense/wiki/API-How-To"&gt;https://github.com/IntelRealSense/librealsense/wiki/API-How-To&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I apply the numbers into the equation, the height is way off. For example, for a person standing 3.4 meters away from the camera, the height in pixels is 334, and the computed height is 2.68 meters. His actual height is about 1.68 meters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is this happening? Is this a calibration issue? Does my equation not fit D435's optical model?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, the same equation works very well for D415.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Robby&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 22:11:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546892#M8293</guid>
      <dc:creator>RSun9</dc:creator>
      <dc:date>2018-03-26T22:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546893#M8294</link>
      <description>&lt;P&gt;The first thing that comes to mind is that the D415 and D435 have different field of view (FOV) angles.  D435's is wider.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; D415 is 69.4° x 42.5° x 77° and D435's FOV is 91.2 x 65.5 x 100.6.  &lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 22:40:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546893#M8294</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-03-26T22:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546894#M8295</link>
      <description>&lt;P&gt;Yes I am aware of that. In fact, I have verified VFoV with the focal length and the frame height:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At 848x480 resolution, VFoV = 59.0808 degrees, and the focal length is 423.499. Therefore, tan(VFoV/2) = 0.5667 = (480/2)/423.499&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, that does not seem to solve my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Robby&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 22:58:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546894#M8295</guid>
      <dc:creator>RSun9</dc:creator>
      <dc:date>2018-03-26T22:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546895#M8296</link>
      <description>&lt;P&gt;The focal length of the D415's left and right imagers is 1.88 mm and the focal length of the D435's left and right imagers is 1.93 mm.  The color sensor's focal length is 1.93 mm.  In the RealSense SDK 2.0 software, the focal length is described by a multiplication of the variables fx (pixel width) and fy (pixel height).  So as you say, focal length should be determined by resolution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With math formulas, if you know for certain what some of the values are then you can rearrange the formula to make another value the target instead of PH.  So you know for certain what person height (PH), distance of the person from the camera (D) and focal length (f) should be.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If things were working correctly, the target value should be correct no matter how the formula is rearranged.  So if you rearranged to make focal length the target for example, the formula should give the correct focal length result when the other values are put into the rearranged formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following the logic above, bh (the object's height in pixels) is the only unknown value that you haven't been able to measure by other means, such as a tape measure.  Putting on my Sherlock detective cap, if you are getting an incorrect PH result on the D435, it is likely because the object's pixel height is being miscalculated (because you have verified all the other values)&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 07:42:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546895#M8296</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-03-27T07:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546896#M8297</link>
      <description>&lt;P&gt;Thanks... The object's height in pixels is computed with OpenCV, from the color frame. How else can I measure it?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 17:14:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546896#M8297</guid>
      <dc:creator>RSun9</dc:creator>
      <dc:date>2018-03-27T17:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546897#M8298</link>
      <description>&lt;P&gt;SDK 2.0 has an example script called 'Measure' for measuring the distance between two points, so you may be able to avoid using OpenCV to do the pixel height calculation if you adapt the code in that example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/tree/master/examples/measure"&gt;https://github.com/IntelRealSense/librealsense/tree/master/examples/measure&lt;/A&gt; librealsense/examples/measure at master · IntelRealSense/librealsense · GitHub &lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 18:01:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546897#M8298</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-03-27T18:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546898#M8299</link>
      <description>&lt;P&gt;Thanks. I may give that a try. Still I have no reason to suspect that OpenCV is giving me the wrong height in pixels. I have visually verified the height in the display; it looks  about right. Also, the same code gives me the accurate height estimation on D415.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless the height obtained from the color frame is very different from the height in the depth frame ... is that possible?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 18:13:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546898#M8299</guid>
      <dc:creator>RSun9</dc:creator>
      <dc:date>2018-03-27T18:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546899#M8300</link>
      <description>&lt;P&gt;If you are using both the color and depth, I would recommend using the same resolution for both if you are not doing so already, to help ensure that the two are aligned.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 18:19:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546899#M8300</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-03-27T18:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546900#M8301</link>
      <description>&lt;P&gt;Yes I am using 848x480 for both color and depth frames.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 18:24:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546900#M8301</guid>
      <dc:creator>RSun9</dc:creator>
      <dc:date>2018-03-27T18:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546901#M8302</link>
      <description>&lt;P&gt;There is a long discussion on the link below by vision tech expert ThePaintedSnipe that attempts to work out why D415 and D435 images may have differences. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 18:39:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546901#M8302</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-03-27T18:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546902#M8303</link>
      <description>&lt;P&gt;Thanks for the link. I skimmed through the threads. The discussion seems to be about a different problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I can tell, my problem is not about the depth data quality -- I am only measuring one object, and the distance seems to be accurate. My problem arises when I convert the distance to height.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my part, I'd like to know:&lt;/P&gt;&lt;P&gt;1. Will camera re-calibration solve my problem?&lt;/P&gt;&lt;P&gt;2 . If yes, how easy or difficult is it to re-calibrate D435?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 19:48:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546902#M8303</guid>
      <dc:creator>RSun9</dc:creator>
      <dc:date>2018-03-27T19:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546903#M8304</link>
      <description>&lt;P&gt;It is hard to say if calibration will solve your issue.  Doing so is much easier on the 400 Series cameras though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 19:55:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546903#M8304</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-03-27T19:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546904#M8305</link>
      <description>&lt;P&gt;Thanks. I'll look into that.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 20:00:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546904#M8305</guid>
      <dc:creator>RSun9</dc:creator>
      <dc:date>2018-03-27T20:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546905#M8306</link>
      <description>&lt;P&gt;Robby, I'm just starting using D415 and thinking of trying to do the same calculations as you already did. I'm using OpenCV/ python. Would appreciate if you can share your code so I don't have to re-invent the wheel...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-albertr&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 17:42:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546905#M8306</guid>
      <dc:creator>ARyba</dc:creator>
      <dc:date>2018-03-28T17:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546906#M8307</link>
      <description>&lt;P&gt;Sorry this is part of a project and I can't share the source code now.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 17:52:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546906#M8307</guid>
      <dc:creator>RSun9</dc:creator>
      <dc:date>2018-03-28T17:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546907#M8308</link>
      <description>&lt;P&gt;Hello Robby_S,&lt;/P&gt;&lt;P&gt;First, you have to convert points to pointcloud and then use those coordinates. &lt;/P&gt;&lt;P&gt;X= depth * (x - ppx)/fx&lt;/P&gt;&lt;P&gt;Y= depth * (y- ppy)/fy&lt;/P&gt;&lt;P&gt;Z= depth&lt;/P&gt;&lt;P&gt;Then use Pythagoras&lt;/P&gt;&lt;P&gt;Distance= sqrt(X*X + Y*Y + Z *Z). &lt;/P&gt;&lt;P&gt;That should fix your issue. &lt;/P&gt;&lt;P&gt;D415 worked maybe due to narrow FOV approximation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Please let us know if this fixes your issue.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Regards,&lt;P&gt;&amp;nbsp;&lt;/P&gt;Jesus G.&lt;P&gt;&amp;nbsp;&lt;/P&gt;Intel Customer Support</description>
      <pubDate>Tue, 17 Apr 2018 14:23:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546907#M8308</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-04-17T14:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546908#M8309</link>
      <description>&lt;P&gt;Hi Jesus, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response, but I don't quite understand your solution: Distance= sqrt(X*X + Y*Y + Z *Z). What is this distance? Distance from what?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am measuring the distance between two pixels, (x0, y0, z0) and (x1, y1, z1), in the point cloud. Since I am only interested in the height, ideally, x0 = x1 and z0 = z1. That leaves H = Y0 - Y1 = depth * (y0-ppy)/fy - depth * (y1-ppy)/fy = depth * (y0 - y1)/fy as the only non-zero component left.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we denote D = depth, and bh = (y0 - y1), we get H = (D * bh)/fy. That's exactly my formula to start with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I understand your answer correctly, your answer is actually the same as my formula, which does not work on D435.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, if I misunderstand your answer, please point it out and explain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Robby&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 00:51:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546908#M8309</guid>
      <dc:creator>RSun9</dc:creator>
      <dc:date>2018-05-04T00:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546909#M8310</link>
      <description>&lt;P&gt;Hello @Robby_S,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;We are checking with engineering on this issue. We appreciate your patience.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Regards,&lt;P&gt;&amp;nbsp;&lt;/P&gt;Jesus&lt;P&gt;&amp;nbsp;&lt;/P&gt;Intel Customer Support</description>
      <pubDate>Thu, 10 May 2018 15:54:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546909#M8310</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-05-10T15:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546910#M8311</link>
      <description>&lt;P&gt;First let me clarify the equation: If you choose any two points in a point cloud after you have done the conversion described above, each point will have an (X1, Y1, Z1) and (X2, Y2, Z2). You then calculate deltaX="X"= X2-X1, deltaY="Y"= Y2-Y1, and deltaZ="Z"=Z2-Y1. The distance between the two points is then Distance= sqrt(X*X + Y*Y + Z *Z).  Yes, here X, Y, Z are used as shorthand for the differences.&lt;/P&gt;&lt;P&gt;In your case you assume that deltaX and deltaZ is zero. You may be able to control for that, like measuring on a white wall at exactly perpendicular, but in general it is best to use the equation above. Have you tried that?&lt;/P&gt;&lt;P&gt;If you do control the deltaX=0, and deltaZ=0 exactly then YES your equation is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I think the real issue may be in making sure you use the DEPTH x, y and DEPTH focal length. It may be that you are using the color x, y or focal length. Note that the external color camera has a 1.5x smaller FOV for the D435 but the FOV for color and depth are the same for the D415, so this may be the source of the discrepancy.   &lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 18:54:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546910#M8311</guid>
      <dc:creator>Anders_G_Intel</dc:creator>
      <dc:date>2018-05-10T18:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute object's height for D435?</title>
      <link>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546911#M8312</link>
      <description>&lt;P&gt;Thanks for your detailed explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was indeed using (x, y) from the color frame. However, I made sure that I aligned the depth frame to the color frame beforehand, so I assumed that the (x, y) coordinates on the depth frame should be quite close to those on the color frame. No?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the focal length from the depth streams' intrinsics, so I must be using the depth focal length, right?&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 19:54:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/How-to-compute-object-s-height-for-D435/m-p/546911#M8312</guid>
      <dc:creator>RSun9</dc:creator>
      <dc:date>2018-05-10T19:54:01Z</dc:date>
    </item>
  </channel>
</rss>

