Open3D根据点云高度位置,给点云上色

复制代码
import copy
import time
import open3d as o3d;
import numpy as np;
import matplotlib.pyplot as plt
from scipy.signal import find_peaks
import pandas as pd
import logging
from tqdm import tqdm

colormap = np.random.randint(0,255,(200,3))/255
colormap = np.array([[128, 130, 120], [128, 110, 120], [128, 90, 120], 
                     [235, 0, 205], 
                     [0, 215, 0], 
                     [235, 155, 0]]) / 255.0 

points = np.asarray(pcd_Glue_Begin_End_Pos.points)
points_intensity = points[:, 2]  # intensity 
points_colors = [colormap[int(points_intensity[i]) % colormap.shape[0]] for i in range(points_intensity.shape[0])] 

pcd_Glue_Begin_End_Pos.colors = o3d.utility.Vector3dVector(points_colors)

    o3d.visualization.draw_geometries([pcd_Tire_Glue,pcd_Glue_Begin_End_Pos],window_name="pcd_Tire_Glue ") 

上色效果

相关推荐
菜冻鱼5 天前
Python-sklearn-SVM
开发语言·人工智能·python·机器学习·支持向量机·numpy·sklearn
菜冻鱼6 天前
Python-sklearn-评估指标
开发语言·人工智能·python·机器学习·numpy·pandas·sklearn
菜冻鱼6 天前
Python-sklearn-模型选择
开发语言·人工智能·python·机器学习·numpy·pandas·sklearn
菜冻鱼6 天前
Python-sklearn-特征工程
开发语言·人工智能·python·机器学习·numpy·matplotlib·sklearn
菜冻鱼10 天前
Python-pandas-索引与筛选
开发语言·笔记·python·numpy·pandas·学习方法
小趴蔡ha11 天前
03 NumPy 入门:机器学习中的数组和矩阵
python·线性代数·机器学习·numpy
乱七八糟的屋子13 天前
【C++数值计算】NumCpp超详细入门教程(纯正Numpy语法、零学习成本、C++首选科学计算库、性能压测对比)
c++·数值计算·numpy·高性能计算·科学计算·ndarray
Lee_jerome14 天前
python神经网络编程入门(二十)——RNN LSTM 数学原理与结构拆解
深度学习·numpy·lstm·参数量·sigmoid·tanh·门控机制
赤羽尾风15 天前
NumPy快速入门
python·numpy
Xiaok101815 天前
NumPy 数组 vs PyTorch Tensor
人工智能·pytorch·numpy