python 将pcd点云投影到图像 验证外参标定正确与否

#!/usr/bin/env python 
import cv2
import numpy as np 
import math
from scipy import misc
f = open('/home/dell/handv2/runze11/1567129304148451.pcd')
image=cv2.imread('/home/dell/handv2/runze11/1567129304.223065.jpg')
pcd_data = f.readlines()
points = np.zeros((len(pcd_data)-11,3))
imgcolor=np.zeros_like(image)
for i in range(11,len(pcd_data)):
    pcd_num_data = pcd_data[i].split( )
    points[i-11][0] = float(pcd_num_data[0])
    points[i-11][1] = float(pcd_num_data[1])
    points[i-11][2] = float(pcd_num_data[2])
R=np.array([[ 0.00911558,  0.99892147,  0.04552798],[ 0.20295775  ,0.04273397, -0.97825455],[-0.97914507 , 0.01815761, -0.2023493]])
t=np.array([[ 1.21991149],[-0.27737632],[-1.39842796]])
camera=np.array(([ 1.8662051087073896e+03, 0, 9.6197416454354118e+02],[0,1.8907532330116028e+03, 6.8753441160022533e+02],[0,0,1]),dtype=np.double)
dist=np.array(([-5.7021027699312055e-01, 5.37

你可能感兴趣的:(自动驾驶,外参标定,人工智能,激光雷达相机外参标定,重投影)