- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
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.
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 ( https://github.com/IntelRealSense/librealsense/wiki/API-How-To).
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.
Why is this happening? Is this a calibration issue? Does my equation not fit D435's optical model?
BTW, the same equation works very well for D415.
Thanks,
Robby
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Robby_S,
Have you looked at the rs-measure example in the librealsense source code? It shows exactly how to calculate the distance between two points.
Regards,
Jesus G.
Intel Customer Support
![](/skins/images/EA93FC3209B97CF1A77FC045C5DDA88A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »