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

上色效果

相关推荐
摘取一颗天上星️3 天前
机器学习四剑客:Numpy、Pandas、PIL、Matplotlib 完全指南
机器学习·numpy·pandas
Ai财富密码3 天前
【Python教程】CentOS系统下Miniconda3安装与Python项目后台运行全攻略
开发语言·python·numpy
仟濹5 天前
「pandas 与 numpy」数据分析与处理全流程【数据分析全栈攻略:爬虫+处理+可视化+报告】
大数据·python·数据分析·numpy·pandas
心动啊1215 天前
Numpy7——数学2(矩阵基础(矩阵的逆和行列式),线性方程基础)
线性代数·矩阵·numpy
chenchenyyrr8 天前
【数据分析】之【Numpy】学习知识梳理
numpy
sduwcgg10 天前
python的numpy的MKL加速
开发语言·python·numpy
坚持就完事了11 天前
大二下期末
python·numpy·pandas
元直数字电路验证12 天前
Python数据分析及可视化中常用的6个库及函数(一)
python·numpy
猫头虎13 天前
零基础安装 Python 教程:从下载到环境配置一步到位(支持 VSCode 和 PyCharm)与常用操作系统操作指南
vscode·python·pycharm·beautifulsoup·numpy·pyqt·pip
心动啊12113 天前
Numpy——结构化数组和Numpy文件
numpy