KR100918706B1 - Apparatus and Method of Estimating Camera Position - Google Patents
Apparatus and Method of Estimating Camera Position Download PDFInfo
- Publication number
- KR100918706B1 KR100918706B1 KR1020070089460A KR20070089460A KR100918706B1 KR 100918706 B1 KR100918706 B1 KR 100918706B1 KR 1020070089460 A KR1020070089460 A KR 1020070089460A KR 20070089460 A KR20070089460 A KR 20070089460A KR 100918706 B1 KR100918706 B1 KR 100918706B1
- Authority
- KR
- South Korea
- Prior art keywords
- camera
- coordinate
- vector
- coordinates
- feature
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
- G06T7/85—Stereo camera calibration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20036—Morphological image processing
- G06T2207/20041—Distance transform
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
증강현실응용에 적용되는 카메라 자세 및 위치를 추정하는 장치 및 방법은, 단일 영상 프레임에서 임의의 물체를 추적하여 카메라의 자세 및 위치를 추정한다. 즉, 임의의 물체에 대해 입력받은 적어도 4 개의 3차원 좌표값 중에서 임의의 물체의 무게 중심에 가장 근접한 참조점을 결정하며, 참조점을 이용하여 카메라의 자세 및 위치를 추정한다. 이때, 정확한 참조점을 결정하는 데에 방해요소가 되는 이상점을 제거한 후에 남아있는 좌표값 중에서 참조점을 선택한다. 여기서, 이상점은 입력받은 좌표값 중에서 다른 특징점들과 멀리 떨어진 좌표값으로 결정한다.Apparatus and method for estimating the camera pose and position applied to augmented reality application, estimates the pose and position of the camera by tracking any object in a single image frame. That is, a reference point closest to the center of gravity of the arbitrary object is determined among at least four three-dimensional coordinate values received for the arbitrary object, and the pose and position of the camera are estimated using the reference point. In this case, the reference point is selected from the coordinate values remaining after removing the outliers that are the obstacles in determining the correct reference point. Here, the outlier is determined as a coordinate value far from other feature points among the input coordinate values.
정사영법 카메라 위치 추정, 카메라 추적, 증강 현실, 이상점 Orthographic Camera Positioning, Camera Tracking, Augmented Reality, Outliers
Description
본 발명은 카메라 자세 추정 장치 및 방법에 관한 것이다. 특히 본 발명은 단일 프레임의 영상 데이터에서 실시간으로 카메라의 자세를 추정할 수 있는 카메라 자세 추정 장치 및 방법에 관한 것이다.The present invention relates to a camera pose estimation apparatus and method. In particular, the present invention relates to a camera pose estimation apparatus and method that can estimate the pose of the camera in real time from the image data of a single frame.
증강 현실 응용에서 중요한 기술 요소는 실제 배경을 촬영한 영상 데이터에 3차원 가상 객체를 최대한 자연스럽게 삽입하는 기술이다. 이때 영상 데이터에 3차원 가상 객체를 올바른 자세로 삽입하고자 하는 위치에 정확하게 삽입하기 위해서는, 카메라가 실제 배경에 대하여 어떤 위치에서 어떤 자세로 영상데이터를 생성했는지에 대한 정보가 필요하다.An important technical element in the augmented reality application is a technique of inserting a three-dimensional virtual object as naturally as possible into image data photographing a real background. In this case, in order to accurately insert the 3D virtual object in the correct posture at the position to be inserted into the image data, information about which position and at which position the camera generates image data with respect to the actual background is required.
일반적인 카메라 자세 및 위치(이하, "카메라 정보"라 함)를 추정하는 방법에 따르면, 첫번째 영상 프레임에서 기저 특징점의 좌표를 이용하여 카메라 정보를 추출하고, 두번째 영상 프레임에서부터 특징점의 변경 좌표를 추적하여 카메라 정보를 추출한다. 이와 같이 하면, 단일 영상 프레임으로는 카메라 정보를 추정할 수 없는 문제점이 있다.According to a method of estimating a general camera position and position (hereinafter referred to as "camera information"), the camera information is extracted from the coordinates of the base feature points in the first image frame, and the change coordinates of the feature points are tracked from the second image frame. Extract camera information. In this case, there is a problem that camera information cannot be estimated with a single image frame.
또 다른 일반적인 카메라 정보를 추정하는 방법에 따르면, 특징점 추출 도구를 이용하여 단일 영상 프레임으로부터 카메라 정보를 추정할 수 있으나, 특징점 추출도구에 의한 특징점의 전처리가 반드시 필요하고, 카메라 정보의 추정 전에 임의의 초기 추정값이 필요한 문제점이 있다.According to another method of estimating camera information, the camera information can be estimated from a single image frame using the feature point extraction tool, but preprocessing of the feature point by the feature point extraction tool is absolutely necessary. There is a problem that requires an initial estimate.
본 발명이 이루고자 하는 기술적 과제는 초기 추정값 없이 단일 프레임의 영상데이터로부터 카메라의 자세 및 위치를 추정하는 장치 및 방법을 제공하는 것이다.It is an object of the present invention to provide an apparatus and method for estimating the pose and position of a camera from image data of a single frame without an initial estimate.
위와 같은 기술적 과제를 해결하기 위하여, 본 발명의 특징에 따른 카메라 자세 추정장치는 단일 프레임의 영상 데이터에 포함되는 복수의 영상좌표와 상기 복수의 영상좌표가 각각 나타내는 복수의 특징점을 포함하는 데이터를 입력받는 데이터입력부; 상기 복수의 특징점을 상기 카메라의 자세를 추정하기 위해 이용할 객체에 대응하는 제1 그룹과 상기 제1 그룹 이외의 특징점인 이상점을 포함하는 제2 그룹으로 구분하는 이상점 결정부; 상기 제1 그룹의 특징점 중에서, 상기 제1 그룹의 특징점의 무게중심에 근접한 참조점을 검출하고, 상기 참조점이 영상 데이터에 투영되는 참조영상좌표를 검출하는 참조점 결정부; 및 상기 특징점과 참조영상좌표를 이용하여, 상기 영상데이터를 생성한 카메라의 자세와 위치에 대한 추정값을 생성하는 카메라 정보 처리부를 포함한다.In order to solve the above technical problem, a camera pose estimation apparatus according to an aspect of the present invention inputs data including a plurality of image coordinates included in a single frame of image data and a plurality of feature points represented by the plurality of image coordinates, respectively. Receiving data input unit; An outlier determination unit for dividing the plurality of feature points into a second group including a first group corresponding to an object to be used for estimating a pose of the camera and an outlier that is a feature point other than the first group; A reference point determiner for detecting a reference point close to the center of gravity of the feature points of the first group among the feature points of the first group, and detecting a reference image coordinate at which the reference point is projected onto the image data; And a camera information processor configured to generate an estimated value of a posture and a position of the camera which generated the image data by using the feature point and the reference image coordinate.
상기 이상점 결정부는, 상기 복수의 특징점 각각에 대해서 최대거리에 위치한 특징점을 검출하고, 상기 최대거리에 위치한 특징점으로 검출되는 횟수를 상기 각 특징점의 거리인덱스로 설정하는 거리계산부; 및 상기 복수의 특징점 중에서 상기 제2 그룹의 기준 특징점과 제1 특징점 사이의 거리인덱스를 가지는 특징점을 상 기 제2 그룹으로 설정하는 이상점 선택부를 포함하며, 상기 제1 특징점은 상기 복수의 특징점 중에서 최대 거리인덱스를 가지는 특징점이다. 여기서 상기 이상점 선택부는, 상기 복수의 특징점에서, 제2 특징점과 임의의 제3 특징점 사이의 거리인덱스를 가지는 특징점 각각과의 거리를 합한 거리합이 최소가 되는 제4 특징점을 결정하고, 상기 제4 특징점의 상기 거리합이 제5 특징점과 상기 제4 특징점 사이의 거리 미만이면, 상기 제5 특징점을 상기 제2 그룹의 기준 특징점으로 설정하며, 상기 제2 특징점은 상기 복수의 특징점 중에서 최소 거리인덱스를 가지는 특징점이고, 상기 제5 특징점은 상기 제3 특징점의 거리인덱스보다 큰 거리인덱스의 최소값을 거리인덱스로 가지는 특징점이다. The outlier determination unit may include: a distance calculator configured to detect a feature point located at a maximum distance with respect to each of the plurality of feature points, and set a number of times of detection as the feature point located at the maximum distance as a distance index of each feature point; And an outlier selecting unit for setting a feature point having a distance index between the reference feature point and the first feature point of the second group among the plurality of feature points as the second group, wherein the first feature point is selected from among the plurality of feature points. Feature point with maximum distance index. The outlier selecting unit may determine a fourth feature point at which the sum of the distances of the feature points having a distance index between the second feature point and the third random point is the minimum from the plurality of feature points, and wherein If the sum of the distances of the four feature points is less than the distance between the fifth feature point and the fourth feature point, the fifth feature point is set as the reference feature point of the second group, and the second feature point is the minimum distance index among the plurality of feature points. The fifth feature point is a feature point having a minimum value of a distance index greater than the distance index of the third feature point as a distance index.
또한 상기 이상점 선택부는, 상기 제2 그룹의 특징점의 개수를 상기 제1 그룹의 특징점의 개수 미만으로 설정한다.The abnormal point selection unit sets the number of feature points of the second group to be less than the number of feature points of the first group.
한편, 상기 복수의 특징점은 적어도 4개이다.Meanwhile, the plurality of feature points is at least four.
상기 참조점 결정부는, 상기 제1 그룹의 특징점 중에서, 상기 제1 그룹의 특징점 각각과의 거리를 합한 거리합이 최소가 되는 특징점을 상기 참조점으로 결정한다.The reference point determiner determines, as the reference point, a feature point of the feature group of the first group that the sum of distances of the distances of the feature points of the first group is the minimum.
상기 카메라 정보 처리부는, 상기 참조 영상좌표를 원점으로 하며, 상기 영상 데이터에 의해 형성되는 제1 좌표계의 기저벡터를 정사영크기변환하여, 상기 카메라를 원점으로 하는 제2 좌표계의 기저벡터를 계산한다. 여기서 상기 카메라 정보 처리부는 상기 참조점과 상기 제1 그룹의 각 특징점 사이의 벡터, 상기 제1 그룹의 각 특징점에 대응하는 제1 좌표를 상기 제1 좌표계로 정사영 투영한 제2 좌 표, 그리고 상기 참조 영상좌표를 이용하여 상기 제1 좌표계의 기저벡터를 계산하고, 상기 제1 좌표는 상기 제1 그룹의 각 특징점이 상기 참조점을 원점으로 하는 제3 좌표계로 직교 투영되는 좌표이다. 또한 상기 카메라 정보 처리부는, 상기 제2 좌표계의 기저벡터를 행벡터로 구성한 회전 행렬을 상기 카메라의 자세에 대한 추정값으로 생성한다. 그리고 상기 카메라 정보 처리부는, 상기 제1 좌표계의 기저벡터를 이용하여, 상기 객체와 상기 객체가 크기 변환되어 상기 제1 좌표계로 투영된 비율을 계산하고, 상기 참조 영상좌표와 상기 카메라 사이의 벡터 및 상기 비율을 이용하여 상기 카메라와 상기 참조점 사이의 벡터를 계산하며, 상기 카메라와 상기 참조점 사이의 벡터를 상기 카메라의 위치에 대한 추정값으로 생성한다. The camera information processor calculates a basis vector of a second coordinate system having the camera as an origin by orthogonally converting the basis vector of the first coordinate system formed by the image data using the reference image coordinate as an origin. Wherein the camera information processor is a vector between the reference point and each feature point of the first group, a second coordinate that orthogonally projects a first coordinate corresponding to each feature point of the first group into the first coordinate system, and the A basis vector of the first coordinate system is calculated using reference image coordinates, and the first coordinates are coordinates at which the feature points of the first group are orthogonally projected onto a third coordinate system whose origin is the reference point. In addition, the camera information processor generates a rotation matrix of the basis vector of the second coordinate system as a row vector as an estimated value for the pose of the camera. The camera information processor is further configured to calculate a ratio of the object and the object projected to the first coordinate system by using the basis vector of the first coordinate system, the vector between the reference image coordinate and the camera, and The ratio between the camera and the reference point is calculated using the ratio, and a vector between the camera and the reference point is generated as an estimate of the position of the camera.
상기 카메라 정보 처리부는, 상기 제1 좌표계의 기저벡터를 이용하여, 상기 객체와 상기 객체가 크기 변환되어 상기 제1 좌표계로 투영된 비율을 계산하고, 상기 비율을 이용하여, 상기 카메라로부터 상기 참조점이 놓인 평면까지의 거리를 계산하며, 상기 카메라로부터 상기 참조점이 놓인 평면까지의 거리를 이용하여, 상기 제1 그룹의 각 특징점에 대응하는 제2 좌표와 상기 제1 그룹의 각 특징점에 대응하는 영상좌표 사이의 오차를 계산한다. 여기서, 이전 수행에서 계산된 상기 오차를 이용하여, 상기 제1 그룹의 각 특징점에 대응하는 제2 좌표를 계산하고, 상기 제2 좌표와 상기 참조 영상좌표를 통해 상기 제1 좌표계의 기저벡터를 계산하며, 상기 제1 좌표계의 기저벡터로부터, 상기 객체와 상기 객체가 크기 변환되어 상기 제1 좌표계로 투영된 비율 및 상기 카메라로부터 상기 참조점이 놓인 평면까지의 거리를 계산하여, 상기 오차를 다시 계산한다.The camera information processor is further configured to calculate a ratio of the object and the object to which the object and the object are size-transformed and projected onto the first coordinate system using the basis vector of the first coordinate system, and using the ratio, the reference point from the camera. Compute the distance to the plane lying, the second coordinate corresponding to each feature point of the first group and the image coordinate corresponding to each feature point of the first group by using the distance from the camera to the plane on which the reference point is placed Calculate the error between. Here, the second coordinate corresponding to each feature point of the first group is calculated using the error calculated in the previous operation, and the basis vector of the first coordinate system is calculated based on the second coordinate and the reference image coordinate. The error is recalculated from the basis vector of the first coordinate system by calculating the ratio of the object and the object that are scaled and projected to the first coordinate system and the distance from the camera to the plane on which the reference point is placed. .
본 발명의 다른 특징에 따르면, 객체가 투영된 영상 데이터를 생성하는 카메라의 자세 및 위치를 추정하는 방법에 있어서, 객체를 나타내는 것으로 가정된 적어도 4 개의 특징점을 입력받는 단계; 상기 특징점에 각각 대응하는 영상데이터의 영상좌표를 검색하는 단계; 상기 특징점 중에서, 상기 객체를 나타내지 않는 것으로 판단되는 이상점을 선택하는 단계; 상기 이상점을 제외한 나머지 특징점에서, 특징점들의 무게중심에 근접한 참조점을 선택하는 단계; 및 상기 복수의 특징점, 상기 복수의 영상좌표, 상기 참조점, 상기 참조점에 대응하는 영상데이터의 참조 영상좌표 및 상기 카메라의 초점거리를 이용하여, 상기 카메라를 원점으로 하는 제1 좌표계의 기저벡터를 행벡터로 구성한 회전행렬과 상기 카메라와 상기 참조점 사이의 이동벡터를 생성하는 단계를 포함한다.According to another aspect of the invention, the method for estimating the pose and position of the camera for generating the image data projected by the object, comprising: receiving at least four feature points assumed to represent the object; Retrieving image coordinates of image data corresponding to each of the feature points; Selecting outliers from the feature points that are determined not to represent the object; Selecting a reference point close to the center of gravity of the feature points from the remaining feature points except the outliers; And a basis vector of a first coordinate system having the camera as an origin by using the plurality of feature points, the plurality of image coordinates, the reference point, reference image coordinates of image data corresponding to the reference point, and a focal length of the camera. Generating a rotation matrix comprising a row vector and a motion vector between the camera and the reference point.
상기 적어도 4개의 특징점은 상기 카메라와 상기 특징점 각각이 놓인 평면까지의 거리가 서로 다른 특징점으로 선택된다.The at least four feature points are selected as feature points having different distances from the camera and the plane on which the feature points are placed.
상기 이상점을 선택하는 단계는, 상기 복수의 특징점 각각에 대해서 최대 거리에 위치한 특징점을 검출하는 단계; 상기 임의의 특징점에 대하여 상기 최대 거리로 검출된 횟수를 상기 각 특징점의 거리인덱스로 설정하는 단계; 및 상기 복수의 특징점에서, 상기 이상점 기준 특징점과 최대 거리인덱스를 가지는 제1 특징점 사이의 거리인덱스를 가지는 특징점을 상기 이상점으로 선택하는 단계를 포함한다. 이때 상기 이상점 기준 특징점은, 상기 복수의 특징점에서, 최소 거리인덱스를 가지는 제2 특징점과 제3 특징점 사이의 거리인덱스를 가지는 특징점 각각과의 거리를 합한 거리합이 최소가 되는 제4 특징점과 상기 이상점 기준 특징점 사이의 거리 가 상기 제4 특징점의 상기 거리합 이상이 되는 특징점으로 선택되고, 상기 제3 특징점은 상기 이상점 기준 특징점의 거리인덱스보다 작은 거리인덱스 중 최대 거리인덱스를 가지는 특징점이다.The selecting of the outliers may include detecting a feature point located at a maximum distance with respect to each of the plurality of feature points; Setting the number of times detected as the maximum distance with respect to the arbitrary feature point as a distance index of each feature point; And selecting, as the outliers, a feature point having a distance index between the outlier reference feature point and the first feature point having the maximum distance index in the plurality of feature points. In this case, the outlier reference feature points may include a fourth feature point at which the sum of distances between the second feature points having the minimum distance index and the feature points having the distance index between the third feature points is the minimum and the fourth feature point. The distance between the ideal point reference feature points is selected as a feature point that is equal to or greater than the sum of the distances of the fourth feature point, and the third feature point is a feature point having a maximum distance index among distance indexes smaller than the distance index of the outlier reference feature point.
상기 이상점의 개수는 상기 복수의 특징점의 전체 개수의 절반 미만으로 선택된다.The number of outliers is selected to be less than half of the total number of the plurality of feature points.
상기 참조점을 선택하는 단계에서, 상기 이상점을 제외한 나머지 특징점 중에서, 상기 특징점 각각과의 거리를 합한 거리합이 최소가 되는 특징점으로 상기 참조점을 선택한다.In the selecting of the reference point, the reference point is selected as a feature point of which the sum of the distances of the feature points is the minimum among the remaining feature points except for the abnormal point.
상기 회전 행렬과 상기 이동벡터를 생성하는 단계는, 상기 이상점을 제외한 특징점 각각에 대하여, 상기 참조점과의 벡터를 계산하는 단계; 상기 이상점을 제외한 특징점 각각에 대하여, 제1 좌표를 계산하는 단계; 상기 이상점을 제외한 특징점 각각에 대하여, 상기 특징점 각각에 대응하는 상기 제1 좌표와 상기 참조 영상좌표 사이의 영상벡터를 계산하는 단계; 상기 이상점을 제외한 특징점 각각에 대하여, 상기 참조점과의 벡터와 상기 영상벡터를 이용하여, 상기 참조 영상좌표를 원점으로 하고 상기 영상 데이터에 의해 형성되는 제2 좌표계의 기저벡터를 계산하는 단계; 및 상기 제2 좌표계의 기저벡터 각각의 스케일요소를 이용하여, 상기 객체와 상기 객체가 크기변환되어 상기 제2 좌표계에 투영된 비율을 계산하는 단계를 포함하고, 상기 제1 좌표는, 상기 각 특징점이 상기 참조점을 원점으로 하는 제3 좌표계에 직교투영한 좌표가 상기 제2 좌표계에 정사영 투영한 좌표이다.The generating of the rotation matrix and the motion vector may include: calculating a vector with the reference point for each feature point except the outlier; Calculating first coordinates for each of the feature points except the outliers; Calculating an image vector between the first coordinate and the reference image coordinate corresponding to each of the feature points, for each feature point except the outlier; Calculating a basis vector of a second coordinate system formed by the image data, using the vector of the reference point and the image vector as the origin, for each of the feature points except the outliers; And calculating a ratio of the object and the object to be scaled and projected onto the second coordinate system by using scale elements of the basis vectors of the second coordinate system, wherein the first coordinates are the respective feature points. The coordinates orthogonal to the third coordinate system whose origin is the reference point are the coordinates which are orthogonally projected onto the second coordinate system.
이때, 상기 회전 행렬과 상기 이동벡터를 생성하는 단계는, 상기 카메라와 상기 참조 영상좌표 사이의 벡터 및 상기 비율을 이용하여, 상기 카메라와 상기 참조점 사이의 이동벡터를 계산하고, 상기 이동벡터를 상기 카메라의 위치에 대한 추정값으로 생성하는 단계를 더 포함한다. 또한 상기 회전 행렬과 상기 이동벡터를 생성하는 단계는, 상기 참조 영상좌표를 원점으로 하는 좌표계의 기저벡터 및 상기 비율을 이용하여, 상기 제1 좌표계의 기저벡터를 계산하고, 상기 제1 좌표계의 기저벡터를 행벡터로 구성한 회전 행렬을 상기 카메라의 자세에 대한 추정값으로 생성하는 단계를 더 포함한다.The generating of the rotation matrix and the motion vector may include calculating a motion vector between the camera and the reference point by using the vector and the ratio between the camera and the reference image coordinate, and calculating the motion vector. The method may further include generating an estimate of the position of the camera. The generating of the rotation matrix and the motion vector may include calculating a basis vector of the first coordinate system using a basis vector and a ratio of a coordinate system having the reference image coordinate as the origin, and calculating the basis of the first coordinate system. The method may further include generating a rotation matrix including a vector as a row vector as an estimate of the pose of the camera.
본 발명에 따르면, 단일 영상 프레임으로부터 실시간으로 카메라 자세 및 위치에 대한 추정값을 생성할 수 있다. 또한 입력된 좌표값 중에서 이상점을 제거한 후에 동적으로 참조점을 설정하여, 카메라 자세 및 위치에 대한 추정값의 정확도가 향상될 수 있다.According to the present invention, an estimate of the camera pose and position can be generated in real time from a single image frame. In addition, the reference point is dynamically set after removing the abnormal point from the input coordinate values, so that the accuracy of the estimated value for the camera pose and position may be improved.
아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.DETAILED DESCRIPTION Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art may easily implement the present invention. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. In the drawings, parts irrelevant to the description are omitted in order to clearly describe the present invention, and like reference numerals designate like parts throughout the specification.
명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 "…부", "…기", "모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.Throughout the specification, when a part is said to "include" a certain component, it means that it can further include other components, without excluding other components unless specifically stated otherwise. In addition, the terms “… unit”, “… unit”, “module”, etc. described in the specification mean a unit that processes at least one function or operation, which may be implemented by hardware or software or a combination of hardware and software. have.
본 발명의 실시예에 따른 카메라 자세 추정 장치 및 방법은, 단일 영상 프레임에서 한 물체(이하, "특정 객체"라 함)를 추적하여, 초기 추정값을 설정하지 않고 카메라 자세 및 위치에 대한 각각의 추정값을 생성한다. An apparatus and method for estimating camera pose according to an embodiment of the present invention tracks an object (hereinafter, referred to as a "specific object") in a single image frame, so that each estimated value for the camera pose and position is not set without an initial estimate. Create
이하에서는 본 발명의 실시예에 따른 카메라 자세 추정 장치에 대하여 도 1 및 도 2를 참고하여 설명한다.Hereinafter, a camera pose estimation apparatus according to an exemplary embodiment of the present invention will be described with reference to FIGS. 1 and 2.
도 1은 본 발명의 실시예에 따른 카메라 자세 추정 장치의 블록도이다.1 is a block diagram of a camera pose estimation apparatus according to an embodiment of the present invention.
도 1에 도시한 바와 같이, 본 발명의 실시예에 따른 카메라 자세 추정장치는 데이터 입력부(100), 이상점 결정부(200), 참조점 결정부(300) 및 추정값 계산부(400)를 포함한다.As shown in FIG. 1, an apparatus for estimating a camera pose according to an exemplary embodiment of the present invention includes a
데이터 입력부(100)는 특정 객체에 대한 적어도 4개의 3차원 로컬 좌표(이하, "특징점"이라 함) 및 단일 영상 프레임에서 특징점에 각각 대응되는 영상 좌표(이하, "특징 영상좌표"라 함)를 외부로부터 입력받는다. The
여기서 특징점은 특정 객체의 기하정보에 따라, 특정 객체의 외관에서 모서리, 꼭지점 등의 특징적인 부분의 좌표로 선택될 수 있다. 또한 적어도 4개의 특징점은, 특징점이 놓여진 평면과 카메라의 원점(이하, "원점"이라 함) 사이의 거리가 각각 다른 로컬 좌표로 결정된다. 즉, 특징점으로 선택되는 적어도 4개의 로컬좌표에서, 어느 하나의 로컬좌표와 원점 사이의 거리는 다른 3개의 로컬좌표에 의한 평면과 원점 사이의 거리와 다르다.In this case, the feature point may be selected as coordinates of a characteristic part such as an edge and a vertex in the appearance of the specific object according to the geometric information of the specific object. In addition, at least four feature points are determined by local coordinates having different distances between the plane on which the feature points are placed and the origin of the camera (hereinafter referred to as "origin"). That is, in at least four local coordinates selected as feature points, the distance between any one local coordinate and the origin is different from the distance between the plane and the origin by the other three local coordinates.
그리고 특징 영상좌표는 주변의 영상좌표와 다른 영상좌표를 검출하는 마커를 통해 검출될 수 있다. 마커를 이용하여 특징 영상좌표를 검출하는 것은 당업자에게 일반적으로 알려져 있는 사항이며, 본 발명의 실시예를 설명하는 것과 크게 관련이 없으므로, 이하에서 상세한 설명은 생략하기로 한다.The feature image coordinate may be detected through a marker that detects an image coordinate different from the surrounding image coordinate. Detecting feature image coordinates using a marker is generally known to those skilled in the art, and since it is not highly related to describing an embodiment of the present invention, a detailed description thereof will be omitted.
이상점 결정부(200)는, 특징점 중에서 특정 객체와 연관되지 않은 로컬좌표 (이하, "이상점"이라 함)를 선택한다. 이상점은 특정 객체에 관련된 로컬좌표가 아닌데도, 외부 요인이나 오류 등으로 인하여 특징점으로 결정된 로컬좌표이다. 이상점을 포함한 복수의 특징점으로부터 선택된 참조점에 의해 카메라의 자세 및 위치를 추정하면, 카메라 자세 및 위치에 대한 추정값과 실제값 사이에 비교적 큰 오차가 발생될 수 있다. 이상점 결정부(200)는, 특징점으로 인가된 로컬좌표 각각에 대해 다른 특징점들로부터 멀리 떨어진 로컬좌표들로 이상점을 선택한다. The
참조점 결정부(300)는 입력된 특징점 중에서 이상점을 제외한 나머지 특징점(이하, "참조 결정 그룹"이라 함)으로 참조점을 결정한다. 여기서, 참조점은 참조 결정 그룹의 무게 중심에 가장 근접하는 참조 결정 그룹의 특징점을 참조점으로 선택된다. 또한 참조점 결정부(300)는 참조점에 대응하는 특징 영상좌표(이하, "참조 영상좌표"라 함)를 결정한다.The
추정값 계산부(400)는 참조 결정 그룹의 특징점, 참조점 및 참조 영상좌표를 이용하여, 카메라 자세에 해당하는 회전 행렬과 카메라 위치에 해당하는 이동벡터를 계산한다. The estimated
이하에서는 본 발명의 실시예에 따른 카메라 자세 추정장치에서 입력된 특징점 중에서 이상점을 선택하는 이상점 결정부(200)에 대하여 설명한다.Hereinafter, the
도 2는 본 발명의 실시예에 따른 이상점 결정부(200)의 블록도를 나타낸 것이다.2 is a block diagram of the
도 2에 도시한 바와 같이, 이상점 결정부(200)는 거리계산부(210), 좌표정렬부(220) 및 이상점선택부(230)를 포함한다.As shown in FIG. 2, the
거리계산부(210)는 입력된 특징점 각각에 대하여, 해당 특징점과 나머지 특징점 각각과의 거리를 계산하여, 해당 특징점에서 가장 멀리 떨어진 특징점(이하, "최대거리 좌표"라 함)을 검색한다. 그리고, 거리계산부(210)는 최대거리 좌표가 검색된 경우마다, 최대거리 좌표로 검색된 특징점의 거리인덱스를 하나씩 증가시킨다. 이와 같이 모든 특징점 각각에 대응하여, 최대거리 좌표를 검색하고 최대거리 좌표가 된 특징점의 거리인덱스를 카운트한다.The
좌표정렬부(220)는 특징점의 거리인덱스를 오름차순으로 정렬하고, 오름차순으로 정렬된 거리인덱스에 따라 복수의 특징점을 정렬한다.The coordinate
이상점 선택부(230)는 어느 하나의 특징점과 나머지 특징점들 각각 과의 거리를 합한 값(이하, "거리합"이라 함)을 계산한다. 이와 같이, 복수의 특징점 각각의 거리합을 모두 계산하여, 최소 거리합 및 최소 거리합을 갖는 특징점(이하, "최소 거리합 특징점"이라 함)을 검출한다. 또한, 이상점 선택부(230)는, 임의로 선택 된 거리인덱스를 초과하는 거리인덱스를 갖는 특징점 중에서 최소 거리인덱스를 갖는 특징점(이하, "거리합 비교 특징점"이라 함)과 최소 거리합 특징점 사이의 거리가 최소 거리합보다 크면, 거리합 비교 특징점이 갖는 거리인덱스 내지 최대 거리인덱스를 갖는 특징점들을 이상점으로 선택한다. 한편, 이상점으로 결정되는 특징점이 너무 많아져서, 카메라 자세 및 위치를 계산하는 데에 오류가 발생될 수 있으므로, 이상점의 개수는 전체 특징점의 절반을 넘지 않도록 결정된다.The
이상과 같이, 본 발명의 실시예에 따르면, 다른 특징점들 각각과의 거리를 합한 값이 평균 이상이 되는 일부의 특징점들을 이상점으로 결정함으로써, 이하에서 설명할 참조점을 결정하는 데에 있어 오류를 줄일 수 있다. 또한, 이상점을 한번에 제거함으로써, 복잡한 계산을 줄일 수 있다.As described above, according to an embodiment of the present invention, by determining some feature points whose sums of distances with other feature points are above the average, the error in determining the reference point to be described below. Can be reduced. In addition, by eliminating outliers at once, complicated calculations can be reduced.
다음으로, 본 발명의 실시예에 따른, 단일 영상 프레임으로부터 초기 추정값을 설정하지 않고 카메라 자세를 추정하는 방법에 대하여 설명한다.Next, a method of estimating a camera pose without setting an initial estimated value from a single image frame according to an embodiment of the present invention will be described.
도 3은 본 발명의 실시예에 따른 카메라 자세 추정 방법의 순서도를 나타낸 것이다.3 is a flowchart illustrating a camera pose estimation method according to an embodiment of the present invention.
도 3에 도시한 바와 같이, 특징점 및 특징영상좌표가 입력된다(S310). 이때, 특징점은 적어도 4개의 로컬좌표로 결정되며, 특징점으로 결정된 적어도 4개의 로컬좌표에 있어서, 4개의 로컬좌표 중에서 어느 하나의 로컬좌표와 원점 사이의 거리는 다른 3개의 로컬좌표에 의한 평면과 원점 사이의 거리와 다른 값을 갖는다. As shown in FIG. 3, a feature point and a feature image coordinate are input (S310). At this time, the feature point is determined by at least four local coordinates, and in at least four local coordinates determined by the feature point, the distance between any one local coordinate and the origin of the four local coordinates is between the plane and the origin by the other three local coordinates. Has a different value from the distance.
이와 같이 입력된 특징점 중에서, 카메라 자세 및 위치의 추정값에서 오차를 발생시키는 원인이 되는 이상점을 선택한다(S320). 이때, 이상점은 다른 특징점들 로부터 멀리 떨어진 특징점들로 특징점의 전체개수의 절반 미만의 범위 내에서 선택된다. Out of the inputted feature points, an abnormal point that causes an error in the estimated value of the camera pose and position is selected (S320). At this time, the outliers are selected within the range of less than half of the total number of feature points as feature points far from other feature points.
입력된 특징점 중에서 이상점을 제외한 나머지 특징점(참조 결정 그룹)으로부터, 참조점 및 참조 영상좌표를 결정한다(S330). 여기서, 참조점은 참조 결정 그룹에 포함된 특징점 중에서 참조 결정 그룹의 무게중심에 근접한 특징점이며, 참조 영상좌표는 참조점에 대응하는 영상좌표이다. A reference point and a reference image coordinate are determined from the remaining feature points (reference determination group) except the abnormal point among the input feature points (S330). Here, the reference point is a feature point close to the center of gravity of the reference decision group among the feature points included in the reference decision group, and the reference image coordinate is the image coordinate corresponding to the reference point.
다음, 참조 결정 그룹, 참조점과 참조영상좌표를 이용하여, 영상 데이터를 생성한 카메라를 원점으로 하는 좌표계(이하, "카메라 좌표계"라 함)와 참조점을 원점으로 하는 좌표계(이하, "참조점 좌표계"라 함) 사이의 기저벡터를 계산하고, 카메라 좌표계의 원점에서 참조점이 놓여진 평면 사이의 거리(이하, "깊이좌표"라 함)을 계산한다(S340). 이와 같이 계산된 기저벡터와 깊이좌표를 통해 카메라의 회전행렬과 이동벡터에 대한 각각의 추정값을 생성한다(S350).Next, by using the reference decision group, the reference point and the reference image coordinates, a coordinate system (hereinafter referred to as "camera coordinate system") as the origin of the camera that generated the image data and a coordinate system (hereinafter referred to as "reference") The basis vector between the point coordinate system "is calculated, and the distance between the plane at which the reference point is placed from the origin of the camera coordinate system (hereinafter referred to as" depth coordinate ") is calculated (S340). Each estimated value for the rotation matrix and the motion vector of the camera is generated through the calculated base vector and the depth coordinate (S350).
도 4는 본 발명의 실시예에 따른 이상점을 선택하는 방법에 대한 순서도를 나타낸 것이다. 도 4에서 N은 입력된 특징점의 총개수를 의미하고, k, i 및 j는 특징점의 인덱스를 나타낸다.4 is a flowchart illustrating a method of selecting an outlier according to an embodiment of the present invention. In FIG. 4, N denotes the total number of input feature points, and k, i, and j denote indexes of the feature points.
도 4에 도시한 바와 같이, 특정 객체에 대응하는 적어도 4개의 특징점이 외부로부터 입력된다(S410). 여기서 4개의 특징점은 특징점이 놓여진 평면과 카메라의 원점(이하, "원점"이라 함) 사이의 거리가 각각 다른 로컬 좌표로 결정된다.As shown in FIG. 4, at least four feature points corresponding to a specific object are input from the outside (S410). The four feature points are determined by local coordinates having different distances between the plane on which the feature points are placed and the origin of the camera (hereinafter referred to as "origin").
외부로부터 입력된 특징점 각각에 대응하여 최대 거리에 위치한 특징점(최대거리 좌표)을 검출한다(S411). 이와 같이 최대 거리 좌표를 검출할 때마다, 최대 거리 좌표로 검출된 특징점의 거리인덱스를 하나씩 증가시킨다(S412). 즉, 임의의 특징점에 대하여 최대 거리 좌표를 결정한 후에, 최대 거리 좌표로 결정된 특징점의 거리인덱스를 카운트한다. 이와 같이 모든 특징점에 대하여 최대 거리 좌표를 검출하고, 최대 거리 좌표가 검출될 때마다 최대 거리 좌표에 해당하는 특징점을 카운트하면, 최대 거리 좌표로 결정되는 횟수가 많을수록, 해당하는 특징점의 거리인덱스가 높아진다.A feature point (maximum distance coordinate) located at the maximum distance is detected corresponding to each feature point input from the outside (S411). Each time the maximum distance coordinate is detected, the distance index of the feature point detected as the maximum distance coordinate is increased by one (S412). That is, after determining the maximum distance coordinate with respect to any feature point, the distance index of the feature point determined as the maximum distance coordinate is counted. As described above, when the maximum distance coordinates are detected for all the feature points and the feature points corresponding to the maximum distance coordinates are counted each time the maximum distance coordinates are detected, the larger the number of times determined as the maximum distance coordinates, the higher the distance index of the corresponding feature points is. .
다음, 각 특징점의 거리인덱스를 오름차순으로 정렬한 후에, 오름차순으로 정렬된 거리인덱스 순으로 특징점을 재배열한다(S420). 도 4에서 특징점(P0, P1, P2,…, PN -1)는 오름차순으로 정렬된 거리인덱스에 따라 재배열된 특징점을 나타낸다. 즉, P0은 최대거리좌표로 결정된 횟수가 가장 적은 특징점이고, PN -1은 최대거리좌표로 결정된 횟수가 가장 많은 특징점이다.Next, after sorting the distance indexes of each feature point in ascending order, the feature points are rearranged in the order of the distance indexes arranged in ascending order (S420). In FIG. 4, the feature points P 0 , P 1 , P 2 ,..., P N −1 represent rearranged feature points according to the distance indexes arranged in ascending order. That is, P 0 is the feature point with the smallest number of times determined by the maximum distance coordinates, and P N -1 is the feature point with the most number of times determined by the maximum distance coordinates.
복수의 특징점(P0, P1, P2,…, PN -1)을 거리인덱스의 오름차순에 따라 정렬시킨 후, N-2 내지 N-(N/2)-1의 인덱스를 갖는 특징점 중에서 선택되는 이상 경계 특징점을 결정한다. 이상 경계 특징점은 다음과 같은 과정을 통해 결정한다.After aligning a plurality of feature points (P 0 , P 1 , P 2 ,..., P N -1 ) in ascending order of the distance index, among the feature points having indices of N-2 to N- (N / 2) -1 Determine the ideal boundary feature point selected. The ideal boundary feature is determined by the following process.
우선, N-2 내지 N-(N/2)-1의 인덱스를 갖는 특징점 중에서 임의의 특징점(Pj)을 결정한다. 그리고 복수의 특징점(P0, P1, P2,…, PN -1) 중 어느 하나의 특징점(Pk)을 기준으로, 최소 거리인덱스를 갖는 특징점(P0) 내지 임의의 특징점(Pj) 사이에 배열되는 특징점들과의 각각의 거리를 계산하고, 이와 같이 계산 된 거리들을 합한 거리합을 특징점(Pk)에 대한 거리합으로 결정한다. 이와 같이 복수의 특징점(P0, P1, P2,…, PN -1)에 대해 각각의 거리합을 계산한 다음, 각 특징점에 대한 거리합 중에서 최소값(최소 거리합)을 검출하고, 이때 최소 거리합이 되게 하는 특징점(최소 거리합 특징점, Pt)를 검출한다(S430). 수학식 1은 최소 거리합 특징점(Pt)의 인덱스를 검출하는 식이다.First, an arbitrary feature point P j is determined among feature points having indices of N-2 to N- (N / 2) -1. And based on any of the feature point (P k ) of the plurality of feature points (P 0 , P 1 , P 2 , ..., P N -1 ), feature point (P 0 ) having a minimum distance index to any feature point (P P) Calculate each distance with the feature points arranged between j ), and determine the sum of the distances summed up as the distances with respect to the feature point P k . As described above, each distance sum is calculated for a plurality of feature points P 0 , P 1 , P 2 ,..., P N -1 , and then a minimum value (minimum distance sum) is detected from the sum of distances for each feature point. At this time, a feature point (minimum distance sum feature point, P t ) which becomes the minimum distance sum is detected (S430). Equation 1 detects an index of the minimum distance sum feature point Pt.
수학식 1에서, t는 최소 거리합 특징점(Pt)의 인덱스이고, Pk는 복수의 특징점(P0, P1, P2,, PN -1) 중 어느 하나의 특징점을 나타낸 것이다. 그리고 Pi는 0 내지 j의 인덱스를 갖는 특징점 중에서 임의의 특징점을 나타낸 것이다. In Equation 1, t is an index of the minimum distance sum feature point P t , and P k represents a feature point of any one of the plurality of feature points P 0 , P 1 , P 2 , and P N -1 . P i represents an arbitrary feature point among feature points having indices of 0 to j.
이후, 임의의 특징점(Pj)보다 거리인덱스가 큰 특징점들 중에서 최소 거리인덱스를 갖는 특징점(Pj +1)과 최소 거리합 특징점(Pt) 사이의 거리와 최소거리합을 비교한다(S431). Thereafter, the distance between the feature point P j +1 having the minimum distance index and the minimum distance sum feature point P t among the feature points having a larger distance index than an arbitrary feature point P j is compared (S431). ).
특징점(Pj +1)과 최소 거리합 특징점(Pt) 사이의 거리가 최소 거리합 이하이 면, N-2 내지 N/2-1의 인덱스를 갖는 특징점 중에서 새로운 특징점(Pj)을 결정하여, 수학식 1의 과정을 수행한다(S430).If the distance between the feature point P j +1 and the minimum distance sum feature point P t is less than or equal to the minimum distance sum, a new feature point P j is determined among the feature points having indices of N-2 to N / 2-1. In operation S430, the process of Equation 1 is performed.
반면, 특징점(Pj +1)과 최소 거리합 특징점(Pt) 사이의 거리가 최소 거리합을 초과하면, 현재 수행에서의 특징점(Pj)을 이상 경계 특징점으로 결정하고, 특징점(Pj +1) 내지 특징점(PN -1) 사이에 배열된 특징점들을 이상점으로 결정한다(S432).On the other hand, if the distance between the feature point P j +1 and the minimum distance sum feature point P t exceeds the minimum distance sum, the feature point P j in the current performance is determined as the abnormal boundary feature point, and the feature point P j The feature points arranged between +1 ) and the feature point P N −1 are determined as outliers (S432).
이하에서는, 도 4에 도시한 이상로컬좌표를 선택하는 방법에 대하여, 거리인덱스의 오름차순으로 정렬된 특징점(P0~P9)의 경우를 예시로 들어서 설명한다. 여기서 특징점(P0~P9)의 전체 개수는 10개이며, 특징점(P0)은 전체 특징점(P0~P9) 중에서 최대거리좌표로 결정된 횟수가 가장 적은 특징점이고, 특징로컬조표(P9)는 전체 특징점(P0~P9) 중에서 최대거리좌표로 결정된 횟수가 가장 많은 특징점이다.Hereinafter, the method of selecting the abnormal local coordinates shown in FIG. 4 will be described by taking the case of the feature points P 0 to P 9 arranged in ascending order of the distance index. Here, the characteristic point (P 0 ~ P 9) The total number is 10, the characteristic point (P 0) is the full feature points (P 0 ~ P 9) from jeomyigo the lowest characteristic number determined by the maximum distance coordinates, characterized in local key signature (P 9 ) is the feature point having the largest number of times determined as the maximum distance coordinate among the feature points P 0 to P 9 .
우선, 8 내지 4의 인덱스를 갖는 특징점 중에서 임의의 특징점(Pj)를 결정한다. 첫번째 수행에서는 임의의 특징점(Pj)의 인덱스(j)는 8인 것으로 가정한다. First, an arbitrary feature point P j is determined among feature points having indices of 8 to 4. FIG. In the first implementation, it is assumed that the index j of any feature point P j is eight.
첫번째 수행에서, 특징점(P0)을 기준으로 하여 특징점(P0~P8) 사이의 거리들을 합한 거리합을 계산하고, 이와 마찬가지로 특징점(P1~P9)을 각각 기준으로 했을 경우의 거리합을 계산한다. 이와 같이 계산된 거리합 중에서 최소값(최소 거리합)이 발생된 것은, 특징점(P3)을 기준으로 했을 때라고 가정하면, 특징점(P3)과 특징 점(P9) 사이의 거리와 최소 거리합을 비교한다. 이때 특징점(P3)과 특징점(P9) 사이의 거리가 최소 거리합 이하이면, j를 카운트하여 다시 수학식 1의 과정을 수행한다.In the first carried out, the distance in the case where the characteristic point (P 0) for the In to the characteristic point (P 0 ~ P 8) and calculates the sum of distances distance sum between the Likewise, the characteristic point (P 1 ~ P 9) based on each of the reference Calculate the sum. It is the thus calculated distance, the minimum value (minimum distance sum) from the sum occurs, assuming it is time when, based on the characteristic point (P 3), the characteristic point (P 3) and feature point (P 9), the distance and the minimum distance sum between Compare If the distance between the feature point P 3 and the feature point P 9 is equal to or less than the minimum distance sum, j is counted and the process of Equation 1 is performed again.
즉, 두번째 수행에서 j를 7로 설정한 것으로 가정한다. 이후, 두번째 수행에서 특징점(P0~P9)을 각각 기준으로 했을 때, 특징점(P0~P7) 사이의 거리들을 합한 거리합을 계산한다. 이때 특징점(P1)을 기준으로 했을 때 최소 거리합이 발생되었다고 가정하면, 특징점(P1)과 특징점(P8) 사이의 거리와 두번째 수행에서의 최소 거리합을 비교한다. 이때 특징점(P1)과 특징점(P8) 사이의 거리가 두번째 수행에서의 최소 거리합을 초과하면, 특징점(P8~P9)를 이상점으로 결정한다.In other words, it is assumed that j is set to 7 in the second execution. Subsequently, when the feature points P 0 to P 9 are used as reference in the second execution, the sum of distances obtained by adding up the distances between the feature points P 0 to P 7 is calculated. At this time, assuming that the minimum distance sum, when, based on the characteristic point (P 1) occurs, and compares the distance with a minimum distance of the second sum performed between the characteristic point (P 1) and the characteristic point (P 8). At this time, if the distance between the feature point (P 1 ) and the feature point (P 8 ) exceeds the sum of the minimum distance in the second execution, the feature points (P 8 ~ P 9 ) is determined as the outlier.
본 발명의 실시예에 따르면, 다른 점들에 비해 비교적 멀리 떨어진 로컬좌표들을 특정 객체를 직접적으로 나타내지 않는 이상점으로 결정한다. 또한 j의 범위를 N-2 내지 N-(N/2)-1으로 설정하여, 이상점의 개수가 전체 특징점 개수의 절반 이상이 되는 것을 방지한다. 이에 따라, 이상점을 제외한 나머지 특징점으로 참조점을 결정할 때에 오류를 감소시킬 수 있다. 카메라 자세 및 위치에 대한 추정값은 설정된 참조점에 따라 달라지므로, 참조점을 적절하게 설정할수록 추정값의 오차가 줄어들게 된다.According to an embodiment of the present invention, local coordinates relatively far from other points are determined as outliers that do not directly represent a particular object. In addition, the range of j is set to N-2 to N- (N / 2) -1 to prevent the number of abnormal points from being more than half of the total feature points. Accordingly, an error can be reduced when determining the reference point with the remaining feature points except the abnormal point. Since the estimated values for the camera pose and position vary depending on the set reference points, the appropriate setting of the reference points reduces the error of the estimated values.
이하에서는, 이상점을 제외한 나머지 특징점중에서 참조점을 선택하는 방법에 대하여 설명한다.Hereinafter, a method of selecting a reference point from the remaining feature points except the abnormal point will be described.
도 5는 본 발명의 실시예에 따른 참조점을 선택하는 방법에 대한 순서도를 나타낸 것이다. 도 5에서, M은 입력된 특징점 중에서 이상점을 제외한 나머지 특징점의 개수를 의미하며, i, j는 특징점의 인덱스를 의미하고, di는 특징점(Pi)을 기준으로 다른 특징점들과의 거리들을 합한 거리합을 의미한다.5 is a flowchart illustrating a method of selecting a reference point according to an embodiment of the present invention. In FIG. 5, M denotes the number of remaining feature points except outliers among input feature points, i and j denote indexes of feature points, and di denotes distances from other feature points based on feature point P i . Sum of distances.
N개의 특징점 중에서 이상점을 제외한 나머지 M개의 특징점을 입력한다(S510). The M feature points other than the abnormal point among the N feature points are input (S510).
M개의 특징점 중 임의의 특징점(Pi)을 기준으로 다른 특징점들과의 각각의 거리를 합한 거리합(di)을 계산한다(S520). 수학식 2는 특징점(Pi)에 대한 거리합(di)을 계산하는 식이다.And calculates the distance sum (d i) the sum of the respective distance to the other feature points on the basis of any characteristic point (P i) of the M feature points (S520). Equation 2 is an equation for calculating the total distance (d i) of the characteristic point (P i).
수학식 2에 의해 M개의 특징점(Pi)에 대한 각각의 거리합(di)을 계산하면, 계산된 거리합(di) 중에서 최소값을 검출하고, 최소값이 되는 특징점(Pr)을 검출한다(S530). 이와 같이 검출된 특징점(Pr)을 참조점으로 출력한다(S540).When calculating the M feature points (d i) sum the respective distance to the (P i) by equation (2), and detecting a minimum value among the calculated distance sum (d i), detecting a feature point that is the minimum value (P r) (S530). The detected feature point P r is output as a reference point (S540).
이하에서는 이상로컬좌표를 제외한 나머지 특징점의 개수가 4개인 경우를 예로 들어서 도 5에 도시한 참조점을 설정하는 방법에 대하여 설명한다. Hereinafter, a method of setting the reference point shown in FIG. 5 will be described taking as an example the case where the number of the characteristic points excluding the local coordinates is four.
우선, 이상점을 제외한 나머지 특징점(P0~P3)이 입력된다.First, the remaining feature points P 0 to P 3 except for the abnormal point are input.
다음, 특징점(P0)에 대한 거리합(d0), 특징점(P1)에 대한 거리합(d1), 특징점(P2)에 대한 거리합(d2), 특징점(P3)에 대한 거리합(d3)을 각각 계산한다. 수학식 2에 따르면, 거리합(d0)은 ((P0-P1)+(P0-P2)+(P0-P3))이고, 거리합(d1)은 ((P1-P0)+(P1-P2)+(P1-P3)))이 되며, 거리합(d2)은 ((P2-P0)+(P2-P1)+(P2-P3)))이 되고, 거리합(d3)은 ((P3-P0)+(P3-P1)+(P3-P2)))이 된다.Next, the feature point sum distance of the (P 0) (d 0) , the characteristic point distance Sum (d 2) of the distance sum (d 1), the characteristic point (P 2) for (P 1), the characteristic point (P 3) Compute the sum of distances (d 3 ) for each. According to Equation 2, the distance sum d 0 is ((P 0 -P 1 ) + (P 0 -P 2 ) + (P 0 -P 3 )), and the distance sum d 1 is ((P 1 -P 0 ) + (P 1 -P 2 ) + (P 1 -P 3 ))), and the sum of distances (d 2 ) is ((P 2 -P 0 ) + (P 2 -P 1 ) + (P 2 -P 3 ))), and the sum of the distances d 3 becomes ((P 3 -P 0 ) + (P 3 -P 1 ) + (P 3 -P 2 )).
이와 같이 계산된 거리합(d1~d3)중에서 최소값을 검출하고, 최소값이 되게 하는 특징점으로 참조점을 결정한다. 예를 들면, 거리합(d1~d3)중에서 거리합(d2)가 최소값이라면, 특징점(P2)가 참조점으로 결정된다.The minimum value is detected from the sums of distances d 1 to d 3 calculated as described above, and the reference point is determined as a feature point that makes the minimum value. For example, if the distance sum d 2 is the minimum value among the distance sums d 1 to d 3 , the feature point P 2 is determined as the reference point.
이상과 같이, 본 발명의 실시예에 따르면, 입력된 특징점에서 이상로컬좌표를 제외한 나머지 특징점들 중에서 특징점들의 무게중심에 가장 근접한 특징점을 참조점으로 설정함으로써, 카메라의 자세 및 위치에 대한 추정값을 생성할 때에 오차를 최소한으로 감소시킬 수 있다.As described above, according to an exemplary embodiment of the present invention, an estimated value for the pose and position of the camera is generated by setting the feature point closest to the center of gravity of the feature points as the reference point among the remaining feature points except the abnormal local coordinates. The error can be reduced to a minimum.
이하에서는, 이상점을 제외한 나머지 특징점 및 참조점으로부터 카메라의 자세 및 위치에 대한 추정값을 계산하는 방법에 대하여 설명한다.Hereinafter, a method of calculating an estimated value for the pose and position of the camera from the remaining feature points and reference points except for the abnormal point will be described.
본 발명의 실시예에 따르면, 특정 객체를 나타내는 특징점들의 무게 중심에 가장 근접한 참조점과 카메라의 중심점을 원점(0, 0, 0)으로 한 카메라 좌표계 사 이의 관계로부터 카메라의 자세 및 위치를 추정한다. 즉, 카메라 좌표계의 원점과 참조점 사이의 회전 각도를 나타내는 회전 행렬을 카메라의 자세에 대한 추정값으로 설정하고, 카메라 좌표계의 원점과 참조점 사이의 떨어진 거리를 나타내는 이동벡터를 카메라의 위치에 대한 추정값으로 설정한다. 이때 카메라의 원점은 카메라 개개의 특성에 의해 결정되므로, 이하에서 자세한 설명은 생략한다.According to an embodiment of the present invention, the pose and position of the camera are estimated from the relationship between the reference point closest to the center of gravity of the feature points representing the specific object and the camera coordinate system with the center point of the camera as the origin (0, 0, 0). . That is, the rotation matrix representing the rotation angle between the origin and the reference point of the camera coordinate system is set as an estimate value for the pose of the camera, and the motion vector representing the distance away between the origin and the reference point of the camera coordinate system is an estimated value for the camera position. Set to. At this time, the origin of the camera is determined by the individual characteristics of the camera, a detailed description thereof will be omitted below.
수학식 3은 회전행렬을 나타낸 것이다.Equation 3 shows the rotation matrix.
수학식 3에서, 은 회전 행렬을 의미하며 , 및 는 카메라 좌표계의 기저벡터(basis vector)를 나타내며, 는 행렬 회전을 나타낸다. 수학식 3에 나타낸 바와 같이, 회전행렬()은 카메라 좌표계의 기저벡터(, , )를 행벡터로 구성한 행렬 회전으로 구성된다. In Equation 3, Means the rotation matrix , And Represents the basis vector of the camera coordinate system, Denotes the matrix rotation. As shown in equation (3), the rotation matrix ( ) Is the basis vector ( , , ) Consists of a matrix rotation consisting of row vectors.
수학식 4는 이동벡터를 나타낸 것이다.Equation 4 shows a motion vector.
수학식 4에서, 는 이동벡터를 나타내고, 는 참조점(Pr)이 놓인 평면에서 카메라 좌표계의 원점 사이의 거리(이하 "참조깊이좌표"라 함)를 나타낸다. 그리고 는 카메라의 초점거리를 나타내고, ()는 참조점이 영상 데이터에 투영된 영상좌표(참조영상좌표)와 카메라의 원점에 대한 벡터를 의미한다. 이때 초점거리()는 카메라의 원점과 영상이 생성되는 부분(예를 들면, CCD 센서)사이의 거리를 의미한다. 수학식 4에 나타낸 바와 같이, 이동벡터()는 참조깊이좌표(), 초점거리() 및 영상벡터()에 대한 관계식으로 나타낼 수 있다.In Equation 4, Represents the motion vector, Denotes the distance (hereinafter referred to as "reference depth coordinate") between the origin of the camera coordinate system in the plane on which the reference point P r is placed. And Indicates the focal length of the camera, ( ) Denotes a vector of an image coordinate (reference image coordinate) on which the reference point is projected on the image data and the origin of the camera. The focal length ( ) Denotes the distance between the camera origin and the portion (eg, CCD sensor) where the image is generated. As shown in Equation 4, the motion vector ( ) Is the reference depth coordinate ( ), Focal length ( ) And image vector ( In relation to
이상과 같이, 카메라의 자세와 위치에 대한 추정값을 생성하기 위해서는, 카메라 좌표계의 기저벡터(, , ), 참조깊이좌표(), 초점거 리() 및 영상벡터()의 값이 요구된다. 여기서, 기저벡터()는 기저벡터()와 기저벡터()의 외적으로 계산될 수 있고, 초점거리()는 초기 동작시에 특징점과 함께 입력되며, 영상벡터()는 참조영상좌표로부터 계산될 수 있다. 따라서 기저벡터(), 기저벡터() 및 참조깊이좌표()를 계산하는 과정이 별도로 요구된다. As described above, in order to generate an estimated value for the pose and position of the camera, the basis vector of the camera coordinate system ( , , ), Reference depth coordinate ( ), Focal length ( ) And image vector ( Is required. Where the basis vector ( ) Is the basis vector ( ) And basis vector ( Can be calculated externally, and the focal length ( ) Is input along with the feature point at the initial operation, and the image vector ( ) May be calculated from the reference image coordinates. So the basis vector ( ), Basis vector ( ) And reference depth coordinates ( ) Is required separately.
본 발명의 실시예에 따르면, 정사영 투영모델을 이용하여, 카메라좌표계의 기저벡터(, ) 및 참조깊이좌표()를 계산한다.According to an embodiment of the present invention, by using an orthographic projection model, the basis vector of the camera coordinate system ( , ) And reference depth coordinates ( Calculate
도 6은 본 발명의 실시예에 따른 정사영 투영모델(Scaled Orthographic Projection) 기하도를 나타낸 것이다.FIG. 6 illustrates a scaled orthographic projection model according to an embodiment of the present invention.
도 6에서, 는 카메라 좌표계의 원점을 나타내고, 는 카메라 좌표계를 의미한다. 은 참조점을 나타내며, 는 참조점을 원점으로 하는 3차원좌표계(이하, "로컬좌표계"라 함)를 의미한다. 그리고 은 참조영상좌표를 나타내며, 는 참조영상좌표를 원점으로 하는 2차원좌표계(이하, "영상좌표계"라 함)를 의미하고, 는 초점거리를 나타내며, 는 참조깊이좌표를 나타낸다. In Figure 6, Represents the origin of the camera coordinate system, Is the camera coordinate system. Represents a reference point, Means a three-dimensional coordinate system (hereinafter referred to as a "local coordinate system") whose reference point is the origin. And Represents the reference image coordinates, Means a two-dimensional coordinate system (hereinafter referred to as an "image coordinate system") whose reference image coordinate is the origin, Indicates the focal length, Indicates the reference depth coordinate.
또한 도 4에서 는 임의의 특징점이며, 는 특징점()가 영상데이터에 원근투영(perspective projection)된 영상좌표(이하, "원근 투영 영상좌표"라 함)이다. 그리고 는 특징점()가 로컬좌표계에 직교 투사된 로컬좌표를 나타내며, 는 로컬좌표()가 영상데이터 좌표계에 크기변환 정사영 투영(scaled orthographic projection)되는 영상 좌표이다. 이하에서 영상좌표()는 특징점()에 대한 직교 정사영 투영 영상좌표라 한다. 도 4에 도시한 정사영 투영모델에서, 실제 특정 객체의 크기는 크기변수()의 비율로 영상 데이터에 크기변환되며, 크기변수()는 으로 정의된다.Also in Figure 4 Is any feature point, Is a feature point ( ) Are image coordinates (hereinafter referred to as "perspective projection image coordinates") which are perspective projections on the image data. And Is a feature point ( ) Represents the local coordinates projected orthogonal to the local coordinate system, Is the local coordinate ( ) Are image coordinates that are scaled orthographic projection onto the image data coordinate system. Here is the video coordinate ( ) Is a feature point ( Orthogonal orthographic projection image coordinate for. In the orthographic projection model shown in Fig. 4, the size of the actual specific object is a size variable ( To the image data at the ratio of ) Is defined.
특징점()에 대한 직교 정사영 투영 영상좌표()의 x-좌표와 y-좌표는 아래의 수학식 5와 같이 나타낼 수 있다.Feature points ( Orthographic Orthographic Projected Image Coordinates for The x-coordinate and y-coordinate of) can be expressed by Equation 5 below.
그리고 참조점()와 특징점()에 대한 벡터()를 정사영 크기변 환한 상태의 x-좌표와 y-좌표는 아래의 수학식 6과 같이 나타낼 수 있다.And a reference point ( ) And feature points ( Vector for X-coordinate and y-coordinate of the orthogonal size conversion state can be expressed by Equation 6 below.
수학식 6에서, 와 는 각각 영상좌표()의 좌표인 와 를 나타낸다. 이때 는 특징점()의 원근 투영 영상좌표()와 특징점()의 직교정사영 투영 영상좌표()의 차이를 나타내기 위한 것(이하, "오차"라 함)으로써, 으로 정의될 수 있다. 수학식 6에 나타낸 바와 같이, 벡터()의 좌표는 크기변수(), 참조영상좌표() 및 영상좌표()를 이용한 관계식으로 나타낼 수 있다.In Equation 6, Wow Is the image coordinate ( ) Coordinates Wow Indicates. At this time Is a feature point ( Perspective projection image coordinate ( ) And feature points ( Orthogonal Projection Image Coordinates () ) To indicate the difference between It can be defined as. As shown in equation (6), the vector ( ) Is the size variable ( ), Reference image coordinates ( ) And image coordinates ( Can be expressed as a relational expression using
한편, 참조점()와 특징점()에 대한 벡터를 벡터()로 나타내면, 벡터()는 벡터()와 벡터의 합으로 나타낼 수 있다. 수학식 7는 벡터()와 벡터 사이의 관계식으로 벡터()를 나타낸 것이다.On the other hand, the reference point ( ) And feature points ( Vector for ( ), The vector ( ) Is a vector ( ) And vector It can be expressed as the sum of. Equation 7 is a vector ( ) And vector The relation between the vectors ).
수학식 7에 나타낸 바와 같이, 벡터()는 벡터()와 벡터의 합으로 나타낼 수 있다. 여기서 벡터()는 참조영상 좌표()와 영상좌표()에 대한 벡터인 영상벡터()와 크기변수()의 비율로 비례한다.As shown in equation (7), the vector ( ) Is a vector ( ) And vector It can be expressed as the sum of. Where vector ( ) Is the reference image coordinate ( ) And image coordinates ( Is a vector of ) And size variables ( Is proportional to
수학식 7의 양변에 기저벡터()를 내적하면, 아래의 수학식 8과 같이 정리될 수 있다.On both sides of Equation 7, the basis vector ( ) Can be summarized as in Equation 8 below.
수학식 8에 나타낸 바와 같이, 벡터와 기저벡터()를 내적하면 x-축과 수직이고, 영상벡터()와 기저벡터()를 내적하면 영상벡터()의 x-좌표인 가 된다.As shown in equation (8), the vector And basis vector ( ) Is internal to the x-axis and the image vector ( ) And basis vector ( ) With the dot product, the image vector ( Is the x-coordinate of) Becomes
그리고, 수학식 8과 마찬가지로, 수학식 7의 양변에 기저벡터()를 내적하면, 아래의 수학식 9와 같이 정리될 수 있다.And, similarly to Equation 8, the basis vector ( ) Can be summarized as in Equation 9 below.
수학식 9에 나타낸 바와 같이, 벡터와 기저벡터()를 내적하면 y-축과 수직이고, 영상벡터()와 기저벡터()를 내적하면 영상벡터()의 y-좌표인 가 된다.As shown in equation (9), the vector And basis vector ( ) Is internal to the y-axis and the image vector ( ) And basis vector ( ) With the dot product, the image vector ( Is the y-coordinate of) Becomes
수학식 8 및 수학식 9에서, 카메라 좌표계의 기저벡터()와 영상좌표계의 기저벡터()는 서로 비례하고, 카메라좌표계의 기저벡터()는 영상좌표계의 기저벡터()는 서로 비례한다. 즉, 영상좌표계의 기저벡터()는 으로 나타낼 수 있고, 영상좌표계의 기저벡터()는 으로 나타낼 수 있다.In Equations 8 and 9, the basis vector of the camera coordinate system ( ) And the ground vector ( ) Are proportional to each other, and the basis vector ( ) Is the basis vector ( ) Are proportional to each other. In other words, the basis vector ( ) The basis vector of the image coordinate system ) It can be represented as
따라서, 수학식 8 및 수학식 9는 아래의 수학식 10과 같이 정리될 수 있다.Therefore, Equations 8 and 9 may be arranged as in Equation 10 below.
수학식 10에 나타낸 바와 같이, 참조점()과 임의의 특징점() 사이의 벡터()와 특징점()의 원근 투영 영상좌표() 및 참조영상좌표()를 통해 기저벡터()와 기저벡터()를 구할 수 있다. 수학식 10에 의해 계산된 기저벡터()와 기저벡터()로부터 기저벡터()와 기저벡터()를 구할 수 있고, 기저벡터()와 기저벡터()의 외적으로 기저벡터()를 계산할 수 있다. As shown in Equation 10, the reference point ( ) And any feature points ( Vector between ) And feature points ( Perspective projection image coordinate ( ) And reference image coordinates ( ) Through the basis vector ( ) And basis vector ( ) Can be obtained. The basis vector calculated by equation (10) ) And basis vector ( From the vector ) And basis vector ( ) And the basis vector ( ) And basis vector ( Externally the basis vector ( ) Can be calculated.
또한 기저벡터()의 크기 성분과 기저벡터()의 크기 성분의 평균으로부터 크기변수()가 계산된다. 이와 같이 계산되는 크기변수() 및 초점거리()로부터 참조크기좌표()를 구할 수 있다. Also, the basis vector ( ) And the magnitude vector of the From the mean of the size components of ) Is calculated. The size variable calculated in this way ( ) And focal length ( From reference size coordinates ( ) Can be obtained.
한편, 오차()가 정확하지 않으면, 카메라 자세 및 위치에 대한 근사적으로 계산된다. 따라서 오차()를 정확하게 계산하는 것이 필요하다. 본 발명의 실시예에 따르면, 오차()를 반복계산하고, 미리 정의된 임계치 이하가 되도록 한다. 즉, 전의 수행에서 계산된 오차()로부터 크기변수()를 계산하여 참조깊이좌표()를 계산하여, 새로 구해진 참조깊이좌표()로부터 오차()를 다시 계산하는 것을 반복한다. 이와 같은 오차()의 반복계산을 통해 보다 정확하게 카메라의 자세 및 위치에 대한 추정값을 얻을 수 있다.On the other hand, the error ( If is not correct, it is approximated for camera pose and position. Therefore, the error ( It is necessary to calculate According to an embodiment of the invention, the error ( ) Iteratively calculates and falls below a predefined threshold. That is, the error calculated from the previous run ( From the size variable ( ) To calculate the reference depth coordinate ( ), The newly obtained reference depth coordinate ( Error from Repeat to recalculate). This error ( Iterative calculation of) gives more accurate estimates of the pose and position of the camera.
다음, 설정된 참조점 및 참조영상좌표로부터 카메라의 자세 및 위치에 대한 추정값을 계산하는 과정에 대하여 설명한다.Next, a process of calculating an estimated value for the pose and position of the camera from the set reference point and reference image coordinates will be described.
도 7은 본 발명의 실시예에 따른 카메라 자세 및 위치에 대한 추정값을 생성하는 과정을 나타낸 순서도이다. 이하에서, i는 0 이상 M-1 이하의 범위를 갖고, 참조점의 인덱스(r)과 동일하지 않은 특징점의 인덱스이다.7 is a flowchart illustrating a process of generating an estimated value for a camera pose and position according to an embodiment of the present invention. In the following, i is an index of a feature point which has a range of 0 or more and M-1 or less and is not equal to the index r of the reference point.
참조점()을 포함하는 M개의 특징점(P0~PM -1)이 입력된다(S710).Reference point ( M feature points P 0 to P M -1 including ) are input (S710).
그리고 참조점()과 다른 특징점()에 대한 각각의 벡터()를 생성한다(S720). 수학식 11은 벡터()를 나타내는 식이다.And a reference point ( ) And other feature points ( For each vector () ) Is generated (S720).
수학식 11에 의하여, 계산된 벡터()를 행벡터로 구성한 행렬()를 생성한다(S721). 수학식 12는 행렬()를 나타낸 것이다.According to
수학식 12에 나타낸 바와 같이, 행렬()는 벡터()를 행벡터로 구성한 것으로써, M×3의 크기를 갖는다. 그리고 행렬()의 의사역행렬인 행렬 ()를 생성한다(S722). 수학식 13은 3×M의 크기를 갖는 행렬()를 나타낸 것이다.As shown in equation (12), the matrix ( ) Is a vector ( ) Is a row vector, and has a size of M × 3. And the matrix ( Matrix that is the pseudo inverse of ) Is generated (S722). Equation 13 is a matrix having a size of 3 × M ( ).
본 발명의 실시예에 따르면, 오차()를 최대한 정확하게 계산하기 위하여, 오차()를 반복해서 계산한다. 이하에서 오차()를 계산하는 과정을 반복한 횟수를 반복횟수라 한다.According to an embodiment of the invention, the error ( To calculate the error as accurately as possible. Calculate) repeatedly. Error below The number of times the process of calculating) is repeated.
반복 횟수가 0인 경우로써 오차()가 한번도 계산되지 않았을 때에는(S730), 오차()를 0으로 가정한다(S731). 이와 같이, 오차()를 0으로 가정한 상태에서, 직교 정사영 투영 영상좌표()의 x-좌표()는 이고, 직교 정사영 투영 영상좌표()의 y-좌표()는 인 것을 이용하여, (M-1)개의 특징점()에 대한 직교 정 사영 투영 영상좌표()의 x-좌표()와 y-좌표()를 계산한다(S740). If the number of repetitions is 0, error ( ) Is never calculated (S730), the error ( ) Is assumed to be 0 (S731). In this way, the error ( ) Is assumed to be 0, orthogonal orthographic projection image coordinate ( X-coordinate of ) Orthogonal orthographic projection image coordinate ( ) Y-coordinate of ) (M-1) feature points ( Orthogonal Projection Image Coordinates for X-coordinate of ) And the y-coordinate ( ) Is calculated (S740).
참조영상좌표()와 (M-1)개의 영상좌표()에 대하여, 크기의 벡터()와 벡터()를 계산한다(S741). Reference image coordinates ( ) And (M-1) video coordinates ( For a vector of magnitudes ) And vector ( ) Is calculated (S741).
다음, 아래의 수학식 14에 나타낸 바와 같이, 수학식 10에 따라 행렬 ()와 벡터() 및 행렬 ()와 벡터()를 이용하여 각각 영상좌표계의 기저벡터()와 기저벡터()를 계산한다(S742).Next, as shown in Equation 14 below, the matrix ( ) And vector ( ) And matrix ( ) And vector ( ), The basis vector ( ) And basis vector ( ) Is calculated (S742).
다음으로, 크기변수()와 카메라 좌표계의 기저벡터()와 기저벡터()를 구한다. Next, the size variable ( ) And the ground vector ( ) And basis vector ( )
즉, 크기변수()는 기저벡터()와 기저벡터()에 대한 각각의 크기 성분을 통해 계산한다(S750).That is, the size variable ( ) Is the basis vector ( ) And basis vector ( Calculated through each size component for (S750).
아래의 수학식 15에 나타낸 바와 같이, 크기변수()를 계산하기 위하여, 수학식 14에 의해 계산된 기저벡터()와 기저벡터()의 크기 성분을 계산한다.As shown in Equation 15 below, the size variable ( In order to calculate the basis vector, the basis vector ) And basis vector ( Calculate the size component of
수학식 15에서, 는 기저벡터()의 크기 성분이고, 는 기저벡터()의 크기 성분이다. 수학식 15를 통해, 기저벡터()와 기저벡터()의 크기 성분을 계산한 다음, 와 의 평균을 구하여, 크기 변수()로 결정한다.In Equation 15, Is the basis vector ( ) Is the size component Is the basis vector ( ) Is the size component. Through equation (15), the basis vector ( ) And basis vector ( ), Calculate the size component, Wow Is then averaged over the size variable ( Decide on)
그리고 크기변수()는 으로 정의되는 것을 이용하여, 참조깊이좌표()를 계산한다(S751).And the size variable ( ) Using what is defined as, the reference depth coordinate ( ) Is calculated (S751).
또한, 영상좌표계의 기저벡터()는 이고, 영상좌표계의 기저벡터()는 인 것을 이용하여, 영상좌표계의 기저벡터()와 기저벡터()로부터 카메라 좌표계의 기저벡터()와 기저벡터()를 계산한다(S760).Also, the basis vector ( ) , The basis vector ( ) Using, the basis vector of the image coordinate system ( ) And basis vector ( From the vector of the camera coordinate system ) And basis vector ( ) Is calculated (S760).
그리고 아래의 수학식 16을 이용하여, 카메라 좌표계의 기저벡터()를 계산한다(S761).Then, using Equation 16 below, the basis vector of the camera coordinate system ( ) Is calculated (S761).
수학식 16에 나타낸 바와 같이, 카메라 좌표계의 기저벡터()은 기저벡 터()와 기저벡터()의 외적으로 계산된다.As shown in equation (16), the basis vector of the camera coordinate system ( ) Is the basal vector ( ) And basis vector ( Is calculated externally.
이상과 같이, 카메라 좌표계의 기저벡터(), 기저벡터(), 기저벡터() 및 참조깊이좌표()를 계산한 이후에, 반복횟수가 기준반복횟수 이상이 되는지의 여부와 오차()가 기준오차 이하가 되는지의 여부를 판단한다(S770). 여기서 기준반복횟수는 계산의 지연을 방해하지 않을 정도의 횟수로 다수의 경험에 의해 결정될 수 있고, 기준오차는 추정값과 실제값 사이의 오차가 최소한으로 제한되는 범위에서의 최대값으로 결정될 수 있다. 기준반복횟수와 기준오차는 본 발명의 실시예를 설명하는 것과 크게 관련이 없으므로, 이하에서 상세한 설명은 생략하기로 한다.As above, the basis vector of the camera coordinate system ( ), Basis vector ( ), Basis vector ( ) And reference depth coordinates ( ) Is calculated, and whether the repeat count is greater than or equal to the reference repeat count and the error ( ) Is determined whether or less than the reference error (S770). Here, the reference repetition frequency may be determined by a number of experiences to the extent that it does not interfere with the calculation delay, and the reference error may be determined as a maximum value in a range where the error between the estimated value and the actual value is limited to the minimum. Since the reference repeat count and the reference error are not highly related to the description of the embodiment of the present invention, the detailed description will be omitted below.
이때, 반복횟수가 기준반복횟수 미만인 경우 또는 오차()가 기준오차를 초과하는 경우에 현재 수행에 의해 계산된 오차()를 이용하여 다시 반복 계산을 수행한다(S730). At this time, if the repeat count is less than the standard repeat count or error ( Error calculated by the current run when Iterative calculation is performed again by using (S730).
반면, 반복횟수가 기준반복횟수 이상이 되는 경우, 오차()가 기준오차 이하인 경우, 이전 수행에서 계산된 오차와 현재 수행에서 계산된 오차가 동일한 경우 중 어느 하나에 포함되면(S770), 현재 수행에서 계산된 기저벡터(), 기저벡터(), 기저벡터()를 행벡터로 구성한 회전행렬() 및 수학식 4와 현재 수행에서 계산된 참조깊이좌표()를 이용하여 이동벡터()를 출력한다(S780).On the other hand, if the repeat count is more than the standard repeat count, the error ( ) Is less than or equal to the reference error, if the error calculated in the previous performance and the error calculated in the current performance is included in any one of the same (S770), the basis vector ( ), Basis vector ( ), Basis vector ( ) A rotation matrix consisting of row vectors ( ) And the reference depth coordinate ( ) To move vector ( ) Is output (S780).
이상과 같이, 본 발명의 실시예에 따르면, 참조점을 검출하기 전에, 입력된 특징점들 중에서 이상점을 제거하는 단계를 포함함으로써, 참조점을 적절하게 설정할 수 있다. 이에 따라 카메라 자세와 위치에 대한 추정값이 실제값과 더욱 가깝게 계산될 수 있다. 또한, 선형계산법만으로 모든 계산이 수행되므로, 계산의 복잡도가 낮아지고, 계산속도도 빨라질 수 있다.As described above, according to the exemplary embodiment of the present invention, the reference point may be appropriately set by including removing the abnormal point from the input feature points before detecting the reference point. Accordingly, the estimated values for the camera pose and position can be calculated closer to the actual values. In addition, since all calculations are performed only by the linear calculation method, the complexity of the calculation can be lowered and the calculation speed can be increased.
이상에서 설명한 본 발명의 실시예는 장치 및 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하는 프로그램 또는 그 프로그램이 기록된 기록 매체를 통해 구현될 수도 있으며, 이러한 구현은 앞서 설명한 실시예의 기재로부터 본 발명이 속하는 기술분야의 전문가라면 쉽게 구현할 수 있는 것이다. The embodiments of the present invention described above are not implemented only through the apparatus and the method, but may be implemented through a program for realizing a function corresponding to the configuration of the embodiment of the present invention or a recording medium on which the program is recorded. Implementation may be easily implemented by those skilled in the art from the description of the above-described embodiments.
이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.Although the embodiments of the present invention have been described in detail above, the scope of the present invention is not limited thereto, and various modifications and improvements of those skilled in the art using the basic concepts of the present invention defined in the following claims are also provided. It belongs to the scope of rights.
도 1은 본 발명의 실시예에 따른 카메라 자세 추정 장치의 블록도이다.1 is a block diagram of a camera pose estimation apparatus according to an embodiment of the present invention.
도 2는 본 발명의 실시예에 따른 이상점 결정부(200)의 블록도이다.2 is a block diagram of the
도 3은 본 발명의 실시예에 따른 카메라 자세의 추정 방법을 대략적으로 나타낸 순서도이다.3 is a flowchart schematically illustrating a method of estimating a camera pose according to an exemplary embodiment of the present invention.
도 4는 본 발명의 실시예에 따른 이상점을 선택하는 방법에 대한 순서도를 나타낸 것이다.4 is a flowchart illustrating a method of selecting an outlier according to an embodiment of the present invention.
도 5는 본 발명의 실시예에 따른 참조점을 선택하는 방법에 대한 순서도를 나타낸 것이다.5 is a flowchart illustrating a method of selecting a reference point according to an embodiment of the present invention.
도 6은 본 발명의 실시예에 따른 정사영 투영모델 기하도를 나타낸 것이다.6 shows an orthographic projection model geometry according to an embodiment of the present invention.
도 7은 본 발명의 실시예에 따른 카메라 자세 및 위치에 대한 추정값을 생성하는 과정을 나타낸 순서도이다.7 is a flowchart illustrating a process of generating an estimated value for a camera pose and position according to an embodiment of the present invention.
Claims (21)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20070027025 | 2007-03-20 | ||
KR1020070027025 | 2007-03-20 |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20080085655A KR20080085655A (en) | 2008-09-24 |
KR100918706B1 true KR100918706B1 (en) | 2009-09-22 |
Family
ID=40025320
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020070089460A KR100918706B1 (en) | 2007-03-20 | 2007-09-04 | Apparatus and Method of Estimating Camera Position |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100918706B1 (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101245529B1 (en) * | 2009-03-17 | 2013-03-21 | 주식회사 만도 | Camera calibration method |
KR101013751B1 (en) * | 2009-07-09 | 2011-02-14 | 주식회사 인스프리트 | Server for processing of virtualization and system for providing augmented reality using dynamic contents delivery |
KR101669119B1 (en) | 2010-12-14 | 2016-10-25 | 삼성전자주식회사 | System and method for multi-layered augmented reality |
KR101320337B1 (en) * | 2012-05-02 | 2013-10-29 | 한국항공우주연구원 | Estimation system of the position and pose |
KR101618814B1 (en) * | 2012-10-09 | 2016-05-09 | 에스케이텔레콤 주식회사 | Method and Apparatus for Monitoring Video for Estimating Gradient of Single Object |
US9589326B2 (en) | 2012-11-29 | 2017-03-07 | Korea Institute Of Science And Technology | Depth image processing apparatus and method based on camera pose conversion |
KR101362183B1 (en) | 2012-11-29 | 2014-02-13 | 한국과학기술연구원 | Depth image noise removal apparatus and method based on camera pose |
KR101835434B1 (en) | 2015-07-08 | 2018-03-09 | 고려대학교 산학협력단 | Method and Apparatus for generating a protection image, Method for mapping between image pixel and depth value |
WO2017007166A1 (en) * | 2015-07-08 | 2017-01-12 | 고려대학교 산학협력단 | Projected image generation method and device, and method for mapping image pixels and depth values |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003174577A (en) | 2001-12-05 | 2003-06-20 | Sony Corp | Camera parameter calculating method, image processor, program and recording medium |
KR20040042470A (en) * | 2002-11-14 | 2004-05-20 | 한국전자통신연구원 | Method of Extrating Camera Information for Authoring Tools of Synthetic Contents |
KR20050001103A (en) * | 2003-06-27 | 2005-01-06 | 서정각 | Method for estimation of projection matrix from the video sequence |
KR20060007816A (en) * | 2004-07-22 | 2006-01-26 | 학교법인 중앙대학교 | Method for synthesizing image |
-
2007
- 2007-09-04 KR KR1020070089460A patent/KR100918706B1/en active IP Right Grant
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003174577A (en) | 2001-12-05 | 2003-06-20 | Sony Corp | Camera parameter calculating method, image processor, program and recording medium |
KR20040042470A (en) * | 2002-11-14 | 2004-05-20 | 한국전자통신연구원 | Method of Extrating Camera Information for Authoring Tools of Synthetic Contents |
KR20050001103A (en) * | 2003-06-27 | 2005-01-06 | 서정각 | Method for estimation of projection matrix from the video sequence |
KR20060007816A (en) * | 2004-07-22 | 2006-01-26 | 학교법인 중앙대학교 | Method for synthesizing image |
Also Published As
Publication number | Publication date |
---|---|
KR20080085655A (en) | 2008-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100918706B1 (en) | Apparatus and Method of Estimating Camera Position | |
Davison | Real-time simultaneous localisation and mapping with a single camera | |
CN107810522B (en) | Real-time, model-based object detection and pose estimation | |
JP4692773B2 (en) | Object posture estimation and verification system, object posture estimation and verification method, and program therefor | |
US8755562B2 (en) | Estimation apparatus, control method thereof, and program | |
KR101926563B1 (en) | Method and apparatus for camera tracking | |
JP2013020616A (en) | Object tracking method and object tracking device | |
EP2579210A1 (en) | Face feature-point position correction device, face feature-point position correction method, and face feature-point position correction program | |
US20150310617A1 (en) | Display control device and display control method | |
EP0909418A1 (en) | Spares array image correlation | |
US20200134847A1 (en) | Structure depth-aware weighting in bundle adjustment | |
JP2019190974A (en) | Calibration device, calibration method and program | |
Chen et al. | A particle filtering framework for joint video tracking and pose estimation | |
US11138759B2 (en) | Image processing apparatus and image processing method | |
CN115409896A (en) | Pose prediction method, pose prediction device, electronic device and medium | |
KR101586007B1 (en) | Data processing apparatus and method | |
Zhao et al. | A comprehensive performance evaluation of 3-D transformation estimation techniques in point cloud registration | |
KR100922273B1 (en) | Mechanism for reconstructing a 3D model using key-frames selected from image sequences | |
Salvi et al. | A survey addressing the fundamental matrix estimation problem | |
US10755439B2 (en) | Estimation device, estimation method and storage medium | |
CN111709269A (en) | Human hand segmentation method and device based on two-dimensional joint information in depth image | |
WO2014143154A1 (en) | Image processor with evaluation layer implementing software and hardware algorithms of different precision | |
JP2019105992A (en) | Image processing device, image processing program and image processing method | |
JP2015184743A (en) | Image processor and object recognition method | |
Csurka et al. | Algebraic and geometric tools to compute projective and permutation invariants |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20120827 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20130827 Year of fee payment: 5 |
|
FPAY | Annual fee payment |
Payment date: 20140901 Year of fee payment: 6 |
|
FPAY | Annual fee payment |
Payment date: 20150901 Year of fee payment: 7 |
|
FPAY | Annual fee payment |
Payment date: 20160831 Year of fee payment: 8 |
|
FPAY | Annual fee payment |
Payment date: 20170828 Year of fee payment: 9 |
|
FPAY | Annual fee payment |
Payment date: 20180827 Year of fee payment: 10 |