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 ")
上色效果