KR101590515B1 - Method for correcting photograghy composition - Google Patents

Method for correcting photograghy composition Download PDF

Info

Publication number
KR101590515B1
KR101590515B1 KR1020140011123A KR20140011123A KR101590515B1 KR 101590515 B1 KR101590515 B1 KR 101590515B1 KR 1020140011123 A KR1020140011123 A KR 1020140011123A KR 20140011123 A KR20140011123 A KR 20140011123A KR 101590515 B1 KR101590515 B1 KR 101590515B1
Authority
KR
South Korea
Prior art keywords
image
region
interest
roi
map
Prior art date
Application number
KR1020140011123A
Other languages
Korean (ko)
Other versions
KR20150090456A (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 KR1020140011123A priority Critical patent/KR101590515B1/en
Publication of KR20150090456A publication Critical patent/KR20150090456A/en
Application granted granted Critical
Publication of KR101590515B1 publication Critical patent/KR101590515B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/149Segmentation; Edge detection involving deformable models, e.g. active contour models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • 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/20021Dividing image into blocks, subimages or windows
    • 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/20112Image segmentation details
    • G06T2207/20132Image cropping

Abstract

촬영전 사진의 구도 보정 방법이 개시된다. 본 발명의 일 구현예는, 카메라 디스플레이 창에 영상이 표시되는 단계와; 상기 디스플레이창에 표시되는 영상을 관심영역 지도(Saliency Map)를 형성하고 관심영역(ROI, Region Of Interest)으로 피사체를 확인하는 단계와; Active Contour Model를 이용하여 상기 확인된 피사체의 윤곽선을 검출하는 단계와; 상기 디스플레이 창의 가로와 세로를 각각 3분할한 격자로 구성하고, 상기 피사체의 윤곽선을 격자의 교차점에 위치시키는 단계;를 포함하고, 상기 관심영역(ROI, Region Of Interest)으로 피사체를 확인하는 단계는, 상기 특성을 이용하여 저준위 특성 지도(Low-Level Feature Map)를 생성하는 단계와; 상기 저준위 특성 지도로부터 관심영역 지도를 계산하는 단계; 및 상기 계산으로부터 핵심적인 영익인 관심 영역을 추출하는 단계;를 포함하는 것을 특징으로 한다.A method for correcting a composition of a photograph before shooting is disclosed. An embodiment of the present invention includes: displaying an image on a camera display window; Forming a saliency map of an image displayed on the display window and confirming a subject using a region of interest (ROI); Detecting an outline of the identified subject using an Active Contour Model; The method of claim 1, wherein the step of identifying the object with the region of interest (ROI) comprises the steps of: dividing the display window into three sections, each having a horizontal and a vertical length, and positioning the outline of the object at an intersection of the grid Generating a low-level feature map using the characteristics; Calculating a ROI map from the low-level characteristic map; And extracting a region of interest, which is a core natural effect, from the calculations.

Description

촬영전 사진의 구도 보정 방법{METHOD FOR CORRECTING PHOTOGRAGHY COMPOSITION} [0001] METHOD FOR CORRECTING PHOTOGRAPHY COMPOSITION [0002]

본 발명의 일 구현예는 촬영전 사진의 구도 보정 방법에 관한 것이다.One embodiment of the present invention relates to a method for correcting a composition of a photograph before photographing.

모바일 기기는 반도체의 나노공정, 저전력 고성능 프로세서 등의 발전과 함께 PC에 버금가는 성능을 제공하면서 많은 사람들이 널리 사용하는 일반적인 기기가 되고 있다. 최근에는 개인이 휴대폰, 태블릿 PC 등 다수의 모바일 기기를 사용하는 추세이며, SNS(Social Networking Service)가 보편화되면서 모바일 기기에 탑재되어있는 카메라는 필수기능으로 자리매김하였다. Mobile devices have become a common device that is widely used by many people, offering performance comparable to PCs with the development of semiconductor nano processes, low power and high performance processors. In recent years, individuals are using mobile devices such as mobile phones and tablet PCs. As social networking services (SNS) become commonplace, cameras mounted on mobile devices have become essential functions.

해상도가 점차 증가함과 동시에 모바일 기기의 카메라 및 디지털 카메라에는 촬영할 때에 얼굴인식, 파노라마 등과 같은 다양한 촬영 지원 기능과 보조 기능들이 제공되고 있다. 이와 같은 기능 중 오래 전부터 3등분할 기법이 제공되고 있지만 대부분의 이용자들은 3등분할 기법의 가이드라인 만을 알고 있을 뿐 기능과 역할에 대해서는 모르고 있다. As the resolution increases, cameras and digital cameras of mobile devices provide a variety of shooting support functions and auxiliary functions such as face recognition, panorama, and the like when shooting. Many of these functions have been provided for a long time ago, but most users only know the guidelines for the triple division technique, but do not know the functions and roles.

3등분할 기법은 황금분할(Golden Section)의 개념을 사용하여 카메라로 촬영되는 피사체가 사진 내에서 시선을 이끌고 안정적으로 배치될 수 있도록 보조하는 역할을 한다. The three-way technique uses the concept of Golden Section to assist the camera to ensure that the subject being photographed is placed in a stable position in the photograph.

황금분할의 구조는 인간이 만든 특정 조형물이나 자연의 주어진 정적인 상태에 대한 심미적 분석에 유용하나 동적인 상태의 분석에는 한계가 있다. 자연의 동적인 상태, 즉 성장, 발전, 진행 등을 황금분할의 관점에서 분석하기 위해서는 황금나선 구조의 이해가 필수적이다. The structure of the Golden Split is useful for aesthetic analysis of a given human sculpture or a given static state of nature, but there is a limit to the dynamic state analysis. Understanding the dynamic nature of nature, such as growth, development, and progress, from the perspective of the golden divide, is essential to understand the golden helix structure.

도 1은 황금분할의 예시를 나타낸 도면이다.Figure 1 is an illustration of an example of golden splitting.

도 1을 참조하면, 황금비율을 내재한 직사각형은 정사각형 A, B, C, D, E, F, G … 등으로 무한히 나눌 수 있다. 이러한 정사각형들 A, B, C, D, E, F … 등으로의 진행은 이론적으로는 점 Q를 향해 무한소로 진행되어 갈 수 있으며, 각각의 사각형들은 서로 황금분할로 분할되어 있다. 그 예로 정사각형 A는 전체 사각형의 나머지 부분(사각형 EBCF)과 황금분할을 이루고 있고, 정사각형 B는 사각형 HCFL과 황금분할을 이루고 있다. Referring to FIG. 1, a rectangle having a golden ratio is represented by squares A, B, C, D, E, F, G ... And so on. These squares A, B, C, D, E, F ... Theoretically, the progression to the back can proceed infinitely toward the point Q, and each of the squares is divided into golden segments. For example, square A forms a golden partition with the rest of the entire square (square EBCF), and square B forms a golden partition with square HCFL.

황금분할을 내재한 직사각형의 Q를 중심으로 각 정사각형에 내재한 1/4원(호)을 그려 나가면 도 1에 도시된 바와 같은 나선형 구조의 호들이 연결된 형태를 보여줄 것이다. 이 호들의 연결된 형태를 황금나선(Golden Spiral)이라 하며, 그 진행은 무한대로 뻗어나갈 수 있다. 이 황금나선의 연결된 각 호들의 상호비율을 측정해 보면 황금비율을 내재하고 있는 사실을 쉽게 알 수 있다.When a 1/4 circle (arc) existing in each square is drawn around a square Q having a golden partition, the arc of a spiral structure as shown in FIG. 1 will be displayed. The connected form of these arcs is called the Golden Spiral, and its progression can extend to infinity. If we measure the mutual ratios of each of the connected arcs of this golden helix, we can easily see that the golden ratio is embedded.

사진에서는 3등분할 기법을 이용하여 이러한 황금비율을 유지할 수 있다. 사진에서 3등분할을 통하여 생기는 교차점의 가까이에 배치한 피사체는 강한 인상을 준다. 또, 교차점에 대해서 경사지게 위치하면 균형이 잡혀 보이고, 교차점 중 3개소에 둔 요소는 대담한 삼각형의 구도를 만든다. In photographs, this golden ratio can be maintained by using a ternary technique. The object placed close to the intersection through the triangulation in the photo gives a strong impression. In addition, when it is placed at an inclination with respect to the intersection, the balance is seen, and the elements placed at three points of the intersection form a bold triangle.

이러한 편안함을 주는 황금비를 사진을 촬영할 때 적용하기 위해 화면의 가로와 세로를 3등분하면 두 개의 수직선과 수평선이 나오고, 네 개의 교차점이 생기게 되는데 이 교차점 중 한곳에 피사체를 배치하면 황금분할에 가까운 3등 분할의 화면이 구성된다. In order to apply this comforting golden ratio to a picture, three horizontal and vertical lines of the screen are displayed with two vertical lines and a horizontal line, and four intersections are formed. When the subject is placed at one of the intersections, A screen of division is formed.

도 2는 황금분할을 이용하여 피사체의 위치를 놓을 교차점을 나타낸 도면이다. 도 3은 3등분할 기법을 적용한 실제 사진의 예를 나타낸 것이다.2 is a view showing an intersection where a position of a subject is to be placed using a golden segment. FIG. 3 shows an example of an actual photograph using a technique of trisecting.

이러한 구도가 안정된 느낌을 줄 수 있도록, 사진을 찍을 때 피사체의 위치를 분석하여 구도를 자동으로 보정하도록 유도함으로써 안정감 있는 사진을 제공할 수 있는 기술이 개발되고 있다.In order to provide a stable feeling of such a composition, a technology capable of providing a sense of stability by inducing a user to correct the composition automatically by analyzing the position of the subject when photographing is being developed.

본 발명이 해결하고자 하는 과제는 사진을 찍을 때 피사체의 위치를 분석하여, 구도가 안정된 느낌을 줄 수 있도록 구도를 자동으로 보정할 수 있는 촬영전 사진의 구도 보정 방법을 제공하는 것이다.A problem to be solved by the present invention is to provide a method for correcting a composition of a pre-shooting photograph, which can automatically correct a composition so as to give a feeling of a stable composition by analyzing the position of a subject when photographing.

본 발명의 촬영전 사진의 구도 보정 방법은, 카메라 디스플레이 창에 영상이 표시되는 단계와; 상기 디스플레이창에 표시되는 영상을 관심영역 지도(Saliency Map)를 형성하고 관심영역(ROI, Region Of Interest)으로 피사체를 확인하는 단계와; Active Contour Model를 이용하여 상기 확인된 피사체의 윤곽선을 검출하는 단계와; 상기 디스플레이 창의 가로와 세로를 각각 3분할한 격자로 구성하고, 상기 피사체의 윤곽선을 격자의 교차점에 위치시키는 단계;를 포함하고, 상기 관심영역(ROI, Region Of Interest)으로 피사체를 확인하는 단계는, 상기 특성을 이용하여 저준위 특성 지도(Low-Level Feature Map)를 생성하는 단계와; 상기 저준위 특성 지도로부터 관심영역 지도를 계산하는 단계; 및 상기 계산으로부터 핵심적인 영익인 관심 영역을 추출하는 단계;를 포함하는 것을 특징으로 한다.A method of correcting a picture of a pre-shooting picture according to the present invention includes: displaying an image on a camera display window; Forming a saliency map of an image displayed on the display window and confirming a subject using a region of interest (ROI); Detecting an outline of the identified subject using an Active Contour Model; The method of claim 1, wherein the step of identifying the object with the region of interest (ROI) comprises the steps of: dividing the display window into three sections, each having a horizontal and a vertical length, and positioning the outline of the object at an intersection of the grid Generating a low-level feature map using the characteristics; Calculating a ROI map from the low-level characteristic map; And extracting a region of interest, which is a core natural effect, from the calculations.

이 때, 상기 관심영역 지도(Saliency Map)를 형성하는 과정은, 영상의 색, 휘도, 움직임, 조화, 또는 방향 중 어느 하나의 특성를 이용하여 형성하는 것일 수 있다.At this time, the process of forming the saliency map may be performed using any one of color, brightness, motion, harmony, or direction of the image.

삭제delete

또한, 상기 계산으로부터 핵심적인 영익인 관심 영역을 설정하는 단계는, 다중 스케일 대비, Center-Surround Histogram(CSH), 또는 색채의 공간 분포 중 어느 하나의 정보를 이용하여 조건부 임의 필드(Conditional Random Field, CRF)를 설정하는 과정을 포함하는 것일 수 있다.In addition, the step of setting a region of interest, which is a core natural result from the calculation, may be performed by using any one of a multi-scale contrast, a center-surround histogram (CSH) CRF) of the received signal.

삭제delete

본 발명의 일 구현예에 따르면, 사진을 찍을 때 피사체의 위치를 분석하여, 구도가 안정된 느낌을 줄 수 있도록 구도를 자동으로 보정 가능한 촬영전 사진의 구도 보정 방법을 제공할 수 있는 효과가 있다.According to an embodiment of the present invention, there is an effect that it is possible to provide a method of correcting a composition of a pre-shooting photograph, which can automatically correct a composition so as to give a feeling of a stable composition by analyzing the position of a subject when photographing.

도 1은 황금분할의 예시를 나타낸 도면이다.
도 2는 황금분할을 이용하여 피사체의 위치를 놓을 교차점을 나타낸 도면이다.
도 3은 3등분할 기법을 적용한 실제 사진의 예를 나타낸 것이다.
도 4a 및 도 4b는 Rule of Third를 적용한 예시를 나타낸 도면이다.
도 5a 및 도 5b는 Rule of Third의 적용 전과 적용 후를 각각 나타낸 도면이다.
도 6a 및 도 6b는 Cropping의 적용 전과 적용 후를 각각 나타낸 도면이다.
도 7a 및 도 7b는 구도가 불안한 사진의 예를 나타낸 것이다.
도 8은 컬러 이미지의 segmentation을 나타낸 것이다. ((a) source image, (b) user-specified seeds, (c) segmentation results)
도 9는 박테리아의 진화 단계를 나타낸 것이다.
도 10은 이미지에서의 Background와 Foreground를 나타낸 것이다.
도 11은 Grab Cut 알고리즘을 이용한 이미지 Segmentation의 예시를 나타낸 도면이다.
도 12는 이미지 Segmentation과 Minimum cut을 나타낸 것이다.
도 13은 Minimum Cut으로 분리된 색상을 clustering하는 과정을 보여준다.
도 14는 본 발명의 일 구현예에 따른 촬영전 사진의 구도 보정 방법을 나타낸 흐름도이다.
도 15는 본 발명의 일 구현예에 따른 촬영전 사진의 구도 보정 방법에서 관심 영역을 설정하는 도출하는 과정을 나타낸 것이다.
도 16은 각 단계별 Saliency Map의 예시를 나타낸 도면이다.
도 17은 YCbCr color에서의 Skin pixel과 Cb를 나타낸 것이다.
도 18은 인접한 박스들과 병합된 이미지 영역을 나타낸 것이다.
도 19는 순위를 감안하여 얼굴의 유사성과 관련이 없는 영역을 제거한 결과를 나타낸 것이다.
도 20은 다양하게 설정되는 ROI를 표현한 것이며, 최대값을 중심으로 설정된 것과 실제 객체를 정확하게 ROI로 잡은 영역을 박스로 나타낸 것이다.
도 21은 3개의 클러스터(cluster)를 기준으로 Color Segmentation을 수행한 결과를 나타낸 것이다.
도 22는 3개의 군집으로 clustering하는 수행과정을 나타낸 것이다.
도 23은 상수 k값에 따른 영상의 결과를 나타낸 것이다.
도 24는 Color Segmentation과 Saliency Map을 mapping한 결과를 나타낸 것이다.
도 25는 시나리오가 적용되지 않은 예제를 나타낸 것이다.
도 26은 일반적인 Rule of Thirds가 적용된 영상과 시나리오가 추가적으로 적용된 영상의 차이를 나타낸 것이다.
도 27은 검출된 ROI가 떨어져있는 경우 근접한 경우의 사진의 예를 나타낸 것이다.
도 28은 수평선의 선분을 검출하여 원본이미지와 시나리오를 적용시킨 결과이미지를 비교한 것이다.
도 29는 이러한 시나리오가 적용되지 않아서 과도하게 cropping된 결과 이미지를 나타낸 것이다.
도 30은 피사체의 윤곽선 검출을 나타낸 것이다.
도 31은 카메라로 실제촬영 시 카메라의 구도보정을 유도하도록 피사체의 윤곽선을 검출하여 촬영의 구도를 보정하도록 구도에 맞는 피사체의 위치를 윤곽선으로 제시하여주는 예를 나타낸 것이다.
Figure 1 is an illustration of an example of golden splitting.
2 is a view showing an intersection where a position of a subject is to be placed using a golden segment.
FIG. 3 shows an example of an actual photograph using a technique of trisecting.
4A and 4B are views showing an example of applying the Rule of Third.
5A and 5B are views showing before and after the application of Rule of Third, respectively.
FIGS. 6A and 6B are views showing the state before and after applying the cropping, respectively.
Figs. 7A and 7B show examples of photographs in which the composition is unstable.
8 shows segmentation of a color image. ((a) source image, (b) user-specified seeds, (c) segmentation results,
Figure 9 shows the evolution stages of the bacteria.
Figure 10 shows Background and Foreground in the image.
11 is a diagram illustrating an example of image segmentation using the Grab Cut algorithm.
12 shows the image segmentation and the minimum cut.
13 shows a process of clustering colors separated by a minimum cut.
FIG. 14 is a flowchart illustrating a method of correcting a composition of a photograph before photographing according to an embodiment of the present invention.
FIG. 15 illustrates a process of setting a region of interest in a method of correcting a picture of a photograph before photographing according to an embodiment of the present invention.
16 is a diagram showing an example of a salience map for each step.
17 shows Skin pixels and Cb in YCbCr color.
Figure 18 shows an image area merged with adjacent boxes.
FIG. 19 shows a result obtained by removing regions that are not related to the similarity of faces in consideration of ranking.
FIG. 20 is a representation of various ROIs, which are set based on a maximum value and a box in which an actual object is accurately positioned in ROI.
FIG. 21 shows a result of performing color segmentation based on three clusters.
FIG. 22 shows a process of clustering with three clusters.
23 shows the result of the image according to the constant k value.
Fig. 24 shows the mapping result of color segmentation and saliency map.
Figure 25 shows an example where the scenario is not applied.
FIG. 26 shows the difference between an image to which a general rule of thirds is applied and an image to which a scenario is additionally applied.
FIG. 27 shows an example of a photograph in the case where the detected ROI is apart.
28 shows a result of comparing a result image obtained by detecting a line segment on a horizontal line and applying the original image and the scenario.
Figure 29 shows an over cropped image resulting from no such scenario being applied.
30 shows the contour detection of the subject.
31 shows an example in which a contour of a subject is detected so as to induce a correction of a composition of a camera in an actual photographing by the camera, and a position of the subject corresponding to the composition is shown as a contour so as to correct the composition of the photograph.

이하, 본 발명의 구현예를 상세히 설명하기로 한다. 다만, 이는 예시로서 제시되는 것으로, 이에 의해 본 발명이 제한되지는 않으며 본 발명은 후술할 청구항의 범주에 의해 정의될 뿐이다.Hereinafter, embodiments of the present invention will be described in detail. However, the present invention is not limited thereto, and the present invention is only defined by the scope of the following claims.

먼저, 본 발명의 일 구현예에 따른 촬영전 사진의 구도 보정 방법을 설명하기에 앞서, 사진의 구도 및 사진에서 필요한 데이터를 추출하는 방법에 대하여 설명하도록 한다.First, a description will be made of a composition of a photograph and a method of extracting necessary data from a photograph before explaining a composition correction method of a pre-shooting photograph according to an embodiment of the present invention.

디지털 카메라 혹은 모바일 기기에 탑재되어 있는 카메라를 이용하여 찍은 사진을 보면 안정적이지 못한 경우가 대부분이다. 이는 사람의 눈으로 보는 피사체를 사진이라는 사각형 영역 안에 담는 과정에서 피사체의 위치를 안정적인 느낌이 들도록 구도를 보정하여 촬영을 해야 하지만 일반적으로 사진을 전문적으로 공부하지 않은 비전문가가 이를 일일이 구도를 잡아서 촬영을 하는 일은 쉽지 않다. Most of the photos taken using a digital camera or a camera mounted on a mobile device are not stable. In the process of holding a subject viewed by the human eye in a rectangular area called a photograph, the photographer should correct the composition so that the position of the subject is stable, but in general, a non-specialist who does not study the photograph professionally, It is not easy to do.

사진을 좀 더 전문가들과 비슷하게 찍기 위한 기법으로 몇몇의 사진 구도 방법이 있다. 그 방법들로는 Rule of Thirds, Cropping, Viewpoint, Experimentation, Balancing Elements, Leading Lines, Symmetry and Patterns, Background, Depth, Framing 등과 같은 것이 있다. There are a few ways to compose a picture as a technique for taking pictures more like an expert. These methods include Rule of Thirds, Cropping, Viewpoint, Experimentation, Balancing Elements, Leading Lines, Symmetry and Patterns, Background, Depth, and Framing.

일례로, Balancing Elements는 사진 내의 객체를 추천하는 비율로 배치하여도 배경이 단조로우면서 공허할 수 있으므로 객체간의 간격이 중요하게 다루어진다.For example, Balancing Elements is important because the background can be monotonous and void, even if objects in the picture are placed at the recommended rate.

Leading Lines는 사람의 눈이 사진 속에 존재하는 중심적인 라인을 따라 영상을 이해하는 경향이 있기에 사진을 찍을 때에 고려해야 한다는 것이다. The Leading Lines are that people's eyes should be taken into account when taking pictures because they tend to understand the image along the central line that exists in the picture.

Symmetry and Patterns는 자연영상이나 인공물에 대칭과 무늬가 많이 존재하는데 이와 같은 것은 사람의 시각을 끄는데 효과적이다. 따라서, 사진을 찍을 때에 영상에 존재할 수 있는 성질과 패턴을 고려하여 사진을 구성하는 것이다. Symmetry and Patterns have a lot of symmetry and pattern in natural images or artifacts, which is effective in reducing human vision. Therefore, when photographs are taken, the photographs are constructed taking into consideration the properties and patterns that may exist in the images.

Background는 객체가 단순한 배경 앞에 있다면 시각을 끄는데 효과적이므로 객체를 강조하고 싶을 경우에는 배경을 단순하게 가져가는 방법이 좋다. Background is a good way to turn off time if the object is in front of a simple background, so if you want to emphasize an object, you can simply take the background.

Depth는 전경과 배경, 중간 전경의 깊이를 효과적으로 이용하여 원하는 객체를 Depth를 통해서 강조하고 전체적인 분위기를 안정감 있게 가져간다. Depth effectively uses the depth of foreground, background, and middle foreground to emphasize the desired objects through Depth and brings the overall atmosphere in a stable manner.

Framing은 강조하여 표현하기를 원하는 객체를 강조하는 방법이다. Framing is a way to emphasize the object you want to emphasize.

지금까지 서술한 방법들은 사진을 구성할 때에 매우 중요이며, 사람의 눈을 통해 사진을 보는 과정에서 큰 영향력을 가지는 구성요소이다. 그러나, 사진을 촬영하는 순간에 디지털카메라 또는 모바일 기기 등에서 이와 같은 요소들을 가미하여 이미지를 보정하기에는 연산능력과 메모리의 제한으로 인해 올바른 결과를 얻을 수 없다. The methods described so far are very important when composing photographs, and they are components that have great influence in the process of viewing photographs through human eyes. However, at the moment of photographing, correcting the image by adding such elements in a digital camera or a mobile device can not obtain correct result due to the calculation ability and memory limitation.

따라서, 본 발명에서는 사진 구도 방법 중에서 촬영을 통해 이미지를 얻은 다음 후처리로 영상을 처리하여 심미성을 가장 좋게 해주는 방법인 Rule of Thirds와 Cropping을 이용하고자 한다. 이 두 가지 방법을 통해 사진을 좀 더 전문가적 느낌이 나도록 구성하고, 사진 속의 객체가 사진을 보기 편안한 위치에 놓이도록 함으로써 심미성을 극대화 시킬 수 있도록 처리한다.Therefore, in the present invention, we will use Rule of Thirds and Cropping, which are methods of obtaining images through photographing and processing images by post-processing to maximize esthetics. These two methods are designed to make your photos look more professional and allow objects in the photos to be placed at a comfortable viewing position to maximize aesthetics.

도 4a 및 도 4b는 Rule of Third를 적용한 예시를 나타낸 도면이다.4A and 4B are views showing an example of applying the Rule of Third.

도 4a 및 도 4b를 참조하면, 어떻게 3분할로 나뉘어져 있으며 피사체가 어디에 위치하고 있는지를 쉽게 알 수 있다. 이러한 구도의 사진은 보는 사람들에게 집중력을 높일 수 있으며 전체적인 사진의 구도에서 편안함을 줄 수 있다.4A and 4B, it is easy to see how the subject is divided into three parts and where the subject is located. The photographs of this composition can enhance the concentration of the viewer and provide comfort in the overall picture composition.

도 5a 및 도 5b는 Rule of Third의 적용 전과 적용 후를 각각 나타낸 도면이다.5A and 5B are views showing before and after the application of Rule of Third, respectively.

도 5a 및 도 5b는 각각 피사체를 사진의 정중앙에 위치시킨 것(도 5a)과 구도보정을 통해 재 위치한 사진(도 5b)이다. 촬영자가 강조하고자 하는 것이 피사체일 경우, 구도 보정을 통해 피사체를 위치시킨 오른쪽의 사진에 시선이 더 머물게 된다.5A and 5B are photographs (Fig. 5A) in which the subject is placed in the center of the photograph, respectively, and photographs (Fig. If the subject that the photographer intends to emphasize is the subject, the gaze will stay on the right photograph where the subject is positioned through composition correction.

한편, Rule of Third와 함께 적용될 Cropping은 영상에서 관심이 높은 영역을 잘라서 해당영역으로 영상을 구성하도록 하는 전형적인 방법이다. 일반적으로 관심영역(Region of Interest, ROI)에 대한 처리기법으로 널리 사용되어 왔다.On the other hand, Cropping to be applied together with the Rule of Third is a typical method of cutting out a region of interest in the image and composing the image into the corresponding region. It has been widely used as a processing technique for region of interest (ROI) in general.

도 6a 및 도 6b는 Cropping의 적용 전과 적용 후를 각각 나타낸 도면이다.FIGS. 6A and 6B are views showing the state before and after applying the cropping, respectively.

도 6a 및 도 6b를 참조하면, Cropping이 적용되어 영상에서 ROI를 중심적으로 구성되었다. Referring to FIGS. 6A and 6B, cropping is applied and the ROI is centered on the image.

도 7a 및 도 7b는 구도가 불안한 사진의 예를 나타낸 것이다.Figs. 7A and 7B show examples of photographs in which the composition is unstable.

도 7a 및 도 7b를 참조하면, 두 사진은 직관적으로 볼 수 있듯이 구도가 올바르지 못함으로 인해 생기는 불안정한 느낌을 알 수 있다. 이러한 영상을 3분할 기법에 맞춰 재구성함으로써, 심미성을 높이는 방법과 함께 이러한 구도를 안정적이고 세련되게 자동으로 보정하는 것이 본 발명의 목적이다.Referring to FIGS. 7A and 7B, as can be seen intuitively, the two photographs show an unstable feeling due to an incorrect composition. It is an object of the present invention to reconstruct such an image in accordance with a triple segmentation technique, thereby improving the esthetics and automatically correcting the composition stably and sophisticatedly.

한편, 이미지의 segmentation은 의학용 이미지분석이나 사진 편집과 같은 application에서 이미지 처리를 하는 과정에서 사용된다. On the other hand, image segmentation is used in the process of image processing in applications such as medical image analysis or photo editing.

컬러 이미지의 segmentation 기법으로 상호적인 Grow Cut 방식에 대해 살펴보도록 한다. Let's look at the mutual growth cut method by segmentation technique of color image.

도 8은 컬러 이미지의 segmentation을 나타낸 것이다. ((a) source image, (b) user-specified seeds, (c) segmentation results) 도 9는 박테리아의 진화 단계를 나타낸 것이다.8 shows segmentation of a color image. (a) source image, (b) user-specified seeds, and (c) segmentation results. Figure 9 shows the evolution stages of bacteria.

도 8을 참조하면, Grow Cut방식에서는 사용자가 설정한 영역을 기준(seed pixel)으로 'bacteria'가 퍼지기(grow)시작하여 전체 이미지의 영역으로 퍼지게 된다. Referring to FIG. 8, in the growth cut method, 'bacteria' starts to grow as a seed pixel, and spreads to the entire image region.

그리고, 도 9에서와 같이 여러 과정을 반복하면서 각 cell은 이웃하고 있는 cell에 'attack'을 시도하면서 segmentation 과정을 진행하게 된다.Then, as shown in FIG. 9, each cell repeats a plurality of processes, and performs segmentation process while attempting to 'attack' neighboring cells.

Grab Cut은 graph cut 방식을 기반으로 한 이미지 segmentation 기법으로, 영상에서 분리해내고자 하는 객체에 대한 초기 정보를 사용자가 입력해주면 해당하는 범위 내에서 객체를 정확하게 분리해주는 기법이다. 사용자가 객체 영역에 사각형의 윈도우를 설정하여 알고리즘을 실행하게 된다. Grab Cut은 이미지에 포함된 영역과 경계 정보를 segmentation을 수행하는데 있어서 혁신적인 segmentation 기법이다.Grab Cut is an image segmentation technique based on the graph cut method. It is a technique that accurately separates objects within a given range when the user inputs initial information about the objects to be separated from the image. The user sets the rectangle window in the object area and executes the algorithm. Grab Cut is an innovative segmentation technique for segmentation of boundaries and boundaries in images.

대부분의 segmentation 기술은 이미지에 포함된 에지(edge)와 영역 정보를 사용한다. 그리고, 대부분의 segmentation 기술과 마찬가지로 Grab Cut 역시 이미지내의 정보를 캡슐화하여 사용한다. Most segmentation techniques use the edge and region information contained in the image. And, like most segmentation techniques, Grab Cut also encapsulates information in the image.

일반적인 segmentation 기술은 에지 정보와 영역 정보 중 하나만 사용하지만, Grab Cut방식은 이들 모두를 사용하여 최적의 segmentation 결과를 찾아낸다. Segmentation을 수행하기 위해 이미지의 픽셀을 표현하는 곳에 하나의 그래프가 그려지고 추가로 두 개의 특별한 노드(node) 인 sink node와 source node가 함께 생성된다. The general segmentation technique uses only one of the edge information and the area information, but the Grab Cut method uses both of them to find the optimal segmentation result. To perform the segmentation, a graph is drawn where the pixels of the image are represented, and two additional special nodes, the sink node and the source node, are created.

도 10은 이미지에서의 Background와 Foreground를 나타낸 것이다.Figure 10 shows Background and Foreground in the image.

도 10을 참조하면, 같이 이미지 내에서 background와 foreground를 labeling하여 구분한다. Referring to FIG. 10, the background and the foreground are labeled in the image.

도 11은 Grab Cut 알고리즘을 이용한 이미지 Segmentation의 예시를 나타낸 도면이다.11 is a diagram illustrating an example of image segmentation using the Grab Cut algorithm.

도 11을 참조하면, 사용자가 직접 영역을 지정하여 배경과 전경을 segmentation 하는 과정을 볼 수 있다. Referring to FIG. 11, a user may directly designate an area to segment the background and foreground.

한편, Min Cut 영상에서 색상을 Segmentation하기 위해 영상의 각 픽셀을 의미하는 각각의 노드(node)에서 거리에 대한 가중치(w)를 부여하여 클러스터링(clustering)하는 기법 중 Minimum Cut 방식은 영상의 색상 값에서의 거리를 이용하여 가중치 w에 대하여 Adjacency Matrix와 Weight Matrix를 작성하여 이러한 weight를 기준으로 색상을 분리한다. In order to segment the colors in the Min Cut image, among the techniques of clustering by assigning a weight (w) to distances at each node, which means each pixel of an image, the Minimum Cut method is a method of clustering We use Adjacency Matrix and Weight Matrix for the weight w using distance from the weights.

도 12는 이미지 Segmentation과 Minimum cut을 나타낸 것이다. 도 13은Minimum Cut으로 분리된 색상을 clustering하는 과정을 보여준다. 12 shows the image segmentation and the minimum cut. 13 shows a process of clustering colors separated by a minimum cut.

도 12에서와 같이 분리된 Minimal Cut은, 색상의 유사도에 따라 clustering을 반복하여, 도 13에 도시된 바와 같이, 일정한 cluster를 이루는 블록으로 나뉘게 된다.12, clustering is repeated according to the degree of similarity of colors, and is divided into blocks constituting a certain cluster as shown in FIG.

이하에서는, 본 발명의 일 구현예에 따른 촬영전 사진의 구도 보정 방법을 설명하도록 한다.Hereinafter, a method of correcting a composition of a pre-shooting photograph according to an embodiment of the present invention will be described.

도 14는 본 발명의 일 구현예에 따른 촬영전 사진의 구도 보정 방법을 나타낸 흐름도이다. FIG. 14 is a flowchart illustrating a method of correcting a composition of a photograph before photographing according to an embodiment of the present invention.

본 발명의 일 구현예에 따른 촬영전 사진의 구도 보정 방법은 원본 이미지가 입력되는 단계(S100), 상기 원본 이미지로부터 관심영역 지도(Saliency Map)를 형성하고, 이미지 분할(Segmentation) 과정을 수행하는 단계(S200), 상기 관심영역 지도 및 상기 분할 과정이 수행된 이미지를 병합하여, 관심 영역을 추출하는 단계(S300), 및 상기 추출된 관심 영역에 3분할법을 적용하되, 시나리오를 적용하여 크로핑(cropping)하는 단계(S400)를 포함한다.A method of correcting a pre-shot image according to an embodiment of the present invention includes a step of inputting an original image (S100), forming a saliency map from the original image, and performing an image segmentation process (S300) of extracting a region of interest by merging the region of interest map and the image obtained by performing the segmenting process, and applying a triangulation method to the extracted region of interest, (step S400).

먼저, 본 발명의 일 구현예에 따른 촬영전 사진의 구도 보정 방법에서 원본 이미지로부터 Saliency Map을 형성하는 과정은 사용자가 관심을 가진 영역을 찾는 하향식 접근 방법과 영상에 대한 사전 지식없이 주어지는 시각자극의 특징을 기반으로 관심영역을 추출하는 상향식 접근 방법이 있다. First, in the method of correcting the pre-shooting image according to an embodiment of the present invention, a process of forming a saliency map from an original image includes a top-down approach of searching for an area of interest by a user and a visual stimulation There is a bottom-up approach to extract regions of interest based on features.

본 발명에서는 영상의 Color, Luminance, Motion, Texture, Orientation 등 관심영역의 지각에 영향을 주는 다양한 요소 중에서 사용하기에 가장 적합한 요소를 사용하여 Saliency Map을 도출한다. In the present invention, a Saliency Map is derived from various elements that affect the perception of a region of interest such as color, luminance, motion, texture, and orientation of an image using elements most suitable for use.

Saliency Map을 구하는 방법은 다음과 같다. 첫 번째 단계는 특징을 추출하는 것이다. 즉 다양한 저준위 특성 지도(Low-Level Feature Map)를 구성한다. 다음 단계는 Saliency Map을 계산하는 것이다. Saliency Map은 앞의 특성 지도(Feature Map)들로 계산된다. 마지막으로 계산으로부터 핵심적인 영역이 관심영역으로 설정된다. 이러한 접근들은 기본적으로 생물학적인 것에 기초하거나 계산적인 것에 기초하여 접근한다. To obtain the Saliency Map, follow the steps below. The first step is to extract features. That is, various low-level feature maps are constructed. The next step is to calculate the Saliency Map. Saliency Map is calculated by the feature maps. Finally, the critical area from the calculations is set as the area of interest. These approaches are basically based on biological or computational approaches.

먼저, 생물학적인 접근방법은 휘도, 색, 방향의 Feature Map을 구성하여 Bottom Up 방식으로 결합하거나 합하여 계산한다. 그리고, 계산적인 접근방법은 기본적으로 Feature Map들을 사용하지만 정규화 Graph에 기초하여 접근한다. 이것은 부분적으로 Biological한 방법과 Computational한 방법을 조합한 것이다. 다양한 feature들에 대하여 다중 피라미드 영상을 구성하고, 영상의 상호간의 차이(Center Surround Difference)를 구하면 특징 값들이 나타내는 영상의 값을 확인할 수 있다. 이 값들은 영상에 존재하는 feature에 따라 다양한 값으로 나타나므로, 하나의 값만을 이용하기 보다는 다중으로 결합하여 최적의 Saliency Map을 도출해야 한다. 본 발명에서는 복합적인 feature를 사용하여 각각의 특징을 반영한 map을 생성하며, 자동 구도 보정 알고리즘에 가장 적절한 Saliency Map을 이끌어낸다. First, the biological approach is to combine or combine the feature maps of brightness, color, and direction with the bottom up method. And, the computational approach basically uses feature maps but approaches based on normalization graph. This is a combination of partially biologic and computational methods. By constructing a multiple pyramid image for various features and finding the center surround difference, the value of the image represented by the feature values can be confirmed. Since these values are represented by various values depending on the features existing in the image, the optimal saliency map should be derived by combining multiple values rather than using only one value. In the present invention, a map reflecting each characteristic is generated by using a complex feature, and a Saliency Map which is most suitable for an automatic composition correction algorithm is derived.

도 15는 본 발명의 일 구현예에 따른 촬영전 사진의 구도 보정 방법에서 관심 영역을 설정하는 도출하는 과정을 나타낸 것이다.FIG. 15 illustrates a process of setting a region of interest in a method of correcting a picture of a photograph before photographing according to an embodiment of the present invention.

사람의 시각에 가장 영향을 주는 요소인 밝기 값은 국부적인 밝기가 Saliency Map을 구성하는데 주요 기준이 되기 때문에 아래의 식 (1)에 의해서 명암도 영상을 만들고, 이 영상이 Feature Map으로 사용한다. Brightness value, which is the most influential factor in human vision, is a key criterion for constructing a saliency map. Therefore, an intensity image is created by the following equation (1), and this image is used as a feature map.

Figure 112014009649524-pat00001
--- (1)
Figure 112014009649524-pat00001
--- (One)

색상정보를 뇌로 전달해 주는 인간의 신경회로는 3가지 추상체들에 의한 정보를 '적/녹', '황/청'의 반대 쌍의 색상정보로 바꾸어 전달한다. 입력영상에서 색상 Feature Map을 얻기 위해 RGB 컬러모델의 적색, 녹색, 청색을 r, g, b라고 할 때 R(적색), G(녹색), B(청색), Y(황색)의 4개의 채널을 만들어낸다. 본 발명에서는 위 4개의 채널을 사용하여 두 개의 색상 Feature Map을 아래의 식 (2)를 통해 만든다. The human neural circuit that transmits color information to the brain converts the information by the three cones into the color information of the opposite pair of 'red / green' and 'yellow / blue'. In order to obtain the color feature map from the input image, four channels of R (red), G (green), B (blue), Y (yellow) . In the present invention, two color feature maps are created using the above four channels by the following equation (2).

Figure 112014009649524-pat00002
--- (2)
Figure 112014009649524-pat00002
--- (2)

여기에서, RG와 BY는 '적/녹', '황/청'의 반대 쌍의 색상정보를 의미한다. 각각의 Feature Map은 주변으로부터 가장 두드러지게 드러나는 부분이 강조되는 특징을 가지게 되는 현격함 지도(Conspicuity Map)로 변환된다. 아래의 식 (3)은 Conspicuity Map을 얻기 위한 가우시안 피라미드(Gaussian Pyramid)를 수행하는 과정을 나타낸 것이다. Here, RG and BY are color information of the opposite pair of 'red / green' and 'yellow / blue'. Each Feature Map is transformed into a Conspicuity Map, which is characterized by the highlighting of the most prominent parts from the periphery. The following equation (3) shows the process of performing the Gaussian pyramid to obtain the Conspicuity Map.

Figure 112014009649524-pat00003
--- (3)
Figure 112014009649524-pat00003
--- (3)

각각의 특징을 F라 하면, 9개의 크기 가우시안 피라미드 P는 Feature Map F에 Gaussian Filter G를 사용하여 점진적으로 부차추출(subsampling)하고, 저역 통과형 필터링(low pass filtering)하여 얻는다. When each feature is represented by F, the nine-dimensional Gaussian pyramid P is obtained by gradually sub-sampling the feature map F using a Gaussian filter G and performing low pass filtering.

각각의 특징 P에 대해서, 6개의 중간 다중 크기 Conspicuity Map들을 아래의 식 (4)에 의해서 구한다.For each feature P, six intermediate multi-size Conspicuity maps are obtained by the following equation (4).

Figure 112014009649524-pat00004
--- (4)
Figure 112014009649524-pat00004
--- (4)

유일한 특징을 가지는 아래의 식 (5)을 통해 얻는다.(5), which has a unique feature.

Figure 112014009649524-pat00005
--- (5)
Figure 112014009649524-pat00005
--- (5)

시각적 주의 모델은 각각의 Conspicuity Map에 대한 가중치를 결정하고 조합하여 Saliency Map을 구성한다. The visual attention model constructs a saliency map by determining and combining weights for each Conspicuity Map.

Figure 112014009649524-pat00006
--- (6)
Figure 112014009649524-pat00006
--- (6)

여기에서, n은 Conspicuity Map들의 수이다. 본 발명에서는 Saliency Map을 구성하기 위해 사용되는 Conspicuity Map의 중요성에 따라 동적 가중치인 ω를 동적으로 결정한다. Where n is the number of Conspicuity Maps. In the present invention, the dynamic weighting value ω is determined dynamically according to the importance of the Conspicuity Map used to construct the Saliency Map.

도 16은 각 단계별 Saliency Map의 예시를 나타낸 도면이다.16 is a diagram showing an example of a salience map for each step.

도 16을 참조하면, 배경과 객체가 뚜렷한 색상의 차이를 보일 때에 성능이 좋은 LUV공간으로 변환하여 mean difference를 Saliency Map과 앞선 과정에서 기술한 방법을 이용하여 밝기 값을 가지고 center surround difference를 통해 도출한 Saliency Map의 일반적인 예를 보여준다.Referring to FIG. 16, when the background and the object show distinct color differences, the LUV space is converted into a good LUV space, and the mean difference is derived through the center surround difference with the brightness value using the Saliency Map and the method described above A typical example of a Saliency Map is shown.

사진영상에서 나타나는 관심영역 중에 가장 중요한 관심영역은 바로 사람의 얼굴이다. 따라서 사람의 얼굴은 무엇보다도 관심영역들 중에서 높은 값을 가져야 하므로, 별도로 Face Detection을 수행하여 사람의 얼굴영역을 검출한다. 다음은 Face Detection을 통해서 얼굴 영역을 검출하는 과정을 보여준다.The most important area of interest in the photographic image is the human face. Therefore, the face of a person has to have a high value among the regions of interest, so the face detection is separately performed to detect the face region of the person. The following shows the process of detecting face area through Face Detection.

이미지에서 사람의 피부색을 검출하는 기술은 얼굴 영역 검출하는 기법에 있어서 매우 중요하고 유용한 방법이다. 이러한 skin color를 추출하기 위해 input image가 RGB방식 일 경우 YCbCr 색상 모델로 변환하여 사용한다. RGB색상 모델의 경우 빛 상태가 변함에 따라 skin color를 검출하는 과정에서 오류가 발생활 확률이 높기 때문이다. RGB 색상 모델은 아래의 식 (7)을 통해 YCbCr방식으로 변환시킬 수 있다. The technique of detecting a person's skin color in an image is a very important and useful method for detecting a face region. To extract such skin color, convert it to YCbCr color model when input image is RGB method. In the case of the RGB color model, the error probability is high in detecting the skin color as the light condition changes. The RGB color model can be converted to the YCbCr method through the following equation (7).

Figure 112014009649524-pat00007
--- (7)
Figure 112014009649524-pat00007
--- (7)

검출된 skin color의 skin pixel의 분산형태와 Cb, Cr의 histogram의 분산형태가 아래의 도 17에 도시되었다. The scatter pattern of the skin pixels of the detected skin color and the scatter pattern of histograms of Cb and Cr are shown in FIG. 17 below.

얼굴영역을 검출하여 Color Segmentation을 통해 결과이미지를 얻어내고, 이렇게 얻어진 결과 이미지의 small region들을 제거하여 만들어진 binary image를 Edge Detection 기술을 이용하여 기존에 얻어진 이미지와 통합하는 과정을 거치면 edge 영역에 속하지 않은 작은 영역을 제거할 수 있다. 작은 영역의 부분을 제거한 결과 이미지를 이용하여 skin color로 판단되는 위치의 좌표를 선택하고 Color-Based Segmentation 기법을 이용하여 직사각형의 형태의 영역을 지정한다. 이 때, 각 선택영역은 고유의 window size를 가지고 있다.After detecting the facial region, the result image is obtained through color segmentation, and the binary region created by removing the small regions of the obtained image is integrated with the previously obtained image using Edge Detection technology, Small areas can be removed. After removing the small region, the coordinates of the location determined by the skin color are selected using the image, and the area of the rectangular shape is designated by using the color-based segmentation technique. At this time, each selection area has its own window size.

Skin color로 검출된 영역 중 얼굴아래에 위치한 목이나 팔, 손과 같은 영역의 경우 박스 병합 알고리즘(Box-Merge algorithm)을 이용하여 인접한 box영역의 경우 큰 box의 영역으로 합쳐주는 과정을 거친다. 이러한 결과를 도 18에 나타내었다. In the case of neck, arm, and hand located under the face of the skin color detected area, the box-merge algorithm is used to combine the adjacent box areas into a large box area. These results are shown in Fig.

이렇게 해서 검출된 얼굴 영역에 이미지 매칭 알고지름(Image Matching Algorithm)을 적용하여 각 영역에 순위를 부여하고, 이 중 거리와 window size를 감안하여 순위 값이 다른 영역의 순위에 비해 유사성이 떨어지는 영역을 제거하여 결과적으로 얼굴영역을 검출할 수 있다. The image matching algorithms are applied to the detected face regions to rank the regions, and considering the distance and the window size, the region having the similarity in ranking is different from the ranking in the other regions The face area can be detected as a result.

도 19는 순위를 감안하여 얼굴의 유사성과 관련이 없는 영역을 제거한 결과를 나타낸 것이다.FIG. 19 shows a result obtained by removing regions that are not related to the similarity of faces in consideration of ranking.

Saliency Map을 이용하여 영상에서 관심영역을 찾고 일정 영역 크기의 블록에 대해 최대값을 찾았지만, 실제적으로 관심영역이 얼마나 되는지를 판단할 기준이 없다. We use Saliency Map to find the region of interest in the image and find the maximum value for the block of a certain size. However, there is no criterion to determine the extent of the region of interest.

도 20은 다양하게 설정되는 ROI를 표현한 것이며, 최대값을 중심으로 설정된 것과 실제 객체를 정확하게 ROI로 잡은 영역을 박스로 나타낸 것이다.FIG. 20 is a representation of various ROIs, which are set based on a maximum value and a box in which an actual object is accurately positioned in ROI.

이와 같이 올바른 ROI를 설정하기 위해서는 Saliency Map에서 ROI를 도출하는 방법이 필요하다. In order to set the correct ROI, it is necessary to derive the ROI from the Saliency Map.

본 발명에서는 색 분할(Color Segmentation)기법과 관심영역 지도(Saliency Map)의 두 가지의 결과를 융합하여 ROI를 검출한다(S200).In the present invention, an ROI is detected by combining two results of a color segmentation technique and a saliency map (S200).

보다 상세하게, Color Segmentation은 색상 간의 밀집도와 집합도 정도를 이용하여 유사한 색상들을 하나의 그룹으로 모아주어 영상의 영역을 분할하는 방법이다. More specifically, Color Segmentation is a method of dividing a region of an image by grouping similar colors into a group using density and degree of aggregation between colors.

도 21은 3개의 클러스터(cluster)를 기준으로 Color Segmentation을 수행한 결과를 나타낸 것이다. FIG. 21 shows a result of performing color segmentation based on three clusters.

Color Segmentation은 색상간의 밀집도와 결합정도를 이용하여 segmentation하는 방식으로 본 발명에서는 색상의 분리를 임의로 k개의 평균점을 찍은 후, 그 점들로부터 가까운 것들로 k의 그룹을 나누고, 다시 각각의 그룹들 안에서 새로운 평균점을 정하여 그룹을 나누는 것을 반복하는 K-평균 알고리즘(K-means K-Means Clustering Algorithm)을 적용시켜 이러한 cluster들을 segmentation하였다. Color Segmentation is a method of segmentation using the density and degree of coupling between colors. In the present invention, after separating k colors arbitrarily by k average points, groups of k are divided into k groups close to the points, These clusters were segmented by applying a K-means K-Means Clustering Algorithm that repeatedly divides the group by setting averaging point.

K-Means algorithm은 n개의 객체들의 집합을 k개의 군집으로 분해하는 거리에 기반을 둔 clustering기법이다. 이러한 군집의 유사성은 군집에서 군집의 무게중심으로 볼 수 있는 객체들의 평균값을 측정하여 기준점에서 가까운 곳의 데이터들을 하나의 군집으로 묶는다. The K-Means algorithm is a distance-based clustering technique that decomposes a set of n objects into k clusters. The similarity of these clusters is determined by measuring the average value of the objects that can be seen as the center of gravity of the cluster in the cluster, and the data near the reference point are grouped into one cluster.

도 22는 3개의 군집으로 clustering하는 수행과정을 나타낸 것이다.FIG. 22 shows a process of clustering with three clusters.

도 22를 참조하면, clustering의 수행과정은, 임의의 k개의 군집수를 결정하고, 각 군집에 초기치 또는 군집 중심을 1개씩 할당하여 위치를 설정하는 단계(S210)와, 각각의 데이터에 대해 k개의 위치까지의 거리를 구하고 가장 가까운 군집에 소속시키는 단계(S220)(유클리디안 거리를 이용)와, 군집으로 나누어진 데이터를 기준으로 새로운 군집 중앙의 위치를 최소값을 갖도록 재설정하는 단계; 그리고 새롭게 구한 군집 중앙의 위치가 기존과 동일하면 알고리즘을 종료하고 다르면 두 번째부터 재 수행하는 단계를 포함할 수 있다.Referring to FIG. 22, the process of clustering includes determining (S210) an arbitrary number of clusters, assigning initial values or cluster centers to each cluster, setting a position (S210) (S200) (using the Euclidean distance), and resetting the center of the new cluster to have a minimum value based on the data divided into the clusters; If the location of the center of the newly obtained cluster is the same as that of the existing cluster, the algorithm may be terminated.

이러한 알고리즘에 의한 영상은 cluster 개수 값인 k에 의해 결과가 상이하게 나타날 수 있다. 즉, 자동 구도 보정에서 사용하기 위해서 적절한 상수의 값을 선택해야 하며, Saliency Map과 결합하여 최적의 ROI를 도출 할 수 있는 값을 이끌어내야 한다. The image by this algorithm can show different results depending on the cluster number value k. That is, it is necessary to select a suitable constant value for use in automatic composition correction, and to combine with saliency map to derive an optimal ROI.

도 23은 상수 k값에 따른 영상의 결과를 나타낸 것이다.23 shows the result of the image according to the constant k value.

도 23을 참조하면, cluster의 개수가 2개일 때 이미지의 edge를 구별할 수 있도록 확연하게 식별할 수 있었으며, 이에 따라 본 발명에서는 자동 구도 보정에 사용하기 위한 적절한 값으로 k=2로 설정하여 수행하였다. Referring to FIG. 23, when the number of clusters is 2, the edge of the image can be distinguished so as to be distinguishable. Accordingly, in the present invention, k = 2 is set as an appropriate value for use in automatic composition correction Respectively.

Color Segmentation을 수행한 결과는 Saliency Map결과와 mapping하여 최적의 ROI를 찾게 된다(S300). The color segmentation result is mapped to the saliency map result to find the optimal ROI (S300).

도 24는 Color Segmentation과 Saliency Map을 mapping한 결과를 나타낸 것이다.Fig. 24 shows the mapping result of color segmentation and saliency map.

본 발명에서 제안한 방법으로 영상에서 ROI를 구한 결과를 이용하여 Rule of Thirds의 기준에 적합하도록 cropping과정을 거치게 된다(S400). The cropping process is performed so as to comply with the Rule of Thirds criterion using the ROI obtained from the image by the method proposed by the present invention (S400).

단순히 이때 얻은 ROI의 위치에 가장 가까운 교차점만을 찾아서 cropping하였을 경우, 의도하지 않았던 구도의 보정된 결과 영상을 얻는 경우가 있다. 따라서, 영상이 본질적으로 가지는 요소들을 최대한 보존하기 위해 각 영상의 특성에 맞는 시나리오를 적용하여 구도 보정을 위한 cropping을 진행하여야 한다. If cropping is performed by finding only the intersection nearest to the ROI obtained at this time, a corrected result image of the unintended composition may be obtained. Therefore, in order to preserve the elements inherent in the image, it is necessary to carry out cropping for the composition correction by applying a scenario according to the characteristic of each image.

또한, 얻어진 ROI에 대해 영상의 가로와 세로의 크기를 대조하여 비도 을 측정하여 영상이 가질 수 있는 안정성과 심미성을 최대한 고려하여 Rule of Thirds를 적용한다. 그러나, 영상은 객체의 종류, ROI의 크기, 사람의 얼굴 인식 영역 등의 다양한 요소에 의존적이다. 따라서, 다양한 영상의 적절한 구성의 결과영상을 가져오기 위하여 여러 가지 scenario를 기반으로 영상을 cropping하는 방법을 사용한다. In addition, we compare the obtained ROI with the horizontal and vertical dimensions of the image, measure the non-degree of the image, and apply the Rule of Thirds to maximize the stability and aesthetics of the image. However, the image depends on various factors such as the type of the object, the size of the ROI, and the human face recognition area. Therefore, we use a method of cropping an image based on various scenarios in order to obtain a result image of a proper configuration of various images.

도 25는 시나리오가 적용되지 않은 예제를 나타낸 것이다.Figure 25 shows an example where the scenario is not applied.

도 25는 Face Detection으로 올바르게 얼굴 영역을 ROI로 선택하였지만 신체가 결과 영상에 전부 포함되지 않은 문제가 발생한다. 따라서 이와 같은 영상은 적절한 시나리오를 선택하여 처리해주어야 한다. FIG. 25 shows a case where the face region is correctly selected as the ROI by Face Detection, but the entire body is not included in the resultant image. Therefore, such an image should be selected and processed appropriately.

Face Detection의 경우 Rule of Thirds에 맞게 cropping하지만 신체 영역을 보호하여 사진의 안정성을 높이는 방법을 사용한다. In the case of Face Detection, cropping is applied to the Rule of Thirds, but the method of improving the stability of the photo by protecting the body area is used.

도 26은 일반적인 Rule of Thirds가 적용된 영상과 시나리오가 추가적으로 적용된 영상의 차이를 나타낸 것이다.FIG. 26 shows the difference between an image to which a general rule of thirds is applied and an image to which a scenario is additionally applied.

영상에서 2개의 ROI나 얼굴이 검출되었을 경우에는 두 얼굴의 거리와 영상의 사이즈를 비교하여 처리하는 방법을 사용한다. 두 얼굴이 근접하게 붙어있을 경우에는 두 얼굴이 가지는 ROI의 평균점을 찾아서 적용해주며, 두 얼굴이 영상 내에서 멀리 떨어져 있을 경우 영상 내에 두 얼굴을 보존하면서 자동 구도 보정을 적용한다. When two ROIs or faces are detected in the image, a method of comparing the distance between the two faces and the size of the image is used. If two faces are closely attached, find and apply the mean of ROI of two faces. If two faces are far away from the image, apply automatic composition correction while preserving two faces in the image.

도 27은 검출된 ROI가 떨어져있는 경우 근접한 경우의 사진의 예를 나타낸 것이다.FIG. 27 shows an example of a photograph in the case where the detected ROI is apart.

영상 내에서 주요하게 작용하는 지평선과 같은 선분을 검출하였을 경우 선분을 Rule of Thirds로 분할된 선분에 위치시킴으로써 영상이 가지는 심미성과 안정성을 극대화 한다. 이 방법의 경우 영상 내에 독점적으로 주요하게 나타내는 선분을 찾아 영상을 최대한 보존하면서 보정 과정을 적용해야한다. If a line segment such as a horizon is detected in the image, the line segment is placed in a line segment divided into Rule of Thirds to maximize the aesthetics and stability of the image. In this method, the correction process should be applied while preserving the image as much as possible by finding a segment mainly represented exclusively in the image.

도 28은 수평선의 선분을 검출하여 원본이미지와 시나리오를 적용시킨 결과이미지를 비교한 것이다. 28 shows a result of comparing a result image obtained by detecting a line segment on a horizontal line and applying the original image and the scenario.

전술된 바와 같이, 사람의 얼굴이 가장 중요한 ROI이지만 사람의 얼굴이 영상의 전반적인 영역을 차지하고 있을 경우에는 영상을 ROI에만 맞춰서 cropping하게 되면 부자연스러운 영상 결과를 얻을 수 있다. As described above, if the human face is the most important ROI, but the human face occupies the entire area of the image, cropping the image only to the ROI results in an unnatural image.

따라서, 이와 같은 경우는 영상을 그대로 유지하는 방법을 사용하여 영상의 안정성을 도모한다. Therefore, in such a case, the method of maintaining the image as it is is used to improve the stability of the image.

도 29는 이러한 시나리오가 적용되지 않아서 과도하게 cropping된 결과 이미지를 나타낸 것이다.Figure 29 shows an over cropped image resulting from no such scenario being applied.

앞에서 제시한 자동 구도 보정의 기술을 이용하여 안정적인 구도의 사진을 찍을 수 있도록 카메라 디스플레이 창에 피사체의 위치를 표시한다. 카메라 디스플레이 창에 피사체의 위치를 표시하기 위해서는 saliency map에서 객체를 찾아낸 후에 도 30에서와 같이 피사체의 윤곽선까지 검출해야 한다. The position of the subject is displayed on the camera display window so that you can take a picture of a stable composition using the above-described automatic composition correction technique. In order to display the position of the object on the camera display window, the object should be detected in the saliency map, and then the contour of the object should be detected as shown in FIG.

도 31은 카메라로 실제촬영 시 카메라의 구도보정을 유도하도록 피사체의 윤곽선을 검출하여 촬영의 구도를 보정하도록 구도에 맞는 피사체의 위치를 윤곽선으로 제시하여주는 예를 나타낸 것이다.31 shows an example in which a contour of a subject is detected so as to induce a correction of a composition of a camera in an actual photographing by the camera, and a position of the subject corresponding to the composition is shown as a contour so as to correct the composition of the photograph.

피사체의 윤곽선을 검출하기 위해서 스네이크(Snake) 알고리즘으로 알려진 Active Contour Model(ACM)을 사용한다. The active contour model (ACM), known as the Snake algorithm, is used to detect the contour of the subject.

스네이크 알고리즘은 수학적 연산을 통해 이미지 곡면위에서 에너지를 최소화하는 곡선으로 구해지며, 객체의 윤곽선을 표현하는 포인터들이 움직이는 객체의 윤곽선을 지속적으로 따라 가도록 제어하여 배경과 피사체를 분할 할 수 있다. 따라서, ACM은 기본적으로 영역이 움츠러드는 형태로 나타나며, 피사체의 영역인 ROI영역에 대해 ACM을 적용하면 ROI영역은 피사체의 형태로 변형되면서 segmentation된 결과를 얻을 수 있다. The snake algorithm is a mathematical operation that minimizes the energy on the image surface. The snake algorithm can divide the background and the object by controlling the contour of the object to continuously follow the contour of the moving object. Therefore, ACM basically appears as a form of shrinking the area. If ACM is applied to the ROI area of the subject, the ROI area can be transformed into the shape of the subject and segmented.

스네이크 알고리즘으로 물체의 외곽을 추출한 후 앞에서 언급한 rule of thirds에 의해 화면에 표시함으로써 사용자가 보다 좋은 구도의 사진을 찍을 수 있도록 유도할 수 있는 효과가 있다. The snake algorithm extracts the outer edge of the object and displays it on the screen by the above-mentioned rule of thirds, thereby inducing the user to take a picture of a better composition.

본 발명은 상기 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 제조될 수 있으며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다.It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the following claims. As will be understood by those skilled in the art. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive.

Claims (5)

카메라 디스플레이 창에 영상이 표시되는 단계;
상기 디스플레이창에 표시되는 영상을 관심영역 지도(Saliency Map)를 형성하고 관심영역(ROI, Region Of Interest)으로 피사체를 확인하는 단계;
Active Contour Model를 이용하여 상기 확인된 피사체의 윤곽선을 검출하는 단계;
상기 디스플레이 창의 가로와 세로를 각각 3분할한 격자로 구성하고, 상기 피사체의 윤곽선을 격자의 교차점에 위치시키는 단계;를 포함하고,
상기 관심영역(ROI, Region Of Interest)으로 피사체를 확인하는 단계는,
상기 특성을 이용하여 저준위 특성 지도(Low-Level Feature Map)를 생성하는 단계;
상기 저준위 특성 지도로부터 관심영역 지도를 계산하는 단계; 및
상기 계산으로부터 핵심적인 영익인 관심 영역을 추출하는 단계;를 포함하는 것을 특징으로 하는 촬영전 사진의 구도 보정 방법.
Displaying an image on a camera display window;
Forming a saliency map of an image displayed on the display window and confirming a subject based on a region of interest (ROI);
Detecting an outline of the identified subject using an Active Contour Model;
And arranging the contour of the object at an intersection of the grids,
The step of confirming the subject with the region of interest (ROI)
Generating a low-level feature map using the characteristics;
Calculating a ROI map from the low-level characteristic map; And
And extracting a region of interest, which is a core natural effect, from the calculation.
제 1 항에 있어서,
상기 관심영역 지도(Saliency Map)를 형성하는 과정은, 영상의 색, 휘도, 움직임, 조화, 또는 방향 중 어느 하나의 특성를 이용하여 형성하는 것을 특징으로 하는 촬영전 사진의 구도 보정 방법.
The method according to claim 1,
Wherein the process of forming the saliency map is performed using any one of color, brightness, motion, harmony, and orientation of an image.
삭제delete 제 1 항에 있어서,
상기 계산으로부터 핵심적인 영익인 관심 영역을 설정하는 단계는
다중 스케일 대비, Center-Surround Histogram(CSH), 또는 색채의 공간 분포 중 어느 하나의 정보를 이용하여 조건부 임의 필드(Conditional Random Field, CRF)를 설정하는 과정을 포함하는 것을 특징으로 하는 촬영전 사진의 구도 보정 방법.
The method according to claim 1,
The step of establishing a region of interest,
The method comprising the step of setting a Conditional Random Field (CRF) using any one of a multi-scale contrast, a Center-Surround Histogram (CSH), and a spatial distribution of colors. How to correct the composition.
삭제delete
KR1020140011123A 2014-01-29 2014-01-29 Method for correcting photograghy composition KR101590515B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140011123A KR101590515B1 (en) 2014-01-29 2014-01-29 Method for correcting photograghy composition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140011123A KR101590515B1 (en) 2014-01-29 2014-01-29 Method for correcting photograghy composition

Publications (2)

Publication Number Publication Date
KR20150090456A KR20150090456A (en) 2015-08-06
KR101590515B1 true KR101590515B1 (en) 2016-02-01

Family

ID=53885167

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140011123A KR101590515B1 (en) 2014-01-29 2014-01-29 Method for correcting photograghy composition

Country Status (1)

Country Link
KR (1) KR101590515B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101981284B1 (en) 2017-10-23 2019-05-22 연세대학교 산학협력단 Apparatus Processing Image and Method thereof
KR20200132569A (en) * 2019-05-17 2020-11-25 삼성전자주식회사 Device for automatically photographing a photo or a video with respect to a specific moment and method for operating the same

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
하호생, 박대현, 김윤, journal of information technology and architecture VOL.10, NO.1, March 2013, PAGES 113-122*

Also Published As

Publication number Publication date
KR20150090456A (en) 2015-08-06

Similar Documents

Publication Publication Date Title
CN107862698B (en) Light field foreground segmentation method and device based on K mean cluster
CN103914699B (en) A kind of method of the image enhaucament of the automatic lip gloss based on color space
US8983152B2 (en) Image masks for face-related selection and processing in images
US20160350585A1 (en) Systems and methods for persona identification using combined probability maps
US7035461B2 (en) Method for detecting objects in digital images
WO2019101113A1 (en) Image fusion method and device, storage medium, and terminal
CN105243371B (en) A kind of detection method, system and the camera terminal of face U.S. face degree
CN108537782B (en) Building image matching and fusing method based on contour extraction
WO2022160701A1 (en) Special effect generation method and apparatus, device, and storage medium
EP1810245B1 (en) Detecting irises and pupils in human images
US8705867B2 (en) Devices and methods for processing images using scale space
CN109711345B (en) Flame image identification method and device and storage medium thereof
JP4979033B2 (en) Saliency estimation of object-based visual attention model
WO2019024751A1 (en) Facial expression synthesis method and apparatus, electronic device, and storage medium
KR20200014842A (en) Image illumination methods, devices, electronic devices and storage media
WO2018082389A1 (en) Skin colour detection method and apparatus, and terminal
US20180300863A1 (en) Multiple exposure method, terminal, system, and computer readable storage medium
CN108510500B (en) Method and system for processing hair image layer of virtual character image based on human face skin color detection
US9106838B2 (en) Automatic photographing method and system thereof
CN104574358B (en) From the method and apparatus for focusing heap image progress scene cut
WO2013054462A1 (en) User interface control device, user interface control method, computer program, and integrated circuit
WO2018082388A1 (en) Skin color detection method and device, and terminal
CN111476849B (en) Object color recognition method, device, electronic equipment and storage medium
CN106295640A (en) The object identification method of a kind of intelligent terminal and device
JP2011078078A (en) Image processing apparatus, method, and 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: 20190121

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20191205

Year of fee payment: 5