KR102666984B1 - Apparatus and method for calibrating camera for distance measurement of object position within image - Google Patents

Apparatus and method for calibrating camera for distance measurement of object position within image Download PDF

Info

Publication number
KR102666984B1
KR102666984B1 KR1020210112054A KR20210112054A KR102666984B1 KR 102666984 B1 KR102666984 B1 KR 102666984B1 KR 1020210112054 A KR1020210112054 A KR 1020210112054A KR 20210112054 A KR20210112054 A KR 20210112054A KR 102666984 B1 KR102666984 B1 KR 102666984B1
Authority
KR
South Korea
Prior art keywords
image
error rate
camera
reprojection error
reference value
Prior art date
Application number
KR1020210112054A
Other languages
Korean (ko)
Other versions
KR20230030159A (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 KR1020210112054A priority Critical patent/KR102666984B1/en
Publication of KR20230030159A publication Critical patent/KR20230030159A/en
Application granted granted Critical
Publication of KR102666984B1 publication Critical patent/KR102666984B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Image Processing (AREA)

Abstract

이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치 및 방법을 개시한다. 본 발명은 재투영 오차율이 작은 임의의 이미지를 기반으로 전처리를 수행한 이미지의 재가공을 통해 보정 효율을 높여 정확한 카메라의 내부 파라미터를 추출할 수 있다.Disclosed is a camera calibration device and method for measuring object position distance in an image. The present invention can extract accurate internal parameters of a camera by increasing correction efficiency through reprocessing of an image that has undergone preprocessing based on an arbitrary image with a small reprojection error rate.

Description

이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치 및 방법{APPARATUS AND METHOD FOR CALIBRATING CAMERA FOR DISTANCE MEASUREMENT OF OBJECT POSITION WITHIN IMAGE}Camera calibration device and method for measuring object position distance in an image {APPARATUS AND METHOD FOR CALIBRATING CAMERA FOR DISTANCE MEASUREMENT OF OBJECT POSITION WITHIN IMAGE}

본 발명은 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치 및 방법에 관한 발명으로서, 더욱 상세하게는 재투영 오차율이 작은 임의의 이미지를 기반으로 전처리를 수행한 이미지의 재가공을 통해 보정 효율을 높여 정확한 카메라의 내부 파라미터를 추출하는 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치 및 방법에 관한 것이다.The present invention relates to a camera correction device and method for measuring the position distance of an object in an image. More specifically, the present invention relates to a camera correction device and method for measuring the distance of an object in an image. More specifically, the present invention relates to an accurate image by increasing correction efficiency through reprocessing an image that has been preprocessed based on an arbitrary image with a small reprojection error rate. It relates to a camera calibration device and method for measuring object position distance in an image that extracts internal parameters of the camera.

일반적으로, 카메라의 성능에 영향을 주는 환경적 요인을 정량적으로 나타내는 변수를 구하여 3차원 물체가 속한 좌표와, 이것이 투영된 영상 평면에서의 2차원 좌표로 사이의 관계를 정립하는 절차, 그리고 카메라 내부 요인에 의한 영상 왜곡 등의 현상을 정량적으로 정의하는 절차를 카메라 보정(Calibration)이라고 한다.In general, it is a procedure to obtain variables that quantitatively represent environmental factors that affect the performance of a camera and establish a relationship between the coordinates of a 3D object and the 2D coordinates on the image plane onto which it is projected, and the inside of the camera. The process of quantitatively defining phenomena such as image distortion caused by factors is called camera calibration.

즉, 카메라의 내부 요인 또는 내부 특정을 정의하는 요소들로 구성된 파라미터들을 내부 파라미터(Intrinsic parameters)라 하고, 특성을 정의하는 요소들로 구성된 파라미터들을 외부 파라미터(Extrinsic parameter)라고 한다. That is, parameters composed of elements that define internal factors or internal characteristics of the camera are called intrinsic parameters, and parameters composed of elements that define characteristics are called extrinsic parameters.

외부 파라미터는 현실 3차원 좌표계와 비교하여 카메라의 상대적인 위치, 즉 카메라 좌표계와 월드 좌표계 사이의 변환 관계인 두 좌표계 사이의 회전(Rotation)과 평행 이동(Translation) 변환를 나타낸다.External parameters represent the relative position of the camera compared to the real three-dimensional coordinate system, that is, the rotation and translation between the two coordinate systems, which is the transformation relationship between the camera coordinate system and the world coordinate system.

내부 파라미터는 이미지 내에 사물과의 거리를 측정하는 것으로, 카메라의 렌즈 중심과 이미지 센서 사이의 거리인 초점거리와, 카메라 렌즈의 중심에서 이미지 센서에 내린 수선의 발의 영상 좌표를 나타내는 주점과, 이미지 센서의 기울기를 나타내는 왜곡 계수 등을 포함하며, 내부 파라미터의 정확도에 따라 신뢰할 수 있는 거리 측정 값을 산출할 수 있다.The internal parameters measure the distance to an object in the image, including the focal length, which is the distance between the center of the camera lens and the image sensor, the principal point representing the image coordinates of the foot of the perpendicular line drawn from the center of the camera lens to the image sensor, and the image sensor. It includes a distortion coefficient that represents the slope of , and a reliable distance measurement value can be calculated depending on the accuracy of the internal parameters.

즉, 모든 카메라는 이미지의 왜곡 변형이 있고, 이러한 왜곡을 복원하기 위해서는 신뢰할 수 있는 내부 파라미터를 사용해야 한다.In other words, all cameras have distortions in their images, and reliable internal parameters must be used to restore these distortions.

도1은 종래 기술에 따른 보정 기법을 이용한 왜곡 복원을 설명하기 위해 나타낸 예시도로서, 도1(a)를 참조하면 카메라의 실시간 입력 이미지(10) 상의 좌측 벽면 모서리 영역(11)은 직선으로 보이는 것이 아니라 곡선을 갖는 것을 알 수 있다.Figure 1 is an example diagram shown to explain distortion restoration using a correction technique according to the prior art. Referring to Figure 1(a), the left wall corner area 11 on the real-time input image 10 of the camera appears as a straight line. You can see that it has a curve.

또한, 도1(b)는 종래의 보정 기법을 이용하여 도1(a)의 이미지를 복원한 것으로서, 복원 이미지(20) 상의 좌측 벽면 모서리 영역(21)이 직선으로 내려오게 보정되었지만, 상기 복원 이미지(20)의 우측 하단 영역(21)과 좌측 하단에 이미지의 변형이 발생하는 문제점이 있다.In addition, Figure 1(b) is a restored image of Figure 1(a) using a conventional correction technique, and the left wall corner area 21 on the restored image 20 was corrected to come down in a straight line, but the restored image 20 There is a problem in which image deformation occurs in the lower right area 21 and the lower left area of the image 20.

또한, 다수의 이미지를 다양한 각도에서 촬영하여 보정할수록 더욱 정밀한 결과를 얻을 수 있지만, 다수의 이미지를 획득하기 위해 많은 촬영이 요구되어 이미지의 숫자가 늘어날 수록 인력과 시간이 증가하는 문제점이 발생한다.In addition, the more images are taken and corrected from various angles, the more precise the results can be obtained. However, since many shots are required to obtain multiple images, the problem arises that manpower and time increase as the number of images increases.

또한, 다수의 이미지 중에서 재투영 오차율이 큰 사진을 포함할 경우, 재투영 오차율을 감소시키기 위한 이미지의 전처리가 이루어지지 못해 정확하고 신뢰할 수 있는 카메라의 내부 파라미터를 추출하지 못하는 문제점이 있다.In addition, when a photo with a large reprojection error rate is included among multiple images, there is a problem in that accurate and reliable internal parameters of the camera cannot be extracted because the image is not preprocessed to reduce the reprojection error rate.

또한, 신뢰할 수 없는 내부 파라미터를 사용할 경우 영상 처리 기술에 큰 오류가 발생하는 문제점이 있다.Additionally, when unreliable internal parameters are used, there is a problem in that large errors occur in image processing technology.

한국 등록특허공보 등록번호 제10-2079258호(발명의 명칭: 단일 장착면의 장착 오차를 산출하여 보정하는 장치 및 방법)Korean Patent Publication No. 10-2079258 (Title of invention: Device and method for calculating and correcting the mounting error of a single mounting surface)

이러한 문제점을 해결하기 위하여, 본 발명은 재투영 오차율이 작은 임의의 이미지를 기반으로 전처리를 수행한 이미지의 재가공을 통해 보정 효율을 높여 정확한 카메라의 내부 파라미터를 추출하는 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치 및 방법을 제공하는 것을 목적으로 한다.In order to solve this problem, the present invention improves correction efficiency through reprocessing of images that have been preprocessed based on random images with a small reprojection error rate, so as to extract accurate internal parameters of the camera, for measuring object position distance in the image. The purpose is to provide a camera calibration device and method.

상기한 목적을 달성하기 위하여 본 발명의 일 실시 예는 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치로서, 임의의 이미지를 분석하여 미리 설정된 기준값 이하의 재투영 오차율을 갖는 이미지를 추출하고, 상기 기준값 이하의 재투영 오차율을 갖는 이미지를 기반으로 미리 설정된 전처리를 수행하여 이미지의 재가공을 수행하며, 상기 재가공된 이미지를 미리 설정된 보정 함수에 기초하여 카메라의 내부 파라미터를 추출하는 것을 특징으로 한다.In order to achieve the above object, an embodiment of the present invention is a camera calibration device for measuring object position distance in an image, which analyzes an arbitrary image and extracts an image with a reprojection error rate less than or equal to a preset reference value. The image is reprocessed by performing preset preprocessing based on an image with a reprojection error rate below, and internal parameters of the camera are extracted from the reprocessed image based on a preset correction function.

또한, 상기 실시 예에 따른 이미지는 실시간 입력 영상 또는 동영상인 것을 특징으로 한다.Additionally, the image according to the above embodiment is characterized as a real-time input image or video.

또한, 상기 실시 예에 따른 전처리는 이미지의 왜곡 계수를 제외하여 복원된 이미지를 추출하고, 상기 복원된 이미지의 노이즈를 제거하는 것을 특징으로 한다.In addition, the preprocessing according to the above embodiment is characterized by extracting the restored image by excluding the distortion coefficient of the image and removing noise from the restored image.

또한, 상기 실시 예는 실시간 입력 영상 또는 동영상 이미지를 분석하여 미리 설정된 기준값 이하의 재투영 오차율을 갖는 이미지를 추출하는 제1 보정 함수부; 상기 기준값 이하의 재투영 오차율을 갖는 이미지에 대하여 왜곡 보정과 노이즈 제거에 기반한 전처리를 통해 이미지를 재가공하는 이미지 전처리 함수부; 및 미리 설정된 보정 함수에 기초하여 상기 재가공된 이미지로부터 카메라의 내부 파라미터를 추출하는 제2 보정 함수부;로 구성된 것을 특징으로 한다.In addition, the above embodiment includes a first correction function unit that analyzes a real-time input video or video image and extracts an image with a reprojection error rate less than a preset reference value; an image preprocessing function unit that reprocesses an image with a reprojection error rate of less than or equal to the reference value through preprocessing based on distortion correction and noise removal; and a second correction function unit that extracts internal parameters of the camera from the reprocessed image based on a preset correction function.

또한, 상기 실시 예에 따른 이미지 전처리 함수부는 이미지에 포함된 왜곡을 보정하여 복원 이미지를 생성하는 왜곡 복원부; 및 상기 복원 이미지로부터 노이즈를 제거하는 가우시안 블러부;를 포함하는 것을 특징으로 한다.In addition, the image pre-processing function unit according to the above embodiment includes a distortion restoration unit that corrects distortion included in the image and generates a restored image; and a Gaussian blur unit that removes noise from the restored image.

또한, 본 발명에 따른 일 실시 예는 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 방법으로서, a) 보정 장치가 수신되는 실시간 입력 영상 또는 동영상 이미지를 분석하여 미리 설정된 기준값 이하의 재투영 오차율을 갖는 이미지를 추출하는 단계; b) 상기 보정 장치가 기준값 이하의 재투영 오차율을 갖는 이미지에 대하여 미리 설정된 전처리를 통해 이미지를 재가공하는 단계; 및 c) 상기 보정 장치가 미리 설정된 보정 함수에 기초하여 상기 재가공된 이미지로부터 카메라의 내부 파라미터를 추출하는 단계;를 포함한다.In addition, an embodiment according to the present invention is a camera calibration method for measuring object position distance in an image, which includes a) an image having a reprojection error rate below a preset reference value by analyzing a real-time input video or video image received by a calibration device; Extracting; b) the correction device reprocessing an image through preset preprocessing for an image having a reprojection error rate below a reference value; and c) extracting, by the correction device, internal parameters of the camera from the reprocessed image based on a preset correction function.

또한, 상기 실시 예에 따른 b) 단계의 전처리는 이미지에 포함된 왜곡을 보정하여 복원 이미지를 생성하는 단계; 및 상기 복원 이미지로부터 노이즈를 제거하는 단계;를 포함하는 것을 특징으로 한다.In addition, the preprocessing of step b) according to the above embodiment includes generating a restored image by correcting distortion included in the image; and removing noise from the restored image.

본 발명은 재투영 오차율이 작은 임의의 이미지를 기반으로 전처리를 수행한 이미지의 재가공을 통해 보정 효율을 높여 정확한 카메라의 내부 파라미터를 추출할 수 있는 장점이 있다.The present invention has the advantage of being able to extract accurate internal parameters of a camera by increasing correction efficiency through reprocessing an image that has been preprocessed based on an arbitrary image with a small reprojection error rate.

도1은 종래 기술에 따른 보정 기법을 이용한 왜곡 복원을 설명하기 위해 나타낸 예시도.
도2는 본 발명의 일 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치를 나타낸 블록도.
도3은 도2의 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치의 이미지 전처리 함수부를 나타낸 블록도.
도4는 본 발명의 일 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 방법을 설명하기 위해 나타낸 흐름도.
도5는 본 발명의 일 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 방법을 설명하기 위해 나타낸 재투영 오차율이 낮은 이미지.
도6은 본 발명의 일 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 방법을 설명하기 위해 나타낸 전처리 이미지.
도7은 본 발명의 일 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 방법을 설명하기 위해 나타낸 왜곡 복원 이미지.
Figure 1 is an example diagram showing distortion restoration using a correction technique according to the prior art.
Figure 2 is a block diagram showing a camera calibration device for measuring object position distance in an image according to an embodiment of the present invention.
Figure 3 is a block diagram showing an image pre-processing function unit of a camera calibration device for measuring object position distance in an image according to the embodiment of Figure 2.
Figure 4 is a flowchart illustrating a camera calibration method for measuring object position distance in an image according to an embodiment of the present invention.
Figure 5 is an image with a low reprojection error rate shown to explain a camera calibration method for measuring object position distance in an image according to an embodiment of the present invention.
Figure 6 is a preprocessed image shown to explain a camera calibration method for measuring object position distance in an image according to an embodiment of the present invention.
Figure 7 is a distortion restored image shown to explain a camera correction method for measuring object position distance in an image according to an embodiment of the present invention.

이하에서는 본 발명의 바람직한 실시 예 및 첨부하는 도면을 참조하여 본 발명을 상세히 설명하되, 도면의 동일한 참조부호는 동일한 구성요소를 지칭함을 전제하여 설명하기로 한다.Hereinafter, the present invention will be described in detail with reference to preferred embodiments of the present invention and the accompanying drawings, assuming that the same reference numerals in the drawings refer to the same components.

본 발명의 실시를 위한 구체적인 내용을 설명하기에 앞서, 본 발명의 기술적 요지와 직접적 관련이 없는 구성에 대해서는 본 발명의 기술적 요지를 흩뜨리지 않는 범위 내에서 생략하였음에 유의하여야 할 것이다. Before describing specific details for implementing the present invention, it should be noted that configurations that are not directly related to the technical gist of the present invention have been omitted to the extent that they do not distract from the technical gist of the present invention.

또한, 본 명세서 및 청구범위에 사용된 용어 또는 단어는 발명자가 자신의 발명을 최선의 방법으로 설명하기 위해 적절한 용어의 개념을 정의할 수 있다는 원칙에 입각하여 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야 할 것이다.In addition, the terms or words used in this specification and claims have meanings and concepts that are consistent with the technical idea of the invention, based on the principle that the inventor can define the concept of appropriate terms in order to explain his or her invention in the best way. It should be interpreted as

본 명세서에서 어떤 부분이 어떤 구성요소를 "포함"한다는 표현은 다른 구성요소를 배제하는 것이 아니라 다른 구성요소를 더 포함할 수 있다는 것을 의미한다.In this specification, the expression that a part “includes” a certain element does not mean excluding other elements, but means that it may further include other elements.

또한, "‥부", "‥기", "‥모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어, 또는 그 둘의 결합으로 구분될 수 있다.In addition, terms such as "‥unit", "‥unit", and "‥module" refer to a unit that processes at least one function or operation, which can be divided into hardware, software, or a combination of the two.

또한, "적어도 하나의" 라는 용어는 단수 및 복수를 포함하는 용어로 정의되고, 적어도 하나의 라는 용어가 존재하지 않더라도 각 구성요소가 단수 또는 복수로 존재할 수 있고, 단수 또는 복수를 의미할 수 있음은 자명하다 할 것이다. In addition, the term "at least one" is defined as a term including singular and plural, and even if the term "at least one" does not exist, each component may exist in singular or plural, and may mean singular or plural. This can be said to be self-evident.

또한, 각 구성요소가 단수 또는 복수로 구비되는 것은, 실시 예에 따라 변경가능하다 할 것이다.In addition, whether each component is provided in singular or plural form may be changed depending on the embodiment.

이하, 첨부된 도면을 참조하여 본 발명의 일 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치 및 방법의 바람직한 실시예를 상세하게 설명한다.Hereinafter, a preferred embodiment of a camera calibration device and method for measuring object position distance in an image according to an embodiment of the present invention will be described in detail with reference to the attached drawings.

도2는 본 발명의 일 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치를 나타낸 블록도이고, 도3은 도2의 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치의 이미지 전처리 함수부를 나타낸 블록도이다.Figure 2 is a block diagram showing a camera calibration device for measuring the position distance of an object in an image according to an embodiment of the present invention, and Figure 3 is a block diagram showing a camera calibration device for measuring the position distance of an object in an image according to the embodiment of Figure 2. This is a block diagram showing the image preprocessing function.

도2 및 도3을 참조하면, 본 발명의 일 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치(100)는 임의의 이미지를 분석하여 미리 설정된 기준값 이하의 재투영 오차율을 갖는 이미지를 추출할 수 있다.Referring to Figures 2 and 3, the camera calibration device 100 for measuring object position distance in an image according to an embodiment of the present invention analyzes an arbitrary image and selects an image with a reprojection error rate below a preset reference value. It can be extracted.

또한, 상기 보정 장치(100)는 기준값 이하의 재투영 오차율을 갖는 이미지를 기반으로 미리 설정된 전처리를 수행하여 이미지의 재가공을 수행할 수 있다.Additionally, the correction device 100 may reprocess the image by performing preset preprocessing based on the image having a reprojection error rate of less than a reference value.

또한, 상기 보정 장치(100)는 재가공된 이미지를 미리 설정된 보정 함수에 기초하여 카메라의 내부 파라미터를 추출할 수 있고, 제1 보정 함수부(110)와, 이미지 전처리 함수부(120)와, 제2 보정 함수부(130)로 구성될 수 있다.In addition, the correction device 100 can extract internal parameters of the camera based on a preset correction function from the reprocessed image, and includes a first correction function unit 110, an image pre-processing function unit 120, and a first correction function unit 100. It may be composed of 2 correction function units 130.

상기 제1 보정 함수부(110)는 실시간 입력 영상 또는 수신된 동영상의 이미지를 이용하여 재투영 오차율이 낮은 이미지를 추출하는 필터 기능을 수행한다.The first correction function unit 110 performs a filter function to extract an image with a low reprojection error rate using a real-time input image or a received video image.

즉, 상기 제1 보정 함수부(110)는 3차원의 실제 이미지와 투영된 2차원의 이미지 간의 호모그래피 행렬을 계산하고, 계산 결과를 분석하여 재투영 오차율을 산출한다.That is, the first correction function unit 110 calculates a homography matrix between the three-dimensional actual image and the projected two-dimensional image, analyzes the calculation result, and calculates the reprojection error rate.

또한, 상기 제1 보정 함수부(110)는 산출된 재투영 오차율을 미리 설정된 재투영 오차율 판단용 기준값과 비교하여 상기 기준값 이하의 낮은 재투영 오차율을 갖는 이미지를 추출한다.In addition, the first correction function unit 110 compares the calculated reprojection error rate with a preset reference value for determining the reprojection error rate and extracts an image with a low reprojection error rate below the reference value.

여기서, 재투영 오차는 3차원 포인트들은 2차원 평면으로 재투영 했을 때, 이미지에서 획득한 포인트들과 재투영된 포인트들 간의 차이로서, 카메라 보정의 정확도를 평가하는 기준으로 사용될 수 있다.Here, the reprojection error is the difference between the points obtained from the image and the reprojected points when 3D points are reprojected onto a 2D plane, and can be used as a standard for evaluating the accuracy of camera correction.

상기 이미지 전처리 함수부(120)는 제1 보정 함수부(110)에서 추출된 기준값 이하의 재투영 오차율을 갖는 이미지에 대하여 왜곡 보정과 노이즈 제거에 기반한 전처리를 통해 이미지를 재가공하고, 왜곡 복원부(121)와, 가우시안 블러부(122)를 포함하여 구성될 수 있다.The image pre-processing function unit 120 reprocesses the image through pre-processing based on distortion correction and noise removal for the image with a reprojection error rate below the reference value extracted from the first correction function unit 110, and a distortion restoration unit ( 121) and a Gaussian blur unit 122.

상기 왜곡 복원부(121)는 이미지에 포함된 왜곡을 보정하여 복원 이미지를 생성한다.The distortion restoration unit 121 corrects distortion included in the image and generates a restored image.

즉, 핀홀 카메라로 촬영된 모든 이미지는 인식할 수 없을 정도의 미세한 왜곡도 존재하고, 이러한 미세 왜곡은 카메라 보정 기법에 영향을 주어 재투영 오차율을 높이는 요인이 되어 이미지의 왜곡 계수를 보정함으로써, 카메라 보정 효율이 증가될 수 있도록 한다.In other words, all images taken with a pinhole camera have subtle distortion that cannot be recognized, and this microdistortion affects the camera correction technique and becomes a factor in increasing the reprojection error rate. By correcting the distortion coefficient of the image, the camera Allows correction efficiency to be increased.

상기 가우시안 블러부(122)는 왜곡 복원부(121)에서 복원 이미지에 포함된 노이즈(또는 잡음)를 제거하여 카메라 보정에 따른 정확도가 증가될 수 있도록 한다.The Gaussian blur unit 122 removes noise (or noise) included in the restored image in the distortion restoration unit 121 so that accuracy according to camera correction can be increased.

상기 제2 보정 함수부(130)는 카메라 보정을 위한 보정 함수 또는 공지의 카메라 보정용 보정 함수에 기초하여 상기 이미지 전처리 함수부(120)에서 재가공된 이미지로부터 카메라의 내부 파라미터를 추출한다.The second correction function unit 130 extracts internal parameters of the camera from the image reprocessed by the image pre-processing function unit 120 based on a correction function for camera correction or a known correction function for camera correction.

즉, 상기 제2 보정 함수부(130)는 재투영 오차율이 낮은 신뢰할 수 있는 선별된 이미지와, 상기 이미지를 전처리하여 재가공한 복원 이미지에 기초한 카메라 보정을 수행함으로써, 정확한 카메라 내부 파라미터를 추출할 수 있다.That is, the second correction function unit 130 can extract accurate camera internal parameters by performing camera correction based on a reliable selected image with a low reprojection error rate and a restored image obtained by preprocessing and reprocessing the image. there is.

다음은 본 발명의 일 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 방법을 설명한다.The following describes a camera calibration method for measuring object position distance in an image according to an embodiment of the present invention.

도4는 본 발명의 일 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 방법을 설명하기 위해 나타낸 흐름도이다.Figure 4 is a flowchart illustrating a camera calibration method for measuring object position distance in an image according to an embodiment of the present invention.

도2 내지 도4를 참조하면, 본 발명의 일 실시 예에 따른 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 방법은, 보정 장치(100)가 실시간 입력 영상 또는 동영상 이미지를 수신(S100)한다.Referring to Figures 2 to 4, in the camera calibration method for measuring object position distance in an image according to an embodiment of the present invention, the calibration device 100 receives a real-time input image or video image (S100).

또한, 상기 보정 장치(100)는 S100 단계에서 수신된 3차원의 실제 이미지와 투영된 2차원의 이미지 간의 호모그래피 행렬을 계산하고, 계산 결과에 따른 재투영 오차율을 산출(S200)한다.In addition, the correction device 100 calculates a homography matrix between the three-dimensional actual image received in step S100 and the projected two-dimensional image, and calculates a reprojection error rate according to the calculation result (S200).

또한, 상기 보정 장치(100)는 산출된 재투영 오차율을 낮은 재투영 오차율을 갖는 이미지를 추출하기 위해 설정된 재투영 오차율 판단용 기준값과 비교하고, 상기 기준값 이하의 낮은 재투영 오차율을 갖는 이미지를 추출(S300)한다.In addition, the correction device 100 compares the calculated reprojection error rate with a reference value for determining the reprojection error rate set to extract images with a low reprojection error rate, and extracts images with a low reprojection error rate below the reference value. (S300).

즉, 도5와 같이 재투영 오차율 판단용 기준값 이하의 재투영 오차율을 갖는 다수의 이미지들을 추출한다.That is, as shown in Figure 5, a number of images having a reprojection error rate less than the reference value for determining the reprojection error rate are extracted.

계속해서, 상기 보정 장치(100)는 기준값 이하의 재투영 오차율을 갖는 이미지에 대하여 미리 설정된 전처리를 통해 이미지를 재가공(S400)한다.Subsequently, the correction device 100 reprocesses the image through preset preprocessing for the image having a reprojection error rate below the reference value (S400).

즉, 상기 S400 단계에서 보정 장치(100)는 도6(a)와 같이, 추출된 재투영 오차율이 기준값 이하인 원본 이미지(200)로부터 왜곡 계수에 기반한 왜곡을 보정하여 도6(b)와 같은 복원 이미지(210)를 생성한다.That is, in step S400, the correction device 100 corrects the distortion based on the distortion coefficient from the original image 200 whose extracted reprojection error rate is less than the reference value, as shown in FIG. 6(a), and restores the image as shown in FIG. 6(b). Create an image 210.

또한, 상기 보정 장치(100)는 상기 복원 이미지(210)로부터 노이즈를 제거함으로써, 도6(c)와 같은 노이즈 제거 이미지(220)를 생성하여 이미지를 재가공 한다.Additionally, the correction device 100 removes noise from the restored image 210 to generate a noise-removed image 220 as shown in FIG. 6(c) and reprocesses the image.

계속해서, 상기 보정 장치(100)는 미리 설정된 보정 함수에 기초하여 상기 S400 단계에서 재가공된 이미지로부터 카메라 내부 파라미터를 추출(S500)한다.Subsequently, the correction device 100 extracts camera internal parameters from the image reprocessed in step S400 based on a preset correction function (S500).

상기 S500 단계에서 추출된 카메라 내부 파라미터에 기반하여 이미지를 복원한다.The image is restored based on the camera internal parameters extracted in step S500.

즉, 도7(a)와 같이, 입력 이미지(300)상의 좌측 벽면 모서리 부분에 왜곡 영역(301)이 있는 이미지에 대하여 상기 S500 단계에서 추출된 카메라 내부 파라미터에 기반한 보정을 수행하면, 도7(b)와 같이 복원 이미지(310) 상의 좌측 벽면 모서리 부분의 복원 영역(311)은 직선으로 복원되고, 우측 하단의 복원 영역 1(312)도 변형 없이 복원될 수 있다.That is, as shown in Figure 7(a), if correction is performed based on the camera internal parameters extracted in step S500 on an image with a distortion area 301 at the left wall corner of the input image 300, Figure 7 (a) As shown in b), the restoration area 311 at the corner of the left wall of the restored image 310 can be restored as a straight line, and the restoration area 1 312 at the lower right can also be restored without deformation.

따라서, 같은 수의 이미지를 사용하여도 각 이미지의 재투영 오차율이 높아질 경우 신뢰할 수 있는 내부 파라미터를 획득할 수 없으며, 이로 인한 왜곡 복원 등의 영상 처리 과정에 큰 영향을 줄 수 있지만, 본 발명은 재투영 오차율인 낮은 이미지를 추출하여 정확한 내부 파리미터를 추출함으로써, 왜곡, 복원 등의 영상 처리 과정을 정확하게 수행할 수 있게 된다.Therefore, even if the same number of images is used, if the reprojection error rate of each image increases, reliable internal parameters cannot be obtained, which may have a significant impact on image processing processes such as distortion restoration. However, the present invention By extracting an image with a low reprojection error rate and extracting accurate internal parameters, image processing processes such as distortion and restoration can be performed accurately.

상기와 같이, 본 발명의 바람직한 실시 예를 참조하여 설명하였지만 해당 기술 분야의 숙련된 당업자라면 하기의 특허청구범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.As described above, the present invention has been described with reference to preferred embodiments, but those skilled in the art may make various modifications and changes to the present invention without departing from the spirit and scope of the present invention as set forth in the claims below. You will understand that you can do it.

또한, 본 발명의 특허청구범위에 기재된 도면번호는 설명의 명료성과 편의를 위해 기재한 것일 뿐 이에 한정되는 것은 아니며, 실시예를 설명하는 과정에서 도면에 도시된 선들의 두께나 구성요소의 크기 등은 설명의 명료성과 편의상 과장되게 도시되어 있을 수 있다.In addition, the drawing numbers described in the claims of the present invention are only used for clarity and convenience of explanation and are not limited thereto. In the process of explaining the embodiment, the thickness of the lines shown in the drawings, the size of the components, etc. may be exaggerated for clarity and convenience of explanation.

또한, 상술된 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례에 따라 달라질 수 있으므로, 이러한 용어들에 대한 해석은 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.In addition, the above-described terms are terms defined in consideration of the functions in the present invention, and may vary depending on the intention or custom of the user or operator, so interpretation of these terms should be made based on the content throughout the present specification. .

또한, 명시적으로 도시되거나 설명되지 아니하였다 하여도 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기재사항으로부터 본 발명에 의한 기술적 사상을 포함하는 다양한 형태의 변형을 할 수 있음은 자명하며, 이는 여전히 본 발명의 권리범위에 속한다. In addition, even if not explicitly shown or explained, a person skilled in the art to which the present invention pertains can make various modifications including the technical idea of the present invention from the description of the present invention. It is self-evident, and it still falls within the scope of the present invention.

또한, 첨부하는 도면을 참조하여 설명된 상기의 실시예들은 본 발명을 설명하기 위한 목적으로 기술된 것이며 본 발명의 권리범위는 이러한 실시예에 국한되지 아니한다.In addition, the above embodiments described with reference to the accompanying drawings are described for the purpose of explaining the present invention, and the scope of the present invention is not limited to these embodiments.

100 : 보정 장치
110 : 제1 보정 함수부
120 : 이미지 전처리 함수부
121 : 왜곡 복원부
122 : 가우시안 블러부
130 : 제2 보정 함수부
200 : 원본 이미지
210 : 복원 이미지
220 : 노이즈 제거 이미지
300 : 입력 이미지
301 : 왜곡 영역
310 : 복원 이미지
311 : 복원 영역
312 ; 복원 영역 1
100: compensation device
110: first correction function unit
120: Image preprocessing function part
121: Distortion restoration unit
122: Gaussian blur
130: second correction function part
200: Original image
210: restored image
220: Noise removal image
300: input image
301: Distortion area
310: Restore image
311: restoration area
312 ; Restore Area 1

Claims (7)

실시간 입력 영상 또는 동영상 이미지를 분석하여 3차원의 실제 이미지와 투영된 2차원 이미지 간의 호모그래피 행렬을 계산하고, 계산 결과를 분석하여 재투영 오차율을 산출하되, 3차원 포인트들을 2차원 평면으로 재투영 했을 때 이미지에서 획득한 포인트들과 재투영된 포인트들 간의 재투영 오차율이 미리 설정된 기준값 이하의 재투영 오차율을 갖는 이미지를 추출하는 제1 보정 함수부(110);
상기 기준값 이하의 재투영 오차율을 갖는 이미지에 대하여 이미지의 왜곡 계수를 제외하여 복원된 이미지를 추출하고, 카메라 보정에 따른 정확도가 증가되도록 상기 복원된 이미지의 노이즈를 제거하는 전처리를 통해 상기 기준값 이하의 재투영 오차율을 갖는 이미지를 재가공하는 이미지 전처리 함수부(120); 및
선별된 기준값 이하의 재투영 오차율을 갖는 이미지와 상기 선별된 기준값 이하의 재투영 오차율을 갖는 이미지를 전처리하여 재가공한 복원 이미지를 미리 설정된 카메라 보정용 보정 함수에 기초한 카메라 보정을 통해 카메라의 내부 파라미터를 추출하는 제2 보정 함수부(130);를 포함하는 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치.
Analyze real-time input images or video images to calculate the homography matrix between the 3D actual image and the projected 2D image, analyze the calculation results to calculate the reprojection error rate, and reproject the 3D points onto a 2D plane. a first correction function unit 110 that extracts an image having a reprojection error rate between points obtained from the image and reprojected points less than or equal to a preset reference value;
For images with a reprojection error rate below the reference value, a restored image is extracted by excluding the distortion coefficient of the image, and preprocessing is performed to remove noise from the restored image to increase accuracy according to camera correction. An image preprocessing function unit 120 that reprocesses an image with a reprojection error rate; and
The internal parameters of the camera are extracted through camera correction based on a preset correction function for camera correction on the image with a reprojection error rate below the selected reference value and the restored image reprocessed by preprocessing the image with the reprojection error rate below the selected reference value. A camera correction device for measuring the position distance of an object in an image, including a second correction function unit 130.
삭제delete 삭제delete 삭제delete 제 1 항에 있어서,
상기 이미지 전처리 함수부(120)는 기준값 이하의 재투영 오차율을 갖는 이미지에 포함된 왜곡을 보정하여 복원 이미지를 생성하는 왜곡 복원부(121); 및
카메라 보정에 따른 정확도가 증가되도록 상기 복원 이미지로부터 노이즈를 제거하는 가우시안 블러부(122);를 포함하는 것을 특징으로 하는 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 장치.
According to claim 1,
The image pre-processing function unit 120 includes a distortion restoration unit 121 that generates a restored image by correcting distortion included in an image with a reprojection error rate below a reference value; and
A camera calibration device for measuring object position distance in an image, comprising a Gaussian blur unit 122 that removes noise from the restored image to increase accuracy according to camera calibration.
a) 보정 장치(100)가 수신되는 실시간 입력 영상 또는 동영상 이미지를 분석하여 3차원의 실제 이미지와 투영된 2차원 이미지 간의 호모그래피 행렬을 계산하고, 계산 결과를 분석하여 재투영 오차율을 산출하되, 3차원 포인트들을 2차원 평면으로 재투영 했을 때 이미지에서 획득한 포인트들과 재투영된 포인트들 간의 재투영 오차율이 미리 설정된 기준값 이하의 재투영 오차율을 갖는 이미지를 추출하는 단계;
b) 상기 보정 장치(100)가 기준값 이하의 재투영 오차율을 갖는 이미지에 대하여 이미지의 왜곡 계수를 제외하여 복원된 이미지를 추출하고, 카메라 보정에 따른 정확도가 증가되도록 상기 복원된 이미지의 노이즈를 제거하는 전처리를 통해 상기 기준값 이하의 재투영 오차율을 갖는 이미지를 재가공하는 단계; 및
c) 상기 보정 장치(100)가 선별된 기준값 이하의 재투영 오차율을 갖는 이미지와 상기 선별된 기준값 이하의 재투영 오차율을 갖는 이미지를 전처리하여 재가공한 복원 이미지를 미리 설정된 카메라 보정용 보정 함수에 기초한 카메라 보정을 통해 카메라의 내부 파라미터를 추출하는 단계;를 포함하는 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 방법.
a) The correction device 100 analyzes the received real-time input image or video image, calculates a homography matrix between the 3-dimensional actual image and the projected 2-dimensional image, and analyzes the calculation result to calculate the re-projection error rate, Extracting an image having a reprojection error rate between points obtained from the image and the reprojected points when reprojecting 3D points onto a 2D plane is less than or equal to a preset reference value;
b) The correction device 100 extracts a restored image by excluding the distortion coefficient of the image for an image with a reprojection error rate below the reference value, and removes noise from the restored image to increase accuracy according to camera correction. Reprocessing an image having a reprojection error rate less than or equal to the reference value through preprocessing; and
c) The correction device 100 preprocesses the image with a reprojection error rate below the selected reference value and the image with the reprojection error rate below the selected reference value and reprocesses the restored image based on a preset correction function for camera correction. A camera calibration method for measuring object position distance in an image, comprising: extracting internal parameters of the camera through calibration.
제 6 항에 있어서,
상기 b) 단계의 전처리는 기준값 이하의 재투영 오차율을 갖는 이미지에 포함된 왜곡을 보정하여 복원 이미지를 생성하는 단계; 및
카메라 보정에 따른 정확도가 증가되도록 상기 복원 이미지로부터 노이즈를 제거하는 단계;를 포함하는 것을 특징으로 하는 이미지 내의 객체 위치 거리 측정을 위한 카메라 보정 방법.
According to claim 6,
The preprocessing of step b) includes generating a restored image by correcting distortion included in an image with a reprojection error rate below a reference value; and
A camera calibration method for measuring object position distance in an image, comprising: removing noise from the restored image to increase accuracy according to camera calibration.
KR1020210112054A 2021-08-25 2021-08-25 Apparatus and method for calibrating camera for distance measurement of object position within image KR102666984B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210112054A KR102666984B1 (en) 2021-08-25 2021-08-25 Apparatus and method for calibrating camera for distance measurement of object position within image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210112054A KR102666984B1 (en) 2021-08-25 2021-08-25 Apparatus and method for calibrating camera for distance measurement of object position within image

Publications (2)

Publication Number Publication Date
KR20230030159A KR20230030159A (en) 2023-03-06
KR102666984B1 true KR102666984B1 (en) 2024-05-20

Family

ID=85509787

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210112054A KR102666984B1 (en) 2021-08-25 2021-08-25 Apparatus and method for calibrating camera for distance measurement of object position within image

Country Status (1)

Country Link
KR (1) KR102666984B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190035061A1 (en) 2013-09-27 2019-01-31 Kofax, Inc. Content-based detection and three dimensional geometric reconstruction of objects in image and video data
WO2019143199A1 (en) * 2018-01-19 2019-07-25 삼성전자 주식회사 Electronic device for determining fingerprint processing method on basis of pressure level of fingerprint input, and method therefor
US20210124949A1 (en) * 2019-10-25 2021-04-29 7-Eleven, Inc. Homography error correction

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101217476B1 (en) * 2011-03-07 2013-01-02 주식회사 코아로직 An apparatus and a method for processing an image signal
KR102079258B1 (en) 2018-07-05 2020-02-19 주식회사 한화 Apparatus and method for calculating and correcting a mounting error of a single mounting surface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190035061A1 (en) 2013-09-27 2019-01-31 Kofax, Inc. Content-based detection and three dimensional geometric reconstruction of objects in image and video data
US10783613B2 (en) * 2013-09-27 2020-09-22 Kofax, Inc. Content-based detection and three dimensional geometric reconstruction of objects in image and video data
WO2019143199A1 (en) * 2018-01-19 2019-07-25 삼성전자 주식회사 Electronic device for determining fingerprint processing method on basis of pressure level of fingerprint input, and method therefor
US20210124949A1 (en) * 2019-10-25 2021-04-29 7-Eleven, Inc. Homography error correction

Also Published As

Publication number Publication date
KR20230030159A (en) 2023-03-06

Similar Documents

Publication Publication Date Title
EP2751521B1 (en) Method and system for alignment of a pattern on a spatial coded slide image
CN110099267B (en) Trapezoidal correction system, method and projector
US20150093042A1 (en) Parameter calibration method and apparatus
WO2018235163A1 (en) Calibration device, calibration chart, chart pattern generation device, and calibration method
KR20140027468A (en) Depth measurement quality enhancement
KR102256583B1 (en) System for Measuring Position of Subject
CN110956661A (en) Method for calculating dynamic pose of visible light and infrared camera based on bidirectional homography matrix
JP2019530059A (en) Method for independently processing multiple target areas
KR20200049207A (en) System and method for image correction based estimation of distortion parameters
WO2012029658A1 (en) Imaging device, image-processing device, image-processing method, and image-processing program
CN110971827A (en) Portrait mode shooting method and device, terminal equipment and storage medium
CN111915735B (en) Depth optimization method for three-dimensional structure outline in video
CN111798422B (en) Checkerboard corner recognition method, device, equipment and storage medium
CN116958419A (en) Binocular stereoscopic vision three-dimensional reconstruction system and method based on wavefront coding
CN113902652B (en) Speckle image correction method, depth calculation method, device, medium, and apparatus
CN112991159B (en) Face illumination quality evaluation method, system, server and computer readable medium
JP2019091122A (en) Depth map filter processing device, depth map filter processing method and program
JP7489253B2 (en) Depth map generating device and program thereof, and depth map generating system
CN111160233B (en) Human face in-vivo detection method, medium and system based on three-dimensional imaging assistance
KR102666984B1 (en) Apparatus and method for calibrating camera for distance measurement of object position within image
KR20060065800A (en) Apparatus and method for 3d reconstruction of objects with depth discontinuities using helmholtz stereopsis
JP3516118B2 (en) Object recognition method and object recognition device
KR101165810B1 (en) A method and an apparatus extracting a depth image information using a stereo camera
JPH04130587A (en) Three-dimensional picture evaluation device
CN113048899A (en) Thickness measuring method and system based on line structured light

Legal Events

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