飓风算法受影响的网站有哪些,wordpress中文官网地址,网站类网站开发教程,seo和sem分别是什么c语言版本和算法原理的可以查看本人的其他文档。《自动驾驶AVM环视算法--全景的俯视图像和原图》本文档进用于展示部分代码的视线#xff0c;获取方式网盘自行获取#xff08;非免费介意勿下载#xff09;#xff1a;链接: https://pan.baidu.com/s/1MJa8ZCEfNyLc5x0uVegto…c语言版本和算法原理的可以查看本人的其他文档。《自动驾驶AVM环视算法--全景的俯视图像和原图》本文档进用于展示部分代码的视线获取方式网盘自行获取非免费介意勿下载链接: https://pan.baidu.com/s/1MJa8ZCEfNyLc5x0uVegtog 提取码: vskn 。
测试的环境 以下是主运行函数的部分代码仅供参考
import cv2
from runTOP import * # 导入 MyClass 类
from runTOP import avmobjData # 创建类的实例
runTOP avmobjData() F_openTrue
B_openTrue
L_openTrue
R_openTrue
F_videocv2.VideoCapture(video/Front.avi)
if F_video.isOpened():F_ocpn,F_frameF_video.read()
else:F_openFalse
B_videocv2.VideoCapture(video/Back.avi)
if B_video.isOpened():B_ocpn,B_frameB_video.read()
else:B_openFalse
L_videocv2.VideoCapture(video/Left.avi)
if L_video.isOpened():L_ocpn,L_frameL_video.read()
else:L_openFalse
R_videocv2.VideoCapture(video/Right.avi)
if R_video.isOpened():R_ocpn,R_frameR_video.read()
else:R_openFalseCarImage cv2.imread(top.png)
print(F_open,B_open,L_open,R_open)
#初始化函数
new_width,new_heightrunTOP.init(0)
print(new_width,new_height,new_width,new_height)
resize_CarImage cv2.resize(CarImage, (new_width, new_height))
cv2.imshow(resize_CarImage,resize_CarImage)
# 创建一个三通道的彩色图像RGB初始值为 0黑色
Dstimg np.zeros((JS_AVM_IMGH, JS_AVM_IMGW, 3), dtypenp.uint8)
while F_open and B_open and L_open and R_open:F_ret,F_frameF_video.read()B_ret,B_frameB_video.read()L_ret,L_frameL_video.read()R_ret,R_frameR_video.read()if F_frame is None or B_frame is None or L_frame is None or R_frame is None is None:breakif F_retTrue and B_retTrue and L_retTrue and R_retTrue:runTOP.run(F_frame,B_frame,L_frame,R_frame,Dstimg,0) runTOP.js_DrawCar(Dstimg,resize_CarImage,1)DstimgrunTOP.drawTxt(Dstimg)cv2.imshow(avmTOP,Dstimg)if cv2.waitKey(25) 0xFF27:break
F_video.release()
B_video.release()
L_video.release()
R_video.release()
cv2.destroyAllWindows()
注当前python的版本效率比较低需要加速的可以自行优化加速代码实现的过程是从C代码直接转换过来的没有进行任何的优化加速。
测试实现的效果