KR20210041241A - Correction method of camera distortion caused by multi-view capturing and generating method for block 3d model using thereof - Google Patents

Correction method of camera distortion caused by multi-view capturing and generating method for block 3d model using thereof Download PDF

Info

Publication number
KR20210041241A
KR20210041241A KR1020190123660A KR20190123660A KR20210041241A KR 20210041241 A KR20210041241 A KR 20210041241A KR 1020190123660 A KR1020190123660 A KR 1020190123660A KR 20190123660 A KR20190123660 A KR 20190123660A KR 20210041241 A KR20210041241 A KR 20210041241A
Authority
KR
South Korea
Prior art keywords
block
image
depth map
distortion correction
modeling
Prior art date
Application number
KR1020190123660A
Other languages
Korean (ko)
Other versions
KR102267442B1 (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 KR1020190123660A priority Critical patent/KR102267442B1/en
Publication of KR20210041241A publication Critical patent/KR20210041241A/en
Application granted granted Critical
Publication of KR102267442B1 publication Critical patent/KR102267442B1/en

Links

Images

Classifications

    • G06T5/80
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/006Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/122Improving the 3D impression of stereoscopic images by modifying image signal contents, e.g. by filtering or adding monoscopic depth cues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/204Image signal generators using stereoscopic image cameras
    • H04N13/207Image signal generators using stereoscopic image cameras using a single 2D image sensor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/271Image signal generators wherein the generated image signals comprise depth maps or disparity maps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20061Hough transform

Abstract

The present invention relates to a method for correcting camera distortion taken from a variable viewpoint, and more particularly, to a method for correcting camera distortion taken from a variable viewpoint for block 3D modeling using a color image and a depth map obtained from a monocular camera. The method comprises the following steps of: (1) binarizing a depth map; (2) obtaining edge features of an image from a binarized image binarized in the step (1); (3) selecting, as a representative, a straight line having the largest number of pixels included in a straight line within a preset angular range from among the edge features obtained in the step (2); (4) predicting a base shape by extracting four straight lines and four intersection points based on the straight line selected in the step (3); and (5) correcting the degree of image distortion with respect to a color image and a depth map through the predicted base shape.

Description

가변 시점에서 촬영된 카메라 왜곡 보정 방법 및 이를 이용한 블록 3차원 모델링 방법{CORRECTION METHOD OF CAMERA DISTORTION CAUSED BY MULTI-VIEW CAPTURING AND GENERATING METHOD FOR BLOCK 3D MODEL USING THEREOF}Camera distortion correction method taken from variable viewpoint and block 3D modeling method using the same {CORRECTION METHOD OF CAMERA DISTORTION CAUSED BY MULTI-VIEW CAPTURING AND GENERATING METHOD FOR BLOCK 3D MODEL USING THEREOF}

본 발명은 카메라 왜곡 보정 방법 및 이를 이용한 블록 3차원 모델링 방법에 관한 것으로서, 보다 구체적으로는 단안 카메라에서 획득된 컬러 영상 및 깊이 맵을 이용한 블록 3차원 모델링을 위한, 가변 시점에서 촬영된 카메라 왜곡 보정 방법 및 이를 이용한 블록 3차원 모델링 방법에 관한 것이다.The present invention relates to a camera distortion correction method and a block 3D modeling method using the same, and more specifically, a camera distortion correction taken at a variable viewpoint for block 3D modeling using a color image and a depth map obtained from a monocular camera. A method and a block 3D modeling method using the same.

사물에 대한 종래의 3차원 모델링은 다음과 같은 문제점이 있다. 첫째, 3D CAD 도구를 사용해야 모델링이 가능하다. 둘째, 숙련된 전문가에 의해서만 모델링이 가능하다. 셋째, 모델링에 많은 시간과 노력이 필요하다.
Conventional 3D modeling of an object has the following problems. First, modeling is possible only with 3D CAD tools. Second, modeling is possible only by experienced experts. Third, modeling requires a lot of time and effort.

또한, 3차원 모델링을 위해서는 깊이 정보가 필요한데, 영상의 깊이 정보를 구하는 가장 일반적인 방법은 두 대의 카메라에서 촬영된 양안식 색상 영상만을 이용하는 스테레오 정합(stereo matching) 방법이다. 스테레오 정합은 색상 영상에서 각 화소에 해당하는 변위(disparity) 정보를 구하는 방법으로, 색상 영상만 가지고도 영상의 깊이를 구할 수 있다는 장점이 있으나, 객체에 의해 가려져 있는 영역, 텍스처가 없는 영역 등에서는 깊이 정보를 구하기가 매우 어렵다는 단점이 있다.
In addition, depth information is required for 3D modeling. The most common method of obtaining depth information of an image is a stereo matching method using only binocular color images captured by two cameras. Stereo matching is a method of obtaining disparity information corresponding to each pixel in a color image, and has the advantage that the depth of the image can be obtained with only a color image, but in the area covered by the object, the area without texture, etc. The disadvantage is that it is very difficult to obtain depth information.

또한, TOF(Time of Flight) 기술이 적용된 카메라를 이용하여 영상 내 물체들의 거리를 직접 측정할 수도 있다. 이러한 카메라를 깊이 카메라라고 부르는데, 깊이 카메라는 적외선 또는 광 신호를 영상에 방사하고, 그 신호가 물체에 반사되어 돌아오는 위상차를 이용하여 거리를 측정하여 깊이 영상으로 출력한다. 이와 같은 방법은, 실시간으로 장면의 깊이를 얻을 수 있다는 장점이 있지만, 출력 영상의 낮은 해상도, 영상 잡음, 왜곡 등이 많다는 문제점이 있다.
In addition, distances of objects in an image can be directly measured using a camera to which the Time of Flight (TOF) technology is applied. Such a camera is called a depth camera, and the depth camera emits an infrared or optical signal to an image, measures a distance using a phase difference in which the signal is reflected off an object and returns, and outputs it as a depth image. This method has the advantage of obtaining the depth of the scene in real time, but has a problem in that the output image has low resolution, image noise, and many distortions.

특히, 깊이 정보를 획득했더라도, 일반 사용자들은 다양한 각도에서 영상을 촬영하게 되므로, 영상의 촬영 각도에 따른 왜곡이 발생하게 된다. 따라서 이와 같은 가변 시점에 따른 왜곡을 보정하여 정확한 3차원 모델을 생성할 수 있는 기술의 개발이 필요한 실정이다.
In particular, even if depth information is acquired, since general users shoot images from various angles, distortion occurs according to the shooting angle of the image. Therefore, there is a need to develop a technology capable of generating an accurate 3D model by correcting the distortion according to such a variable viewpoint.

한편, 본 발명과 관련된 선행기술로서, 공개특허 제10-2018-0096372호(발명의 명칭: 3차원 모델링 방법) 등이 개시된 바 있다.Meanwhile, as a prior art related to the present invention, Patent Publication No. 10-2018-0096372 (name of the invention: a three-dimensional modeling method) has been disclosed.

본 발명은 기존에 제안된 방법들의 상기와 같은 문제점들을 해결하기 위해 제안된 것으로서, 단안 카메라에서 획득된 컬러 영상 및 깊이 맵을 이용한 블록 3차원 모델링에 있어서, 깊이 맵의 이진화 영상과 변형 허프 변환(Hough Transform)을 이용해 가변 시점에서 촬영된 카메라 왜곡을 평면 시점으로 보정하고, 왜곡 보정된 영상으로 블록 3차원 모델을 생성함으로써, 블록 3차원 모델링 시 발생할 수 있는 오류를 최소화하여 정확한 3차원 모델링을 할 수 있는, 가변 시점에서 촬영된 카메라 왜곡 보정 방법 및 이를 이용한 블록 3차원 모델링 방법을 제공하는 것을 그 목적으로 한다.The present invention has been proposed to solve the above problems of the previously proposed methods.In block 3D modeling using a color image and a depth map obtained from a monocular camera, the binary image of the depth map and the transformed Hough transform ( Hough Transform) is used to correct camera distortion from a variable viewpoint to a plane viewpoint, and by creating a block 3D model with the distortion-corrected image, it is possible to perform accurate 3D modeling by minimizing errors that may occur during block 3D modeling. It is an object of the present invention to provide a camera distortion correction method photographed at a variable viewpoint and a block 3D modeling method using the same.

상기한 목적을 달성하기 위한 본 발명의 특징에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법은,Camera distortion correction method photographed at a variable viewpoint according to a feature of the present invention for achieving the above object,

단안 카메라에서 획득된 컬러 영상 및 깊이 맵을 이용한 블록 3차원 모델링을 위한, 가변 시점에서 촬영된 카메라 왜곡 보정 방법으로서,As a method for correcting camera distortion captured at variable viewpoints for block 3D modeling using a color image and a depth map acquired from a monocular camera,

(1) 상기 깊이 맵(Depth map)을 이진화하는 단계;(1) binarizing the depth map;

(2) 상기 단계 (1)에서 이진화 된 이진화 영상으로부터 영상의 에지 특징을 획득하는 단계;(2) obtaining edge features of the image from the binarized image binarized in step (1);

(3) 상기 단계 (2)에서 획득된 에지 특징 중에서 상, 하, 좌 및 우의 4개의 픽셀을 기준으로, 미리 설정된 각도 범위 내 직선에 포함된 픽셀의 개수가 가장 많은 직선을 대표로 선정하는 단계;(3) Selecting as a representative a straight line with the largest number of pixels included in a straight line within a preset angular range based on four pixels of the upper, lower, left and right among the edge features obtained in step (2). ;

(4) 상기 단계 (3)에서 선정된 직선을 기준으로, 4개의 직선 및 4개의 교차점을 추출하여 베이스 형태를 예측하는 단계; 및(4) predicting a base shape by extracting four straight lines and four intersection points based on the straight line selected in step (3); And

(5) 상기 예측한 베이스 형태를 통해 상기 컬러 영상 및 깊이 맵에 대해 영상의 왜곡 정도를 보정하는 단계를 포함하는 것을 그 구성상의 특징으로 한다.
(5) It is characterized in that it comprises the step of correcting the distortion degree of the image with respect to the color image and the depth map through the predicted base shape.

바람직하게는, 상기 단계 (1) 이전에는,Preferably, prior to step (1),

(0) 단안 카메라에서 획득된 컬러 영상과 깊이 맵을 리사이징하는 단계를 더 포함할 수 있다.
(0) The step of resizing the color image and the depth map obtained from the monocular camera may be further included.

더욱 바람직하게는, 상기 단계 (1)에서는,More preferably, in the step (1),

상기 단계 (0)에서 리사이징 된 깊이 맵을 이진화할 수 있다.
The depth map resized in step (0) can be binarized.

바람직하게는, 상기 단계 (1)에서는,Preferably, in step (1),

깊이 맵에 임계값 알고리즘을 통해, 3차원 모델링의 대상이 되는 블록을 배경과 구분하여 전경을 추출할 수 있다.
Through a threshold algorithm in the depth map, a foreground can be extracted by separating a block to be subjected to 3D modeling from a background.

바람직하게는, 상기 단계 (2)에서는,Preferably, in step (2),

모폴로지 침식 연산(morphology erosion operation)의 결과와 상기 단계 (1)에서 이진화 된 이진화 영상의 차 영상을 통해 영상의 에지 특징을 획득할 수 있다.
The edge features of the image may be obtained through the result of the morphology erosion operation and the difference image between the binarized image binarized in step (1).

바람직하게는, 상기 단계 (3)에서는,Preferably, in step (3),

허프 변환(Hough Transform)을 이용하되, 상기 에지 특징의 전체 픽셀 대신 상, 하, 좌 및 우의 4개의 픽셀을 기준으로 허프 변환을 수행할 수 있다.
A Hough Transform may be used, but Hough Transform may be performed based on four pixels of top, bottom, left, and right instead of all pixels of the edge feature.

바람직하게는, 상기 단계 (5)는,Preferably, the step (5),

(5-1) 상기 단계 (4)에서 추출된 4개의 교차점과 원근 변환 결과 영상에 해당되는 4개의 점을 이용해 영상 보정을 위한 변환 행렬(map_matrix)을 획득하는 단계; 및(5-1) obtaining a transformation matrix (map_matrix) for image correction using the four intersection points extracted in step (4) and four points corresponding to the resulting image of the perspective transformation; And

(5-2) 상기 획득한 변환 행렬을 상기 컬러 영상 및 상기 깊이 맵의 이진화 영상에 적용하여 왜곡 정도를 보정하는 단계를 포함할 수 있다.
(5-2) applying the obtained transformation matrix to the color image and the binarized image of the depth map to correct a degree of distortion.

더욱 바람직하게는, 상기 단계 (5-1)에서는, 3×3의 변환 행렬을 획득할 수 있다.
More preferably, in step (5-1), a 3×3 transformation matrix may be obtained.

상기한 목적을 달성하기 위한 본 발명의 특징에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법은,Block 3D modeling method using camera distortion correction taken at a variable viewpoint according to a feature of the present invention for achieving the above object,

블록 3차원 모델링 방법으로서,As a block three-dimensional modeling method,

단안 카메라에서 획득된 컬러 영상 및 깊이 맵에 대하여, 카메라 왜곡을 보정하는 왜곡 보정 단계;A distortion correction step of correcting camera distortion with respect to the color image and the depth map obtained from the monocular camera;

상기 왜곡이 보정된 컬러 영상 및 깊이 맵을 이용해 블록 3차원 모델링을 수행하는 모델링 단계를 포함하며,A modeling step of performing block 3D modeling using the distortion-corrected color image and a depth map,

상기 왜곡 보정 단계는,The distortion correction step,

(1) 상기 깊이 맵(Depth map)을 이진화하는 단계;(1) binarizing the depth map;

(2) 상기 단계 (1)에서 이진화 된 이진화 영상으로부터 영상의 에지 특징을 획득하는 단계;(2) obtaining edge features of the image from the binarized image binarized in step (1);

(3) 상기 단계 (2)에서 획득된 에지 특징 중에서 상, 하, 좌 및 우의 4개의 픽셀을 기준으로, 미리 설정된 각도 범위 내 직선에 포함된 픽셀의 개수가 가장 많은 직선을 대표로 선정하는 단계;(3) Selecting as a representative a straight line with the largest number of pixels included in a straight line within a preset angular range based on four pixels of the upper, lower, left and right among the edge features obtained in step (2). ;

(4) 상기 단계 (3)에서 선정된 직선을 기준으로, 4개의 직선 및 4개의 교차점을 추출하여 베이스 형태를 예측하는 단계; 및(4) predicting a base shape by extracting four straight lines and four intersection points based on the straight line selected in step (3); And

(5) 상기 예측한 베이스 형태를 통해 상기 컬러 영상 및 깊이 맵에 대해 영상의 왜곡 정도를 보정하는 단계를 포함하는 그 구성상의 특징으로 한다.
(5) It is characterized in that it comprises the step of correcting the distortion degree of the image with respect to the color image and the depth map through the predicted base shape.

바람직하게는, 상기 단계 (1) 이전에는,Preferably, prior to step (1),

(0) 단안 카메라에서 획득된 컬러 영상과 깊이 맵을 리사이징하는 단계를 더 포함할 수 있다.
(0) The step of resizing the color image and the depth map obtained from the monocular camera may be further included.

더욱 바람직하게는, 상기 단계 (1)에서는,More preferably, in the step (1),

상기 단계 (0)에서 리사이징 된 깊이 맵을 이진화할 수 있다.
The depth map resized in step (0) can be binarized.

바람직하게는, 상기 단계 (1)에서는,Preferably, in step (1),

깊이 맵에 임계값 알고리즘을 통해, 3차원 모델링의 대상이 되는 블록을 배경과 구분하여 전경을 추출할 수 있다.
Through a threshold algorithm in the depth map, a foreground can be extracted by separating a block to be subjected to 3D modeling from a background.

바람직하게는, 상기 단계 (2)에서는,Preferably, in step (2),

모폴로지 침식 연산(morphology erosion operation)의 결과와 상기 단계 (1)에서 이진화 된 이진화 영상의 차 영상을 통해 영상의 에지 특징을 획득할 수 있다.
The edge features of the image may be obtained through the result of the morphology erosion operation and the difference image between the binarized image binarized in step (1).

바람직하게는, 상기 단계 (3)에서는,Preferably, in step (3),

허프 변환(Hough Transform)을 이용하되, 상기 에지 특징의 전체 픽셀 대신 상, 하, 좌 및 우의 4개의 픽셀을 기준으로 허프 변환을 수행할 수 있다.
A Hough Transform may be used, but Hough Transform may be performed based on four pixels of top, bottom, left, and right instead of all pixels of the edge feature.

바람직하게는, 상기 단계 (5)는,Preferably, the step (5),

(5-1) 상기 단계 (4)에서 추출된 4개의 교차점과 원근 변환 결과 영상에 해당되는 4개의 점을 이용해 영상 보정을 위한 변환 행렬(map_matrix)을 획득하는 단계; 및(5-1) obtaining a transformation matrix (map_matrix) for image correction using the four intersection points extracted in step (4) and four points corresponding to the resulting image of the perspective transformation; And

(5-2) 상기 획득한 변환 행렬을 상기 컬러 영상 및 상기 깊이 맵의 이진화 영상에 적용하여 왜곡 정도를 보정하는 단계를 포함할 수 있다.
(5-2) applying the obtained transformation matrix to the color image and the binarized image of the depth map to correct a degree of distortion.

더욱 바람직하게는, 상기 단계 (5-1)에서는, 3×3의 변환 행렬을 획득할 수 있다.
More preferably, in step (5-1), a 3×3 transformation matrix may be obtained.

바람직하게는, 상기 모델링 단계는,Preferably, the modeling step,

(a) 상기 왜곡 보정 단계에서 보정된 깊이 맵에 대하여, 가상의 모눈을 생성하는 단계;(a) generating a virtual grid for the depth map corrected in the distortion correction step;

(b) 상기 단계 (a)에서 생성된 가상의 모눈을 이용해 블록을 생성하는 단계; 및(b) generating a block using the virtual grid generated in step (a); And

(c) 상기 생성된 블록으로 3차원 모델을 생성하는 단계를 포함할 수 있다.
(c) generating a 3D model from the generated block.

더욱 바람직하게는, 상기 단계 (a)에서는,More preferably, in the step (a),

상기 왜곡 보정 단계에서 보정된 깊이 맵의 이진화 영상을 기초로, 3차원 모델링의 대상이 되는 블록을 배경과 구분하여 추출된 전경의 크기에 따라 상기 가상의 모눈을 생성할 수 있다.
Based on the binarized image of the depth map corrected in the distortion correction step, the virtual grid may be generated according to the size of the extracted foreground by separating the block to be subjected to 3D modeling from the background.

더욱 바람직하게는, 상기 단계 (b) 및 단계 (c) 사이에는,More preferably, between the steps (b) and (c),

(b-1) 상기 가상의 모눈 내에 포함된 픽셀의 HSV값을 이용해 미리 생성된 룩업 테이블과 비교하여 컬러를 매칭하는 단계; 및(b-1) comparing colors with a pre-generated lookup table using HSV values of pixels included in the virtual grid to match colors; And

(b-2) 상기 단계 (b)에서 생성된 블록에 대해, 가장 많이 매칭된 컬러를 블록의 대표 컬러로 결정하는 단계를 더 포함할 수 있다.
(b-2) For the block generated in step (b), the step of determining the most matched color as the representative color of the block may be further included.

더더욱 바람직하게는, 상기 단계 (b-1)에서는,Even more preferably, in the step (b-1),

미리 지정한 컬러의 평균 HSV 및 RGB 수치를 계산해 미리 생성된 룩업 테이블을 이용하며, 상기 가상의 모눈 내에 포함된 픽셀의 H값을 이용해 컬러를 매칭하되, 미리 정해진 색상에 대해서는 H값 및 V값을 이용해 컬러를 매칭할 수 있다.Using a pre-generated lookup table by calculating the average HSV and RGB values of pre-designated colors, matching the colors using the H values of the pixels included in the virtual grid, but using the H and V values for the predetermined colors. Color can be matched.

본 발명에서 제안하고 있는 가변 시점에서 촬영된 카메라 왜곡 보정 방법 및 이를 이용한 블록 3차원 모델링 방법에 따르면, 단안 카메라에서 획득된 컬러 영상 및 깊이 맵을 이용한 블록 3차원 모델링에 있어서, 깊이 맵의 이진화 영상과 변형 허프 변환(Hough Transform)을 이용해 가변 시점에서 촬영된 카메라 왜곡을 평면 시점으로 보정하고, 왜곡 보정된 영상으로 블록 3차원 모델을 생성함으로써, 블록 3차원 모델링 시 발생할 수 있는 오류를 최소화하여 정확한 3차원 모델링을 할 수 있다.According to the camera distortion correction method photographed at a variable viewpoint and the block 3D modeling method using the same, a binary image of a depth map in block 3D modeling using a color image and a depth map obtained from a monocular camera. By using Hough Transform and correcting the camera distortion from a variable viewpoint to a flat viewpoint, and creating a block 3D model with the distortion-corrected image, errors that may occur during block 3D modeling are minimized and accurate. You can do 3D modeling.

도 1은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법 및 이를 이용한 블록 3차원 모델링 방법의 구현을 위한 시스템 구성을 도시한 도면.
도 2는 단안 카메라에서 획득된 컬러 영상을 예를 들어 도시한 도면.
도 3은 컬러 영상으로부터 획득된 깊이 맵을 예를 들어 도시한 도면.
도 4는 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법의 흐름을 도시한 도면.
도 5는 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법의 흐름을 도시한 도면.
도 6은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 이진화 영상을 예를 들어 도시한 도면.
도 7은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 추출된 에지 특징을 예를 들어 도시한 도면.
도 8은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 예측된 베이스 형태를 예를 들어 도시한 도면.
도 9는 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 단계 S130 및 단계 S140의 구체적인 알고리즘을 도시한 도면.
도 10은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 왜곡 보정된 컬러 영상을 도시한 도면.
도 11은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 왜곡 보정된 깊이 맵의 이진화 영상을 도시한 도면.
도 12는 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법에서, 모델링 단계의 세부적인 흐름을 도시한 도면.
도 13은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법에서, 컬러 매칭을 설명하기 위해 도시한 도면.
도 14는 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법에서, 3차원 모델링 결과를 예를 들어 도시한 도면.
1 is a diagram showing a system configuration for implementing a camera distortion correction method photographed at a variable viewpoint and a block 3D modeling method using the same according to an embodiment of the present invention.
2 is a diagram illustrating a color image acquired from a monocular camera as an example.
3 is a diagram illustrating, for example, a depth map obtained from a color image.
4 is a diagram illustrating a flow of a block 3D modeling method using camera distortion correction photographed at a variable viewpoint according to an embodiment of the present invention.
5 is a diagram illustrating a flow of a camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention.
6 is a diagram illustrating a binarized image as an example in a camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention.
7 is a diagram illustrating, for example, an edge feature extracted in a method for correcting camera distortion taken at a variable viewpoint according to an embodiment of the present invention.
FIG. 8 is a diagram illustrating, for example, a predicted base shape in a camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention.
9 is a diagram showing specific algorithms of steps S130 and S140 in a method for correcting camera distortion taken at a variable viewpoint according to an embodiment of the present invention.
10 is a diagram showing a color image with distortion-corrected in the camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention.
FIG. 11 is a diagram illustrating a binarized image of a distortion-corrected depth map in a camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention.
12 is a diagram illustrating a detailed flow of a modeling step in a block 3D modeling method using camera distortion correction photographed from a variable viewpoint according to an embodiment of the present invention.
13 is a diagram illustrating color matching in a block 3D modeling method using camera distortion correction photographed at a variable viewpoint according to an embodiment of the present invention.
14 is a diagram illustrating a 3D modeling result as an example in a block 3D modeling method using camera distortion correction photographed from a variable viewpoint according to an embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있도록 바람직한 실시예를 상세히 설명한다. 다만, 본 발명의 바람직한 실시예를 상세하게 설명함에 있어, 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다. 또한, 유사한 기능 및 작용을 하는 부분에 대해서는 도면 전체에 걸쳐 동일한 부호를 사용한다.
Hereinafter, preferred embodiments will be described in detail with reference to the accompanying drawings so that those of ordinary skill in the art may easily implement the present invention. However, in describing a preferred embodiment of the present invention in detail, if it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the subject matter of the present invention, the detailed description thereof will be omitted. In addition, the same reference numerals are used throughout the drawings for parts having similar functions and functions.

덧붙여, 명세서 전체에서, 어떤 부분이 다른 부분과 연결 되어 있다고 할 때, 이는 직접적으로 연결 되어 있는 경우뿐만 아니라, 그 중간에 다른 소자를 사이에 두고 간접적으로 연결 되어 있는 경우도 포함한다. 또한, 어떤 구성요소를 포함 한다는 것은, 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있다는 것을 의미한다.
In addition, throughout the specification, when a part is said to be connected to another part, this includes not only the case that it is directly connected, but also the case that it is indirectly connected with another element interposed therebetween. In addition, the inclusion of certain components means that other components may be further included rather than excluding other components unless specifically stated to the contrary.

도 1은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법 및 이를 이용한 블록 3차원 모델링 방법의 구현을 위한 시스템 구성을 도시한 도면이다. 도 1에 도시된 바와 같이, 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법 및 이를 이용한 블록 3차원 모델링 방법은, 왜곡 보정부(100) 및 모델링부(200)를 포함하여 구성되는 시스템에 의해 구현될 수 있다.
FIG. 1 is a diagram illustrating a system configuration for implementing a camera distortion correction method photographed at a variable viewpoint and a block 3D modeling method using the same according to an embodiment of the present invention. As shown in FIG. 1, a camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention and a block 3D modeling method using the same include a distortion correction unit 100 and a modeling unit 200. It can be implemented by the configured system.

도 2는 단안 카메라에서 획득된 컬러 영상을 예를 들어 도시한 도면이고, 도 3은 컬러 영상으로부터 획득된 깊이 맵을 예를 들어 도시한 도면이다. 본 발명은, 단안 카메라에서 획득된 컬러 영상 및 깊이 맵을 이용한 블록 3차원 모델링을 위한 것이다. 즉, 도 2에 도시된 바와 같이 블록을 단안 카메라로 촬영하여 획득한 컬러 영상을 이용해, 도 3에 도시된 바와 같은 깊이 맵을 생성하고, 컬러 영상과 생성된 깊이 맵을 이용해 블록을 3차원 모델링할 수 있다. 컬러 영상으로부터 깊이 맵을 생성하는 방법으로는, 깊이 맵 예측 CNN 등을 이용할 수 있다.
FIG. 2 is a diagram illustrating a color image acquired from a monocular camera as an example, and FIG. 3 is a diagram illustrating a depth map acquired from a color image as an example. The present invention is for block 3D modeling using a color image and a depth map acquired from a monocular camera. That is, as shown in FIG. 2, using a color image obtained by photographing a block with a monocular camera, a depth map as shown in FIG. 3 is generated, and the block is modeled in 3D using a color image and the generated depth map. can do. As a method of generating a depth map from a color image, a depth map prediction CNN or the like can be used.

도 3에 도시된 바와 같은 깊이 맵은 2차원의 영상이지만 3차원의 구조에 대한 정보를 포함하고 있어, 이를 이용하면 3차원 모델링을 할 수 있다. 보다 구체적으로는, 사용자가 스마트폰 등 사용자 단말기에 구비된 단안 카메라를 이용해 도 2에 도시된 바와 같은 블록의 컬러 영상을 촬영한 경우, 서버는 사용자 단말기로부터 컬러 영상을 전송받아 도 3에 도시된 바와 같은 깊이 맵 영상을 획득한 다음, 두 영상을 이용해 가상 환경에서 블록 3차원 모델링을 하여 사용자 단말기에 제공할 수 있다. 사용자는 스마트폰 등 사용자 단말기를 이용해, 블록의 3차원 모델링 영상을 확인할 수 있다.
Although the depth map as shown in FIG. 3 is a two-dimensional image, it includes information on a three-dimensional structure, and using this, it is possible to perform a three-dimensional modeling. More specifically, when a user photographs a color image of a block as shown in FIG. 2 using a monocular camera provided in a user terminal such as a smartphone, the server receives the color image from the user terminal and receives the color image as illustrated in FIG. 3. After acquiring the depth map image as described above, block 3D modeling in a virtual environment using the two images may be provided to a user terminal. The user can check the 3D modeling image of the block using a user terminal such as a smartphone.

이와 같은 블록 3차원 모델링에 있어서, 평면시점(Top View)에서 촬영된 영상은 비교적 쉽게 처리할 수 있으나, 일반 사용자가 스마트폰 등의 사용자 단말기로 블록 객체를 촬영하는 시점은 다양할 수 있다. 따라서 가변 시점에서 촬영된 카메라 왜곡으로 인하여, 블록 3차원 모델링 과정에서 오류가 발생할 수 있다. 따라서 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법 및 이를 이용한 블록 3차원 모델링 방법을 이용하면, 왜곡 보정을 통해 블록 3차원 모델링 시 발생할 수 있는 오류를 최소화할 수 있다.
In such a block 3D modeling, an image captured from a top view can be processed relatively easily, but the point in time when a general user shoots a block object with a user terminal such as a smartphone may vary. Therefore, an error may occur in the block 3D modeling process due to the distortion of the camera photographed at the variable viewpoint. Therefore, by using the camera distortion correction method and the block 3D modeling method using the same according to an embodiment of the present invention, it is possible to minimize errors that may occur during block 3D modeling through distortion correction.

도 4는 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법의 흐름을 도시한 도면이다. 도 4에 도시된 바와 같이, 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법은, 왜곡 보정 단계(S100) 및 모델링 단계(S200)를 포함하여 구현될 수 있다. 즉, 왜곡 보정부(100)가 왜곡 보정 단계(S100)를 수행하여 가변 시점에서 촬영된 카메라 왜곡을 보정함으로써, 블록 3차원 모델링 시 발생할 수 있는 오류를 최소화하고, 더욱 정확한 블록 3차원 모델링 결과를 얻을 수 있다.
4 is a diagram illustrating a flow of a block 3D modeling method using camera distortion correction photographed at a variable viewpoint according to an embodiment of the present invention. As shown in FIG. 4, the block 3D modeling method using camera distortion correction photographed at a variable viewpoint according to an embodiment of the present invention includes a distortion correction step (S100) and a modeling step (S200). I can. That is, the distortion correction unit 100 performs the distortion correction step (S100) to correct the camera distortion photographed at a variable viewpoint, thereby minimizing errors that may occur during block 3D modeling, and obtaining a more accurate block 3D modeling result. You can get it.

왜곡 보정 단계(S100)에서는, 왜곡 보정부(100)가 단안 카메라에서 획득된 컬러 영상 및 깊이 맵에 대하여, 카메라 왜곡을 보정할 수 있다. 즉, 왜곡 보정 단계(S100)는, 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에 해당하는 것으로서, 추후 도 5를 참조하여 상세히 설명하도록 한다.
In the distortion correction step S100, the distortion correction unit 100 may correct the camera distortion with respect to the color image and the depth map obtained from the monocular camera. That is, the distortion correction step S100 corresponds to a camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention, and will be described in detail later with reference to FIG. 5.

모델링 단계(S200)에서는, 모델링부(200)가 왜곡이 보정된 컬러 영상 및 깊이 맵을 이용해 블록 3차원 모델링을 수행할 수 있다. 모델링 단계(S200)의 세부적인 구성에 대해서는 추후 도 12를 참조하여 상세히 설명하도록 한다.
In the modeling step S200, the modeling unit 200 may perform block 3D modeling using a color image and a depth map for which distortion is corrected. A detailed configuration of the modeling step S200 will be described in detail later with reference to FIG. 12.

도 5는 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법의 흐름을 도시한 도면이다. 도 5에 도시된 바와 같이, 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법은, 깊이 맵을 이진화하는 단계(S110), 이진화 영상으로부터 영상의 에지 특징을 획득하는 단계(S120), 상, 하, 좌 및 우의 4개의 픽셀을 기준으로 미리 설정된 각도 범위 내 직선에 포함된 픽셀의 개수가 가장 많은 직선을 대표로 선정하는 단계(S130), 베이스 형태를 예측하는 단계(S140) 및 컬러 영상 및 깊이 맵에 대해 영상의 왜곡 정도를 보정하는 단계(S150)를 포함하여 구현될 수 있으며, 컬러 영상과 깊이 맵을 리사이징하는 단계(S105)를 더 포함하여 구현될 수 있다.
5 is a diagram illustrating a flow of a camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention. As shown in FIG. 5, the camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention includes the steps of binarizing the depth map (S110) and obtaining edge features of the image from the binarized image (S120). ), selecting as a representative a straight line with the largest number of pixels included in a straight line within a preset angular range based on the four pixels of the top, bottom, left and right (S130), and predicting the base shape (S140) And correcting the distortion degree of the image with respect to the color image and the depth map (S150), and may further include resizing the color image and the depth map (S105).

단계 S105에서는, 단안 카메라에서 획득된 컬러 영상과 깊이 맵을 리사이징할 수 있다. 현재 단안 카메라를 통해 얻어질 수 있는 영상의 해상도는 다양하다. 이에 따라 영상의 픽셀 참조는 해상도와 관계가 있다. 즉, 해상도가 클수록 픽셀 참조가 많아져 처리 시간이 길어진다. 따라서 처리 시간을 최소화하기 위해 단계 S105에서는 영상을 리사이징(Resizing)하여 사용할 수 있다. 보다 구체적으로는, 도 2에 도시된 바와 같이, 입력으로 사용되는 320×240 크기의 컬러 영상과 깊이 맵을 축소시켜 사용할 수 있다. 이때, 영상의 해상도를 일정 수준 이상으로 축소할 경우, 영상의 화질이 떨어져 처리에 있어 문제가 발생할 수 있으므로, 적절한 크기로 리사이징을 할 수 있다.
In step S105, the color image and the depth map obtained from the monocular camera may be resized. Currently, there are various resolutions of images that can be obtained through monocular cameras. Accordingly, the pixel reference of the image is related to the resolution. That is, as the resolution increases, the number of pixel references increases and the processing time increases. Therefore, in order to minimize the processing time, the image may be resized and used in step S105. More specifically, as shown in FIG. 2, a 320×240 color image and a depth map used as inputs may be reduced and used. In this case, if the resolution of the image is reduced to a certain level or more, the image quality may be degraded and a problem may occur in processing. Therefore, resizing may be performed in an appropriate size.

단계 S110에서는, 깊이 맵(Depth map)을 이진화할 수 있다. 영상의 왜곡 정보를 얻기 위해서는 블록 모델의 베이스 형태를 이용할 수 있다. 베이스 형태는 이진화 영상에 비해 컬러 영상에서 분명하게 나타나지만, 컬러 영상에서 베이스의 형태만을 검출하는 것은 상당히 어려운 문제이므로, 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서는, 컬러 영상보다 비교적 단순한 깊이 맵의 이진화 영상을 이용하여 베이스 형태를 검출하도록 한다.
In step S110, the depth map may be binarized. In order to obtain image distortion information, a base form of a block model can be used. The base shape is clearly seen in the color image compared to the binarized image, but since it is a very difficult problem to detect only the base shape in the color image, in the camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention, a color image The base shape is detected using a relatively simple binarized image of the depth map.

보다 구체적으로, 단계 S110에서는, 깊이 맵에 임계값 알고리즘을 적용해, 3차원 모델링의 대상이 되는 블록을 배경과 구분하여 전경을 추출할 수 있다. 이때, 단계 S110에서는, 단계 S105에서 리사이징 된 깊이 맵을 이진화할 수 있다.
More specifically, in step S110, by applying a threshold algorithm to the depth map, a foreground block may be extracted by separating a block to be subjected to 3D modeling from a background. At this time, in step S110, the depth map resized in step S105 may be binarized.

도 6은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 이진화 영상을 예를 들어 도시한 도면이다. 깊이 맵은 2차원의 영상이지만 3차원 모델링을 위한 정보를 포함하고 있다. 도 3에 도시된 깊이 맵에서 확인할 수 있는 바와 같이, 깊이 맵에서는 색상의 차이에 따라 3차원에 대한 공간 정보를 확인할 수 있고, 이를 통해 블록 3차원 모델링을 하고자 하는 물체 즉, 블록의 형태 정보를 파악할 수 있다. 모델링을 위해서는 물체의 형태를 배경과 구분 지어 전경을 정확하게 추출할 필요가 있다. 도 3에 도시된 바와 같은 깊이 맵은 대비가 강하기 때문에, 단계 S110에서는 간단한 임계값 알고리즘을 통해 전경을 쉽게 추출하여, 도 6에 도시된 바와 같은 이진화 영상을 얻을 수 있다.
6 is a diagram illustrating a binarized image as an example in a camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention. The depth map is a two-dimensional image, but contains information for three-dimensional modeling. As can be seen in the depth map shown in FIG. 3, in the depth map, spatial information about 3D can be checked according to the difference in color, and through this, the object to be modeled in 3D, that is, the shape information of the block. I can grasp it. For modeling, it is necessary to accurately extract the foreground by separating the shape of the object from the background. Since the depth map as shown in FIG. 3 has a strong contrast, in step S110, a foreground is easily extracted through a simple threshold algorithm to obtain a binarized image as shown in FIG. 6.

단계 S120에서는, 단계 S110에서 이진화 된 이진화 영상으로부터 영상의 에지 특징을 획득할 수 있다. 보다 구체적으로, 단계 S120에서는, 모폴로지 침식 연산(morphology erosion operation)의 결과와 단계 S110에서 이진화 된 이진화 영상의 차 영상을 통해 영상의 에지 특징을 획득할 수 있다.
In step S120, edge features of the image may be acquired from the binarized image binarized in step S110. More specifically, in step S120, an edge feature of the image may be obtained through a result of a morphology erosion operation and a difference image between the binarized image binarized in step S110.

도 7은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 추출된 에지 특징을 예를 들어 도시한 도면이다. 도 7에 도시된 바와 같이, 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서는, 단계 S120을 수행하여 객체의 에지를 추출할 수 있다.
7 is a diagram illustrating, for example, an extracted edge feature in a camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention. As shown in FIG. 7, in the camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention, step S120 may be performed to extract an edge of an object.

단계 S130에서는, 단계 S120에서 획득된 에지 특징 중에서 상, 하, 좌 및 우의 4개의 픽셀을 기준으로, 미리 설정된 각도 범위 내 직선에 포함된 픽셀의 개수가 가장 많은 직선을 대표로 선정할 수 있다. 즉, 블록의 베이스 형태를 예측하기 위해, 이진화 영상 및 변형 허프 변환을 이용할 수 있다. 보다 구체적으로, 단계 S130에서는, 허프 변환(Hough Transform)을 이용하되, 에지 특징의 전체 픽셀 대신 상, 하, 좌 및 우의 4개의 픽셀을 기준으로 허프 변환을 수행할 수 있다.
In step S130, a straight line having the largest number of pixels included in a straight line within a preset angular range may be selected as a representative based on four pixels of the upper, lower, left, and right of the edge features obtained in step S120. That is, in order to predict the base shape of a block, a binarized image and a transformed Hough transform may be used. More specifically, in step S130, a Hough transform may be used, but Hough transform may be performed based on four pixels of top, bottom, left, and right instead of all pixels of edge features.

기존의 허프 변환은 직선추출을 위해 에지 픽셀 전체에서 수행된다. 그러나 본 발명의 단계 S130에서는 허프 변환을 변형하여 상, 하, 좌, 우 네 개의 픽셀(Pi)을 기준으로 특정 각도(θ) 범위 내 직선에 포함된 픽셀의 개수가 가장 큰 직선을 대표로 선정할 수 있다. 이와 같이, 4개의 픽셀을 기준으로 허프 변환을 수행하는 것을 변형 허프 변환이라고 정의하였다.
The conventional Hough transform is performed on the entire edge pixel for linear extraction. However, in step S130 of the present invention, the Hough transform is modified to represent a straight line with the largest number of pixels included in a straight line within a specific angle (θ) based on four pixels (P i) up, down, left, and right. Can be selected. As described above, performing Hough transform based on four pixels was defined as modified Hough transform.

단계 S140에서는, 단계 S130에서 선정된 직선을 기준으로, 4개의 직선 및 4개의 교차점을 추출하여 베이스 형태를 예측할 수 있다. 도 8은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 예측된 베이스 형태를 예를 들어 도시한 도면이다. 도 8에 도시된 바와 같이, 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법의 단계 S140에서는, 4개의 직선 및 4개의 교차점으로 객체 즉, 블록의 베이스 형태를 예측할 수 있다.
In step S140, based on the straight line selected in step S130, the base shape may be predicted by extracting four straight lines and four intersection points. 8 is a diagram illustrating, for example, a predicted base shape in a camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention. As shown in FIG. 8, in step S140 of the camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention, a base shape of an object, that is, a block, may be predicted with four straight lines and four intersections.

도 9는 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 단계 S130 및 단계 S140의 구체적인 알고리즘을 도시한 도면이다. 도 9에 도시된 바와 같이, 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서는, 깊이 맵의 이진화 영상과 변형 허프 변환을 통해 블록의 베이스 형태를 예측하여 보정에 활용할 수 있다.
9 is a diagram illustrating specific algorithms of steps S130 and S140 in a method of correcting camera distortion taken at a variable viewpoint according to an embodiment of the present invention. As shown in FIG. 9, in the camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention, a base shape of a block may be predicted and utilized for correction through a binarized image of a depth map and a transformed Hough transform. .

단계 S150에서는, 예측한 베이스 형태를 통해 컬러 영상 및 깊이 맵에 대해 영상의 왜곡 정도를 보정할 수 있다. 도 5에 도시된 바와 같이, 단계 S150은, 영상 보정을 위한 변환 행렬을 획득하는 단계(S151) 및 변환 행렬을 적용하여 왜곡 정도를 보정하는 단계(S152)를 포함하여 구현될 수 있다.
In step S150, the degree of distortion of the image may be corrected for the color image and the depth map through the predicted base shape. As shown in FIG. 5, step S150 may be implemented including obtaining a transformation matrix for image correction (S151) and applying a transformation matrix to correct distortion (S152).

단계 S151에서는, 단계 S140에서 추출된 4개의 교차점과 원근 변환 결과 영상에 해당되는 4개의 점을 이용해 영상 보정을 위한 변환 행렬(map_matrix)을 획득할 수 있다.
In step S151, a transformation matrix map_matrix for image correction may be obtained by using the four intersection points extracted in step S140 and four points corresponding to the resultant image of the perspective transformation.

단계 S152에서는, 획득한 변환 행렬을 컬러 영상 및 깊이 맵의 이진화 영상에 적용하여 왜곡 정도를 보정할 수 있다. 도 10은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 왜곡 보정된 컬러 영상을 도시한 도면이고, 도 11은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법에서, 왜곡 보정된 깊이 맵의 이진화 영상을 도시한 도면이다. 즉, 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정 방법을 통해, 왜곡된 영상을 보정하여 도 10 및 도 11에 도시된 바와 같은 보정된 영상을 획득할 수 있다. 이때, 깊이 맵에 대해서는, 도 3에 도시된 깊이 맵이 아닌, 도 6에 도시된 바와 같은 이진화 영상에 대해 왜곡 보정을 수행할 수 있다.
In step S152, the degree of distortion may be corrected by applying the obtained transformation matrix to the color image and the binarized image of the depth map. FIG. 10 is a diagram illustrating a distortion-corrected color image in a camera distortion correction method photographed at a variable viewpoint according to an embodiment of the present invention, and FIG. 11 is a camera photographed at a variable viewpoint according to an embodiment of the present invention. In the distortion correction method, a diagram showing a binarized image of a distortion-corrected depth map. That is, through the camera distortion correction method captured at a variable viewpoint according to an embodiment of the present invention, a distorted image may be corrected to obtain a corrected image as illustrated in FIGS. 10 and 11. In this case, with respect to the depth map, distortion correction may be performed on the binarized image shown in FIG. 6, not the depth map shown in FIG. 3.

도 12는 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법에서, 모델링 단계(S200)의 세부적인 흐름을 도시한 도면이다. 도 12에 도시된 바와 같이, 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법의 모델링 단계(S200)는, 보정된 깊이 맵에 대하여 가상의 모눈을 생성하는 단계(S210), 가상의 모눈을 이용해 블록을 생성하는 단계(S220), 및 생성된 블록으로 3차원 모델을 생성하는 단계(S230)를 포함하여 구현될 수 있으며, 미리 생성된 룩업 테이블과 비교하여 컬러를 매칭하는 단계(S221) 및 가장 많이 매칭된 컬러를 블록의 대표 컬러로 결정하는 단계(S222)를 더 포함하여 구현될 수 있다.
12 is a diagram illustrating a detailed flow of a modeling step (S200) in a block 3D modeling method using camera distortion correction photographed at a variable viewpoint according to an embodiment of the present invention. As shown in FIG. 12, in the modeling step (S200) of the block 3D modeling method using camera distortion correction photographed at a variable viewpoint according to an embodiment of the present invention, a virtual grid is generated for the corrected depth map. (S210), generating a block using a virtual grid (S220), and generating a 3D model from the generated block (S230), and comparing with a pre-generated lookup table Accordingly, a color matching step (S221) and a step of determining the most matched color as the representative color of the block (S222) may be further included.

단계 S210에서는, 왜곡 보정 단계(S100)에서 보정된 깊이 맵에 대하여, 가상의 모눈을 생성할 수 있다. 모델링 되는 3차원 모델은 입력 영상과 유사해야 한다. 따라서 단계 S210에서는, 블록의 기본 베이스를 참고하여 가상의 모눈을 생성할 수 있다. 이때, 단계 S210에서는, 왜곡 보정 단계(S100)에서 보정된 깊이 맵의 이진화 영상을 기초로, 3차원 모델링의 대상이 되는 블록을 배경과 구분하여 추출된 전경의 크기에 따라 가상의 모눈을 생성할 수 있다.
In step S210, a virtual grid may be generated for the depth map corrected in the distortion correction step S100. The 3D model to be modeled should be similar to the input image. Therefore, in step S210, a virtual grid may be generated by referring to the basic base of the block. At this time, in step S210, based on the binarized image of the depth map corrected in the distortion correction step (S100), a virtual grid is generated according to the size of the extracted foreground by separating the block to be subjected to 3D modeling from the background. I can.

전술한 바와 같은 예에서는, 블록의 기본 베이스인 8×8 형태를 참고하여, 이진화 영상에서 추출된 전경에 따라 도 11과 같이 가상의 모눈을 생성할 수 있다. 여기서, 가상의 모눈은 필수적으로 8×8 크기를 가지는 것이 아니라 전경의 크기에 따라 조절될 수 있다. 그 다음, 각각의 가상 모눈 안에서의 픽셀들의 참조를 통하여 블록 생성 및 컬러 매칭을 수행하게 된다.
In the above-described example, a virtual grid as shown in FIG. 11 may be generated according to the foreground extracted from the binarized image with reference to the 8×8 form, which is the basic base of the block. Here, the virtual grid does not necessarily have a size of 8×8, but may be adjusted according to the size of the foreground. Then, block generation and color matching are performed by referring to pixels in each virtual grid.

단계 S220에서는, 단계 S210에서 생성된 가상의 모눈을 이용해 블록을 생성할 수 있다. 단계 S220의 블록 생성은 이진화 영상의 참조를 통해 수행될 수 있다. 즉, 도 11에 도시된 바와 같은 이진화 영상에서, 전경의 정보는 픽셀의 값을 흰색으로 표시함으로써 구분될 수 있다. 각각의 가상의 모눈 공간 내의 흰색의 비율을 계산하여 임계값 이상이면 블록을 생성할 수 있다. 블록의 크기는 가상의 모눈에서 만들어질 수 있는 가장 최소 길이를 사용할 수 있다.
In step S220, a block may be generated using the virtual grid generated in step S210. The block generation in step S220 may be performed through reference to the binarized image. That is, in the binarized image as illustrated in FIG. 11, information on the foreground can be distinguished by displaying pixel values in white. A block can be generated if the ratio of white in each virtual grid space is calculated and exceeds the threshold value. The block size can use the minimum length that can be made in the virtual grid.

단계 S221에서는, 가상의 모눈 내에 포함된 픽셀의 HSV값을 이용해 미리 생성된 룩업 테이블과 비교하여 컬러를 매칭할 수 있다. 도 12에 도시된 바와 같이, 단계 S220에서 블록을 생성할 수 있게 되면, 동시에 블록의 색상을 결정하기 위한 단계 S221의 컬러 매칭 과정을 수행할 수 있다.
In step S221, the HSV value of the pixel included in the virtual grid may be compared with a pre-generated lookup table to match colors. As shown in FIG. 12, when a block can be generated in step S220, the color matching process of step S221 for determining the color of the block may be performed at the same time.

도 13은 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법에서, 컬러 매칭을 설명하기 위해 도시한 도면이다. 일반적으로 영상에 많이 사용되는 RGB 모델은 모델링에 있어서 문제점이 존재한다. RGB로는 단안 카메라를 통해 컬러 영상을 얻을 때 빛과 같은 주변 환경의 영향으로 변하는 색상의 정보를 조절하기 쉽지 않다. 따라서 본 발명의 단계 S221에서는, HSV와 같은 다른 컬러 모델을 사용하여 컬러 매칭을 수행할 수 있다. HSV의 H는 순수한 컬러에 대한 정보를 가지고 있다. 다양한 영상들을 통해서 미리 지정한 컬러들의 평균적인 HSV 및 RGB 수치를 계산하고, 도 13과 같은 룩업 테이블을 생성하여 컬러 매칭 시에 참조할 수 있다.
13 is a diagram illustrating color matching in a block 3D modeling method using camera distortion correction photographed at a variable viewpoint according to an embodiment of the present invention. In general, the RGB model, which is widely used for images, has a problem in modeling. With RGB, it is not easy to control color information that changes due to the influence of the surrounding environment such as light when a color image is obtained through a monocular camera. Accordingly, in step S221 of the present invention, color matching may be performed using another color model such as HSV. HSV's H has information about pure color. Average HSV and RGB values of pre-designated colors are calculated through various images, and a lookup table as shown in FIG. 13 may be generated and referred to when color matching.

이때, 단계 S221에서는, 미리 지정한 컬러의 평균 HSV 및 RGB 수치를 계산해 미리 생성된 룩업 테이블을 이용하며, 가상의 모눈 내에 포함된 픽셀의 H값을 이용해 컬러를 매칭하되, 미리 정해진 색상에 대해서는 H값 및 V값을 이용해 컬러를 매칭할 수 있다. 즉, 단계 S221에서는, 가상 모눈 내 각각의 픽셀들은 자신의 H값과 룩업 테이블의 H값을 비교하여 가장 유사하다고 판단되는 컬러를 뽑을 수 있다. 하지만 일부 빨간 계열 색상들은 H값만으로는 구분이 쉽지 않다. 따라서 일부 색상들은 V값 또한 이용하여 컬러 매칭을 수행할 수 있다.
At this time, in step S221, the average HSV and RGB values of the predetermined colors are calculated and a pre-generated lookup table is used, and the colors are matched using the H values of the pixels included in the virtual grid, but the H values for the predetermined colors. And V values can be used to match colors. That is, in step S221, each pixel in the virtual grid may compare its own H value with the H value of the lookup table to select a color determined to be the most similar. However, it is not easy to distinguish some red colors based on the H value alone. Therefore, some colors may perform color matching using the V value as well.

단계 S222에서는, 단계 S220에서 생성된 블록에 대해, 가장 많이 매칭된 컬러를 블록의 대표 컬러로 결정할 수 있다. 즉, 도 13에 도시된 바와 같이, 단계 S221에서 가상 모눈 내 각각의 픽셀들에 대해 가장 유사하다고 판단되는 컬러를 뽑고, 단계 S222에서는 이 중 가장 많이 뽑힌 컬러를 블록의 대표 컬러로 결정할 수 있다. 대표 컬러는 미리 지정된 색상의 RGB 값을 사용할 수 있다.
In step S222, with respect to the block generated in step S220, the most matched color may be determined as the representative color of the block. That is, as shown in FIG. 13, in step S221, a color judged to be the most similar to each of the pixels in the virtual grid may be selected, and in step S222, the most selected color may be determined as the representative color of the block. As the representative color, an RGB value of a predetermined color may be used.

단계 S230에서는, 생성된 블록으로 3차원 모델을 생성할 수 있다. 도 14는 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법에서, 3차원 모델링 결과를 예를 들어 도시한 도면이다. 도 14에 도시된 바와 같이, 본 발명의 일실시예에 따른 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법은, 단계 S220에서 생성된 블록과 단계 S222에서 결정된 대표 컬러를 이용해, 블록 3차원 모델을 가상의 환경에 생성할 수 있다.
In step S230, a 3D model may be generated from the generated block. 14 is a diagram illustrating a 3D modeling result as an example in a block 3D modeling method using camera distortion correction photographed at a variable viewpoint according to an embodiment of the present invention. As shown in FIG. 14, the block 3D modeling method using camera distortion correction photographed at a variable viewpoint according to an embodiment of the present invention uses a block generated in step S220 and a representative color determined in step S222, A 3D model can be created in a virtual environment.

전술한 바와 같이, 본 발명에서 제안하고 있는 가변 시점에서 촬영된 카메라 왜곡 보정 방법 및 이를 이용한 블록 3차원 모델링 방법에 따르면, 단안 카메라에서 획득된 컬러 영상 및 깊이 맵을 이용한 블록 3차원 모델링에 있어서, 깊이 맵의 이진화 영상과 변형 허프 변환(Hough Transform)을 이용해 가변 시점에서 촬영된 카메라 왜곡을 평면 시점으로 보정하고, 왜곡 보정된 영상으로 블록 3차원 모델을 생성함으로써, 블록 3차원 모델링 시 발생할 수 있는 오류를 최소화하여 정확한 3차원 모델링을 할 수 있다.
As described above, according to the camera distortion correction method photographed at a variable viewpoint and the block 3D modeling method using the same, in the block 3D modeling using a color image and a depth map obtained from a monocular camera, By using the binarized image of the depth map and the transformed Hough Transform, camera distortion captured from a variable viewpoint is corrected to a plane viewpoint, and a block 3D model is created with the distortion-corrected image, which can occur during block 3D modeling. By minimizing errors, accurate 3D modeling can be performed.

이상에서 설명한 본 발명의 실시예를 구성하는 모든 구성요소들이 하나로 결합하거나 결합하여 동작하는 것으로 기재되어 있다고 해서, 본 발명이 반드시 이러한 실시예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 그 모든 구성요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 또한, 이와 같은 컴퓨터 프로그램은 USB 메모리, CD 디스크, 플래쉬 메모리 등과 같은 컴퓨터가 읽을 수 있는 기록매체(Computer Readable Media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시예를 구현할 수 있다. 컴퓨터 프로그램의 기록매체로서는 자기 기록매체, 광기록매체 등이 포함될 수 있다.
Even if all the components constituting the embodiments of the present invention described above are described as being combined into one or operating in combination, the present invention is not necessarily limited to these embodiments. That is, as long as it is within the scope of the object of the present invention, one or more of the components may be selectively combined and operated. In addition, although all the components may be implemented as one independent hardware, a program module that performs some or all functions combined in one or more hardware by selectively combining some or all of the components. It may be implemented as a computer program having In addition, such a computer program is stored in a computer readable media such as a USB memory, a CD disk, a flash memory, etc., and is read and executed by a computer, thereby implementing an embodiment of the present invention. The recording medium of the computer program may include a magnetic recording medium, an optical recording medium, and the like.

이상 설명한 본 발명은 본 발명이 속한 기술분야에서 통상의 지식을 가진 자에 의하여 다양한 변형이나 응용이 가능하며, 본 발명에 따른 기술적 사상의 범위는 아래의 특허청구범위에 의하여 정해져야 할 것이다.The present invention described above can be modified or applied in various ways by those of ordinary skill in the technical field to which the present invention belongs, and the scope of the technical idea according to the present invention should be determined by the following claims.

100: 왜곡 보정부
200: 모델링부
S100: 왜곡 보정 단계
S105: 컬러 영상과 깊이 맵을 리사이징하는 단계
S110: 깊이 맵을 이진화하는 단계
S120: 이진화 영상으로부터 영상의 에지 특징을 획득하는 단계
S130: 상, 하, 좌 및 우의 4개의 픽셀을 기준으로 미리 설정된 각도 범위 내 직선에 포함된 픽셀의 개수가 가장 많은 직선을 대표로 선정하는 단계
S140: 베이스 형태를 예측하는 단계
S150: 컬러 영상 및 깊이 맵에 대해 영상의 왜곡 정도를 보정하는 단계
S151: 영상 보정을 위한 변환 행렬을 획득하는 단계
S152: 변환 행렬을 적용하여 왜곡 정도를 보정하는 단계
S200: 모델링 단계
S210: 보정된 깊이 맵에 대하여 가상의 모눈을 생성하는 단계
S220: 가상의 모눈을 이용해 블록을 생성하는 단계
S221: 미리 생성된 룩업 테이블과 비교하여 컬러를 매칭하는 단계
S222: 가장 많이 매칭된 컬러를 블록의 대표 컬러로 결정하는 단계
S230: 생성된 블록으로 3차원 모델을 생성하는 단계
100: distortion correction unit
200: modeling unit
S100: distortion correction step
S105: Resizing the color image and the depth map
S110: Step of binarizing the depth map
S120: Acquiring edge features of the image from the binarized image
S130: Selecting as a representative a straight line with the largest number of pixels included in a straight line within a preset angular range based on four pixels of the top, bottom, left and right
S140: Predicting the base shape
S150: Correcting the degree of distortion of the image with respect to the color image and the depth map
S151: Acquiring a transformation matrix for image correction
S152: Step of correcting the degree of distortion by applying a transformation matrix
S200: modeling phase
S210: Generating a virtual grid for the corrected depth map
S220: Step of generating a block using a virtual grid
S221: Comparing with a pre-generated lookup table to match colors
S222: Step of determining the most matched color as the representative color of the block
S230: Step of generating a 3D model from the generated block

Claims (20)

단안 카메라에서 획득된 컬러 영상 및 깊이 맵을 이용한 블록 3차원 모델링을 위한, 가변 시점에서 촬영된 카메라 왜곡 보정 방법으로서,
(1) 상기 깊이 맵(Depth map)을 이진화하는 단계;
(2) 상기 단계 (1)에서 이진화 된 이진화 영상으로부터 영상의 에지 특징을 획득하는 단계;
(3) 상기 단계 (2)에서 획득된 에지 특징 중에서 상, 하, 좌 및 우의 4개의 픽셀을 기준으로, 미리 설정된 각도 범위 내 직선에 포함된 픽셀의 개수가 가장 많은 직선을 대표로 선정하는 단계;
(4) 상기 단계 (3)에서 선정된 직선을 기준으로, 4개의 직선 및 4개의 교차점을 추출하여 베이스 형태를 예측하는 단계; 및
(5) 상기 예측한 베이스 형태를 통해 상기 컬러 영상 및 깊이 맵에 대해 영상의 왜곡 정도를 보정하는 단계를 포함하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정 방법.
As a method for correcting camera distortion captured at variable viewpoints for block 3D modeling using a color image and a depth map acquired from a monocular camera,
(1) binarizing the depth map;
(2) obtaining edge features of the image from the binarized image binarized in step (1);
(3) Selecting as a representative a straight line with the largest number of pixels included in a straight line within a preset angular range based on four pixels of the upper, lower, left and right among the edge features obtained in step (2). ;
(4) predicting a base shape by extracting four straight lines and four intersection points based on the straight line selected in step (3); And
(5) Compensating the degree of distortion of the image with respect to the color image and the depth map through the predicted base shape.
제1항에 있어서, 상기 단계 (1) 이전에는,
(0) 단안 카메라에서 획득된 컬러 영상과 깊이 맵을 리사이징하는 단계를 더 포함하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정 방법.
The method of claim 1, wherein prior to step (1),
(0) Resizing the color image and the depth map obtained from the monocular camera, characterized in that the camera distortion correction method photographed at a variable viewpoint.
제2항에 있어서, 상기 단계 (1)에서는,
상기 단계 (0)에서 리사이징 된 깊이 맵을 이진화하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정 방법.
The method of claim 2, wherein in step (1),
A method for correcting camera distortion photographed at a variable viewpoint, characterized in that the depth map resized in step (0) is binarized.
제1항에 있어서, 상기 단계 (1)에서는,
깊이 맵에 임계값 알고리즘을 통해, 3차원 모델링의 대상이 되는 블록을 배경과 구분하여 전경을 추출하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정 방법.
The method of claim 1, wherein in step (1),
A method for correcting camera distortion photographed at a variable viewpoint, characterized in that the foreground is extracted by separating a block to be subjected to 3D modeling from a background through a threshold algorithm in a depth map.
제1항에 있어서, 상기 단계 (2)에서는,
모폴로지 침식 연산(morphology erosion operation)의 결과와 상기 단계 (1)에서 이진화 된 이진화 영상의 차 영상을 통해 영상의 에지 특징을 획득하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정 방법.
The method of claim 1, wherein in step (2),
A camera distortion correction method photographed at a variable viewpoint, characterized in that an edge feature of an image is obtained through a result of a morphology erosion operation and a difference image between the binarized image binarized in step (1).
제1항에 있어서, 상기 단계 (3)에서는,
허프 변환(Hough Transform)을 이용하되, 상기 에지 특징의 전체 픽셀 대신 상, 하, 좌 및 우의 4개의 픽셀을 기준으로 허프 변환을 수행하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정 방법.
The method of claim 1, wherein in the step (3),
A camera distortion correction method photographed at a variable viewpoint using Hough Transform, characterized in that Hough transform is performed based on four pixels of top, bottom, left and right instead of all pixels of the edge feature.
제1항에 있어서, 상기 단계 (5)는,
(5-1) 상기 단계 (4)에서 추출된 4개의 교차점과 원근 변환 결과 영상에 해당되는 4개의 점을 이용해 영상 보정을 위한 변환 행렬(map_matrix)을 획득하는 단계; 및
(5-2) 상기 획득한 변환 행렬을 상기 컬러 영상 및 상기 깊이 맵의 이진화 영상에 적용하여 왜곡 정도를 보정하는 단계를 포함하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정 방법.
The method of claim 1, wherein the step (5),
(5-1) obtaining a transformation matrix (map_matrix) for image correction using the four intersection points extracted in step (4) and four points corresponding to the resulting image of the perspective transformation; And
(5-2) comprising the step of correcting the degree of distortion by applying the obtained transformation matrix to the color image and the binarized image of the depth map.
제7항에 있어서, 상기 단계 (5-1)에서는,
3×3의 변환 행렬을 획득하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정 방법.
The method of claim 7, wherein in the step (5-1),
A camera distortion correction method photographed at a variable viewpoint, characterized in that acquiring a 3×3 transformation matrix.
블록 3차원 모델링 방법으로서,
단안 카메라에서 획득된 컬러 영상 및 깊이 맵에 대하여, 카메라 왜곡을 보정하는 왜곡 보정 단계(S100);
상기 왜곡이 보정된 컬러 영상 및 깊이 맵을 이용해 블록 3차원 모델링을 수행하는 모델링 단계(S200)를 포함하며,
상기 왜곡 보정 단계(S100)는,
(1) 상기 깊이 맵(Depth map)을 이진화하는 단계;
(2) 상기 단계 (1)에서 이진화 된 이진화 영상으로부터 영상의 에지 특징을 획득하는 단계;
(3) 상기 단계 (2)에서 획득된 에지 특징 중에서 상, 하, 좌 및 우의 4개의 픽셀을 기준으로, 미리 설정된 각도 범위 내 직선에 포함된 픽셀의 개수가 가장 많은 직선을 대표로 선정하는 단계;
(4) 상기 단계 (3)에서 선정된 직선을 기준으로, 4개의 직선 및 4개의 교차점을 추출하여 베이스 형태를 예측하는 단계; 및
(5) 상기 예측한 베이스 형태를 통해 상기 컬러 영상 및 깊이 맵에 대해 영상의 왜곡 정도를 보정하는 단계를 포함하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
As a block three-dimensional modeling method,
A distortion correction step of correcting camera distortion with respect to the color image and the depth map obtained from the monocular camera (S100);
A modeling step (S200) of performing block 3D modeling using the distortion-corrected color image and a depth map,
The distortion correction step (S100),
(1) binarizing the depth map;
(2) obtaining edge features of the image from the binarized image binarized in step (1);
(3) Selecting as a representative a straight line with the largest number of pixels included in a straight line within a preset angular range based on four pixels of the upper, lower, left and right among the edge features obtained in step (2). ;
(4) predicting a base shape by extracting four straight lines and four intersection points based on the straight line selected in step (3); And
(5) A block 3D modeling method using camera distortion correction photographed at a variable viewpoint, comprising the step of correcting the degree of distortion of the image with respect to the color image and the depth map through the predicted base shape.
제9항에 있어서, 상기 단계 (1) 이전에는,
(0) 단안 카메라에서 획득된 컬러 영상과 깊이 맵을 리사이징하는 단계를 더 포함하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
The method of claim 9, wherein prior to step (1),
(0) Block 3D modeling method using camera distortion correction, characterized in that it further comprises the step of resizing the color image and the depth map obtained from the monocular camera.
제10항에 있어서, 상기 단계 (1)에서는,
상기 단계 (0)에서 리사이징 된 깊이 맵을 이진화하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
The method of claim 10, wherein in step (1),
A block 3D modeling method using camera distortion correction photographed at a variable viewpoint, characterized in that binarizing the depth map resized in step (0).
제9항에 있어서, 상기 단계 (1)에서는,
깊이 맵에 임계값 알고리즘을 통해, 3차원 모델링의 대상이 되는 블록을 배경과 구분하여 전경을 추출하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
The method of claim 9, wherein in the step (1),
A block 3D modeling method using camera distortion correction taken from a variable viewpoint, characterized in that the foreground is extracted by separating a block to be subjected to 3D modeling from a background through a threshold algorithm in a depth map.
제9항에 있어서, 상기 단계 (2)에서는,
모폴로지 침식 연산(morphology erosion operation)의 결과와 상기 단계 (1)에서 이진화 된 이진화 영상의 차 영상을 통해 영상의 에지 특징을 획득하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
The method of claim 9, wherein in the step (2),
Block 3 using camera distortion correction taken at a variable viewpoint, characterized in that the edge features of the image are acquired through the result of the morphology erosion operation and the difference image of the binarized image binarized in step (1). Dimensional modeling method.
제9항에 있어서, 상기 단계 (3)에서는,
허프 변환(Hough Transform)을 이용하되, 상기 에지 특징의 전체 픽셀 대신 상, 하, 좌 및 우의 4개의 픽셀을 기준으로 허프 변환을 수행하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
The method of claim 9, wherein in the step (3),
Using Hough Transform, characterized in that Hough transform is performed based on four pixels of top, bottom, left, and right instead of all pixels of the edge feature, using camera distortion correction taken at a variable viewpoint. Block three-dimensional modeling method.
제9항에 있어서, 상기 단계 (5)는,
(5-1) 상기 단계 (4)에서 추출된 4개의 교차점과 원근 변환 결과 영상에 해당되는 4개의 점을 이용해 영상 보정을 위한 변환 행렬(map_matrix)을 획득하는 단계; 및
(5-2) 상기 획득한 변환 행렬을 상기 컬러 영상 및 상기 깊이 맵의 이진화 영상에 적용하여 왜곡 정도를 보정하는 단계를 포함하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
The method of claim 9, wherein the step (5),
(5-1) obtaining a transformation matrix (map_matrix) for image correction using the four intersection points extracted in step (4) and four points corresponding to the resulting image of the perspective transformation; And
(5-2) Block 3 using camera distortion correction photographed at a variable viewpoint, comprising the step of correcting the degree of distortion by applying the obtained transformation matrix to the color image and the binarized image of the depth map. Dimensional modeling method.
제15항에 있어서, 상기 단계 (5-1)에서는,
3×3의 변환 행렬을 획득하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
The method of claim 15, wherein in the step (5-1),
A block 3D modeling method using camera distortion correction photographed at a variable viewpoint, characterized in that acquiring a 3×3 transformation matrix.
제9항에 있어서, 상기 모델링 단계(S200)는,
(a) 상기 왜곡 보정 단계(S100)에서 보정된 깊이 맵에 대하여, 가상의 모눈을 생성하는 단계;
(b) 상기 단계 (a)에서 생성된 가상의 모눈을 이용해 블록을 생성하는 단계; 및
(c) 상기 생성된 블록으로 3차원 모델을 생성하는 단계를 포함하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
The method of claim 9, wherein the modeling step (S200),
(a) generating a virtual grid for the depth map corrected in the distortion correction step (S100);
(b) generating a block using the virtual grid generated in step (a); And
(c) A block 3D modeling method using camera distortion correction, characterized in that it comprises the step of generating a 3D model from the generated block.
제17항에 있어서, 상기 단계 (a)에서는,
상기 왜곡 보정 단계(S100)에서 보정된 깊이 맵의 이진화 영상을 기초로, 3차원 모델링의 대상이 되는 블록을 배경과 구분하여 추출된 전경의 크기에 따라 상기 가상의 모눈을 생성하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
The method of claim 17, wherein in step (a),
Based on the binarized image of the depth map corrected in the distortion correction step (S100), the virtual grid is generated according to the size of the extracted foreground by separating the block to be subjected to 3D modeling from the background. , Block 3D modeling method using camera distortion correction taken at variable viewpoints.
제17항에 있어서, 상기 단계 (b) 및 단계 (c) 사이에는,
(b-1) 상기 가상의 모눈 내에 포함된 픽셀의 HSV값을 이용해 미리 생성된 룩업 테이블과 비교하여 컬러를 매칭하는 단계; 및
(b-2) 상기 단계 (b)에서 생성된 블록에 대해, 가장 많이 매칭된 컬러를 블록의 대표 컬러로 결정하는 단계를 더 포함하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
The method of claim 17, wherein between steps (b) and (c),
(b-1) comparing colors with a pre-generated lookup table using HSV values of pixels included in the virtual grid to match colors; And
(b-2) For the block generated in step (b), the method further comprising determining the most matched color as the representative color of the block, using camera distortion correction photographed at a variable viewpoint. Block three-dimensional modeling method.
제19항에 있어서, 상기 단계 (b-1)에서는,
미리 지정한 컬러의 평균 HSV 및 RGB 수치를 계산해 미리 생성된 룩업 테이블을 이용하며, 상기 가상의 모눈 내에 포함된 픽셀의 H값을 이용해 컬러를 매칭하되, 미리 정해진 색상에 대해서는 H값 및 V값을 이용해 컬러를 매칭하는 것을 특징으로 하는, 가변 시점에서 촬영된 카메라 왜곡 보정을 이용한 블록 3차원 모델링 방법.
The method of claim 19, wherein in the step (b-1),
Using a pre-generated lookup table by calculating the average HSV and RGB values of pre-designated colors, matching the colors using the H values of the pixels included in the virtual grid, but using the H and V values for the predetermined colors. A block 3D modeling method using camera distortion correction, which is characterized by matching colors.
KR1020190123660A 2019-10-07 2019-10-07 Correction method of camera distortion caused by multi-view capturing and generating method for block 3d model using thereof KR102267442B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190123660A KR102267442B1 (en) 2019-10-07 2019-10-07 Correction method of camera distortion caused by multi-view capturing and generating method for block 3d model using thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190123660A KR102267442B1 (en) 2019-10-07 2019-10-07 Correction method of camera distortion caused by multi-view capturing and generating method for block 3d model using thereof

Publications (2)

Publication Number Publication Date
KR20210041241A true KR20210041241A (en) 2021-04-15
KR102267442B1 KR102267442B1 (en) 2021-06-22

Family

ID=75440789

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190123660A KR102267442B1 (en) 2019-10-07 2019-10-07 Correction method of camera distortion caused by multi-view capturing and generating method for block 3d model using thereof

Country Status (1)

Country Link
KR (1) KR102267442B1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005122328A (en) * 2003-10-14 2005-05-12 Casio Comput Co Ltd Photographing apparatus, image processing method and program thereof
JP2010282295A (en) * 2009-06-02 2010-12-16 Sony Corp Apparatus and method for processing image, and program
KR20110052207A (en) * 2009-11-12 2011-05-18 삼성전자주식회사 Image processing apparatus and method for enhancing of depth perception
KR20120053856A (en) * 2010-11-18 2012-05-29 광주과학기술원 Method and system for generating 3-dimensional video content
JP2013089234A (en) * 2011-10-17 2013-05-13 Sharp Corp Image processing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005122328A (en) * 2003-10-14 2005-05-12 Casio Comput Co Ltd Photographing apparatus, image processing method and program thereof
JP2010282295A (en) * 2009-06-02 2010-12-16 Sony Corp Apparatus and method for processing image, and program
KR20110052207A (en) * 2009-11-12 2011-05-18 삼성전자주식회사 Image processing apparatus and method for enhancing of depth perception
KR20120053856A (en) * 2010-11-18 2012-05-29 광주과학기술원 Method and system for generating 3-dimensional video content
JP2013089234A (en) * 2011-10-17 2013-05-13 Sharp Corp Image processing system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
이정우 외 6명,"싱글 카메라 기반의 3D 모델링 및 AR 육성 어플리케이션 개발", 한국정보과학회 2018 한국소프트웨어종합학술대회 논문집, 19 Dec. 2018(2018.12.19.) 1부.* *

Also Published As

Publication number Publication date
KR102267442B1 (en) 2021-06-22

Similar Documents

Publication Publication Date Title
US10540806B2 (en) Systems and methods for depth-assisted perspective distortion correction
US11601631B2 (en) Super-resolution in structured light imaging
US10699476B2 (en) Generating a merged, fused three-dimensional point cloud based on captured images of a scene
US10573018B2 (en) Three dimensional scene reconstruction based on contextual analysis
US9070042B2 (en) Image processing apparatus, image processing method, and program thereof
US8452081B2 (en) Forming 3D models using multiple images
US6671399B1 (en) Fast epipolar line adjustment of stereo pairs
US11348267B2 (en) Method and apparatus for generating a three-dimensional model
US11527014B2 (en) Methods and systems for calibrating surface data capture devices
CN111480342B (en) Encoding device, encoding method, decoding device, decoding method, and storage medium
Serna et al. Data fusion of objects using techniques such as laser scanning, structured light and photogrammetry for cultural heritage applications
CN110276831B (en) Method and device for constructing three-dimensional model, equipment and computer-readable storage medium
CN114693760A (en) Image correction method, device and system and electronic equipment
JP2010140097A (en) Method of creating image, method of authenticating image, image creation device, image authentication device, program, and recording medium
WO2020075252A1 (en) Information processing device, program, and information processing method
JP7156624B2 (en) Depth map filtering device, depth map filtering method and program
KR101983586B1 (en) Method of stitching depth maps for stereo images
US8340399B2 (en) Method for determining a depth map from images, device for determining a depth map
Benveniste et al. Nary coded structured light-based range scanners using color invariants
JP6429483B2 (en) Information processing apparatus, imaging apparatus, information processing system, information processing method, and program
KR102327304B1 (en) A method of improving the quality of 3D images acquired from RGB-depth camera
KR102267442B1 (en) Correction method of camera distortion caused by multi-view capturing and generating method for block 3d model using thereof
KR20220133766A (en) Real-time omnidirectional stereo matching method using multi-view fisheye lenses and system therefore
CN111630569B (en) Binocular matching method, visual imaging device and device with storage function
JP6622886B2 (en) Information processing apparatus, information processing method, and program

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant