KR20200135606A - Method and apparatus for providing camera calibration for vehicles - Google Patents

Method and apparatus for providing camera calibration for vehicles Download PDF

Info

Publication number
KR20200135606A
KR20200135606A KR1020190060180A KR20190060180A KR20200135606A KR 20200135606 A KR20200135606 A KR 20200135606A KR 1020190060180 A KR1020190060180 A KR 1020190060180A KR 20190060180 A KR20190060180 A KR 20190060180A KR 20200135606 A KR20200135606 A KR 20200135606A
Authority
KR
South Korea
Prior art keywords
camera
cameras
roll
image
lane
Prior art date
Application number
KR1020190060180A
Other languages
Korean (ko)
Other versions
KR102274026B1 (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 KR1020190060180A priority Critical patent/KR102274026B1/en
Publication of KR20200135606A publication Critical patent/KR20200135606A/en
Application granted granted Critical
Publication of KR102274026B1 publication Critical patent/KR102274026B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • G06K9/00798
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/001Image restoration
    • G06T5/002Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/007Dynamic range modification
    • G06T5/70
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle
    • G06T2207/30256Lane; Road marking

Abstract

The present invention relates to a camera calibration device for a vehicle and to a method thereof. The camera calibration device for a vehicle comprises: a camera module which acquires an image of a lane from a plurality of cameras mounted on the vehicle; an input/output module receiving the image acquired from the camera module or outputting a corrected image; a lane detection module detecting the lane from the image received from the input/output module and extracting characteristic points of the lane; and a camera correction module correcting an image by estimating a new external parameter using an equation of the lane and a lane width using initial camera information and external parameter information from the image received from the input/output module.

Description

차량용 카메라 캘리브레이션 장치 및 그 방법{METHOD AND APPARATUS FOR PROVIDING CAMERA CALIBRATION FOR VEHICLES}Vehicle camera calibration device and its method {METHOD AND APPARATUS FOR PROVIDING CAMERA CALIBRATION FOR VEHICLES}

본 발명은 차량용 카메라 캘리브레이션 장치 및 그 방법에 관한 것으로, 더욱 상세하게는 차량에 장착된 복수개의 카메라로부터 입력 받은 도로상의 차선 촬영 영상을 이용하여 주행 중에도 카메라의 외부 파라미터를 자동으로 캘리브레이션 할 수 있도록 하는 차량용 카메라 캘리브레이션 장치 및 그 방법에 관한 것이다.The present invention relates to a vehicle camera calibration apparatus and method thereof, and more particularly, to automatically calibrate external parameters of a camera even while driving by using images of lane photographs on the road received from a plurality of cameras mounted on the vehicle. It relates to a vehicle camera calibration apparatus and method thereof.

근래에 들어 자동차에는 블랙박스나 주차를 위한 후방 카메라와 같이 다양한 용도의 카메라가 사용되고 있다. 최근에는 자동차에 다수개의 카메라를 장착하여 하늘에서 자동차를 내려다보는 것과 같은 화면을 운전자에게 제공할 수 있어 자동차의 전, 후, 좌, 우의 사각을 완전히 제거할 수 있는 탑뷰(top view) 시스템 개발이 활발해지고 있다. In recent years, cameras for various purposes such as black boxes or rear cameras for parking are used in automobiles. Recently, the development of a top view system that can completely remove the blind spots of the front, rear, left, and right of the car has been developed since it is possible to provide the driver with a screen like looking down the car from the sky by installing multiple cameras on the car It is becoming active.

그런데 다수의 카메라가 자동차에 탑재될 경우에는 각각의 카메라로부터 전송되는 다수의 영상 정보를 통합하여야 하고 이러한 영상 정보 통합을 위해서는 좌표계의 통합이 무엇보다도 중요하다. 다시 말하면, 다수개의 카메라로부터 획득된 각각의 촬영 영상은 다양한 정보와 함께 입력되는데 수록된 각각의 촬영 영상의 정보 중에서 실시간 공간정보를 자동차의 미리 설정된 공통 좌표계로 변화시킨 후 상기 공통 좌표계로 변환 된 실시간 공간정보를 기준으로 다수의 촬영 영상을 정합하여 운전자에게 적절한 탑뷰(top view) 영상을 보여 주는 것이 가능해진다.However, when a plurality of cameras are mounted in a vehicle, a plurality of image information transmitted from each camera must be integrated, and for such image information integration, integration of a coordinate system is most important. In other words, each captured image acquired from a plurality of cameras is input with various information, and the real-time spatial information is converted to the common coordinate system after changing the real-time spatial information to the common coordinate system of the vehicle among the information of each captured image. It becomes possible to display a suitable top view image to the driver by matching a plurality of captured images based on the information.

하지만 실제로 카메라를 자동차에 장착할 때 발생하는 오차로 인하여 다수개의 카메라 좌표축을 차량의 공통 좌표계와 완벽하게 일치시키는 것은 현실적으로 불가능하다. 이는 자동차 생산 공장에서는 카메라 장착 오차를 정밀하게 캘리브레이션 할 수 있지만 자동차가 출고되고 난 후에는 운행 중의 충격, 비틀림과 같은 물리적인 힘에 의해 카메라의 장착 위치가 변화하여 카메라 장착 오차가 계속하여 발생하기 때문이다. 따라서 카메라에 장착된 다수개의 카메라는 주기적, 또는 충격 시 마다 캘리브레이션이 수행되어야만 한다. However, it is practically impossible to perfectly match a plurality of camera coordinate axes with a common coordinate system of a vehicle due to an error that occurs when the camera is actually mounted on a vehicle. This is because camera mounting errors can be precisely calibrated in automobile manufacturing plants, but after the car is shipped, the mounting position of the camera changes due to physical forces such as shock and torsion during operation, resulting in camera mounting errors. to be. Therefore, a number of cameras mounted on the camera must be calibrated periodically or at each impact.

위와 같이 자동차가 출고되고 난 후에 다수개의 카메라로부터 입력되는 영상을 정합하기 위해서는 선결문제로서 카메라의 장착 오차를 보정하는 카메라 캘리브레이션이 수행되어야 하고, 이러한 카메라 캘리브레이션을 위해서는 장착된 카메라에 대해 설치된 높이나 설치된 각도와 같은 정보가 요구된다. 종래에는, 이와 같은 카메라 캘리브레이션을 위한 정보를 얻기 위해서 지면에 체커보드(cherker board)와 같은 특정 기준 패턴을 설치하고 이를 촬영한 후 촬영된 패턴 영상을 이용하여 정보를 얻는 방법이 사용되었다. As described above, in order to match the images input from multiple cameras after the car is shipped, a camera calibration that corrects the mounting error of the camera must be performed as a prerequisite. For such camera calibration, the installed height or angle of the installed camera The same information is required. Conventionally, in order to obtain information for camera calibration, a method of obtaining information using a pattern image photographed after installing a specific reference pattern such as a checker board on the ground has been used.

종래의 특정 기준 패턴을 이용한 카메라 정보 습득 방법은 패턴과 같은 특정 마커의 상대적인 위치를 사전에 정확하게 알 수 있으므로 정밀한 카메라 정보를 얻을 수 있는 장점이 있는 반면에, 이를 수행하기 위해서는 특정 기준 패턴을 자동차 주위에 설치할 수 있을 정도의 넓은 공간을 확보한 후에 작업을 수행해야 하는 번거로움이 따르는 문제점이 있다. The conventional method of acquiring camera information using a specific reference pattern has the advantage of obtaining precise camera information because the relative position of a specific marker such as a pattern can be accurately known in advance. After securing a large enough space to be installed on the device, there is a problem in that it is cumbersome to perform the operation.

특히 일반적인 자동차의 경우 자동차의 실제 운행으로 인하여 주기적, 또는 충격 시마다 카메라의 장착 오차가 발생하므로 그 때마다 작업자가 특정 기준 패턴을 이용한 카메라 정보 습득 방법으로 카메라 정보를 습득하고 카메라 캘리브레이션을 수행한다는 것은 너무 번거롭고 시간과 비용이 많이 드는 문제점이 있다. 때문에 자동차의 주행 중에도 카메라의 캘리브레이션이 자동으로 이루어지도록 할 필요가 있다.In particular, in the case of general automobiles, camera mounting errors occur periodically or at each impact due to the actual operation of the vehicle. Therefore, it is too much for the operator to acquire camera information and perform camera calibration by using a specific reference pattern. There is a problem that is cumbersome and requires a lot of time and cost. Therefore, it is necessary to automatically calibrate the camera even while the vehicle is running.

관련 선행기술로는 한국공개특허 10-2008-0028531호(공개일: 2008. 04. 01)가 있다.As related prior art, there is Korean Patent Publication No. 10-2008-0028531 (published date: April 01, 2008).

본 발명은 차량의 주행 중에 차량에 장착된 복수의 카메라들로부터 차량의 주행 차로를 촬영한 영상을 입력 받아 상기 촬영 영상으로부터 차로의 차선을 검출한 후 검출된 차선을 이용하여 차량에 장착된 카메라의 외부 파라미터를 자동으로 보정함으로써 차량의 운행으로 인해 물리적인 장착 오차가 발생된 카메라 캘리브레이션을 차량의 주행 중에도 신속하고 간편하게 수행할 수 있도록 하는 차량용 카메라 캘리브레이션 장치 및 그 방법을 제공하는 데 그 목적이 있다. The present invention receives an image of the driving lane of the vehicle from a plurality of cameras mounted on the vehicle while the vehicle is driving, detects the lane of the lane from the photographed image, and uses the detected lane to detect the lane of the vehicle. An object of the present invention is to provide a camera calibration apparatus for a vehicle and a method thereof that enables a camera calibration in which a physical installation error occurs due to a vehicle operation by automatically correcting an external parameter to be performed quickly and easily even while the vehicle is driving.

본 발명의 실시예들의 목적은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 또 다른 목적들은 아래의 기재로부터 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The objects of the embodiments of the present invention are not limited to the above-mentioned objects, and other objects not mentioned will be clearly understood by those of ordinary skill in the technical field to which the present invention pertains from the following description. .

일 측면에 따른, 복수의 카메라들을 캘리브레이션하는 장치에 의해 수행되는 카메라 캘리브레이션 방법은, 차량 주변을 촬영하는 복수의 카메라들을 이용하여 복수의 영상들을 생성하는 단계, 상기 복수의 영상들 내의 차선들을 검출하는 단계, 초기 카메라 정보 및 초기 외부 파라미터에 기초하여 복수의 영상들을 이용하여 탑뷰(top view) 영상을 생성하는 단계, 상기 탑뷰 영상 내의 차선들에 대한 방정식을 계산하는 단계, 및 상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계를 포함한다.According to an aspect, a camera calibration method performed by an apparatus for calibrating a plurality of cameras includes generating a plurality of images using a plurality of cameras photographing around a vehicle, detecting lanes within the plurality of images. Steps, generating a top view image using a plurality of images based on initial camera information and initial external parameters, calculating equations for lanes in the top view image, and based on the equation And calibrating the plurality of cameras by calculating external parameters for the plurality of cameras.

상기 복수의 영상들 내의 차선을 검출하는 단계는, 상기 복수의 카메라들의 제1 카메라에 의해 생성된 프레임들을 누적함으로써 제1 영상을 생성하는 단계, 상기 제1 영상 내의 엣지를 검출하는 단계, 및 상기 엣지에 기초하여 상기 제1 영상의 차선을 결정하는 단계를 포함할 수 있다.The detecting of a lane within the plurality of images may include generating a first image by accumulating frames generated by the first cameras of the plurality of cameras, detecting an edge in the first image, and the It may include determining a lane of the first image based on an edge.

상기 복수의 영상들 내의 차선을 검출하는 단계는, 상기 제1 영상 내의 노이즈를 제거하는 단계, 및 상기 제1 영상을 흑백 영상으로 변환하는 단계 중 적어도 하나를 더 포함하고, 상기 제1 영상 내의 엣지를 검출하는 단계는, 노이즈가 제거된 제1 영상 또는 흑백 영상으로 변환된 제1 영상 내의 엣지를 검출하는 단계를 포함할 수 있다.The step of detecting a lane within the plurality of images further includes at least one of removing noise in the first image and converting the first image into a black and white image, and an edge in the first image The detecting of may include detecting an edge in the first image from which noise is removed or the first image converted into a black and white image.

상기 초기 외부 파라미터는 카메라의 초기 자세 정보 및 초기 위치 정보를 포함하고, 상기 초기 자세 정보는 상기 카메라의 피치(Rx), 요(Ry), 및 롤(Rz)을 포함하고, 상기 초기 위치 정보는 상기 카메라의 위치 이동(Tz)을 포함할 수 있다.The initial external parameter includes initial posture information and initial position information of the camera, and the initial posture information includes pitch (R x ), yaw (R y ), and roll (R z ) of the camera, and the initial posture information The location information may include a location movement (T z ) of the camera.

상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계는, 상기 복수의 카메라들 중 전방 카메라 및 후방 카메라 각각에 대한 피치(Rx), 요(Ry), 및 롤(Rz)을 계산하는 단계, 상기 전방 카메라 및 상기 후방 카메라 각각에 대한 피치(Rx), 요(Ry), 및 롤(Rz)에 기초하여 상기 후방 카메라의 위치 이동(Tz)을 계산하는 단계, 및 상기 후방 카메라의 위치 이동(Tz)에 기초하여 상기 복수의 카메라들 중 좌측 카메라 및 우측 카메라 각각에 대한 피치(Rx), 요(Ry), 롤(Rz), 및 위치 이동(Tz)을 계산하는 단계를 포함할 수 있다.The step of calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the equation may include a pitch (R x ) and a yaw (R) for each of the front and rear cameras among the plurality of cameras. y), and the roll (R z) a step of calculating a pitch (for the front camera and the rear camera, each R x), I (R y), and a roll (the position of the rear view camera on the basis of the R z) mobile phase, and the pitch (R x), I (R y) of the left camera and a right camera, each of the plurality of cameras based on position movement (T z) of the rear-view camera to calculate the (T z), It may include calculating the roll (R z ), and the positional movement (T z ).

상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계는, 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계를 더 포함하고, 상기 롤(Rz)을 조정하는 단계는, 상기 복수의 카메라들 각각에 대해 초기 롤과 계산된 롤(Rz) 간의 제1 차이를 계산하는 단계, 계산된 제1 차이들의 제1 차이 평균을 계산하는 단계, 상기 제1 차이 평균이 미리 설정된 제1 평균 임계치를 초과하는지 여부를 결정하는 단계, 상기 제1 차이 평균이 상기 제1 평균 임계치를 초과하지 않는 경우, 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계를 포함할 수 있다.The step of calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the equation further comprises adjusting a roll (R z ) of each of the plurality of cameras, the roll adjusting the (R z) is, for calculating a first difference between the average of calculating a first difference between the calculated and the initial rolls (R z) for each of the plurality of cameras, the calculated first difference Determining whether the first difference average exceeds a preset first average threshold, and when the first difference average does not exceed the first average threshold, the plurality of It may include the step of adjusting the roll (R z ) of each of the cameras.

상기 롤을 조정하는 단계는, 상기 제1 차이 평균이 상기 제1 평균 임계치를 초과하는 경우, 상기 제1 차이들 중 가장 큰 차이를 나타내는 카메라를 제외한 나머지 카메라들의 제1 차이들에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계를 더 포함할 수 있다.The adjusting of the roll may include: when the first difference average exceeds the first average threshold, the plurality of first differences are performed based on first differences of the cameras other than the camera representing the largest difference among the first differences. It may further include the step of adjusting the roll (R z ) of each of the cameras.

상기 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계는, 상기 제1 차이 평균에 기초하여 상기 전방 카메라 및 상기 후방 카메라의 롤(Rz)을 조정하는 단계를 포함할 수 있다.Adjusting said plurality of cameras, each of the rolls (R z) based on the first difference in the average on the basis of the average of said first difference for adjusting the front camera and the roll (R z) of the rear camera It may include steps.

상기 제1 차이 평균에 기초하여 상기 전방 카메라 및 상기 후방 카메라의 롤(Rz)을 조정하는 단계는, 상기 전방 카메라의 이전 롤(Rz)에서 상기 제1 차이 평균을 뺌으로써 상기 전방 카메라의 롤(Rz)을 조정하는 단계를 포함할 수 있다.Adjusting the roll (R z ) of the front camera and the rear camera based on the first difference average may include subtracting the first difference average from the previous roll (R z ) of the front camera. It may include the step of adjusting the roll (R z ).

상기 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계는, 동일 차선 상에 위치하는 전방 좌측 차선의 포인트 및 좌측 차선의 포인트가 매칭되도록 상기 좌측 카메라의 롤(Rz)을 조정하는 단계를 포함할 수 있다.Adjusting the roll R z of each of the plurality of cameras based on the first difference average may include a roll of the left camera so that a point of a front left lane and a point of the left lane located on the same lane match. It may include the step of adjusting (R z ).

다른 일 측면에 따른, 복수의 카메라들을 캘리브레이션 하는 장치는, 차량의 주변 영상을 생성하는 복수의 카메라들, 상기 복수의 카메라들을 캘리브레이션 하는 프로그램이 기록된 메모리, 및 상기 프로그램을 수행하는 프로세서를 포함하고, 상기 프로그램은, 상기 복수의 카메라들을 이용하여 복수의 영상들을 생성하는 단계, 상기 복수의 영상들 내의 차선들을 검출하는 단계, 초기 카메라 정보 및 초기 외부 파라미터에 기초하여 복수의 영상들을 이용하여 탑뷰(top view) 영상을 생성하는 단계, 상기 탑뷰 영상 내의 차선들에 대한 방정식을 계산하는 단계, 및 상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계를 수행할 수 있다.According to another aspect, an apparatus for calibrating a plurality of cameras includes a plurality of cameras for generating a peripheral image of a vehicle, a memory in which a program for calibrating the plurality of cameras is recorded, and a processor for executing the program, , The program includes: generating a plurality of images using the plurality of cameras, detecting lanes within the plurality of images, and using a plurality of images based on initial camera information and initial external parameters top view) generating an image, calculating an equation for lanes in the top view image, and calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the equation. Can be done.

상기 복수의 영상들 내의 차선을 검출하는 단계는, 상기 복수의 카메라들의 제1 카메라에 의해 생성된 프레임들을 누적함으로써 제1 영상을 생성하는 단계, 상기 제1 영상 내의 엣지를 검출하는 단계, 및 상기 엣지에 기초하여 상기 제1 영상의 차선을 결정하는 단계를 포함할 수 있다.The detecting of a lane within the plurality of images may include generating a first image by accumulating frames generated by the first cameras of the plurality of cameras, detecting an edge in the first image, and the It may include determining a lane of the first image based on an edge.

상기 복수의 영상들 내의 차선을 검출하는 단계는, 상기 제1 영상 내의 노이즈를 제거하는 단계, 및 상기 제1 영상을 흑백 영상으로 변환하는 단계 중 적어도 하나를 더 포함하고, 상기 제1 영상 내의 엣지를 검출하는 단계는, 노이즈가 제거된 제1 영상 또는 흑백 영상으로 변환된 제1 영상 내의 엣지를 검출하는 단계를 포함할 수 있다.The step of detecting a lane within the plurality of images further includes at least one of removing noise in the first image and converting the first image into a black and white image, and an edge in the first image The detecting of may include detecting an edge in the first image from which noise is removed or the first image converted into a black and white image.

상기 초기 외부 파라미터는 카메라의 초기 자세 정보 및 초기 위치 정보를 포함하고, 상기 초기 자세 정보는 상기 카메라의 피치(Rx), 요(Ry), 및 롤(Rz)을 포함하고, 상기 초기 위치 정보는 상기 카메라의 위치 이동(Tz)을 포함할 수 있다.The initial external parameter includes initial posture information and initial position information of the camera, and the initial posture information includes pitch (R x ), yaw (R y ), and roll (R z ) of the camera, and the initial posture information The location information may include a location movement (T z ) of the camera.

상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계는, 상기 복수의 카메라들 중 전방 카메라 및 후방 카메라 각각에 대한 피치(Rx), 요(Ry), 및 롤(Rz)을 계산하는 단계, 상기 전방 카메라 및 상기 후방 카메라 각각에 대한 피치(Rx), 요(Ry), 및 롤(Rz)에 기초하여 상기 후방 카메라의 위치 이동(Tz)을 계산하는 단계, 및 상기 후방 카메라의 위치 이동(Tz)에 기초하여 상기 복수의 카메라들 중 좌측 카메라 및 우측 카메라 각각에 대한 피치(Rx), 요(Ry), 롤(Rz), 및 위치 이동(Tz)을 계산하는 단계를 포함할 수 있다.The step of calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the equation may include a pitch (R x ) and a yaw (R) for each of the front and rear cameras among the plurality of cameras. y), and the roll (R z) a step of calculating a pitch (for the front camera and the rear camera, each R x), I (R y), and a roll (the position of the rear view camera on the basis of the R z) mobile phase, and the pitch (R x), I (R y) of the left camera and a right camera, each of the plurality of cameras based on position movement (T z) of the rear-view camera to calculate the (T z), It may include calculating the roll (R z ), and the positional movement (T z ).

상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계는, 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계를 더 포함하고, 상기 롤(Rz)을 조정하는 단계는, 상기 복수의 카메라들 각각에 대해 초기 롤과 계산된 롤(Rz) 간의 제1 차이를 계산하는 단계, 계산된 제1 차이들의 제1 차이 평균을 계산하는 단계, 상기 제1 차이 평균이 미리 설정된 제1 평균 임계치를 초과하는지 여부를 결정하는 단계, 상기 제1 차이 평균이 상기 제1 평균 임계치를 초과하지 않는 경우, 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계를 포함할 수 있다.The step of calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the equation further comprises adjusting a roll (R z ) of each of the plurality of cameras, the roll adjusting the (R z) is, for calculating a first difference between the average of calculating a first difference between the calculated and the initial rolls (R z) for each of the plurality of cameras, the calculated first difference Determining whether the first difference average exceeds a preset first average threshold, and if the first difference average does not exceed the first average threshold, based on the first difference average, the plurality of It may include adjusting the roll (R z ) of each of the cameras.

상기 롤을 조정하는 단계는, 상기 제1 차이 평균이 상기 제1 평균 임계치를 초과하는 경우, 상기 제1 차이들 중 가장 큰 차이를 나타내는 카메라를 제외한 나머지 카메라들의 제1 차이들에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계를 더 포함할 수 있다.The adjusting of the roll may include: when the first difference average exceeds the first average threshold, the plurality of first differences are performed based on first differences of the cameras other than the camera representing the largest difference among the first differences. It may further include the step of adjusting the roll (R z ) of each of the cameras.

상기 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계는, 상기 제1 차이 평균에 기초하여 상기 전방 카메라 및 상기 후방 카메라의 롤(Rz)을 조정하는 단계를 포함할 수 있다.Adjusting said plurality of cameras, each of the rolls (R z) based on the first difference in the average on the basis of the average of said first difference for adjusting the front camera and the roll (R z) of the rear camera It may include steps.

상기 제1 차이 평균에 기초하여 상기 전방 카메라 및 상기 후방 카메라의 롤(Rz)을 조정하는 단계는, 상기 전방 카메라의 이전 롤(Rz)에서 상기 제1 차이 평균을 뺌으로써 상기 전방 카메라의 롤(Rz)을 조정하는 단계를 포함할 수 있다.Adjusting the roll (R z ) of the front camera and the rear camera based on the first difference average may include subtracting the first difference average from the previous roll (R z ) of the front camera. It may include the step of adjusting the roll (R z ).

상기 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계는, 동일 차선 상에 위치하는 전방 좌측 차선의 포인트 및 좌측 차선의 포인트가 매칭되도록 상기 좌측 카메라의 롤(Rz)을 조정하는 단계를 포함할 수 있다.Adjusting the roll R z of each of the plurality of cameras based on the first difference average may include a roll of the left camera so that a point of a front left lane and a point of the left lane located on the same lane match. It may include the step of adjusting (R z ).

또 다른 일 측면에 따른, 탑뷰 영상을 생성하는 장치에 의해 수행되는, 탑뷰 영상 생성 방법은, 복수의 카메라들을 이용하여 복수의 영상들을 생성하는 단계, 상기 복수의 영상들에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계 - 상기 외부 파라미터는 카메라의 피치(Rx), 요(Ry), 및 롤(Rz)을 포함함 -, 캘리브레이션된 상기 복수의 카메라들을 이용하여 복수의 영상들을 생성하는 단계, 및 상기 복수의 영상들에 기초하여 탑뷰 영상을 생성하는 단계를 포함한다.According to another aspect, a top-view image generation method performed by an apparatus for generating a top-view image includes generating a plurality of images using a plurality of cameras, the plurality of cameras based on the plurality of images Calibrating the plurality of cameras by calculating external parameters for the cameras-the external parameters include the pitch (R x ), yaw (R y ), and roll (R z ) of the camera -, the calibrated plurality And generating a plurality of images using the cameras of, and generating a top view image based on the plurality of images.

이상에서 설명한 바와 같이 본 발명은 차량에 장착된 복수의 카메라들로부터 차량의 주행 차로를 촬영한 영상을 입력 받아 상기 촬영 영상으로부터 차선을 검출한 후 검출된 차선을 이용하여 차량에 장착된 카메라의 외부 파라미터를 보정하는 카메라 캘리브레이션을 수행하고 있기 때문에 차량을 멈추지 않고도 카메라의 캘리브레이션을 신속하고 간편하게 수행할 수 있는 효과가 있다. As described above, the present invention receives an image of a driving lane of a vehicle from a plurality of cameras mounted on a vehicle, detects a lane from the captured image, and uses the detected lane to be used to detect the outside of the camera mounted on the vehicle. Since camera calibration to correct parameters is performed, there is an effect that camera calibration can be performed quickly and easily without stopping the vehicle.

또한, 본 발명은 카메라 캘리브레이션을 차량의 주행 중에 수행하므로 종래에 차량에 장착된 카메라의 보정을 위해 차량을 멈춘 후 공간을 확보하고 교정 패턴을 설치하는 것과 같은 부차적인 작업을 할 필요가 없기 때문에 카메라 보정에 소요되는 시간이나 비용을 절감할 수 있는 효과가 있다.In addition, since the present invention performs camera calibration while the vehicle is running, there is no need to perform secondary operations such as securing a space after stopping the vehicle and installing a correction pattern for correction of the conventional camera mounted on the vehicle. There is an effect that can reduce the time or cost required for calibration.

도 1은 일 예에 따른 차량용 카메라 캘리브레이션 장치의 개요도이다.
도 2는 일 실시예에 따른 전자 장치의 구성도이다.
도 3은 일 실시예에 따른 카메라 캘리브레이션 방법의 흐름도이다.
도 4는 일 예에 따른 차선 검출 방법의 흐름도이다.
도 5는 일 예에 따른 외부 파라미터를 추정하는 방법의 흐름도이다.
도 6은 일 예에 따른 전방 카메라 및 후방 카메라의 피치(Rx)가 틀어진 경우에 생성된 영상이다.
도 7은 일 예에 따른 전방 카메라 및 후방 카메라의 요(Ry)가 틀어진 경우에 생성된 영상이다.
도 8은 일 예에 따른 전방 카메라 및 후방 카메라의 롤(Rz)이 틀어진 경우에 생성된 영상이다.
도 9는 일 예에 따른 후방 카메라의 위치이동(Tz)이 틀어진 경우에 생성된 영상이다.
도 10은 일 예에 따른 좌측 카메라 및 우측 카메라의 피치(Rx)가 틀어진 경우에 생성된 영상이다.
도 11은 일 예에 따른 좌측 카메라 및 우측 카메라의 요(Ry)가 틀어진 경우에 생성된 영상이다.
도 12는 일 예에 따른 좌측 카메라 및 우측 카메라의 롤(Rz)이 틀어진 경우에 생성된 영상이다.
도 13은 일 예에 따른 좌측 카메라 및 우측 카메라의 위치이동(Tz)이 틀어진 경우에 영상이다.
도 14 내지 16은 일 예에 따른 카메라의 롤(Rz)을 조정하는 방법의 흐름도이다.
도 17은 일 예에 따른 차량 및 차선이 평행하지 않은 경우, 조정되지 않은 롤(Rz)에 의해 생성되는 영상이다.
도 18은 일 예에 따른 전방 카메라 및 후방 카메라의 롤(Rz)을 조정한 경우 생성되는 영상이다.
도 19는 일 예에 따른 전방 카메라, 후방 카메라, 좌측 카메라 및 우측 카메라의 롤(Rz)을 조정한 경우 생성되는 영상이다.
1 is a schematic diagram of a vehicle camera calibration device according to an example.
2 is a block diagram of an electronic device according to an exemplary embodiment.
3 is a flowchart of a camera calibration method according to an exemplary embodiment.
4 is a flowchart of a method for detecting a lane according to an example.
5 is a flowchart of a method of estimating an external parameter according to an example.
6 is an image generated when the pitches Rx of the front and rear cameras are different according to an example.
7 is an image generated when the yaw Ry of the front and rear cameras is wrong according to an example.
8 is an image generated when rolls Rz of a front camera and a rear camera are wrong according to an example.
9 is an image generated when the position movement (Tz) of the rear camera is wrong according to an example.
10 is an image generated when the pitches Rx of the left and right cameras are different according to an example.
11 is an image generated when the yaw Ry of the left and right cameras is wrong according to an example.
12 is an image generated when the rolls Rz of the left and right cameras are wrong according to an example.
13 is an image when the position movement Tz of the left and right cameras is wrong according to an example.
14 to 16 are flowcharts of a method of adjusting a roll Rz of a camera according to an example.
17 is an image generated by an unadjusted roll Rz when a vehicle and a lane are not parallel according to an example.
18 is an image generated when a roll Rz of a front camera and a rear camera is adjusted according to an example.
19 is an image generated when a roll Rz of a front camera, a rear camera, a left camera, and a right camera is adjusted according to an example.

이하에서, 첨부된 도면을 참조하여 실시예들을 상세하게 설명한다. 그러나, 특허출원의 범위가 이러한 실시예들에 의해 제한되거나 한정되는 것은 아니다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. However, the scope of the patent application is not limited or limited by these embodiments. The same reference numerals in each drawing indicate the same members.

아래 설명하는 실시예들에는 다양한 변경이 가해질 수 있다. 아래 설명하는 실시예들은 실시 형태에 대해 한정하려는 것이 아니며, 이들에 대한 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.Various changes may be made to the embodiments described below. The embodiments described below are not intended to be limited to the embodiments, and it should be understood that all changes, equivalents, and substitutes for them are included.

실시예에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 실시예를 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the examples are used only to describe specific embodiments, and are not intended to limit the embodiments. Singular expressions include plural expressions unless the context clearly indicates otherwise. In the present specification, terms such as "comprise" or "have" are intended to designate the presence of features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, but one or more other features. It is to be understood that the presence or addition of elements or numbers, steps, actions, components, parts, or combinations thereof, does not preclude in advance.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiment belongs. Terms as defined in a commonly used dictionary should be interpreted as having a meaning consistent with the meaning in the context of the related technology, and should not be interpreted as an ideal or excessively formal meaning unless explicitly defined in this application. Does not.

또한, 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조부호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. 실시예를 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 실시예의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.In addition, in the description with reference to the accompanying drawings, the same reference numerals are assigned to the same components regardless of the reference numerals, and redundant descriptions thereof will be omitted. In describing the embodiments, when it is determined that a detailed description of related known technologies may unnecessarily obscure the subject matter of the embodiments, the detailed description thereof will be omitted.

이하, 첨부된 도면을 참조하여 본 발명의 실시예를 상세히 설명하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

먼저, 본 발명의 일 실시예에 따른 차량용 카메라 캘리브레이션 장치 및 그 방법이 실제로 사용되기 위해서는 차량에 장착된 카메라에 촬영되는 영상들 내에 적어도 일부의 차선이 존재해야 하며, 도로가 평면이고 직진 차선의 경우에 가능한 것으로 한다. 도로가 평지가 아닌 경우, 보정이 수행되지만 보정된 외부 파라미터의 정확도가 떨어지기 때문에, 이러한 점을 방지하기 위해 최대한 평지에서 보정이 진행되는 것이 바람직하다.First, in order to actually use the vehicle camera calibration apparatus and method according to an embodiment of the present invention, at least some lanes must exist in images captured by a camera mounted on a vehicle, and the road is flat and a straight lane To be possible. If the road is not flat, correction is performed, but since the accuracy of the corrected external parameter is degraded, it is preferable to perform correction on the flat ground as much as possible to prevent this point.

또한, 아래에서 기술되는 알고리즘은 본 발명의 일실시예로서 기재된 것이며, 따라서 본 발명은 기재된 그 하나의 알고리즘에 한정되는 것이 아니고 해당 기능을 수행하는 또 다른 알고리즘이 얼마든지 사용될 수 있음은 당연하다 할 것이다. In addition, the algorithm described below is described as an embodiment of the present invention, so it is natural that the present invention is not limited to that one described algorithm, and any other algorithm that performs the function can be used. will be.

도 1은 일 예에 따른 차량용 카메라 캘리브레이션 장치의 개요도이다.1 is a schematic diagram of a vehicle camera calibration device according to an example.

일 측면에 따른, 차량용 카메라 캘리브레이션 장치(100)는, 차량에 장착된 복수의 카메라들이 차선(또는 차로)를 촬영한 영상들을 획득하는 카메라 모듈(110), 카메라 모듈(110)로부터 획득된 영상을 수신하고, 보정된 영상을 출력하는 입출력 모듈(120), 입출력 모듈(120)에서 수신한 영상으로부터 차선을 검출하고 차선의 특징점을 검출하는 차선 검출 모듈(130) 및 입출력 모듈(120)로부터 수신한 영상에서 초기 카메라 정보와 외부 파라미터 정보를 이용하여 차선의 방정식과 차선폭을 계산한 후 새로운 외부 파라미터를 추정하여 영상을 보정하는 카메라 보정 모듈(140)을 포함할 수 있다.According to an aspect, the vehicle camera calibration apparatus 100 includes a camera module 110 for obtaining images captured by a plurality of cameras mounted on a vehicle taking a lane (or lane), and an image obtained from the camera module 110. The input/output module 120 that receives and outputs the corrected image, the lane detection module 130 that detects a lane from the image received from the input/output module 120 and detects characteristic points of the lane, and the input/output module 120 A camera correction module 140 for correcting an image by estimating a new external parameter after calculating a lane equation and a lane width using initial camera information and external parameter information in the image may be included.

일 측면에 따른, 카메라 모듈(110)은 차량의 임의의 위치한 복수의 카메라들을 포함할 수 있다. 각각의 카메라는 설치된 위치에서 장면을 촬영함으로써 영상을 생성한다. 생성된 영상 내에는 차선 또는 차선의 일부가 포함될 수 있다. 예를 들어, 카메라들이 차량의 전방, 후방, 좌측 및 우측에 설치되어 차량의 주변을 모두 시각화 할 수 있다. 차량에 장착되는 카메라들의 개수는 실시예에 따라 달라질 수 있으며, 기재된 실시예로 한정되지 않는다.According to one aspect, the camera module 110 may include a plurality of cameras located at any position of the vehicle. Each camera creates an image by photographing the scene from the installed location. A lane or a portion of a lane may be included in the generated image. For example, cameras are installed in the front, rear, left and right sides of the vehicle to visualize all the surroundings of the vehicle. The number of cameras mounted on the vehicle may vary according to embodiments, and is not limited to the described embodiments.

일 측면에 따른, 입출력 모듈(120)은 영상 입출력부(121) 및 저장부(122)를 포함할 수 있다.According to an aspect, the input/output module 120 may include an image input/output unit 121 and a storage unit 122.

영상 입출력부(121)은 카메라 모듈(110)의 카메라가 생성한 영상을 수신하고, 차선검출 모듈(130)로 전송하고, 카메라 보정 모듈(140)로부터 보정된 영상을 수신하고, 수신된 보정 영상을 모니터와 같은 외부 장치로 출력할 수 있다. 영상 입출력부(121)는 필요한 경우 영상 필터 등을 이용하여 영상을 전처리 할 수 있다.The image input/output unit 121 receives the image generated by the camera of the camera module 110, transmits it to the lane detection module 130, receives the corrected image from the camera correction module 140, and receives the corrected image. Can be output to an external device such as a monitor. The image input/output unit 121 may pre-process the image using an image filter or the like, if necessary.

저장부(122)는 카메라가 생성한 영상을 저장하고, 카메라 보정 모듈(140)로부터 수신한 보정 영상을 저장할 수 있다.The storage unit 122 may store an image generated by the camera and may store a correction image received from the camera correction module 140.

일 측면에 따른, 차선 검출 모듈(130)은 영상 처리부(131), 프레임 누적부(132), 엣지 검출부(133) 및 차선 판단부(134)를 포함할 수 있다.According to an aspect, the lane detection module 130 may include an image processing unit 131, a frame accumulating unit 132, an edge detection unit 133, and a lane determination unit 134.

영상 처리부(131)는 영상 입출력부(121)로부터 수신한 영상 내의 노이즈를 제거하고, 차선의 경계 부분이 보다 뚜렷하게 나타나도록 영상을 처리할 수 있다. 예를 들어, 영상 처리부(131)는 노이즈를 제거하기 위해 영상에 모폴로지 연산과 메디안 필터링을 적용할 수 있다.The image processing unit 131 may remove noise in an image received from the image input/output unit 121 and may process the image so that a boundary portion of the lane is more clearly displayed. For example, the image processing unit 131 may apply morphology calculation and median filtering to an image in order to remove noise.

영상 처리부(131)는 컬러 영상을 흑백 영상으로 변환할 수 있다. 즉, 영상 처리부(131)는 수신한 컬러 영상을 그대로 사용할 수도 있고, 컬러 영상을 흑백 영상으로 변환하여 사용할 수도 있다.The image processing unit 131 may convert a color image into a black and white image. That is, the image processing unit 131 may use the received color image as it is, or may convert the color image into a black and white image and use it.

프레임 누적부(132)는 처리된 영상 내의 차선이 점선일 경우, 영상을 연속된 프레임으로 누적한다. 점선 차선이 실선(또는 직선) 차선과 같이 나타나도록 영상들이 누적될 수 있다. 예를 들어, 4개의 영상들이 누적될 수 있고, 기재된 실시예로 한정되지 않는다. 4개의 영상들의 모든 픽셀 값을 비교하여, 가장 큰 픽셀 값을 새로운 이미지에 저장함으로써 결과적으로 영상에서의 점선 차선이 실선 차선과 같이 보이는 효과를 가지도록 한다.When the lane in the processed image is a dotted line, the frame accumulator 132 accumulates the image as a continuous frame. Images may be accumulated so that the dotted lane appears as a solid (or straight) lane. For example, four images may be accumulated and are not limited to the described embodiment. By comparing all pixel values of the four images and storing the largest pixel value in a new image, as a result, a dotted line in the image looks like a solid line.

영상 내의 차선이 직선(또는 실선)인 경우, 영상이 누적되지 않을 수 있다.When the lane in the image is a straight line (or a solid line), the images may not be accumulated.

엣지 검출부(133)는 영상(또는 프레임)의 하단 부분에서 엣지(edge)를 검출하고, 특징점을 검출한다. 일반적으로, 전방 또는 후방 카메라에 기초하여 생성된 영상들을, 누적한 영상(또는 프레임)에서 차선은 영상의 하단 부분에 존재하고, 상단 부분은 하늘(지평선의 위)이기 때문에 연산량을 줄이기 위해 지평선의 아래 부분을 ROI(region of interest)로 정의할 수 있다.The edge detection unit 133 detects an edge in a lower portion of an image (or frame) and detects a feature point. In general, in the accumulated image (or frame) of images generated based on a front or rear camera, a lane exists in the lower part of the image, and the upper part is in the sky (above the horizon). The lower part can be defined as a region of interest (ROI).

차선 판단부(134)는 엣지 검출부(133)에서 검출된 특징점에 기초하여 차선을 검출 또는 결정한다.The lane determination unit 134 detects or determines a lane based on the feature points detected by the edge detection unit 133.

카메라 보정 모듈(140)은 검출된 차선에 기초하여 차량의 카메라들의 외부 파라미터를 보정한다. 예를 들어, 4개의 카메라들 각각의 외부 파라미터를 보정할 수 있다.The camera correction module 140 corrects external parameters of cameras of the vehicle based on the detected lane. For example, external parameters of each of the four cameras may be corrected.

일 측면에 따르면, 카메라 보정 모듈(140)은 이미지 변환부(141), 방정식 산출부(142), 파라미터 추정부(143) 및 보정부(144)를 포함할 수 있다. According to an aspect, the camera correction module 140 may include an image conversion unit 141, an equation calculation unit 142, a parameter estimation unit 143, and a correction unit 144.

이미지 변환부(141)는 초기 카메라 정보 및 외부 파라미터 정보에 기초하여 영상 내의 차선의 특징점을 추출한 후, 탑뷰 영상으로 변환한다.The image conversion unit 141 extracts a feature point of a lane in an image based on initial camera information and external parameter information, and then converts it into a top view image.

방정식 산출부(142)는 변환된 탑뷰 영상에서 특징점을 라인 피팅(line fitting)함으로써 차선의 방정식을 설정한다. 여기서, 라인 피팅에는 LMS(least mean square) 알고리즘이 이용될 수 있다. 차선의 방정식은 직선의 방정식이 될 수 있고, 직선이 아닌 다차원 방정식이 될 수도 있다.The equation calculator 142 sets an equation of a lane by line fitting the feature points in the converted top view image. Here, a least mean square (LMS) algorithm may be used for line fitting. The suboptimal equation can be an equation of a straight line or a multidimensional equation other than a straight line.

파라미터 추정부(143)는 설정된 차선의 방정식에 기초하여 새로운 외부 파라미터를 추정 또는 계산한다.The parameter estimating unit 143 estimates or calculates a new external parameter based on the set lane equation.

보정부(144)는 추정된 새로운 외부 파라미터에 기초하여 영상을 보정한다.The correction unit 144 corrects the image based on the estimated new external parameter.

이하에서는 도 2 내지 도 19를 참조하여 차량용 카메라를 캘리브레이션하는 방법에 대해 상세히 설명된다.Hereinafter, a method of calibrating a vehicle camera will be described in detail with reference to FIGS. 2 to 19.

도 2는 일 실시예에 따른 전자 장치의 구성도이다.2 is a block diagram of an electronic device according to an exemplary embodiment.

전자 장치(200)는 통신부(210), 프로세서(220), 및 메모리(230)를 포함한다. 실시예에 따라, 전자 장치(200)는 카메라(240)를 더 포함할 수 있다.The electronic device 200 includes a communication unit 210, a processor 220, and a memory 230. According to an embodiment, the electronic device 200 may further include a camera 240.

일 측면에 따르면, 전자 장치(200)는 차량용 카메라 캘리브레이션 장치(100)에 대응한다. 예를 들어, 통신부(210)는 영상 입출력부(121)에 대응할 수 있고, 프로세서(220)는 영상 처리부(131), 프레임 누적부(132), 엣지 검출부(133), 차선 판단부(134), 이미지 변환부(141), 방정식 산출부(142), 파라미터 추정부(143) 및 보정부(144)에 각각 대응할 수 있고, 메모리(230)는 저장부(122)에 대응할 수 있다.According to one aspect, the electronic device 200 corresponds to the vehicle camera calibration device 100. For example, the communication unit 210 may correspond to the image input/output unit 121, and the processor 220 includes an image processing unit 131, a frame accumulating unit 132, an edge detection unit 133, and a lane determining unit 134. , The image conversion unit 141, the equation calculation unit 142, the parameter estimating unit 143, and the correction unit 144, respectively, and the memory 230 may correspond to the storage unit 122.

통신부(210)는 프로세서(220) 및 메모리(230)와 연결되어 데이터를 송수신한다. 통신부(210)는 외부의 다른 장치와 연결되어 데이터를 송수신할 수 있다. 이하에서 "A"를 송수신한다라는 표현은 "A를 나타내는 정보(information) 또는 데이터"를 송수신하는 것을 나타낼 수 있다.The communication unit 210 is connected to the processor 220 and the memory 230 to transmit and receive data. The communication unit 210 may be connected to other external devices to transmit and receive data. Hereinafter, the expression "transmitting/receiving A" may refer to transmitting/receiving "information or data representing A".

통신부(210)는 전자 장치(200) 내의 회로망(circuitry)으로 구현될 수 있다. 예를 들어, 통신부(210)는 내부 버스(internal bus) 및 외부 버스(external bus)를 포함할 수 있다. 다른 예로, 통신부(210)는 전자 장치(300)와 외부의 장치를 연결하는 요소일 수 있다. 통신부(210)는 인터페이스(interface)일 수 있다. 통신부(210)는 외부의 장치로부터 데이터를 수신하여, 프로세서(220) 및 메모리(230)에 데이터를 전송할 수 있다.The communication unit 210 may be implemented as a circuit network in the electronic device 200. For example, the communication unit 210 may include an internal bus and an external bus. As another example, the communication unit 210 may be an element connecting the electronic device 300 and an external device. The communication unit 210 may be an interface. The communication unit 210 may receive data from an external device and transmit the data to the processor 220 and the memory 230.

프로세서(220)는 통신부(210)가 수신한 데이터 및 메모리(230)에 저장된 데이터를 처리한다. "프로세서"는 목적하는 동작들(desired operations)을 실행시키기 위한 물리적인 구조를 갖는 회로를 가지는 하드웨어로 구현된 데이터 처리 장치일 수 있다. 예를 들어, 목적하는 동작들은 프로그램에 포함된 코드(code) 또는 인스트럭션들(instructions)을 포함할 수 있다. 예를 들어, 하드웨어로 구현된 데이터 처리 장치는 마이크로프로세서(microprocessor), 중앙 처리 장치(central processing unit), 프로세서 코어(processor core), 멀티-코어 프로세서(multi-core processor), 멀티프로세서(multiprocessor), ASIC(Application-Specific Integrated Circuit), FPGA(Field Programmable Gate Array)를 포함할 수 있다.The processor 220 processes data received by the communication unit 210 and data stored in the memory 230. The “processor” may be a data processing device implemented in hardware having a circuit having a physical structure for executing desired operations. For example, desired operations may include code or instructions included in a program. For example, a data processing device implemented in hardware is a microprocessor, a central processing unit, a processor core, a multi-core processor, and a multiprocessor. , Application-Specific Integrated Circuit (ASIC), and Field Programmable Gate Array (FPGA).

프로세서(220)는 메모리(예를 들어, 메모리(230))에 저장된 컴퓨터로 읽을 수 있는 코드(예를 들어, 소프트웨어) 및 프로세서(220)에 의해 유발된 인스트럭션들을 실행한다.The processor 220 executes computer-readable code (eg, software) stored in a memory (eg, memory 230) and instructions induced by the processor 220.

메모리(230)는 통신부(210)가 수신한 데이터 및 프로세서(220)가 처리한 데이터를 저장한다. 예를 들어, 메모리(230)는 프로그램(또는 어플리케이션, 소프트웨어)을 저장할 수 있다. 저장되는 프로그램은 카메라의 외부 파라미터를 조정함으로써 카메라를 캘리브레이션 할 수 있도록 코딩되어 프로세서(220)에 의해 실행 가능한 신텍스(syntax)들의 집합일 수 있다.The memory 230 stores data received by the communication unit 210 and data processed by the processor 220. For example, the memory 230 may store a program (or application or software). The stored program may be a set of syntaxes that are coded to calibrate the camera by adjusting external parameters of the camera and executed by the processor 220.

일 측면에 따르면, 메모리(230)는 하나 이상의 휘발성 메모리, 비휘발성 메모리 및 RAM(Random Access Memory), 플래시 메모리, 하드 디스크 드라이브 및 광학 디스크 드라이브를 포함할 수 있다.According to an aspect, the memory 230 may include one or more volatile memories, nonvolatile memories and random access memories (RAM), flash memories, hard disk drives, and optical disk drives.

메모리(230)는 전자 장치(200)를 동작 시키는 명령어 세트(예를 들어, 소프트웨어)를 저장한다. 전자 장치(200)를 동작 시키는 명령어 세트는 프로세서(220)에 의해 실행된다.The memory 230 stores an instruction set (eg, software) for operating the electronic device 200. An instruction set for operating the electronic device 200 is executed by the processor 220.

카메라(240)는 장면을 촬영함으로써 영상을 생성한다.The camera 240 generates an image by photographing a scene.

통신부(210), 프로세서(220), 메모리(230) 및 카메라(240)에 대해, 아래에서 도 3 내지 도 19를 참조하여 상세히 설명된다.The communication unit 210, the processor 220, the memory 230, and the camera 240 will be described in detail with reference to FIGS. 3 to 19 below.

도 3은 일 실시예에 따른 카메라 캘리브레이션 방법의 흐름도이다.3 is a flowchart of a camera calibration method according to an exemplary embodiment.

아래의 단계들(310 내지 360)은 도 2를 참조하여 전술된 전자 장치(200)에 의해 수행된다.The steps 310 to 360 below are performed by the electronic device 200 described above with reference to FIG. 2.

단계(310)에서, 전자 장치(200)는 카메라(240)를 이용하여 영상을 촬영한다. 예를 들어, 카메라(240)는 보통의 렌즈보다 시야 각이 더 큰 광각 렌즈 또는 시각이 180°를 넘는 초광각 렌즈인 어안 렌즈를 포함할 수 있다. 시야 각이 큰 렌즈를 통해 영상이 생성되는 경우, 차량 주변이 모두 촬영될 수 있다.In step 310, the electronic device 200 captures an image using the camera 240. For example, the camera 240 may include a wide-angle lens having a larger viewing angle than a normal lens, or a fisheye lens having an ultra-wide angle lens having a viewing angle of more than 180°. When an image is generated through a lens having a large viewing angle, all around the vehicle may be photographed.

카메라(240)가 차량의 전방, 후방, 좌측 및 우측을 각각 촬영하는 4개의 카메라들을 포함하고, 4개의 카메라들에 의해 촬영된 영상들 내의 차선에 기초하여 카메라들 간의 캘리브레이션이 수행되는 경우, 카메라들 각각의 자세 정보(pose information)가 추정될 수 있다. 예를 들어, 자세 정보는 카메라가 특정 위치에서 회전된 정도를 나타내는 외부 파라미터인 피치(Rx), 요(Ry), 롤(Rz)을 포함할 수 있다. 다른 예로, 자세 정보는 후방 카메라 및 좌우측 카메라의 특정 위치에서 이동된 정도를 나타내는 외부 파라미터인 위치이동(Tz)을 포함한다. 예를 들어, 카메라(240)가 전방, 후방, 좌측 및 우측을 각각 촬영하는 4개의 카메라들을 포함하는 경우, 각각의 카메라에 대한 4개의 채널들이 정의될 수 있다.When the camera 240 includes four cameras respectively photographing the front, rear, left and right sides of the vehicle, and calibration between the cameras is performed based on the lanes within the images captured by the four cameras, the camera Pose information of each of them may be estimated. For example, the posture information may include pitch (Rx), yaw (Ry), and roll (Rz), which are external parameters indicating the degree to which the camera is rotated at a specific position. As another example, the posture information includes position movement (Tz), which is an external parameter indicating a movement degree of a specific position of the rear camera and the left and right cameras. For example, when the camera 240 includes four cameras respectively photographing front, rear, left and right, four channels for each camera may be defined.

직진 차로에 나타나는 직진 차선이 탑뷰의 시점으로 변환된 경우, 차선은 탑뷰 영상의 하단과 수직으로 나타나게 되고, 이러한 차선은 4개의 카메라에 모두 존재한다. 4개의 카메라들 각각의 외부 파라미터가 정확한 경우에는, 탑뷰 영상 내의 차선이 하나로 나타나고, 외부 파라미터가 부정확한 경우에는 여러 개의 차선으로 나타나게 된다.When the straight lane appearing in the straight lane is converted to the viewpoint of the top view, the lane appears perpendicular to the bottom of the top view image, and these lanes exist in all four cameras. When the external parameters of each of the four cameras are correct, one lane in the top view image appears, and when the external parameters are incorrect, several lanes appear.

이러한 점을 이용하여, 카메라들 각각의 정확한 외부 파라미터가 추정될 수 있다. 아래에서, 촬영된 영상을 이용하여 정확한 외부 파라미터를 추정하는 방법이 설명된다.Using this point, the exact external parameter of each of the cameras can be estimated. In the following, a method of estimating an accurate external parameter using a captured image will be described.

단계(320)에서, 전자 장치(200)는 영상에 기초하여 영상 내의 차선을 검출한다. 차선을 검출하는 방법에 대해, 도 4를 참조하여 상세하게 설명된다. 일 측면에 따른, 단계(320)는 도 4의 단계들(410 내지 440)을 포함할 수 있다.In step 320, the electronic device 200 detects a lane in the image based on the image. A method of detecting a lane will be described in detail with reference to FIG. 4. According to one aspect, step 320 may include steps 410 to 440 of FIG. 4.

단계(410)에서, 전자 장치(200)는 필요에 따라 영상에 대한 전-처리를 수행할 있다. 예를 들어, 영상 내의 노이즈를 제거하거나, 컬러 영상을 흑백 영상으로 변환할 수 있다.In step 410, the electronic device 200 may perform pre-processing on the image as necessary. For example, noise in an image may be removed, or a color image may be converted into a black and white image.

일 측면에 따르면, 전자 장치(200)는 노이즈를 제어하기 위해 영상 내의 물체(object)의 경계를 부드럽게 하는 모폴로지 연산을 수행할 수 있다. 모폴로지 연산은 영상의 분리, 즉, 본격적인 영상 처리에 앞서 노이즈 제거 및 특징점 추출 등과 같은 전처리 과정에서 사용되는 영상 필터의 일종으로서 침식 연산과 팽창 연산이 있다. 예를 들어, 모폴로지 클로징(closing) 이후 모폴로지 오프닝(opening)이 수행된다.According to an aspect, the electronic device 200 may perform a morphology operation to smooth a boundary of an object in an image in order to control noise. The morphology operation is a type of image filter used in a preprocessing process such as image separation, that is, noise removal and feature point extraction prior to full-scale image processing, and includes an erosion operation and a dilation operation. For example, morphology opening is performed after morphology closing.

폴로지 클로징은 영상에 나타나는 물체(object)의 경계를 부드럽게 함으로써 영상 내의 불연속 데이터를 제거할 수 있다. 모폴로지 오프닝(opening)에 의해 물체의 크기가 유지되면서 노이즈가 제거될 수 있다.Foliage closing can remove discontinuous data in an image by smoothing the boundary of an object appearing in the image. Noise can be removed while the size of an object is maintained by morphology opening.

노이즈를 제거하기 위해 메디안 필터링이 수행될 수 있다. 전자 장치(200)는 메디안 필터링을 수행한 후의 영상의 크기를 변경함으로써 노이즈를 제거할 수 있다. 좌측 카메라 또는 우측 카메라에서 생성된 영상에 나타난 차선의 경우, 갈라진 부분이 존재할 수 있는데, 추후에 갈라진 부분이 엣지로 검출될 수 있으므로, 차선의 갈라진 부분의 노이즈를 제거함으로써 차선 인식률이 떨어지는 것을 방지할 수 있다.Median filtering can be performed to remove noise. The electronic device 200 may remove noise by changing the size of an image after median filtering is performed. In the case of the lane shown in the image generated by the left camera or the right camera, there may be a split part, but since the split part may be detected as an edge, it is possible to prevent the lane recognition rate from dropping by removing noise from the split part of the lane. I can.

단계(420)에서, 전자 장치(200)는 제1 카메라에 의해 생성된 프레임 내의 차선이 점선인 경우, 제1 카메라에 의해 생성된 프레임들을 누적함으로써 제1 영상을 생성한다. 프레임 내의 차선이 실선이 아니고 점선 차선인 경우, 차선이 실선 차선으로 나타나도록 하기 위해 누적된 프레임들의 모든 동일 좌표의 픽셀 값들을 비교하여 가장 큰 픽셀 값을 새로운 영상에 저장함으로써 누적 영상을 생성할 수 있다. 프레임 내의 차선이 직선인 경우에는 프레임들이 누적되지 않을 수 있다.In step 420, when the lane in the frame generated by the first camera is a dotted line, the electronic device 200 generates a first image by accumulating frames generated by the first camera. If the lane within the frame is not a solid line but a dotted line, the accumulated image can be created by comparing the pixel values of all the same coordinates of the accumulated frames to make the lane appear as a solid lane and storing the largest pixel value in a new image. have. If the lane within the frame is a straight line, the frames may not be accumulated.

단계(430)에서, 전자 장치(200)는 영상을 처리함으로써 영상 내의 엣지를 검출할 수 있다. 예를 들어, 도로의 색과 차선의 색 간의 경계가 뚜렷하므로 영상 처리를 통해 엣지가 강하게 나타나도록 한 후, 윤곽을 가장 잘 찾아내면서 원래 영상의 회색 물질과 관련된 모든 엣지를 제거할 수 있는 캐니 엣지 알고리즘을 이용하여 엣지가 검출될 수 있다. 캐니 엣지 알고리즘은 낮은 에러율과 엣지 점들의 위치를 비교적 정확하게 검출할 수 있다. 캐니 엣지 알고리즘이 예시적으로 기재되었으나, 기재된 실시예로 한정되지 않는다.In step 430, the electronic device 200 may detect an edge in the image by processing the image. For example, since the boundary between the color of the road and the color of the lane is clear, the edge is made strong through image processing, and then Canny Edge, which can best find the outline and remove all the edges related to the gray matter in the original image. The edge can be detected using an algorithm. The Canny Edge algorithm can detect the location of edge points with a low error rate and relatively accurately. The Canny Edge algorithm has been described as an example, but is not limited to the described embodiment.

전자 장치(200)는 검출된 엣지와 엣지의 중앙 좌표를 특징점으로 결정할 수 있다. 엣지가 영상의 차선뿐만 아니라 영상의 노이즈에 의해서도 나타날 수 있으므로, 검출되는 엣지를 감소시키기 위해 엣지와 엣지의 중앙 좌표가 특징점으로 결정될 수 있다. 엣지와 엣지의 중앙 좌표를 특징점으로 결정하는 경우, 영상의 차선은 하나의 연속된 긴 선으로 나타나게 되고, 노이즈에서는 짧게 나타나거나 나타나지 않게 된다.The electronic device 200 may determine the detected edge and the center coordinate of the edge as a feature point. Since the edge may appear not only by the lane of the image but also by the noise of the image, the edge and the center coordinates of the edge may be determined as feature points in order to reduce the detected edge. When the edge and the center coordinates of the edge are determined as feature points, the lanes of the image appear as one continuous long line, and appear short or do not appear in noise.

단계(440)에서, 전자 장치(200)는 특징점에 기초하여 영상 내의 차선을 결정할 수 있다. 예를 들어, 결정된 특징점에 의해 나타나는 선들 중에서 길이가 가장 긴 윤곽선을 차선으로 결정할 수 있다.In operation 440, the electronic device 200 may determine a lane within the image based on the feature point. For example, a contour line having the longest length among the lines indicated by the determined feature points may be determined as the lane.

전자 장치(200)는 전방 카메라 및 후방 카메라들이 생성한 영상들 내에서는 두 개의 윤곽선을 검출할 수 있고, 좌측 카메라 및 우측 카메라들이 생성한 영상들 내에서는 각각 하나의 윤곽선을 검출할 수 있다. 전방 카메라 및 후방 카메라들이 생성한 영상들 내에는 좌측 차선 및 우측 차선이 존재하고, 좌측 카메라 및 우측 카메라들이 생성한 영상들 내에는 좌측 차선 및 우측 차선이 각각 하나씩 존재하기 때문이다. 검출된 윤곽선이 차선으로 결정된다.The electronic device 200 may detect two contours in images generated by the front camera and the rear cameras, and may detect one contour in images generated by the left and right cameras. This is because a left lane and a right lane exist in images generated by the front and rear cameras, and a left lane and a right lane exist in images generated by the left and right cameras. The detected contour is determined as the lane.

다시 도 3을 참조하면, 단계(330)에서, 전자 장치(200)는 초기 카메라 정보 및 초기 외부 파라미터에 기초하여 촬영된 영상들의 각각을 탑뷰 영상으로 변환한다. 즉, 영상이 촬영된 시점을 가상의 시점인 조감(bird view) 시점으로 변경함으로써 탑뷰 영상이 생성될 수 있다.Referring back to FIG. 3, in step 330, the electronic device 200 converts each of the captured images into a top view image based on initial camera information and initial external parameters. That is, a top view image may be generated by changing the point in time at which the image is captured to a bird view point of the virtual viewpoint.

예를 들어, 메모리(230)는 초기 카메라 정보 및 초기 외부 파라미터를 저장할 수 있다. 또한, 후술될 단계(350)를 통해 추정된 새로운 카메라의 외부 파라미터도 메모리(230)에 저장될 수 있다.For example, the memory 230 may store initial camera information and initial external parameters. In addition, external parameters of the new camera estimated through step 350 to be described later may be stored in the memory 230.

예를 들어, 초기 카메라 정보는 카메라 각각의 고유 특성에 해당하는 초점거리, 주점, 왜곡계수 등과 같은 내부 파라미터에 대한 정보를 포함할 수 있다. 예를 들어, 초기 외부 파라미터는 카메라 각각의 초기 자세 정보, 및 초기 위치 정보 등을 포함할 수 있다.For example, the initial camera information may include information on internal parameters such as a focal length, a main point, and a distortion coefficient corresponding to a unique characteristic of each camera. For example, the initial external parameters may include initial posture information and initial position information of each camera.

외부 파라미터가 정확한 경우, 탑뷰 영상 내의 차선은 동일한 직선 위에 존재하게 되고 수직으로 나타나게 된다. 그러나, 물리적인 힘으로 인해 카메라(240)의 위치가 변경된 경우, 초기 외부 파라미터에 기초하여 생성된 탑뷰 영상 내의 차선은 직선상으로 존재하지 않는다. 추가의 처리를 통해 카메라의 변경된 외부 파라미터를 추정할 수 있도록, 탑뷰 영상이 생성될 수 있다.If the external parameters are correct, the lanes in the top view image exist on the same straight line and appear vertical. However, when the position of the camera 240 is changed due to a physical force, a lane in the top view image generated based on an initial external parameter does not exist in a straight line. A top view image may be generated so that the changed external parameter of the camera may be estimated through additional processing.

단계(340)에서, 전자 장치(200)는 탑뷰 영상 내의 차선에 대한 방정식 및 차선 폭을 산출한다. 산출된 방정식 및 차선 폭은 이후의 단계에서 새로운 외부 파라미터를 추정하기 위해 이용될 수 있다.In step 340, the electronic device 200 calculates an equation for a lane in the top-view image and a lane width. The calculated equation and lane width can be used to estimate new external parameters in a later step.

전자 장치(200)는 탑뷰 영상의 특징점을 라인 피팅함으로써 차선의 방정식을 설정할 수 있다. 라인 피팅을 위해 LMS(least mean square) 알고리즘이 이용될 수 있고, 기재된 실시예로 한정되지 않는다. 산출되는 차선의 방정식은 직선의 방정식일 수 있고, 직선이 아닌 다차원의 방정식일 수 있다. 차선의 방정식이 직선의 방정식인 경우, 아래의 [수학식 1]로 표현될 수 있다.The electronic device 200 may set an equation of a lane by line fitting the feature points of the top view image. For line fitting, a least mean square (LMS) algorithm may be used and is not limited to the described embodiment. The calculated lane equation may be a straight line, or a multidimensional equation other than a straight line. When the equation of the lane is the equation of a straight line, it can be expressed by [Equation 1] below.

[수학식 1][Equation 1]

Figure pat00001
Figure pat00001

[수학식 1]에서, a는 좌측 차선의 경사도(Gl), 및 우측 차선의 경사도(Gr)를 나타내는 경사도(Gl, Gr)이고, b는 차선의 y 절편, (x, y)는 차선의 좌표점을 나타낸다. [수학식 1]의 x와 y 값은 탑뷰 영상으로부터 획득되는 값들이고, 상기의 값들로부터 a와 b를 결정하는 것이 방정식 산출의 목표이다. x와 y 값에 기초하여 라인 피팅을 적용함으로써 a와 b가 결정될 수 있다.In the formula 1], a is the slope (G l, G r) represents the gradient (G l), and the gradient (G r) of the right lane to the left lane, b is the y intercept of the lane, (x, y ) Represents the coordinate point of the lane. The x and y values of [Equation 1] are values obtained from the top-view image, and the goal of calculating the equation is to determine a and b from the above values. A and b may be determined by applying line fitting based on the x and y values.

차선의 방정식은 탑뷰 영상들의 각각에 대해 계산될 수 있다. 예를 들어, 전방 영상에 대한 탑뷰 영상에 대한 차선의 방정식이 계산되고, 후방 영상에 대한 탑뷰 영상에 대한 차선의 방정식이 계산되고, 좌측 영상에 대한 탑뷰 영상에 대한 차선의 방정식이 계산되고, 우측 영상에 대한 탑뷰 영상에 대한 차선의 방정식이 계산될 수 있다.A suboptimal equation can be calculated for each of the top view images. For example, the equation of the lane for the top view image for the front image is calculated, the equation for the lane for the top view image for the rear image is calculated, the equation for the lane for the top view image for the left image is calculated, and the right A lane equation for the top-view image for the image may be calculated.

단계(350)에서, 전자 장치(200)는 산출된 차선의 방정식과 차선 폭을 이용하여 새로운 외부 파라미터를 추정한다. 외부 파라미터를 추정하는 방법에 대해 도 5를 참조하여 설명된다. 일 측면에 따르면, 단계(350)는 도 5의 단계들(510 내지 540)을 포함할 수 있다.In step 350, the electronic device 200 estimates a new external parameter using the calculated lane equation and lane width. A method of estimating an external parameter will be described with reference to FIG. 5. According to one aspect, step 350 may include steps 510 to 540 of FIG. 5.

단계(510)를 통해, 전방 카메라 및 후방 카메라 각각의 피치(Rx), 요(Ry), 롤(Rz)이 각각 계산된다. 일 측면에 따르면, 단계(510)는 단계들(511, 512, 513, 514)을 포함할 수 있다.Through step 510, the pitch (R x ), yaw (R y ), and roll (R z ) of each of the front and rear cameras are calculated, respectively. According to one aspect, step 510 may include steps 511, 512, 513, and 514.

단계들(511, 513)에서, 전자 장치(200)는 전방 카메라 및 후방 카메라 각각의 피치(Rx), 요(Ry), 롤(Rz)이 정확한지 여부를 판단할 수 있다. 피치(Rx)에 대해서는 도 6을 참조하여 설명되고, 요(Ry)에 대해서는 도 7을 참조하여 설명되고, 롤(Rz)에 대해서는 도 8을 참조하여 설명된다.In steps 511 and 513, the electronic device 200 may determine whether the pitch (R x ), yaw (R y ), and roll (R z ) of each of the front and rear cameras are correct. The pitch R x is described with reference to FIG. 6, the yaw R y is described with reference to FIG. 7, and the roll R z is described with reference to FIG. 8.

도 6은 차량의 전방 카메라의 피치(Rx)와 후방 카메라의 피치(Rx)가 틀어진 경우를 나타낸다. 도 6의 좌측 그림은 전방 카메라 및 후방 카메라의 피치(Rx)가 실제 기준 값인 ground truth 값 보다 작은 경우이고, 도 6의 우측 그림은 전방 카메라 및 후방 카메라의 피치(Rx)가 실제 기준 값인 ground truth 값 보다 큰 경우이다.6 shows a case where the pitch (R x) of the front camera of the vehicle pitch (R x) and the rear camera is twisted. Left figure of FIG. 6 is a front camera and a pitch (R x) of the rear camera is smaller than the value of the actual reference ground truth values, also the right side illustration of a 6 value of the pitch (R x) of the front camera and the rear camera, the actual reference This is the case that is greater than the ground truth value.

여기서 측면 차선을 기준으로 차선의 기울기를 계산하면 결과 값이 각각 +와 -로 나타나게 되는 것을 표시하였다. 즉, 탑뷰 영상 상에서 전방 카메라 및 후방 카메라의 피치(Rx)가 부정확한 경우에 차선의 기울기가 +와 -로 나타나는 것이고, 전방 카메라 및 후방 카메라의 피치(Rx)가 정확한 경우에 왼쪽 차선의 경사도의 역수(1/Gl) = 오른쪽 차선의 경사도의 역수(1/Gr)로 나타난다.Here, when the slope of the lane is calculated based on the side lane, it is indicated that the result values are displayed as + and-respectively. In other words, when the pitch (R x ) of the front and rear cameras is incorrect on the top view image, the slope of the lane appears as + and -, and when the pitch (R x ) of the front and rear cameras is correct, It is expressed as the reciprocal of the slope (1/G l ) = the reciprocal of the slope of the right lane (1/G r ).

도 7은 차량의 전방 카메라의 요(Ry) 및 후방 카메라의 요(Ry)가 틀어진 경우를 나타낸다. 도 7의 좌측 그림은 전방 카메라 의 요(Ry) 및 후방 카메라의 요(Ry)가 실제 기준값인 ground truth 값 보다 큰 경우이고, 도 7의 우측 그림은 전방 카메라 및 후방 카메라의 요(Ry)가 실제 기준값인 ground truth 값 보다 작은 경우이다. 여기서 차량의 위쪽에 나타나는 차선의 폭과 및 아래에서 나타나는 차선의 폭이 서로 다른 것을 알 수 있다.7 shows a case I (R y) of I (R y) and a rear camera of the front camera of the vehicle is twisted. The left figure of FIG. 7 is a case where the yaw (R y ) of the front camera and the yaw (R y ) of the rear camera are larger than the ground truth value, which is an actual reference value, and the right figure of FIG. 7 shows the yaw (R y ) of the front camera and the rear camera. This is the case where y ) is less than the actual ground truth value. Here, it can be seen that the width of the lane appearing above the vehicle and the width of the lane appearing below are different from each other.

도 8은 차량의 전방 카메라의 롤(Rz) 및 후방 카메라의 롤(Rz)이 틀어진 경우를 나타낸다. 도 8의 좌측 그림은 전방 카메라의 롤(Rz) 및 후방 카메라의 롤(Rz)이 실제 기준값인 ground truth 값 보다 큰 경우이고, 도 8의 우측 그림은 전방 카메라 및 후방 카메라의 롤(Rz)이 실제 기준값인 ground truth 값 보다 작은 경우이다. 여기서 전방 카메라의 롤(Rz) 및 후방 카메라의 롤(Rz)이 틀어진 경우에는 (1/Gl)과 (1/Gr)의 부호와 크기가 동일하게 나타나고, 정확한 경우에는 (1/Gl) + (1/Gr)은 0에 가깝게 나타난다.8 shows a case where the front camera rolls (R z) of (R z), and a rear camera of the vehicle is twisted. Left figure of Figure 8 is the roll of the front camera (R z), and the rear camera roll (R z) of the actual reference value of a is greater than ground truth values, and the right figure of Figure 8 is a front camera and a rear camera roll (Rz of ) Is less than the actual ground truth value. Here, if the roll of the front camera (R z ) and the roll of the rear camera (R z ) are wrong, the sign and size of (1/G l ) and (1/G r ) appear the same, and if it is correct, (1/ G l ) + (1/Gr ) appears close to zero.

단계들(512, 514)에서, 전자 장치(200)는 전방 카메라의 피치(Rx), 요(Ry), 롤(Rz)이 정확하지 않은 경우, 전방 카메라의 피치(Rx), 요(Ry), 롤(Rz)를 다시 계산한다.In steps 512 and 514, the electronic device 200 is the pitch (R x), I (R y), roll (R z), of the front camera pitch (R x), if this is not correct for the front camera, The yaw (R y ) and the roll (R z ) are recalculated.

전방 카메라 및 후방 카메라의 새로운 피치(Rx)는 아래의 [수학식 2]에 기초하여 계산될 수 있다.The new pitch (R x ) of the front camera and the rear camera may be calculated based on [Equation 2] below.

[수학식 2][Equation 2]

Figure pat00002
Figure pat00002

[수학식 2]에서, New Rx는 새로운 전방 또는 후방 카메라의 피치이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, Gl는 왼쪽 차선의 경사도이고, Gr는 오른쪽 차선의 경사도이다. 즉, 1/Gl = 1/Gr 가 만족될 때까지, 새로운 피치(New Rx)가 수정될 수 있다.In [Equation 2], New R x is the pitch of the new front or rear camera, α is an arbitrary constant value that can be specified by the user, G l is the slope of the left lane, and G r is the slope of the right lane. . That is, until 1/G l = 1/G r is satisfied, the new pitch (New R x ) may be modified.

전방 카메라 및 후방 카메라의 새로운 요(Ry)는 아래의 [수학식 3]에 기초하여 계산될 수 있다.The new yaw (R y ) of the front camera and the rear camera may be calculated based on [Equation 3] below.

[수학식 4][Equation 4]

Figure pat00003
Figure pat00003

[수학식 4]에서, New Ry는 새로운 전방 또는 후방 카메라의 요이고, Pre Ry는 현재의 전방 또는 후방 카메라의 요이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, Wl는 왼쪽 차선의 폭이고, Wr는 오른쪽 차선의 폭이다.In [Equation 4], New R y is the yaw of the new front or rear camera, Pre R y is the yaw of the current front or rear camera, α is an arbitrary constant value that can be specified by the user, and W l is Is the width of the left lane, and W r is the width of the right lane.

New Ry와 Pre Ry가 동일해질 때까지(즉, Wl = Wr ), 새로운 요(New Ry)가 수정될 수 있다.Until New R y and Pre R y become the same (ie, W l = W r ), a new yaw (New R y ) may be modified.

전방 카메라 및 후방 카메라의 새로운 롤(Rz)는 아래의 [수학식 5]에 기초하여 계산될 수 있다.A new roll (R z ) of the front camera and the rear camera may be calculated based on [Equation 5] below.

[수학식 5][Equation 5]

Figure pat00004
Figure pat00004

[수학식 5]에서, New Rz는 새로운 전방 또는 후방 카메라의 롤이고, Pre Ry는 현재의 전방 도는 후방 카메라의 롤이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, Gl는 왼쪽 차선의 경사도이고, Gr는 오른쪽 차선의 경사도이다.In [Equation 5], New R z is the roll of the new front or rear camera, Pre R y is the roll of the current front or rear camera, α is an arbitrary constant value that can be specified by the user, and G l is It is the slope of the left lane, and G r is the slope of the right lane.

New Rz와 Pre Rz가 동일해질 때까지(즉, 1/Gl + 1/Gr=0), 새로운 롤(New Rz)이 수정될 수 있다.Until New R z and Pre R z become the same (i.e., 1/G l + 1/G r = 0), a new roll (New R z ) can be modified.

전방 카메라 및 후방 카메라의 피치(Rx), 요(Ry), 롤(Rz)가 다시 계산된 경우, 전자 장치(200)는 계산된 피치(Rx), 요(Ry), 롤(Rz)에 기초하여 전방 카메라 및 후방 카메라에 의해 촬영된 각각의 영상을 탑뷰 영상으로 다시 변환하고(즉, 단계(330)의 재수행), 변환된 탑뷰 영상에 기초하여 차선의 방정식 및 차선 폭을 다시 계산한다. 이 후에, 단계들(511 내지 514)가 재수행될 수 있다.When the pitch (R x ), yaw (R y ), and roll (R z ) of the front and rear cameras are recalculated, the electronic device 200 calculates the calculated pitch (R x ), yaw (R y ), and roll. Each image captured by the front and rear cameras based on (R z ) is converted back to a top view image (i.e., re-performed in step 330), and an equation of a lane and a lane based on the converted top view image Recalculate the width. After this, steps 511 to 514 may be performed again.

단계(520)를 통해, 후방 카메라의 위치 이동(Tz)이 계산된다. 일 측면에 따르면, 단계(520)는 단계들(521, 522)을 포함할 수 있다.Through step 520, the position movement (T z ) of the rear camera is calculated. According to one aspect, step 520 may include steps 521 and 522.

단계(521)에서, 전자 장치(200)는 후방 카메라의 위치 이동(Tz)이 정확한지 여부를 판단할 수 있다. 후방 카메라의 위치 이동(Tz)이 정확한지 여부를 판단하는 방법이 도 9를 참조하여 상세히 설명된다.In step 521, the electronic device 200 may determine whether the position movement (T z ) of the rear camera is correct. A method of determining whether the position movement T z of the rear camera is correct will be described in detail with reference to FIG. 9.

도 9는 차량의 후방 카메라의 위치 이동(Tz)이 틀어진 경우를 나타낸다. 도 9의 좌측 그림은 후방 카메라의 위치 이동(Tz)이 실제 기준 값인 ground truth 값 보다 큰 경우이고, 도 9의 우측 그림은 후방 카메라의 위치 이동(Tz)이 실제 기준 값인 ground truth 값 보다 작은 경우이다. 여기서 후방 카메라의 위치 이동(Tz)이 틀어진 경우 차량의 전방 차로의 차선 간의 폭과 후방 차로의 차선 간의 폭이 다르게 나타나고 정확한 경우에는 동일하게 나타난다.9 shows a case where the position movement (T z ) of the rear camera of the vehicle is wrong. The left figure of FIG. 9 is a case where the rear camera position movement (T z ) is greater than the actual reference value, the ground truth value, and the right figure of FIG. 9 shows the rear camera position movement (T z ) than the actual reference value, the ground truth value. It is a small case. Here, when the position movement (Tz) of the rear camera is wrong, the width between the lanes of the vehicle's front lane and the lanes of the rear lane appear different, and in the case of being correct, they appear the same.

단계(522)에서, 전자 장치(200)는 후방 카메라의 위치 이동(Tz)이 정확하지 않은 경우, 후방 카메라의 위치 이동(Tz)을 다시 계산한다.In step 522, when the position movement T z of the rear camera is not accurate, the electronic device 200 recalculates the position movement T z of the rear camera.

후방 카메라의 새로운 위치 이동(Tz)는 아래의 [수학식 6]에 기초하여 계산될 수 있다.The new positional movement (T z ) of the rear camera may be calculated based on [Equation 6] below.

[수학식 6][Equation 6]

Figure pat00005
Figure pat00005

[수학식 6]에서, New Tz는 새로운 후방 카메라의 위치 이동이고, Pre Tz는 현재의 후방 카메라의 위치 이동이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, Cf는 전방의 왼쪽 차선과 우측 차선 사이의 폭이고, Cr는 후방의 왼쪽 차선과 우측 차선 사이의 폭이다. In [Equation 6], New T z is the position movement of the new rear camera, Pre T z is the current position movement of the rear camera, α is an arbitrary constant value that can be specified by the user, and C f is the forward position. It is the width between the left and right lanes, and C r is the width between the rear left and right lanes.

New Tz와 Pre Tz가 동일해질 때까지(즉, Cf = Cr), 새로운 위치 이동(New Tz)이 수정될 수 있다.Until New T z and Pre T z become the same (ie, C f = C r ), the new position movement (New T z ) may be corrected.

단계(530)를 통해, 좌측 카메라 및 우측 카메라의 위치 이동(Tz)이 계산된다. 일 측면에 따르면, 단계(520)는 단계들(521, 522)을 포함할 수 있다.Through step 530, the position movement (T z ) of the left and right cameras is calculated. According to one aspect, step 520 may include steps 521 and 522.

단계(521)에서, 전자 장치(200)는 후방 카메라의 피치(Rx), 요(Ry), 롤(Rz), 위치 이동(Tz)이 정확한지 여부를 판단할 수 있다. 피치(Rx)에 대해서는 도 10을 참조하여 설명되고, 요(Ry)에 대해서는 도 11을 참조하여 설명되고, 롤(Rz)에 대해서는 도 12을 참조하여 설명되고, 위치 이동(Tz)에 대해서는 도 12를 참조하여 설명된다.In step 521, the electronic device 200 may determine whether the pitch (R x ), yaw (R y ), roll (R z ), and position movement (T z ) of the rear camera are correct. The pitch (R x ) is described with reference to FIG. 10, the yaw (R y ) is described with reference to FIG. 11, the roll (R z ) is described with reference to FIG. 12, and the positional movement (T z ) Will be described with reference to FIG. 12.

도 10은 차량의 좌측 카메라 및 우측 카메라의 피치(Rx)가 틀어진 경우를 나타낸다. 도 10의 좌측 그림은 좌측 카메라 및 우측 카메라의 피치(Rx)가 실제 기준값인 ground truth 값 보다 큰 경우이고, 도 10의 우측 그림은 좌측 카메라 및 우측 카메라의 피치(Rx)가 실제 기준값인 ground truth 값 보다 작은 경우이다. 여기서, 좌측 카메라 및 우측 카메라의 피치(Rx)가 틀어진 경우 차량의 전방과 후방에 위치하는 차선과 차량의 좌측과 우측에 위치하는 차선이 하나의 직선 위에 존재하지 않고 어긋나게 나타나고, 정확한 경우에는 하나의 직선 위에 존재하게 된다. 10 shows a case where the pitches (R x ) of the left and right cameras of the vehicle are wrong. The left picture of FIG. 10 is a case where the pitch (R x ) of the left and right cameras is greater than the ground truth value, which is the actual reference value, and the right picture of FIG. 10 shows the pitch (R x ) of the left and right cameras is the actual reference value. It is less than the ground truth value. Here, when the pitch (R x ) of the left and right cameras is wrong, the lanes located in the front and rear of the vehicle and the lanes located on the left and right of the vehicle do not exist on one straight line, but appear to deviate. It exists on the straight line of

도 11은 차량의 좌측 카메라 및 우측 카메라의 요(Ry)가 틀어진 경우를 나타낸다. 도 11의 좌측 그림은 좌측 카메라 및 우측 카메라의 요(Ry)가 실제 기준 값인 ground truth 값 보다 큰 경우이고, 도 11의 우측 그림은 좌측 카메라 및 우측 카메라의 요(Ry)가 실제 기준 값인 ground truth 값 보다 작은 경우이다. 여기서 좌측 카메라 및 우측 카메라의 요(Ry)가 정확한 경우에는 (X22-X11)과 (X66-X55)가 동일하거나, (X44-X33)과 (X88-X77)이 동일하게 된다.11 shows a case where the yaw (R y ) of the left and right cameras of the vehicle is wrong. The left figure of FIG. 11 is a case where the yaw (R y ) of the left and right cameras is greater than the ground truth value, which is the actual reference value, and the right figure of FIG. 11 shows the yaw (R y ) of the left and right cameras is the actual reference value. It is less than the ground truth value. Here, if the yaw (R y ) of the left and right cameras is correct, (X 22 -X 11 ) and (X 66- X 55 ) are the same, or (X 44 -X 33 ) and (X 88 -X 77 ) Becomes the same.

도 12는 차량의 좌측 카메라 및 우측 카메라의 롤(Rz)이 틀어진 경우를 나타낸다. 도 12의 좌측 그림은 좌측 카메라 및 우측 카메라의 롤(Rz)이 실제 기준 값인 ground truth 값 보다 큰 경우이고, 도 12의 우측 그림은 좌측 카메라 및 우측 카메라의 롤(Rz)이 실제 기준 값인 ground truth 값 보다 작은 경우이다. 여기서 좌측 카메라 및 우측 카메라의 롤(Rz)이 틀어진 경우에는 1/Gl, 1/Gr이 큰 값을 가지고, 롤(Rz)이 정확한 경우에는 1/Gl과 1/Gr이 '0'에 가깝게 나타나게 된다.12 shows a case in which the rolls R z of the left and right cameras of the vehicle are misaligned. Left figure is a roll of the left camera and right camera of Fig. 12 (R z) of the actual reference value of ground is greater than the truth values, and the right illustration in Figure 12 is the value of the actual reference roll (R z) of the left camera and right camera It is less than the ground truth value. Here, if the rolls (R z ) of the left and right cameras are wrong, 1/G l and 1/G r have a large value, and if the roll (R z ) is correct, 1/G l and 1/G r are It will appear close to '0'.

도 13은 차량의 좌측 카메라 및 우측 카메라의 위치 이동(Tz)이 틀어진 경우를 나타낸다. 도 13의 좌측 그림은 좌측 카메라 및 우측 카메라의 위치 이동(Tz)이 실제 기준 값인 ground truth 값 보다 큰 경우이고, 도 12의 우측 그림은 좌측 카메라 및 우측 카메라의 위치 이동(Tz)이 실제 기준 값인 ground truth 값 보다 작은 경우이다. 여기서 좌측 카메라 및 우측 카메라의 위치 이동(Tz)이 정확한 경우에는 차량의 전후방 차선의 폭과 차량의 좌우측 차선의 폭이 동일하게 나타나게 된다. 13 shows a case where the position movement (T z ) of the left and right cameras of the vehicle is wrong. The left figure of FIG. 13 is a case where the position movement (T z ) of the left and right cameras is greater than the ground truth value, which is an actual reference value, and the right figure of FIG. 12 shows the position movement (T z ) of the left and right cameras. It is less than the reference value of ground truth. Here, when the positional movement (T z ) of the left and right cameras is correct, the width of the front and rear lanes of the vehicle and the width of the left and right lanes of the vehicle are the same.

단계들(534)에서, 전자 장치(200)는 좌측 카메라 및 우측 카메라의 피치(Rx), 요(Ry), 롤(Rz), 위치 이동(Tz)이 정확하지 않은 경우, 좌측 카메라 및 우측 카메라의 피치(Rx), 요(Ry), 롤(Rz), 위치 이동(Tz)을 다시 계산한다.In steps 534, if the pitch (R x ), yaw (R y ), roll (R z ), and position movement (T z ) of the left and right cameras are not correct, the electronic device 200 The pitch (R x ), yaw (R y ), roll (R z ), and position movement (T z ) of the camera and the right camera are recalculated.

좌측 카메라의 피치(Rx)는 아래의 [수학식 7]에 기초하여 계산될 수 있다.The pitch (R x ) of the left camera may be calculated based on [Equation 7] below.

[수학식 7][Equation 7]

Figure pat00006
Figure pat00006

[수학식 7]에서, LeftCameraNew Rx는 새로운 좌측 카메라의 피치이고, LeftCameraPre Rx는 현재의 좌측 카메라의 피치이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, x1는 전방 차로 좌측 차선의 좌측 x좌표이고, x2는 전방 차로 좌측 차선의 우측 x좌표이고, x5는 후방 차로 좌측 차선의 좌측 x좌표이고, x6는 후방 차로 좌측 차선의 우측 x좌표이다. LeftCameraNew Rx와 LeftCameraPre Rx가 동일해질 때까지(즉, x2+ x6= x1+ x5), 새로운 좌측 카메라의 피치가 계산된다.In [Equation 7], LeftCameraNew R x is the pitch of the new left camera, LeftCameraPre R x is the pitch of the current left camera, α is an arbitrary constant value that can be specified by the user, and x 1 is the left lane of the front lane Is the left x-coordinate of, x 2 is the right x-coordinate of the left lane of the front lane, x 5 is the left x-coordinate of the left lane of the rear lane, and x 6 is the right x-coordinate of the left lane of the rear lane. Until LeftCameraNew R x and LeftCameraPre R x are equal (ie x 2 + x 6 = x 1 + x 5 ), the pitch of the new left camera is calculated.

우측 카메라의 피치(Rx)는 아래의 [수학식 8]에 기초하여 계산될 수 있다.The pitch (R x ) of the right camera may be calculated based on [Equation 8] below.

[수학식 8][Equation 8]

Figure pat00007
Figure pat00007

[수학식 8]에서, RightCameraNew Rx는 새로운 우측 카메라의 피치이고, RightCameraPre Rx는 현재의 우측 카메라의 피치이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, x3은 전방 차로 우측 차선의 좌측 x좌표이고, x4는 전방 차로 우측 차선의 우측 x좌표이고, x7은 후방 차로 우측 차선의 좌측 x좌표이고, x8은 후방 차로 우측 차선의 우측 x좌표이다. RightCameraNew Rx와 RightCameraPre Rx가 동일해질 때까지(즉, x3+ x7= x4+ x8), 새로운 우측 카메라의 피치가 계산된다.In [Equation 8], RightCameraNew R x is the pitch of the new right camera, RightCameraPre R x is the pitch of the current right camera, α is an arbitrary constant value that can be specified by the user, and x 3 is the right lane of the front lane Is the left x-coordinate of, x 4 is the right x-coordinate of the right lane of the front lane, x 7 is the left x-coordinate of the right lane of the rear lane, and x 8 is the right x-coordinate of the right lane of the rear lane. Until RightCameraNew R x and RightCameraPre R x are equal (ie x 3 + x 7 = x 4 + x 8 ), the pitch of the new right camera is calculated.

좌측 카메라의 요(Ry)는 아래의 [수학식 9]에 기초하여 계산될 수 있다.The yaw (R y ) of the left camera may be calculated based on [Equation 9] below.

[수학식 9][Equation 9]

Figure pat00008
Figure pat00008

[수학식 9]에서, LeftCameraNew Ry는 새로운 좌측 카메라의 요이고, LeftCameraPre Ry는 현재의 좌측 카메라의 요이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, x11는 전방 차로 좌측 차선의 좌측 x좌표, x22는 전방 차로 좌측 차선의 우측 x좌표이고, x55는 후방 차로 좌측 차선의 좌측 x좌표이고, x66는 후방 차로 좌측 차선의 우측 x좌표이다. LeftCameraNew Ry와 LeftCameraPre Ry가 동일해질 때까지(즉, x22- x11= x66- x55), 새로운 좌측 카메라의 요가 계산된다.In [Equation 9], LeftCameraNew R y is the yaw of the new left camera, LeftCameraPre R y is the yaw of the current left camera, α is an arbitrary constant value that can be specified by the user, and x 11 is the left lane of the front lane. X-coordinate of the left side, x 22 is the right x-coordinate of the left lane of the front lane, x 55 is the left x-coordinate of the left lane of the rear lane, and x 66 is the right x-coordinate of the left lane of the rear lane. Until LeftCameraNew R y and LeftCameraPre R y are equal (i.e. x 22 -x 11 = x 66 -x 55 ), the yoga of the new left camera is calculated.

우측 카메라의 요(Ry)는 아래의 [수학식 10]에 기초하여 계산될 수 있다.The yaw (R y ) of the right camera may be calculated based on [Equation 10] below.

[수학식 10][Equation 10]

Figure pat00009
Figure pat00009

[수학식 10]에서, RightCameraNew Ry는 새로운 우측 카메라의 요이고, RightCameraPre Ry는 현재의 우측 카메라의 요이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, x33은 전방 차로 우측 차선의 좌측 x좌표이고, x44는 전방 차로 우측 차선의 우측 x좌표이고, x77은 후방 차로 우측 차선의 좌측 x좌표이고, x88은 후방 차로 우측 차선의 우측 x좌표이다. RightCameraNew Ry와 RightCameraPre Ry가 동일해질 때까지(즉, x44-x33= x88-x77), 새로운 우측 카메라의 피치가 계산된다.In [Equation 10], RightCameraNew R y is the yaw of the new right camera, RightCameraPre R y is the yaw of the current right camera, α is an arbitrary constant value that can be specified by the user, and x 33 is the right lane of the front lane. Is the left x-coordinate of, x 44 is the right x-coordinate of the right lane of the front lane, x 77 is the left x-coordinate of the right lane of the rear lane, and x 88 is the right x-coordinate of the right lane of the rear lane. Until RightCameraNew R y and RightCameraPre R y are equal (i.e. x 44 -x 33 = x 88 -x 77 ), the pitch of the new right camera is calculated.

좌측 카메라의 롤(Rz)은 아래의 [수학식 11]에 기초하여 계산될 수 있다.The roll (R z ) of the left camera may be calculated based on [Equation 11] below.

[수학식 11][Equation 11]

Figure pat00010
Figure pat00010

[수학식 11]에서, LeftCameraNew Rz는 새로운 좌측 카메라의 롤이고, LeftCameraPre Rz는 현재의 좌측 카메라의 롤이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, Gl는 왼쪽 차선의 기울기이다. LeftCameraNew Rz와 LeftCameraPre Rz가 동일해질 때까지(즉, 1/Gl = 0), 새로운 좌측 카메라의 롤이 계산된다.In [Equation 11], LeftCameraNew R z is the roll of the new left camera, LeftCameraPre R z is the roll of the current left camera, α is an arbitrary constant value that can be specified by the user, and G l is the slope of the left lane to be. Until LeftCameraNew R z and LeftCameraPre R z are equal (i.e. 1/G l = 0), the roll of the new left camera is calculated.

우측 카메라의 롤(Rz)은 아래의 [수학식 12]에 기초하여 계산될 수 있다.The roll (R z ) of the right camera may be calculated based on [Equation 12] below.

[수학식 12][Equation 12]

Figure pat00011
Figure pat00011

[수학식 12]에서, RightCameraNew Rz는 새로운 우측 카메라의 롤이고, RightCameraNew Rz는 현재의 우측 카메라의 롤이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, Gr은 우측 차선의 기울기이다. RightCameraNew Rz와 RightCameraNew Rz가 동일해질 때까지(즉, 1/Gr = 0), 새로운 우측 카메라의 롤이 계산된다.In [Equation 12], RightCameraNew R z is the roll of the new right camera, RightCameraNew R z is the roll of the current right camera, α is an arbitrary constant value that can be specified by the user, and G r is the slope of the right lane to be. Until RightCameraNew R z and RightCameraNew R z are equal (i.e. 1/G r = 0), the roll of the new right camera is calculated.

좌측 카메라의 위치 이동(Tz)은 아래의 [수학식 13에 기초하여 계산될 수 있다.The positional movement (T z ) of the left camera may be calculated based on Equation 13 below.

[수학식 13][Equation 13]

Figure pat00012
Figure pat00012

[수학식 13]에서, LeftCameraNew Tz는 새로운 좌측 카메라의 위치 이동이고, LeftCameraPre Tz는 현재의 좌측 카메라의 위치 이동이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, x111는 전방 차로 좌측 차선의 좌측 x좌표, x222는 전방 차로 좌측 차선의 우측 x좌표이고, x555는 좌측 차선의 좌측 x좌표이고, x666는 좌측 차선의 우측 x좌표이고, x999는 후방 차로 좌측 차선의 좌측 x좌표이고, x10는 후방 차로 좌측 차선의 우측 x좌표이이다. LeftCameraNew Tz와 LeftCameraPre Tz가 동일해질 때까지(즉, (x222- x111)/2= x666- x555), 새로운 좌측 카메라의 위치 이동이 계산된다.In [Equation 13], LeftCameraNew T z is the movement of the new left camera, LeftCameraPre T z is the movement of the current left camera, α is an arbitrary constant value that can be specified by the user, and x 111 is the forward lane The left x-coordinate of the left lane, x 222 is the right x-coordinate of the left lane, x 555 is the left x-coordinate of the left lane, x 666 is the right x-coordinate of the left lane, and x 999 is the left side of the left lane. The x-coordinate on the left is the x-coordinate, and x 10 is the x-coordinate on the right of the left lane by the rear lane. Until LeftCameraNew T z and LeftCameraPre T z become the same (ie (x 222 -x 111 )/2= x 666 -x 555 ), the position movement of the new left camera is calculated.

우측 카메라의 위치 이동(Tz)는 아래의 [수학식 14]에 기초하여 계산될 수 있다.The positional movement (T z ) of the right camera may be calculated based on [Equation 14] below.

[수학식 14][Equation 14]

Figure pat00013
Figure pat00013

[수학식 14]에서, RightCameraNew Tz는 새로운 우측 카메라의 위치 이동이고, RightCameraPre Tz는 현재의 우측 카메라의 위치 이동이고, α는 사용자가 지정할 수 있는 임의의 상수 값이고, x333은 전방 차로 우측 차선의 좌측 x좌표이고, x444는 전방 차로 우측 차선의 우측 x좌표이고, x777은 우측 차선의 좌측 x좌표이고, x888은 우측 차선의 우측 x좌표이고, x11은 후방 차로 우측 차선의 좌측 x좌표이고, x12은 후방 차로 우측 차선의 우측 x좌표이다. RightCameraNew Tz와 RightCameraPre Tz가 동일해질 때까지(즉, ((x444-x333)+(x12-x11))/2 = x888- x777), 새로운 우측 카메라의 위치 이동이 계산된다.In [Equation 14], RightCameraNew T z is the position movement of the new right camera, RightCameraPre T z is the current position movement of the right camera, α is an arbitrary constant value that can be specified by the user, and x 333 is the forward lane The left x-coordinate of the right lane, x 444 is the right x-coordinate of the right lane, x 777 is the left x-coordinate of the right lane, x 888 is the right x-coordinate of the right lane, and x 11 is the right lane of the rear lane. Is the left x-coordinate of and x 12 is the right-hand x-coordinate of the right lane of the rear lane. Until RightCameraNew T z and RightCameraPre T z are equal (i.e. ((x 444 -x 333 )+(x 12 -x 11 ))/2 = x 888 -x 777 ), the position of the new right camera is calculated. do.

단계(540)에서, 전자 장치(200)는 카메라(240)의 적어도 하나의 롤(Rz)을 조정한다. 도 14 내지 도 19를 참조하여 카메라(240)의 적어도 하나의 롤(Rz)을 조정하는 방법이 설명된다.In step 540, the electronic device 200 adjusts at least one roll R z of the camera 240. A method of adjusting at least one roll R z of the camera 240 will be described with reference to FIGS. 14 to 19.

일 측면에 따르면, 초기 롤(Rz)과 단계들(510 내지 530)을 통해 계산된 롤(Rz) 간의 차이를 채널 별로 계산하고, 계산된 차이들이 모두 거의 0 또는 유사한 경우에는 단계(540)가 수행되지 않을 수 있다. 예를 들어, 계산된 차이들이 모두 거의 0인 경우는 계산된 Rz가 비교적 정확하고, 차량과 차선이 평행한 경우일 수 있다. 다른 예로, 계산된 차이가 유사한 경우는 계산된 Rz가 비교적 정확하고, 차량과 차선이 평행하지 않은 경우일 수 있다. 차이는 채널 별로 다를 수 있다.According to one aspect, the difference between the initial roll R z and the roll R z calculated through the steps 510 to 530 is calculated for each channel, and if all the calculated differences are almost zero or similar, step 540 ) May not be performed. For example, if all of the calculated differences are almost zero, the calculated R z may be relatively accurate, and the vehicle and the lane may be parallel. As another example, when the calculated difference is similar, the calculated R z may be relatively accurate, and the vehicle and the lane may not be parallel. The difference may vary from channel to channel.

즉, 차량과 차선이 평행하지 않은 상태에서 계산된 Rz가 정확하지 않은 경우, 단계(540)가 수행될 수 있다. 도 17을 참조하면, 실제는 차량과 차선이 평행하지 않지만, 단계들(510 내지 530)을 통해 계산된 Rz를 이용하여 생성된 영상(1700)에는 전방 차선들(1710), 우측 차선(1720), 좌측 차선(1730) 및 후방 차선들(1740)이 차량과 평행하도록 나타날 수 있다. 차선들(1710 내지 1740)이 모두 연결되도록 Rz가 다시 계산되어야 한다.That is, when R z calculated in a state in which the vehicle and the lane are not parallel, step 540 may be performed. Referring to FIG. 17, although the vehicle and the lane are not actually parallel, the image 1700 generated using R z calculated through steps 510 to 530 includes front lanes 1710 and right lane 1720. ), the left lane 1730 and the rear lanes 1740 may appear parallel to the vehicle. R z must be recalculated so that all lanes 1710 to 1740 are connected.

도 14를 참조하면, 단계(540)는 아래의 단계들(1410 내지 1440)을 포함할 수 있다.Referring to FIG. 14, step 540 may include the following steps 1410 to 1440.

단계(1410)에서, 전자 장치(200)는 카메라의(240)의 채널들(예를 들어, 4개의 채널들) 각각에 대해, 초기 Rz와 단계들(510 내지 530)을 통해 계산된 Rz와 간의 제1 차이(first difference)를 계산한다. 초기 Rz는 초기 값으로 설정된 값일 수 있다. 각각의 카메라에 의해 획득되는 정보가 채널로서 정의될 수 있다.In step 1410, the electronic device 200 for each of the channels (eg, four channels) of the camera 240, the initial R z and R calculated through the steps 510 to 530 Compute the first difference between z and. The initial R z may be a value set as an initial value. The information acquired by each camera can be defined as a channel.

단계(1420)에서, 전자 장치(200)는 계산된 제1 차이들의 제1 차이 평균을 계산한다.In step 1420, the electronic device 200 calculates a first difference average of the calculated first differences.

단계(1430)에서, 전자 장치(200)는 제1 차이 평균이 미리 설정된 제1 평균 임계치를 초과하는지 여부를 결정한다.In step 1430, the electronic device 200 determines whether the first difference average exceeds a preset first average threshold.

제1 차이 평균이 제1 평균 임계치를 초과하는 경우, 카메라(240)의 채널들 중 일부의 채널의 초기 Rz에 오차가 있는 것이므로, 해당하는 채널의 계산된 Rz는 Rz를 조정하기 위해 이용될 수 없다. 예를 들어, 전방 카메라의 채널에 대해 계산된 제1 차이가 다른 채널들의 제1 차이보다 큰 경우, 전방 카메라의 채널의 계산된 Rz가 배제될 수 있다.When the first difference average exceeds the first average threshold, since there is an error in the initial R z of some of the channels of the camera 240, the calculated R z of the corresponding channel is to adjust R z Cannot be used. For example, when the first difference calculated for the channel of the front camera is larger than the first difference of other channels, the calculated R z of the channel of the front camera may be excluded.

제1 차이 평균이 제1 평균 임계치를 초과하지 않는 경우, 카메라(240)의 모든 채널들의 계산된 Rz들이 Rz를 조정하기 위해 이용될 수 있다..If the first difference average does not exceed the first average threshold, the calculated R z of all channels of the camera 240 may be used to adjust R z .

단계(1440)에서, 전자 장치(200)는 제1 차이 평균에 기초하여 채널들 각각의 Rz를 조정한다. 전방 카메라 및 후방 카메라의 Rz는 아래의 [수학식 15]를 이용하여 조정될 수 있다.In step 1440, the electronic device 200 adjusts R z of each of the channels based on the first difference average. R z of the front camera and the rear camera can be adjusted using [Equation 15] below.

[수학식 15][Equation 15]

Figure pat00014
Figure pat00014

[수학식 15]에서, PreRz는 단계들(510 내지 530)을 통해 계산된 전방 또는 후방 카메라의 Rz이고,

Figure pat00015
는 전체의 채널들에 대한 상기의 제1 차이 평균이고, NewRz는 조정된 Rz이다. [수학식 15]가 반복적으로 수행되는 경우, PreRz는 이전에 조정된 Rz이 될 수 있다.In [Equation 15], PreR z is R z of the front or rear camera calculated through steps 510 to 530,
Figure pat00015
Is the difference between the first average for the whole channel, NewR z is the adjusted R z. When [Equation 15] is repeatedly performed, PreR z may be previously adjusted R z .

전방 카메라 및 후방 카메라의 Rz를 조정한 후, 생성된 예시적인 영상은 도 18과 같다. 전방 카메라 및 후방 카메라의 Rz가 조정된 후의 영상 내의 전방 차선들 및 후방 차선들은 차량과 평행하지 않을 수 있다.After adjusting R z of the front and rear cameras, an exemplary image generated is as shown in FIG. 18. Front lanes and rear lanes in the image after R z of the front and rear cameras are adjusted may not be parallel to the vehicle.

좌측 카메라 및 우측 카메라의 Rz가 조정되지 않은 경우, 제1 포인트(1801)와 제3 포인트(1803)이 동일한 점으로 매칭되지 않고, 제2 포인트(1802)와 제5 포인트(1805)이 동일한 점으로 매칭되지 않고, 제4 포인트(1804)와 제7 포인트(1807)이 동일한 점으로 매칭되지 않으며, 제6 포인트(1806)와 제8 포인트(1808)이 동일한 점으로 매칭되지 않는다. 상기의 포인트들이 각각 매칭되도록 좌측 카메라 및 우측 카메라의 Rz이 조정될 수 있다. When R z of the left and right cameras are not adjusted, the first point 1801 and the third point 1803 are not matched to the same point, and the second point 1802 and the fifth point 1805 are the same. The points are not matched, the fourth point 1804 and the seventh point 1807 are not matched as the same point, and the sixth point 1806 and the eighth point 1808 are not matched as the same point. R z of the left camera and the right camera may be adjusted so that the above points are matched, respectively.

예를 들어, 영상 내의 포인트들이 매칭되도록 좌측 카메라 및 우측 카메라의 Rz이 조정될 수 있다. 예를 들어, 동일 차선 상에 위치하는 전방 좌측 차선의 포인트 및 좌측 차선의 포인트가 매칭되도록 좌측 카메라 및 우측 카메라의 Rz이 조정될 수 있다.For example, R z of the left and right cameras may be adjusted so that points in the image are matched. For example, R z of the left camera and the right camera may be adjusted so that the point of the front left lane and the point of the left lane located on the same lane match.

좌측 카메라의 Rz는 아래의 [수학식 16]을 이용하여 조정될 수 있다.R z of the left camera can be adjusted using the following [Equation 16].

[수학식 16][Equation 16]

Figure pat00016
Figure pat00016

[수학식 16]에서, LeftCameraPreRz는 단계들(510 내지 530)을 통해 계산된 좌측 카메라의 Rz이고, LeftCameraNewRz는 조정된 좌측 카메라의 Rz일 수 있다. [수학식 16]가 반복적으로 수행되는 경우, LeftCameraPreRz는 이전에 조정된 Rz이 될 수 있다.

Figure pat00017
,
Figure pat00018
는 각각 제1 포인트(1801)의 x 좌표 및 y 좌표이고,
Figure pat00019
,
Figure pat00020
는 각각 제7 포인트(1807)의 x 좌표 및 y 좌표이다.
Figure pat00021
,
Figure pat00022
는 각각 제3 포인트(1803)의 x 좌표 및 y 좌표이고,
Figure pat00023
,
Figure pat00024
는 제4 포인트(1804)의 x 좌표 및 y 좌표이다.In [Equation 16], LeftCameraPreR z may be R z of the left camera calculated through steps 510 to 530, and LeftCameraNewR z may be R z of the adjusted left camera. When [Equation 16] is repeatedly performed, LeftCameraPreRz may be previously adjusted R z .
Figure pat00017
,
Figure pat00018
Is the x coordinate and y coordinate of the first point 1801, respectively,
Figure pat00019
,
Figure pat00020
Is the x coordinate and y coordinate of the seventh point 1807, respectively.
Figure pat00021
,
Figure pat00022
Is the x coordinate and y coordinate of the third point 1803, respectively,
Figure pat00023
,
Figure pat00024
Is the x coordinate and y coordinate of the fourth point 1804.

LeftCameraPreRz 및 LeftCameraNewRz가 동일해지는 경우(즉,

Figure pat00025
이 0이 되는 경우), 좌측 카메라의 Rz 조정이 완료될 수 있다.If LeftCameraPreR z and LeftCameraNewR z become equal (i.e.
Figure pat00025
Is 0), the left camera's R z adjustment can be completed.

우측 카메라의 Rz는 아래의 [수학식 17]을 이용하여 조정될 수 있다.R z of the right camera can be adjusted using [Equation 17] below.

[수학식 17][Equation 17]

Figure pat00026
Figure pat00026

[수학식 17]에서, RightCameraPreRz는 단계들(510 내지 530)을 통해 계산된 우측 카메라의 Rz이고, RightCameraNewRz는 조정된 우측 카메라의 Rz일 수 있다. [수학식 17]이 반복적으로 수행되는 경우, RightCameraPreRz는 이전에 조정된 Rz이 될 수 있다.

Figure pat00027
,
Figure pat00028
는 각각 제2 포인트(1802)의 x 좌표 및 y 좌표이고,
Figure pat00029
,
Figure pat00030
는 각각 제8 포인트(1808)의 x 좌표 및 y 좌표이다.
Figure pat00031
,
Figure pat00032
는 각각 제5 포인트(1805)의 x 좌표 및 y 좌표이고,
Figure pat00033
,
Figure pat00034
는 각각 제6 포인트(1806)의 x 좌표 및 y 좌표이다.In [Equation 17], RightCameraPreR z may be R z of the right camera calculated through steps 510 to 530, and RightCameraNewR z may be R z of the adjusted right camera. When [Equation 17] is repeatedly performed, RightCameraPreR z may be previously adjusted R z .
Figure pat00027
,
Figure pat00028
Is the x coordinate and y coordinate of the second point 1802, respectively,
Figure pat00029
,
Figure pat00030
Is the x coordinate and y coordinate of the eighth point 1808, respectively.
Figure pat00031
,
Figure pat00032
Is the x coordinate and y coordinate of the fifth point 1805, respectively,
Figure pat00033
,
Figure pat00034
Is the x coordinate and y coordinate of the sixth point 1806, respectively.

RightCameraPreRz 및 RightCameraNewRz가 동일해지는 경우(즉,

Figure pat00035
이 0이 되는 경우), 우측 카메라의 Rz 조정이 완료될 수 있다.If RightCameraPreR z and RightCameraNewR z become equal (i.e.
Figure pat00035
Is 0), the R z adjustment of the right camera can be completed.

수학식 내에서 전방 차선 및 후방 차선의 포인트를 이용한 좌측 차선의 기울기인

Figure pat00036
와 우측 차선의 기울기인
Figure pat00037
는 변하지 않는 값이기 때문에 그대로 두면 되고, 각 좌측 차선의 포인트 및 우측 차선의 포인트를 이용한 좌측 차선의 기울기인
Figure pat00038
와 우측 차선의 기울기인
Figure pat00039
는 좌측 카메라의 Rz와 우측 카메라의 Rz가 조정될 때마다 변화할 수 있다.The slope of the left lane using the points of the front lane and the rear lane in the equation
Figure pat00036
And the slope of the right lane
Figure pat00037
Is an unchanging value, so you can leave it as it is, and the slope of the left lane using the points of each left lane and
Figure pat00038
And the slope of the right lane
Figure pat00039
It may change each time the R z of R z and right camera of the left camera to be adjusted.

도 19은 4개의 카메라(또는 채널)들 각각의 Rz가 적절하게 조정된 경우, 최종적으로 생성된 영상(1900)을 도시한다. Rz들이 적절하게 조정된 경우, 전방 차선들, 좌측 차선, 우측 차선 및 후방 차선들의 기울기가 동일하게 나타날 수 있다.19 illustrates an image 1900 that is finally generated when R z of each of the four cameras (or channels) is appropriately adjusted. When R z is properly adjusted, the slopes of the front lanes, the left lane, the right lane and the rear lanes may appear the same.

다시 도 14를 참조하면, 단계(1430)에서 제1 차이 평균이 제1 평균 임계치를 초과하는 것으로 결정된 경우, 도 15를 참조하여 설명되는 단계(1500)가 추가로 수행된다.Referring back to FIG. 14, when it is determined in step 1430 that the first difference average exceeds the first average threshold, step 1500 described with reference to FIG. 15 is additionally performed.

일 측면에 따르면, 도 15의 단계(1500)는 단계들(1510 내지 1530)을 포함할 수 있다.According to an aspect, step 1500 of FIG. 15 may include steps 1510 to 1530.

단계(1510)에서, 전자 장치(200)는 전체 채널들에서 하나의 채널을 제외한 채널들(예를 들어, 3개의 채널들)에 대해 계산된 제1 차이들의 제2 차이 평균을 계산한다. 예를 들어, 전방 카메라의 채널을 제외한 3개의 체널들에 대한 제2 차이 평균이 계산될 수 있다.In step 1510, the electronic device 200 calculates a second difference average of the first differences calculated for channels (eg, three channels) excluding one channel from all channels. For example, a second difference average for three channels excluding the channel of the front camera may be calculated.

단계(1520)에서, 전자 장치(200)는 계산된 제2 차이 평균이 미리 설정된 제2 평균 임계치를 초과하는지 여부를 결정한다. 제2 평균 임계치는 제1 평균 임계치와 동일하거나 상이할 수 있다.In step 1520, the electronic device 200 determines whether the calculated second difference average exceeds a preset second average threshold. The second average threshold may be the same as or different from the first average threshold.

제2 차이 평균이 제2 평균 임계치를 초과하는 경우, 카메라(240)의 3개의 채널들 중 일부의 채널의 초기 Rz에 오차가 있는 것이므로, 해당하는 채널의 계산된 Rz는 Rz를 조정하기 위해 이용될 수 없다. 예를 들어, 좌측 카메라의 채널에 대해 계산된 제1 차이가 다른 채널들의 제1 차이보다 큰 경우, 좌측 카메라의 채널의 계산된 Rz가 추가적으로 배제될 수 있다. 이러한 경우, 도 16을 참조하여 설명되는 단계(1600)가 추가로 수행될 수 있다.When the second difference average exceeds the second average threshold, since there is an error in the initial R z of some of the three channels of the camera 240, the calculated R z of the corresponding channel adjusts R z It cannot be used to do. For example, when the first difference calculated for the channel of the left camera is larger than the first difference of other channels, the calculated R z of the channel of the left camera may be additionally excluded. In this case, step 1600 described with reference to FIG. 16 may be additionally performed.

제2 차이 평균이 제2 평균 임계치를 초과하지 않는 경우, 제2 차이 평균이 Rz를 조정하기 위해 이용될 수 있다.If the second difference average does not exceed the second average threshold, the second difference average may be used to adjust R z .

단계(1530)에서, 전자 장치(200)는 제2 차이 평균에 기초하여 4개의 채널들 각각의 Rz를 조정한다. 4개의 채널들 각각의 Rz를 조정하는 방법에 대한 설명은 단계(1440)에 대한 설명으로 대체될 수 있다. [수학식 15]의

Figure pat00040
가 제2 차이 평균으로 대체될 수 있다.In step 1530, the electronic device 200 adjusts R z of each of the four channels based on the second difference average. A description of a method of adjusting R z of each of the four channels may be replaced with a description of step 1440. Of [Equation 15]
Figure pat00040
Can be replaced by the second difference mean.

다시 도 15를 참조하면, 단계(1520)에서 제2 차이 평균이 제2 평균 임계치를 초과하는 것으로 결정된 경우, 도 16을 참조하여 설명되는 단계(1600)가 추가로 수행된다.Referring back to FIG. 15, when it is determined in step 1520 that the second difference average exceeds the second average threshold, step 1600 described with reference to FIG. 16 is additionally performed.

일 측면에 따르면, 도 16의 단계(1600)는 단계들(1610 내지 1630)을 포함할 수 있다.According to an aspect, step 1600 of FIG. 16 may include steps 1610 to 1630.

단계(1610)에서, 전자 장치(200)는 전체의 채널들에서 두개의 채널들을 채널들을 제외한 채널들(예를 들어, 2개의 채널들)에 대해 계산된 제1 차이들의 제3 차이 평균을 계산한다. 예를 들어, 전방 채널, 및 좌측 채널을 제외한 2개의 체널들에 대한 제3 차이 평균이 계산될 수 있다.In step 1610, the electronic device 200 calculates a third difference average of the first differences calculated for channels (for example, two channels) excluding two channels from the entire channels. do. For example, a third difference average for two channels excluding the front channel and the left channel may be calculated.

단계(1620)에서, 전자 장치(200)는 계산된 제3 차이 평균 미리 설정된 제3 평균 임계치를 초과하는지 여부를 결정한다. 제3 평균 임계치는 제1 평균 임계치 및 제2 평균 임계치와 동일하거나 상이할 수 있다. 제3 평균 임계치가 제3 평균 임계치를 초과하는 경우, 더 이상 Rz를 조정할 수 없는 것으로 결정되어 Rz 조정이 종료될 수 있다.In step 1620, the electronic device 200 determines whether the calculated third difference average exceeds a preset third average threshold. The third average threshold may be the same as or different from the first average threshold and the second average threshold. 3 if the average exceeds the threshold, the third threshold average, is determined to be no longer able to adjust the R z R z may be the adjustment end.

단계(1630)에서, 전자 장치(200)는 제3 차이 평균에 기초하여 4개의 채널들 각각의 Rz를 조정한다. 4개의 채널들 각각의 Rz를 조정하는 방법에 대한 설명은 단계(1440)에 대한 설명으로 대체될 수 있다. [수학식 15]의

Figure pat00041
가 제3 차이 평균으로 대체될 수 있다.In step 1630, the electronic device 200 adjusts R z of each of the four channels based on the third difference average. A description of a method of adjusting R z of each of the four channels may be replaced with a description of operation 1440. Of [Equation 15]
Figure pat00041
Can be replaced by the third difference mean.

다시 도 5를 참조하면, 단계(550)에서, 전자 장치(200)는 단계들(510 내지 540)을 통해 최종적으로 계산된 외부 파라미터를 저장한다.Referring back to FIG. 5, in step 550, the electronic device 200 stores the external parameter finally calculated through steps 510 to 540.

다시 도 3을 참조하면, 단계(360)에서, 전자 장치(200)는 계산된 외부 파라미터에 기초하여 영상을 보정한다. 보정된 영상은 최종(또는 타겟) 탑뷰 영상일 수 있다.Referring back to FIG. 3, in step 360, the electronic device 200 corrects the image based on the calculated external parameter. The corrected image may be a final (or target) top view image.

전술된 단계들(310 내지 360)은 차량의 주행 중에도 수행될 수 있으므로, 외부 파라미터가 자동적으로 캘리브레이션 될 수 있다.Since the above-described steps 310 to 360 may be performed while the vehicle is driving, external parameters may be automatically calibrated.

이상에서 설명한 바와 같이 본 발명은 차량에 장착된 복수의 카메라들로부터 차량의 주행 차로를 촬영한 영상들을 수신하여 상기 촬영 영상으로부터 차선을 검출한 후 검출된 차선을 이용하여 차량에 장착된 카메라의 외부 파라미터를 보정하는 카메라 캘리브레이션을 수행하고 있기 때문에 차량을 멈추지 않고도 카메라의 캘리브레이션을 신속하고 간편하게 수행할 수 있는 효과가 있다.As described above, the present invention receives images of a driving lane of a vehicle from a plurality of cameras mounted on a vehicle, detects a lane from the captured image, and uses the detected lane to detect the exterior of the camera mounted on the vehicle. Since camera calibration to correct parameters is performed, there is an effect that camera calibration can be performed quickly and easily without stopping the vehicle.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like alone or in combination. The program instructions recorded on the medium may be specially designed and configured for the embodiment, or may be known and usable to those skilled in computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. -A hardware device specially configured to store and execute program instructions such as magneto-optical media, and ROM, RAM, flash memory, and the like. Examples of the program instructions include not only machine language codes such as those produced by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like. The hardware device described above may be configured to operate as one or more software modules to perform the operation of the embodiment, and vice versa.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of these, configuring the processing unit to behave as desired or processed independently or collectively. You can command the device. Software and/or data may be interpreted by a processing device or to provide instructions or data to a processing device, of any type of machine, component, physical device, virtual equipment, computer storage medium or device. , Or may be permanently or temporarily embodyed in a transmitted signal wave. The software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored on one or more computer-readable recording media.

이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described by the limited drawings, a person of ordinary skill in the art can apply various technical modifications and variations based on the above. For example, the described techniques are performed in a different order from the described method, and/or components such as a system, structure, device, circuit, etc. described are combined or combined in a form different from the described method, or other components Alternatively, even if substituted or substituted by an equivalent, an appropriate result can be achieved.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 청구범위의 범위에 속한다.Therefore, other implementations, other embodiments and claims and equivalents fall within the scope of the following claims.

110: 카메라 모듈 120: 입출력 모듈
121: 영상입출력부 122: 저장부
130: 차선검출모듈 131: 영상처리부
132: 프레임누적부 133: 엣지검출부
134: 차선판단부 140: 카메라보정 모듈
141: 이미지변환부 142: 방정식산출부
143: 파라미터추정부 144: 보정부
110: camera module 120: input/output module
121: image input/output unit 122: storage unit
130: lane detection module 131: image processing unit
132: frame accumulation unit 133: edge detection unit
134: lane determination unit 140: camera correction module
141: image conversion unit 142: equation calculation unit
143: parameter estimation unit 144: correction unit

Claims (22)

복수의 카메라들을 캘리브레이션하는 장치에 의해 수행되는 카메라 캘리브레이션 방법은,
차량 주변을 촬영하는 복수의 카메라들을 이용하여 복수의 영상들을 생성하는 단계;
상기 복수의 영상들 내의 차선들을 검출하는 단계;
초기 카메라 정보 및 초기 외부 파라미터에 기초하여 복수의 영상들을 이용하여 탑뷰(top view) 영상을 생성하는 단계;
상기 탑뷰 영상 내의 차선들에 대한 방정식을 계산하는 단계; 및
상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계
를 포함하는,
카메라 캘리브레이션 방법.
A camera calibration method performed by a device for calibrating a plurality of cameras,
Generating a plurality of images using a plurality of cameras photographing around the vehicle;
Detecting lanes within the plurality of images;
Generating a top view image using a plurality of images based on initial camera information and initial external parameters;
Calculating an equation for lanes in the top-view image; And
Calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the equation
Containing,
How to calibrate the camera.
제1항에 있어서,
상기 복수의 영상들 내의 차선을 검출하는 단계는,
상기 복수의 카메라들의 제1 카메라에 의해 생성된 프레임들을 누적함으로써 제1 영상을 생성하는 단계;
상기 제1 영상 내의 엣지를 검출하는 단계; 및
상기 엣지에 기초하여 상기 제1 영상의 차선을 결정하는 단계
를 포함하는,
카메라 캘리브레이션 방법.
The method of claim 1,
The step of detecting a lane within the plurality of images,
Generating a first image by accumulating frames generated by the first cameras of the plurality of cameras;
Detecting an edge in the first image; And
Determining a lane of the first image based on the edge
Containing,
How to calibrate the camera.
제2항에 있어서,
상기 복수의 영상들 내의 차선을 검출하는 단계는,
상기 제1 영상 내의 노이즈를 제거하는 단계; 및
상기 제1 영상을 흑백 영상으로 변환하는 단계
중 적어도 하나를 더 포함하고,
상기 제1 영상 내의 엣지를 검출하는 단계는,
노이즈가 제거된 제1 영상 또는 흑백 영상으로 변환된 제1 영상 내의 엣지를 검출하는 단계
를 포함하는,
카메라 캘리브레이션 방법.
The method of claim 2,
The step of detecting a lane within the plurality of images,
Removing noise in the first image; And
Converting the first image into a black and white image
Further comprising at least one of,
The step of detecting an edge in the first image,
Detecting an edge in the first image from which noise has been removed or the first image converted into a black and white image
Containing,
How to calibrate the camera.
제1항에 있어서.
상기 초기 외부 파라미터는 카메라의 초기 자세 정보 및 초기 위치 정보를 포함하고,
상기 초기 자세 정보는 상기 카메라의 피치(Rx), 요(Ry), 및 롤(Rz)을 포함하고,
상기 초기 위치 정보는 상기 카메라의 위치 이동(Tz)을 포함하는,
카메라 캘리브레이션 방법.
The method of claim 1.
The initial external parameter includes initial posture information and initial position information of the camera,
The initial posture information includes pitch (R x ), yaw (R y ), and roll (R z ) of the camera,
The initial position information includes a position movement (T z ) of the camera,
How to calibrate the camera.
제4항에 있어서,
상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계는,
상기 복수의 카메라들 중 전방 카메라 및 후방 카메라 각각에 대한 피치(Rx), 요(Ry), 및 롤(Rz)을 계산하는 단계;
상기 전방 카메라 및 상기 후방 카메라 각각에 대한 피치(Rx), 요(Ry), 및 롤(Rz)에 기초하여 상기 후방 카메라의 위치 이동(Tz)을 계산하는 단계; 및
상기 후방 카메라의 위치 이동(Tz)에 기초하여 상기 복수의 카메라들 중 좌측 카메라 및 우측 카메라 각각에 대한 피치(Rx), 요(Ry), 롤(Rz), 및 위치 이동(Tz)을 계산하는 단계
를 포함하는,
카메라 캘리브레이션 방법.
The method of claim 4,
Calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the equation,
Calculating a pitch (R x ), a yaw (R y ), and a roll (R z ) for each of the front and rear cameras among the plurality of cameras;
Calculating a positional movement (T z ) of the rear camera based on a pitch (R x ), a yaw (R y ), and a roll (R z ) for each of the front camera and the rear camera; And
Based on the position movement (T z ) of the rear camera, the pitch (R x ), yaw (R y ), roll (R z ), and position movement (T) for each of the left and right cameras among the plurality of cameras Steps to calculate z )
Containing,
How to calibrate the camera.
제5항에 있어서.
상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계는,
상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계
를 더 포함하고,
상기 롤(Rz)을 조정하는 단계는,
상기 복수의 카메라들 각각에 대해 초기 롤과 계산된 롤(Rz) 간의 제1 차이를 계산하는 단계;
계산된 제1 차이들의 제1 차이 평균을 계산하는 단계;
상기 제1 차이 평균이 미리 설정된 제1 평균 임계치를 초과하는지 여부를 결정하는 단계;
상기 제1 차이 평균이 상기 제1 평균 임계치를 초과하지 않는 경우, 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계
를 포함하는,
카메라 캘리브레이션 방법.
The method of claim 5.
Calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the equation,
Adjusting the roll (R z ) of each of the plurality of cameras
Including more,
Adjusting the roll (R z ),
Calculating a first difference between an initial roll and a calculated roll (R z ) for each of the plurality of cameras;
Calculating a first difference average of the calculated first differences;
Determining whether the first difference average exceeds a preset first average threshold;
When the first difference average does not exceed the first average threshold, adjusting the roll R z of each of the plurality of cameras based on the first difference average
Containing,
How to calibrate the camera.
제6항에 있어서,
상기 롤을 조정하는 단계는,
상기 제1 차이 평균이 상기 제1 평균 임계치를 초과하는 경우, 상기 제1 차이들 중 가장 큰 차이를 나타내는 카메라를 제외한 나머지 카메라들의 제1 차이들에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계
를 더 포함하는,
카메라 캘리브레이션 방법.
The method of claim 6,
The step of adjusting the roll,
When the first difference average exceeds the first average threshold value, the roll (R) of each of the plurality of cameras is based on first differences of cameras other than the camera representing the largest difference among the first differences. z ) adjusting step
Further comprising,
How to calibrate the camera.
제6항에 있어서,
상기 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계는,
상기 제1 차이 평균에 기초하여 상기 전방 카메라 및 상기 후방 카메라의 롤(Rz)을 조정하는 단계
를 포함하는,
카메라 캘리브레이션 방법.
The method of claim 6,
Adjusting the roll (R z ) of each of the plurality of cameras based on the first difference average,
Adjusting the roll (R z ) of the front camera and the rear camera based on the first difference average
Containing,
How to calibrate the camera.
제8항에 있어서.
상기 제1 차이 평균에 기초하여 상기 전방 카메라 및 상기 후방 카메라의 롤(Rz)을 조정하는 단계는,
상기 전방 카메라의 이전 롤(Rz)에서 상기 제1 차이 평균을 뺌으로써 상기 전방 카메라의 롤(Rz)을 조정하는 단계
를 포함하는,
카메라 캘리브레이션 방법.
The method of claim 8.
Adjusting the roll (R z ) of the front camera and the rear camera based on the first difference average,
Adjusting the roll (R z ) of the front camera by subtracting the average of the first difference from the previous roll (R z ) of the front camera
Containing,
How to calibrate the camera.
제6항에 있어서,
상기 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계는,
동일 차선 상에 위치하는 전방 좌측 차선의 포인트 및 좌측 차선의 포인트가 매칭되도록 상기 좌측 카메라의 롤(Rz)을 조정하는 단계
를 포함하는,
카메라 캘리브레이션 방법.
The method of claim 6,
Adjusting the roll (R z ) of each of the plurality of cameras based on the first difference average,
Adjusting the roll (R z ) of the left camera so that the point of the front left lane and the point of the left lane located on the same lane are matched
Containing,
How to calibrate the camera.
제1항 내지 제10항 중 어느 한 항의 방법을 수행하는 프로그램을 수록한 컴퓨터 판독 가능 기록 매체.
A computer-readable recording medium containing a program for performing the method of any one of claims 1 to 10.
복수의 카메라들을 캘리브레이션 하는 장치는,
차량의 주변 영상을 생성하는 복수의 카메라들;
상기 복수의 카메라들을 캘리브레이션 하는 프로그램이 기록된 메모리; 및
상기 프로그램을 수행하는 프로세서
를 포함하고,
상기 프로그램은,
상기 복수의 카메라들을 이용하여 복수의 영상들을 생성하는 단계;
상기 복수의 영상들 내의 차선들을 검출하는 단계;
초기 카메라 정보 및 초기 외부 파라미터에 기초하여 복수의 영상들을 이용하여 탑뷰(top view) 영상을 생성하는 단계;
상기 탑뷰 영상 내의 차선들에 대한 방정식을 계산하는 단계; 및
상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계
를 수행하는,
카메라 캘리브레이션 장치.
A device for calibrating a plurality of cameras,
A plurality of cameras for generating an image around the vehicle;
A memory in which a program for calibrating the plurality of cameras is recorded; And
Processor that executes the above program
Including,
The above program,
Generating a plurality of images using the plurality of cameras;
Detecting lanes within the plurality of images;
Generating a top view image using a plurality of images based on initial camera information and initial external parameters;
Calculating an equation for lanes in the top-view image; And
Calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the equation
To do,
Camera calibration device.
제12항에 있어서,
상기 복수의 영상들 내의 차선을 검출하는 단계는,
상기 복수의 카메라들의 제1 카메라에 의해 생성된 프레임들을 누적함으로써 제1 영상을 생성하는 단계;
상기 제1 영상 내의 엣지를 검출하는 단계; 및
상기 엣지에 기초하여 상기 제1 영상의 차선을 결정하는 단계
를 포함하는,
카메라 캘리브레이션 장치.
The method of claim 12,
The step of detecting a lane within the plurality of images,
Generating a first image by accumulating frames generated by the first cameras of the plurality of cameras;
Detecting an edge in the first image; And
Determining a lane of the first image based on the edge
Containing,
Camera calibration device.
제13항에 있어서,
상기 복수의 영상들 내의 차선을 검출하는 단계는,
상기 제1 영상 내의 노이즈를 제거하는 단계; 및
상기 제1 영상을 흑백 영상으로 변환하는 단계
중 적어도 하나를 더 포함하고,
상기 제1 영상 내의 엣지를 검출하는 단계는,
노이즈가 제거된 제1 영상 또는 흑백 영상으로 변환된 제1 영상 내의 엣지를 검출하는 단계
를 포함하는,
카메라 캘리브레이션 장치.
The method of claim 13,
The step of detecting a lane within the plurality of images,
Removing noise in the first image; And
Converting the first image into a black and white image
Further comprising at least one of,
The step of detecting an edge in the first image,
Detecting an edge in the first image from which noise has been removed or the first image converted to a black and white image
Containing,
Camera calibration device.
제12항에 있어서.
상기 초기 외부 파라미터는 카메라의 초기 자세 정보 및 초기 위치 정보를 포함하고,
상기 초기 자세 정보는 상기 카메라의 피치(Rx), 요(Ry), 및 롤(Rz)을 포함하고,
상기 초기 위치 정보는 상기 카메라의 위치 이동(Tz)을 포함하는,
카메라 캘리브레이션 장치.
The method of claim 12.
The initial external parameter includes initial posture information and initial position information of the camera,
The initial posture information includes pitch (R x ), yaw (R y ), and roll (R z ) of the camera,
The initial position information includes a position movement (T z ) of the camera,
Camera calibration device.
제15항에 있어서,
상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계는,
상기 복수의 카메라들 중 전방 카메라 및 후방 카메라 각각에 대한 피치(Rx), 요(Ry), 및 롤(Rz)을 계산하는 단계;
상기 전방 카메라 및 상기 후방 카메라 각각에 대한 피치(Rx), 요(Ry), 및 롤(Rz)에 기초하여 상기 후방 카메라의 위치 이동(Tz)을 계산하는 단계; 및
상기 후방 카메라의 위치 이동(Tz)에 기초하여 상기 복수의 카메라들 중 좌측 카메라 및 우측 카메라 각각에 대한 피치(Rx), 요(Ry), 롤(Rz), 및 위치 이동(Tz)을 계산하는 단계
를 포함하는,
카메라 캘리브레이션 장치.
The method of claim 15,
Calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the equation,
Calculating a pitch (R x ), a yaw (R y ), and a roll (R z ) for each of the front and rear cameras among the plurality of cameras;
Calculating a positional movement (T z ) of the rear camera based on a pitch (R x ), a yaw (R y ), and a roll (R z ) for each of the front camera and the rear camera; And
Pitch (R x ), yaw (R y ), roll (R z ), and position movement (T) for each of the left and right cameras among the plurality of cameras based on the position movement (T z ) of the rear camera. Steps to calculate z )
Containing,
Camera calibration device.
제16항에 있어서.
상기 방정식에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계는,
상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계
를 더 포함하고,
상기 롤(Rz)을 조정하는 단계는,
상기 복수의 카메라들 각각에 대해 초기 롤과 계산된 롤(Rz) 간의 제1 차이를 계산하는 단계;
계산된 제1 차이들의 제1 차이 평균을 계산하는 단계;
상기 제1 차이 평균이 미리 설정된 제1 평균 임계치를 초과하는지 여부를 결정하는 단계;
상기 제1 차이 평균이 상기 제1 평균 임계치를 초과하지 않는 경우, 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계
를 포함하는,
카메라 캘리브레이션 장치.
The method of claim 16.
Calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the equation,
Adjusting the roll (R z ) of each of the plurality of cameras
Including more,
Adjusting the roll (R z ),
Calculating a first difference between an initial roll and a calculated roll (R z ) for each of the plurality of cameras;
Calculating a first difference average of the calculated first differences;
Determining whether the first difference average exceeds a preset first average threshold;
When the first difference average does not exceed the first average threshold, adjusting the roll R z of each of the plurality of cameras based on the first difference average
Containing,
Camera calibration device.
제17항에 있어서,
상기 롤을 조정하는 단계는,
상기 제1 차이 평균이 상기 제1 평균 임계치를 초과하는 경우, 상기 제1 차이들 중 가장 큰 차이를 나타내는 카메라를 제외한 나머지 카메라들의 제1 차이들에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계
를 더 포함하는,
카메라 캘리브레이션 장치.
The method of claim 17,
The step of adjusting the roll,
When the first difference average exceeds the first average threshold, the roll (R) of each of the plurality of cameras is based on first differences between the cameras other than the camera representing the largest difference among the first differences. z ) adjusting step
Further comprising,
Camera calibration device.
제17항에 있어서,
상기 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계는,
상기 제1 차이 평균에 기초하여 상기 전방 카메라 및 상기 후방 카메라의 롤(Rz)을 조정하는 단계
를 포함하는,
카메라 캘리브레이션 장치.
The method of claim 17,
Adjusting the roll (R z ) of each of the plurality of cameras based on the first difference average,
Adjusting the roll (R z ) of the front camera and the rear camera based on the first difference average
Containing,
Camera calibration device.
제19항에 있어서.
상기 제1 차이 평균에 기초하여 상기 전방 카메라 및 상기 후방 카메라의 롤(Rz)을 조정하는 단계는,
상기 전방 카메라의 이전 롤(Rz)에서 상기 제1 차이 평균을 뺌으로써 상기 전방 카메라의 롤(Rz)을 조정하는 단계
를 포함하는,
카메라 캘리브레이션 장치.
The method of claim 19.
Adjusting the roll (R z ) of the front camera and the rear camera based on the first difference average,
Adjusting the roll (R z ) of the front camera by subtracting the average of the first difference from the previous roll (R z ) of the front camera
Containing,
Camera calibration device.
제17항에 있어서,
상기 제1 차이 평균에 기초하여 상기 복수의 카메라들 각각의 롤(Rz)을 조정하는 단계는,
동일 차선 상에 위치하는 전방 좌측 차선의 포인트 및 좌측 차선의 포인트가 매칭되도록 상기 좌측 카메라의 롤(Rz)을 조정하는 단계
를 포함하는,
카메라 캘리브레이션 장치.
The method of claim 17,
Adjusting the roll (R z ) of each of the plurality of cameras based on the first difference average,
Adjusting the roll (R z ) of the left camera so that the point of the front left lane and the point of the left lane located on the same lane are matched
Containing,
Camera calibration device.
탑뷰 영상을 생성하는 장치에 의해 수행되는, 탑뷰 영상 생성 방법은,
복수의 카메라들을 이용하여 복수의 영상들을 생성하는 단계;
상기 복수의 영상들에 기초하여 상기 복수의 카메라들에 대한 외부 파라미터를 계산함으로써 상기 복수의 카메라들을 캘리브레이션하는 단계 - 상기 외부 파라미터는 카메라의 피치(Rx), 요(Ry), 및 롤(Rz)을 포함함 -;
캘리브레이션된 상기 복수의 카메라들을 이용하여 복수의 영상들을 생성하는 단계; 및
상기 복수의 영상들에 기초하여 탑뷰 영상을 생성하는 단계
를 포함하는,
탑뷰 영상 생성 방법.
The top-view image generation method performed by the device for generating the top-view image,
Generating a plurality of images using a plurality of cameras;
Calibrating the plurality of cameras by calculating external parameters for the plurality of cameras based on the plurality of images-The external parameters are the pitch (R x ), yaw (R y ), and roll ( Including R z ) -;
Generating a plurality of images using the calibrated plurality of cameras; And
Generating a top view image based on the plurality of images
Containing,
How to create a top view image.
KR1020190060180A 2019-05-22 2019-05-22 Method and apparatus for providing camera calibration for vehicles KR102274026B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190060180A KR102274026B1 (en) 2019-05-22 2019-05-22 Method and apparatus for providing camera calibration for vehicles

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190060180A KR102274026B1 (en) 2019-05-22 2019-05-22 Method and apparatus for providing camera calibration for vehicles

Publications (2)

Publication Number Publication Date
KR20200135606A true KR20200135606A (en) 2020-12-03
KR102274026B1 KR102274026B1 (en) 2021-07-09

Family

ID=73779386

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190060180A KR102274026B1 (en) 2019-05-22 2019-05-22 Method and apparatus for providing camera calibration for vehicles

Country Status (1)

Country Link
KR (1) KR102274026B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015029934A1 (en) * 2013-08-30 2015-03-05 クラリオン株式会社 Camera calibration device, camera calibration system, and camera calibration method
WO2017122552A1 (en) * 2016-01-15 2017-07-20 ソニー株式会社 Image processing device and method, program, and image processing system
KR20190030242A (en) * 2017-09-13 2019-03-22 ㈜베이다스 Method and apparatus for providing camera calibration for vehicles
KR20190041150A (en) * 2017-10-12 2019-04-22 현대모비스 주식회사 Calibration method and apparatus thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015029934A1 (en) * 2013-08-30 2015-03-05 クラリオン株式会社 Camera calibration device, camera calibration system, and camera calibration method
WO2017122552A1 (en) * 2016-01-15 2017-07-20 ソニー株式会社 Image processing device and method, program, and image processing system
KR20190030242A (en) * 2017-09-13 2019-03-22 ㈜베이다스 Method and apparatus for providing camera calibration for vehicles
KR20190041150A (en) * 2017-10-12 2019-04-22 현대모비스 주식회사 Calibration method and apparatus thereof

Also Published As

Publication number Publication date
KR102274026B1 (en) 2021-07-09

Similar Documents

Publication Publication Date Title
US11398051B2 (en) Vehicle camera calibration apparatus and method
US10834324B2 (en) Image distortion correction of a camera with a rolling shutter
CN109086650B (en) Calibration method and calibration apparatus
US8259174B2 (en) Camera auto-calibration by horizon estimation
US9412168B2 (en) Image processing device and image processing method for camera calibration
US10719949B2 (en) Method and apparatus for monitoring region around vehicle
US11880993B2 (en) Image processing device, driving assistance system, image processing method, and program
KR20170001765A (en) Top view creating method for camera installed on vehicle and AVM system
WO2015015542A1 (en) Vehicle-mounted stereo camera system and calibration method therefor
KR20170128727A (en) Apparatus and method for auto-correcting and generating avm image
CN109658451B (en) Depth sensing method and device and depth sensing equipment
JP7137464B2 (en) Camera calibration device, camera calibration method, and program
CN110796604A (en) Image correction method and device
JP6844223B2 (en) Information processing equipment, imaging equipment, equipment control system, information processing method and program
JP7019431B2 (en) Camera calibration device, camera calibration method, and program
KR102274026B1 (en) Method and apparatus for providing camera calibration for vehicles
KR102297683B1 (en) Method and apparatus for calibrating a plurality of cameras
US10643077B2 (en) Image processing device, imaging device, equipment control system, equipment, image processing method, and recording medium storing program
KR102522609B1 (en) Around view monitoring system and operating method thereof
KR102277828B1 (en) Method and apparatus for calibratiing a plurality of cameras
JP6492603B2 (en) Image processing apparatus, system, image processing method, and program
CN114750746A (en) Parking space tracking method based on domain controller, electronic device and storage medium
US20240096113A1 (en) Method and apparatus for calibrating roll angle of on-board camera, device, and storage medium
KR20180052415A (en) Method for compensating camera tolerance based on a camera image of a vehicle
CN117726693A (en) Camera calibration method, controller and vehicle

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right