I want to get an object dimensions using octomap C++ library, All i have a kinect camera.

asked 2020-05-18 07:56:36 -0600

A.Sen gravatar image

updated 2020-05-19 06:45:41 -0600

I'm working to get an object dimensions using kinect camera.

After searching, i made some steps to get the dimensions but i stucked at the last step.

Firstly, i launched openni and rtabmap to get a simple map that contains one object where the generated map is an octomap type.

Secondly, i found the octomap C++ library and i understood the APIs that read my generated map from the rtabmap.

The last step is to get the dimensions of the object, which is in the map, but i couldnt find a code or a direct API that gets the volume of the object

So can anyone help me to get the dimensions of the object using octomap library, also if there is an easier way to get an object dimensions it will be more than appreciated to mention it here

Thanks in advance. Hope to have an answer.

edit retag flag offensive close merge delete

Comments

What kind of object do you want to measure? A screenshot of the octomap and the camera frame may help to answer your question.

matlabbe gravatar image matlabbe  ( 2020-05-25 17:16:12 -0600 )edit

Firstly, thanks for yor comment.

The current milestone, we want to get a dimension of a box "length, width & height" and the distance between the robot and the box "depth"

Our last milestone, which is our main aim, is to get a dimension of a stair has a 3 or 2 steps.

A.Sen gravatar image A.Sen  ( 2020-05-25 23:36:02 -0600 )edit

You may consider segmenting the point cloud directly instead of the OctoMap, see Point Cloud Library (PCL)

matlabbe gravatar image matlabbe  ( 2020-05-26 09:36:23 -0600 )edit

Oky, then what i do after segmenting to know the distances that i mentioned above

Thanks, i will check the above link now "pcl"

A.Sen gravatar image A.Sen  ( 2020-05-26 09:53:58 -0600 )edit