How do I perform erosion and dilation on point cloud

I have a point cloud representing top view of two nearby objects. Performing segmentation using pcsegdist identifies them as one segment. I feel like I would be able to separate them into two objects after applying erosion. How can I achieve erosion in pointclouds?
Thanks!

 Respuesta aceptada

Yazan
Yazan el 17 de Jul. de 2021
Transform the point cloud into an image, then you can use Matlab image processing tools and functions.
A quick search on the File Exchange lead me to this function, but I have not tested it myself.

6 comentarios

Farah Saeed
Farah Saeed el 18 de Jul. de 2021
Editada: Farah Saeed el 18 de Jul. de 2021
Thanks for your answer! I tried it and it is mapping to 2D.
After applying segmentation I can map it back to 3D.
They used knnsearch when converting point cloud to 2D image. I guess I can use the same for mapping it back to 3D.
Thanks again.
DGM
DGM el 19 de Jul. de 2021
Editada: DGM el 19 de Jul. de 2021
strel() supports 3D structuring elements; imdilate() and imerode() work on 3D data as well.
Yazan
Yazan el 19 de Jul. de 2021
@DGM 3D data is not the same as 3D point clouds.
Yazan
Yazan el 19 de Jul. de 2021
@Farah Saeed If it solves your problem, then accept the answer please.
@DGM This can be useful if we can convert the point clouds into voxel/grid representation. If you have any ideas about conversion from point clouds to voxel/grid, you may share here.
Yazan
Yazan el 19 de Jul. de 2021
I have used this contribution before fore that.

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 15 de Jul. de 2021

Comentada:

el 19 de Jul. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by