Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matlab pointcloud #13550

Open
lrl-hub opened this issue Nov 27, 2024 · 5 comments
Open

matlab pointcloud #13550

lrl-hub opened this issue Nov 27, 2024 · 5 comments

Comments

@lrl-hub
Copy link

lrl-hub commented Nov 27, 2024

Required Info
Camera Model D455
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version {Win (11)
SDK Version 2.54.1
Language matlab

I'm trying to figure out if it's possible to obtain the point cloud of a specific object using MATLAB.
In the MATLAB toolkit provided by the SDK, I can get the real-time point cloud of the camera using "pointcloud_example", but I can't obtain the complete point cloud of a specific object (for example, a sphere, the point cloud in the shape of a sphere). I'd like to ask if there is such a MATLAB program that can achieve this.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Nov 27, 2024

Hi @lrl-hub If you want an object-shaped pointcloud that only has depth detail of the specific object then an easy way to do that may be to put a non-glossy plain black background such as a sheet of card behind / under the object. Then the camera should not be able to read depth detail from the black surface and it will appear on the pointcloud as an empty black area around the object.

@lrl-hub
Copy link
Author

lrl-hub commented Nov 27, 2024

OK, thank you. I've got a general understanding. I have another question. When using "pointcloud_example" in MATLAB, only the point cloud of the real-time camera can be obtained. For example, for a sphere, only the point cloud of one side of it can be obtained, and the point cloud of the invisible part cannot be obtained. Is there a solution to this?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Nov 27, 2024

Obtaining a point cloud of a sphere would be like obtaining one of the human face. From the front you can capture the face and a bit of the ears but not the sides of the head because the camera cannot see that detail from the front-on, straight ahead position. To obtain a 360 degree pointcloud you would have to take at least 2 captures (one from each side of the object) and stitch them together.

The RealSense SDK provides a C++ pointcloud stitching example for doing this, using MATLAB to obtain calibration information and feed it into the stitching program.

https://github.com/IntelRealSense/librealsense/tree/master/wrappers/pointcloud/pointcloud-stitching

@lrl-hub
Copy link
Author

lrl-hub commented Nov 27, 2024

In the link you provided, it uses two cameras. I want to ask if a D455 depth camera can achieve it.

@MartyG-RealSense
Copy link
Collaborator

If you can only use a single camera then you will likely have to export different views to multiple .ply pointcloud data files and then stitch them together in MATLAB using ICP registration, as described in the multiple-ply stitching discussion at the link below.

https://uk.mathworks.com/matlabcentral/answers/259918-merging-point-clouds-to-get-a-3-d-model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants