**

车道线检测识别 [园区道路线检测识别](开源github,欢迎stared)(https://github.com/ZubinHuang/StartUpHub_RoadLaneDetect)

主要实现道路线区域覆盖

依赖库 Python3.6 OpenCV3 numpy moviepy matplotlib

#主要代码 python3 pipeline.py
import os
import cv2
import utils
import matplotlib.pyplot as plt
import numpy as np
from moviepy.editor import VideoFileClip
import linedef thresholding(img):#setting all sorts of thresholdsx_thresh = utils.abs_sobel_thresh(img, orient='x', thresh_min=10 ,thresh_max=230)mag_thresh = utils.mag_thresh(img, sobel_kernel=3, mag_thresh=(30, 150))dir_thresh = utils.dir_threshold(img, sobel_kernel=3, thresh=(0.7, 1.3))hls_thresh = utils.hls_select(img, thresh=(120, 255))lab_thresh = utils.lab_select(img, thresh=(155, 200))luv_thresh = utils.luv_select(img, thresh=(225, 255))#Thresholding combinationthreshholded = np.zeros_like(x_thresh)threshholded[((x_thresh == 1) & (mag_thresh == 1)) | ((dir_thresh == 1) & (hls_thresh == 1)) | (lab_thresh == 1) | (luv_thresh == 1)] = 1return threshholdeddef processing(img,object_points,img_points,M,Minv,left_line,right_line):#camera calibration, image distortion correctionundist = utils.cal_undistort(img,object_points,img_points)#get the thresholded binary imagethresholded = thresholding(undist)#perform perspective  transformthresholded_wraped = cv2.warpPerspective(thresholded, M, img.shape[1::-1], flags=cv2.INTER_LINEAR)#perform detectionif left_line.detected and right_line.detected:left_fit, right_fit, left_lane_inds, right_lane_inds = utils.find_line_by_previous(thresholded_wraped,left_line.current_fit,right_line.current_fit)else:left_fit, right_fit, left_lane_inds, right_lane_inds = utils.find_line(thresholded_wraped)left_line.update(left_fit)right_line.update(right_fit)#draw the detected laneline and the informationarea_img = utils.draw_area(undist,thresholded_wraped,Minv,left_fit, right_fit)curvature,pos_from_center = utils.calculate_curv_and_pos(thresholded_wraped,left_fit, right_fit)result = utils.draw_values(area_img,curvature,pos_from_center)return result
#
#
left_line = line.Line()
right_line = line.Line()
cal_imgs = utils.get_images_by_dir('camera_cal')
object_points,img_points = utils.calibrate(cal_imgs,grid=(9,6))
M,Minv = utils.get_M_Minv()##draw the processed video
project_outpath = 'vedio_out/project_video_out2.mp4'
#project_video_clip = VideoFileClip("project_video.mp4")
project_video_clip = VideoFileClip("14s.mp4")
project_video_out_clip = project_video_clip.fl_image(lambda clip: processing(clip,object_points,img_points,M,Minv,left_line,right_line))
project_video_out_clip.write_videofile(project_outpath, audio=False)##draw the processed test image
test_imgs = utils.get_images_by_dir('test_images')
undistorted = []
for img in test_imgs:img = utils.cal_undistort(img,object_points,img_points)undistorted.append(img)result=[]
for img in undistorted:res = processing(img,object_points,img_points,M,Minv,left_line,right_line)result.append(res)plt.figure(figsize=(10,10))
for i in range(len(result)):plt.subplot(len(result),1,i+1)plt.title('thresholded_wraped image')plt.imshow(result[i][:,:,::-1])plt.show()

demo gif动图

[1]:https://github.com/ZubinHuang/StartUpHub_RoadLaneDetect

车道线检测识别 [园区道路线检测识别](开源github,欢迎stared)相关推荐

  1. 【DLT-Net 解读】可行驶区域、车道线和交通目标的联合检测

    本文发表于 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS,提出了一种统一的神经网络DLT-Net来同时检测可行驶区域.车道线和交通对象 ...

  2. 【车道线算法】GANet-车道线检测环境配置一文通关

    目录 GANet配置全纪录 下载代码 conda环境部署 安装torch和cudatoolkit 安装其他包 编译 总结 GANet配置全纪录 下载代码 GitHub - Wolfwjs/GANet: ...

  3. cesium 流动线 发光线(道路线)

    cesium 流动线 发光线 以下为源码,直接复制粘贴就好 第一步创建 polyline.js 文件 import './PolylineCityLinkMaterialProperty.js' ex ...

  4. 无人驾驶汽车系统入门(六)——基于传统计算机视觉的车道线检测(1)

    无人驾驶汽车系统入门(六)--基于传统计算机视觉的车道线检测(1) 感知,作为无人驾驶汽车系统中的"眼睛",是目前无人驾驶汽车量产和商用化的最大障碍之一(技术角度), 目前,高等级 ...

  5. 无人驾驶:车道线检测,附代码

    点击上方"3D视觉工坊",选择"星标" 干货第一时间送达 作者丨Dt Pham 编辑丨McGL 在这个项目中,我使用 Python 和 OpenCV 构建了一个 ...

  6. 计算机视觉——车道线(路沿)检测

    目录 系列文章目录 一.实验内容与方法 二.视频的导入.拆分.合成 1.视频时长读取 2.视频的拆分 3.视频的合成 三.图像处理/边缘检测 0.尝试 1.图像处理->边缘检测(原理) 2.Ca ...

  7. 基于MATLAB改进Otsu阈值分割的车道线检测

    基于MATLAB改进Otsu阈值分割的车道线检测 摘要:在判断车道偏离以防止车辆碰撞等危害时,车道标线检测需要通过图像处理来进行,检测方法是否适用于各种背景环境条件以及检测的及时性至关重要传统的Ots ...

  8. 毕业设计 - 车道线检测(自动驾驶 机器视觉)

    文章目录 0 前言 1 车道线检测 2 目标 3 检测思路 4 代码实现 4.1 视频图像加载 4.2 车道线区域 4.3 区域 4.4 canny 边缘检测 4.5 霍夫变换(Hough trans ...

  9. 3.1.1 车道线检测

    更多内容,请关注: github:Autopilot-Updating-Notes gitee: Autopilot-Updating-Notes 车道线检测是一种环境感知应用,其目的是通过车载相机或 ...

最新文章

  1. ORACLE内存结构简介
  2. (pytorch-深度学习)循环神经网络的从零开始实现
  3. 【CF321E】+【bzoj5311】贞鱼
  4. js调用打印机直接打印_打印机如何打印二维码
  5. Drools规则引擎入门小demo
  6. CTF中各种好用的软件以及解密网址合集
  7. 基于LSTM算法的股票预测详解
  8. arcsin在matlab中怎么输,matlab arcsin
  9. Java生成临时文件
  10. JAVA毕业设计html5在线医疗系统计算机源码+lw文档+系统+调试部署+数据库
  11. Python3.6+jieba+wordcloud 爬取豆瓣影评生成词云
  12. 纯前端导出export,复杂表格表头合并,表头数据部分动态,
  13. 2018-05-18 docker supervisord进程管家
  14. latex中的希腊字母
  15. canvas 画布画太极图和钟表
  16. 山东计算机单招考哪些科目,单招考什么内容 单招一般考什么科目
  17. Win10 提示WerFault.exe 应用程序错误解决方法(非常规方法)
  18. 华为路由交换堆叠(通过堆叠卡)
  19. [快讯]致铭主板促销免费赠送Q版暖水袋
  20. 涨知识!细数银行卡三要素 API 的 N 种验证方法

热门文章

  1. android 视频编辑框架(分割,裁剪,旋转,合并,添加logo,背景音乐等等)
  2. MST6M182平台OSD制作
  3. 转载:ELK filebeat原生处理日志时间
  4. 基于ADAU1452的DSP及DAC音频失真分析
  5. 冒险岛私服能修改服务器,冒险岛私服 服务端+教程+工具
  6. C# 串口SerialPort控件
  7. 一个Linux下的网络模拟工具 Core
  8. 水泵泵宝显示下池缺水但是水池水很满_SM-A1泵宝单相水泵控制器经济型说明书.pdf...
  9. Python爬取PPT模板(requests+BeautifulSoup+多线程)
  10. Multi-organ auto-delineation in head-and-neck MRI for radiation therapy using regional convolutional