KR20140148171A - Lane Detection method for Advanced Vehicle - Google Patents

Lane Detection method for Advanced Vehicle Download PDF

Info

Publication number
KR20140148171A
KR20140148171A KR20130071751A KR20130071751A KR20140148171A KR 20140148171 A KR20140148171 A KR 20140148171A KR 20130071751 A KR20130071751 A KR 20130071751A KR 20130071751 A KR20130071751 A KR 20130071751A KR 20140148171 A KR20140148171 A KR 20140148171A
Authority
KR
South Korea
Prior art keywords
lane
image
vanishing point
template
detecting
Prior art date
Application number
KR20130071751A
Other languages
Korean (ko)
Other versions
KR101483742B1 (en
Inventor
한기태
허환
김성훈
Original Assignee
가천대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 가천대학교 산학협력단 filed Critical 가천대학교 산학협력단
Priority to KR20130071751A priority Critical patent/KR101483742B1/en
Publication of KR20140148171A publication Critical patent/KR20140148171A/en
Application granted granted Critical
Publication of KR101483742B1 publication Critical patent/KR101483742B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/588Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W40/00Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models
    • B60W40/02Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models related to ambient conditions
    • B60W40/06Road conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Mathematical Physics (AREA)
  • Transportation (AREA)
  • Mechanical Engineering (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Traffic Control Systems (AREA)

Abstract

The present invention relates to a lane detection method for an intelligent vehicle including the steps of: (a) detecting a vanishing point of a road using RANSAC algorithm in the initial frame of a received image; (b) storing a predetermined area around the vanishing point as a template area (TA) which will be used for template matching; (c) estimating a lane while going down from the vanishing point; (d) extracting a perspective transformation coefficient based on the estimated lane; (e) extracting an inverse perspective transformation coefficient by applying inverse perspective transformation to the extracted perspective transformation coefficient, and obtaining an image from which perspective is removed using the inverse perspective transformation coefficient; and (f) detecting a lane by applying a lane filter to the image from which perspective is removed. The present invention provides the strong lane detecting method in real time even under inclined road conditions using the inverse perspective transformation technology, which does not require any camera parameter of images, and the proposed lane filter.

Description

지능형 차량의 차선 검출방법{Lane Detection method for Advanced Vehicle}[0001] The present invention relates to a lane detection method for an intelligent vehicle,

본 발명은 지능형 차량의 차선 검출방법에 관한 것으로, 보다 상세하게는 카메라 파라미터를 산출할 필요없이 카메라에 입력되는 영상만으로 경사진 도로 환경 등에서도 역투시 매핑(IPM) 방법과 같은 성능을 가지는 차선 검출방법에 관한 것이다.The present invention relates to a lane detection method of an intelligent vehicle, and more particularly, to a lane detection method having a performance equivalent to a reverse inverse mapping (IPM) method even in a sloping road environment, ≪ / RTI >

최근 IT융합기술이 발전함에 따라 자동차산업에서도 여러 IT기술과 융합된 스마트카(Smart Car)의 기술이 떠오르고 있다. 스마트카 진화의 핵심은 기존 최첨단 텔레매틱스 서비스를 적극 수용함에 따라 폭넓은 서비스가 가능하게 된 것이다. 이러한 서비스를 이용한 고 안전 지능형차량 (Advanced Vehicle Safety: AVS)은 사고 예방 및 회피, 충돌 등 위험상황으로부터 운전자 및 탑승자를 보호하여 교통사고 및 피해를 줄일 수 있는 기술로 평가된다.Recently, with the development of IT convergence technology, the technology of smart car which is converged with various IT technologies in the automobile industry is emerging. The key to smart car evolution is the broad acceptance of existing, state-of-the-art telematics services. Advanced Vehicle Safety (AVS) using these services is evaluated as a technology to reduce traffic accidents and damage by protecting drivers and passengers from accidents such as accident prevention, avoidance and collision.

고 안전 지능형차량의 구성 요소 중 하나인 차선 이탈 경고 시스템(Lane Departure Warning System)은 영상, 레이더, 레이저 등의 입력 센서로부터 영상정보를 입력받아 주행 중인 차량의 차선 이탈 여부를 판별하여 운전자의 전방주시 태만이나 졸음운전 등을 경고하여 안전 운전 기능을 구현하는 기술이다. 이러한 기능을 구현하기 위해서는 각종 센서를 유기적으로 잘 활용하는 것이 중요하지만 수동 센서인 영상 센서를 사용하는 것이 일반적이다.The Lane Departure Warning System, which is one of the components of high safety intelligent vehicle, receives image information from input sensor such as image, radar, laser, etc., It is a technology that implements safe driving function by warning of neglect or drowsiness driving. In order to realize such a function, it is important to utilize various sensors organically well, but it is common to use an image sensor which is a passive sensor.

영상 입력 센서를 사용하여 차선 이탈 여부를 판별하기 위한 실시간 차선 검출 알고리즘은 단순하고 적은 연산으로 처리시간을 단축시켜 실시간으로 사용할 수 있어야 한다. 차선 검출 알고리즘의 경우 색 정보[대한민국, 공개번호 10-2013-0028610]나 차선 에지 정보를 이용하여 판단하는데 색 정보는 에지 정보[대한민국, 공개번호 10-2011-0001427호]보다 정확하게 검출이 가능하지만 특정한 색을 추출하기 때문에 특징 추출 선택의 폭이 제한적이다. 또한 에지정보를 사용하는 허프변환의 경우 잡음이나 도로의 상태에 강건하게 직선 추출이 가능하지만 연산량이 많아 실시간 검출에 적용하기 힘든 단점이 있다.The real - time lane detection algorithm for detecting lane departure using the image input sensor should be able to use in real time by shortening the processing time by simple and small operation. In the case of the lane detection algorithm, the color information is judged by using the color information [Korea, Publication No. 10-2013-0028610] and the lane edge information, but the color information can be detected more accurately than the edge information [Republic of Korea, No. 10-2011-0001427] Because of the extraction of specific colors, the range of feature extraction choices is limited. In the case of Hough transform using edge information, it is possible to robustly extract straight line to noise or road condition, but it has a disadvantage that it is difficult to apply to real time detection due to a large amount of computation.

차량 검출 방법에는 여러 가지 방법이 있는데, Y. Wang은 B-Snake 기반의 차선 검출 방법을 제안하였다. 이 방법은 B-Spline에 필요한 제어점을 찾기 위하여 Snake 알고리즘을 사용해 제어점을 설정하여 어떠한 형태의 차선이라도 검출 가능한 강건한 차선 검출 방법을 제안하였으나 검출 시간이 길어 실시간 차선 검출에는 사용의 제약을 가지고 있다.There are various methods of vehicle detection. Y. Wang proposed a B-Snake-based lane detection method. This method proposed a robust lane detection method that can detect any type of lane by setting control points using Snake algorithm to find the control points needed for B-Spline. However, it has a limitation in using real time lane detection because of long detection time.

Alberto Broggi는 카메라 파라미터를 이용하여 영상의 원근 효과를 제거해 탑 뷰(top view) 영상을 생성하여 차선을 검출하는 방법을 제안하였다. 영상의 원근 효과를 제거하기 위하여 역투시 매핑(IPM: Inverse Perspective Mapping)방법으로 차선을 평행하게 만들어 영상 전체를 사용하지 않고 차선이 나타나는 영역만을 사용할 수 있어 검출 시간을 단축시킬 수 있었다. 그러나 이 방법은 역투영 변환을 하기 위하여 카메라의 파라미터를 사전에 알아야 하는 단점이 존재한다. Alberto Broggi proposed a method to detect the lane by generating the top view image by removing the perspective effect of the image using the camera parameters. In order to eliminate the perspective effect of the image, it was possible to shorten the detection time by using the inverse perspective mapping (IPM) method to make the lane parallel and use only the area where the lane appears without using the entire image. However, this method has a disadvantage in that the parameters of the camera must be known in advance in order to perform the inverse projection transformation.

상술한 문제를 해결하고자 하는 본 발명의 과제는, 카메라 파라미터를 산출할 필요없이 빠른 속도로 차선을 검출할 수 있고, 도로 경사 변화에 강건하게 실시간으로 차선을 검출 할 수 있는 지능형 차량의 차선 검출방법을 제공하고자 함이다.An object of the present invention to solve the above problems is to provide a lane detection method of an intelligent vehicle capable of detecting lanes at a high speed without requiring calculation of camera parameters and robustly detecting lanes in real- .

제안하는 방법은 영상 최초 프레임에서 소실점을 검출하여 소실점을 기준으로 하는 최초 차선을 예측하고 소실점 주변 영역을 템플릿으로 저장하고 이를 이용하여 다음 프레임에 대한 소실점 영역을 추적하도록 한다. 예측된 소실점 영역으로부터 차선을 예측하고, 예측된 차선으로부터 생성한 이상형 차선을 설정하며, 이를 이용하여 투시변환에 사용할 호모그래피 행렬을 추출한다. 추출된 호모그래피 행렬을 사용하여 원근 효과가 제거된 영상을 생성하며, 여기에 5x1 차선 필터를 사용하여 차선을 검출한다. The proposed method detects the vanishing point in the first frame of the video, predicts the first lane based on the vanishing point, stores the area around the vanishing point as a template, and tracks the vanishing point region for the next frame using the vanishing point. Predicts the lane from the predicted vanishing point region, sets the ideal lane created from the predicted lane, and uses it to extract a homography matrix to be used for perspective transformation. Using the extracted homography matrix, the image with the perspective effect removed is generated, and the lane is detected using the 5x1 lane filter.

이와 같은 본 발명은 영상의 카메라 파라미터가 필요 없는 역 투시변환 기술 및 제안한 차선필터를 사용하여 경사진 도로 환경에서도 강인한 실시간 차선 검출방법을 제공한다. The present invention provides a robust real-time lane detection method even in an inclined road environment by using a back-to-front transformation technique which does not require a camera parameter of an image and a proposed lane filter.

또한, 본 발명은 경사진 도로 환경에서도 차선검출이 견고하며, 처리영역을 축소하고 처리과정을 단순화함으로서 초당 40 frames 정도의 양호한 차선검출 결과 보여준다.In addition, the present invention is robust in lane detection even in a sloping road environment, shows a good lane detection result of about 40 frames per second by reducing the processing area and simplifying the processing procedure.

도 1은 본 발명의 실시예에 따른 지능형 차량의 실시간 차선 검출방법의 흐름을 나타낸 블록 구성도이고,
도 2는 본 발명의 실시예에 따른 차선 검출방법에 적용되는 소실점 획득을 위한 처리과정을 나타내는 모식도이고,
도 3은 본 발명의 실시예에 따른 차선 검출방법에 적용되는 투시변환의 예를 나타낸 모식도이고,
도 4는 정상 도로인 상태와 경사도로의 상태에서 동일한 변환계수를 적용했을 때의 문제점을 나타낸 사진이고,
도 5는 입력된 영상과 입력된 영상의 소실점을 기준으로 템플릿 영역을 지정한 모습을 나타낸 사진이고,
도 6은 본 발명의 실시예에 따른 차선 검출방법으로 최초 차선의 예측의 결과를 나타낸 사진이고,
도 7은 본 발명의 실시예에 적용되는 관심영역(ROI) 지정을 나타낸 사진이고,
도 8은 본 발명의 실시예에 따라 예측된 차선과 이상형 차선을 나타낸 사진이고,
도 9는 본 발명의 실시예에 적용되는 역 투시변환의 예를 나타낸 모식도이고,
도 10은 본 발명의 실시예에 따라 예측되는 차선과 이상형 차선의 상관관계를 나타낸 모식도이고,
도 11은 본 발명의 실시예에 따라 예측된 2개의 타입의 차선의 예를 나타낸 모식도이고,
도 12는 도로 경사가 변화하는 경우 재 지정딘 소실점 영역을 나타낸 사진이고,
도 13은 본 발명의 실시예에 따라 호모그래피 행렬을 이용하여 역 투시변환한 결과를 나타낸 사진이고,
도 14는 본 발명의 실시예에서 사용되는 차선 필터의 예를 나타낸 모식도이고,
도 15는 본 발명의 실시예에 따라 예측되는 차선 히스토그램에서의 그레이 값을 나타낸 그래프이고,
도 16은 본 발명의 실시예에 적용되는 차선 필터에 따라 검출된 차선을 나타낸 사진이고,
도 17은 도로의 상태가 직선이고 장애물이 존재하지 않는 상황에서 차선 검출의 예를 나타낸 사진이다.
도 18은 도로의 상태가 곡선이고 도로의 환경이 이상적인 경우의 실험결과를 나타낸 사진이고,
도 19는 도로의 상태가 불규칙하거나 그림자가 껴 있는 경우와 도로의 환경변화나 문양이 생기는 경우의 실험결과를 나타낸 사진이고,
도 20은 차선의 상태가 불규칙하거나 차선위로 다른 차량이 끼어들기를 하는 경우의 실험 결과를 나타낸 사진이다.
1 is a block diagram showing a flow of a real-time lane detecting method of an intelligent vehicle according to an embodiment of the present invention,
FIG. 2 is a schematic diagram illustrating a process for obtaining a vanishing point, which is applied to a lane detecting method according to an embodiment of the present invention,
3 is a schematic diagram illustrating an example of perspective transformation applied to a lane detection method according to an embodiment of the present invention,
4 is a photograph showing a problem when applying the same conversion coefficient in a state of a normal road and a state of an inclination,
FIG. 5 is a photograph showing a template region designated on the basis of the vanishing point of an input image and an input image,
6 is a photograph showing the result of prediction of the first lane in the lane detecting method according to the embodiment of the present invention,
7 is a photograph showing a ROI designation applied to an embodiment of the present invention,
8 is a photograph showing a predicted lane and an ideal lane according to an embodiment of the present invention,
FIG. 9 is a schematic diagram showing an example of the inverse perspective transformation applied to the embodiment of the present invention,
10 is a schematic diagram showing a correlation between a lane predicted according to an embodiment of the present invention and an ideal lane,
11 is a schematic diagram showing an example of two types of lanes predicted according to an embodiment of the present invention,
12 is a photograph showing a vanishing point region when the gradient of the road changes,
FIG. 13 is a photograph showing a result of back-to-back transformation using a homography matrix according to an embodiment of the present invention,
14 is a schematic diagram showing an example of a lane filter used in an embodiment of the present invention,
15 is a graph showing gray values in a lane histogram predicted according to an embodiment of the present invention,
16 is a photograph showing a lane detected according to a lane filter applied to an embodiment of the present invention,
17 is a photograph showing an example of lane detection in a situation where the road condition is straight and no obstacle is present.
18 is a photograph showing an experimental result in a case where the state of the road is a curve and the environment of the road is ideal,
Fig. 19 is a photograph showing the results of experiments in the case where road conditions are irregular or shadows and environmental changes or patterns of roads occur. Fig.
20 is a photograph showing an experimental result in the case where the state of the lane is irregular or another vehicle interrupts the lane.

이하에서 본 발명의 바람직한 실시예를 도면을 참조하여 상세히 설명하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.

도 1은 본 발명의 실시예에 따른 지능형 차량의 실시간 차선 검출방법의 흐름을 나타낸 블록 구성도이다. 도 1에 나타낸 바와 같이, 본 발명의 실시예에 따른 차선 검출방법은, (a) 입력받은 영상의 최초 프레임에서 RANSAC 알고리즘을 이용하여 도로의 소실점을 검출하는 단계(S110); (b) 상기 소실점 주변의 일정영역을 템플릿 매칭에 사용할 템플릿 영역(TA)으로 저장하는 단계(S130); (c) 상기 소실점을 기준으로 하단으로 내려가면서 차선을 예측하는 단계(S150); (d) 예측된 상기 차선을 기반으로 투시변환계수를 추출하는 단계(S170); (e) 상기 추출된 투시변환계수를 역 투시변환하여 역 투시변환계수를 추출하고, 상기 역 투시변환계수를 이용하여 원근감이 제거된 영상을 획득하는 단계(S310); 및 (f) 상기 원근감이 제거된 영상에서 차선필터를 적용하여 차선을 검출하는 단계(S330)를 포함하여 구성된다.1 is a block diagram showing a flow of a real-time lane detecting method of an intelligent vehicle according to an embodiment of the present invention. As shown in FIG. 1, a lane detecting method according to an embodiment of the present invention includes: (a) detecting a vanishing point of a road using a RANSAC algorithm at an initial frame of an input image (S110); (b) storing (S130) a certain area around the vanishing point as a template area (TA) to be used for template matching; (c) predicting a lane while descending to the lower end with reference to the vanishing point (S150); (d) extracting perspective transformation coefficients based on the predicted lane (S170); (e) extracting a backsight transformation coefficient by performing backscatter transformation on the extracted perspective transformation coefficient, and obtaining an image in which the perspective is removed by using the backsight transformation coefficient in operation S310; And (f) detecting a lane by applying a lane filter on the image from which the perspective is removed (S330).

이와 같은 본 발명의 실시예는 사전에 카메라 파라미터를 산출할 필요없이 카메라에 입력되는 영상만으로 경사진 도로 환경 등에서도 역투시 매핑(IPM) 방법과 같은 성능을 가지는 차선 검출방법을 제안한다. The embodiment of the present invention proposes a lane detection method having the same performance as the reverse inverse mapping (IPM) method even in a sloping road environment without using the camera parameters in advance.

보다 구체적으로는, 본 발명에 따른 차선 검출방법은 영상 최초 프레임에서 소실점을 검출하여 소실점을 기준으로 하는 최초 차선을 예측하고 소실점 주변 영역을 템플릿으로 저장하고 이를 이용하여 다음 프레임에 대한 소실점 영역을 추적하도록 한다. 그리고 나서 예측된 소실점 영역으로부터 차선을 예측하고, 예측된 차선으로부터 생성한 이상형 차선을 설정하며, 이를 이용하여 투시변환에 사용할 호모그래피 행렬을 추출한다. 추출된 호모그래피 행렬을 사용하여 원근 효과가 제거된 영상을 생성하며, 여기에 5x1 차선 필터를 사용하여 차선을 검출한다. More specifically, the lane detection method according to the present invention detects a vanishing point in the first frame of an image, predicts the first lane based on the vanishing point, stores the area around the vanishing point as a template, and tracks the vanishing point region for the next frame . Then, a lane is predicted from the predicted vanishing point region, an ideal lane created from the predicted lane is set, and a homography matrix to be used for perspective transformation is extracted using the ideal lane. Using the extracted homography matrix, the image with the perspective effect removed is generated, and the lane is detected using the 5x1 lane filter.

즉, 본 발명에서 제안하는 차선 검출방법은 알고리즘이 단순하고 관심영역을 지정하여 첫 프레임에서 허프 변환을 적용하고 이후 소실점 영역을 템플릿으로 추적하기 때문에 전체 영상을 사용하는 허프 변환 방법보다 빠른 속도로 차선을 검출 할 수 있고 또한 IPM 방법과 달리 카메라 파라미터를 필요로 하지 않는다는 장점이 있으며 입력 영상마다 소실점 추적을 통하여 도로 경사 변화에 강건하게 차선을 검출할 수 있다. 이하에서 도 1을 참조하여 전체 프로세스를 상세히 설명하기로 한다.
That is, in the lane detecting method proposed by the present invention, since the algorithm is simple and the interest area is designated, Hough transform is applied in the first frame and then the vanishing point area is tracked as a template. Therefore, And it does not require camera parameters unlike the IPM method. The lane can be detected robustly to the change of the road slope through the disappearing point tracking for each input image. Hereinafter, the entire process will be described in detail with reference to FIG.

RANSACRANSAC 알고리즘을 이용한 소실점을 검출 Detection of vanishing point using algorithm

Fichier 과 Bolles 가 제안한 RANSAC 알고리즘은 노이즈가 심한 원본 데이터로부터 모델 파라미터를 예측하는 방법이다. 일반적으로 파라미터를 예측하는 방법들은 가능한 많은 데이터를 사용하여 유효하지 않은 데이터를 제거하는 반면에 RANSAC 알고리즘은 가능한 적은 양의 초기 데이터를 사용하여 일관된 데이터의 집합(Consensus Set)을 확장시켜가는 방식을 사용한다.The RANSAC algorithm proposed by Fichier and Bolles is a method for predicting model parameters from noise-intensive original data. In general, parameter estimation methods use as much data as possible to remove invalid data, while the RANSAC algorithm uses a method of extending a consistent set of data (consensus sets) using as little initial data as possible do.

RANSAC 알고리즘은 추정(Hypothesis)단계와 검사(Verification)단계로 이루어진다. 추정단계에서 원본 데이터중에서 임의로 N개의 샘플 데이터를 선택하고 선택된 데이터를 정상적인 데이터로 보고 모델 파라미터를 예측한다. 검사단계에서는 이렇게 선택된 데이터를 가지고 원본데이터가 예측된 모델에 잘 맞는지 검사한다. 만일 원본 데이터가 유효한 데이터인 경우 유효한 데이터 집합에 추가한다. 이러한 추정과 검사단계를 N회 반복 수행하여 파라미터를 구하게 된다.The RANSAC algorithm consists of a hypothesis step and a verification step. In the estimation step, arbitrary N sample data is selected from the original data and the selected data is viewed as normal data to predict the model parameters. In the inspection step, the selected data is checked to see if the original data matches the predicted model. If the source data is valid data, add it to the valid data set. These estimation and inspection steps are repeated N times to obtain parameters.

반복 횟수 N은 최소한 하나의 샘플 집합이 유효한 데이터(Inlier)만을 포함할 확률 P를 보장할 수 있도록 충분히 높게 설정되어야 하는데 일반적으로 P는 0.99 로 설정한다. 선택되는 샘플 데이터에서 유효한 데이터가 선택될 확률을 u, 유효하지 않은 데이터의 확률을 v라 할 때 v = 1 - u로 표현 가능하다. 샘플 데이터의 수를 m 이라고 할 때, 다음과 같은 [수학식 1]과 [수학식 2]로 반복횟수 N을 구할 수 있다.
The number of iterations N should be set high enough so that at least one sample set can guarantee a probability P that contains only valid data (Inlier), typically P = 0.99. If the probability that the valid data is selected in the selected sample data is u and the probability of invalid data is v, v = 1 - u. When the number of sample data is m, the number of repetitions N can be obtained by the following equations (1) and (2).

Figure pat00001
Figure pat00001

Figure pat00002
Figure pat00002

입력된 영상에 대하여 RANSAC 알고리즘을 이용해 직선들의 교차점을 구하는 방법으로 소실점을 획득한다. 도 2는 본 발명의 실시예에 따른 차선 검출방법에 적용되는 소실점 획득을 위한 처리과정을 나타내는 모식도이다.A vanishing point is obtained by finding the intersection of straight lines using the RANSAC algorithm for the input image. 2 is a schematic diagram illustrating a process for obtaining a vanishing point, which is applied to a lane detecting method according to an embodiment of the present invention.

도 2에 나타낸 바와 같이, 소실점 획득을 위한 처리과정은 1) 입력받은 영상을 Gray 영상으로 변환 단계, 2) 캐니 에지 변환으로 에지 검출하는 단계, 3) 표준 허프 변환을 이용하여 에지 영상 내 선분들의 집합 S를 생성하는 단계, 4) 무작위로 두 선분 S1, S2를 선택하고 샘플로부터 교차점 p를 계산하는 단계, 5) 교차점 p를 통과하는 S내의 선분들의 집합 Sp를 계산하는 단계, 및 6) 가장 큰 집합 Sp을 가지는 점 p를 소실점으로 선택하는 단계를 포함하여 구성된다.As shown in FIG. 2, the process for acquiring a vanishing point includes steps of 1) converting the input image into a gray image, 2) edge detection using a canyon edge transformation, 3) 4) randomly selecting two line segments S1, S2 and calculating the intersection p from the sample, 5) calculating the set Sp of lines in S passing through the intersection p, and 6 ) And selecting the point p having the largest set Sp as the vanishing point.

여기서, 반복 횟수 N은 다음과 같이 설정한다. 영상 내에 소실점이 존재한다고 가정한다면 영상 내에 소실점을 교차점으로 하는 직선은 2개 이상 존재한다. 영상 내에 직선의 개수를 n 이라고 한다면 [수학식 2]를 사용하여 다음 [수학식 3]으로 반복 횟수 N을 설정할 수 있다.
Here, the number of repetition N is set as follows. Assuming that a vanishing point exists in the image, there are two or more straight lines that intersect the vanishing point in the image. If the number of straight lines in the image is n, it is possible to set the number of repetitions N by using the following formula (3).

Figure pat00003
Figure pat00003

투시 변환(Perspective transformation S170S170 ))

본 발명에서는 입력된 영상의 원근감을 제거하는 방법을 사용하기 위해 투시변환을 이용한다. 투시변환은 하나의 2차원 객체를 서로 다른 두 개의 평면으로 투영하여 생긴 두 영상 사이의 관계를 규정하는 것이다. 이를 이용하면 도 3에 나타낸 바와 같이 직사각형 형태의 영상을 사다리꼴 형태의 영상으로 바꿀 수 있다. 도 3은 본 발명의 실시예에 따른 차선 검출방법에 적용되는 투시변환의 예를 나타낸 모식도이다.In the present invention, perspective transformation is used to use a method of removing the perspective of an input image. Perspective transformation is to define the relationship between two images resulting from projecting one 2D object onto two different planes. As a result, as shown in FIG. 3, a rectangle image can be converted into a trapezoid image. 3 is a schematic diagram illustrating an example of perspective transformation applied to a lane detection method according to an embodiment of the present invention.

평면 호모그래피는 하나의 평면을 다른 평면으로 옮기는 투영 변환을 의미한다. 호모그래피 행렬은 [수학식 4]와 같이 크기가 3x3인 행렬 H로 표현한다.
Planar homography refers to a projection transformation that moves one plane to another. The homography matrix is represented by a matrix H having a size of 3x3 as shown in [Equation 4].

Figure pat00004
Figure pat00004

실세계 이상형 영상을 Q, 투시변환된 영상을 Q' 스케일인자를 s, 호모그래피 행렬을 H라고 할 때 다음 Q'는 [수학식 5]로 표현된다.
When the real-world ideal image is Q, the perspective transformed image is Q 'scale factor, and the homography matrix is H, the following Q' is expressed by Equation (5).

Figure pat00005
Figure pat00005

호모그래피 행렬 H는 오직 8개의 자유도가 존재하기 때문에 이 1인 3x3 행렬이다. 호모그래피 행렬 H는 카메라 내부행렬 M 과 회전행렬 R, 이동 벡터 t로 표현 하여 [수학식 6] 처럼 표현이 가능하다.
The homography matrix H is a 1x3x3 matrix because there are only 8 degrees of freedom. The homography matrix H can be expressed as Equation (6) by expressing the intra-camera matrix M, the rotation matrix R, and the motion vector t.

Figure pat00006
Figure pat00006

여기서 M은 다음의 [수학식 7]과 같다.
Here, M is expressed by the following equation (7).

Figure pat00007
Figure pat00007

W는 회전행렬 R과 이동 벡터 t로 표현되며 W와 R은 다음 [수학식 8]과 같다.
W is expressed by a rotation matrix R and a motion vector t, and W and R are expressed by Equation (8).

Figure pat00008
Figure pat00008

호모그래피 행렬 H의 회전행렬 에서 R=[r1, r2, r3]은 각각 X, Y, Z축의 회전에 관여한다. 여기서 객체 평면에 대하여 Z=0 인 경우 r3을 없애고 다음 [수학식 9]와 같이 쓸 수 있다.
In the rotation matrix of the homography matrix H, R = [r1, r2, r3] is involved in the rotation of the X, Y and Z axes, respectively. Here, if Z = 0 with respect to the object plane, r3 can be eliminated and the following equation (9) can be written.

식을 정리하면 H는 다음 [수학식 10]과 같다.
When the formula is summarized, H is expressed by the following formula (10).

Figure pat00010
Figure pat00010

호모그래피 행렬 H는 원본 영상 평면 위의 점 Psrc 와 목적지 영상 평면 위의 점 Pdst 사이의 관계를 규정하며, 이는 다음 [수학식 11]로 표현된다.
The homography matrix H defines the relationship between a point P src on the original image plane and a point P dst on the destination image plane, which is expressed by the following equation (11).

Figure pat00011
Figure pat00011

템플릿template 매칭matching

템플릿 매칭은 추적하고자 하는 이미지를 템플릿으로 만들어 입력 영상과 비교하여 매칭을 하는 방식이다. 여기에는 크게 3가지 방법이 존재하는데 제곱차(Squared Difference), 상관관계(Correlation), 상관계수(Correlation coefficient)매칭 방법이다. 본 발명에서는 정규화된 상관관계 방법을 이용하였다.Template matching is a method of matching the image to be traced by comparing it with the input image. There are three main ways of doing this: Squared Difference, Correlation, Correlation coefficient matching method. In the present invention, a normalized correlation method is used.

상관관계는 신호처리 분야에서 각 신호의 관계를 정량화 하는데 사용된다. 상관관계 방법은 템플릿으로 저장된 영상과 원본 입력 영상의 곱을 모두 제곱하여 더한다. 이 경우 값이 완벽하게 일치하면 높은 값이 나오고, 그렇지 않을 경우 작은 값이 나오거나 0이 나오게 된다. 입력 영상은 I 라고 하고 템플릿 영상을 T, 결과 영상을 R로 표현할 때 상관관계에 대한 식은 다음 [수학식 12]와 같고 식을 적용하여 상관관계 맵을 생성하게 되면 가장 큰 값을 가지는 위치가 탐색된 템플릿 영역의 위치가 된다.
Correlation is used to quantify the relationship of each signal in the field of signal processing. In the correlation method, the product of the image stored in the template and the original input image is squared and added. In this case, if the values are perfectly matched, a high value is output, otherwise, a small value or 0 is output. When the input image is I, the template image is represented by T, and the resulting image is represented by R, the correlation expression is expressed by Equation (12), and if a correlation map is generated by applying the expression, And the position of the template region.

Figure pat00012
Figure pat00012

템플릿 매칭 방법의 정확도 향상과 조명의 간섭을 줄여주기 위하여 정규화를 시킬 수 있다. 정규화된 방법은 입력 영상과 템플릿 영상 사이에 조명의 차이가 존재할 때, 그 영향을 크게 줄여준다. 정규화 계수는 다음 [수학식 13]과 같다.
Normalization can be done to improve the accuracy of the template matching method and to reduce the interference of illumination. The normalized method significantly reduces the effect of illumination differences between input and template images. The normalization coefficient is expressed by the following equation (13).

Figure pat00013
Figure pat00013

[수학식 11]을 정규화시킨 식은 [수학식 14]로 나타낼 수 있다.
The equation for normalizing [Equation 11] can be expressed by Equation (14).

상술한 알고리즘을 바탕으로 본 발명의 실시예에 따른 지능형 차량의 차선검출 방법의 프로세스를 도 1을 참조하여 상세히 살펴보면, 크게 3단계로 구분 지을 수 있다.
The process of the lane detection method of the intelligent vehicle according to the embodiment of the present invention will be described in detail with reference to FIG.

1단계는 영상의 시작 프레임일 경우에 적용하며 알고리즘은 다음과 같다.The first step applies to the start frame of the image. The algorithm is as follows.

[1단계 알고리즘](S100)[Step 1 algorithm] (S100)

1) 영상 내에 존재하는 소실점을 RANSAC 알고리즘을 이용하여 검출(S110)1) Detect the vanishing point existing in the image using the RANSAC algorithm (S110)

2) 검출된 소실점 기준으로 일정영역을 템플릿 영역으로 저장(S130)2) a certain area is stored as a template area on the basis of the detected vanishing point (S130)

3) 소실점의 하단에서 가장 가까이에 위치한 일정한 폭을 가진 직선을 차선으로 간주3) A straight line with a certain width nearest to the bottom of the vanishing point is regarded as a lane

4) 검출된 소실점을 기준으로 관심영역을 지정(S155) 4) Designating a region of interest based on the detected vanishing point (S155)

5) 예측된 차선을 기준으로 투시변환 계수를 추출(S170)
5) extracting the perspective transform coefficients based on the predicted lane (S170)

2단계는 영상의 시작 프레임이 아닐 경우 혹은 1단계를 거친 경우에 적용하며 알고리즘은 다음과 같다.The second step is applied when the frame is not the start frame of the image or when the first step is performed. The algorithm is as follows.

[2단계 알고리즘](S200)[2-step algorithm] (S200)

1) 저장된 템플릿 영역을 원본 영상과 비교하여 유사영역(SA) 검출1) Comparing the stored template region with the original image and detecting the similar region (SA)

2) 템플릿 영역(TA)이 Y축으로 이동한 경우 템플릿 영역을 변화된 Y축만큼 이동(S230)2) When the template area TA moves on the Y axis, the template area is moved by the changed Y axis (S230)

3) 템플릿 영역의 중심점을 소실점으로 재설정(s240)3) reset the center point of the template area to the vanishing point (s 240)

4) 관심영역(ROI) 재설정(S250)4) Reset ROI (S250)

5) 변화된 소실점을 적용하여 투시변환 계수를 다시 추출(S260) 5) The perspective transformation coefficient is re-extracted by applying the changed vanishing point (S260)

3단계 알고리즘은 다음과 같다.The three-step algorithm is as follows.

[3단계 알고리즘][3-step algorithm]

1) 추출된 계수를 사용하여 영상을 역 투시변환하고 원근감이 제거된 영상을 생성(S310)1) reverse-transforms the image using the extracted coefficients, and generates an image in which the perspective is removed (S310)

2) 역 투시변환된 영상으로부터 차선을 검출(S330)2) Detecting a lane from the back-converted image (S330)

첫 프레임 이후 소실점이 검출 된 상황에서는 2단계와 3단계의 반복만으로 차선을 검출한다.
In a situation where a vanishing point is detected after the first frame, the lane is detected only by repeating steps 2 and 3.

소실점 위치 기반 Vanishing Point Location Based 템플릿template 지정 appointed

입력된 영상에 대하여 RANSAC 알고리즘을 사용해 소실점을 획득하였다. 본 발명의 실시예에서는 소실점을 기준으로 관심영역(ROI)을 지정하여 역 투시변환을 사용하는데, 이 때 경사진 도로 영상이 입력되면 소실점의 위치가 변하게 되어 이를 반영해 주지 않는다면 차선 예측에 문제가 발생하게 된다. 도 4는 정상 도로인 상태와 경사도로의 상태에서 동일한 변환계수를 적용했을 때의 문제점을 보여준다.A vanishing point was obtained using the RANSAC algorithm for the input image. In the embodiment of the present invention, the ROI is specified based on the vanishing point and the back-perspective transformation is used. If the inclination point is changed when the inclined road image is input, . Fig. 4 shows the problem when applying the same transform coefficients in the normal road condition and in the inclined road condition.

이러한 문제점을 해결하기 위하여 본 발명의 실시예에서는 소실점의 주변 일정 영역을 템플릿 영역(TA)로 저장하고 TA를 다음 프레임의 소실점 영역 예측에 사용한다. 본 발명의 실시예에서 사용한 템플릿 영역의 크기는 가로 세로가 각각 100픽셀인 사각형을 사용하였다. 도 5는 입력된 영상과 입력된 영상의 소실점을 기준으로 템플릿 영역을 지정한 모습을 보여주고 있다.
In order to solve such a problem, in the embodiment of the present invention, a certain peripheral region of the vanishing point is stored in the template region TA and TA is used in the prediction of the vanishing point region of the next frame. The size of the template area used in the embodiment of the present invention is a square having a size of 100 pixels. FIG. 5 shows a template region designated based on a vanishing point of an input image and an input image.

최초 차선예측(First lane prediction ( S150S150 ))

본 발명 실시예에서는 역 투시변환에 사용하는 호모그래피 행렬을 구하기 위하여 차선을 예측하는 단계를 거친다. 차선 예측 단계에서는 연산속도가 느리더라도 정확한 예측을 위하여 허프 변환과 차선의 특징을 이용한다. 차선의 특징은 일반적인 도로의 영상에서 소실점 아래에 위치하고 일정한 두께를 가지고 있다. 또한 차선에서 검출된 직선은 소실점을 지나가게 된다. 이러한 특징을 이용하여 소실점을 수직으로 지나는 직선을 긋고 소실점 하단부를 스캔하여 차선의 특징을 만족하는 직선을 찾는다.
In the embodiment of the present invention, a lane is predicted in order to obtain a homography matrix to be used for the inverse perspective transformation. In the lane prediction stage, Hough transform and lane characteristics are used for accurate prediction even if the operation speed is slow. The characteristic of the lane is that it is located below the vanishing point and has a certain thickness in the image of the general road. The straight line detected in the lane passes through the vanishing point. Using this feature, a straight line passing through the vanishing point vertically is drawn, and the lower end of the vanishing point is scanned to find a straight line satisfying the characteristics of the lane.

관심영역 지정(Specify area of interest ( S155S155 ))

실시간으로 처리되어야 하는 차선 검출 방법에서는 검출 시간을 단축하는 것이 중요한 의미를 가진다. 소실점의 윗 부분은 도로와 상관없는 하늘이나 기타 배경을 나타내기 때문에 소실점 아래 부분만을 관심영역으로 지정한다. 이러한 관심영역을 지정하는 이유는 연산량을 줄이고 필요 없는 영상 영역을 제거하여 도로 영역만을 역 투시변환의 대상으로 하기 위함이다. 본 발명의 실시예에서 사용하는 관심 영역은 도 7에서 나타내고 있다.
It is important to shorten the detection time in the lane detecting method which must be processed in real time. Since the upper part of the vanishing point represents the sky or other background regardless of the road, only the lower part of the vanishing point is designated as the area of interest. The reason for designating such a region of interest is to reduce the amount of computation and to eliminate the unnecessary image region so that only the road region is subjected to the back-projection transformation. The area of interest used in the embodiment of the present invention is shown in Fig.

관심영역 영상의 역 투시변환 방법(Reverse Lookup Transformation of Region of Interest S310S310 ))

본 발명의 실시예에서는 IPM방법과 달리 카메라 파라미터가 필요 없는 상황에서 예측된 차선을 기준으로 역 투시변환을 수행하는 기법을 제안하였으며, 이를 위하여 이전 단계에서 예측된 차선을 기반으로 좌, 우 차선이 평행한 가상의 이상형 차선을 생성하기 위해 예측된 차선의 중심점을 기준으로 이상형 차선을 설정하였다. 도 8은 예측된 차선과 이상형 차선을 그림으로 나타낸 것이다.
In the embodiment of the present invention, unlike the IPM method, the present invention proposes a technique of performing a back-to-back conversion based on a predicted lane in a situation in which camera parameters are not needed. To this end, The ideal lane was set based on the center point of the predicted lane in order to generate parallel imaginary ideal lanes. Fig. 8 is a diagram showing the predicted lane and the ideal lane.

일반적인 개념의 투시변환을 역으로 적용하여 탑뷰(top view) 형태의 영상을 만들 수 있다. 도 9와 같이 투시 변환이 적용된 입력 영상에서 역 투시변환을 적용하여 원근 효과가 제거된 영상을 만들어 낼 수 있다.
A top view image can be created by applying the general concept of perspective transformation inversely. As shown in FIG. 9, it is possible to generate an image in which the perspective effect is removed by applying the inverse perspective transformation on the input image to which the perspective transformation is applied.

예측된 차선과 이상형 차선의 시작과 끝 점을 이용하여 역 투시변환에 사용할 호모그래피 행렬을 구할 수 있다. 호모그래피 행렬 H는 앞서 설명한 것과 같이 카메라 내부 파라미터 M 과 회전행렬 R, 이동벡터 t로 구할 수 있지만 다음 도 9와 같이 예측된 차선과 이상형 차선의 좌표로 만든 사각형의 꼭지점 좌표를 알고 있다면 역으로 계산하여 호모그래피 행렬 H를 계산할 수 있다. 도 10에서 P1은 예측된 차선의 좌표이고 은 이상형 차선의 좌표이다.A homography matrix to be used for the back-projection transformation can be obtained by using the start and end points of the predicted lane and the ideal lane. The homography matrix H can be obtained from the camera internal parameter M, the rotation matrix R, and the motion vector t as described above. However, if the vertex coordinates of the rectangle made by the predicted lane and the ideal lane coordinate are known as shown in FIG. 9, So that the homography matrix H can be calculated. In FIG. 10, P 1 is the coordinates of the predicted lane and the coordinates of the ideal lane.

이 경우 역 투시변환을 위한 식은 다음 [수학식 15]와 같다. w는 스케일 인자를 의미한다.
In this case, the formula for the inverse perspective transformation is as shown in the following equation (15). w means the scale factor.

Figure pat00014
Figure pat00014

각 점들의 대응 관계를 다음 [수학식 16], [수학식 17]과 같이 표현한다.
The corresponding relationship of each point is represented by the following equations (16) and (17).

Figure pat00015
Figure pat00015

Figure pat00016
Figure pat00016

이를 정리하면 다음과 같은 식으로 만들 수 있다.
This can be summarized as follows.

Figure pat00017
Figure pat00017

Figure pat00018
Figure pat00018

호모그래피 행렬 H의 원소 8개를 알기 위해서는 위의 식과 관련하여 영상위의 한 점 P 와 대응되는 점 p를 4개만 알고 있으면 구할 수 있다. 따라서 앞서 구했던 이상형 차선의 점과 예측된 차선의 점을 이용하여 호모그래피 행렬 H를 추출한다. 다음 [수학식 20]을 이용하여 호모그래피 행렬 H의 계수를 추출할 수 있다.
In order to know the eight elements of the homography matrix H, it can be obtained by knowing only four points p corresponding to one point P on the image in relation to the above equation. Therefore, the homography matrix H is extracted using the ideal lane point and the predicted lane point. The coefficients of the homography matrix H can be extracted using the following equation (20).

Figure pat00019
Figure pat00019

본 발명의 실시에서 도 10의 두 사각형으로 구한 호모그래피 행렬은 예측된 차선의 집합 P로 이루어진 사각형의 좌표와 이상형 차선 로 이루어진 사각형의 좌표를 도 11로 나타날 때 H는 [표 1]과 같다.
In the embodiment of the present invention, the homography matrix obtained from the two squares in FIG. 10 is as shown in Table 1, where the coordinates of the rectangle formed of the set of predicted lanes P and the coordinates of the rectangle formed by the ideal lanes are shown in FIG.

Table 1. An Example of Homography Matrix H Table 1. An Example of Homography Matrix H i    i 1One 22 33 ai a i -23.2735-23.2735 -64.1076-64.1076 8168.7018168.701 bi b i 2.45E-142.45E-14 -47.1822-47.1822 887.467887.467 ci c i 8.76E-178.76E-17 -0.19044-0.19044 1One

템플릿template 영역 검색 Area Search

본 발명의 실시예에서는 앞서 소실점을 검출하고 소실점 주변 영역을 템플릿 매칭에 사용할 영역(TA:Template Area)으로 저장하였다. 템플릿 매칭을 위한 방법으로는 연산속도가 빠르고 정확하게 템플릿을 매칭 할 수 있으며 입력 영상과 템플릿 영상 간에 조명의 간섭을 크게 줄여주는 효과가 있는 정규화된 상관관계(NCC:Normalized Cross-Correlation) 매칭 방법을 이용하였다.In the embodiment of the present invention, the vanishing point is detected and the area around the vanishing point is stored as a template area (TA) used for template matching. As a method for template matching, it is possible to quickly and precisely match a template and to use a normalized cross-correlation (NCC) matching method that significantly reduces illumination interference between an input image and a template image Respectively.

검출된 소실점의 위치와 비교하여 템플릿 영역의 위치가 Y축으로 변화된 경우 변화한 위치를 템플릿 영역으로 저장하고 템플릿 영역의 중심점을 소실점으로 설정하여 사용한다. 새로운 소실점이 설정되면 설정된 소실점을 기준으로 관심영역을 다시 지정한다. 이와 같이 소실점을 추적하고 관심영역을 재설정함으로써 도로 주행 중 갑작스런 경사 변화에도 강인하게 역 투시변환을 사용할 수 있게 된다.When the position of the template area is changed to the Y axis by comparing with the position of the detected vanishing point, the changed position is stored as the template area and the center point of the template area is set as the vanishing point. When a new vanishing point is set, the region of interest is designated again based on the set vanishing point. By tracking the vanishing point and resetting the area of interest as described above, it is possible to use the back-to-front transformation robustly even when the vehicle is suddenly changed in inclination while driving on the road.

도 12는 도로 경사가 변화하는 경우 재 지정된 소실점 영역을 나타낸다. 도 12의 E에서 붉은색 점은 초기 소실점 위치이고 푸른색 점은 추적된 새로운 소실점의 위치와 각 소실점을 기준으로 하는 템플릿 영역을 나타내고 있다.
Fig. 12 shows a redesigned vanishing point area when the road gradient changes. In FIG. 12E, the red dot indicates the initial vanishing point and the blue dot indicates the location of the new vanishing point tracked and the template region based on each vanishing point.

차선 검출(Lane detection ( S330S330 ))

앞서 구한 호모그래피 행렬을 사용하여 영상의 원근감을 제거한 영상을 생성한다. 추출한 호모그래피 행렬을 이용하여 역 투시변환한 결과는 도 13과 같다. 이러한 탑 뷰 영상은 위 그림과 같이 차선이 대체적으로 직선으로 표현된다. 따라서 본 발명에서는 원근감이 제거된 영상에서 차선 검출을 위해 5x1 필터를 사용한다. 5x1 필터는 수직의 에지를 중점적으로 검출해 낼 수 있으며 영상을 그레이 영상으로 변환 후 필터를 적용한다. 일반적인 경우 차선의 색은 도로에 비하여 밝은색으로 분포되는데 이를 참조하여 차선을 검출한다.The homography matrix obtained above is used to generate an image in which the perspective of the image is removed. The result of the inverse perspective transformation using the extracted homography matrix is shown in FIG. As shown in the above picture, the top view image is generally represented by a straight line. Therefore, in the present invention, a 5x1 filter is used for lane detection in a perspective-free image. The 5x1 filter can focus on the vertical edges and convert the image to a gray image and apply the filter. In general, the color of the lane is distributed in a lighter color than the road, and the lane is detected by referring to the lane.

도 14에서 필터는 왼쪽 2픽셀, 오른쪽 2픽셀의 각각의 합을 구하여 두 값의 차이가 (최대 밝기 값 - 영상 화소 평균 값) 이상일 경우 현재 화소를 에지 성분으로 결정한다. I는 이미지, c는 현재 픽셀, L은 현재 픽셀의 왼쪽 부분, R은 현재 픽셀의 오른쪽 부분이라 할 때, [수학식 21]과 같이 나타낼 수 있다.
In FIG. 14, the sum of each of 2 pixels on the left and 2 pixels on the right side is determined. When the difference between the two values is equal to or larger than (maximum brightness value - image pixel average value), the current pixel is determined as an edge component. I is an image, c is a current pixel, L is a left part of a current pixel, and R is a right part of a current pixel.

Figure pat00020
Figure pat00020

이는 도 15에서 나타나듯이 밝기값이 차선 부분에서 큰 변화량을 가지게 되므로 이를 이용하여 필터를 설정하였다. As shown in FIG. 15, since the brightness value has a large change amount in the lane portion, the filter is set by using it.

도 16은 필터를 이용하여 검출된 에지 영상을 나타낸다. 도 16의 (a)는 입력영상이고, 도 16의 (b)는 차선필터를 이용해 검출된 영상의 결과이다.16 shows an edge image detected using a filter. 16 (a) is an input image, and Fig. 16 (b) is a result of an image detected using a lane filter.

역 투시변환의 특징상 변환된 영상의 상단 부분의 영상 정보는 영상 정보가 부족하기 때문에 영상이 퍼져보일 수 있다. 따라서 영상의 하단 부분에 위치하는 정보를 이용하는 것이 차선 추출에 있어서 더욱 정확한 결과를 나타낼 수 있으므로 검출된 차선 영상에 대하여 하단 부분부터 탐색하여 차선을 검출한다.
Due to the feature of back-to-back conversion, the image information of the upper part of the converted image may be seen because the image information is insufficient. Therefore, using the information located in the lower part of the image can provide more accurate results in the lane extraction, so the lane is detected by searching the lower part of the detected lane image.

실험 결과Experiment result

본 발명의 실시예에서 제안한 차선 검출방법 차량 앞 창문에 카메라를 설치하여 입력된 영상을 이용하여 비교적 단순한 고속도로의 영상을 가지고 실험을 하였다. 도 17은 도로의 상태가 직선이고 장애물이 존재하지 않는 이상적인 상황에서의 실험 결과를 나타낸다. 왼쪽은 입력 영상이고, 오른쪽은 차선 검출 결과를 나타낸 사진이다.The lane detection method proposed in the embodiment of the present invention is carried out by installing a camera on the front window of the vehicle and using a relatively simple highway image using the input image. 17 shows experimental results in an ideal situation in which the road condition is straight and no obstacle exists. The left image is the input image, and the right image is the lane detection result.

도 18은 도로의 상태가 곡선이고 도로의 환경이 이상적인 경우의 실험결과를 보여준다. Fig. 18 shows an experimental result when the road condition is a curve and the road environment is ideal.

도 19는 도로의 상태가 불규칙하거나 그림자가 껴 있는 경우와 도로의 환경변화나 문양이 생기는 경우의 실험결과를 보여준다.Fig. 19 shows experimental results in the case where the state of the road is irregular or shaded, and when a change in environment or a pattern of the road occurs.

도 20은 차선의 상태가 불규칙하거나 차선위로 다른 차량이 끼어들기를 하는 경우의 실험 결과를 보여준다.
Fig. 20 shows an experimental result in the case where the lane state is irregular or another vehicle intervenes in the lane.

이처럼, 차량은 일반적으로 평평한 도로에서 운전하게 되지만 순간적으로 나타나는 도로의 장애물이나 도로 자체 상태에 따라 오르막이나 내리막이 나타날 수 있다. 이 경우 IPM 방법은 도로와 카메라가 이루는 각도가 순간적으로 변하기 때문에 탑 뷰 영상이 나타나는 영상이 평행하지 않고 퍼지거나 모아지는 형태로 나타날 수 있다. 이러한 문제점은 순간적으로 짧게 나타나고 영향이 크게 나타나지 않을 수 있지만 차선 이탈 경고 시스템에서는 문제를 일으킬 수 있다. 본 발명에서는 소실점을 추적하는 방법으로 이와 같은 문제점을 해결할 수 있었다.As such, the vehicle is generally driven on a flat road, but an uphill or downhill road may appear depending on the obstacle of the road or the state of the road itself. In this case, since the angle between the road and the camera instantaneously changes in the IPM method, the image in which the top view image appears may not be parallel but may be spread or gathered. These problems may appear brief in time and may not have a significant impact, but they can cause problems in lane departure warning systems. In the present invention, such a problem can be solved by a method of tracking a vanishing point.

본 발명의 실시예에서 제안하는 방법은 편의를 위해 OpenCV로 개발되었으며 Intel Core2 Duo 2.6GHz, 2GB RAM 컴퓨터에서 640*480 크기의 영상을 1초에 40frame 가량 처리할 수 있었다. [표 2]는 B-Snake를 이용한 방법과 IPM방법을 이용한 방법을 본 발명의 실시예에서 제안한 방법과의 비교를 처리속도와 카메라 파라미터 사용 유무로 나타내었다.
The method proposed in the embodiment of the present invention was developed as OpenCV for convenience and the image of 640 * 480 size can be processed in about 40 frames per second in the Intel Core2 Duo 2.6 GHz and 2 GB RAM computer. Table 2 shows the comparison between the method using the B-Snake method and the method using the IPM method according to the embodiment of the present invention in terms of processing speed and camera parameter use.

Figure pat00021
Figure pat00021

이와 같이, 본 발명은 소실점을 이용하여 차선을 예측 후 소실점 영역을 템플릿으로 저장한 후, 소실점 기준 하단 영역을 관심영역으로 설정하고, 이 영역에 대하여 투시변환이로 원근 효과를 제거한 영상으로부터 차선을 검출하는 방법을 제안한다. 차선검출 과정에 관심영역을 지정하고 처리방법을 단순화하여 검출 시간을 현저하게 단축할 수 있고 카메라 파라미터를 알 필요도 없다. 또한 도로의 노면 상태가 고르지 않거나 갑작스런 오르막이나 내리막에도 영향을 받지 않는 강인한 차선 검출 방법을 제안하고, 기존 방법과의 처리속도를 비교한 결과 타당성을 검증되었음을 알 수 있다.
As described above, according to the present invention, after a lane is predicted using a vanishing point, a vanishing point region is stored as a template, a lower region of the vanishing point reference is set as a region of interest, and a perspective transformation is performed on the region, Detection method. It is possible to designate the area of interest in the lane detection process and to simplify the processing method to remarkably shorten the detection time and to know the camera parameters. In addition, we propose a robust lane detection method that is not affected by uneven road surface condition or sudden uphill or downhill, and it is verified that the feasibility is verified by comparing the processing speed with the existing method.

Claims (7)

지능형차량의 차선 검출방법에 있어서,
(a) 입력받은 영상의 최초 프레임에서 RANSAC 알고리즘을 이용하여 도로의 소실점을 검출하는 단계;
(b) 상기 소실점 주변의 일정영역을 템플릿 매칭에 사용할 템플릿 영역(TA)으로 저장하는 단계;
(c) 상기 소실점을 기준으로 하단으로 내려가면서 차선을 예측하는 단계;
(d) 예측된 상기 차선을 기반으로 투시변환계수를 추출하는 단계;
(e) 상기 추출된 투시변환계수를 역 투시변환하여 역 투시변환계수를 추출하고, 상기 역 투시변환계수를 이용하여 원근감이 제거된 영상을 획득하는 단계; 및
(f) 상기 원근감이 제거된 영상에서 차선필터를 적용하여 차선을 검출하는 단계를 포함하는 것을 특징으로 하는 지능형 차량의 실시간 차선 검출방법.
A method of detecting a lane of an intelligent vehicle,
(a) detecting a vanishing point of a road using a RANSAC algorithm in an initial frame of an input image;
(b) storing a certain area around the vanishing point as a template area (TA) to be used for template matching;
(c) predicting a lane on the basis of the vanishing point as descending downward;
(d) extracting perspective transformation coefficients based on the predicted lane;
(e) a step of backsight-transforming the extracted perspective transformation coefficients to extract a backsight transformation coefficient, and acquiring a perspective-free image using the backsight transformation coefficients; And
(f) detecting a lane by applying a lane filter on the image from which the perspective is removed.
제1항에 있어서,
상기 (a) 단계는,
입력받은 영상을 그레이(Gray) 영상으로 변환하는 단계;
상기 그레이 영상을 캐니 에지 변환으로 에지를 검출하는 단계;
표준 허프 변환을 이용하여 상기 영상 내의 선분들의 집합 S를 생성하는 단계;
상지 집합 S에서 임의로 두 선분을 선택하고, 상기 두 선분의 교차점(p)를 산출하는 단계;
상기 교차점(P)를 통과하는 선분들의 집합 Sp를 산출하는 단계;
상기 집합 Sp 중 가장 큰 집합을 가지는 점을 소실점으로 선택하는 단계를 포함하는 것을 특징으로 하는 지능형 차량의 실시간 차선 검출방법.
The method according to claim 1,
The step (a)
Converting an input image into a gray image;
Detecting an edge of the gray image by canyon edge transformation;
Generating a set S of lines in the image using standard Hough transform;
Selecting two arbitrary line segments in the upper set S and calculating an intersection p of the two line segments;
Calculating a set Sp of line segments passing through the intersection point P;
And selecting a point having the largest set of the set Sp as a vanishing point.
제1항 또는 제2항에 있어서,
상기 (c) 단계 이후,
상기 검출된 소실점을 기준으로 관심영역(ROI)을 지정하는 단계를 더 포함하는 것을 특징으로 하는 지능형 차량의 실시간 차선 검출방법.
3. The method according to claim 1 or 2,
After the step (c)
Further comprising the step of: designating a region of interest (ROI) based on the detected vanishing point.
제3항에 있어서,
상기 입력받은 영상이 최초 프레임이 아니거나 상기 (d) 단계 이후에,
상기 저장된 템플릿 영역에 원본 영상과 비교하여 유사영역(Similar Area:SA)을 검출하는 단계;
상기 템플릿과 유사영역의 좌표를 비교해 상기 템플릿 영역이 Y축으로 이동한 경우, 변동된 영역을 새로운 템플릿 영역으로 저장하는 단계;
상기 새로운 템플릿 영역의 중심점을 소실점으로 재설정하는 단계;
상기 재설정된 소실점을 기준으로 관심영역(ROI)를 재설정하는 단계; 및
상기 재설정된 소실점을 적용하여 투시변환 계수를 다시 추출하는 단계를 더 포함하는 것을 특징으로 하는 지능형 차량의 실시간 차선 검출방법.
The method of claim 3,
If the input image is not the first frame or after step (d)
Detecting a similar area (SA) in the stored template area compared with the original image;
Comparing the coordinates of the template with the coordinates of the similar region, and storing the changed region as a new template region when the template region moves on the Y axis;
Resetting the center point of the new template area to a vanishing point;
Resetting a region of interest (ROI) based on the reset vanishing point; And
Further comprising extracting perspective transformation coefficients by applying the reset vanishing point to the real-time lane detecting means.
제3항에 있어서,
상기 관심영역(ROI)은 상기 소실점을 기준으로 하부 영역인 것을 특징으로 하는 지능형 차량의 실시간 차선 검출방법.
The method of claim 3,
Wherein the ROI is a lower region based on the vanishing point.
제4항에 있어서,
상기 (C) 단계는,
상기 역투시변환에 사용되기 위해 호모그래피 행렬을 산출하는 단계를 포함하는 것을 특징으로 하는 지능형 차량의 실시간 차선 검출방법.
5. The method of claim 4,
The step (C)
And calculating a homography matrix to be used for the reverse inverse transformation.
제4항에 있어서,
상기 템플릿 매칭은,
정규화된 상관관계(NCC:Normalized Cross-Correlation) 매칭 방법을 사용하는 것을 특징으로 하는 지능형 차량의 실시간 차선 검출방법.



5. The method of claim 4,
In the template matching,
Wherein a normalized cross-correlation (NCC) matching method is used.



KR20130071751A 2013-06-21 2013-06-21 Lane Detection method for Advanced Vehicle KR101483742B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR20130071751A KR101483742B1 (en) 2013-06-21 2013-06-21 Lane Detection method for Advanced Vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR20130071751A KR101483742B1 (en) 2013-06-21 2013-06-21 Lane Detection method for Advanced Vehicle

Publications (2)

Publication Number Publication Date
KR20140148171A true KR20140148171A (en) 2014-12-31
KR101483742B1 KR101483742B1 (en) 2015-01-16

Family

ID=52590768

Family Applications (1)

Application Number Title Priority Date Filing Date
KR20130071751A KR101483742B1 (en) 2013-06-21 2013-06-21 Lane Detection method for Advanced Vehicle

Country Status (1)

Country Link
KR (1) KR101483742B1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101991626B1 (en) * 2018-05-25 2019-06-20 가천대학교 산학협력단 Method and system for detecting vanishing point for intelligent vehicles
KR20200019283A (en) * 2018-08-08 2020-02-24 주식회사 넥스트칩 Lane detection method and electronic device performing the method
WO2020172842A1 (en) * 2019-02-28 2020-09-03 深圳市商汤科技有限公司 Vehicle intelligent driving control method and apparatus, electronic device and storage medium
CN112215213A (en) * 2020-12-11 2021-01-12 智道网联科技(北京)有限公司 Lane line detection method, lane line detection device, electronic device, and storage medium
CN112633043A (en) * 2019-10-08 2021-04-09 宁波吉利汽车研究开发有限公司 Lane line determination method and device, electronic equipment and storage medium
CN116993637A (en) * 2023-07-14 2023-11-03 禾多科技(北京)有限公司 Image data processing method, device, equipment and medium for lane line detection

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160129487A (en) 2015-04-30 2016-11-09 영남대학교 산학협력단 Apparatus for detecting lane using 2d laser scanners in vehicle and method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101225626B1 (en) 2010-07-19 2013-01-24 포항공과대학교 산학협력단 Vehicle Line Recognition System and Method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101991626B1 (en) * 2018-05-25 2019-06-20 가천대학교 산학협력단 Method and system for detecting vanishing point for intelligent vehicles
KR20200019283A (en) * 2018-08-08 2020-02-24 주식회사 넥스트칩 Lane detection method and electronic device performing the method
WO2020172842A1 (en) * 2019-02-28 2020-09-03 深圳市商汤科技有限公司 Vehicle intelligent driving control method and apparatus, electronic device and storage medium
CN112633043A (en) * 2019-10-08 2021-04-09 宁波吉利汽车研究开发有限公司 Lane line determination method and device, electronic equipment and storage medium
CN112633043B (en) * 2019-10-08 2024-03-26 宁波吉利汽车研究开发有限公司 Lane line determining method and device, electronic equipment and storage medium
CN112215213A (en) * 2020-12-11 2021-01-12 智道网联科技(北京)有限公司 Lane line detection method, lane line detection device, electronic device, and storage medium
CN116993637A (en) * 2023-07-14 2023-11-03 禾多科技(北京)有限公司 Image data processing method, device, equipment and medium for lane line detection
CN116993637B (en) * 2023-07-14 2024-03-12 禾多科技(北京)有限公司 Image data processing method, device, equipment and medium for lane line detection

Also Published As

Publication number Publication date
KR101483742B1 (en) 2015-01-16

Similar Documents

Publication Publication Date Title
Wu et al. Lane-mark extraction for automobiles under complex conditions
KR101483742B1 (en) Lane Detection method for Advanced Vehicle
CN106652465B (en) Method and system for identifying abnormal driving behaviors on road
Yan et al. A method of lane edge detection based on Canny algorithm
US9721460B2 (en) In-vehicle surrounding environment recognition device
US8391555B2 (en) Lane recognition apparatus for vehicle, vehicle thereof, and lane recognition program for vehicle
JP6184877B2 (en) Vehicle external recognition device
US7231288B2 (en) System to determine distance to a lead vehicle
JP6650657B2 (en) Method and system for tracking moving objects in video using fingerprints
CN106647776B (en) Method and device for judging lane changing trend of vehicle and computer storage medium
US20050232463A1 (en) Method and apparatus for detecting a presence prior to collision
US20060245653A1 (en) Method and apparatus for detecting edges of an object
JP5223675B2 (en) Vehicle detection device, vehicle detection method, and vehicle detection program
Kortli et al. A novel illumination-invariant lane detection system
US10339396B2 (en) Vehicle accessibility determination device
US11270133B2 (en) Object detection device, object detection method, and computer-readable recording medium
JP2014071902A5 (en)
Youjin et al. A robust lane detection method based on vanishing point estimation
CN113370977B (en) Intelligent vehicle forward collision early warning method and system based on vision
Shin et al. Lane detection algorithm based on top-view image using random sample consensus algorithm and curve road model
Samadzadegan et al. Automatic lane detection in image sequences for vision-based navigation purposes
CN107220632B (en) Road surface image segmentation method based on normal characteristic
Choi et al. Fog detection for de-fogging of road driving images
Mahmoud et al. Real-time lane detection-based line segment detection
Wang et al. An improved hough transform method for detecting forward vehicle and lane in road

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20180105

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20200103

Year of fee payment: 6