KR20100009452A - Method for image processing - Google Patents

Method for image processing Download PDF

Info

Publication number
KR20100009452A
KR20100009452A KR1020080105978A KR20080105978A KR20100009452A KR 20100009452 A KR20100009452 A KR 20100009452A KR 1020080105978 A KR1020080105978 A KR 1020080105978A KR 20080105978 A KR20080105978 A KR 20080105978A KR 20100009452 A KR20100009452 A KR 20100009452A
Authority
KR
South Korea
Prior art keywords
image
line
horizon
determining
ground line
Prior art date
Application number
KR1020080105978A
Other languages
Korean (ko)
Other versions
KR101524074B1 (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 삼성전자주식회사
Publication of KR20100009452A publication Critical patent/KR20100009452A/en
Application granted granted Critical
Publication of KR101524074B1 publication Critical patent/KR101524074B1/en

Links

Images

Classifications

    • 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/10Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/543Depth or shape recovery from line drawings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes

Landscapes

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

Abstract

PURPOSE: An image processing method is provided to decide the ground line which passes the ground and sky or contacts the building and ground. CONSTITUTION: A first image is produced by perform the slope correction about an input color image(120). The local horizon of the first image pitches. One or more burning-off point of the first image is detected from the local horizon(130). A plurality of ground line candidates of the first image pitches based on burning-off points(140). The ground line of the input color images is detected based on the texture change of the texture change in the y-direction and the color variation in y-direction(150).

Description

영상 처리 방법{Method for Image Processing}[0001] The present invention relates to a method for image processing,

본 발명의 일부 실시예는, 영상 처리 방법에 관한 것으로, 보다 구체적으로, 영상으로부터 빌딩 영역과 그라운드 영역의 경계선인 그라운드 라인을 결정하는 방법 및 상기 그라운드 라인에 기초하여 3D 영상을 모델링 하는 방법에 관한 것이다.Some embodiments of the present invention relate to an image processing method, and more particularly, to a method for determining a ground line as a boundary between a building area and a ground area from an image, and a method for modeling a 3D image based on the ground line will be.

최근에 칼라 영상으로부터 3D 영상(3-dimensional image)을 모델링 하는 방법이 연구되고 있다. 일반적으로 3D 영상 모델링을 위한 3D 정보는 형상(geometry) 정보와 칼라(color) 정보로 구성된다. 칼라 정보는 CCD(Charged Coupled Device)나 CMOS(Complementary Metal-Oxide-Semiconductor) 카메라와 같은 영상 취득 장비에 의해 취득되는 칼라 영상을 이용하여 얻어진다. Recently, a method of modeling a 3-dimensional image from a color image has been studied. Generally, 3D information for 3D image modeling is composed of geometry information and color information. The color information is obtained by using a color image acquired by a video acquisition device such as a CCD (Charged Coupled Device) or a CMOS (Complementary Metal-Oxide-Semiconductor) camera.

한편 형상 정보는 깊이(depth) 영상을 이용하여 얻어질 수 있는데, 상기 깊이 영상을 취득하는 방법에는, 깊이 카메라(depth camera)와 같은 하드웨어 장비를 통하여 직접적으로 취득하는 방법과, 컴퓨터 비전(Computer Vision) 기술로 불리는 소프트웨어적인 영상 처리를 통하여 간접적으로 취득하는 방법이 있다.On the other hand, the shape information can be obtained using a depth image. Examples of the method for acquiring the depth image include a method of directly acquiring the depth image through a hardware device such as a depth camera, There is a method of acquiring indirectly through a software image processing called a technique.

또한, 상기 컴퓨터 비전 기술을 통하여 깊이 영상을 취득하는 방법에는 여러 장의 입력 칼라 영상을 사용하는 방법, 및 단지 한 장의 입력 칼라 영상을 사용하 는 방법이 있다.Also, a method of acquiring a depth image through the computer vision technique includes a method of using a plurality of input color images and a method of using only one input color image.

그 중에서도 한 장의 입력 칼라 영상을 사용하는 방법에 대한 연구가 수행되어온 방향은 크게 두 가지로 나뉜다. 하나는 지면(Ground), 수직 구조물(이를 테면 건물)(Vertical or Building), 및 하늘(Sky) 영역으로 칼라 입력 영상을 분할하여 처리하는 방법이다. 그리고 다른 하나는 칼라 영상과 그에 대응되는 깊이 영상의 상호 대응 관계를 학습(training)하고, 상기 학습 결과를 이용하여 입력 칼라 영상을 처리하는 방법이다.Among them, the study on the method of using one input color image is divided into two major directions. One is a method of dividing and processing a color input image into a ground, a vertical structure (a building or the like) (Vertical or Building), and a sky area. And the other is a method of training the input color image using the learning result by training the correspondence relationship between the color image and the corresponding depth image.

상기 영상 분할을 이용하는 방법의 경우, 영상 분할을 위한 전처리 과정이 비교적 복잡하며, 단순히 분할된 각 영역의 기하 정보는 활용하지 않는다. 그리고 상기 학습에 의한 방법의 경우, 축적된 학습 결과(Training Set)에 의해 영상 처리 결과가 크게 좌우된다.In the case of the method using the image segmentation, the preprocessing process for image segmentation is relatively complicated, and merely the geometry information of each divided region is not utilized. In the case of the learning method, the result of the image processing is greatly influenced by the accumulated training result (Training Set).

따라서, 상기 영상 분할이나 학습을 이용하지 않고, 건물과 같은 수직구조물과 지면의 경계선, 또는 하늘과 지면의 경계선인 그라운드 라인(ground line)을 효과적이고 정확하게 검출할 수 있다면, 3D 영상 모델링의 속도와 품질을 높일 수 있을 것이다.Therefore, it is possible to effectively and accurately detect the ground line, which is the boundary line between the vertical structure such as a building and the ground, or the boundary between the sky and the ground, without using the image segmentation or learning, You will be able to improve the quality.

본 발명의 일부 실시예는 3D 영상 모델링의 효율성 향상을 위해 안출된 것으로서, 입력되는 영상으로부터 수직구조물(건물)과 지면이 만나거나 하늘과 지면이 만나는 그라운드 라인을 결정하는 방법을 제공하기 위한 것이다.Some embodiments of the present invention are directed to improving the efficiency of 3D image modeling and provide a method for determining a ground line where a vertical structure (building) and a ground meet from an input image or a sky and a ground meet.

본 발명의 또 다른 실시예는, 상기 그라운드 라인을 이용하여 입력된 2D 칼라 영상을 3D 모델링 하는 방법을 제공하기 위한 것이다.Another embodiment of the present invention is to provide a method of 3D modeling an input 2D color image using the ground line.

상기의 목적을 이루기 위하여, 본 발명의 일측에 따르면, 입력 칼라 영상에 기울임 보정을 수행하여 제1 영상을 생성하는 단계, 상기 제1 영상으로부터 복수 개의 그라운드 라인 후보를 결정하는 단계, 및 상기 복수 개의 그라운드 라인 후보의 y 축 방향의 칼라 변화 및 y축 방향의 텍스쳐 변화 중 적어도 하나에 기초하여 상기 입력 칼라 영상의 그라운드 라인을 검출하는 단계를 포함하는 영상 처리 방법이 제공된다.According to an aspect of the present invention, there is provided a method of generating an image, the method comprising: generating a first image by performing skew correction on an input color image; determining a plurality of ground line candidates from the first image; Detecting a ground line of the input color image based on at least one of a color change in the y-axis direction of the ground line candidate and a texture change in the y-axis direction.

본 발명의 또 다른 일측에 따르면, 상기 복수 개의 그라운드 라인 후보를 결정하는 단계는, 상기 제1 영상의 지평선을 결정하는 단계, 상기 지평선으로부터 상기 제1 영상의 적어도 하나 이상의 소실점을 검출하는 단계, 및 상기 소실점에 기초하여 상기 제1 영상의 복수 개의 그라운드 라인 후보를 결정하는 단계를 포함할 수 있다.According to another aspect of the present invention, the step of determining the plurality of ground line candidates comprises the steps of determining a horizon of the first image, detecting at least one vanishing point of the first image from the horizon, And determining a plurality of ground line candidates of the first image based on the vanishing point.

본 발명의 또 다른 일측에 따르면, 상기 제1 영상의 지평선을 결정하는 단계 는, 상기 제1 영상으로부터 적어도 하나 이상의 수평 방향 직선을 추출하는 단계, 및 상기 적어도 하나 이상의 수평 방향 직선의 교점의 y축 좌표 값에 기초하여 상기 제1 영상의 지평선을 결정하는 단계를 포함할 수 있다.According to another aspect of the present invention, the step of determining the horizon of the first image includes extracting at least one horizontal straight line from the first image, and extracting at least one horizontal straight line from the first image, And determining a horizon of the first image based on the coordinate value.

본 발명의 또 다른 일측에 따르면, 상기 소실점은 상기 적어도 하나 이상의 수평 방향 직선의 교점의 x축 좌표 값에 기초하여 추출된다.According to another aspect of the present invention, the vanishing point is extracted based on the x-axis coordinate value of the intersection of the at least one horizontal straight line.

본 발명의 또 다른 일측에 따르면, 상기 소실점에 기초하여 상기 제1 영상의 복수 개의 그라운드 라인 후보를 결정하는 단계는, 상기 적어도 하나 이상의 수평 방향 직선 중 동일한 소실점에 연관되는 직선을 그룹핑 하여 생성되는 각 그룹의 경계선을 상기 제1 영상의 수직 경계선으로 결정하는 단계, 및 상기 제1 영상의 수직 경계선에서 모서리를 갖는 선분으로 구성되는 복수 개의 그라운드 라인 후보를 결정하는 단계를 포함할 수 있다.According to another aspect of the present invention, the step of determining a plurality of ground line candidates of the first image based on the vanishing point comprises: Determining a boundary line of the group as a vertical boundary line of the first image, and determining a plurality of ground line candidates composed of a line segment having an edge at a vertical boundary line of the first image.

본 발명의 또 다른 일측에 따르면, 상기 제1 영상의 복수 개의 그라운드 라인 후보를 결정하는 단계는, 상기 제1 영상의 지평선 위의 영역에서 x축 방향의 칼라 값 변화에 기초하여 상기 제1 영상의 수직 경계선을 결정하는 단계, 및 상기 제1 영상의 수직 경계선에서 모서리를 갖는 선분으로 구성되는 복수 개의 그라운드 라인 후보를 결정하는 단계를 포함할 수 있다. According to another aspect of the present invention, the step of determining a plurality of ground line candidates of the first image may include: determining a plurality of ground line candidates of the first image based on a color value change in the x- Determining a vertical boundary, and determining a plurality of ground line candidates comprising a line segment having an edge at a vertical boundary of the first image.

본 발명의 또 다른 일측에 따르면, 상기 제1 영상에서 상기 그라운드 라인을 기준으로, 상기 그라운드 라인 상측 부의 영역은 지면과 수직 방향으로 프로젝션 하고, 상기 그라운드 라인 하측 부의 영역은 지면과 평행한 방향으로 프로젝션 하여 상기 제1 영상의 3D 모델링을 수행하는 단계를 더 포함하는 영상 처리 방법이 제공된다. According to another aspect of the present invention, in the first image, a region of the ground line above the ground line is projected in a direction perpendicular to the ground, and the area of the ground line is projected in a direction parallel to the ground, And performing 3D modeling of the first image.

본 발명의 또 다른 일측에 따르면, 입력 영상으로부터 적어도 하나 이상의 수평 방향 직선을 추출하는 단계, 상기 적어도 하나 이상의 수평 방향 직선의 교점의 y 좌표 값에 기초하여 상기 입력 영상의 지평선을 결정하는 단계, 및 상기 적어도 하나 이상의 수평 방향 직선의 교점의 x 좌표 값에 기초하여 상기 지평선으로부터 적어도 하나 이상의 소실점을 검출하는 단계를 포함하는 영상 처리 방법이 제공된다.According to another aspect of the present invention, there is provided a method of generating an image, comprising the steps of: extracting at least one horizontal straight line from an input image; determining a horizon of the input image based on a y coordinate value of an intersection of the at least one horizontal straight line; And detecting at least one vanishing point from the horizon based on an x-coordinate value of an intersection of the at least one horizontal straight line.

본 발명의 일부 실시예에 따르면, 3D 영상 모델링의 효율성이 향상된다.According to some embodiments of the present invention, the efficiency of 3D image modeling is improved.

이하 첨부 도면들 및 첨부 도면들에 기재된 내용들을 참조하여 본 발명의 실시예를 상세하게 설명하지만, 본 발명이 실시예들에 의해 제한되거나 한정되는 것은 아니다. 각 도면에 제시된 동일한 참조부호는 동일한 부재를 나타낸다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and accompanying drawings, but the present invention is not limited to or limited by the embodiments. Like reference symbols in the drawings denote like elements.

도 1은 본 발명의 일 실시예에 따른 영상 처리 방법을 도시하는 흐름도이다.1 is a flowchart showing an image processing method according to an embodiment of the present invention.

단계(110)에서 영상이 입력된다. 상기 영상은 RGB 데이터로 구성되는 칼라 영상 파일이다. 상기 입력 영상의 파일 포맷은 비트맵(bmp), 제이팩(jpeg or jpg), 로파일(raw file) 등의 다양한 형태일 수 있다. 만약, 상기 파일 포맷이 압축(data compression)된 것이라면, 상기 영상 처리에 앞서, 상기 압축을 푸는 작업(decompresion)이 수행될 수 있다.In step 110, an image is input. The image is a color image file composed of RGB data. The file format of the input image may be various forms such as a bitmap (bmp), jpeg or jpg, and a raw file. If the file format is data compression, the decompression may be performed prior to the image processing.

본 발명의 또 다른 실시예에 따르면, 상기 입력 영상에 다양한 전 처리(Pre Processing)을 통하여 영상 처리의 정확도 및/또는 효율성을 높인다. 예를 들어, 상기 입력 영상의 명도(Bright or Value), 채도(Contrast) 등을 조정하여, 조정된 결과 영상을 상기 영상 처리의 입력 영상으로 할 수 있다. 또한 상기 전 처리 과정에서 다양한 필터 마스크(Mask) 처리가 포함될 수 있다.According to another embodiment of the present invention, the accuracy and / or efficiency of image processing is enhanced through various pre-processing of the input image. For example, the adjusted result image may be used as an input image of the image processing by adjusting brightness or value, saturation, etc. of the input image. In addition, various filter mask processing may be included in the pre-processing.

상기 입력 영상 내에는 빌딩(Building) 부분으로서, 수직 구조물인 부분이 존재하는데, 3D 영상 모델링 과정에서 상기 수직 구조물인 부분이 지면과 수직한 방향으로 세워질 것이다. 한편 상기 입력 영상 내에는 지면(Ground) 부분도 존재하는데, 상기 지면 부분은 3D 영상 모델링 과정에서 지면에 평행한 방향으로 모델링 되어야 한다. 한편 그라운드 라인은 상기 입력되는 칼라 영상의 빌딩 부분과 지면 부분의 경계선이다.In the input image, there is a part which is a vertical structure as a building part. In the 3D image modeling process, the part which is a vertical structure will be erected in a direction perpendicular to the ground. Meanwhile, a ground portion exists in the input image, and the ground portion must be modeled in a direction parallel to the ground in the 3D image modeling process. On the other hand, the ground line is the boundary between the building portion and the ground portion of the input color image.

임의의 시점에서 획득된 입력 칼라 영상은 기울임 보정(Tilt correction)이 되지 않은 영상으로서, 수직 방향의 직선들이 y축 방향과 일치하지 못하고 기울어져 있거나 지평선이 x축 방향과 일치하지 못하고 기울어져 있을 수 있다. 따라서 보다 정확한 영상 처리를 위해 기울임 보정이 필요하다.An input color image obtained at an arbitrary time point is an image that has not undergone tilt correction, and vertical straight lines may not be aligned with the y-axis direction and may be inclined or the horizon may be inconsistent with the x-axis direction have. Therefore, tilting correction is required for more accurate image processing.

단계(120)에서 상기 입력 칼라 영상에 기울임 보정을 수행하여 보정된 제1 영상이 생성된다.In step 120, the input color image is skew corrected to generate a corrected first image.

기울임 보정은 3차원 모델링 시의 왜곡을 줄이기 위해 수행된다. 이러한 기울임 보정은 공간 상의 x축 좌표, y축 좌표, 및 z축 좌표에 대해 영상을 회전(Rotation)하여 가상의 시점으로 투영(Projection)하는 방법으로 수행할 수 있다.The skew correction is performed to reduce the distortion in the three-dimensional modeling. This inclination correction can be performed by projecting the image to a virtual viewpoint by rotating the image with respect to x-axis coordinate, y-axis coordinate, and z-axis coordinate in space.

단계(130)에서 상기 제1 영상의 소실점이 검출된다.In step 130, the vanishing point of the first image is detected.

먼저 상기 제1 영상으로부터 수평 방향 직선이 추출된다. 영상으로부터 직선을 추출하는 방법에는 다양한 알고리즘이 있을 수 있다. 상기 추출된 복수 개의 수평 방향의 직선 중 일부는, 동일한 제1 소실점을 지난다. 또 다른 일부 직선은, 제2 소실점을 지난다. 이런 방식으로 제1 소실점 또는 제2 소실점 이외의 수 개의 소실점이 더 있을 수도 있다.First, a horizontal straight line is extracted from the first image. There are various algorithms for extracting a straight line from an image. Some of the extracted straight lines in the horizontal direction pass through the same first vanishing point. Another straight line passes through the second vanishing point. In this way there may be several vanishing points other than the first vanishing point or the second vanishing point.

그리고 추출된 복수 개의 수평 방향의 직선 중 임의의 두 직선을 선택하고, 상기 두 직선의 방향에 기초하여 교점을 구한다. 같은 방식으로, 또 다른 두 직선에 의한 다른 교점을 구하면 복수 개의 교점이 구해질 수 있다. Then, an arbitrary two straight lines out of a plurality of extracted horizontal straight lines are selected, and an intersection point is obtained based on the directions of the two straight lines. In the same way, by finding another intersection point by another two straight lines, a plurality of intersection points can be obtained.

기울임 보정 후 상기 복수 개의 교점들의 y 좌표 값은 지평선의 y좌표와 동일해야 하나 실제는 서로 같지 않을 수 있다. 따라서, 상기 복수 개의 교점들의 y 좌표 값들을 클러스터링(Clustering) 하여, 아웃 라이어를 제거하고, 최종적인 y 좌표 값을 계산함으로써 상기 제1 영상의 지평선이 결정될 수 있다.After the skew correction, the y coordinate values of the plurality of intersection points should be equal to the y coordinate of the horizon but may not be equal to each other. Therefore, the horizon of the first image can be determined by clustering the y coordinate values of the plurality of intersections, removing the outlier, and calculating the final y coordinate value.

그리고 상기 복수 개의 교점들의 x 좌표 값들이 클러스터링되어 아웃 라이어를 제거하면 적어도 하나 이상의 최종적인 x 좌표 값(들)이 계산되고, 상기 지평선 위의 점들 중 상기 최종적인 x 좌표 값(들)을 가지는 점(들)이 상기 제1 영상의 소실점으로 검출된다.And at least one final x coordinate value (s) is computed by removing the outlier so that the x coordinate values of the plurality of intersections are clustered, and wherein at least one of the points on the horizon having the final x coordinate value (S) is detected as the vanishing point of the first image.

단계(140)에서 상기 제1 영상의 복수 개의 그라운드 라인 후보가 결정된다.In step 140, a plurality of ground line candidates of the first image are determined.

상기 제1 영상의 수평 방향의 직선이 그룹핑 된다. 상기 제1 영상을 x축 방향으로 진행하면서 직선의 방향(즉 같은 소실점을 지나는 지의 여부)을 체크하거 나, x축 방향으로 칼라 값의 변화를 체크하여 상기 제1 영상의 수직 경계선이 결정된다.Straight lines in the horizontal direction of the first image are grouped. The vertical boundary of the first image is determined by checking the direction of the straight line (i.e., passing the same vanishing point) while checking the change of the color value in the x-axis direction while advancing the first image in the x-axis direction.

그리고 상기 제1 영상의 지평선 아래 부분에서 그라운드 라인 후보가 결정된다. 상기 제1 영상의 왼쪽 가장자리의 임의의 픽셀로부터 출발하여, x축 방향으로 진행하면서 상기 그라운드 라인 후보를 결정할 수 있다.And a ground line candidate is determined at a portion below the horizon of the first image. Starting from any pixel at the left edge of the first image, it is possible to determine the ground line candidate as it proceeds in the x-axis direction.

단계(150)에서 상기 제1 영상의 그라운드 라인이 결정된다.In step 150, the ground line of the first image is determined.

상기 제1 입력 영상의 지평선 아래에서, y축 방향으로의 칼라 값의 변화 및 텍스쳐의 변화 중 적어도 하나에 기초하여, 변화가 가장 큰 그라운드 라인 후보가 상기 제1 영상의 그라운드 라인(1010)으로 검출된다.A ground line candidate having the largest change is detected as a ground line 1010 of the first image based on at least one of a change in the color value in the y-axis direction and a change in the texture under the horizon of the first input image do.

단계(160)에서 상기 제1 영상에 대한 3D 모델링이 수행된다.In step 160, 3D modeling of the first image is performed.

상기 그라운드 라인을 기준으로 윗부분인 2D 영상의 수직 구조(Vertical) 부분은 지면에 수직한 방향으로 프로젝션 되고, 아래 부분인 지면(ground) 부분은 수평한 방향으로 프로젝션 된다. The vertical portion of the 2D image, which is the upper portion with respect to the ground line, is projected in the direction perpendicular to the ground, and the ground portion in the lower portion is projected in the horizontal direction.

도 2는 본 발명의 일 실시예에 따른 영상 처리 방법에서 소실점이 검출되는 방법을 도시하는 흐름도이다.2 is a flowchart illustrating a method of detecting a vanishing point in an image processing method according to an embodiment of the present invention.

단계(210)에서 상기 제1 영상으로부터 수평 방향 직선이 추출된다.In step 210, a horizontal straight line is extracted from the first image.

영상으로부터 직선을 추출하는 방법에는 다양한 알고리즘이 있을 수 있다. 예시적인 방법에 의하면, Sobel 또는 Canny 에지 디텍터(Edge Detector)를 사용하여 입력 영상으로부터 복수 개의 에지를 추출하고, 다시 상기 에지 중 복수 개의 직선(straight line)만 검출한다. 상기 복수 개의 직선 중 수평 방향의 성분이 아 닌 것(Non-horizontal)은 필터링 아웃 시켜서 수평 방향의 직선이 추출된다.There are various algorithms for extracting a straight line from an image. According to an exemplary method, a plurality of edges are extracted from an input image using a Sobel or Canny edge detector, and only a plurality of straight lines of the edge are detected. A non-horizontal component of the plurality of straight lines is filtered out to extract a straight line in the horizontal direction.

상기 추출된 복수 개의 수평 방향의 직선 중 일부는, 동일한 제1 소실점을 지난다. 또 다른 일부 직선은, 제2 소실점을 지난다. 이런 방식으로 제1 소실점 또는 제2 소실점 이외의 수 개의 소실점이 더 있을 수도 있다.Some of the extracted straight lines in the horizontal direction pass through the same first vanishing point. Another straight line passes through the second vanishing point. In this way there may be several vanishing points other than the first vanishing point or the second vanishing point.

단계(220)에서 상기 제1 영상의 지평선이 결정된다. 단계(210)에서 추출된 복수 개의 수평 방향의 직선 중 임의의 두 직선을 선택하고, 상기 두 직선의 방향에 기초하여 교점을 구한다. 같은 방식으로, 또 다른 두 직선에 의한 다른 교점이 수 개 구해질 수 있다. 오차를 무시한다면, 상기 교점들의 y 좌표 값은 동일하며, 상기 y 좌표 값을 갖는 픽셀로 구성되는 직선이 상기 제1 영상의 지평 선이 된다.In step 220, the horizon of the first image is determined. An arbitrary straight line out of a plurality of horizontal straight lines extracted in step 210 is selected and an intersection point is obtained based on the directions of the two straight lines. In the same way, another number of intersections by two other straight lines can be obtained. If the error is ignored, the y coordinate values of the intersections are the same, and the straight line constituted by the pixels having the y coordinate value becomes the horizon line of the first image.

그러나, 실제 영상 처리에서의 오차를 고려할 때, 복수 개의 교점들의 y 좌표 값은 서로 같지 않을 수 있다. 따라서, 본 발명의 일 실시예에 따르면, 상기 복수 개의 교점들의 y 좌표 값들을 클러스터링(Clustering) 하여, 아웃 라이어를 제거하고, 최종적인 y 좌표 값을 계산함으로써 상기 제1 영상의 지평선이 결정될 수 있다.However, considering the error in actual image processing, the y coordinate values of a plurality of intersection points may not be equal to each other. Accordingly, according to an embodiment of the present invention, the horizon of the first image can be determined by clustering y coordinate values of the plurality of intersections, removing an outlier, and calculating a final y coordinate value .

단계(230)에서 상기 제1 영상의 적어도 하나 이상의 소실점이 검출된다.At step 230, at least one vanishing point of the first image is detected.

상술한 바와 같이 오차를 무시하면, 상기 복수 개의 수평 방향의 직선 중의 임의의 두 직선의 교점이 바로 소실점으로 결정될 수 있다. 그러나, 실제의 영상 처리에서는 상술한 오차를 고려할 필요가 있다.If the error is ignored as described above, the intersection of any two straight lines in the plurality of horizontal directions can be determined as the vanishing point. However, in the actual image processing, it is necessary to consider the above-mentioned error.

따라서 상기 복수 개의 교점들의 x 좌표 값들이 클러스터링되어 아웃 라이어가 제거된다. 그래서 적어도 하나 이상의 최종적인 x 좌표 값(들)이 계산되고, 상 기 지평선 위의 점들 중 상기 최종적인 x 좌표 값(들)을 가지는 점(들)이 상기 제1 영상의 소실점으로 검출된다.Therefore, the x-coordinate values of the plurality of intersections are clustered to remove the outlier. At least one final x-coordinate value (s) is calculated, and the point (s) having the final x-coordinate value (s) of the points above the horizon is detected as the vanishing point of the first image.

도 3은 본 발명의 일 실시예에 따른 영상 처리 방법에서 복수 개의 그라운드 라인 후보가 결정되는 방법을 도시하는 흐름도이다.3 is a flowchart illustrating a method of determining a plurality of ground line candidates in an image processing method according to an embodiment of the present invention.

단계(310)에서 상기 제1 영상의 수평 방향의 직선이 그룹핑 된다. 상기 제1 영상을 x축 방향으로 진행하면서 직선의 방향(즉 같은 소실점을 지나는 지의 여부)을 체크하면서, 복수 개의 그룹으로 그룹핑할 수 있다. 본 발명의 일 실시예에 따르면, 상기 체크는 상기 제1 영상의 지평선 윗부분에서만 수행된다.In step 310, straight lines in the horizontal direction of the first image are grouped. The first image can be grouped into a plurality of groups while checking the direction of a straight line (i.e., passing through the same vanishing point) while proceeding in the x-axis direction. According to an embodiment of the present invention, the check is performed only on the horizon of the first image.

단계(320)에서 상기 제1 영상의 수직 경계선이 결정된다. 상기 체크의 결과, 직선 들의 방향이 크게 변화하는 부분에서, 상기 그룹핑된 그룹 간의 경계선이 존재하고, 상기 경계선이 상기 제1 영상을 복수 개의 그룹으로 분할하는 수직 경계선으로 결정된다.In step 320, the vertical boundary of the first image is determined. As a result of the check, there is a boundary line between the grouped groups in a part where the directions of the straight lines change greatly, and the boundary line is determined as a vertical boundary line dividing the first image into a plurality of groups.

한편, 본 발명의 일 실시예에 따르면, 입력 영상에서 빌딩 영역과 같이 지평선 위와 하늘 아래 영역이 결정되고, 상기 영역 내에서만 상기 체크가 수행되어 상기 제1 영상의 수직 경계선이 결정된다.Meanwhile, according to an embodiment of the present invention, a horizon line and an under-sky area are determined as in a building area in the input image, and the check is performed only within the area to determine a vertical boundary line of the first image.

또한, 지평선 위의 영역에서 x축 방향으로 칼라 값의 변화를 체크하여, 예를 들어 명암의 차이나 색상의 차이가 크게 나는 부분이 상기 제1 영상의 수직 경계선으로 결정될 수도 있다. 물론, 상기 수평 방향 직선의 방향과 색상을 함께 고려하여, 상기 수직 경계선을 결정하는 것도 가능하다. 이 수직 경계선은 그라운드 라인이 꺾이는 점, 즉 직선 방향이 바뀌는 모서리가 된다. 이러한 수직 경계선은 일 반적으로 건물 면의 모서리, 건물과 건물 사이의 경계, 또는 건물과 건물의 좌 또는 우측 하늘의 경계에서 발생된다.Also, a change in the color value in the x-axis direction in the region above the horizon may be checked, for example, a portion where a difference in brightness or color difference greatly increases may be determined as a vertical boundary of the first image. Of course, it is also possible to determine the vertical boundary line by considering both the direction and the hue of the horizontal straight line. This vertical boundary line is a point where the ground line is bent, that is, a corner where the linear direction changes. These vertical boundaries generally occur at the edges of the building surface, at the boundary between the building and the building, or at the boundary of the building and the building's left or right sky.

단계(330)에서 상기 제1 영상의 복수 개의 그라운드 라인 후보가 결정된다.In step 330, a plurality of ground line candidates of the first image are determined.

본 발명의 일 실시예에 따르면, 상기 제1 영상의 지평선 아래 부분에서 그라운드 라인 후보가 결정된다. 상기 제1 영상의 왼쪽 가장자리의 임의의 픽셀로부터 출발하여, x축 방향으로 진행하면서 상기 그라운드 라인 후보를 결정할 수 있다.According to an embodiment of the present invention, a ground line candidate is determined in the lower part of the horizon of the first image. Starting from any pixel at the left edge of the first image, it is possible to determine the ground line candidate as it proceeds in the x-axis direction.

도 4는 본 발명의 일 실시예에 따라 도 1의 단계(110)에서 입력되는 칼라 영상을 도시한 도면이다.FIG. 4 is a diagram illustrating a color image input in step 110 of FIG. 1 according to an embodiment of the present invention.

영역(410)은 하늘(Sky) 부분이다. 본 발명의 일 실시예에 따른 영상 처리 과정에서 상기 영역(410)은 필터링 아웃 될 수 있다. 그리고, 영역(420)은 빌딩(Building) 부분으로서, 수직 구조물이다. 3D 영상 모델링 과정에서 이 영역(420)은 수직으로 세워질 것이다. 한편 영역(430)은 지면(Ground) 부분인데, 상기 3D 영상 모델링 과정에서 수평한 표면으로 되어야 한다. 한편 그라운드 라인(440)은 상기 입력되는 칼라 영상의 수직 면인 영역(420)과 수평 면인 영역(430)의 경계선이다.Region 410 is a sky portion. In the image processing according to an embodiment of the present invention, the region 410 may be filtered out. And, the area 420 is a building part, and is a vertical structure. In the 3D image modeling process, this area 420 will be erected vertically. On the other hand, the region 430 is a ground portion, which must be a horizontal surface in the 3D image modeling process. On the other hand, the ground line 440 is a boundary between the vertical region 420 and the horizontal region 430 of the input color image.

도 4의 입력 칼라 영상은 기울임 보정(Tilt correction)이 되지 않은 영상으로서, 직선(450)을 비롯한 수직 방향의 직선들이 기울어져 있다. 보다 정확한 영상 처리를 위해 기울임 보정이 필요하다.The input color image of FIG. 4 is an image that has not undergone tilt correction, and the straight lines including the straight line 450 are inclined. Tilt correction is required for more accurate image processing.

도 5는 본 발명의 일 실시예에 따라, 도 1의 단계(120)에서, 상기 도 4의 영상에 기울임 보정을 수행하여 생성되는 제1 영상을 도시한 도면이다.FIG. 5 is a diagram illustrating a first image generated by performing skew correction on the image of FIG. 4 in step 120 of FIG. 1, according to an embodiment of the present invention.

기울임 보정은 3차원 모델링 시의 왜곡을 줄이기 위해 수행된다. 이러한 기울임 보정은, 예를 들어 카메라의 피치(Pitch)와 롤(Roll)을 검출하여 상기 입력 영상의 기울기를 보정하는 방법 등이 있다. 이러한 기울임 보정은 공간 상의 x축 좌표, y축 좌표, 및 z축 좌표에 대해 영상을 회전(Rotation)하고 가상의 시점으로 투영(Projection) 하는 방법으로 수행할 수 있다. 예시적인 설명을 위해 도시된 상기 도 4의 입력 칼라 영상은, x축 좌표 방향으로만 기울임 보정을 수행하면 되는 영상이며, 그 결과가 도 5에 도시된 제1 영상이다.The skew correction is performed to reduce the distortion in the three-dimensional modeling. The inclination correction may be performed by, for example, detecting the pitch and roll of the camera to correct the inclination of the input image. This inclination correction can be performed by rotating the image with respect to x-axis coordinate, y-axis coordinate, and z-axis coordinate in space and projecting the image to a virtual point of view. The input color image shown in FIG. 4 for illustrative purposes is an image to be skewed only in the x-axis coordinate direction, and the result is the first image shown in FIG.

직선(510)을 포함한 모든 수직 방향의 직선이 영상 내에서 x축 방향과 직교하고 지평선이 x축 방향과 평행하도록 기울임 교정 된 것을 알 수 있다. 본 발명의 일 실시예에 따른 영상 처리 방법은 빌딩과 지면의 경계선인 그라운드 라인(520)을 검출한다. 그리고 이 그라운드 라인(520)을 기준으로 윗부분은 수직 방향으로, 아래 부분은 수평 방향으로 3D 모델링 될 수 있다.It can be seen that all straight lines including the straight line 510 are orthogonal to the x-axis direction in the image and are skewed so that the horizon line is parallel to the x-axis direction. The image processing method according to an embodiment of the present invention detects a ground line 520 which is a boundary between a building and a ground. The upper portion may be vertically oriented with the ground line 520 as a reference, and the lower portion may be 3D modeled as a horizontal direction.

도 6은 도 2의 단계(210)에서 도 5의 제1 영상으로부터 수평 방향 직선을 추출한 결과를 도시한다.FIG. 6 shows a result of extracting a horizontal straight line from the first image of FIG. 5 in step 210 of FIG.

제1 영상으로부터 직선(611, 612, 613, 614) 및 직선(621, 622, 623, 624)를 포함한 많은 수평 방향 직선이 추출되었다. 영상으로부터 직선을 추출하는 방법에는 다양한 알고리즘이 있을 수 있다. 예시적인 방법에 의하면, Sobel 또는 Canny 에지 디텍터(Edge Detector)를 사용하여 입력 영상으로부터 복수 개의 에지를 추출하고, 다시 상기 에지 중 복수 개의 직선(straight line)만 검출한다. 상기 복수 개의 직선 중 수평 방향의 성분이 아닌 것(Non-horizontal)은 필터링 아웃 시켜서 수평 방향의 직선이 추출된다.A number of horizontal straight lines including straight lines 611, 612, 613 and 614 and straight lines 621, 622, 623 and 624 were extracted from the first image. There are various algorithms for extracting a straight line from an image. According to an exemplary method, a plurality of edges are extracted from an input image using a Sobel or Canny edge detector, and only a plurality of straight lines of the edge are detected. A non-horizontal component of the plurality of straight lines is filtered out to extract a straight line in the horizontal direction.

수평 방향의 직선(611, 612, 613, 614)은, 오차를 무시하면, 동일한 제1 소실점(도시되지 않음)을 지난다. 또한 직선(621, 622, 623, 624)은, 역시 오차를 무시한다면, 동일한 제2 소실점(도시 되지 않음)을 지난다.The horizontal straight lines 611, 612, 613, and 614 pass the same first vanishing point (not shown), ignoring the error. The straight lines 621, 622, 623, and 624 also pass through the same second vanishing point (not shown) if they also ignore the error.

도 7은 본 발명의 일 실시예에 따라, 도 1의 단계(220)에서, 상기 제1 영상의 지평선을 결정한 결과 영상을 도시한 도면이다.FIG. 7 is a diagram illustrating a result image obtained by determining the horizon of the first image in step 220 of FIG. 1 according to an embodiment of the present invention.

도 6에서 추출된 복수 개의 수평 방향의 직선 중 두 직선을 선택하고, 상기 두 직선의 방향에 기초하여 교점을 구한다. 만약 직선(711)과 직선(712)이 선택된다면, 점(714)에서 교차한다. 또한 만약 직선(721)과 직선(722)이 선택된다면, 점(724)에서 교차한다.Two straight lines out of a plurality of horizontal straight lines extracted in FIG. 6 are selected, and an intersection point is obtained based on the directions of the two straight lines. If straight line 711 and straight line 712 are selected, they intersect at point 714. Also, if a straight line 721 and a straight line 722 are selected, they intersect at point 724.

같은 방식으로, 직선(711)과 직선(713)이 선택된다면, 오차를 무시할 때, 점(714)에서 교차한다. 또한 만약 직선(721)과 직선(723)이 선택된다면, 점(724)에서 교차한다. 이 경우는 영상의 기울임이 보정되었기 때문에 점(714)과 점(724)의 y 좌표 값은 동일하며, 상기 점(714)과 점(724)를 포함하는 직선(730)이 상기 제1 영상의 지평 선이 된다. 즉, 지평선 수준(horizon level)이 결정된다.In the same way, if straight line 711 and straight line 713 are selected, they intersect at point 714, neglecting the error. And intersects at point 724 if straight line 721 and straight line 723 are selected. In this case, since the tilt of the image is corrected, the y coordinate value of the point 714 is the same as the y coordinate value of the point 724. A straight line 730 including the point 714 and the point 724, It becomes a horizon line. That is, the horizon level is determined.

다만, 실제 영상 처리에서의 오차를 고려할 때, 상기 점(714) 근처에서 복수 개의 교점이 구해질 것이고, 또한 상기 점(724) 근처에서 복수 개의 교점이 구해질 것이다. 그리고, 상기 점(714), 상기 점(724) 및 상기 복수 개의 교점들의 y 좌표 값은 서로 같지 않을 수 있다.However, considering the error in the actual image processing, a plurality of intersection points will be obtained near the point 714, and a plurality of intersection points will be obtained near the point 724. The point 714, the point 724, and the y coordinate values of the plurality of intersections may not be equal to each other.

따라서, 본 발명의 일 실시예에 따르면, 상기 점(714) 근처의 복수 개의 교 점 및 상기 점(724) 근처의 복수 개의 교점들의 y 좌표 값들을 클러스터링(Clustering) 하여, 아웃 라이어를 제거하고, 최종적인 y 좌표 값을 계산함으로써 상기 제1 영상의 지평선인 직선(730)을 결정할 수 있다.Thus, according to one embodiment of the present invention, the y coordinate values of a plurality of points of intersection near the point 714 and a plurality of points of intersection near the point 724 are clustering to remove the outlier, By calculating the final y coordinate value, a straight line 730, which is the horizon of the first image, can be determined.

본 발명의 일 실시예에 따르면, 그 다음에, 상기 제1 영상의 지평선인 직선(730)으로부터 적어도 하나 이상의 소실점을 검출할 수 있다.According to an embodiment of the present invention, then, at least one vanishing point may be detected from a straight line 730 which is the horizon of the first image.

상술한 바와 같이 오차를 무시하면, 점(714)는 상기 제1 영상의 제1 소실점으로 결정될 수 있다. 또한 점(724)는 상기 제1 영상의 제2 소실점으로 결정될 수 있다. 그러나, 실제의 영상 처리에서는 상술한 오차를 고려할 필요가 있다.If the error is ignored as described above, the point 714 may be determined as the first vanishing point of the first image. Also, the point 724 may be determined as the second vanishing point of the first image. However, in the actual image processing, it is necessary to consider the above-mentioned error.

본 발명의 일 실시예에 따르면, 우선 상기 점(714) 근처의 복수 개의 교점 및 상기 점(724) 근처의 복수 개의 교점들의 x 좌표 값들을 클러스터링 해서 아웃 라이어를 제거한다. 그래서 적어도 하나 이상의 최종적인 x 좌표 값(들)을 계산하고, 상기 직선(730) 위의 점들 중 상기 최종적인 x 좌표 값(들)을 가지는 점(들)을 상기 제1 영상의 소실점으로 검출한다. 도 7에서는 이해를 돕기 위해서 점(714)가 상기 제1 영상의 제1 소실점과 일치하고, 점(724)가 상기 제1 영상의 제2 소실점과 일치하는 것으로 도시되어 있다.According to one embodiment of the present invention, first, the x-coordinate values of a plurality of intersections near the point 714 and a plurality of intersections near the point 724 are clustered to remove the outlier. So that at least one final x coordinate value (s) is calculated and the point (s) having the final x coordinate value (s) of the points on the straight line 730 are detected as the vanishing point of the first image . In FIG. 7, for ease of understanding, point 714 coincides with the first vanishing point of the first image, and point 724 corresponds to the second vanishing point of the first image.

도 8은 본 발명의 일 실시예에 따라, 상기 제1 영상의 수직 경계선을 결정한 영상을 도시한 도면이다.8 is a diagram illustrating an image in which a vertical boundary line of the first image is determined according to an embodiment of the present invention.

직선(811)은 상기 제1 영상의 제1 소실점인 도 7의 점(714)과 교차한다. 또한 직선(812, 813) 또한 마찬가지이다. 그러나, 직선(821, 822, 823)은 상기 제1 영상의 제2 소실점인 점(724)와 교차한다. 도 3의 단계(310)에서 서술한 바와 같 이, 상기 제1 영상을 x축 방향으로 진행하면서 직선의 방향(즉 같은 소실점을 지나는 지의 여부)을 체크하면서, 복수 개의 그룹으로 그룹핑할 수 있다. 본 발명의 일 실시예에 따르면, 상기 체크는 상기 제1 영상의 지평선인 직선(830) 윗부분에서만 수행된다.The straight line 811 intersects the point 714 in Fig. 7, which is the first vanishing point of the first image. The straight lines 812 and 813 are also the same. However, the straight lines 821, 822, 823 intersect the point 724, which is the second vanishing point of the first image. As described in step 310 of FIG. 3, the first image can be grouped into a plurality of groups while checking the direction of a straight line (i.e., passing through the same vanishing point) while proceeding in the x-axis direction. According to one embodiment of the present invention, the check is performed only at the upper portion of the straight line 830, which is the horizon of the first image.

상기 체크의 결과, 직선 들의 방향이 크게 변화하는 부분인, 직선(841, 842, 843, 844, 845)이 상기 제1 영상을 6개의 그룹으로 분할하는 수직 경계선으로 결정되었다.As a result of the check, straight lines 841, 842, 843, 844, and 845, which are portions in which the directions of the straight lines greatly change, were determined as vertical boundaries dividing the first image into six groups.

한편, 본 발명의 일 실시예에 따르면, 도 4의 하늘 영역(410)은 제외하고, 빌딩 영역(420)에서만 도 3의 단계(310) 내지 단계(320)이 수행되어 상기 제1 영상의 수직 경계선인 직선(841, 842, 843, 844, 845)이 결정된다.According to an embodiment of the present invention, steps 310 to 320 of FIG. 3 are performed only in the building area 420, except for the sky area 410 of FIG. 4, The straight lines 841, 842, 843, 844, and 845 as boundary lines are determined.

또한, 상기 빌딩 영역(420)에서 x축 방향으로 칼라 값의 변화를 체크하여, 예를 들어 명암의 차이나 색상의 차이가 크게 나는 부분을 상기 제1 영상의 수직 경계선인 직선(841, 842, 843, 844, 845)으로 결정할 수도 있다. 물론, 상기 수평 방향 직선의 방향과 색상을 함께 고려하여, 상기 수직 경계선을 결정하는 것도 가능하다.In addition, a change in the color value in the x-axis direction is checked in the building area 420. For example, a portion where the difference in the contrast and the difference in color is large is defined as the straight lines 841, 842, and 843 , 844, 845). Of course, it is also possible to determine the vertical boundary line by considering both the direction and the hue of the horizontal straight line.

후술하겠지만, 이 수직 경계선인 직선(841, 842, 843, 844, 845)은 그라운드 라인이 꺾이는 점, 즉 직선 방향이 바뀌는 모서리가 된다.As will be described later, the straight lines 841, 842, 843, 844, and 845, which are the vertical boundary lines, are the corners where the ground line is bent, that is, the straight line direction changes.

도 9는 본 발명의 일 실시예에 따라, 복수 개의 그라운드 라인 후보를 결정한 영상을 도시한 도면이다.9 is a diagram illustrating an image in which a plurality of ground line candidates are determined according to an embodiment of the present invention.

본 발명의 일 실시예에 따르면, 지평선인 직선(920) 아래 부분에서 그라운드 라인 후보(931, 932, 933, 934 등)가 결정된다. 도 9에서는 편의상 4 개의 그라운드 라인 후보(931, 932, 933, 934)만 도시되었으나, 상기 제1 영상의 왼쪽 가장자리의 임의의 픽셀로부터 출발하여, x축 방향으로 진행하면서 상기 그라운드 라인 후보를 결정할 수 있다. 예를 들어, 그라운드 라인 후보(931)는 처음에 상기 제1 영상의 제1 소실점인 점(714)를 향하는 방향으로 진행하다, 수직 경계선(911)에서 방향을 변화하여 상기 제2 소실점인 점(724)를 향하는 방향으로 진행한다. 그리고 수직 경계선(912, 913, 914, 915) 각각을 지나면서 방향을 바꾸어 상기 제1 영상의 오른쪽 가장자리에서 끝난다.In accordance with an embodiment of the present invention, the ground line candidates 931, 932, 933, 934, etc. are determined below the straight line 920, which is the horizon line. Although only four ground line candidates 931, 932, 933, and 934 are illustrated in FIG. 9 for the sake of convenience, it is possible to determine the ground line candidate starting from any pixel on the left edge of the first image, have. For example, the ground line candidate 931 initially advances in a direction toward a point 714, which is the first vanishing point of the first image, and changes its direction at the vertical boundary 911 to be the second vanishing point ( 724, respectively. And passes through each of the vertical boundary lines 912, 913, 914, and 915 to change the direction and ends at the right edge of the first image.

도 10은 본 발명의 일 실시예에 따라, 도 9의 복수 개의 그라운드 라인 후보 중 상기 제1 영상의 그라운드 라인이 결정된 결과를 도시한 도면이다.FIG. 10 is a diagram illustrating a result of determining a ground line of the first image among the plurality of ground line candidates of FIG. 9 according to an embodiment of the present invention.

상기 제1 입력 영상의 지평선 (920) 아래에서, y축 방향으로의 칼라 값의 변화 및 텍스쳐의 변화 중 적어도 하나에 기초하여, 상기 그라운드 라인 후보(931, 932, 933, 934 등) 중 상기 변화 값이 가장 큰 그라운드 라인 후보(933)을 검출한다. 상기 그라운드 라인 후보(933)이 상기 제1 영상의 그라운드 라인(1010)으로 검출된다.(931, 932, 933, 934, etc.) among the ground line candidates (931, 932, 933, 934, etc.) based on at least one of the change of the color value in the y-axis direction and the change of the texture below the horizon line And detects the ground line candidate 933 having the largest value. The ground line candidate 933 is detected as the ground line 1010 of the first image.

그라운드 라인(1010)은 도 5에서 도시된 제1 영상의 실제 그라운드 라인(520)과는 차이가 있다. 이는 수직 경계선(912)을 기준으로 좌측 빌딩의 그라운드 라인과 우측 빌딩의 그라운드 라인이 x축 방향으로 연속이 아니기 때문이다. 즉, 상기 그라운드 라인(931, 932, 933, 934 등) 중에서, 검출된 그라운드 라인(1010)이 실제의 그라운드 라인(520)과 정확히 일치하지 않을 수도 있다. 이러 한 불일치는 보통 무시할 수 있을 만큼 작은 부분에서 발견된다.The ground line 1010 differs from the actual ground line 520 of the first image shown in FIG. This is because the ground line of the left building and the ground line of the right building are not continuous in the x-axis direction with respect to the vertical boundary 912. That is, among the ground lines 931, 932, 933, 934, etc., the detected ground line 1010 may not exactly coincide with the actual ground line 520. These discrepancies are usually found in small parts that can be ignored.

도 11은 본 발명의 일 실시예에 따라, 3D 모델링을 하는 방법을 도시한 도면이다.11 is a diagram illustrating a method of 3D modeling according to an embodiment of the present invention.

기울기 보정이 수행된 2D 영상의 수직 구조(Vertical) 부분인 영역(1101)은 지면에 수직한 방향으로 프로젝션 되어 3D 모델에서 영역(1104)가 된다. 그리고, 상기 2D 영상의 그라운드 라인(1102) 아래 부분의 지면(ground) 부분인 영역(1103)은 지면에 평행한 방향으로 프로젝션 되어 상기 3D 모델에서 영역(1105)가 된다. 즉, 영역(1104) 및 영역(1105)로 구성되는 3D 모델에서, 영역(1104) 내에 포함되는 빌딩은 수직 방향으로 모델링 되었다.The area 1101, which is the vertical part of the 2D image subjected to the tilt correction, is projected in the direction perpendicular to the paper surface, and becomes the area 1104 in the 3D model. An area 1103, which is a ground part of the 2D image below the ground line 1102, is projected in a direction parallel to the ground to become an area 1105 in the 3D model. That is, in the 3D model composed of the area 1104 and the area 1105, the buildings included in the area 1104 were modeled in the vertical direction.

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

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 그러므로, 본 발명의 범위는 설명된 실시예에 국한되어 정해져서는 아니되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.While the invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. This is possible. Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined by the equivalents of the claims, as well as the claims.

도 1은 본 발명의 일 실시예에 따른 영상 처리 방법을 도시하는 흐름도이다.1 is a flowchart showing an image processing method according to an embodiment of the present invention.

도 2는 본 발명의 일 실시예에 따른 영상 처리 방법에서 소실점이 검출되는 방법을 도시하는 흐름도이다.2 is a flowchart illustrating a method of detecting a vanishing point in an image processing method according to an embodiment of the present invention.

도 3은 본 발명의 일 실시예에 따른 영상 처리 방법에서 복수 개의 그라운드 라인 후보가 결정되는 방법을 도시하는 흐름도이다..3 is a flowchart illustrating a method of determining a plurality of ground line candidates in an image processing method according to an exemplary embodiment of the present invention.

도 4는 본 발명의 일 실시예에 따라 입력 되는 영상을 도시한 도면이다.4 is a diagram illustrating an input image according to an exemplary embodiment of the present invention.

도 5는 본 발명의 일 실시예에 따라, 도 4의 영상에 기울임 보정을 수행하여 생성되는 제1 영상을 도시한 도면이다.FIG. 5 is a diagram illustrating a first image generated by performing skew correction on the image of FIG. 4 according to an embodiment of the present invention.

도 6은 본 발명의 일 실시예에 따라, 도 5의 제1 영상으로부터 수평 방향의 직선을 추출한 영상을 도시한 도면이다.FIG. 6 is a diagram illustrating an image obtained by extracting a straight line in a horizontal direction from the first image of FIG. 5 according to an embodiment of the present invention.

도 7은 본 발명의 일 실시예에 따라, 상기 제1 영상의 지평선을 결정한 영상을 도시한 도면이다.FIG. 7 is a diagram illustrating an image in which a horizon of the first image is determined according to an embodiment of the present invention.

도 8은 본 발명의 일 실시예에 따라, 상기 제1 영상의 수직 경계선을 결정한 영상을 도시한 도면이다.8 is a diagram illustrating an image in which a vertical boundary line of the first image is determined according to an embodiment of the present invention.

도 9는 본 발명의 일 실시예에 따라, 복수 개의 그라운드 라인 후보를 결정한 영상을 도시한 도면이다.9 is a diagram illustrating an image in which a plurality of ground line candidates are determined according to an embodiment of the present invention.

도 10은 본 발명의 일 실시예에 따라, 도 9의 복수 개의 그라운드 라인 후보 중 상기 제1 영상의 그라운드 라인이 결정된 결과를 도시한 도면이다.FIG. 10 is a diagram illustrating a result of determining a ground line of the first image among the plurality of ground line candidates of FIG. 9 according to an embodiment of the present invention.

도 11은 본 발명의 일 실시예에 따라, 3D 모델링을 하는 방법을 도시한 도면 이다.11 is a diagram illustrating a method of 3D modeling according to an embodiment of the present invention.

Claims (17)

입력 칼라 영상에 기울임 보정을 수행하여 제1 영상을 생성하는 제1단계; A first step of generating a first image by performing an inclination correction on an input color image; 상기 제1 영상으로부터 복수 개의 그라운드 라인 후보를 결정하는 제2단계; 및A second step of determining a plurality of ground line candidates from the first image; And 상기 복수 개의 그라운드 라인 후보의 y 축 방향의 칼라 변화 및 y축 방향의 텍스쳐 변화 중 적어도 하나에 기초하여 상기 입력 칼라 영상의 그라운드 라인을 검출하는 제3단계A third step of detecting a ground line of the input color image based on at least one of a color change in the y-axis direction and a texture change in the y-axis direction of the plurality of ground line candidates 를 포함하는 영상 처리 방법.And an image processing method. 제1항에 있어서, 상기 제2 단계는,2. The method according to claim 1, 상기 제1 영상의 지평선을 결정하는 단계;Determining a horizon of the first image; 상기 지평선으로부터 상기 제1 영상의 적어도 하나 이상의 소실점을 검출하는 단계; 및Detecting at least one vanishing point of the first image from the horizon; And 상기 소실점에 기초하여 상기 제1 영상의 복수 개의 그라운드 라인 후보를 결정하는 단계Determining a plurality of ground line candidates of the first image based on the vanishing point 를 포함하는 영상 처리 방법.And an image processing method. 제2항에 있어서,3. The method of claim 2, 상기 제1 영상의 지평선을 결정하는 단계는,Wherein the determining of the horizon of the first image comprises: 상기 제1 영상으로부터 적어도 하나 이상의 수평 방향 직선을 추출하는 단계; 및Extracting at least one horizontal straight line from the first image; And 상기 적어도 하나 이상의 수평 방향 직선의 교점의 y축 좌표 값에 기초하여 상기 제1 영상의 지평선을 결정하는 단계Determining a horizon of the first image based on a y-axis coordinate value of an intersection of the at least one horizontal straight line 를 포함하는 영상 처리 방법.And an image processing method. 제3항에 있어서,The method of claim 3, 상기 제1 영상의 적어도 하나 이상의 소실점을 검출하는 단계는,Wherein the step of detecting at least one vanishing point of the first image comprises: 상기 적어도 하나 이상의 수평 방향 직선의 교점의 x축 좌표 값에 기초하여 상기 지평선으로부터 상기 제1 영상의 적어도 하나 이상의 소실점을 추출하는 영상 처리 방법.And extracting at least one vanishing point of the first image from the horizon based on an x-axis coordinate value of an intersection of the at least one horizontal direction straight line. 제4항에 있어서,5. The method of claim 4, 상기 소실점에 기초하여 상기 제1 영상의 복수 개의 그라운드 라인 후보를 결정하는 단계는,Wherein the step of determining a plurality of ground line candidates of the first image based on the vanishing point comprises: 상기 적어도 하나 이상의 수평 방향 직선 중 동일한 소실점에 연관되는 직선을 그룹핑 하여 생성되는 각 그룹의 경계선을 상기 제1 영상의 수직 경계선으로 결정하는 단계; 및Determining a boundary line of each group generated by grouping straight lines associated with the same vanishing point among the at least one horizontal straight line as a vertical boundary line of the first image; And 상기 제1 영상의 수직 경계선에서 모서리를 갖는 선분으로 구성되는 복수 개의 그라운드 라인 후보를 결정하는 단계Determining a plurality of ground line candidates composed of line segments having edges at a vertical boundary line of the first image 를 포함하는 영상 처리 방법.And an image processing method. 제5항에 있어서,6. The method of claim 5, 상기 제1 영상의 수직 경계선은 상기 제1 영상의 지평선 위의 제1 영역의 상기 적어도 하나 이상의 수평 방향 직선 중 동일한 소실점에 연관되는 직선을 그룹핑 하여 생성되는 각 그룹의 경계선으로 결정되는 영상 처리 방법.Wherein the vertical boundary line of the first image is determined as a boundary line of each group generated by grouping straight lines related to the same vanishing point among the at least one horizontal straight line of the first area on the horizon of the first image. 제5항에 있어서,6. The method of claim 5, 상기 복수 개의 그라운드 라인 후보는, 상기 제1 영상의 지평선 아래의 제2 영역 내에서 결정되는 영상 처리 방법.Wherein the plurality of ground line candidates are determined in a second region below the horizon of the first image. 제4항에 있어서,5. The method of claim 4, 상기 소실점에 기초하여 상기 제1 영상의 복수 개의 그라운드 라인 후보를 결정하는 단계는,Wherein the step of determining a plurality of ground line candidates of the first image based on the vanishing point comprises: 상기 제1 영상의 지평선 위의 영역에서 x축 방향의 칼라 값 변화에 기초하여 상기 제1 영상의 수직 경계선을 결정하는 단계; 및Determining a vertical boundary of the first image based on a color value change in an x-axis direction in an area above the horizon of the first image; And 상기 제1 영상의 수직 경계선에서 모서리를 갖는 선분으로 구성되는 복수 개의 그라운드 라인 후보를 결정하는 단계Determining a plurality of ground line candidates composed of line segments having edges at a vertical boundary line of the first image 를 포함하는 영상 처리 방법.And an image processing method. 제8항에 있어서,9. The method of claim 8, 상기 복수 개의 그라운드 라인 후보는, 상기 제1 영상의 지평선 아래의 제2 영역 내에서 결정되는 영상 처리 방법.Wherein the plurality of ground line candidates are determined in a second region below the horizon of the first image. 제3항에 있어서, The method of claim 3, 상기 제1 영상의 지평선을 결정하는 단계는, 상기 적어도 하나 이상의 수평 방향 직선의 교점의 y축 좌표 값을 클러스터링 하여 아웃 라이어를 제거하는 단계를 더 포함하는 영상 처리 방법.Wherein the determining of the horizon of the first image further comprises the step of clustering the y-axis coordinate values of the intersection of the at least one horizontal straight line to remove the outlier. 제4항에 있어서,5. The method of claim 4, 상기 제1 영상의 적어도 하나 이상의 소실점을 검출하는 단계는,Wherein the step of detecting at least one vanishing point of the first image comprises: 상기 적어도 하나 이상의 수평 방향 직선의 교점의 x축 좌표 값을 클러스터링 하여 아웃 라이어를 제거하는 단계를 더 포함하는 영상 처리 방법.And clustering the x-axis coordinate values of the intersection of the at least one horizontal straight line to remove the outlier. 제1항에 있어서,The method according to claim 1, 상기 제1 영상에서 상기 그라운드 라인을 기준으로, 상기 그라운드 라인 상측 부의 영역은 지면과 수직 방향으로 프로젝션 하고, 상기 그라운드 라인 하측 부의 영역은 지면과 평행한 방향으로 프로젝션 하여 상기 제1 영상의 3D 모델링을 수행하는 제4 단계Wherein the first image is projected in a direction perpendicular to the ground on the basis of the ground line and the lower region of the ground line is projected in a direction parallel to the ground to perform 3D modeling of the first image Step 4 to Perform 를 더 포함하는 영상 처리 방법.Further comprising the steps of: 입력 영상으로부터 적어도 하나 이상의 수평 방향 직선을 추출하는 제1 단계;A first step of extracting at least one horizontal straight line from an input image; 상기 적어도 하나 이상의 수평 방향 직선의 교점의 y 좌표 값에 기초하여 상기 입력 영상의 지평선을 결정하는 제2단계; 및A second step of determining a horizon of the input image based on a y coordinate value of an intersection of the at least one horizontal straight line; And 상기 적어도 하나 이상의 수평 방향 직선의 교점의 x 좌표 값에 기초하여 상기 지평선으로부터 적어도 하나 이상의 소실점을 검출하는 제3 단계A third step of detecting at least one vanishing point from the horizon based on an x-coordinate value of an intersection of the at least one horizontal straight line, 를 포함하는 영상 처리 방법.And an image processing method. 제13항에 있어서,14. The method of claim 13, 상기 입력 영상은 기울임 보정 처리에 의해 기울임이 보정된 영상인 영상 처리 방법.Wherein the input image is a skew corrected image by an iterative correction process. 제14항에 있어서,15. The method of claim 14, 상기 입력 영상의 상기 지평선의 아래의 제2 영역 내에서, 상기 적어도 하나 이상의 수평 방향 직선으로 구성되는 복수 개의 그라운드 라인 후보를 결정하는 제4 단계; 및A fourth step of determining a plurality of ground line candidates constituted by the at least one horizontal straight line within a second area below the horizon of the input image; And 상기 그라운드 라인 후보의 y축 방향의 칼라 값 변화 및 y축 방향의 텍스쳐 변화 중 적어도 하나에 기초하여 상기 입력 영상의 그라운드 라인을 결정하는 제5 단계A fifth step of determining a ground line of the input image based on at least one of a change in the color value in the y-axis direction of the ground line candidate and a change in texture in the y- 를 더 포함하는 영상 처리 방법.Further comprising the steps of: 제15항에 있어서,16. The method of claim 15, 상기 입력 영상에서 상기 그라운드 라인 윗부분은 지면과 수직한 방향으로 프로젝션 하고, 상기 그라운드 라인 아래 부분은 지면과 평행한 방향으로 프로젝션 하여 3D 모델링을 수행하는 제6 단계를 더 포함하는 영상 처리 방법.And a sixth step of projecting the upper portion of the ground line in a direction perpendicular to the ground in the input image and projecting the lower portion of the ground line in a direction parallel to the ground to perform 3D modeling. 제1항 내지 제16항 중 어느 한 항의 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터 판독 가능한 기록 매체.A computer-readable recording medium storing a program for causing a computer to execute the method according to any one of claims 1 to 16.
KR1020080105978A 2008-07-17 2008-10-28 Method for Image Processing KR101524074B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
RU2008129149 2008-07-17
RU2008129149/08A RU2470368C2 (en) 2008-07-17 2008-07-17 Image processing method

Publications (2)

Publication Number Publication Date
KR20100009452A true KR20100009452A (en) 2010-01-27
KR101524074B1 KR101524074B1 (en) 2015-06-01

Family

ID=41817878

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080105978A KR101524074B1 (en) 2008-07-17 2008-10-28 Method for Image Processing

Country Status (2)

Country Link
KR (1) KR101524074B1 (en)
RU (1) RU2470368C2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101538014B1 (en) * 2014-01-14 2015-07-22 강기환 Converting method photographic images to 3d images through 3d modeling
WO2018194340A1 (en) * 2017-04-17 2018-10-25 주식회사 쓰리디팩토리 Method and device for providing content for layered hologram

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2568274C1 (en) * 2014-11-27 2015-11-20 Андрей Владимирович Воробьев Method for processing and multilayer rendering of data geospatial referencing

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10340337A (en) * 1997-01-31 1998-12-22 Meidensha Corp Correction method for inclination, extension and contraction of image data of drawing with drawing frame line graphic
JP2003141567A (en) * 2001-11-07 2003-05-16 Japan Science & Technology Corp Three-dimensional city model generating device and method of generating three-dimensional city model
JP2003280519A (en) * 2002-03-25 2003-10-02 Tetsuo Matsuda Method for creating overhead view map
US20050116948A1 (en) * 2003-12-01 2005-06-02 Lg Electronics Inc. Line clipping method and method for displaying three-dimensional image using the same
US20070291035A1 (en) * 2004-11-30 2007-12-20 Vesely Michael A Horizontal Perspective Representation
US7356425B2 (en) * 2005-03-14 2008-04-08 Ge Security, Inc. Method and system for camera autocalibration
US8464170B2 (en) * 2005-09-09 2013-06-11 Microsoft Corporation 2D editing metaphor for 3D graphics
JP4280930B2 (en) * 2005-09-27 2009-06-17 アイシン・エィ・ダブリュ株式会社 Map display device, recording medium, and map display method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101538014B1 (en) * 2014-01-14 2015-07-22 강기환 Converting method photographic images to 3d images through 3d modeling
WO2018194340A1 (en) * 2017-04-17 2018-10-25 주식회사 쓰리디팩토리 Method and device for providing content for layered hologram

Also Published As

Publication number Publication date
KR101524074B1 (en) 2015-06-01
RU2008129149A (en) 2010-01-27
RU2470368C2 (en) 2012-12-20

Similar Documents

Publication Publication Date Title
EP1901228B1 (en) Apparatus, method and program for image matching
US9477898B2 (en) Straightening out distorted perspective on images
JP4847592B2 (en) Method and system for correcting distorted document images
US9430865B2 (en) Real-time dynamic non-planar projection apparatus and method
WO2012096163A1 (en) Image processing device, image processing method, and program therefor
JP2015528960A (en) Form recognition method and form recognition apparatus
KR101032446B1 (en) Apparatus and method for detecting a vertex on the screen of a mobile terminal
US8750622B2 (en) Image processing device and image processing method
CN107346040B (en) Method and device for determining grating parameters of naked eye 3D display equipment and electronic equipment
KR101377910B1 (en) Image processing method and image processing apparatus
KR102158390B1 (en) Method and apparatus for image processing
CN113723399A (en) License plate image correction method, license plate image correction device and storage medium
JP4296617B2 (en) Image processing apparatus, image processing method, and recording medium
US20100014716A1 (en) Method for determining ground line
KR101524074B1 (en) Method for Image Processing
JP5171421B2 (en) Image processing apparatus, image processing method, and computer program
CN102073997B (en) Small-square document image perspective-recovery method
CN104537627A (en) Depth image post-processing method
WO2020209046A1 (en) Object detection device
JPH07103734A (en) Apparatus for searching stereocorrespondence
KR101373603B1 (en) 3D warping method for hole reduction and image processing apparatus using the same
JP3638845B2 (en) Image processing apparatus and method
KR101512297B1 (en) Method for Determining Ground Line
JP5563390B2 (en) Image processing apparatus, control method therefor, and program
JP2011170554A (en) Object recognition device, object recognition method, and object recognition program

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20180423

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20190422

Year of fee payment: 5