How to get output in Matlab as PointCloud2 Object using Realsense D435
I want to process .xyz file from D435 in Matlab, but it Require PointCloud2 object as given in https://in.mathworks.com/help/ros/ref/pointcloud2.html#bu3uilg
I can save the using realsense D435 as .ply but it is not pointCloud2 as required in Matlab.
-
I hope that the link below will be helpful for you.
https://answers.ros.org/question/291212/create-pointcloud2-in-matlab/
A person within that discussion said that they had written a utility for this task.
https://answers.ros.org/question/291212/create-pointcloud2-in-matlab/?answer=318559#post-id-318559
-
The method given the link https://in.mathworks.com/matlabcentral/answers/395620-ros-create-pointcloud2-from-matlab-pointcloud does not describe the way of extracting the field or giving fields for creating a pointcloud2 object.
I tried this example also gives error..................
-
I recalled a previous discussion for importing a ply file into MATLAB and looked up its details. There is a ply import tool available for MATLAB that converts a ply to a MAT file with XYZ coordinates and RGB color channels.
https://uk.mathworks.com/matlabcentral/fileexchange/54041-plytomat
-
There are many methods for converting the ply to .xyz but my moto is to direct access of incoming data from realsense to preserve the shape of object......
This method suggested by you is also working but I think there a loss feature by conversion.
So my Aim here is to access the realsense data to pointcloud2.
-
Interfacing MATLAB with the camera and ROS in real-time in this way goes outside of my experience, unfortunately. I recommend asking at the RealSense GitHub forum by visiting the link below and clicking on the New Issue button to post a question. There should be RealSense team members there with the specialist knowledge to advise you well.
Please sign in to leave a comment.
Comments
7 comments