def callbackCamera(msg):
print('callbackCamera: msg : seq=%d, timestamp=%010d:%09d'%(
msg.header.seq, msg.header.stamp.secs, msg.header.stamp.nsecs
))
try:
cv_image = bridge.imgmsg_to_cv2(msg, "bgr8")
except CvBridgeError as e:
print(e)
s = ('%010d%09d'%(
msg.header.stamp.secs, msg.header.stamp.nsecs
))
filepath = "./camera/" + s + ".jpg"
#print filepath
height, width, channels = cv_image.shape
cv_image = cv_image[400:height-200, 0:width]
cv2.imwrite(filepath, cv_image)
detector.detect(filepath)
pass
lidar_to_img_test_v2.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录