zoukankan      html  css  js  c++  java
  • Self-Driving Car 02

    1. Setting up the problem

    Your job is to teach the car how to perceive the world around it. When we drive, we use our eyes to figure out how fast to go and where the lane lines are and where to turn. However, a car doesnot have eyes. We can use cameras and other sensors to achieve a similar function. And we need to teach the car how to do. The first project is to identify and track the position of the lane lines in a series of images.

    2. Identifying Lane Lines by Color

    The lane lines are white, so how do we select the white pixels in an image.

    What color actually means in the case of digital images. In this case, it means that our image is actually made up of a stack of three images, red, green and blue (RGB). These images are sometimes called color channels. Each of these color channels contains pixels whose values range from zero to 255, where zero was the darkest possible value and 255 is the brightest possible value.

    PURE WHITE=[255,255,255]

    3. Region select

    Mainly, the region where the lane lines are.

    4. Computer vision

    When we talk to the computer vision, we use the algorithms to let a computer see the world like we see it. Full of depth, and color and shapes and meaning.

    5. Canny Edge Detection

    The goal is to identify the boundaries of an object in an image.

    A. First, we will convert to grayscale. 

    B. Next, we compute the gradient(梯度斜率), where the brightness of each pixel corresponds to the strength of the gradient at that point.

    We are going to find edges by tracing out the pixels that follow the strongest gradients.

    We can more easily detect objects by their shape.

    What is about the edge?

    edges=cv2.Canny(gray, low_threshold,high_theshold)

    The Canny function to an image called gray and the output will be another image called edges.

    Low_threshold determine how strong the edges must be to be detected. Just the strength of the gradient.

     

    Rapid changes in brightness are where we find the edges. We can perform mathematical operations on it, just like any other function. f(x,y)=pixel value. We can take its derivative.

    df/dx =just a measure of change of this function.

    A small derivative means small change, and big derivative means big change.

    Images are two-dimensional. Computin the gradient gives us thick edges.

    7. Hough Introduction

    To find lines I need to first adopt a model of a line ane then fit that model to the assortment of dots in my edge detected image.

     

  • 相关阅读:
    [复变函数]第07堂课 2.2 初等解析函数
    [家里蹲大学数学杂志]第237期Euler公式的美
    [家里蹲大学数学杂志]第287期复变函数讲义
    [家里蹲大学数学杂志]第253期实变函数讲义
    模仿王者荣耀的实时阴影
    Android 识别身份证号码(图片识别)
    基于swiper的移动端H5页面,丰富的动画效果
    基于skitter的轮播图炫酷效果,幻灯片的体验
    基于canvas的原生JS时钟效果
    .net core 实现简单爬虫—抓取博客园的博文列表
  • 原文地址:https://www.cnblogs.com/gzoof/p/7650649.html
Copyright © 2011-2022 走看看