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 ") 

上色效果

相关推荐
ayas1231918 小时前
numpy与matplotlib学习——数据可视化入门
学习·numpy·matplotlib
hutaotaotao3 天前
python中的numpy(数组)
python·numpy
MaCa .BaKa4 天前
40-智慧医疗服务平台(在线接/问诊/机器学习)
java·spring boot·mysql·机器学习·maven·numpy·pandas
zzc9218 天前
Tensorflow 2.X Debug中的Tensor.numpy问题 @tf.function
人工智能·tensorflow·numpy
正在走向自律11 天前
Conda 完全指南:从环境管理到工具集成
开发语言·python·conda·numpy·fastapi·pip·开发工具
xiaohanbao0913 天前
day26 Python 自定义函数
开发语言·python·学习·机器学习·信息可视化·numpy
来自星星的坤14 天前
深入理解 NumPy:Python 科学计算的基石
开发语言·python·numpy
留思难17 天前
Pyhton生活手册-NumPy数据类型:从快递单到智能家居的数据变形术
numpy
留思难22 天前
Python生活手册-Numpy数组索引:从快递柜到咖啡店的数字化生活指南
python·numpy
Code_流苏22 天前
《Python星球日记》 第36天:线性代数基础
线性代数·numpy·数据科学·向量空间·矩阵运算