- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using RealSense D415 camera and want to calculate the (physical) area of an irregular shape.
For this, I have the mask image and have the depth of each pixel inside the mask.
If I can get the pixel size according to the distance of it to the camera, I will be able to measure the area.
How should I calculate the pixel size?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RealSense expert Samontab once gave some advice about calculating pixel size.
Please ignore the references to the instructions QueryColorFocalLengthMM and QueryColorFocalLength, as these refer to the old 2016 RealSense SDK that does not work with 400 Series cameras.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply.
I had seen that post before raising this question.
It is mentioned that "The distance of the objects is totally irrelevant to the size of the pixels.", in this case, how can I measure the area of my arbitrary shape!?
I thought that I can get the pixel size by the following formulation:
https://stackoverflow.com/a/45481222/6037506 Kinect V2 Depth Frame Pixel Size - Stack Overflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wonder if a shortcut to solving your problem may be to use the Librealsense Python sample program 'Box Dimensioner', where you have the camera scan a 'calibration object' that is bigger than the object you are going to measure in order to define a "bounding box", and then place the object you want to measure (that should be smaller than the size of the calibration object).
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python/examples/box_dimensioner_multicam librealsense/wrappers/python/examples/box_dimensioner_multicam at master · IntelRealSense/librealsense · GitHub
If you prefer to do it with trigonometry like in your example, trigonometry is a universal math. You would therefore just need to find out how to express the trigonometry instructions in Librealsense's format. The RealSense GitHub is the best place to ask about this. You can do so by visiting the link below and clicking on the 'New Issue' button to post a question.
https://github.com/IntelRealSense/librealsense/issues Issues · IntelRealSense/librealsense · GitHub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your time.
I will check the python code to see if I can use it.
Additionally, I will ask my question in the RealSense GitHub to get more insights on this matter.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page