点云边缘获取并可视化(附open3d python代码)

通过计算每个点的梯度来找到边缘点,类似图像中找图像轮廓的方法

对于简化后续计算步骤,或者提取点云特征都比较有用

结果如下图;

点云边缘获取并可视化(附open3d python代码)_第1张图片

 

代码如下:



# -*-coding:utf-8 -*-

import numpy as np
import open3d as o3d
import time




class Edge3DCentroid:
    def __init__(self):
        """
           Init parameters
        """
        self.pcd        = None  # input point clouds
        self.NPt        = 0     # input point cloud number
        # self.Rnn        = 0.12  # r-neighbour sqrt(0.015), R-neighbour
        self.Rnn        = 1  # r-neighbour sqrt(0.015), R-neighbour
        self.EI         = None  # Save point-wise edge-index
        self.GOrt       = None  # Grid-wise max-orientation
        self.Neighbours = None  # Neighbour system
        self.MaxNN  

你可能感兴趣的:(点云-激光雷达处理代码合集,python为主,python,深度学习,算法,c++)