KR20150096128A - Auto Calibration Method for Virtual Camera based on Mobile Platform - Google Patents

Auto Calibration Method for Virtual Camera based on Mobile Platform Download PDF

Info

Publication number
KR20150096128A
KR20150096128A KR1020140017175A KR20140017175A KR20150096128A KR 20150096128 A KR20150096128 A KR 20150096128A KR 1020140017175 A KR1020140017175 A KR 1020140017175A KR 20140017175 A KR20140017175 A KR 20140017175A KR 20150096128 A KR20150096128 A KR 20150096128A
Authority
KR
South Korea
Prior art keywords
image
vanishing point
mobile platform
deriving
coordinates
Prior art date
Application number
KR1020140017175A
Other languages
Korean (ko)
Other versions
KR101574195B1 (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 KR1020140017175A priority Critical patent/KR101574195B1/en
Publication of KR20150096128A publication Critical patent/KR20150096128A/en
Application granted granted Critical
Publication of KR101574195B1 publication Critical patent/KR101574195B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • 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
    • 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
    • G06T7/85Stereo camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20192Edge enhancement; Edge preservation
    • 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/30241Trajectory

Abstract

The present invention relates to an automatic calibration method for a virtual camera based on a mobile platform. The method can be used to calibrate multiple images recorded by the camera. The method can improve the accuracy of an augmented reality matching technology by improving the accuracy of the measurement of the distance between the mobile platform and a target object and reducing error rate of the internal parameters. The method includes: an image acquisition step (S10) of using the camera arranged on the mobile platform to input four or more image of the target object in different directions; a preprocessing step (S20) of detecting multiple straight lines from each input image; a vanishing point detecting step (S30) of deriving the average line by classifying the types of the detected straight lines and using the average line to derive a vanishing point and obtain the coordinates of the vanishing point; and a parameter value deriving step (S40) of applying the coordinates of the detected vanishing point to a calibration formula to calculate the internal parameter values.

Description

모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법{Auto Calibration Method for Virtual Camera based on Mobile Platform}[0001] The present invention relates to an automatic calibration method for a virtual camera based on a mobile platform,

본 발명은 모바일 플랫폼에 구비된 카메라에 의해 촬영된 복수의 영상으로부터 직선을 추출한 후 소실점 기반 알고리즘에 따라 캘리브레이션을 실시하여, 모바일 플랫폼과 타겟 오브젝트와의 거리 측정시 정확도를 향상시키고 내부 파라미터 값의 오차율을 감소시킴으로써, 증강현실 매칭기술의 정확성을 향상시킬 수 있도록 한 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법에 관한 것이다.In the present invention, a straight line is extracted from a plurality of images photographed by a camera provided in a mobile platform and then calibrated according to a vanishing point-based algorithm to improve the accuracy in measuring the distance between the mobile platform and the target object, To a method for automatically calibrating a virtual camera based on a mobile platform that can improve the accuracy of an augmented reality matching technique.

최근 스마트폰과 같은 모바일 플랫폼의 대중화와 더불어 증강 현실(Augmented Reality: AR) 기술이 다양한 분야에서 활용되고 있다. Augmented Reality (AR) technology has been used in various fields with the popularization of mobile platforms such as smart phones.

상기 증강현실 기술은 사용자가 눈으로 보는 현실세계에 가상 물체를 겹쳐 보여주는 기술로서, 현실세계와 가상세계를 실시간으로 합쳐서 하나의 영상으로 보여주므로 혼합현실(Mixed Reality: MR)이라고도 한다. The augmented reality technology is a technology for superimposing virtual objects on the real world seen by the user, and is called a mixed reality (MR) because the real world and the virtual world are displayed as a single image in real time.

이러한 증강현실 기술에 의하면, 사용자가 실제로 보고 있는 현실세계를 담고 있는 화면에 각종 부가정보(예컨대 관심지점을 나타내는 그래픽 요소)를 시각적으로 중첩하여 제공할 수 있다. According to such augmented reality technology, it is possible to visually superimpose and provide various kinds of additional information (for example, graphical elements representing points of interest) on a screen containing a real world that the user actually sees.

즉, 증강현실은 컴퓨터 그래픽으로 만들어진 가상환경을 사용하지만 그 주역은 현실환경이며, 컴퓨터 그래픽은 현실환경에 필요한 정보를 추가로 제공하는 역할을 한다. That is, augmented reality uses a virtual environment created by computer graphics, but the protagonist is a real environment, and computer graphics plays a role of providing additional information necessary for a real environment.

이에 따라 증강현실 기술을 사용하게 되면, 사용자가 보고 있는 실사 영상에 3차원 가상영상이 겹쳐지게 되어 현실환경과 가상화면과의 구분이 모호해지게 된다.Accordingly, when the augmented reality technology is used, a three-dimensional virtual image is superimposed on the real image that the user is viewing, and the distinction between the real environment and the virtual screen becomes ambiguous.

예를 들어, 스마트폰과 같은 모바일 플랫폼의 카메라로 주변을 비추면, 인근에 있는 건물의 위치, 건물과의 거리, 전화번호 등의 정보가 모바일 플랫폼의 영상으로 표시된다. For example, when a camera of a mobile platform such as a smart phone illuminates the surroundings, information such as the location of a nearby building, distance to a building, and a telephone number is displayed as an image of the mobile platform.

이에 따라, 실제환경과 가상의 객체가 혼합된 증강현실 기술은, 가상환경에 사용자를 몰입하게 하여 실제환경을 볼 수 없게 하는 가상현실 기술과는 달리, 사용자가 실제환경을 볼 수 있으므로 현실감과 함께 각종 부가 정보를 제공할 수 있는 장점이 있다.Accordingly, the augmented reality technology in which a real environment and a virtual object are mixed can be viewed as a real environment, unlike a virtual reality technique in which a user is immersed in a virtual environment, There is an advantage that various additional information can be provided.

또한, 증강현실 기술은, 카메라로부터 촬영되는 영상으로부터 증강현실 마커를 감지하고, 감지된 마커에 따른 3차원 가상 물체를 상기 영상에 합성하여 출력할 수도 있다. In addition, the augmented reality technology may detect the augmented reality markers from the images photographed by the camera, synthesize the three-dimensional virtual objects according to the detected markers, and output the combined images.

이에 따라 현실에는 존재하지 않는 가상 캐릭터 등이 화면상에 실제 존재하는 것처럼 구현할 수 있다.Accordingly, a virtual character or the like that does not exist in reality can be implemented as if it exists on the screen.

하지만 가상 물체를 실제 화면상에 나타내도록 하기 위해서는, 입력되는 영상의 각 프레임별로 마커(Marker)를 인지하고, 마커의 종류 및 위치 등에 대응되도록 가상 물체의 크기, 위치, 형태 등을 계산하여, 계산된 위치에 상기 가상 물체를 영상과 합성하여야 한다. However, in order to display a virtual object on an actual screen, a marker is recognized for each frame of the input image, and the size, position, and shape of the virtual object are calculated so as to correspond to the type and position of the marker, The virtual object must be synthesized with the image at the position where the virtual object is located.

그런데, 상기한 마커 방식의 증강현실 콘텐츠 출력 방식의 경우, 화면 상에 마커가 명확히 인식되기 어렵다는 문제점이 있다.However, in the case of the above-described marker-based augmented reality contents output method, there is a problem that markers are not clearly recognized on the screen.

즉, 상기 마커가 원거리에 있을 경우에는, 카메라가 마커를 인식할 수 없어 가상 물체 즉, 증강현실 오브젝트(Object)를 화면상에 표시하기가 어렵게 되는 것이다. That is, when the marker is located at a long distance, the camera can not recognize the marker, and it becomes difficult to display a virtual object, that is, an augmented reality object on the screen.

이를 해결하기 위한 방법의 하나로서, 마커 대신 GPS 등의 위치 정보에 가상 물체를 맵핑(Mapping)함으로써, 단말기의 위치 정보만으로 현재 위치 근처에 맵핑된 증강현실 오브젝트를 디스플레이하는 방법이 있다. As a method for solving this problem, there is a method of displaying an augmented reality object mapped in the vicinity of a current position by only mapping position information of a terminal such as GPS by mapping a virtual object.

그러나, 상기한 맵핑 방식에 의하면, GPS 위치 정보에 의해 해당 지점의 x, y 정보만을 알 수 있을 뿐 높이 정보는 알 수 없다는 단점이 있다.However, according to the mapping method described above, only the x and y information of the corresponding point can be known by the GPS position information, but height information can not be known.

이에 따라, GPS를 이용한 증강현실 기법의 경우, 단말기의 위치에 따라 오브젝트(Object)가 공중에 떠 있거나 또는 지면 보다 아래에 디스플레이되는 등의 문제가 발생하게 되는 문제점이 있다. Accordingly, in the case of the augmented reality method using GPS, there is a problem that an object is floated in the air or displayed below the ground according to the position of the terminal.

또한, 스마트폰과 같은 소형 모바일 플랫폼에 적용되는 GPS 위치정보는, 평균 50m 정도의 위치 오차를 지니고 있어 정확성이 떨어진다는 문제점이 있다. In addition, the GPS position information applied to a small mobile platform such as a smart phone has a position error of about 50m on average, resulting in a problem that accuracy is degraded.

또한, 증강현실을 구현하기 위해서는 카메라 캘리브레이션(Calibration)이 필수적으로 요구되는데, 상기한 카메라 캘리브레이션에 적용되는 알고리즘에는, 액티브 비젼 시스템(Active Vision System) 방식, 멀티 카메라(Multi-Camera) 방식, 크루파 방정식(Kruppa Equation)을 이용하는 방식 및 소실점(Vanishing Point) 방식 등이 알려져 있다. In order to realize an augmented reality, camera calibration is indispensable. Algorithms applied to the camera calibration include an active vision system, a multi-camera system, A method of using an equation (Kruppa Equation) and a vanishing point method are known.

상기한 액티브 비젼 시스템 방식은, 잡음 민감도가 강인하고 정확도가 양호한 장점이 있으나, 속도가 느리고 특징점 검출 과정이 필요하며, 카메라의 상태를 제어하기 위한 특수장치가 필요하다는 단점이 있다. Although the active vision system is robust in noise sensitivity and has good accuracy, it has a drawback in that it requires a slow speed, a feature point detection process, and a special device for controlling the state of the camera.

상기 멀티 카메라 방식은, 잡음 민감도가 강인한 장점은 있으나, 속도가 느리고 특징점 검출 과정이 필요하며, 정확도가 미흡하고 여러 대의 카메라가 필요하다는 단점이 있다. The multi-camera method is advantageous in that the noise sensitivity is robust, but the speed is slow, the feature point detection process is required, the accuracy is poor, and a plurality of cameras are required.

상기 크루파 방정식을 이용하는 방법은, 잡음 민감도가 강인한 장점이 있으나, 속도가 느리고 특징점 검출과정이 필요하며, 정확도가 미흡하고 이미지의 중복구역이 요구되는 단점이 있다.The method using the above-described convolution equation has a drawback in that the noise sensitivity is robust, but the velocity is slow, the feature point detection process is required, the accuracy is poor, and the overlapping area of the image is required.

상기 소실점 방식은, 수직으로 교차하는 2종류의 평행선을 이용하여 소실점을 찾아야 하는 단점은 있지만, 속도가 빠르고 특징점 검출과정이 필요하지 않으며, 정확도가 양호한 장점이 있다. The vanishing point method has the disadvantage of finding a vanishing point using two vertically intersecting parallel lines, but it is advantageous in that the speed is fast, the feature point detecting process is not necessary, and the accuracy is good.

한편, 상기한 종래의 캘리브레이션 방식 들은, 모바일 플랫폼마다 각기 다른 오토 포커스(Auto Focus)로 카메라 캘리브레이션을 수행하고 있어, 정보의 정확도가 저하된다는 문제점이 있다.On the other hand, in the above-described conventional calibration methods, camera calibration is performed with different autofocus for each mobile platform, resulting in a problem that accuracy of information is lowered.

또한 종래의 캘리브레이션 방식에서는, 내부 파라미터(Parameter)값 자체도 오차 범위가 커서 정보의 정확도가 더욱 저하된다는 문제점이 있다. In addition, in the conventional calibration method, the internal parameter value itself has a large error range, which results in a further reduction in the accuracy of the information.

KR 10-0793838 B1KR 10-0793838 B1 KR 10-2012-0092352 AKR 10-2012-0092352 A KR 10-2013-0057699 AKR 10-2013-0057699 A KR 10-1253644 B1KR 10-1253644 B1

본 발명은 상기한 종래 기술의 문제점을 해결하기 위하여 안출된 것으로서, 모바일 플랫폼에 구비된 카메라에 의해 촬영된 복수의 영상으로부터 직선을 추출하고 이를 이용하여 소실점의 좌표를 구한 후, 소실점 기반 알고리즘을 이용하여 캘리브레이션을 실시함으로써, 모바일 플랫폼과 타겟 오브젝트와의 거리 측정시 정확도를 향상시키고 내부 파라미터 값의 오차율을 보정할 수 있는 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법을 제공하는데 그 목적이 있다.SUMMARY OF THE INVENTION The present invention has been conceived to solve the problems of the prior art described above, and it is an object of the present invention to extract a straight line from a plurality of images captured by a camera provided in a mobile platform, to obtain coordinates of a vanishing point, And an object of the present invention is to provide a method of automatically calibrating a virtual camera based on a mobile platform capable of improving accuracy in measuring a distance between a mobile platform and a target object and correcting an error rate of an internal parameter value.

본 발명의 다른 목적은, 크레딧 카드를 이용한 소실점 기법에 의해 내부 파라미터 값을 추출하여 모바일 환경에 적용함으로써, 모바일 환경에서의 오차범위를 대폭 줄일 수 있는 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법을 제공하는 데 있다.It is another object of the present invention to provide a method of automatically calibrating a virtual camera based on a mobile platform capable of greatly reducing an error range in a mobile environment by extracting internal parameter values by a vanishing point technique using a credit card and applying the extracted internal parameter values to a mobile environment I have to.

본 발명의 또 다른 목적은, 오토 캘리브레이션 보정 기술의 정확도를 향상시킴으로써 증강현실 매칭기술의 정확성을 향상킬 수 있는 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법을 제공하는 데 있다.It is still another object of the present invention to provide a method of automatically calibrating a virtual camera based on a mobile platform capable of improving the accuracy of an augmented reality matching technique by improving the accuracy of an auto-calibration correction technique.

상기한 목적을 달성하기 위하여 본 발명은, 모바일 플랫폼에 구비된 카메라를 이용하여 타켓 오브젝트에 대한 이미지를 입력하되, 크레딧 카드를 사용하여 서로 다른 방향의 이미지를 4장 이상 입력하는 이미지 획득 단계와; 입력된 각 이미지로부터 복수의 직선을 검출하는 전처리 단계와; 검출된 직선을 종류별로 분류하여 평균선을 도출하고 이 평균선을 이용하여 소실점을 도출한 후 소실점의 좌표를 구하는 소실점 검출단계와; 검출된 소실점의 좌표를 캘리브레이션 수식에 적용하여 내부 파라미터값을 계산하는 파라미터값 도출단계;를 포함하는 것을 특징으로 한다. According to an aspect of the present invention, there is provided an image processing method comprising: obtaining an image of a target object using a camera provided on a mobile platform, the method comprising: inputting four or more images in different directions using a credit card; A preprocessing step of detecting a plurality of straight lines from each input image; A vanishing point detection step of classifying the detected straight lines by type to derive an average line, deriving a vanishing point using the average line, and obtaining coordinates of the vanishing point; And a parameter value derivation step of calculating an internal parameter value by applying the coordinates of the detected vanishing point to a calibration equation.

또한, 본 발명의 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법에 따르면, 상기 전처리 단계는 가우시안 필터(Gaussian Filter)를 이용하여 이미지의 잡음을 제거하는 1차 가우시안 스무딩(Gaussian Smoothing) 단계와, 이미지의 명암 대비도를 높여 외곽선의 검출을 용이하게 하는 히스토그램 평활화(Histogram Equalization) 단계와, 가우시안 필터를 이용하여 히스토그램 평활화를 마친 이미지의 작은 잡음을 제거하는 2차 가우시안 스무딩 단계와, 캐니 알고리즘(Canny Algorithm)을 이용하여 이미지의 에지(Edge)를 검출하는 에지 검출 단계와, 허프 변환(Hough Transform)을 통해 직선을 검출하여 파라미터로 표시하는 허프 라인 디텍션(Hough Line Detection) 단계를 포함하는 것을 특징으로 한다.In addition, according to the automatic calibration method of a virtual camera based on the mobile platform of the present invention, the pre-processing step may include a first Gaussian smoothing step of removing noise of an image using a Gaussian filter, A second histogram smoothing step (Histogram Equalization step) for easily detecting the outline by increasing the degree of contrast, a second order Gaussian smoothing step for removing small noise of the histogram smoothed image using a Gaussian filter, a Canny algorithm, An edge detecting step of detecting an edge of an image using a Hough Transform, and a Hough Line Detection step of detecting a straight line through a Hough Transform and displaying the detected straight line as a parameter.

또한, 본 발명의 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법에 따르면, 상기 소실점 검출단계는 K-mean 알고리즘을 이용하여 상기 전처리 단계에서 얻어진 각 직선을 4 종류로 분류하는 직선 분류 단계와, 분류된 각 종류의 직선에 대한 평균선을 도출하는 평균선 도출 단계와, 도출된 평균선을 이용하여 각 이미지당 2개의 소실점을 도출하고 이들 소실점의 좌표를 구하는 소실점 계산단계를 포함하는 것을 특징으로 한다.According to the automatic calibration method of a virtual camera based on the mobile platform of the present invention, the vanishing point detection step includes a linear classifying step of classifying each straight line obtained in the preprocessing step into four classes using a K-mean algorithm, A mean line derivation step of deriving an average line for each kind of straight line and a vanishing point calculation step of deriving two vanishing points per image using the derived average line and calculating coordinates of vanishing points.

또한, 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법에 따르면, 상기 내부 파라미터값 도출단계는 캘리브레이션 수식으로 하기 수식을 이용하는 것을 특징으로 한다;According to a method of automatically calibrating a virtual camera based on a mobile platform, the step of deriving the internal parameter values is characterized by using the following equation as a calibration formula:

Figure pat00001
Figure pat00001

여기서, 상기 fx, fy, cx, cy는 내부 파라미터이고, uA, uB, vA, vB는 각 이미지로부터 구해진 소실점의 좌표를 나타낸다. Here, f x , f y , c x , and c y are internal parameters, and u A , u B , v A , and v B represent the coordinates of the vanishing point obtained from each image.

본 발명에 따른 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법에 의하면, 크레딧 카드를 이용하여 4장 이상의 이미지로부터 직선을 추출하고 이를 이용하여 소실점의 좌표를 구한 뒤, 소실점 기반 알고리즘에 따른 캘리브레이션 수식으로 내부 파라미터를 구하게 되므로, 내부 파라미터의 오차율을 감소시킬 수 있는 효과가 있다.According to the automatic calibration method of a virtual camera based on a mobile platform according to the present invention, a straight line is extracted from four or more images using a credit card, coordinates of a vanishing point are obtained using the same, The parameter is obtained, so that the error rate of the internal parameter can be reduced.

또한, 모바일 플랫폼과 타겟 오브젝트(Target Object)와의 거리 측정시 정확도를 향상시키고 내부 파라미터 값의 오차율을 보정함으로써, 증강현실 매칭기술의 정확도가 향상되는 효과가 있다.In addition, the accuracy of the augmented reality matching technique is improved by improving the accuracy in measuring the distance between the mobile platform and the target object and correcting the error rate of the internal parameter value.

종래의 방식에 의하면 오차율이 10% 내외이나, 본 발명에 의하면 오차율을 5% 이내로 줄일 수가 있다.According to the conventional method, the error rate is about 10%, but according to the present invention, the error rate can be reduced to 5% or less.

또한, 모바일 환경에서의 오차범위를 대폭 줄일 수 있으므로 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션의 정확도를 향상시킬 수 있는 효과가 있다. In addition, since the error range in the mobile environment can be greatly reduced, the accuracy of the automatic calibration of the virtual camera based on the mobile platform can be improved.

도 1은 본 발명에 따른 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법을 나타낸 순서도.
도 2는 본 발명에 따른 직선의 파라미터를 설명하기 위한 도면.
도 3은 본 발명에 따른 소실점을 설명하기 위한 모델링 도면.
도 4는 본 발명의 설명을 위한 참고 이미지.
도 5는 본 발명의 요부 구성인 전처리 단계에 따른 이미지 처리 과정을 나타낸 도면.
도 6은 본 발명에서 전처리가 완료된 각각의 이미지를 나타낸 도면.
도 7은 본 발명에서 각 이미지의 직선을 종류별로 분류한 결과를 나타낸 도면.
도 8은 본 발명에서 각 이미지에 대한 평균선 도출 결과를 나타낸 도면.
1 is a flowchart illustrating a method of automatically calibrating a virtual camera based on a mobile platform according to the present invention.
2 is a diagram for explaining a parameter of a straight line according to the present invention;
3 is a modeling drawing for explaining a vanishing point according to the present invention;
4 is a reference image for explaining the present invention.
5 is a view illustrating an image processing process according to a pre-processing step which is a main constituent of the present invention.
FIG. 6 is a view showing each image that has undergone the preprocessing in the present invention. FIG.
FIG. 7 is a diagram showing a result obtained by classifying straight lines of respective images according to types in the present invention; FIG.
8 is a diagram showing a result of deriving a mean line for each image in the present invention.

이하, 첨부된 도면을 참조하여 본 발명의 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법의 바람직한 실시예를 설명한다. Hereinafter, a preferred embodiment of a method of automatically calibrating a virtual camera based on a mobile platform of the present invention will be described with reference to the accompanying drawings.

본 발명에 따른 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법은, 도 1에 도시된 바와 같이, 모바일 플랫폼에 구비된 카메라를 이용하여 타켓 오브젝트에 대한 이미지를 입력하되, 크레딧 카드를 이용하여 서로 다른 방향의 이미지를 4장 이상 입력하는 이미지 획득 단계(S10)와; 입력된 각 이미지로부터 복수의 직선을 검출하는 전처리 단계(S20)와; 검출된 직선을 종류별로 분류하여 평균선을 도출하고 이 평균선을 이용하여 소실점을 도출한 후 소실점의 좌표를 구하는 소실점 검출단계(S30)와; 검출된 소실점의 좌표를 캘리브레이션 수식에 적용하여 내부 파라미터값을 계산하는 파라미터값 도출단계(S40);를 포함한다. As shown in FIG. 1, a method for automatically calibrating a virtual camera based on a mobile platform according to the present invention includes inputting an image of a target object using a camera provided in a mobile platform, (S10) of inputting at least four images of the image of the subject; A preprocessing step (S20) of detecting a plurality of straight lines from each input image; A vanishing point detection step (S30) of deriving a mean line by classifying the detected straight lines by type, deriving a vanishing point using the average line, and obtaining coordinates of the vanishing point; And a parameter value deriving step (S40) of applying the coordinates of the detected vanishing point to the calibration equation to calculate an internal parameter value.

여기서, 상기 전처리 단계(S20)는, 가우시안 필터를 이용하여 이미지의 잡음을 제거하는 1차 가우시안 스무딩 단계(S21)와, 이미지의 명암 대비도를 높여 외곽선의 검출을 용이하게 하는 히스토그램 평활화 단계(S22)와, 가우시안 필터를 이용하여 히스토그램 평활화를 마친 이미지의 작은 잡음을 제거하는 2차 가우시안 스무딩 단계(S23)와, 캐니 알고리즘을 이용하여 이미지의 에지를 검출하는 에지 검출 단계(S24)와, 허프 변환을 통해 직선을 검출하여 파라미터로 표시하는 허프 라인 디텍션 단계(S25)로 이루어진다.The preprocessing step S20 includes a first-order Gaussian smoothing step S21 for removing noise of an image using a Gaussian filter, a histogram smoothing step S22 for facilitating the detection of an outline by increasing the degree of contrast of the image A second-order Gaussian smoothing step S23 for removing small noise of the histogram smoothed image using the Gaussian filter, an edge detection step S24 for detecting an edge of the image using the Kanny algorithm, And a Hough line detection step (S25) of detecting a straight line and displaying the detected straight line through parameters.

허프 변환에 따라 검출된 직선의 파라미터는, 도 2에 도시된 바와 같이, (r,θ)로 나타낼 수 있다. 여기서, r은 영점(0,0)으로부터 직선까지의 최단거리, θ는 x축과 직선 r 사이의 각도를 의미한다.The parameters of the straight line detected according to the Hough transform can be expressed by (r,?) As shown in Fig. Where r is the shortest distance from the zero point (0,0) to the straight line, and θ is the angle between the x-axis and the straight line r.

그리고, 상기 소실점 검출단계(S30)는, K-mean 알고리즘을 이용하여 상기 전처리 단계에서 얻어진 각 직선을 4 종류로 분류하는 직선 분류 단계(S31)와, 분류된 각 종류의 직선에 대한 평균선을 도출하는 평균선 도출 단계(S32)와, 도출된 평균선을 이용하여 각 이미지당 2개의 소실점을 도출하고 이들 소실점의 좌표를 구하는 소실점 계산단계(S33)로 이루어진다.The vanishing point detection step S30 includes a straight line classification step S31 of classifying each straight line obtained in the preprocessing step into four types using the K-mean algorithm, and calculating a mean line for each of the classified straight lines And a vanishing point calculating step (S33) of deriving two vanishing points for each image using the derived average line and obtaining coordinates of vanishing points thereof.

이하, 소실점 좌표를 이용하여 내부 파라미터의 값을 도출하는 과정을 설명한다. Hereinafter, a process of deriving the value of the internal parameter using the vanishing point coordinates will be described.

도 3에 도시된 바와 같이, 실제 세계에서 서로 직교하는 두 쌍의 직선 L1, L2, L3, L4를 이미지 평면에 투영하게 되면, 투영 이미지에서는 l1, l2, l3, l4로 나타나며, 이 투영 이미지에 나타난 직선들로 인해 2개의 소실점 A와 B를 구할 수 있게 된다. 3, two straight lines L 1 , L 2 , L 3 , and L 4 orthogonal to each other in the real world are projected onto the image plane. In the projection image, l 1 , l 2 , l 3 , l 4 , and it is possible to obtain two vanishing points A and B due to the straight lines in the projected image.

이때, 실제세계의 직선 L1, L2, L3, L4는 다음의 수학식 1의 관계를 가지게 된다. At this time, the straight lines L 1 , L 2 , L 3 , and L 4 of the real world have the following relationship (1).

Figure pat00002
Figure pat00002

이어서, 렌즈의 중심을 원점으로 하는 3차원의 카메라 좌표계에서 원점 O(0,0,0)과 상기 소실점 A와 B를 각각 연결하게 되면, 각각의 직선은 다음의 수학식 2의 관계를 가지게 된다.Then, when the origin O (0, 0, 0) and the vanishing point A and B are connected to each other in the three-dimensional camera coordinate system having the center of the lens as the origin, the respective straight lines have the following relationship (2) .

Figure pat00003
Figure pat00003

따라서, 도 3에 도시된 바와 같이, △OAB는 직각 삼각형이 되고, 카메라 좌표계는 표면에 점 0가 있고 지름이 AB인 구의 형태로 나타난다. Therefore, as shown in Fig. 3, DELTA OAB becomes a right triangle, and the camera coordinate system appears in the form of a sphere having a point 0 on the surface and a diameter AB.

그리고, 이미지 좌표계에서의 소실점 A, B의 좌표는 다음의 수학식 3과 같이 정의될 수 있다.The coordinates of the vanishing points A and B in the image coordinate system can be defined as the following Equation (3).

Figure pat00004
Figure pat00004

한편, 카메라 좌표계에서 픽셀 이미지 좌표계로 변환하는 행렬식은 다음의 수학식 4와 같이 정의되며, 내부 파라미터 모델을 형성한다.On the other hand, a matrix expression for converting from a camera coordinate system to a pixel image coordinate system is defined as Equation (4) below and forms an internal parameter model.

Figure pat00005
Figure pat00005

여기서, f는 카메라의 초점거리, dx, dy는 CMOS 또는 CCD와 같은 카메라 센서의 화소 폭과 높이, cx, cy는 이미지 좌표계에서 원점의 프로젝션 좌표를 의미한다. Where f is the focal length of the camera, d x and d y are the pixel width and height of the camera sensor such as CMOS or CCD, and c x and c y are the projection coordinates of the origin in the image coordinate system.

그리고, 카메라 좌표계에서 원점 O의 좌표는 O(0,0,0)이므로, Zc가 초점거리와 같아지게 되며, 이를 수식으로 표현하면 다음의 수학식 5가 된다.Since the coordinate of the origin O in the camera coordinate system is O (0, 0, 0), Zc becomes equal to the focal length, which can be expressed by the following equation (5).

Figure pat00006
Figure pat00006

상기한 수학식 3, 4, 5의 조건을 통하여 이미지 좌표계에서 소실점의 좌표를 대입하면, 카메라 좌표계에서의 소실점 좌표를 구할 수 있는데, 이를 수식으로 나타내면 다음의 수학식 6과 같다.The vanishing point coordinates in the camera coordinate system can be obtained by substituting the coordinates of the vanishing point in the image coordinate system through the conditions of Equations (3), (4) and (5) described above.

Figure pat00007
Figure pat00007

이때, 원구 방정식은 다음의 수학식 7과 같이 나타나므로, 수학식 6과 수학식 7을 이용하여 선분 AB를 지름으로 하는 구체 방정식을 구하면 다음의 수학식 8로 나타낼 수 있다.Since the circle equation is expressed by the following Equation (7), a spherical equation having a line segment AB as a diameter can be obtained by using Equations (6) and (7).

Figure pat00008
Figure pat00008

Figure pat00009
Figure pat00009

이때, 원점 O는 구의 표면에 있으므로, 원점의 좌표 O(0,0,0)을 수학식 8에 대입하여 다음의 수학식 9를 얻을 수 있다.At this time, since the origin O is on the surface of the sphere, the coordinate O (0,0,0) of the origin can be substituted into the equation (8) to obtain the following equation (9).

Figure pat00010
Figure pat00010

상기한 수학식 9를 정리하면 다음의 수학식 10을 얻을 수 있으며, fx, fy는 다음의 수학식 11과 같이 가정된다.The above Equation (9) can be summarized as the following Equation (10), and f x and f y are assumed as Equation (11).

Figure pat00011
Figure pat00011

Figure pat00012
Figure pat00012

상기한 수학식 10에 수학식 11을 대입하여 정리하면, 다음의 수학식 12를 얻을 수 있다.The following Equation (12) can be obtained by substituting Equation (11) into Equation (10).

Figure pat00013
Figure pat00013

상기한 수학식 12에서 내부 파라미터인 fx, fy, cx, cy가 모두 미지수라 할 수 있으므로, 이의 해법을 위해서는 최소한 4개의 방정식이 요구된다. Since in the above-mentioned equation (12) is f x, f y, c x , c y is an internal parameter can be referred to both unknowns, at least four equations is required for its solution.

따라서, 소실점의 좌표를 구할 수 있는 이미지가 4장 이상 필요하게 된다. Therefore, four or more images that can obtain the coordinates of the vanishing point are required.

즉, 4개의 이미지로부터 구해진 소실점의 좌표 uA, uB, vA, vB를 상기 수학식 12에 각각 적용하여 4개의 방정식을 구성하고, 이들 방정식을 풀어냄으로써 내부 파라미터 fx, fy, cx, cy를 구할 수 있다.That is, the coordinates of the vanishing point calculated from the four image u A, u B, v A, v wherein the B respectively applied to the equation (12) to naemeurosseo configure four equations and solve these equations internal parameter f x, f y, c x , c y .

본 발명자는, 타겟 오브젝트(Target Object)로 크레딧 카드(Credit Card)를 사용하여 소실점의 좌표를 구하고, 그 결과를 체스(Chess)판을 이용하여 소실점 좌표를 구한 결과와 대비하여 그 정확도를 검토하였다.The present inventors have examined the accuracy of the vanishing point in comparison with the result obtained by obtaining the coordinates of the vanishing point using a credit card as a target object and using the result as a chess plate .

먼저, 모바일 플랫폼의 카메라로 크레딧 카드를 촬영하여, 도 4와 같이 서로 다른 방향의 이미지 4장을 획득하였다. First, the credit card was photographed with the camera of the mobile platform, and four images of different directions were obtained as shown in FIG.

그리고, 획득된 이미지에 대한 전처리를 통해 직선을 검출하였으며, 이 과정은 도 5에 도시되어 있고, 각 이미지에서 검출된 직선의 개수와 파라미터는 다음의 표 1과 같다.5, and the number and parameters of the straight lines detected in each image are shown in Table 1 below.

Figure pat00014
Figure pat00014

그리고, K-mean 알고리즘을 이용하여 상기 전처리 단계에서 얻어진 각 직선을 4종류로 분류하였으며, 그 결과는 도 6에 도시되어 있다. Then, each straight line obtained in the pre-processing step was classified into four types using the K-mean algorithm, and the results are shown in FIG.

이어서, 분류된 직선들의 평균선을 도출한 결과 도 7과 같이 나타났으며, 각 이미지에서 검출된 평균선들의 파라미터는 다음의 표 2와 같다.Next, the average line of the sorted lines was derived as shown in FIG. 7, and the parameters of the average lines detected in each image are shown in Table 2 below.

Figure pat00015
Figure pat00015

이어서, 상기한 평균선들을 이용하여 각 이미지의 소실점들을 계산한 결과, 다음의 표 3과 같은 결과를 얻을 수 있었다. Then, the vanishing points of the respective images were calculated using the above average lines, and the results shown in Table 3 were obtained.

Figure pat00016
Figure pat00016

상기한 표 3에 나타난 각 이미지의 소실점 좌표들을 수학식 12에 각각 대입하여 방정식의 해를 구한 결과, 다음의 표 4와 같은 테스트 결과를 얻을 수 있었다.The solution of the equation was obtained by assigning the vanishing point coordinates of each image shown in Table 3 to Equation (12). As a result, the test results shown in Table 4 were obtained.

Figure pat00017
Figure pat00017

그리고, 상기한 내부 파라미터 값의 정확도를 확인하기 위하여 체스(Chess)판을 이용하여 소실점을 구하고, 이를 수학식 12에 대입하여 내부 파라미터를 계산한 결과, 표 5와 같은 결과를 얻을 수 있었다.In order to confirm the accuracy of the internal parameter values, a vanishing point was found by using a chess plate, and the internal parameters were calculated by substituting the vanishing point into Equation 12. As a result, Table 5 was obtained.

Figure pat00018
Figure pat00018

상기한 표 4와 표 5를 대비하여 보면, 본 발명에 따라 내부 파라미터를 구한 결과의 오차가 크지 않음을 알 수 있다. In contrast to Table 4 and Table 5, it can be seen that the error of the result obtained from the internal parameters according to the present invention is not large.

결과적으로, 18 ~ 20장의 이미지를 사용하는 체스판 방식에 비해, 본 발명에서는 크레딧 카드에 의한 4장의 이미지만으로도 카메라의 내부 파라미터를 구할 수 있다.As a result, compared with the chessboard method using 18 to 20 images, in the present invention, the internal parameters of the camera can be obtained with only four images by the credit card.

그리고, 5장 이상의 이미지가 있다면 최소제곱법을 이용하여 최적화할 수도 있다. If there are five or more images, optimization may be performed using the least squares method.

본 발명에 의하면 파라미터의 오차율을 대폭 감소시킬 수 있으므로, 결과적으로 캘리브레이션의 정확도를 향상시켜 증강현실 매칭 기술의 정확도를 향상시킬 수가 있다.According to the present invention, since the error rate of the parameter can be greatly reduced, the accuracy of the calibration can be improved, and the accuracy of the augmented reality matching technique can be improved.

이상에서는 본 발명의 바람직한 실시예를 예시적으로 설명한 것으로서, 본 발명은 상기한 실시예에 한정되지 아니하며, 그 기술적 사상을 벗어나지 않는 범위 내에서 다양하게 변경 및 응용될 수 있다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, but, on the contrary, is intended to cover various modifications and similarities.

또한 본 발명의 보호 범위는 다음의 특허청구범위에 의하여 정해지는 것이며, 이와 동등한 범위 내에 있는 모든 기술적 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.
The scope of protection of the present invention is defined by the following claims, and all technical ideas within the scope of the present invention should be construed as falling within the scope of the present invention.

Claims (4)

모바일 플랫폼에 구비된 카메라를 이용하여 타켓 오브젝트(Target Object)에 대한 이미지를 입력하되, 크레딧 카드(Credit Card)를 이용하여 서로 다른 방향의 이미지를 4장 이상 입력하는 이미지 획득 단계(S10)와;
입력된 각 이미지로부터 복수의 직선을 검출하는 전처리 단계(S20)와;
검출된 직선을 종류별로 분류하여 평균선을 도출하고, 이 평균선을 이용하여 소실점(Vanishing Point)을 도출한 후 소실점의 좌표를 구하는 소실점 검출단계(S30)와;
검출된 소실점의 좌표를 캘리브레이션(Calibration) 수식에 적용하여 내부 파라미터(Parameter)값을 계산하는 파라미터값 도출단계(S40);를 포함하는 것을 특징으로 하는 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법.
An image acquisition step (S10) of inputting an image of a target object using a camera provided in the mobile platform, and inputting four or more images in different directions using a credit card;
A preprocessing step (S20) of detecting a plurality of straight lines from each input image;
A vanishing point detection step (S30) of classifying the detected straight line by type, deriving an average line, deriving a vanishing point using the average line, and obtaining the coordinates of the vanishing point;
And a parameter value deriving step (S40) of calculating an internal parameter value by applying coordinates of the detected vanishing point to a calibration equation.
제1항에 있어서,
상기 전처리 단계(S20)는,
가우시안 필터(Gaussian Filter)를 이용하여 이미지의 잡음을 제거하는 1차 가우시안 스무딩(Gaussian Smoothing) 단계(S21)와,
이미지의 명암 대비도를 높여 외곽선의 검출을 용이하게 하는 히스토그램 평활화(Histogram Equalization) 단계(S22)와,
가우시안 필터를 이용하여 히스토그램 평활화를 마친 이미지의 작은 잡음을 제거하는 2차 가우시안 스무딩 단계(S23)와,
캐니 알고리즘(Canny Algorithm)을 이용하여 이미지의 에지를 검출하는 에지 검출(Canny Edge Detection) 단계(S24)와,
허프 변환(Hough Transform)을 통해 직선을 검출하여 파라미터로 표시하는 허프 라인 디텍션(Hough Line Detection) 단계(S25)를 포함하는 것을 특징으로 하는 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법.
The method according to claim 1,
The preprocessing step (S20)
A first Gaussian smoothing step S21 for removing noise of an image using a Gaussian filter,
A histogram equalization step S22 for increasing the contrast of the image to facilitate the detection of the outline,
A second Gaussian smoothing step S23 for removing small noise of the histogram smoothed image using a Gaussian filter,
A Canny Edge Detection step S24 for detecting an edge of an image using a Canny algorithm,
And a Hough Line Detection step (S25) of detecting a straight line through a Hough Transform and displaying the straight line as a parameter.
제1항에 있어서,
상기 소실점 검출단계(S30)는,
K-mean 알고리즘을 이용하여 상기 전처리 단계에서 얻어진 각 직선을 4 종류로 분류하는 직선 분류 단계(S31)와,
분류된 각 종류의 직선에 대한 평균선을 도출하는 평균선 도출 단계(S32)와,
도출된 평균선을 이용하여 각 이미지당 2개의 소실점을 도출하고 이들 소실점의 좌표를 구하는 소실점 계산단계(S33)를 포함하는 것을 특징으로 하는 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법.
The method according to claim 1,
The vanishing point detection step (S30)
A straight line sorting step S31 for classifying each straight line obtained in the pre-processing step into four types using the K-mean algorithm,
A mean ray derivation step (S32) of deriving a mean ray for each kind of straight line classified,
And a vanishing point calculation step (S33) of deriving two vanishing points for each image using the derived average line and obtaining coordinates of vanishing points thereof.
제1항에 있어서,
상기 내부 파라미터값 도출단계(S40)는, 캘리브레이션 수식으로 하기 수식을 이용하는 것을 특징으로 하는 모바일 플랫폼에 기반한 가상 카메라의 자동 캘리브레이션 방법.
Figure pat00019

여기서, 상기 fx, fy, cx, cy는 내부 파라미터이고, uA, uB, vA, vB는 각 이미지로부터 구해진 소실점의 좌표를 나타낸다.
The method according to claim 1,
The internal parameter value deriving step (S40) uses the following formula as a calibration formula, and the automatic parameter calibration method based on the mobile platform.
Figure pat00019

Here, f x , f y , c x , and c y are internal parameters, and u A , u B , v A , and v B represent the coordinates of the vanishing point obtained from each image.
KR1020140017175A 2014-02-14 2014-02-14 Auto Calibration Method for Virtual Camera based on Mobile Platform KR101574195B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140017175A KR101574195B1 (en) 2014-02-14 2014-02-14 Auto Calibration Method for Virtual Camera based on Mobile Platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140017175A KR101574195B1 (en) 2014-02-14 2014-02-14 Auto Calibration Method for Virtual Camera based on Mobile Platform

Publications (2)

Publication Number Publication Date
KR20150096128A true KR20150096128A (en) 2015-08-24
KR101574195B1 KR101574195B1 (en) 2015-12-03

Family

ID=54058703

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140017175A KR101574195B1 (en) 2014-02-14 2014-02-14 Auto Calibration Method for Virtual Camera based on Mobile Platform

Country Status (1)

Country Link
KR (1) KR101574195B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180105875A (en) 2017-03-16 2018-10-01 한국전자통신연구원 Camera calibration method using single image and apparatus therefor
WO2023014246A1 (en) 2021-08-06 2023-02-09 Общество с ограниченной ответственностью "ЭвоКарго" Method of calibrating extrinsic video camera parameters

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102131445B1 (en) * 2018-11-27 2020-07-08 전자부품연구원 System and method for improving image quality of object of interest

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4820221B2 (en) 2006-06-29 2011-11-24 日立オートモティブシステムズ株式会社 Car camera calibration device and program
JP5455124B2 (en) 2010-04-01 2014-03-26 国立大学法人鳥取大学 Camera posture parameter estimation device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180105875A (en) 2017-03-16 2018-10-01 한국전자통신연구원 Camera calibration method using single image and apparatus therefor
WO2023014246A1 (en) 2021-08-06 2023-02-09 Общество с ограниченной ответственностью "ЭвоКарго" Method of calibrating extrinsic video camera parameters

Also Published As

Publication number Publication date
KR101574195B1 (en) 2015-12-03

Similar Documents

Publication Publication Date Title
JP5699788B2 (en) Screen area detection method and system
JP6363863B2 (en) Information processing apparatus and information processing method
CN109285145B (en) Multi-standing tree height measuring method based on smart phone
CN108694741B (en) Three-dimensional reconstruction method and device
CN109801333B (en) Volume measurement method, device and system and computing equipment
CN109479082B (en) Image processing method and apparatus
CN109584307B (en) System and method for improving calibration of intrinsic parameters of a camera
KR102354299B1 (en) Camera calibration method using single image and apparatus therefor
CN107084680B (en) A kind of target depth measurement method based on machine monocular vision
KR20110059506A (en) System and method for obtaining camera parameters from multiple images and computer program products thereof
CN112686877B (en) Binocular camera-based three-dimensional house damage model construction and measurement method and system
JP5156601B2 (en) Shape measuring apparatus and program
KR101589167B1 (en) System and Method for Correcting Perspective Distortion Image Using Depth Information
JP5297779B2 (en) Shape measuring apparatus and program
Alemán-Flores et al. Line detection in images showing significant lens distortion and application to distortion correction
JP2016200557A (en) Calibration device, distance measurement apparatus and calibration method
Ding et al. A robust detection method of control points for calibration and measurement with defocused images
KR101574195B1 (en) Auto Calibration Method for Virtual Camera based on Mobile Platform
CN110189347B (en) Method and terminal for measuring volume of object
CN115239801B (en) Object positioning method and device
JP2014191685A (en) Image processing apparatus and image processing method
JP6906177B2 (en) Intersection detection device, camera calibration system, intersection detection method, camera calibration method, program and recording medium
CN113723432B (en) Intelligent identification and positioning tracking method and system based on deep learning
CN102542563A (en) Modeling method of forward direction monocular vision of mobile robot
CN113450335B (en) Road edge detection method, road edge detection device and road surface construction vehicle

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
LAPS Lapse due to unpaid annual fee