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

上色效果

相关推荐
fai厅的秃头姐!2 小时前
数据分析-Numpy
数据挖掘·数据分析·numpy
m沐沐17 天前
【计算机视觉】OpenCV 模板匹配银行卡数字识别---下
人工智能·python·opencv·计算机视觉·pycharm·numpy
云和数据.ChenGuang19 天前
大模型厂商常用的数据库有哪些?
数据库·人工智能·pytorch·深度学习·numpy
MATLAB代码顾问20 天前
Python NumPy数值计算核心指南
开发语言·python·numpy
FBI HackerHarry浩20 天前
解决pip 安装 numpy 时元数据生成失败
numpy·pip
m沐沐22 天前
【计算机视觉】OpenCV 模板匹配银行卡数字识别---上
人工智能·后端·python·opencv·计算机视觉·pycharm·numpy
iRayCheung24 天前
virtualbox安装的ubuntu系统跑numpy报错
linux·ubuntu·numpy
SilentSamsara25 天前
scikit-learn 工作流工程化:Pipeline、ColumnTransformer 与自定义转换器
开发语言·人工智能·python·机器学习·青少年编程·numpy·scikit-learn
SilentSamsara1 个月前
NumPy 进阶:广播机制、ufunc 与向量化计算的工程实践
开发语言·python·青少年编程·性能优化·numpy
DogDaoDao1 个月前
【第 04 篇】列表与元组 —— 序列类型核心详解
人工智能·python·深度学习·神经网络·机器学习·conda·numpy