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

上色效果

相关推荐
清水白石00811 天前
NumPy 向量化实战指南:从原理到实践的性能革命
python·numpy
Web极客码11 天前
CentOS 7 删除文件却不释放空间?从 inode、文件描述符到 VFS 的底层原理解析
python·centos·numpy
sheyuDemo13 天前
关于深度学习的d2l库的安装
人工智能·python·深度学习·机器学习·numpy
deepxuan15 天前
Day2--python三大库-numpy
开发语言·python·numpy
Flying pigs~~15 天前
数据分析三剑客之Pandas
大数据·数据库·人工智能·数据分析·numpy·pandas
Quintus五等升15 天前
深度学习自用笔记
人工智能·笔记·深度学习·学习·机器学习·bert·numpy
咚咚王者16 天前
人工智能之视觉领域 计算机视觉 第三章 NumPy 与图像矩阵
人工智能·计算机视觉·numpy
星川皆无恙17 天前
豆瓣电影数据爬虫分析:基于 Python 的豆瓣电影数据可视化分析系统
大数据·爬虫·python·算法·机器学习·信息可视化·numpy
星辰徐哥18 天前
人工智能从入门到精通:NumPy 与 Pandas 数据分析基础
人工智能·ai·数据分析·numpy·pandas
玄同76518 天前
NumPy 与 Pandas 中「有无返回值函数」的易错点整理
人工智能·python·机器学习·数据挖掘·数据分析·numpy·pandas