KR101021173B1 - Apparatus and method for creating mosaic image based on amdamento - Google Patents

Apparatus and method for creating mosaic image based on amdamento Download PDF

Info

Publication number
KR101021173B1
KR101021173B1 KR1020090067463A KR20090067463A KR101021173B1 KR 101021173 B1 KR101021173 B1 KR 101021173B1 KR 1020090067463 A KR1020090067463 A KR 1020090067463A KR 20090067463 A KR20090067463 A KR 20090067463A KR 101021173 B1 KR101021173 B1 KR 101021173B1
Authority
KR
South Korea
Prior art keywords
vector
reference point
edge
voronoi
original image
Prior art date
Application number
KR1020090067463A
Other languages
Korean (ko)
Other versions
KR20110009980A (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 KR1020090067463A priority Critical patent/KR101021173B1/en
Publication of KR20110009980A publication Critical patent/KR20110009980A/en
Application granted granted Critical
Publication of KR101021173B1 publication Critical patent/KR101021173B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/32Indexing scheme for image data processing or generation, in general involving image mosaicing

Abstract

안다멘토 기반의 모자이크 이미지 생성장치 및 방법이 개시된다. 이미지 입력부는 모자이크 이미지를 생성하기 위한 원본 이미지를 입력받고, 기준점 배치부는 원본 이미지에 대해 사전에 설정된 개수의 기준점을 무작위로 배치한다. 제1벡터 결정부는 각각의 기준점에 대하여 원본 이미지에서 기준점에 해당하는 부분의 색상과 동일한 색상의 밀도가 최대인 지점을 향하는 제1벡터를 결정한다. 제2벡터 결정부는 기준점에 인접한 다른 기준점을 향하는 벡터와 방향이 반대이며 크기가 기준점에 인접한 다른 기준점까지의 거리에 반비례하도록 생성된 복수의 벡터의 합을 기초로 제2벡터를 결정한다. 제3벡터 결정부는 기준점과 교차하는 기준 플로우 라인으로부터 기준 플로우 라인을 따라 기준점과 인접하게 위치하는 보조 기준점으로 향하는 복수의 벡터의 합에서 기준 플로우 라인에 수직하는 성분을 기초로 제3벡터를 결정한다. 최종 벡터 결정부는 제1벡터 내지 제3벡터에 각각 사전에 설정된 가중치를 곱한 후 합산하여 각각의 기준점에 대한 최종 벡터를 산출한다. 타일 배치부는 최종 벡터에 따라 재배치된 기준점들에 대해 보로노이 다이어그램을 생성하고, 각각의 보로노이 셀에 타일을 배치하여 모자이크 이미지를 생성한다. 본 발명에 따르면, 의도한 안다멘토가 정확하게 표현되어 고전적인 모자이크에 가까운 모자이크 이미지를 생성할 수 있다.An andmento based mosaic image generating apparatus and method are disclosed. The image input unit receives an original image for generating a mosaic image, and the reference point arranging unit randomly arranges a predetermined number of reference points for the original image. The first vector determiner determines, for each reference point, a first vector toward a point where the density of the same color as the color of the portion corresponding to the reference point in the original image is maximum. The second vector determiner determines the second vector based on a sum of a plurality of vectors generated in a direction opposite to a vector toward another reference point adjacent to the reference point and whose magnitude is inversely proportional to the distance to another reference point adjacent to the reference point. The third vector determiner determines the third vector based on a component perpendicular to the reference flow line in the sum of a plurality of vectors from the reference flow line crossing the reference point to the auxiliary reference point positioned adjacent to the reference point along the reference flow line. . The final vector determiner multiplies the first vector to the third vector by a predetermined weight and adds the final vector to calculate the final vector for each reference point. The tile placement unit generates a Voronoi diagram for the reference points repositioned according to the final vector, and generates a mosaic image by placing a tile in each Voronoi cell. According to the present invention, the intended andamento can be accurately represented to generate a mosaic image close to the classic mosaic.

Description

안다멘토 기반의 모자이크 이미지 생성장치 및 방법{Apparatus and method for creating mosaic image based on amdamento}Apparatus and method for creating mosaic image based on amdamento}

본 발명은 안다멘토 기반의 모자이크 이미지 생성장치 및 방법에 관한 것으로, 보다 상세하게는, 다양한 안다멘토를 표현할 수 있는 모자이크 이미지를 컴퓨터 그래픽에 의해 구현하는 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and method for generating mosaic images based on andamento, and more particularly, to an apparatus and method for implementing mosaic images capable of expressing various andamentos by computer graphics.

비사실적 렌더링 분야에서 연구되고 있는 주제의 하나인 모자이크는 여러 가지 작은 타일들을 모아 특정 이미지 및 패턴을 표현하는 장식 예술 기법이다. 모자이크는 고대에서 현재까지 주로 바닥 및 벽면 장식 등에 널리 사용되어 왔으며, 최근까지 모자이크를 구성하는 타일의 성격과 배치 형태에 따라 그래픽스 연구자들에 의한 다양한 연구가 시도되어 왔다.Mosaic, one of the topics under study in the field of non-realistic rendering, is a decorative art technique that collects various small tiles and expresses specific images and patterns. Mosaics have been widely used in ancient times, mainly for floor and wall decoration, and until recently, various studies have been attempted by graphics researchers according to the nature and arrangement of the tiles constituting the mosaic.

바티아토(Battiato) 등은 모자이크를 이산 프리미티브(primitive) 기반 이미지의 일 예로 정의하고, 모자이크에 사용된 타일이 이미지인지 그렇지 않은지의 여부에 따라 모자이크를 크게 멀티 픽쳐(multi-picture) 모자이크와 타일 모자이크로 구분하였다. 멀티 픽쳐 모자이크는 데이터베이스에 저장된 많은 이미지들을 타일로 사용하여 원본 이미지를 구성하는 방법으로, 포토 모자이크와 퍼즐 이미지 모자이 크 등이 있다. 또한 타일 모자이크는 고전적인 장식 미술로서의 모자이크를 재현한 것으로, 고전(ancient) 모자이크와 결정화(crystallization) 모자이크가 있다.Batiato et al. Define mosaics as examples of discrete primitive-based images, and largely multi-picture mosaics and tile mosaics depending on whether the tiles used in the mosaic are images or not. Divided into. Multi picture mosaic is a method of composing an original image using many images stored in a database as tiles, and includes a photo mosaic and a puzzle image cape. Tile mosaics are also reproductions of the mosaic as a classical decorative art, which includes an antique mosaic and a crystallization mosaic.

타일 모자이크를 제작하는 일반적인 방법은 다음과 같다. 먼저 모자이크의 레이아웃 및 디자인을 결정하고, 결정된 디자인의 주요 영역 및 타일을 따라 붙일 가이드라인을 타일을 붙일 평면 위에 스케치한다. 다음으로 타일을 영역의 형태에 맞게 쪼갠 후 가이드라인을 따라 붙인다. 마지막으로 타일 사이의 틈에 그라우트를 채워 넣으면 모자이크가 완성된다.The general method of making a tile mosaic is as follows. First determine the layout and design of the mosaic, and then sketch the main areas of the determined design and the guidelines to stick along the tiles on the plane to which the tiles will be tiled. Next, cut the tiles to fit the shape of the area and stick them along the guidelines. Finally, fill the grout in the gap between the tiles to complete the mosaic.

이러한 모자이크의 제작 과정에서 가장 먼저 결정하게 되는 모자이크의 레이아웃 또는 디자인을 안다멘토(Andamento)라고 한다. 안다멘토는 타일 배치의 흐름 또는 움직임을 나타내는 라틴어로서, 타일의 모양 및 배치 등에 따라 다음과 같이 구분된다. 또한 도 1에는 여러 가지의 안다멘토를 설명하기 위한 도면이 도시되어 있다.The layout or design of the mosaic that is determined first in the process of making such a mosaic is called Andamento. Andamento is a Latin word representing the flow or movement of tile arrangement, and is classified as follows according to the shape and arrangement of the tile. In addition, Figure 1 is a view for explaining a variety of andmento.

(1) Opus Tesselatum : 벽돌과 같이 타일들이 일정한 직선상에 배치된 형태.(1) Opus Tesselatum: Tiles arranged in a straight line like a brick.

(2) Opus Classicum : 객체 영역을 제외한 배경이 Opus Tesselatum에 따라 배치된 형태.(2) Opus Classicum: A form in which the background except the object area is arranged according to Opus Tesselatum.

(3) Opus Vermiculatum : 객체 영역과 배경의 경계선을 따라 타일이 배치된 형태.(3) Opus Vermiculatum: Tiles arranged along the boundary between the object area and the background.

(4) Opus Musivum : Opus Vermiculatum 기법에서 경계선에 타일이 배치된 형태가 배경의 전 영역으로 확장된 형태.(4) Opus Musivum: In the Opus Vermiculatum technique, the tile arrangement on the boundary extends to the entire area of the background.

(5) Opus Palladianum : 불규칙한 모양의 타일들이 불규칙하게 배치된 형태.(5) Opus Palladianum: irregularly arranged tiles.

(6) Opus Sectile : 객체 영역의 형태와 일치하는 모양의 타일에 의해 모자이크가 구현된 형태.(6) Opus Sectile: A mosaic in which tiles are shaped to match the shape of the object area.

도 2a 내지 도 2e는 각각 Opus Tesselatum, Opus Classicum, Opus Musivum, Opus Palladianum 및 Opus Sectile의 안다멘토를 가지는 모자이크의 예를 나타낸 도면이다. 이러한 안다멘토는 고대의 타일 모자이크 작품에서도 쉽게 발견할 수 있고, 현재 모자이크의 제작 과정에서도 작품 레이아웃을 결정하기 위해 사용된다. 2A to 2E are diagrams showing examples of mosaics having andamentos of Opus Tesselatum, Opus Classicum, Opus Musivum, Opus Palladianum, and Opus Sectile, respectively. Such andamentos can be easily found in ancient tile mosaic works, and are also used to determine the layout of works in the current mosaic production process.

타일 모자이크를 컴퓨터 그래픽에 의해 시뮬레이션하는 기법에 관한 연구가 많이 수행되어 왔으나 주로 하나의 안다멘토에 대하여만 수행되어 왔다. 도 3a 내지 도 3e는 종래의 방법에 의해 컴퓨터 그래픽으로 구현된 모자이크의 예를 나타낸 도면이다. 도 3a를 참조하면, 모자이크 이미지를 구성하는 타일의 모양이 모두 일정하여 실제 모자이크 작품에서는 나타나지 않는 형태를 보인다. 또한 도 3b에 나타난 모자이크는 주어진 타일을 이용하여 구현한 것으로, 전통적인 모자이크 기법과는 상이하다. 도 3c에 나타난 모자이크는 안다멘토 중에서 Opus Musivum을 나타낸 것으로, 타일 모양이 일정하다. 도 3d에 나타난 모자이크는 Opus Musivum과 Opus Classicum을 동시에 표현한 것으로, 타일 모양이 실제 모자이크 작품에 나타난 타일의 모양과는 다르게 나타난다. 마지막으로 도 3e의 모자이크는 Opus Palladianum을 나타낸 것이지만, 타일의 모양이 부자연스럽다는 단점을 가진다.Many researches have been conducted on the technique of simulating tile mosaics using computer graphics, but mainly for only one andamento. 3A-3E illustrate examples of mosaics implemented in computer graphics by conventional methods. Referring to FIG. 3A, the shapes of the tiles constituting the mosaic image are all uniform and thus do not appear in the actual mosaic work. In addition, the mosaic shown in Figure 3b is implemented using a given tile, which is different from the traditional mosaic technique. The mosaic shown in Figure 3c shows the Opus Musivum among the Andamento, the tile shape is constant. The mosaic shown in FIG. 3D represents Opus Musivum and Opus Classicum simultaneously, and the tile shape is different from the shape of the tile shown in the actual mosaic work. Finally, the mosaic of FIG. 3E represents Opus Palladianum, but has a disadvantage in that the shape of the tiles is unnatural.

따라서 각각의 안다멘토의 특성을 파악하여 모든 안다멘토에 적용될 수 있으며 실제 모자이크 작품과 유사한 모자이크를 구현하는 기법의 개발이 필요하다.Therefore, it is necessary to develop the technique to realize the mosaic similar to the actual mosaic works by grasping the characteristics of each andamento and applying it to all the andamento.

본 발명이 이루고자 하는 기술적 과제는, 원본 이미지로부터 의도한 안다멘토의 특성이 정확하게 표현되는 모자이크 이미지를 생성할 수 있는 안다멘토 기반의 모자이크 이미지 생성장치 및 방법을 제공하는 데 있다.An object of the present invention is to provide an apparatus and method for mosaic image generation based on an Andamento capable of generating a mosaic image accurately expressing characteristics of an intended Andamento from an original image.

본 발명이 이루고자 하는 다른 기술적 과제는, 원본 이미지로부터 의도한 안다멘토의 특성이 정확하게 표현되는 모자이크 이미지를 생성할 수 있는 안다멘토 기반의 모자이크 이미지 생성방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공하는 데 있다.Another technical problem to be solved by the present invention is to read a computer program for executing an Andamento-based mosaic image generation method capable of generating a mosaic image accurately expressing the characteristics of the intended Andamento from the original image. To provide a recording medium that can be.

상기의 기술적 과제를 달성하기 위한 본 발명에 따른 안다멘토 기반의 모자이크 생성장치는, 모자이크 이미지를 생성하기 위한 원본 이미지를 입력받는 이미지 입력부; 상기 원본 이미지에 대해 사전에 설정된 개수의 기준점을 무작위로 배치하는 기준점 배치부; 상기 각각의 기준점에 대하여 상기 원본 이미지에서 상기 기준점에 해당하는 부분의 색상과 동일한 색상의 밀도가 최대인 지점을 향하는 제1벡터를 결정하는 제1벡터 결정부; 상기 각각의 기준점에 대하여 상기 기준점에 인접한 다른 기준점을 향하는 벡터와 방향이 반대이며 크기가 상기 기준점에 인접한 다른 기준점까지의 거리에 반비례하도록 생성된 복수의 벡터의 합을 기초로 제2벡터를 결정하는 제2벡터 결정부; 상기 각각의 기준점에 대하여 상기 원본 이미지로부터 추출한 탄젠트 플로우 필드를 구성하는 복수의 플로우 라인 중 상기 기준점과 교차하는 기준 플로우 라인을 결정하고, 상기 기준 플로우 라인으로부터 상기 기준 플로우 라인을 따라 상기 기준점과 인접하게 위치하는 보조 기준점으로 향하는 복수의 벡터의 합에서 상기 기준 플로우 라인에 수직하는 성분을 기초로 제3벡터를 결정하는 제3벡터 결정부; 상기 제1벡터, 상기 제2벡터 및 상기 제3벡터에 각각 사전에 설정된 가중치를 곱한 후 합산하여 상기 각각의 기준점에 대한 최종 벡터를 산출하는 최종 벡터 결정부; 및 상기 각각의 기준점에 대해 산출된 최종 벡터에 따라 재배치된 상기 기준점들에 대해 보로노이 다이어그램을 생성하고, 상기 보로노이 다이어그램을 구성하는 각각의 보로노이 셀에 타일을 배치하여 상기 모자이크 이미지를 생성하는 타일 배치부;를 구비한다.Andamento based mosaic generating apparatus according to the present invention for achieving the above technical problem, an image input unit for receiving an original image for generating a mosaic image; A reference point arranging unit which randomly arranges a predetermined number of reference points with respect to the original image; A first vector determiner configured to determine a first vector toward a point where the density of the same color as the color of the portion corresponding to the reference point in the original image is maximum with respect to each reference point; A second vector is determined for each reference point based on the sum of a plurality of vectors generated in a direction opposite to a vector toward another reference point adjacent to the reference point and whose magnitude is inversely proportional to the distance to another reference point adjacent to the reference point. A second vector determiner; For each reference point, a reference flow line intersecting the reference point is determined among a plurality of flow lines constituting a tangent flow field extracted from the original image, and adjacent to the reference point along the reference flow line from the reference flow line. A third vector determiner configured to determine a third vector based on a component perpendicular to the reference flow line from a sum of a plurality of vectors directed to an auxiliary reference point located; A final vector determiner configured to multiply the first vector, the second vector, and the third vector by a predetermined weight, and add the multiplied weights to calculate a final vector for each reference point; And generating a Voronoi diagram for the reference points rearranged according to the final vector calculated for each reference point, and arranging a tile in each Voronoi cell constituting the Voronoi diagram to generate the mosaic image. It includes a tile arrangement unit.

상기의 다른 기술적 과제를 달성하기 위한 본 발명에 따른 안다멘토 기반의 모자이크 생성방법은, 모자이크 이미지를 생성하기 위한 원본 이미지를 입력받는 이미지 입력단계; 상기 원본 이미지에 대해 사전에 설정된 개수의 기준점을 무작위로 배치하는 기준점 배치단계; 상기 각각의 기준점에 대하여 상기 원본 이미지에서 상기 기준점에 해당하는 부분의 색상과 동일한 색상의 밀도가 최대인 지점을 향하는 제1벡터를 결정하는 제1벡터 결정단계; 상기 각각의 기준점에 대하여 상기 기준점에 인접한 다른 기준점을 향하는 벡터와 방향이 반대이며 크기가 상기 기준점에 인접한 다른 기준점까지의 거리에 반비례하도록 생성된 복수의 벡터의 합을 기초로 제2벡터를 결정하는 제2벡터 결정단계; 상기 각각의 기준점에 대하여 상기 원본 이미지로부터 추출한 탄젠트 플로우 필드를 구성하는 복수의 플로우 라인 중 상기 기준점과 교차하는 기준 플로우 라인을 결정하고, 상기 기준 플로우 라인으로부터 상 기 기준 플로우 라인을 따라 상기 기준점과 인접하게 위치하는 보조 기준점으로 향하는 복수의 벡터의 합에서 상기 기준 플로우 라인에 수직하는 성분을 기초로 제3벡터를 결정하는 제3벡터 결정단계; 상기 제1벡터, 상기 제2벡터 및 상기 제3벡터에 각각 사전에 설정된 가중치를 곱한 후 합산하여 상기 각각의 기준점에 대한 최종 벡터를 산출하는 최종 벡터 결정단계; 및 상기 각각의 기준점에 대해 산출된 최종 벡터에 따라 재배치된 상기 기준점들에 대해 보로노이 다이어그램을 생성하고, 상기 보로노이 다이어그램을 구성하는 각각의 보로노이 셀에 타일을 배치하여 상기 모자이크 이미지를 생성하는 타일 배치단계;를 가진다.Andamento based mosaic generation method according to the present invention for achieving the above another technical problem, an image input step of receiving an original image for generating a mosaic image; A reference point arranging step of randomly arranging a predetermined number of reference points with respect to the original image; A first vector determining step of determining a first vector for each reference point toward a point where the density of the same color as the color of the portion corresponding to the reference point in the original image is maximum; A second vector is determined for each reference point based on the sum of a plurality of vectors generated in a direction opposite to a vector toward another reference point adjacent to the reference point and whose magnitude is inversely proportional to the distance to another reference point adjacent to the reference point. Determining a second vector; For each reference point, a reference flow line intersecting the reference point is determined among a plurality of flow lines constituting a tangent flow field extracted from the original image, and adjacent to the reference point along the reference flow line from the reference flow line. A third vector determining step of determining a third vector based on a component perpendicular to the reference flow line from a sum of a plurality of vectors heading to an auxiliary reference point positioned at a predetermined distance; A final vector determination step of multiplying the first vector, the second vector, and the third vector by a predetermined weight, and then adding them to calculate a final vector for each reference point; And generating a Voronoi diagram for the reference points rearranged according to the final vector calculated for each reference point, and arranging a tile in each Voronoi cell constituting the Voronoi diagram to generate the mosaic image. Tile arrangement step;

본 발명에 따른 안다멘토 기반의 모자이크 이미지 생성장치 및 방법에 의하면, 생성하고자 하는 모자이크 이미지의 안다멘토와 무관하게 기준점을 배치한 후 모자이크 이미지를 구성하는 타일의 색상, 크기 및 정렬도 등의 특성에 따라 기준점을 재배치하는 제1벡터 내지 제3벡터에 부여되는 가중치를 서로 다르게 설정함으로써, 의도한 안다멘토가 정확하게 표현되어 고전적인 모자이크에 가까운 모자이크 이미지를 생성할 수 있다.According to the Andamento-based mosaic image generating apparatus and method according to the present invention, after placing the reference point irrespective of the andamento of the mosaic image to be generated, the characteristics such as color, size and alignment of the tiles constituting the mosaic image Accordingly, by differently setting the weights assigned to the first to third vectors for repositioning the reference point, the intended andamento can be accurately represented to generate a mosaic image close to the classic mosaic.

이하에서 첨부된 도면들을 참조하여 본 발명에 따른 안다멘토 기반의 모자이크 이미지 생성장치 및 방법의 바람직한 실시예에 대해 상세하게 설명한다.Hereinafter, with reference to the accompanying drawings will be described in detail a preferred embodiment of the andamento-based mosaic image generating apparatus and method according to the present invention.

도 4는 본 발명에 따른 모자이크 이미지 생성장치에 대한 바람직한 실시예의 구성을 도시한 블록도이다.4 is a block diagram showing the configuration of a preferred embodiment of the mosaic image generating apparatus according to the present invention.

도 4를 참조하면, 본 발명에 따른 모자이크 이미지 생성장치는 이미지 입력부(410), 기준점 배치부(420), 제1벡터 결정부(430), 제2벡터 결정부(440), 제3벡터 결정부(450), 최종 벡터 결정부(460) 및 타일 배치부(470)를 구비한다.Referring to FIG. 4, the mosaic image generating apparatus according to the present invention includes an image input unit 410, a reference point arranging unit 420, a first vector determiner 430, a second vector determiner 440, and a third vector determiner. A unit 450, a final vector determining unit 460, and a tile arrangement unit 470 are provided.

이미지 입력부(410)는 모자이크 이미지를 생성하기 위한 원본 이미지를 입력받는다. 원본 이미지는 모자이크 이미지에서 나타나는 타일 효과가 나타나지 않은 이미지로서, 원본 이미지의 분할된 영역에 각각 해당 영역과 동일한 색상을 가지는 타일을 배치하는 과정을 거쳐 모자이크 이미지가 생성된다.The image input unit 410 receives an original image for generating a mosaic image. The original image is an image in which the tile effect that appears in the mosaic image does not appear. The mosaic image is generated by arranging tiles having the same color as the corresponding area in the divided regions of the original image.

기준점 배치부(420)는 원본 이미지에 대해 사전에 설정된 개수의 기준점을 무작위로 배치한다. 이때 기준점은 원본 이미지 상에 배치되어 그로부터 새로운 모자이크 이미지를 생성할 수도 있고, 원본 이미지와 동일한 크기의 캔버스를 생성하여 캔버스 상에 기준점들을 배치할 수도 있다.The reference point arranging unit 420 randomly arranges a predetermined number of reference points with respect to the original image. In this case, the reference point may be disposed on the original image to generate a new mosaic image therefrom, or the reference point may be arranged on the canvas by generating a canvas having the same size as the original image.

각각의 기준점은 모자이크 이미지 생성을 위한 타일이 배치되는 지점에 해당하며, 배치되는 타일의 개수와 동일한 기준점이 배치된다. 복수의 기준점이 반드시 일정한 규칙에 따라 배치될 필요는 없으며, 원본 이미지 상에 무작위로 배치된 후 뒤에서 설명할 재배치 과정에 의해 사용자가 의도한 안다멘토에 맞는 배치를 가지게 된다.Each reference point corresponds to a point at which tiles for generating a mosaic image are arranged, and a reference point equal to the number of tiles arranged is disposed. The plurality of reference points are not necessarily arranged according to a predetermined rule, and are randomly arranged on the original image, and then have a layout that is suitable for the user's intended andamento by the relocation process described later.

본 발명에서 모자이크 이미지의 안다멘토는 모자이크 이미지를 구성하는 각 타일의 특성을 나타내는 에너지 함수로 나타낼 수 있다. 안다멘토의 특성은 각 타일이 원본 이미지를 얼마나 정확하게 반영하는지를 나타내는 정확도, 모자이크 이미지를 구성하는 각 타일 간의 모양 및 크기가 일정한지 여부를 나타내는 균일도 및 각 타일의 무게중심이 원본 이미지 상에서 해당 타일이 위치하는 영역 내의 흐름, 즉 플로우 라인에 따라 배치되었는지 여부를 나타내는 정렬도, 여기에 추가적으로 플로우 라인의 종류에 의해 정의된다. 이 중에서 정확도, 균일도 및 정렬도가 에너지 함수의 각 항으로 포함된다. 앞에서 설명한 각각의 안다멘토의 특성을 다음의 표 1에 나타내었다. 다만, Opus Vermiculatum은 Opus Musivum과 동일한 특성을 가지며 Opus Classicum은 Opus Vermiculatum과 Opus Tessellatum의 특성을 모두 가지므로 언급을 생략한다.In the present invention, the andamento of the mosaic image may be represented as an energy function representing the characteristics of each tile constituting the mosaic image. The characteristics of the Andamento are the accuracy of how accurately each tile reflects the original image, the uniformity of whether the shape and size are consistent between each tile constituting the mosaic image, and the center of gravity of each tile where the tile is positioned in the original image. An arrangement indicating whether or not the flow in the region to be arranged, that is, arranged along the flow line, is also defined by the type of the flow line. Among them, accuracy, uniformity and alignment are included in each term of the energy function. The characteristics of each andamento described above are shown in Table 1 below. However, since Opus Vermiculatum has the same characteristics as Opus Musivum and Opus Classicum has both the characteristics of Opus Vermiculatum and Opus Tessellatum, it is omitted.

정확도accuracy 균일도Uniformity 정렬도Alignment 플로우 라인의 형태Type of flow line Opus TesselatumOpus tesselatum 보통usually 높음height 높음height 직선Straight Opus MusivumOpus mustivum 보통usually 높음height 높음height 객체 외곽Object outside Opus PalladianumOpus palladianum 낮음lowness 낮음lowness 낮음lowness 없음none Opus SectileOpus skeleton 높음height 낮음lowness 낮음lowness 없음none

표 1을 참조하면, 원본 이미지에서 객체의 모양 및 색상과 일치하도록 타일을 잘라 붙이는 형태인 Opus Sectile은 정확도가 높고, 타일의 모양과 색이 무작위인 Opus Palladianum은 모자이크 이미지와 원본 이미지의 차이가 크기 때문에 정확도가 낮다. 또한 Opus Tesselatum과 Opus Musivum은 모자이크 이미지의 배경이 일정한 모양과 크기를 가지는 타일로 채워지기 때문에 균일도가 높으며, 타일의 모양과 크기가 일정하지 않은 Opus Sectile과 Opus Palladianum은 낮은 균일도를 가진다. 마지막으로 정렬도의 경우, Opus Mussivum은 원본 이미지에서 객체의 외곽으로부터 일정한 간격으로 퍼져나가는 플로우 라인을 따라 타일이 배치되므로 높은 정렬도를 가진다.Referring to Table 1, Opus Sectile, which cuts and pastes tiles to match the shape and color of the objects in the original image, is more accurate, while Opus Palladianum, which has a random shape and color of tiles, has a large difference between the mosaic image and the original image. Because of the low accuracy. Also, Opus Tesselatum and Opus Musivum have high uniformity because the background of mosaic image is filled with tiles with uniform shape and size. Opus Sectile and Opus Palladianum with irregular shape and size of tiles have low uniformity. Finally, in the case of alignment, Opus Mussivum has a high degree of alignment because the tiles are placed along a flow line that spreads at regular intervals from the outside of the object in the original image.

위와 같은 안다멘토의 특성을 기반으로 하여 만들어진 에너지 함수는 다음의 수학식 1과 같다.The energy function created based on the above Andamento's characteristics is shown in Equation 1 below.

Figure 112009045128801-pat00001
Figure 112009045128801-pat00001

여기서, E는 에너지 함수의 값, Ed는 정확도, Er은 균일도, Ea는 정렬도, wd는 정확도에 부여되는 가중치, wr은 균일도에 부여되는 가중치, 그리고 wa는 정렬도에 부여되는 가중치이다. 또한 안다멘토의 특성에 따라 부여되는 세 개의 가중치는 모두 -1에서 1 사이의 값을 가지며, 세 개의 가중치의 합은 1이다.Where E is the value of the energy function, E d is the accuracy, E r is the uniformity, E a is the degree of alignment, w d is the weight given to the accuracy, w r is the weight given to the uniformity, and w a is the degree of alignment The weight given. In addition, all three weights given according to the characteristics of the Andamento have a value between -1 and 1, and the sum of the three weights is 1.

정확도 값 Ed는 다음의 수학식 2에 의해 기준점에 놓인 타일의 위치에서 원본 이미지와 모자이크 이미지의 색상 차를 기초로 산출된다.The accuracy value E d is calculated based on the color difference between the original image and the mosaic image at the position of the tile placed on the reference point by Equation 2 below.

Figure 112009045128801-pat00002
Figure 112009045128801-pat00002

여기서, Ed는 정확도, N은 모자이크 이미지를 구성하는 타일의 개수, 즉 원본 이미지 상에 배치된 기준점의 개수, n은 하나의 타일 내에 포함되는 화소수, (x,y)는 i번째 타일인 ti에 해당하는 영역 내의 화소의 위치,

Figure 112009045128801-pat00003
는 모자이크 이미지를 구성하는 타일에서 (x,y) 위치를 가지는 화소의 색상값, C(x,y)는 원본 이미지에서 동일한 위치를 가지는 화소의 색상값, 그리고 k는 정규화 변수로서 본 발명에서는 2로 설정된다.Here, E d is the accuracy, N is the number of tiles constituting the mosaic image, that is, the number of reference points disposed on the original image, n is the number of pixels included in one tile, (x, y) is the i-th tile the position of the pixel in the region corresponding to t i ,
Figure 112009045128801-pat00003
Is the color value of the pixel having the (x, y) position in the tile constituting the mosaic image, C (x, y) is the color value of the pixel having the same position in the original image, and k is a normalization variable. Is set to.

도 5는 원본 이미지와 모자이크 이미지의 색상 차를 나타내는 도면이다. 도 5를 참조하면, 원본 이미지의 분할된 영역에 단일 색상의 타일이 배치되어 모자이크 이미지를 구성한다. 원본 이미지에서 색상의 그라데이션이 나타나는 영역에서 원본 이미지와 모자이크 이미지의 색상값의 차이가 크게 나타나는 것을 알 수 있으며, 모자이크 이미지를 구성하는 타일의 크기가 커질수록 색상값의 차가 더 커지게 된다.5 is a diagram illustrating a color difference between an original image and a mosaic image. Referring to FIG. 5, tiles of a single color are arranged in divided regions of an original image to form a mosaic image. It can be seen that the difference between the color values of the original image and the mosaic image is large in the area where the color gradient of the original image appears. As the size of the tiles constituting the mosaic image increases, the difference in color values becomes larger.

다음으로 균일도 값 Er은 타일 크기의 균일도 값과 타일 모양의 균일도 값에 의해 정의되며, 다음의 수학식 3에 의해 산출된다.Next, the uniformity value E r is defined by the uniformity value of the tile size and the uniformity value of the tile shape, and is calculated by the following equation (3).

Figure 112009045128801-pat00004
Figure 112009045128801-pat00004

여기서, Er은 균일도, wsize 및 wshape는 각각 타일 크기 및 모양의 균일도에 부여되는 가중치, Esize는 타일 크기의 균일도, 그리고 Eshape는 타일 모양의 균일도이다.Where E r is the uniformity, w size and w shape are the weights given to the tile size and the uniformity of the shape, E size is the uniformity of the tile size, and E shape is the uniformity of the tile shape.

수학식 3에서 타일 크기의 균일도 Esize는 타일 크기의 평균과 각 타일의 크기 사이의 차이값의 평균에 의해 정의되는 값으로, 다음의 수학식 4에 의해 산출된다.In Equation 3, the uniformity E size of the tile size is a value defined by the average of the difference between the tile size average and the size of each tile, and is calculated by the following Equation 4.

Figure 112009045128801-pat00005
Figure 112009045128801-pat00005

여기서, Esize는 타일 크기의 균일도, N은 모자이크 이미지 T를 구성하는 타일의 개수,

Figure 112009045128801-pat00006
는 모자이크 이미지 T를 구성하는 전체 타일의 크기의 평균, 그리고 St는 모자이크 이미지 T에서 t번째 타일의 크기이다.Where E size is the uniformity of the tile sizes, N is the number of tiles constituting the mosaic image T,
Figure 112009045128801-pat00006
Is the average of the size of the entire tile constituting the mosaic image T, and S t is the size of the t-th tile in the mosaic image T.

다음으로 수학식 3에서 타일 모양의 균일도 Eshape는 타일의 에지에 대한 탄젠트 함수를 이용해 모자이크 이미지를 구성하는 타일들 중에서 선택된 두 타일 간의 유사도를 산출함으로써 다음의 수학식 5에서와 같이 얻어질 수 있다.Next, the uniformity E shape of the tile shape in Equation 3 may be obtained as in Equation 5 by calculating the similarity between two selected tiles among the tiles constituting the mosaic image using the tangent function of the edge of the tile. .

Figure 112009045128801-pat00007
Figure 112009045128801-pat00007

여기서, Eshape는 타일 모양의 균일도, N은 모자이크 이미지 T를 구성하는 타일의 개수, ti는 i번째 타일, tj는 j번째 타일, T()는 탄젠트 함수, 그리고 θ0는 인접한 타일과의 에지 각도의 차를 최소화시키는 타일의 회전각이다.Where E shape is the uniformity of the tile shape, N is the number of tiles constituting the mosaic image T, t i is the i-th tile, t j is the j-th tile, T () is the tangent function, and θ 0 is the adjacent tile. The angle of rotation of the tiles to minimize the difference in edge angle.

도 6은 타일 모양의 균일도를 구하는 과정을 설명하기 위한 도면이다. 도 6을 참조하면 유사도를 산출하고자 하는 두 개의 타일의 에지에 대한 탄젠트 함수의 그래프가 구해질 수 있으며, 두 그래프 사이의 면적이 유사도 값이 된다.6 is a view for explaining a process of obtaining the uniformity of the tile shape. Referring to FIG. 6, a graph of a tangent function for edges of two tiles for which similarity is calculated may be obtained, and the area between the two graphs becomes a similarity value.

수학식 4의 타일 크기의 균일도 값과 수학식 5의 타일 모양의 균일도 값에 부여되는 가중치를 적절히 조절함으로써 수학식 1의 에너지 함수에 포함되는 균일도 값을 산출할 수 있다.The uniformity value included in the energy function of Equation 1 can be calculated by appropriately adjusting the weights given to the uniformity value of the tile size of Equation 4 and the uniformity value of the tile shape of Equation 5.

마지막으로 정렬도 값 Ed는 모자이크 이미지를 구하는 각각의 타일에 있어서 정렬도 값을 구하고자 하는 타일의 중심을 지나는 플로우 라인을 따라 해당 타일에 인접한 타일이 잘 정렬되었는지 여부에 관한 것이다. 도 7은 플로우 라인을 따라 정렬된 타일을 도시한 도면이다. 도 7을 참조하여 정렬도 값을 산출하는 과정을 설명하면 다음과 같다.Finally, the degree of alignment value E d is for each tile for which the mosaic image is obtained, whether or not tiles adjacent to the tile are well aligned along the flow line passing through the center of the tile for which the alignment value is to be obtained. 7 shows tiles arranged along a flow line. A process of calculating the alignment degree value will be described with reference to FIG. 7.

도 7에서 정렬도 값을 구하고자 하는 타일을 ti라 하고, 원본 이미지로부터 추출한 플로우 필드를 구성하는 복수의 플로우 라인 중에서 ti의 중심을 지나는 플로우 라인이 선택된다. 다음으로 선택된 플로우 라인과 교차하면서 ti의 양 옆에 나란히 위치하는 두 개의 타일인 ti l과 ti r이 ti의 정렬도 값의 산출을 위해 사용된다. 정렬도 값은 ti l 및 ti r로부터 플로우 라인까지의 거리를 측정함으로써 산출되며, 이는 다음의 수학식 6과 같다.In FIG. 7, a tile for which an alignment value is to be obtained is t i , and a flow line passing through the center of t i is selected from a plurality of flow lines constituting a flow field extracted from an original image. Alignment of the next two tiles t i while crossing the selected flow line to a position side by side on each side of the t i and t i l i t r yi also is used for the calculation of the value. The degree of alignment value is calculated by measuring the distance from t i l and t i r to the flow line, which is given by Equation 6 below.

Figure 112009045128801-pat00008
Figure 112009045128801-pat00008

여기서, Ea는 정렬도, N은 모자이크 이미지 T를 구성하는 타일의 개수, dist(ti,ti r)은 ti의 중심을 지나는 플로우 라인과 ti r 사이의 거리, dist(ti,ti l)은 ti의 중심을 지나는 플로우 라인과 ti l 사이의 거리, 그리고 h는 모자이크 이미지를 구성하는 모든 타일의 평균 높이로서 정렬도 값을 정규화하기 위해 사용된다.Here, E a is arranged Figure, N is the number of tiles constituting the mosaic image T, dist (t i, t i r) is the distance between the flow line passing through the center of the t i and t i r, dist (t i , l t i) is the distance between the passing through the center of the flow line and the t i t l i, and h is used to normalize the alignment Fig value as the average height of all of the tiles that make up the mosaic image.

수학식 2, 수학식 3 및 수학식 6의 정확도, 균일도 및 정렬도의 값은 0에서 1 사이의 값을 가지며, 그 값이 작을수록 정확도, 균일도 및 정렬도가 높다는 것을 의미한다. 또한 수학식 1의 에너지 함수의 값이 최소가 되면 모자이크 이미지가 안다멘토의 특성을 잘 나타내도록 생성되었음을 의미한다. 따라서 가중치가 양수이면 에너지 함수를 최소화하기 위해 정확도, 균일도 및 정렬도의 값이 작아져야 하며, 가중치가 음수이면 정확도, 균일도 및 정렬도의 값이 커져야 한다.The values of the accuracy, uniformity, and degree of alignment in Equations 2, 3, and 6 have values between 0 and 1, and smaller values mean higher accuracy, uniformity, and degree of alignment. In addition, when the value of the energy function of Equation 1 is minimum, it means that the mosaic image is generated to well represent the characteristics of the andamento. Therefore, if the weight is positive, the values of accuracy, uniformity and alignment should be small to minimize the energy function. If the weight is negative, the values of accuracy, uniformity and alignment should be large.

이하에서 설명할 제1벡터 결정부(430), 제2벡터 결정부(440) 및 제3벡터 결정부(450)는 수학식 1의 에너지 함수 값을 최소화하여 모자이크 이미지가 의도한 안다멘토를 가지도록 하는 방향으로 제1벡터, 제2벡터 및 제3벡터를 산출하며, 원본 이미지 상의 기준점들은 산출된 제1벡터 내지 제3벡터에 의하여 재배치된다.The first vector determiner 430, the second vector determiner 440, and the third vector determiner 450, which will be described below, minimize the energy function value of Equation 1 to have an Andamento intended for the mosaic image. A first vector, a second vector, and a third vector are calculated in a direction to make reference, and the reference points on the original image are rearranged by the calculated first to third vectors.

제1벡터 결정부(430)는 각각의 기준점에 대하여 원본 이미지에서 기준점에 해당하는 부분의 색상과 동일한 색상의 밀도가 최대인 지점을 향하는 제1벡터를 결정한다.The first vector determiner 430 determines, for each reference point, a first vector toward a point where the density of the same color as the color of the portion corresponding to the reference point in the original image is maximum.

원본 이미지 상에 배치된 기준점에는 사전에 설정된 모양과 크기를 가지는 타일이 놓이게 된다. 이때 각각의 타일은 모자이크의 특성상 단일 색상만을 가질 수 있다. 따라서 원본 이미지의 색상을 정확하게 표현하기 위해서는 기준점에 놓이는 타일이 원본 이미지에서 서로 다른 색상 사이의 경계선에 위치하지 않도록 해야 한다. 제1벡터는 이와 같이 하나의 타일이 동일 색상으로 이루어진 영역에 위치할 수 있도록 기준점의 위치를 이동시키기 위해 산출되는 것이다. 또한 제1벡터는 이미지의 색상에 관련되는 것이며, 수학식 2의 정확도 값 역시 원본 이미지와 모자이크 이미지 사이의 색상의 유사도를 나타내는 것이므로 제1벡터는 정확도 값을 감소시키는 값으로 결정된다.At the reference point disposed on the original image, tiles having a preset shape and size are placed. At this time, each tile may have only a single color due to the nature of the mosaic. Therefore, to accurately represent the color of the original image, the tile placed at the reference point should not be located at the boundary between different colors in the original image. The first vector is calculated to move the position of the reference point so that one tile may be located in the same color region. In addition, since the first vector is related to the color of the image, the accuracy value of Equation 2 also represents the similarity of the color between the original image and the mosaic image, and thus the first vector is determined to reduce the accuracy value.

각 기준점에 대해 산출되어 해당 기준점을 다른 색상의 영역으로부터 멀어지도록 이동시키는 제1벡터를 산출하기 위해서는 원본 이미지에서 기준점이 위치하는 영역에서의 색상의 밀도를 필요로 한다. 제1벡터 결정부(430)는 각각의 커널을 적용하여 커널에서의 색상 밀도를 산출함으로써 제1벡터를 결정하는 방법을 사용한다. 커널 내에서 기준점이 위치하는 부분의 색상과 동일한 색상의 밀도가 높은 부분을 향하는 민시프트(mean-shift) 벡터가 제1벡터로 결정된다.In order to calculate a first vector calculated for each reference point and moving the reference point away from the region of different colors, the density of the color in the region where the reference point is located in the original image is required. The first vector determiner 430 uses a method of determining the first vector by calculating the color density in the kernel by applying each kernel. The first vector determines a mean-shift vector directed to a dense portion having the same color as the color of the portion where the reference point is located in the kernel.

커널 내에서 색상의 밀도는 다음의 수학식 1에 의해 산출된다. 이때 각각의 기준점에 적용되는 커널의 크기는 각 기준점에 놓이게 되는 타일의 면적과 동일하게 설정된다. 따라서 원본 이미지 전체의 면적을 기준점의 수로 나누면 각 기준점에 적용되는 커널의 면적이 되는 것이다.The density of colors in the kernel is calculated by Equation 1 below. At this time, the size of the kernel applied to each reference point is set equal to the area of the tile to be placed at each reference point. Therefore, dividing the area of the original image by the number of reference points gives the area of the kernel applied to each reference point.

Figure 112009045128801-pat00009
Figure 112009045128801-pat00009

여기서, n은 커널에 포함된 화소의 개수, h는 커널의 반경, K()는 방사 대칭 커널, x는 커널이 적용된 기준점의 위치, 그리고 xi는 커널에 포함된 화소 중에서 i 번째 화소의 위치이다.Where n is the number of pixels in the kernel, h is the radius of the kernel, K () is the radially symmetric kernel, x is the position of the reference point to which the kernel is applied, and x i is the position of the i-th pixel among the pixels included in the kernel. to be.

제1벡터 결정부(430)는 커널에 포함된 화소들 중에서 원본 이미지 상에서 기준점이 위치한 화소의 색상과 동일한 색상을 가지는 화소들을 선택하고, 기준점으로부터 선택된 각각의 화소로 향하는 벡터의 합을 산출하여 이를 제1벡터로 결정한다. 결과적으로 제1벡터는 기준점이 위치한 화소의 색상과 동일한 색상의 화소가 많이 모여 있는 방향, 즉 기준점에 해당하는 부분의 색상과 동일한 색상의 밀도가 최대인 방향을 가지게 된다.The first vector determiner 430 selects pixels having the same color as the color of the pixel in which the reference point is located on the original image among the pixels included in the kernel, calculates a sum of vectors directed to each pixel selected from the reference point, and Determined as the first vector. As a result, the first vector has a direction in which many pixels of the same color as the color of the pixel where the reference point is located, that is, a direction in which the density of the same color as the color of the part corresponding to the reference point is maximum.

도 8은 원본 이미지 상의 기준점 중 하나에 대해 결정된 제1벡터를 도시한 도면이다. 도 8을 참조하면, 서로 다른 색상의 경계선에 인접하게 배치된 기준점에 적용된 커널은 두 가지 색상으로 이루어진 영역을 포함한다. 따라서 기준점을 해당 기준점이 위치하는 부분의 색상과 상이한 색상으로 이루어진 영역으로부터 멀어지는 방향으로 이동시켜야 한다. 도 8에서 굵은 선으로 표시된 화살표는 제1벡터를 나타내며, 기준점을 제1벡터의 방향으로 이동시키면 기준점과 함께 이동한 커널 내부의 영역이 모두 동일한 색상을 가지게 되어 뒤에 해당 영역의 색상과 동일한 색상을 가지는 타일이 배치될 경우 정확도가 높아지게 된다. 그 결과 정확도 값을 감소시키는 효과를 얻을 수 있다.8 is a diagram illustrating a first vector determined for one of reference points on an original image. Referring to FIG. 8, a kernel applied to a reference point disposed adjacent to a boundary line of different colors includes an area composed of two colors. Therefore, the reference point should be moved in a direction away from an area composed of colors different from the color of the portion where the reference point is located. In FIG. 8, the arrow indicated by the thick line indicates the first vector. When the reference point is moved in the direction of the first vector, the areas inside the kernel moved together with the reference point have the same color. Branches are more accurate when the tiles are placed. As a result, the effect of reducing the accuracy value can be obtained.

제2벡터 결정부(440)는 각각의 기준점에 대하여 기준점에 인접한 다른 기준점을 향하는 벡터와 방향이 반대이며 크기가 기준점에 인접한 다른 기준점까지의 거리에 반비례하도록 생성된 복수의 벡터의 합을 기초로 제2벡터를 결정한다.The second vector determiner 440 is based on the sum of a plurality of vectors generated such that the direction of the vector toward the other reference point adjacent to the reference point is opposite to the reference point and the magnitude is inversely proportional to the distance to the other reference point adjacent to the reference point. Determine the second vector.

제2벡터는 수학식 3의 균일도 값과 관련된 것으로, 모자이크 이미지 상에서 타일의 모양 및 크기가 균일하게 되려면 각 타일의 중심이 되는 기준점들이 고르게 배치되어야 하기 때문에 균일도를 향상시키도록, 즉 수학식 3의 균일도 값을 감소시킬 수 있도록 제2벡터가 산출된다. 이때 제2벡터 산출을 위해 고려되는 인접한 기준점들을 선택하기 위해 제2벡터를 산출하고자 하는 기준점에 사전에 설정된 크기를 가지는 커널이 적용되며, 커널에 포함되는 기준점들이 제2벡터 산출에 사용된다.The second vector is related to the uniformity value of Equation 3, and in order to improve the uniformity of the tiles in the mosaic image, the reference points which are the centers of the tiles must be evenly arranged to improve the uniformity, that is, in Equation 3 The second vector is calculated to reduce the uniformity value. In this case, a kernel having a preset size is applied to a reference point for calculating the second vector to select adjacent reference points considered for calculating the second vector, and the reference points included in the kernel are used for calculating the second vector.

도 9는 제2벡터를 산출하는 과정을 설명하기 위한 도면이다. 도 9에서 제2벡터를 산출하고자 하는 중심 기준점(910)에 대해 중심 기준점(910)을 원점으로 하는 타원형의 커널이 적용된다. 이때 커널의 장축과 단축 사이의 비는 타일의 모양에 따라 결정되며, 타일의 모양은 모자이크 이미지의 안다멘토에 따라 달라진다. 이때 커널의 장축이 중심 기준점(910)을 지나는 플로우 라인과 접하도록 커널을 배치하는 것이 바람직하다. 또한 커널의 면적은 중심 기준점(910)에 배치될 타일의 면적의 정수배가 되도록 설정되며, 커널에 적절한 수의 기준점들이 포함되도록 타일 면적의 두 배가 되도록 하는 것이 바람직하다. 한편, 타일의 면적은 앞에서 설명한 바와 같이 원본 이미지의 면적을 기준점의 개수로 나눈 값이 된다. 도 9를 참조하면, 중심 기준점(910)에 적용된 커널 내부에 인접한 5개의 기준점이 포함되어 있는 것을 확인할 수 있다. 제2벡터는 이와 같은 인접한 기준점들에 대해 생성된 벡터의 합으로부터 산출된다.9 is a diagram for describing a process of calculating a second vector. In FIG. 9, an elliptical kernel having a center reference point 910 as an origin with respect to the center reference point 910 for which the second vector is to be calculated is applied. The ratio between the major and minor axis of the kernel is determined by the shape of the tile, and the shape of the tile depends on the andamento of the mosaic image. In this case, it is preferable to arrange the kernel such that the long axis of the kernel contacts the flow line passing through the center reference point 910. In addition, the area of the kernel is set to be an integer multiple of the area of the tile to be disposed at the center reference point 910, it is preferable to be twice the area of the tile so that the kernel includes an appropriate number of reference points. Meanwhile, the area of the tile is a value obtained by dividing the area of the original image by the number of reference points as described above. Referring to FIG. 9, it can be seen that five reference points adjacent to the inside of the kernel applied to the central reference point 910 are included. The second vector is calculated from the sum of the generated vectors for these adjacent reference points.

제2벡터를 산출하고자 하는 중심 기준점(910)과 인접한 기준점 중 하나(920) 사이에서 생성되는 벡터(930)는 중심 기준점(910)으로부터 인접한 기준점(920)을 향하는 벡터와 방향이 반대이며, 중심 기준점(910)과 인접한 기준점(920) 사이의 거리에 반비례하는 크기를 가진다. 즉, 중심 기준점(910)과 인접한 기준점(920) 사이의 거리가 멀어질수록 반대 방향을 향하는 벡터(930)의 크기는 작아지고, 중심 기준점(910)과 인접한 기준점(920) 사이의 거리가 가까워질수록 반대 방향을 향하는 벡터(930)의 크기는 커지게 된다. 도 9로부터 중심 기준점(910)에 인접한 다섯 개의 기준점에 대해 모두 다섯 개의 벡터가 생성되었으며, 이러한 벡터들은 중심 기준점(910)으로부터 인접한 기준점으로 향하는 벡터의 방향 및 중심 기준점(910)과 인접한 기준점 사이의 거리에 따라 생성되었음을 알 수 있다.The vector 930 generated between the center reference point 910 and one of the adjacent reference points, from which the second vector is to be calculated, is opposite in direction to the vector toward the adjacent reference point 920 from the center reference point 910. It has a size inversely proportional to the distance between the reference point 910 and the adjacent reference point 920. That is, as the distance between the center reference point 910 and the adjacent reference point 920 increases, the size of the vector 930 facing in the opposite direction becomes smaller, and the distance between the center reference point 910 and the adjacent reference point 920 becomes closer. As the size increases, the size of the vector 930 facing in the opposite direction increases. Five vectors have been generated for all five reference points adjacent to the center reference point 910 from FIG. 9, and these vectors represent the direction of the vector from the center reference point 910 to the adjacent reference point and between the center reference point 910 and the adjacent reference point. You can see that it was created according to the distance.

제2벡터는 이와 같이 제2벡터를 산출하고자 하는 중심 기준점(910)에 인접한 기준점들의 개수와 동일하게 생성된 벡터들의 합으로 산출되며, 이를 정리하면 다음의 수학식 8과 같이 나타낼 수 있다.The second vector is calculated as the sum of the generated vectors equal to the number of reference points adjacent to the center reference point 910 for which the second vector is to be calculated. This can be expressed as Equation 8 below.

Figure 112009045128801-pat00010
Figure 112009045128801-pat00010

여기서, vr은 제2벡터, n은 중심 기준점(910)에 적용된 커널에 포함된 인접한 기준점의 개수, vi는 중심 기준점(910)으로부터 인접한 기준점 중 i번째 기준점으로 향하는 벡터, 그리고 krθ는 중심 기준점(910)에 적용된 커널의 반경이다. 또한 k는 커널의 면적이 타일 면적의 k배가 된다는 것을 의미한다.Here, v r is the second vector, n is the number of adjacent reference points included in the kernel applied to the center reference point 910, v i is a vector from the center reference point 910 to the i th reference point of the adjacent reference point, and kr θ is The radius of the kernel applied to the central reference point 910. K also means that the kernel area is k times the tile area.

도 9를 참조하면, 중심 기준점(910)에 인접한 기준점들에 대해 생성된 다섯 개의 벡터의 합에 의해 굵은 선으로 표시된 화살표인 제2벡터가 산출되었음을 확인할 수 있다. 중심 기준점(910)을 제2벡터를 따라 이동시킴으로써 인접한 기준점들과의 간격이 고르게 되어 타일의 모양 및 크기의 균일도를 증가시킬 수 있다. 즉, 수학식 3의 균일도 값을 감소시킬 수 있다.Referring to FIG. 9, it can be seen that a second vector, which is an arrow indicated by a thick line, is calculated by the sum of five vectors generated for reference points adjacent to the central reference point 910. By moving the center reference point 910 along the second vector, the distance between adjacent reference points is evened, thereby increasing the uniformity of the shape and size of the tile. That is, the uniformity value of Equation 3 can be reduced.

제3벡터 결정부(450)는 각각의 기준점에 대하여 원본 이미지로부터 추출한 탄젠트 플로우 필드를 구성하는 복수의 플로우 라인 중 기준점과 교차하는 기준 플로우 라인을 결정하고, 기준 플로우 라인으로부터 기준 플로우 라인을 따라 기준점과 인접하게 위치하는 보조 기준점으로 향하는 복수의 벡터의 합에서 기준 플로우 라인에 수직하는 성분을 기초로 제3벡터를 결정한다. 여기서 탄젠트 플로우 필드는 원본 이미지의 에지 탄젠트 플로우(edge tangent flow)로부터 생성되며, 모자이크 이미지를 구성하는 타일의 배치 방향을 결정하기 위해 사용된다.The third vector determiner 450 determines a reference flow line that crosses the reference point among the plurality of flow lines constituting the tangent flow field extracted from the original image for each reference point, and the reference point along the reference flow line from the reference flow line. A third vector is determined based on a component perpendicular to the reference flow line in the sum of the plurality of vectors directed to the auxiliary reference point positioned adjacent to. Here, the tangent flow field is generated from an edge tangent flow of the original image and used to determine a direction of arranging tiles constituting the mosaic image.

도 10은 원본 이미지 상에 배치된 기준점들 및 하나의 기준점과 교차하는 기준 플로우 라인을 도시한 도면이다. 도 10을 참조하면, 기준 플로우 라인(1050)과 교차하는 중심 기준점(1010)에 대해 제3벡터가 산출되며, 제3벡터의 산출을 위해 기준 플로우 라인(1050)을 따라 중심 기준점(1010)의 양 옆에 위치하는 보조 기준점들(1020, 1030)이 사용된다. 이때 기준 플로우 라인(1050)이 중심 기준점(1010)에 인접한 복수의 기준점들 중에서 특정한 기준점에 인접하게 위치하지 않고, 복수의 기준점 사이를 모호하게 통과하는 경우가 있다. 이러한 경우에 제3벡터의 산출에 사용되는 보조 기준점(1020, 1030)을 명확하게 결정하기 위해 제3벡터 결정 부(450)는 보로노이 다이어그램(Voronoi diagram)을 이용한다.10 is a diagram illustrating reference points disposed on an original image and a reference flow line intersecting with one reference point. Referring to FIG. 10, a third vector is calculated for the center reference point 1010 that intersects the reference flow line 1050, and the center reference point 1010 along the reference flow line 1050 is calculated to calculate the third vector. Auxiliary reference points 1020 and 1030 located on both sides are used. In this case, the reference flow line 1050 may not be located adjacent to a specific reference point among a plurality of reference points adjacent to the central reference point 1010, and may pass obscurely between the plurality of reference points. In this case, in order to clearly determine the auxiliary reference points 1020 and 1030 used for the calculation of the third vector, the third vector determiner 450 uses a Voronoi diagram.

즉, 제3벡터 결정부(450)는 원본 이미지 상의 복수의 기준점을 기초로 복수의 임시 보로노이 셀로 구성된 임시 보로노이 다이어그램을 생성한 후, 중심 기준점(1010)이 포함된 임시 보로노이 셀과 하나의 에지를 공유하며 공유된 에지로 기준 플로우 라인(1050)이 통과하는 임시 보로노이 셀에 포함된 기준점을 제3벡터의 산출을 위한 보조 기준점(1020, 1030)으로 결정한다. 도 10을 참조하면, 원본 이미지 상에 생성된 임시 보로노이 다이어그램에서 중심 기준점(1010)이 포함된 보로노이 셀(1015)과 하나의 에지를 공유하며, 그 공유된 에지로 기준 플로우 라인(1050)이 통과하는 두 개의 임시 보로노이 셀(1025, 1035)에 포함된 기준점들이 보조 기준점(1020, 1030)으로 사용된다.That is, the third vector determiner 450 generates a temporary Voronoi diagram composed of a plurality of temporary Voronoi cells based on a plurality of reference points on the original image, and then includes one temporary Voronoi cell including the center reference point 1010. The reference points included in the temporary Voronoi cells that share the edge of the reference flow line 1050 and pass through the shared edges are determined as auxiliary reference points 1020 and 1030 for calculating the third vector. Referring to FIG. 10, in the temporary Voronoi diagram generated on the original image, one edge is shared with the Voronoi cell 1015 including the center reference point 1010, and the reference flow line 1050 is used as the shared edge. The reference points included in the two temporary vorono cells 1025 and 1035 passing through are used as auxiliary reference points 1020 and 1030.

제3벡터는 이와 같은 보조 기준점(1020, 1030)과 기준 플로우 라인(1050) 사이의 거리의 합을 최소화할 수 있는 형태로 결정된다. 즉, 제3벡터 산출부(450)는 제3벡터의 산출을 위한 보조 기준점(1020, 1030)이 결정되면, 기준 플로우 라인(1050)으로부터 각각의 보조 기준점(1020, 1030)으로 향하는 벡터를 산출하여 그 합에서 기준 플로우 라인에 수직하는 성분을 기초로 제3벡터를 결정한다. 이때 제3벡터의 방향은 기준 플로우 라인에 수직하는 성분의 방향과 동일하며, 제3벡터의 크기는 수직 성분의 크기의 1/2이 된다. 제3벡터의 크기를 수직 성분의 1/2로 하는 것은 중심 기준점(1010)이 지나치게 많이 이동하면 오히려 타일의 정렬도가 낮아질 수 있기 때문이다.The third vector is determined in such a form as to minimize the sum of the distances between the auxiliary reference points 1020 and 1030 and the reference flow line 1050. That is, when the auxiliary reference points 1020 and 1030 for calculating the third vector are determined, the third vector calculator 450 calculates a vector heading from the reference flow line 1050 to the respective auxiliary reference points 1020 and 1030. A third vector is determined based on the component perpendicular to the reference flow line in the sum. At this time, the direction of the third vector is the same as the direction of the component perpendicular to the reference flow line, and the size of the third vector is 1/2 of the size of the vertical component. The size of the third vector is 1/2 of the vertical component because the alignment of the tiles may be lowered if the central reference point 1010 is moved too much.

마지막으로 최종 벡터 산출부(460)는 제1벡터, 제2벡터 및 제3벡터에 각각 가중치를 곱한 후 합산하여 각각의 기준점에 대한 최종 벡터를 산출한다.Finally, the final vector calculator 460 multiplies the first vector, the second vector, and the third vector by weights, and adds them to calculate the final vector for each reference point.

앞에서 설명한 제1벡터, 제2벡터 및 제3벡터는 각각의 기준점에 배치되는 타일의 정확도, 균일도 및 정렬도를 증가시켜 최종적으로 수학식 1의 에너지 함수 값을 최소화시키기 위해 결정되는 것이다. 다만, 각각의 기준점은 제1벡터 내지 제3벡터가 결정될 때마다 재배치되는 것이 아니고, 제1벡터 내지 제3벡터가 모두 결정되면 그로부터 산출되는 최종 벡터에 의해 기준점의 재배치가 이루어진다.The first vector, the second vector, and the third vector described above are determined to increase the accuracy, uniformity, and degree of alignment of the tiles disposed at each reference point, thereby finally minimizing an energy function value of Equation 1. However, each reference point is not relocated every time the first vector to the third vector is determined, and when the first vector to the third vector are all determined, the reference point is rearranged by the final vector calculated therefrom.

이때 제1벡터 내지 제3벡터에 곱해지는 가중치는 각각 수학식 1에 포함된 가중치 wd, wr 및 wa와 동일하며, 생성될 모자이크 이미지의 안다멘토의 특성을 반영한 값이다. 예를 들면, 모자이크 이미지의 안다멘토를 Opus Tesselatum으로 설정한 경우, Opus Tesselatum은 표 1에 나타낸 바와 같이 정확도에 비해 균일도 및 정렬도가 높은 특성을 가진다. 즉, 수학식 1의 에너지 함수에 높은 정확도 값 및 그에 비해 낮은 균일도 및 정렬도 값이 반영된다는 의미이다. 따라서 제1벡터에 곱해지는 가중치가 제2벡터 및 제3벡터에 곱해지는 가중치보다 높게 설정된다.In this case, the weights multiplied by the first to third vectors are the same as the weights w d , w r, and w a included in Equation 1, respectively, and reflect values of the andamento of the mosaic image to be generated. For example, when the Andamento of the mosaic image is set to Opus Tesselatum, Opus Tesselatum has a high uniformity and a high degree of alignment as compared to the accuracy as shown in Table 1. That is, the energy function of Equation 1 reflects a high accuracy value and low uniformity and alignment values. Therefore, the weight multiplied by the first vector is set higher than the weight multiplied by the second vector and the third vector.

타일 배치부(470)는 각각의 기준점에 대해 산출된 최종 벡터에 따라 재배치된 기준점들에 대해 보로노이 다이어그램을 생성하고, 보로노이 다이어그램을 구성하는 각각의 보로노이 셀에 타일을 배치하여 모자이크 이미지를 생성한다.The tile placement unit 470 generates a Voronoi diagram for the repositioned reference points according to the final vector calculated for each reference point, and arranges a tile in each Voronoi cell constituting the Voronoi diagram to generate a mosaic image. Create

모자이크 이미지는 원본 이미지 또는 동일한 크기의 캔버스 상에서 재배치된 각각의 기준점에 모자이크 이미지의 단위 구성요소인 타일을 배치함으로써 생성된다. 이때 타일의 색상이 원본 이미지에서 해당 타일이 배치되는 기준점이 위치한 지점의 색상과 동일하게 된다는 것은 앞에서 설명한 바와 같다. 또한 배치되는 타일의 형태는 재배치된 기준점들에 대해 생성된 보로노이 다이어그램을 구성하는 각각의 보로노이 셀과 동일하거나, 각각의 보로노이 셀에 포함되는 원형 또는 다각형의 형태를 가지도록 할 수 있다.The mosaic image is generated by placing a tile, which is a unit component of the mosaic image, at each reference point repositioned on the original image or the canvas of the same size. In this case, the color of the tile becomes the same as the color of the point where the reference point at which the tile is disposed is located in the original image. In addition, the shape of the tile to be arranged may be the same as each of the Voronoi cells constituting the Voronoi diagram generated for the repositioned reference points, or may have a shape of a circle or polygon included in each Voronoi cell.

타일의 배치를 위해 생성되는 보로노이 다이어그램을 구성하는 보로노이 셀의 형태는 제3벡터 생성부(450)가 보조 기준점을 결정하기 위해 생성하는 임시 보로노이 다이어그램을 구성하는 보로노이 셀의 형태와 상이하다. 제3벡터 생성부(450)에 의해 생성되는 임시 보로노이 다이어그램은 원본 이미지 상에 최초로 배치되는 기준점들에 대한 것이며, 타일 배치부(470)에 의해 생성되는 보로노이 다이어그램은 최종 벡터에 의해 재배치된 기준점들에 대한 것이기 때문이다. 또한 재배치된 기준점들은 원본 이미지로부터 생성되는 모자이크 이미지의 안다멘토의 특성을 반영하고 있다.The shape of the Voronoi cell constituting the Voronoi diagram generated for the arrangement of the tiles is different from the shape of the Voronoi cell constituting the temporary Voronoi diagram generated by the third vector generator 450 to determine the auxiliary reference point. Do. The temporary Voronoi diagram generated by the third vector generator 450 is for reference points initially placed on the original image, and the Voronoi diagram generated by the tile placement unit 470 is rearranged by the final vector. For reference points. The relocated reference points also reflect the Andamento's characteristics of the mosaic image generated from the original image.

한편, 최종 벡터에 의해 재배치된 기준점들에 대해 보로노이 다이어그램을 생성하여 그대로 타일을 배치함으로써 모자이크 이미지를 생성할 수도 있지만, 보로노이 다이어그램을 구성하는 각각의 보로노이 셀을 조정하여 의도된 안다멘토에 보다 가까운 모자이크 이미지가 생성되도록 할 필요가 있다. 이를 위해 타일 배치부(470)는 제1에지 조정부(472), 제2에지 조정부(474) 및 제3에지 조정부(476)를 구비한다.On the other hand, the mosaic image can be generated by generating a Voronoi diagram and arranging tiles as it is for the reference points rearranged by the final vector, but by adjusting each Voronoi cell constituting the Voronoi diagram, It is necessary to allow closer mosaic images to be generated. To this end, the tile placement unit 470 includes a first edge adjustment unit 472, a second edge adjustment unit 474, and a third edge adjustment unit 476.

제1에지 조정부(472) 내지 제3에지 조정부(476)는 보로노이 셀을 형성하는 에지를 이동시켜 수학식 1의 에너지 함수를 최소화시키는 기능을 수행한다. 따라서 에지의 이동에 의해 에너지 함수의 값이 감소할 때에만 제1에지 조정부(472) 내지 제3에지 조정부(476)는 에지를 이동시킨다. 이러한 에지 이동 과정은 보로노이 다이어그램의 모든 에지에 대해 수행되며, 에너지 함수의 값이 더이상 감소하지 않거나 보조적인 기준으로서 에너지 함수의 값이 사전에 설정된 임계값 이하가 될 때까지 반복적으로 수행된다. 이하에서는 제1에지 조정부(472) 내지 제3에지 조정부(476)의 동작에 관하여 상세하게 설명한다.The first edge adjusting unit 472 to the third edge adjusting unit 476 move the edge forming the Voronoi cell to minimize the energy function of Equation 1. Therefore, the first edge adjuster 472 to the third edge adjuster 476 move the edge only when the value of the energy function decreases due to the movement of the edge. This edge movement process is performed for all edges of the Voronoi diagram and is repeated until the value of the energy function no longer decreases or as an auxiliary criterion until the value of the energy function is below a preset threshold. Hereinafter, operations of the first edge adjusting unit 472 to the third edge adjusting unit 476 will be described in detail.

제1에지 조정부(472)는 각각의 보로노이 셀을 형성하는 복수의 에지 중에서 순차적으로 선택된 기준 에지를 이동시켜 기준 에지를 포함하는 보로노이 셀에 포함된 화소들 중 동일한 색상을 가지는 화소의 비율이 증가하도록 한다.The first edge adjuster 472 moves a reference edge that is sequentially selected among the plurality of edges forming each Voronoi cell so that a ratio of pixels having the same color among the pixels included in the Voronoi cell including the reference edge is increased. To increase.

제1에지 조정부(472)의 기능은 제1벡터 결정부(430)의 기능과 유사하며, 보로노이 셀에 포함된 화소들이 모두 동일한 색상을 가지도록 에지를 이동시킨다. 그러나 이러한 에지의 이동에 의하여도 모든 화소들이 동일한 색상을 가질 수 없는 경우가 있으므로 제1벡터와 유사한 벡터를 결정하여 그에 의해 각각의 에지를 이동시키는 방법을 수행한다.The function of the first edge adjuster 472 is similar to that of the first vector determiner 430, and moves the edges so that all pixels included in the Voronoi cell have the same color. However, even when the edges are moved, all pixels may not have the same color. Therefore, a method similar to the first vector may be determined to thereby move each edge.

제1벡터 결정부(430)가 제1벡터의 결정을 위해 커널을 사용하여 색상의 밀도를 산출하였던 것처럼 제1에지 조정부(472) 역시 기준 에지에 커널을 적용하여 기준 에지를 이동시키기 위한 벡터를 결정한다. 커널의 반경은 기준 에지 길이의 1/2로 설정되어 기준 에지가 커널의 직경이 된다.Just as the first vector determiner 430 calculates the density of the color using the kernel to determine the first vector, the first edge adjuster 472 also applies a kernel to the reference edge to obtain a vector for moving the reference edge. Decide The radius of the kernel is set to 1/2 of the reference edge length so that the reference edge is the diameter of the kernel.

커널 내에서 색상의 밀도는 다음의 수학식 9에 의해 산출된다. 이는 커널이 기준 에지에 의해 두 개의 부분 커널로 분할되는 경우에 적용되는 것이다.The density of colors in the kernel is calculated by the following equation (9). This applies when the kernel is split into two partial kernels by the reference edge.

Figure 112009045128801-pat00011
Figure 112009045128801-pat00011

여기서, n은 하나의 부분 커널에 포함된 화소의 개수, m은 다른 하나의 부분 커널에 포함된 화소의 개수, h는 커널의 반경, K()는 방사 대칭 커널, y1 및 y2는 기준 에지의 중점, 그리고 xi는 각각의 부분 커널에 포함된 화소 중에서 i번째 화소의 위치이다.Where n is the number of pixels in one partial kernel, m is the number of pixels in the other partial kernel, h is the radius of the kernel, K () is the radially symmetric kernel, and y 1 and y2 are the reference edges. Where x i is the position of the i th pixel among the pixels included in each partial kernel.

제1에지 조정부(472)는 위 수학식 9로부터 산출되는 민시프트 벡터에 의해 기준 에지를 이동시키며, 필요한 경우에는 민시프트 벡터가 가리키는 방향에 수직하도록 기준 에지를 회전시켜 보로노이 셀에 동일한 색상을 가지는 화소가 더 많이 포함되도록 할 수 있다. 이와 같이 기준 에지를 이동시킴으로써 타일 배치부(470)에 의해 초기에 생성된 보로노이 셀에 비해 동일한 색상을 가지는 화소의 비율이 증가하도록 할 수 있다.The first edge adjuster 472 moves the reference edge by the min shift vector calculated from Equation 9 above, and if necessary, rotates the reference edge so as to be perpendicular to the direction indicated by the min shift vector, thereby providing the same color to the Voronoi cell. Branches can be made to include more pixels. By moving the reference edge as described above, the ratio of pixels having the same color may be increased as compared to the Voronoi cell initially generated by the tile placement unit 470.

제2에지 조정부(474)는 기준 에지를 공유하는 인접한 두 개의 보로노이 셀 중에서 복수의 보로노이 셀의 면적의 평균값과의 차가 큰 보로노이 셀의 중심을 향하며 기준 에지를 공유하는 인접한 두 개의 보로노이 셀의 면적의 차를 기초로 결정되는 크기를 가지는 벡터에 의해 기준 에지를 이동시킨다.The second edge adjusting unit 474 is directed toward the center of the Voronoi cell having a large difference from the average value of the areas of the plurality of Voronoi cells among the two adjacent Voronoi cells sharing the reference edge, and the two adjacent Voronoi sharing the reference edge. The reference edge is moved by a vector having a size determined based on the difference in the area of the cell.

제2에지 조정부(474)는 제2벡터 결정부(440)와 유사한 기능을 수행하며, 각각의 보로노이 셀의 크기가 균일하게 되도록 복수의 에지 중에서 순차적으로 선택 된 기준 에지를 이동시킨다. 이때 기준 에지를 이동시키는 벡터의 방향은 기준 에지를 공유하는 인접한 보로노이 셀 중에서 상대적으로 큰 보로노이 셀, 즉 모든 모로노이 셀의 면적의 평균값과의 차가 더 큰 보로노이 셀의 중심을 향한다. 또한 벡터의 크기는 다음의 수학식 10에 의해 산출된다.The second edge adjuster 474 performs a function similar to the second vector determiner 440 and moves the reference edges sequentially selected from the plurality of edges so that the size of each Voronoi cell is uniform. At this time, the direction of the vector for moving the reference edge is toward the center of the Voronoi cell having a larger difference from the average value of the area of the relatively larger Voronoi cell, that is, all the Moronoi cells, among the adjacent Voronoi cells sharing the reference edge. In addition, the magnitude of the vector is calculated by the following equation (10).

Figure 112009045128801-pat00012
Figure 112009045128801-pat00012

여기서, mag는 기준 에지를 이동시키는 벡터의 크기, s1 및 s2는 기준 에지를 공유하는 인접한 두 개의 보로노이 셀의 면적, 그리고 l은 기준 에지의 길이이다.Where mag is the magnitude of the vector moving the reference edge, s 1 and s 2 are the area of two adjacent Voronoi cells sharing the reference edge, and l is the length of the reference edge.

마지막으로 제3에지 조정부(476)는 기준 에지를 포함하는 보로노이 셀의 중심에 대하여 결정한 제3벡터에 의해 기준 에지를 이동시킨다.Finally, the third edge adjuster 476 moves the reference edge by the third vector determined with respect to the center of the Voronoi cell including the reference edge.

제3벡터 결정부(450)는 각각의 기준점에 대하여 제3벡터를 결정하고 결정된 제3벡터에 따라 기준점을 이동시켰으나, 제3에지 조정부(476)는 기준 에지를 포함하는 보로노이 셀의 중심에 대하여 제3벡터를 결정하고 결정된 제3벡터에 따라 기준 에지를 이동시켜 보로노이 셀 간의 정렬도를 높이는 기능을 수행한다. 기준 에지를 포함하는 보로노이 셀의 중심에 대한 제3벡터의 결정 과정은 앞에서 설명한 바와 동일하므로 상세한 설명을 생략한다. 보로노이 셀의 에지가 이동됨으로써 보로노이 셀의 중심도 함께 이동하므로 결과적으로 기준점을 이동시킨 것과 동일한 효과를 얻을 수 있다.The third vector determiner 450 determines the third vector with respect to each reference point and moves the reference point according to the determined third vector, but the third edge adjuster 476 is positioned at the center of the Voronoi cell including the reference edge. The third vector is determined and the reference edge is moved according to the determined third vector to increase the alignment between the Voronoi cells. Determination of the third vector with respect to the center of the Voronoi cell including the reference edge is the same as described above, and thus a detailed description thereof will be omitted. As the edge of the Voronoi cell is moved, the center of the Voronoi cell is also moved, resulting in the same effect as moving the reference point.

도 11은 본 발명에 따른 안다멘토 기반의 모자이크 이미지 생성방법에 대한 바람직한 실시예의 수행과정을 도시한 흐름도이다.11 is a flowchart illustrating a process of performing a preferred embodiment of the Andamento based mosaic image generating method according to the present invention.

도 11을 참조하면, 이미지 입력부(410)는 모자이크 이미지를 생성하기 위한 원본 이미지를 입력받는다(S1110). 다음으로 기준점 배치부(420)는 원본 이미지 상에 사전에 설정된 개수의 기준점을 무작위로 배치한다(S1120). 기준점의 개수는 모자이크 이미지를 구성하는 타일의 개수와 동일하다.Referring to FIG. 11, the image input unit 410 receives an original image for generating a mosaic image (S1110). Next, the reference point arranging unit 420 randomly arranges a predetermined number of reference points on the original image (S1120). The number of reference points is equal to the number of tiles constituting the mosaic image.

제1벡터 결정부(430)는 각각의 기준점에 대하여 원본 이미지에서 기준점에 해당하는 부분의 색상과 동일한 색상의 밀도가 최대인 지점을 향하는 제1벡터를 결정한다(S1130). 또한 제2벡터 결정부(440)는 각각의 기준점에 대하여 기준점에 인접한 다른 기준점을 향하는 벡터와 방향이 반대이며 크기가 기준점에 인접한 다른 기준점까지의 거리에 반비례하도록 생성된 복수의 벡터의 합을 기초로 제2벡터를 결정한다(S1140). 제3벡터 결정부(450)는 각각의 기준점에 대하여 원본 이미지로부터 추출한 탄젠트 플로우 필드를 구성하는 복수의 플로우 라인 중 기준점과 교차하는 기준 플로우 라인을 결정하고, 기준 플로우 라인으로부터 기준 플로우 라인을 따라 기준점과 인접하게 위치하는 보조 기준점으로 향하는 복수의 벡터의 합에서 기준 플로우 라인에 수직하는 성분을 기초로 제3벡터를 결정한다(S1150). 제1벡터, 제2벡터 및 제3벡터를 결정하는 과정에 대하여는 앞에서 설명한 바 있으므로 상세한 설명을 생략한다.The first vector determiner 430 determines, for each reference point, a first vector toward a point where the density of the same color as the color of the portion corresponding to the reference point in the original image is maximum (S1130). In addition, the second vector determiner 440 is based on the sum of a plurality of vectors generated such that the direction is opposite to a vector toward another reference point adjacent to the reference point and inversely proportional to the distance to another reference point adjacent to the reference point with respect to each reference point. In operation S1140, a second vector is determined. The third vector determiner 450 determines a reference flow line that crosses the reference point among the plurality of flow lines constituting the tangent flow field extracted from the original image for each reference point, and the reference point along the reference flow line from the reference flow line. A third vector is determined based on a component perpendicular to the reference flow line from the sum of the plurality of vectors heading to the auxiliary reference point positioned adjacent to (S1150). Since the process of determining the first vector, the second vector, and the third vector has been described above, a detailed description thereof will be omitted.

제1벡터 내지 제3벡터가 결정되면 최종 벡터 결정부(460)는 제1벡터, 제2벡터 및 제3벡터에 각각 가중치를 곱한 후 합산하여 각각의 기준점에 대한 최종 벡터 를 산출한다(S1160). 마지막으로 타일 배치부(470)는 각각의 기준점에 대해 산출된 최종 벡터에 따라 재배치된 기준점들을 기초로 보로노이 다이어그램을 생성하고, 보로노이 다이어그램을 구성하는 각각의 보로노이 셀의 형태와 동일한 복수의 타일을 배치하여 모자이크 이미지를 생성한다(S1170). 이때 제1에지 조정부(472), 제2에지 조정부(474) 및 제3에지 조정부(476)가 수학식 1의 에너지 함수의 값을 최소화시키기 위해 보로노이 셀 사이의 에지를 이동시키는 과정을 반복적으로 수행할 수 있다.When the first to third vectors are determined, the final vector determiner 460 multiplies the first vector, the second vector, and the third vector by weight, and adds them to calculate the final vector for each reference point (S1160). . Finally, the tile placement unit 470 generates a Voronoi diagram based on the repositioned reference points according to the final vector calculated for each reference point, and a plurality of the same shape as each of the Voronoi cells constituting the Voronoi diagram. The tile is arranged to generate a mosaic image (S1170). In this case, the first edge adjuster 472, the second edge adjuster 474, and the third edge adjuster 476 repeatedly move the edges between the Voronoi cells in order to minimize the value of the energy function of Equation 1. Can be done.

도 12a 내지 도 12g는 각각 원본 이미지, 원본 이미지로부터 추출된 탄젠트 플로우 필드, 기준점에 제2벡터만 적용되었을 때 기준점의 배치, 기준점에 제2벡터만 적용되었을 때 생성된 모자이크 이미지, 기준점에 제3벡터만 적용되었을 때 기준점의 배치, 제1벡터 내지 제3벡터가 모두 적용되었을 때 기준점의 배치 및 제1벡터 내지 제3벡터가 모두 적용되었을 때 생성된 모자이크 이미지를 나타낸 도면이다. 도 12a 내지 도 12g를 참조하면, 제1벡터 내지 제3벡터는 모두 안다멘토의 특성을 나타내므로 세 개의 벡터가 모두 적용되었을 때 안다멘토의 특성이 잘 나타나는 모자이크 이미지를 생성할 수 있음을 알 수 있다.12A to 12G illustrate an original image, a tangent flow field extracted from an original image, a layout of a reference point when only a second vector is applied to the reference point, a mosaic image generated when only the second vector is applied to the reference point, and a third on the reference point. FIG. 11 illustrates a layout of a reference point when only a vector is applied, an arrangement of a reference point when all of the first vectors to a third vector are applied, and a mosaic image generated when all of the first to third vectors are applied. 12A to 12G, since the first to third vectors all represent the characteristics of andamento, it can be seen that when all three vectors are applied, a mosaic image showing the characteristics of the andamento can be generated. have.

도 13은 본 발명에 의해 생성된 모자이크 이미지의 제1실시예를 나타낸 도면이다. 도 13의 모자이크 이미지를 생성하기 위해 제1벡터 내지 제3벡터에 곱해지는 가중치는 각각 wd=0.2, wr=0.3(이때 wshape=0.55, wsize=0.45), 그리고 wa=0.5로 설정되었다.13 is a view showing a first embodiment of a mosaic image generated by the present invention. The weights multiplied by the first to third vectors to generate the mosaic image of FIG. 13 are w d = 0.2, w r = 0.3 (w shape = 0.55, w size = 0.45), and w a = 0.5, respectively. Was set.

또한 도 14는 본 발명에 의해 생성된 모자이크 이미지의 제2실시예를 나타낸 도면이다. 도 14의 모자이크 이미지에 대하여는 제1벡터 내지 제3벡터에 곱해지는 가중치의 값이 각각 wd=0.25, wr=0.35(이때 wshape=0.5, wsize=0.5), 그리고 wa=0.4로 설정되었다. 도 13의 모자이크 이미지와 비교하였을 때 가중치 값의 변화로 인하여 타일 배치의 흐름이 다르게 나타나는 것을 확인할 수 있다.14 is a view showing a second embodiment of the mosaic image generated by the present invention. For the mosaic image of FIG. 14, the weight values multiplied by the first to third vectors are w d = 0.25, w r = 0.35 (w shape = 0.5, w size = 0.5), and w a = 0.4, respectively. Was set. When compared with the mosaic image of FIG. 13, it can be seen that the flow of tile arrangement appears differently due to the change in the weight value.

도 15는 본 발명에 의해 생성된 모자이크 이미지의 제3실시예를 나타낸 도면이다. 도 15의 모자이크 이미지는 wd=0.25, wr=0.3(이때 wshape=0.4, wsize=0.6), 그리고 wa=0.45와 같이 설정된 가중치에 의해 생성되었다. 도 15의 모자이크 이미지에 나타난 타일 배치의 흐름 역시 도 13 및 도 14의 모자이크 이미지와 다르게 나타나게 된다. 도 13 내지 도 15의 실시예로부터 제1벡터 내지 제3벡터에 곱해지는 가중치 값을 조절함으로써 사용자가 의도한 안다멘토를 잘 표현한 모자이크 이미지를 생성할 수 있음을 확인하였다.15 is a view showing a third embodiment of a mosaic image generated by the present invention. The mosaic image of FIG. 15 was generated by weights set as w d = 0.25, w r = 0.3 (w shape = 0.4, w size = 0.6), and w a = 0.45. The flow of tile arrangement shown in the mosaic image of FIG. 15 is also different from that of the mosaic images of FIGS. 13 and 14. It is confirmed from the embodiments of FIGS. 13 to 15 that a mosaic image expressing well-designed andamento can be generated by adjusting a weight value multiplied by the first to third vectors.

도 16a 내지 도 16c는 동일한 원본 이미지로부터 제1벡터 내지 제3벡터에 곱해지는 서로 다른 가중치에 의해 생성된 모자이크 이미지를 나타낸 도면이다.16A to 16C are diagrams illustrating mosaic images generated by different weights multiplied by first to third vectors from the same original image.

도 16a의 모자이크 이미지는 제1벡터 내지 제3벡터에 곱해지는 가중치가 각각 wd=0.2, wr=0.3(이때 wshape=0.5, wsize=0.5), 그리고 wa=0.5로 설정되었으며, Opus Musivum의 안다멘토를 나타내고 있다. 또한 도 16b의 모자이크 이미지는 wd=0.25, wr=0.5(이때 wshape=0.5, wsize=0.5), 그리고 wa=0.25로 설정된 가중치 값에 의해 생성 되었으며, Opus Classicum의 안다멘토를 나타낸다. 마지막으로 도 16c의 모자이크 이미지에 대하여는 가중치 값이 wd=0.5, wr=-1.5(이때 wshape=0.65, wsize=0.35), 그리고 wa=0으로 설정되어 Opus Palladianum의 안다멘토를 나타낸다. 도 16a 내지 도 16c로부터 동일한 원본 이미지라도 가중치 값을 다르게 설정함에 따라 전혀 다른 안다멘토를 가지는 모자이크 이미지를 생성할 수 있음을 확인할 수 있다.In the mosaic image of FIG. 16A, the weights multiplied by the first to third vectors are set to w d = 0.2, w r = 0.3 (w shape = 0.5, w size = 0.5), and w a = 0.5, respectively. Opus Musivum represents Andamento. In addition, the mosaic image of FIG. 16B was generated by a weight value set to w d = 0.25, w r = 0.5 (w shape = 0.5, w size = 0.5), and w a = 0.25, and represents Andamento of Opus Classicum. . Finally, for the mosaic image of FIG. 16C, the weight values are set to w d = 0.5, w r = -1.5 (w shape = 0.65, w size = 0.35), and w a = 0 to represent Andamento of Opus Palladianum. . It can be seen from FIG. 16A to FIG. 16C that even when the same original image is set differently, the mosaic image having a completely different andamento can be generated.

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The invention can also be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of the computer-readable recording medium include a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like, and may be implemented in the form of a carrier wave (for example, transmission via the Internet) . The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

이상에서 본 발명의 바람직한 실시예에 대해 도시하고 설명하였으나, 본 발명은 상술한 특정의 바람직한 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자라면 누구든지 다양한 변형 실시가 가능한 것은 물론이고, 그와 같은 변경은 청구범위 기재의 범위 내에 있게 된다.Although the preferred embodiments of the present invention have been shown and described above, the present invention is not limited to the specific preferred embodiments described above, and the present invention belongs to the present invention without departing from the gist of the present invention as claimed in the claims. Various modifications can be made by those skilled in the art, and such changes are within the scope of the claims.

도 1에는 여러 가지의 안다멘토를 설명하기 위한 도면,1 is a view for explaining a variety of Andamento,

도 2a 내지 도 2e는 각각 Opus Tesselatum, Opus Classicum, Opus Musivum, Opus Palladianum 및 Opus Sectile의 안다멘토를 가지는 모자이크의 예를 나타낸 도면,2A to 2E are diagrams showing examples of mosaics with andamentos of Opus Tesselatum, Opus Classicum, Opus Musivum, Opus Palladianum, and Opus Sectile, respectively;

도 3a 내지 도 3e는 종래의 방법에 의해 컴퓨터 그래픽으로 구현된 모자이크의 예를 나타낸 도면,3A-3E show examples of mosaics implemented in computer graphics by conventional methods,

도 4는 본 발명에 따른 모자이크 이미지 생성장치에 대한 바람직한 실시예의 구성을 도시한 블록도,4 is a block diagram showing the configuration of a preferred embodiment of the mosaic image generating apparatus according to the present invention;

도 5는 원본 이미지와 모자이크 이미지의 색상 차를 나타내는 도면,5 is a view showing a color difference between an original image and a mosaic image;

도 6은 타일 모양의 균일도를 구하는 과정을 설명하기 위한 도면,6 is a view for explaining a process of obtaining the uniformity of the tile shape;

도 7은 플로우 라인을 따라 정렬된 타일을 도시한 도면,7 shows tiles arranged along a flow line;

도 8은 원본 이미지 상의 기준점 중 하나에 대해 결정된 제1벡터를 도시한 도면,8 shows a first vector determined for one of the reference points on the original image;

도 9는 제2벡터를 산출하는 과정을 설명하기 위한 도면,9 is a view for explaining a process of calculating a second vector;

도 10은 원본 이미지 상에 배치된 기준점들 및 하나의 기준점과 교차하는 기준 플로우 라인을 도시한 도면,10 is a diagram illustrating reference flow lines intersecting one reference point and reference points disposed on the original image;

도 11은 본 발명에 따른 안다멘토 기반의 모자이크 이미지 생성방법에 대한 바람직한 실시예의 수행과정을 도시한 흐름도,11 is a flowchart illustrating a process of performing a preferred embodiment of the Andamento based mosaic image generating method according to the present invention;

도 12a 내지 도 12g는 각각 원본 이미지, 원본 이미지로부터 추출된 탄젠트 플로우 필드, 기준점에 제2벡터만 적용되었을 때 기준점의 배치, 기준점에 제2벡터만 적용되었을 때 생성된 모자이크 이미지, 기준점에 제3벡터만 적용되었을 때 기준점의 배치, 제1벡터 내지 제3벡터가 모두 적용되었을 때 기준점의 배치 및 제1벡터 내지 제3벡터가 모두 적용되었을 때 생성된 모자이크 이미지를 나타낸 도면,12A to 12G illustrate an original image, a tangent flow field extracted from an original image, a layout of a reference point when only a second vector is applied to the reference point, a mosaic image generated when only the second vector is applied to the reference point, and a third on the reference point. A diagram showing a layout of a reference point when only a vector is applied, a layout of a reference point when all of the first to third vectors are applied, and a mosaic image generated when all of the first to third vectors are applied;

도 13은 본 발명에 의해 생성된 모자이크 이미지의 제1실시예를 나타낸 도면,13 is a view showing a first embodiment of a mosaic image generated by the present invention;

도 14는 본 발명에 의해 생성된 모자이크 이미지의 제2실시예를 나타낸 도면,14 shows a second embodiment of a mosaic image produced by the present invention;

도 15는 본 발명에 의해 생성된 모자이크 이미지의 제3실시예를 나타낸 도면, 그리고,15 is a view showing a third embodiment of a mosaic image generated by the present invention, and

도 16a 내지 도 16c는 동일한 원본 이미지로부터 제1벡터 내지 제3벡터에 곱해지는 서로 다른 가중치에 의해 생성된 모자이크 이미지를 나타낸 도면이다.16A to 16C are diagrams illustrating mosaic images generated by different weights multiplied by first to third vectors from the same original image.

Claims (15)

모자이크 이미지를 생성하기 위한 원본 이미지를 입력받는 이미지 입력부;An image input unit configured to receive an original image for generating a mosaic image; 상기 원본 이미지에 대해 사전에 설정된 개수의 기준점을 무작위로 배치하는 기준점 배치부;A reference point arranging unit which randomly arranges a predetermined number of reference points with respect to the original image; 상기 각각의 기준점에 대하여 상기 원본 이미지에서 상기 기준점에 해당하는 부분의 색상과 동일한 색상의 밀도가 최대인 지점을 향하는 제1벡터를 결정하는 제1벡터 결정부;A first vector determiner configured to determine a first vector toward a point where the density of the same color as the color of the portion corresponding to the reference point in the original image is maximum with respect to each reference point; 상기 각각의 기준점에 대하여 상기 기준점에 인접한 다른 기준점을 향하는 벡터와 방향이 반대이며 크기가 상기 기준점에 인접한 다른 기준점까지의 거리에 반비례하도록 생성된 복수의 벡터의 합을 기초로 제2벡터를 결정하는 제2벡터 결정부;A second vector is determined for each reference point based on the sum of a plurality of vectors generated in a direction opposite to a vector toward another reference point adjacent to the reference point and whose magnitude is inversely proportional to the distance to another reference point adjacent to the reference point. A second vector determiner; 상기 각각의 기준점에 대하여 상기 원본 이미지로부터 추출한 탄젠트 플로우 필드를 구성하는 복수의 플로우 라인 중 상기 기준점과 교차하는 기준 플로우 라인을 결정하고, 상기 기준 플로우 라인으로부터 상기 기준 플로우 라인을 따라 상기 기준점과 인접하게 위치하는 보조 기준점으로 향하는 복수의 벡터의 합에서 상기 기준 플로우 라인에 수직하는 성분을 기초로 제3벡터를 결정하는 제3벡터 결정부;For each reference point, a reference flow line intersecting the reference point is determined among a plurality of flow lines constituting a tangent flow field extracted from the original image, and adjacent to the reference point along the reference flow line from the reference flow line. A third vector determiner configured to determine a third vector based on a component perpendicular to the reference flow line from a sum of a plurality of vectors directed to an auxiliary reference point located; 상기 제1벡터, 상기 제2벡터 및 상기 제3벡터에 각각 사전에 설정된 가중치를 곱한 후 합산하여 상기 각각의 기준점에 대한 최종 벡터를 산출하는 최종 벡터 결정부; 및A final vector determiner configured to multiply the first vector, the second vector, and the third vector by a predetermined weight, and add the multiplied weights to calculate a final vector for each reference point; And 상기 각각의 기준점에 대해 산출된 최종 벡터에 따라 재배치된 상기 기준점들에 대해 보로노이 다이어그램을 생성하고, 상기 보로노이 다이어그램을 구성하는 각각의 보로노이 셀에 타일을 배치하여 상기 모자이크 이미지를 생성하는 타일 배치부;를 포함하는 것을 특징으로 하는 모자이크 이미지 생성장치.Tiles for generating a mosaic image by generating a Voronoi diagram for the reference points rearranged according to the final vector calculated for each reference point, and placing a tile in each Voronoi cell constituting the Voronoi diagram. Arrangement unit; Mosaic image generating apparatus comprising a. 제 1항에 있어서,The method of claim 1, 상기 타일 배치부는,The tile arrangement unit, 상기 각각의 보로노이 셀을 형성하는 복수의 에지 중에서 순차적으로 선택된 기준 에지를 이동시켜 상기 기준 에지를 포함하는 보로노이 셀에 포함된 화소들 중 동일한 색상을 가지는 화소의 비율이 증가하도록 하는 제1에지 조정부;A first edge configured to increase a ratio of pixels having the same color among pixels included in the Voronoi cell including the reference edge by moving a reference edge selected sequentially among the plurality of edges forming each Voronoi cell; Adjusting unit; 상기 기준 에지를 공유하는 인접한 두 개의 보로노이 셀 중에서 더 큰 면적을 가지는 보로노이 셀의 중심을 향하며 상기 기준 에지를 공유하는 인접한 두 개의 보로노이 셀의 면적의 차를 기초로 결정되는 크기를 가지는 벡터에 의해 상기 기준 에지를 이동시키는 제2에지 조정부; 및A vector having a size determined based on a difference in the area of two adjacent Voronoi cells sharing the reference edge toward the center of the Voronoi cell having the larger area and sharing the reference edge; A second edge adjusting unit moving the reference edge by the second edge adjusting unit; And 상기 기준 에지를 포함하는 보로노이 셀의 중심에 대하여 결정한 상기 제3벡터에 의해 상기 기준 에지를 이동시키는 제3에지 조정부;를 포함하는 것을 특징으로 하는 모자이크 이미지 생성장치.And a third edge adjuster configured to move the reference edge by the third vector determined with respect to the center of the Voronoi cell including the reference edge. 제 2항에 있어서,3. The method of claim 2, 상기 제2에지 조정부는 하기 수학식 A에 의해 산출되는 크기를 가지는 벡터 에 의해 상기 기준 에지를 이동시키는 것을 특징으로 하는 모자이크 이미지 생성장치:Wherein the second edge adjuster moves the reference edge by a vector having a size calculated by Equation A below: [수학식 A]Equation A
Figure 112009045128801-pat00013
Figure 112009045128801-pat00013
여기서, mag는 상기 기준 에지를 이동시키는 벡터의 크기, s1 및 s2는 상기 기준 에지를 공유하는 인접한 두 개의 보로노이 셀의 면적, 그리고 l은 상기 기준 에지의 길이이다.Where mag is the magnitude of the vector moving the reference edge, s 1 and s 2 are the area of two adjacent Voronoi cells sharing the reference edge, and l is the length of the reference edge.
제 1항 또는 제 2항에 있어서,The method according to claim 1 or 2, 상기 제1벡터 결정부는 상기 기준점에 대해 사전에 설정된 크기의 커널을 적용하고, 원본 이미지 상에서 상기 커널에 포함되는 화소들 중에서 상기 기준점에 해당하는 화소의 색상과 동일한 화소들을 선택하여 상기 기준점으로부터 선택된 화소 각각으로 향하는 벡터의 합에 의해 상기 제1벡터를 결정하는 것을 특징으로 하는 모자이크 이미지 생성장치.The first vector determiner applies a kernel having a predetermined size with respect to the reference point, and selects pixels that are the same as the color of the pixel corresponding to the reference point among pixels included in the kernel on the original image, and select the pixel selected from the reference point. And the first vector is determined by the sum of the vectors directed to each. 제 1항 또는 제 2항에 있어서,The method according to claim 1 or 2, 상기 제2벡터 결정부는 상기 기준점들 중에서 순차적으로 선택된 중심 기준점에 대해 사전에 설정된 크기의 커널을 적용하고, 하기 수학식 B에 의해 상기 제2벡터를 결정하는 것을 특징으로 하는 모자이크 이미지 생성장치:Wherein the second vector determiner applies a kernel having a predetermined size to a center reference point sequentially selected from among the reference points, and determines the second vector by Equation B below: [수학식 B]Equation B
Figure 112009045128801-pat00014
Figure 112009045128801-pat00014
여기서, vr은 상기 제2벡터, n은 상기 커널에 포함되며 상기 중심 기준점에 인접한 기준점의 개수, vi는 상기 중심 기준점으로부터 n개의 상기 인접한 기준점 중 i번째 기준점으로 향하는 벡터, 그리고 krθ는 상기 커널의 반경이다.Here, v r is the second vector, n is the number of reference points included in the kernel and adjacent to the center reference point, v i is a vector from the center reference point to the i th reference point of n adjacent reference points, and kr θ is Radius of the kernel.
제 1항 또는 제 2항에 있어서,The method according to claim 1 or 2, 상기 제3벡터 결정부는 상기 복수의 기준점을 기초로 복수의 임시 보로노이 셀로 구성된 임시 보로노이 다이어그램을 생성하고, 상기 기준점들 중에서 순차적으로 선택된 중심 기준점이 포함된 임시 보로노이 셀과 하나의 에지를 공유하며 상기 공유된 에지로 상기 기준 플로우 라인이 통과하는 임시 보로노이 셀에 포함된 기준점을 상기 보조 기준점으로 결정하는 것을 특징으로 하는 모자이크 이미지 생성장치.The third vector determiner generates a temporary Voronoi diagram composed of a plurality of temporary Voronoi cells based on the plurality of reference points, and shares one edge with the temporary Voronoi cell including a center reference point sequentially selected from the reference points. And determining a reference point included in the temporary Voronoi cell through which the reference flow line passes through the shared edge as the auxiliary reference point. 제 1항 또는 제 2항에 있어서,The method according to claim 1 or 2, 상기 가중치는 -1에서 1 사이의 값을 가지며, 상기 제1벡터 내지 상기 제3벡터에 곱해지는 세 개의 가중치 값의 합은 1인 것을 특징으로 하는 모자이크 이미지 생성장치.And the weight has a value between -1 and 1, and the sum of three weight values multiplied by the first to third vectors is 1. 모자이크 이미지를 생성하기 위한 원본 이미지를 입력받는 이미지 입력단계;An image input step of receiving an original image for generating a mosaic image; 상기 원본 이미지에 대해 사전에 설정된 개수의 기준점을 무작위로 배치하는 기준점 배치단계;A reference point arranging step of randomly arranging a predetermined number of reference points with respect to the original image; 상기 각각의 기준점에 대하여 상기 원본 이미지에서 상기 기준점에 해당하는 부분의 색상과 동일한 색상의 밀도가 최대인 지점을 향하는 제1벡터를 결정하는 제1벡터 결정단계;A first vector determining step of determining a first vector for each reference point toward a point where the density of the same color as the color of the portion corresponding to the reference point in the original image is maximum; 상기 각각의 기준점에 대하여 상기 기준점에 인접한 다른 기준점을 향하는 벡터와 방향이 반대이며 크기가 상기 기준점에 인접한 다른 기준점까지의 거리에 반비례하도록 생성된 복수의 벡터의 합을 기초로 제2벡터를 결정하는 제2벡터 결정단계;A second vector is determined for each reference point based on the sum of a plurality of vectors generated in a direction opposite to a vector toward another reference point adjacent to the reference point and whose magnitude is inversely proportional to the distance to another reference point adjacent to the reference point. Determining a second vector; 상기 각각의 기준점에 대하여 상기 원본 이미지로부터 추출한 탄젠트 플로우 필드를 구성하는 복수의 플로우 라인 중 상기 기준점과 교차하는 기준 플로우 라인을 결정하고, 상기 기준 플로우 라인으로부터 상기 기준 플로우 라인을 따라 상기 기준점과 인접하게 위치하는 보조 기준점으로 향하는 복수의 벡터의 합에서 상기 기준 플로우 라인에 수직하는 성분을 기초로 제3벡터를 결정하는 제3벡터 결정단계;For each reference point, a reference flow line intersecting the reference point is determined among a plurality of flow lines constituting a tangent flow field extracted from the original image, and adjacent to the reference point along the reference flow line from the reference flow line. A third vector determining step of determining a third vector based on a component perpendicular to the reference flow line in the sum of the plurality of vectors directed to the located auxiliary reference point; 상기 제1벡터, 상기 제2벡터 및 상기 제3벡터에 각각 사전에 설정된 가중치를 곱한 후 합산하여 상기 각각의 기준점에 대한 최종 벡터를 산출하는 최종 벡터 결정단계; 및A final vector determination step of multiplying the first vector, the second vector, and the third vector by a predetermined weight, and then adding them to calculate a final vector for each reference point; And 상기 각각의 기준점에 대해 산출된 최종 벡터에 따라 재배치된 상기 기준점들에 대해 보로노이 다이어그램을 생성하고, 상기 보로노이 다이어그램을 구성하는 각각의 보로노이 셀에 타일을 배치하여 상기 모자이크 이미지를 생성하는 타일 배치단계;를 포함하는 것을 특징으로 하는 모자이크 이미지 생성방법.Tiles for generating a mosaic image by generating a Voronoi diagram for the reference points rearranged according to the final vector calculated for each reference point, and placing a tile in each Voronoi cell constituting the Voronoi diagram. Arranging step; Mosaic image generation method comprising the. 제 8항에 있어서,The method of claim 8, 상기 타일 배치단계는,The tile arrangement step, 상기 각각의 보로노이 셀을 형성하는 복수의 에지 중에서 순차적으로 선택된 기준 에지를 이동시켜 상기 기준 에지를 포함하는 보로노이 셀에 포함된 화소들 중에서 사전에 설정된 개수 이상의 화소가 동일한 색상을 가지도록 하는 제1에지 조정단계;A reference edge that is sequentially selected from among a plurality of edges forming each of the Voronoi cells so that at least a predetermined number of pixels among the pixels included in the Voronoi cell including the reference edge have the same color; 1 edge adjustment step; 상기 기준 에지를 공유하는 인접한 두 개의 보로노이 셀 중에서 더 큰 면적을 가지는 보로노이 셀의 중심을 향하며 상기 기준 에지를 공유하는 인접한 두 개의 보로노이 셀의 면적의 차를 기초로 결정되는 크기를 가지는 벡터에 의해 상기 기준 에지를 이동시키는 제2에지 조정단계; 및A vector having a size determined based on a difference in the area of two adjacent Voronoi cells sharing the reference edge toward the center of the Voronoi cell having the larger area and sharing the reference edge; A second edge adjusting step of moving the reference edge; And 상기 기준 에지를 포함하는 보로노이 셀의 중심에 대하여 결정한 상기 제3벡터에 의해 상기 기준 에지를 이동시키는 제3에지 조정단계;를 포함하는 것을 특징으로 하는 모자이크 이미지 생성방법.And a third edge adjusting step of moving the reference edge by the third vector determined with respect to the center of the Voronoi cell including the reference edge. 제 9항에 있어서,The method of claim 9, 상기 제2에지 조정단계에서, 하기 수학식 A에 의해 산출되는 크기를 가지는 벡터에 의해 상기 기준 에지를 이동시키는 것을 특징으로 하는 모자이크 이미지 생성방법.And in the second edge adjustment step, move the reference edge by a vector having a size calculated by Equation A below. [수학식 A]Equation A
Figure 112009045128801-pat00015
Figure 112009045128801-pat00015
여기서, mag는 상기 기준 에지를 이동시키는 벡터의 크기, s1 및 s2는 상기 기준 에지를 공유하는 인접한 두 개의 보로노이 셀의 면적, 그리고 l은 상기 기준 에지의 길이이다.Where mag is the magnitude of the vector moving the reference edge, s 1 and s 2 are the area of two adjacent Voronoi cells sharing the reference edge, and l is the length of the reference edge.
제 8항 또는 제 9항에 있어서,The method according to claim 8 or 9, 상기 제1벡터 결정단계에서, 상기 기준점에 대해 사전에 설정된 크기의 커널을 적용하고, 원본 이미지 상에서 상기 커널에 포함되는 화소들 중에서 상기 기준점에 해당하는 화소의 색상과 동일한 화소들을 선택하여 상기 기준점으로부터 선택된 화소 각각으로 향하는 벡터의 합에 의해 상기 제1벡터를 결정하는 것을 특징으로 하는 모자이크 이미지 생성방법.In the first vector determining step, a kernel having a predetermined size is applied to the reference point, and pixels of the pixel corresponding to the reference point are selected from the pixels included in the kernel on the original image to select from the reference point. And determining the first vector by the sum of vectors directed to each of the selected pixels. 제 8항 또는 제 9항에 있어서,The method according to claim 8 or 9, 상기 제2벡터 결정단계에서, 상기 기준점들 중에서 순차적으로 선택된 중심 기준점에 대해 사전에 설정된 크기의 커널을 적용하고, 하기 수학식 B에 의해 상기 제2벡터를 결정하는 것을 특징으로 하는 모자이크 이미지 생성방법:In the second vector determination step, applying a kernel of a predetermined size to the central reference point sequentially selected from the reference points, and determines the second vector according to the following equation B : [수학식 B]Equation B
Figure 112009045128801-pat00016
Figure 112009045128801-pat00016
여기서, vr은 상기 제2벡터, n은 상기 커널에 포함되며 상기 중심 기준점에 인접한 기준점의 개수, vi는 상기 중심 기준점으로부터 n개의 상기 인접한 기준점 중 i번째 기준점으로 향하는 벡터, 그리고 krθ는 상기 커널의 반경이다.Here, v r is the second vector, n is the number of reference points included in the kernel and adjacent to the center reference point, v i is a vector from the center reference point to the i th reference point of n adjacent reference points, and kr θ is Radius of the kernel.
제 8항 또는 제 9항에 있어서,The method according to claim 8 or 9, 상기 제3벡터 결정단계에서, 상기 복수의 기준점을 기초로 복수의 임시 보로노이 셀로 구성된 임시 보로노이 다이어그램을 생성하고, 상기 기준점들 중에서 순차적으로 선택된 중심 기준점이 포함된 임시 보로노이 셀과 하나의 에지를 공유하며 상기 공유된 에지로 상기 기준 플로우 라인이 통과하는 임시 보로노이 셀에 포함된 기준점을 상기 보조 기준점으로 결정하는 것을 특징으로 하는 모자이크 이미지 생성방법.In the third vector determining step, a temporary Voronoi diagram composed of a plurality of temporary Voronoi cells is generated based on the plurality of reference points, and the temporary Voronoi cell and one edge including a center reference point sequentially selected from the reference points are generated. And determining a reference point included in the temporary Voronoi cell through which the reference flow line passes through the shared edge as the auxiliary reference point. 제 8항 또는 제 9항에 있어서,The method according to claim 8 or 9, 상기 가중치는 -1에서 1 사이의 값을 가지며, 상기 제1벡터 내지 상기 제3벡터에 곱해지는 세 개의 가중치 값의 합은 1인 것을 특징으로 하는 모자이크 이미지 생성방법.And the weight has a value between -1 and 1, and the sum of three weight values multiplied by the first to third vectors is 1. 제 8항 또는 제 9항에 기재된 모자이크 이미지 생성방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for executing the mosaic image generating method according to claim 8 or 9.
KR1020090067463A 2009-07-23 2009-07-23 Apparatus and method for creating mosaic image based on amdamento KR101021173B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020090067463A KR101021173B1 (en) 2009-07-23 2009-07-23 Apparatus and method for creating mosaic image based on amdamento

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020090067463A KR101021173B1 (en) 2009-07-23 2009-07-23 Apparatus and method for creating mosaic image based on amdamento

Publications (2)

Publication Number Publication Date
KR20110009980A KR20110009980A (en) 2011-01-31
KR101021173B1 true KR101021173B1 (en) 2011-03-15

Family

ID=43615515

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020090067463A KR101021173B1 (en) 2009-07-23 2009-07-23 Apparatus and method for creating mosaic image based on amdamento

Country Status (1)

Country Link
KR (1) KR101021173B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100407685B1 (en) 2001-01-12 2003-12-01 윤경현 Method for representing Color paper mosaic using computer
KR100792827B1 (en) 2006-12-01 2008-01-14 중앙대학교 산학협력단 Method of generating mosaic image and storage medium storing program therefor
KR20080054880A (en) * 2006-12-14 2008-06-19 중앙대학교 산학협력단 Mosaic image creation method and device for the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100407685B1 (en) 2001-01-12 2003-12-01 윤경현 Method for representing Color paper mosaic using computer
KR100792827B1 (en) 2006-12-01 2008-01-14 중앙대학교 산학협력단 Method of generating mosaic image and storage medium storing program therefor
KR20080054880A (en) * 2006-12-14 2008-06-19 중앙대학교 산학협력단 Mosaic image creation method and device for the same

Also Published As

Publication number Publication date
KR20110009980A (en) 2011-01-31

Similar Documents

Publication Publication Date Title
Battiato et al. Digital mosaic frameworks‐An overview
KR100901688B1 (en) Texturing method and apparatus
US10062192B2 (en) Fast high-fidelity flood-filling on vector artwork
EP2929455B1 (en) Efficient lighting effects in design software
CN102449664A (en) Gradual-change animation generating method and apparatus
CN108510562B (en) Digital camouflage pattern generation method based on image fractal texture
CN103761397A (en) Three-dimensional model slice for surface exposure additive forming and projection plane generating method
CN107369190B (en) Rubble-based thermodynamic diagram accelerated rendering method
CN111016179A (en) Variable-layer-thickness subdivision calculation method based on additive manufacturing
JP2003518672A (en) Mesh generator and method for generating mesh during extrusion process
KR20180073914A (en) Adaptive Slicing Method by Merging Vertical Layer Polylines for Reducing 3D Printing Time
KR101779532B1 (en) System and method for converting 2-dimensional image to 3-dimensional image
Battiato et al. A Survey of Digital Mosaic Techniques.
KR101021173B1 (en) Apparatus and method for creating mosaic image based on amdamento
CN108897912B (en) Hole decorative plate design and arrangement method based on circular piles
US10115181B2 (en) Systems for automatically assembling tile maps and associated techniques
Mueller et al. Volumetric meshes for real-time medical simulations
CN110120089B (en) Seamless texture automatic generation method based on cutting boundary optimization
KR100792827B1 (en) Method of generating mosaic image and storage medium storing program therefor
Olajos Real-time rendering of volumetric clouds
KR101470357B1 (en) Apparatus and method for headcut rendering of 3D object
CN110956696A (en) Submarine topography simulation method based on multi-scale chart data
Ariyan et al. Terrain synthesis using curve networks.
Wyvill Painting with flowsnakes
GB2394873A (en) Generating texture maps for use in 3D computer graphics

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: 20131231

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20150417

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20160119

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee