KR20210077204A - Apparatus for painterly animation - Google Patents

Apparatus for painterly animation Download PDF

Info

Publication number
KR20210077204A
KR20210077204A KR1020190168585A KR20190168585A KR20210077204A KR 20210077204 A KR20210077204 A KR 20210077204A KR 1020190168585 A KR1020190168585 A KR 1020190168585A KR 20190168585 A KR20190168585 A KR 20190168585A KR 20210077204 A KR20210077204 A KR 20210077204A
Authority
KR
South Korea
Prior art keywords
image
pixels
pixel
edge
image frame
Prior art date
Application number
KR1020190168585A
Other languages
Korean (ko)
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 KR1020190168585A priority Critical patent/KR20210077204A/en
Publication of KR20210077204A publication Critical patent/KR20210077204A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/02Non-photorealistic rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion

Abstract

Disclosed are an apparatus and method for providing pictorial representation to an animation. The apparatus of the present invention comprises: a movement vector calculation unit for calculating a movement vector corresponding to a second video frame among a plurality of video frames, based on location shifts of pixels whose location are shifted on a second video frame following a first video frame among pixels constituting the first video frame ahead of other video frames in terms of a time; an edge video generation unit for detecting an edge in the first video frame to generate an edge video; a first movement map generation unit for generating a first movement map by connecting from each of first pixels constituting the edge video to a point obtained by adding a movement vector to coordinates of the first pixels; a second movement map generation unit for generating a second movement map by connecting from each of the second pixels whose locations are shifted except for first pixels among pixels constituting the first video frame to a point obtained by adding a movement vector to coordinates of the second pixels; and a rendered video generation unit for performing overcoating on a first rendered video corresponding to a first video frame based on the first movement map and the second movement map to generate a second rendered video corresponding to the second video frame. In accordance with the present invention, brush strokes between video frames can keep temporal and structural consistency, a time required for rendering can be shortened, and an effect of overcoating of brush strokes between frames and a flickering phenomenon can be reduced.

Description

애니메이션의 회화적 표현 장치{Apparatus for painterly animation}An apparatus for pictorial expression of animation {Apparatus for painterly animation}

본 발명은 애니메이션의 회화적 표현 장치에 관한 것으로, 보다 상세하게는, 연속적인 입력 영상을 손으로 그린 듯한 회화적 느낌으로 표현하는 장치에 관한 것이다.The present invention relates to an apparatus for pictorial expression of animation, and more particularly, to an apparatus for expressing a continuous input image with a pictorial feeling as if drawn by hand.

1960년대 시작된 컴퓨터 그래픽스에 관한 연구는 사진과 같은 사실적인 영상을 만들어 내는 것이 목표였다. 지난 30년간 포토리얼리즘(Photo-realism)이라는 용어로 대변되듯, 기존 컴퓨터 그래픽스의 궁극적인 관심은 얼마나 실제와 같은 영상을 만들 수 있는가에 집중되었다. 이러한 전통적인 컴퓨터 그래픽스는 레디오시티(Radiosity)나 광선추적법(Ray-tracing) 같이 사물의 물리적인 특성이나 역학적인 특징을 그대로 흉내 내어 매우 사실적인 영상을 만들어내었다.Research on computer graphics, which began in the 1960s, aimed to create photorealistic images. As represented by the term photo-realism for the past 30 years, the ultimate interest in existing computer graphics has focused on how realistic images can be created. These traditional computer graphics created very realistic images by mimicking the physical or mechanical characteristics of objects, such as radiosity and ray-tracing.

1990년대에 들어서면서부터, 컴퓨터 그래픽스의 관심은 사실적인 영상(Photorealisitc Image)에서 비사실적인 영상(Non-Photorealistic Image)으로 변화하게 된다. 더 이상 사실적인 영상만을 만들어 내는데 매달리지 않고, 비사실적인 영상을 만들어 내는 방법을 연구하기 시작했다. 이러한 비사실적 영상을 만들어 내는 방법으로 비사실적 렌더링(Non-Photorealistic Rendering)이라는 분야가 기존 컴퓨터 그래픽스의 한 분야로 자리 잡게 되었다. 비사실적 렌더링은 기존의 사실적 렌더링에 상반되는 개념이다. 기존의 사실적 렌더링이 대상(object)을 보다 사실적으로 표현하고자 하였던 반면 비사실적 렌더링은 대상을 표현하는데 있어서 사실적으로 표현하는데 얽매이기보다는 영상의 여러 가지 특징을 잘 표현하여 그 의미를 잘 전달하는 것을 목표로 삼고 있다. 따라서 비사실적 렌더링의 평가는 객관적이기 보다는 보다 사람의 주관이 큰 영향을 미친다. 표 1에는 사실적인 렌더링과 비사실적인 렌더링의 차이점이 기재되어 있다.Since the 1990s, interest in computer graphics has changed from photorealistic images to non-photorealistic images. Instead of focusing on creating only realistic images, I started researching how to create non-realistic images. As a method of creating such non-realistic images, the field of Non-Photorealistic Rendering has been established as a field of existing computer graphics. Non-photorealistic rendering is a concept opposite to conventional realistic rendering. While the existing realistic rendering tried to express the object more realistically, the non-realistic rendering aims to express the various characteristics of the image well and convey its meaning well rather than being bound by realistic expression in expressing the object. is taken as Therefore, the evaluation of non-realistic rendering is more influenced by human subjectivity than objective. Table 1 lists the differences between photorealistic and non-photorealistic rendering.

사실적인 렌더링
(Photo-Realistic Rendering)
photorealistic rendering
(Photo-Realistic Rendering)
비사실적인 렌더링
(Non-Photorealistic Rendering)
unrealistic rendering
(Non-Photorealistic Rendering)
접근방법Approach 시뮬레이션 simulation 스타일레이션styling 특징Characteristic 객관적 objective 주관적subjective 영향effect 물리적 과정physical process 예술적 과정artistic process 정확도 accuracy 명확함clarity 대략적임Approximate 완성도Perfection 완전한 결과complete result 불완전한 결과incomplete results

비사실적 렌더링이란 특정한 대상(2D 영상 또는 3D 데이터)을 예술가에 의해서 만들어진 영상과 같은 효과를 표현하는 렌더링 방법이다. 비사실적 렌더링 기술에는 회화적 렌더링(Painterly Rendering), 모자이크 렌더링(Mosaic Rendering), 카툰 렌더링(Cartoon Rendering), 기술 삽화 렌더링(Technical Illustration Rendering) 그리고 펜 앤 잉크 렌더링(Pen and Ink Rendering) 기술이 있다.Non-realistic rendering is a rendering method that expresses an effect such as an image created by an artist on a specific object (2D image or 3D data). Non-photorealistic rendering techniques include Painterly Rendering, Mosaic Rendering, Cartoon Rendering, Technical Illustration Rendering, and Pen and Ink Rendering technology.

회화적 렌더링은 주로 브러시 스트로크를 통해 이루어진다. 브러시 스트로크는 화가가 작품을 그릴 때 붓으로 무수히 많은 칠을 하게 되는데, 이때 한 번의 움직임을 브러시 스트로크라고 한다. 회화적 렌더링에서는 유화와 같은, 손으로 그린 듯한 결과 영상을 만들기 위하여 일반적으로 브러시 스트로크의 여러 파라미터를 결정하기 위한 방법을 연구하였다. 브러시 스트로크의 파라미터에는 위치, 색상, 크기, 방향, 모양, 질감 그리고 덧칠 여부 등이 있다. 이러한 회화적 렌더링은 브러시 스트로크를 이용하여 손으로 그린 듯한 회화적 느낌을 자동으로 표현하는 방법으로 브러시 스트로크의 특징에 매우 의존적이다. 브러시 스트로크의 특징은 색상, 위치, 방향, 모양, 크기 그리고 질감 등이 있는데 기존 연구자들은 이러한 특징들의 파라미터를 조절하여 다양한 형태의 회화적 효과를 표현하고자 하였다.Pictorial rendering is mainly done through brush strokes. In the case of brush strokes, when an artist draws a work, he paints countless times with a brush. At this time, one movement is called a brush stroke. In pictorial rendering, methods for determining various parameters of brush strokes have been studied in order to create images that look like hand-drawn images, such as oil paintings. The parameters of a brush stroke include position, color, size, direction, shape, texture, and whether to overcoat. This pictorial rendering is a method that automatically expresses a pictorial feeling as if drawn by hand using brush strokes, and is highly dependent on the characteristics of brush strokes. The characteristics of brush strokes include color, position, direction, shape, size, and texture. Existing researchers tried to express various types of pictorial effects by adjusting the parameters of these characteristics.

해버리(Haeberli)는 입력 영상에 사용자 입력을 통하여 브러시 스트로크의 색상, 모양, 크기 그리고 방향을 결정하는 방법을 제안하였다. 이 방법은 사용할 브러시 스트로크들을 미리 데이터베이스에 저장해놓고 저장된 브러시를 사용하여 추상적인 효과를 표현하는데 사용하였으나 사용자 입력이 필수적이다.Haeberli proposed a method of determining the color, shape, size, and direction of brush strokes through user input to an input image. In this method, the brush strokes to be used are stored in the database in advance and used to express abstract effects using the saved brushes, but user input is essential.

리트이노비쯔(Litwinowicz)는 라인과 텍스쳐를 가지는 브러시 스트로크를 생성하였다. 이 방법에서 사용된 브러시 스트로크의 방향은 입력 영상의 그라디언트(gradient) 기반 박판(thin-plate) 스플라인 보간법을 사용하였으며, 각 브러시 스트로크의 파라미터에 랜덤노이즈 값을 추가하여 다양한 브러시 스트로크를 만들었다. 또한, 영상의 에지를 고려하는 브러시 스트로크 클리핑 방법을 소개하였다. 그러나 브러시의 크기가 작고 직선 스트로크만을 사용하여 단조로운 효과가 나타나는 단점이 있다.Litwinowicz created brush strokes with lines and textures. The brush stroke direction used in this method used the gradient-based thin-plate spline interpolation method of the input image, and various brush strokes were created by adding random noise values to the parameters of each brush stroke. Also, a brush stroke clipping method that considers the edges of the image was introduced. However, there is a disadvantage that the size of the brush is small and a monotonous effect is obtained by using only straight strokes.

허쯔만(Hertzmann)은 입력 영상에 회화적 렌더링 효과를 자동으로 표현하는 방법을 제안하였다. 이 방법은 스플라인 곡선과 영상의 기울기를 가지는 에지를 따라 브러시 스트로크를 만들었으며 한 장의 영상을 여러 레이어로 나누고 각 레이어는 같은 크기의 브러시 스트로크를 생성하여 렌더링하였다. 또한, 최종 결과 영상의 질을 개선하기 위해 폭이 큰 브러시에서 작은 순으로 각 레이어(layer)에 적용하였다. 그러나 이 방법은 실제 회화적 작품에서 보여주는 브러시 스트로크의 질감을 표현하지 못했으며 에지 부분에서도 서로 다른 그라디언트를 가지는 여러 개의 브러시 스트로크들이 표현됨으로써 결과 영상이 블러링(blurring)한 효과를 나타내고 있다.Hertzmann proposed a method of automatically expressing the pictorial rendering effect on the input image. In this method, brush strokes are made along the spline curve and the edge with the image slope. One image is divided into several layers, and each layer is rendered by creating brush strokes of the same size. In addition, in order to improve the quality of the final result image, the brushes were applied to each layer in the order from the largest to the smallest. However, this method did not express the texture of brush strokes shown in actual pictorial works, and multiple brush strokes with different gradients are expressed even at the edges, showing a blurring effect in the resulting image.

한편 회화적 애니메이션은 연속적인 입력 영상을 이용하여 손으로 그린 듯한 회화적 느낌을 표현하는 방법으로, 프레임 간 브러시 스트로크의 구조적·시간적 일관성을 유지하는 것이 매우 중요하다. 프레임 간 시간적 일관성을 유지하기 위해서 콜로모스(Collomosse)는 시공간 볼륨(spatiotemporal volume) 같은 비디오 시퀀스의 분석을 통해서 스트로크 표면(Stroke Surfaces)을 생성하였다. 이 방법은 브러시 스트로크가 아닌, 영역분할 알고리즘을 이용하여 생성된 각 영역들을 기반으로 회화적 애니메이션 영상을 생성하게 되는데 프레임 간 각 영역의 시간적 일관성을 유지하기 위해서 사용자가 직접 영역을 나누고 프레임 간 영역별 관계도 설정해야 하는 문제점이 있다. 또한 마이어(Meier)는 3차원 기하학 정보와 카메라 위치 정보를 이용하여 이전 프레임에 덧칠된 브러시스트로크의 위치에서 현재 프레임으로 옮기는 방법을 사용하였다. 이 방법은 3차원 기하학 정보를 이용하였기 때문에 프레임 간 브러시 스트로크의 위치를 정확하게 찾아낼 수 있는 장점이 있는 반면에 애니메이션화 할 모든 장면에 대해서 모델링을 해야 한다는 단점이 있다.On the other hand, pictorial animation is a method of expressing a pictorial feeling as if drawn by hand using continuous input images, and it is very important to maintain the structural and temporal consistency of brush strokes between frames. In order to maintain temporal coherence between frames, Colomosse created Stroke Surfaces through analysis of video sequences such as spatiotemporal volumes. In this method, a pictorial animation image is generated based on each region created using the region division algorithm, not brush strokes. In order to maintain temporal consistency of each region between frames, the user directly divides the region and separates the regions between frames. There is also the problem of establishing a relationship. Also, Meier used a method of moving the brushstrokes overlaid on the previous frame to the current frame using 3D geometric information and camera position information. Since this method uses 3D geometric information, it has the advantage of accurately finding the position of brush strokes between frames, but has the disadvantage of requiring modeling for all scenes to be animated.

기존의 회화적 애니메이션 연구자들은 브러시 스트로크를 기반으로 프레임 간 브러시들의 관계를 설정하고 있다. 프레임 간 브러시 스트로크들의 관계 설정은 위치, 색상 그리고 방향 같은 브러시 스트로크의 요소들에 매우 의존적이다. 특히, 기존 연구자들은 광류(Optical Flow) 방법에 의해서 계산된 모션 벡터 데이터를 이용하여 이전 프레임의 캔버스에 존재하는 모든 브러시 스트로크들을 현재 프레임의 캔버스로 위치 이동을 한 다음, 옮겨진 브러시들 사이에 발생하는 홀(Hole)을 채워나가는 방법을 통해서 캔버스를 완성하고 있다. 이 방법들은 브러시 스트로크의 요소 중 위치에 중점을 두고 있기 때문에 프레임 간 플릭커링(Flickering) 현상이 발생하거나 프레임 간 브러시 스트로크들이 덧칠된다는 느낌이 아니라 단순히 색상과 모양은 변하지 않고 위치만 이동되는 문제점이 발생하게 된다. 이러한 문제점은 실제 애니메이터들이 만드는 작품에서는 표현될 수 없는 매우 인위적인 현상이다.Existing pictorial animation researchers have established the relationship of brushes between frames based on brush strokes. Setting the relationship of brush strokes between frames is very dependent on elements of brush strokes such as position, color, and direction. In particular, existing researchers use motion vector data calculated by the optical flow method to move all brush strokes existing on the canvas of the previous frame to the canvas of the current frame, and then move the brush strokes that occur between the moved brushes to the canvas of the current frame. The canvas is completed by filling in the hole. Because these methods focus on the position among the elements of the brush stroke, there is a problem that only the position is moved without changing the color and shape, not the flickering phenomenon between frames or the feeling that the brush strokes between the frames are overpainted. will do This problem is a very artificial phenomenon that cannot be expressed in the works made by actual animators.

동영상을 입력으로 한 회화적 애니메이션은 가장 중요하게 고려되어야 할 요소는 프레임 간 브러시 스트로크의 구조적시간적 일관성을 유지하는 것과 객체들(전경과 배경)의 움직임이 발생하는 부분을 손으로 그린 듯한 회화적 느낌을 표현하는 것이다.For pictorial animation with video input, the most important factors to consider are the maintenance of structural and temporal consistency of brush strokes between frames and the pictorial feeling of hand-drawn parts in which the movement of objects (foreground and background) occurs. is to express

마이어(Meier)는 프레임 간 브러시 스트로크의 시간적 일관성을 유지하기 위해 아티스트들이 캔버스위에 많은 브러시 스트로크들을 덧칠하는 것처럼 스크린 공간상에 2D 페인트 브러시 스트로크를 렌더링할 3D 파티클(particle) 집합 같은 폴리곤을 모델링하였다. 이 방법은 3D 폴리곤의 노말 방향(Normal direction)을 이용하여 3D 파티클들을 2D로 변환함으로써 시간적 일관성을 유지하였다. 또한 브러시 스트로크의 덧칠 효과를 조절하기 위해 표면의 기하학적 성질과 라이팅(lighting) 효과를 사용하였다.To maintain temporal consistency of brushstrokes from frame to frame, Meier modeled polygons as a set of 3D particles that would render 2D paint brushstrokes in screen space, just as artists paint over many brushstrokes on a canvas. This method maintains temporal consistency by converting 3D particles to 2D using the normal direction of 3D polygons. In addition, the geometric properties of the surface and the lighting effect were used to control the brush stroke's overpainting effect.

리쯔위노비쯔(Litwinowicz)는 브러시 스트로크의 시간적 일관성을 유지하기 위해 광류 방법(Optical flow method)과 델러니 삼각형(Delaunay triangulation)을 이용하여 현재 프레임에 새로운 브러시를 추가하여 재배치하였다. 이 방법은 이전 프레임 상에 존재하는 모든 브러시 스트로크들을 광류 방법을 이용하여 계산된 모션 벡Litwinowicz added a new brush to the current frame and rearranged it using the optical flow method and the Delaunay triangulation to maintain temporal consistency of brush strokes. In this method, all brush strokes existing on the previous frame are calculated using the optical flow method as a motion vector.

터를 더하여 현재 프레임으로 옮긴다. 옮겨진 브러시들의 중심을 하나의 시드 포인트로 설정하고 델러니 삼각형을 적용한다. 시드 포인트 간 형성된 삼각형 면적과 사용자가 지정한 최대 면적을 비교하여 시드 포인트를 적절히 재배치함으로써 브러시들 간의 간격을 조절하였다.move to the current frame by adding Set the center of the displaced brushes as one seed point and apply the Delaney triangle. By comparing the area of the triangle formed between the seed points with the maximum area specified by the user, the spacing between the brushes was adjusted by properly relocating the seed points.

허쯔만(Hertzmann)은 프레인 간 브러시 스트로크의 시간적 일관성을 유지하기 위해 페인트 오버(Paint-over) 방법과 광류 방법을 사용하였다. 페인트 오버 방법은 페인트 온 글라스 방법과 유사한 방법으로 이전 프레임의 결과 영상을 현재 프레임의 초기 캔버스로 설정하는 방법이다. 비록 페인트 오버 방법이 시간적 일관성을 향상시키기는 하지만 비디오 프레임의 정적인 영역이 브러시들이 덧칠된 이전 프레임의 대응되는 영역과 차이가 날 때 플릭커링(flickering) 현상이 발생한다. 이런 현상은 비디오 노이즈 때문에 발생하게 되는데 허쯔만은 디퍼런스 마스킹(Difference masking)을 이용하여 플릭커링 현상을 줄였다. 또한 모션 벡터에 의해서 현재 프레임으로 옮겨지는 브러시들을 와핑(warping)함으로써 플릭커링 현상을 줄였다.Hertzmann used the paint-over method and optical flow method to maintain the temporal consistency of brush strokes between planes. The paint-over method is a method similar to the paint-on-glass method, and sets the result image of the previous frame as the initial canvas of the current frame. Although the paint-over method improves temporal consistency, flickering occurs when the static area of a video frame is different from the corresponding area of the previous frame overlaid with brushes. This phenomenon is caused by video noise, and Herzmann reduced the flickering phenomenon by using difference masking. Also, the flickering phenomenon is reduced by warping the brushes that are moved to the current frame by the motion vector.

헤이즈(Hays)는 프레임 간 추정된 모션 벡터를 이용하여 이전 프레임 캔버스에서 현재 프레임 캔버스로 모든 브러시들을 옮길 경우 캔버스 상에 홀이 발생하거나 브러시들의 특징이 일부 사라지는 현상이 발생하여 프레임 간 시간적 일관성을 유지할 수 없다고 언급하고 있다. 이 방법은 이런 홀을 채우기 위해 캔버스 상에 새로운 브러시들을 추가하고 재정의한다. 또한 새로 추가되는 브러시들과 기존에 존재하는 브러시들 간의 특징의 불일치로 인하여 플릭커링 현상이 발생하게 되는데 헤이즈는 브러시의 색상에 불투명도(opacity)를 10%씩 줄여나가는 방법으로 이 문제점을 해결하였다. 그러나 이 방법은 불투명도에 너무 의존적이기 때문에 프레임 간 브러시들이 덧칠된다는 느낌이 아니라 단순 이동한다는 느낌을 주고 있다. 이런 현상은 실제 페인트 온 글라스 애니메이션에서는 볼 수 없는 현상이며 매우 인위적이라 할 수 있다.Hays uses motion vectors estimated between frames to maintain temporal consistency between frames by moving all brushes from the previous frame canvas to the current frame canvas. It is mentioned that it cannot. This method adds and redefines new brushes on the canvas to fill these holes. In addition, the flickering phenomenon occurs due to the inconsistency of characteristics between newly added brushes and existing brushes. Haze solved this problem by reducing the opacity of the brush color by 10%. However, since this method relies too much on opacity, it gives the impression that the brushes between frames are simply moved, not painted over. This phenomenon cannot be seen in actual paint-on-glass animation, and it can be said that it is very artificial.

본 발명이 이루고자 하는 기술적 과제는, 연속되는 입력 영상을 이용하여 프레임 간 브러시 스트로크의 구조적·시간적 일관성을 유지하면서 손으로 그린 듯한 회화적 느낌을 표현할 수 있고, 프레임 간 브러시 스트로크들이 덧칠되는 효과와 플릭커링 현상을 줄일 수 있는애니메이션의 회화적 표현 장치를 제공하는 데 있다.The technical problem to be achieved by the present invention is that it is possible to express a pictorial feeling as if hand-drawn while maintaining the structural and temporal consistency of brush strokes between frames using continuous input images, and the effect of overlapping brush strokes between frames and flicker It is to provide a pictorial expression device for animation that can reduce the ring phenomenon.

본 발명이 이루고자 하는 다른 기술적 과제는, 연속되는 입력 영상을 이용하여 프레임 간 브러시 스트로크의 구조적·시간적 일관성을 유지하면서 손으로 그린 듯한 회화적 느낌을 표현할 수 있고, 프레임 간 브러시 스트로크들이 덧칠되는 효과와 플릭커링 현상을 줄일 수 있는 회화적 애니메이션 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공하는 데 있다.Another technical object of the present invention is to be able to express a hand-drawn pictorial feeling while maintaining the structural and temporal consistency of brush strokes between frames using continuous input images, An object of the present invention is to provide a computer-readable recording medium in which a program for executing a pictorial animation method capable of reducing the flickering phenomenon is recorded on a computer.

상기의 기술적 과제를 달성하기 위한, 본 발명에 따른 애니메이션의 회화적 표현 장치는, 복수개의 영상 프레임 중에서 시간적으로 앞서는 제1영상 프레임을 구성하는 픽셀들 중에서 상기 제1영상 프레임에 이어지는 제2영상 프레임상에서의 위치가 이동된 픽셀들의 위치이동정도를 기초로 상기 제2영상 프레임에 대응하는 움직임 벡터를 산출하는 움직임 벡터 산출부; 상기 제1영상 프레임에서 에지를 검출하여 에지 영상을 생성하는 에지 영상 생성부; 상기 에지 영상을 구성하는 각각의 제1픽셀로부터 상기 제1픽셀의 좌표에 상기 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제1움직임 맵을 생성하는 제1움직임 맵 생성부; 상기 제1영상 프레임을 구성하는 픽셀들 중에서 상기 제1픽셀을 제외한 위치가 이동된 각각의 제2픽셀로부터 상기 제2픽셀의 좌표에 상기 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제2움직임 맵을 생성하는 제2움직임 맵 생성부; 및 상기 제1움직임 맵 및 상기 제2움직임 맵을 기초로 상기 제1영상 프레임에 대응하는 제1렌더링 영상에 대해 덧칠을 수행하여 상기 제2 영상 프레임에 대응하는 제2렌더링 영상을 생성하는 렌더링 영상 생성부;를 구비한다.In order to achieve the above technical object, an apparatus for pictorial expression of animation according to the present invention provides a second image frame following the first image frame among pixels constituting a temporally preceding first image frame among a plurality of image frames. a motion vector calculator for calculating a motion vector corresponding to the second image frame based on the degree of positional movement of pixels whose positions have been moved on the image; an edge image generator configured to generate an edge image by detecting an edge in the first image frame; a first motion map generator configured to generate a first motion map by connecting each first pixel constituting the edge image to a point obtained by adding the motion vector to the coordinates of the first pixel; A second motion map by connecting each second pixel whose position is moved except for the first pixel among pixels constituting the first image frame to a point obtained by adding the motion vector to the coordinates of the second pixel. a second motion map generator to generate and performing overpainting on the first rendered image corresponding to the first image frame based on the first motion map and the second motion map to generate a second rendered image corresponding to the second image frame. generating unit;

상기의 다른 기술적 과제를 달성하기 위한, 본 발명에 따른 회화적 애니메이션 방법은, 복수개의 영상 프레임중에서 시간적으로 앞서는 제1영상 프레임을 구성하는 픽셀들 중에서 상기 제1영상 프레임에 이어지는 제2영상 프레임 상에서의 위치가 이동된 픽셀들의 위치이동정도를 기초로 상기 제2영상 프레임에 대응하는 움직임 벡터를 산출하는 움직임 벡터 산출 단계; 상기 제1영상 프레임에서 에지를 검출하여 에지 영상을 생성하는 에지 영상 생성 단계; 상기 에지 영상을 구성하는 각각의 제1픽셀로부터 상기 제1픽셀의 좌표에 상기 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제1움직임 맵을 생성하는 제1움직임 맵 생성 단계; 상기 제1영상 프레임을 구성하는 픽셀들 중에서 상기 제1픽셀을 제외한 위치가 이동된 각각의 제2픽셀로부터 상기 제2픽셀의 좌표에 상기 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제2움직임 맵을 생성하는 제2움직임 맵 생성 단계; 및 상기 제1움직임 맵 및 상기 제2움직임 맵을 기초로 상기 제1영상 프레임에 대응하는 제1렌더링 영상에 대해 덧칠을 수행하여 상기 제2영상 프레임에 대응하는 제2렌더링 영상을 생성하는 렌더링 영상 생성 단계;를 갖는다.In order to achieve the above other technical object, the pictorial animation method according to the present invention provides a second image frame following the first image frame among pixels constituting a temporally preceding first image frame among a plurality of image frames. a motion vector calculating step of calculating a motion vector corresponding to the second image frame based on the degree of position movement of pixels whose positions have been moved; an edge image generating step of generating an edge image by detecting an edge in the first image frame; a first motion map generating step of generating a first motion map by connecting each first pixel constituting the edge image to a point obtained by adding the motion vector to the coordinates of the first pixel; A second motion map by connecting each second pixel whose position is moved except for the first pixel among pixels constituting the first image frame to a point obtained by adding the motion vector to the coordinates of the second pixel. a second motion map generation step of generating and performing overpainting on the first rendered image corresponding to the first image frame based on the first motion map and the second motion map to generate a second rendered image corresponding to the second image frame. generation step;

본 발명에 따른 애니메이션의 회화적 표현 장치에 의하면, 렌더링 영상이 생성된 이전 영상 프레임의 에지에 해당하는 픽셀에 연속되는 영상 프레임들로부터 얻어진 움직임 벡터에 의해 파악된 에지들의 이동 정보를 포함하는 움직임 맵을 이용하여 현재 영상 프레임에 대응하는 브러시의 덧칠영역을 결정함으로써, 영상 프레임 사이의 브러시 스트로크의 시간적·구조적 일관성을 유지할 수 있다. 또한 프레임 사이의 움직임 정보를 기초로 이전 영상 프레임에 대응하는 렌더링 영상의 일부 영역에만 덧칠을 수행함으로써, 렌더링에 소요되는 시간을 단축할 수 있으며, 프레임 간 브러시 스트로크들이 덧칠되는 효과와 플릭커링 현상을 줄일 수 있다.According to the pictorial expression apparatus for animation according to the present invention, a motion map including movement information of edges identified by motion vectors obtained from image frames successive to pixels corresponding to edges of a previous image frame in which a rendered image is generated The temporal and structural consistency of brush strokes between image frames can be maintained by determining the brush stroke area corresponding to the current image frame using . In addition, the time required for rendering can be shortened by overpainting only a portion of the rendered image corresponding to the previous image frame based on the motion information between frames, and the effect of overlapping brush strokes between frames and the flickering phenomenon can be reduced. can be reduced

도 1은 본 발명에 따른 애니메이션의 회화적 표현 장치에 대한 바람직한 실시예의 구성을 도시한 블록도,
도 2a 내지 도 2c는 각각 소스 영상, 소벨 에지 영상 및 캐니 에지 영상을 도시한 도면,
도 3은 에지 영상 생성부(120)에 의한 방향 에지 영상의 생성과정을 도시한 도면,
도 4a 내지 도 4f는 각각 이전 영상 프레임, 현재 영상 프레임, 이전 영상 프레임의 에지 영상, 에지 영상에서 움직임이 발생한 에지만을 추출하여 얻어진 영상, 에지 영상에서 움직임이 발생한 에지에 움직임 벡터를 더하여 얻어진 영상 및 제1움직임 맵을 도시한 도면,
도 5a 내지 도 5f는 각각 이전 영상 프레임, 현재 영상 프레임, 이전 영상 프레임에서 움직임이 발생한 에지 이외의 픽셀로 이루어진 영상, 이전 영상 프레임에서 움직임이 발생한 에지 이외의 픽셀로 이루어진 영상 및 제2 움직임 맵을 도시한 도면,
도 6a 내지 도 6e는 각각 이전 영상 프레임, 현재 영상 프레임, 이전 영상 프레임의 캐니 에지 영상, 제1움직임 맵 및 제2움직임 맵을 도시한 도면,
도 7a 내지 도 7e는 각각 이전 영상 프레임, 현재 영상 프레임, 이전 영상 프레임의 방향 에지 영상, 제1움직임 맵 및 제2움직임 맵을 도시한 도면,
도 8a는 렌더링 영상 생성부(150)에 대한 제1실시예의 구성을 도시한 도면,
도 8b는 덧칠방향 결정부(810)의 상세한 구성을 도시한 도면,
도 8c는 렌더링 영상 생성부(150)에 대한 제2실시예의 구성을 도시한 도면,
도 9a 및 도 9b는 각각 3507개의 시드 값을 랜덤하게 발생하여 캔버스에 배치한 영상 및 3507개의 시드 값에 대응하는 브러시를 덧칠하여 얻어진 결과 영상을 도시한 도면,
도 10은 브러시 스트로크들이 캔버스 위에 덧칠되는 단계들을 도시한 도면,
도 11a 및 도 11b는 각각 직선 및 곡선 브러시 스트로크의 생성방법을 도시한 도면,
도 12a 및 도 12b는 각각 솔리드 브러시 스트로크와 브러시 텍스쳐의 예를 도시한 도면,
도 13a 내지 도 13d는 각각 이전 영상 프레임, 현재 영상 프레임, 제1움직임 맵, 그리고, 브러시 텍스쳐를 덧칠하여 얻어진 결과 영상을 도시한 도면,
도 14a 내지 도 14d는 각각 이전 영상 프레임, 현재 영상 프레임, 제2움직임 맵, 그리고, 브러시 텍스쳐를 덧칠하여 얻어진 결과 영상을 도시한 도면,
도 15a 내지 도 15e는 각각 이전 영상 프레임, 현재 영상 프레임, 제1움직임 맵, 솔리드 브러시 스트로크를 덧칠하여 얻어진 제1결과 영상(제1임계값 TH1: 05), 그리고, 솔리드 브러시 스트로크를 덧칠하여 얻어진 제1결과 영상(제1임계값 TH1: 085)을 도시한 도면,
도 16a 내지 도 16e는 각각 이전 영상 프레임, 현재 영상 프레임, 제2움직임 맵, 솔리드 브러시를 덧칠하여 얻어진 제1결과 영상(제3임계값 TH3: 082), 그리고, 솔리드 브러시 스트로크를 덧칠하여 얻어진 제1결과 영상(제3임계값 TH3: 085)을 도시한 도면,
도 17은 본 발명에 따른 회화적 애니메이션 방법에 대한 바람직한 실시예의 수행과정을 도시한 흐름도,
도 18은 렌더링 영상 생성부(150)가 브러시 텍스쳐를 이용하여 제2렌더링 영상을 생성할 때 덧칠방향, 덧칠지점 및 스트로크 패턴을 결정하는 과정을 도시한 도면,
도 19a 및 도 19b는 렌더링 영상 생성부(150)가 브러시 텍스쳐를 이용하여 제2렌더링 영상을 생성하는 과정의 일 예를 도시한 도면, 그리고,
도 20은 렌더링 영상 생성부(150)가 솔리드 브러시 스트로크를 이용하여 제2렌더링 영상을 생성하는 과정의 일 예를 도시한 도면이다.
1 is a block diagram showing the configuration of a preferred embodiment of an apparatus for pictorial expression of animation according to the present invention;
2A to 2C are views showing a source image, a Sobel edge image, and a Canny edge image, respectively;
3 is a diagram illustrating a process of generating a directional edge image by the edge image generating unit 120;
4A to 4F are respectively a previous image frame, a current image frame, an edge image of a previous image frame, an image obtained by extracting only an edge in which motion occurs in an edge image, an image obtained by adding a motion vector to an edge in which motion occurs in the edge image, and A drawing showing the first motion map,
5A to 5F are a previous image frame, a current image frame, an image composed of pixels other than the edge where motion occurred in the previous image frame, an image composed of pixels other than the edge where the motion occurred in the previous image frame, and a second motion map, respectively. the drawing shown,
6A to 6E are views showing a previous image frame, a current image frame, a Canny edge image of a previous image frame, a first motion map, and a second motion map, respectively;
7A to 7E are views showing a previous image frame, a current image frame, a directional edge image of a previous image frame, a first motion map, and a second motion map, respectively;
8A is a diagram showing the configuration of the first embodiment for the rendering image generating unit 150;
8B is a view showing a detailed configuration of the overcoat direction determining unit 810;
8C is a diagram showing the configuration of the second embodiment for the rendering image generating unit 150;
9A and 9B are diagrams showing images obtained by randomly generating 3507 seed values, respectively, arranged on a canvas, and a resultant image obtained by overlaying brushes corresponding to 3507 seed values;
Fig. 10 shows the steps in which brush strokes are painted over a canvas;
11A and 11B are diagrams showing a method of generating straight and curved brush strokes, respectively;
12A and 12B are diagrams showing examples of solid brush strokes and brush textures, respectively;
13A to 13D are views showing result images obtained by overpainting a previous image frame, a current image frame, a first motion map, and a brush texture, respectively;
14A to 14D are diagrams illustrating a result image obtained by overpainting a previous image frame, a current image frame, a second motion map, and a brush texture, respectively;
15A to 15E are respectively a previous image frame, a current image frame, a first motion map, a first result image obtained by overlaying a solid brush stroke (first threshold value TH1: 05), and a solid brush stroke obtained by overlaying the solid brush stroke, respectively. A drawing showing the first result image (first threshold TH1: 085);
16A to 16E are respectively a previous image frame, a current image frame, a second motion map, a first result image obtained by overpainting a solid brush (third threshold TH3: 082), and a third image obtained by overpainting a solid brush stroke, respectively. 1 A drawing showing the result image (third threshold TH3: 085);
17 is a flowchart showing a process of performing a preferred embodiment of the pictorial animation method according to the present invention;
18 is a diagram illustrating a process in which the rendering image generating unit 150 determines an overcoat direction, an overpainting point, and a stroke pattern when generating a second rendered image using a brush texture;
19A and 19B are diagrams illustrating an example of a process in which the rendering image generating unit 150 generates a second rendered image by using a brush texture;
20 is a diagram illustrating an example of a process in which the rendering image generator 150 generates a second rendered image by using a solid brush stroke.

이하에서 첨부된 도면들을 참조하여 본 발명에 따른 애니메이션의 회화적 표현 장치의 바람직한 실시예에 대해 상세하게 설명한다.Hereinafter, a preferred embodiment of the apparatus for pictorial expression of animation according to the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에 따른 애니메이션의 회화적 표현 장치에 대한 바람직한 실시예의 구성을 도시한 블록도이다.1 is a block diagram showing the configuration of a preferred embodiment of an apparatus for pictorial expression of animation according to the present invention.

도 1을 참조하면, 본 발명에 따른 애니메이션의 회화적 표현 장치는 움직임 벡터 산출부(110), 에지 영상 생성부(120), 제1움직임 맵 생성부(130), 제2움직임 맵 생성부(140) 및 렌더링 영상 생성부(150)를 구비한다.Referring to FIG. 1 , the apparatus for pictorial expression of animation according to the present invention includes a motion vector calculation unit 110 , an edge image generation unit 120 , a first motion map generation unit 130 , and a second motion map generation unit ( 140 ) and a rendered image generating unit 150 .

움직임 벡터 산출부(110)는 복수개의 영상 프레임 중에서 시간적으로 앞서는 이전 영상 프레임을 구성하는 픽셀들 중에서 이전 영상 프레임에 이어지는 현재 영상 프레임 상에서의 위치가 이동된 픽셀들의 위치이동정도를 기초로 현재 영상 프레임에 대응하는 움직임 벡터를 산출한다. 이때 이전 영상 프레임과 현재 영상 프레임은 동영상을 구성하는 영상 프레임으로서, 서로 인접하도록 선택되거나 사이에 하나 또는 복수개의 다른 영상 프레임이 위치하도록 선택된다.The motion vector calculator 110 is configured to calculate the current image frame based on the degree of position movement of pixels whose positions on the current image frame following the previous image frame are moved among the pixels constituting the temporally preceding image frame among the plurality of image frames. A motion vector corresponding to is calculated. In this case, the previous image frame and the current image frame are image frames constituting a moving picture, and are selected to be adjacent to each other, or one or a plurality of other image frames are positioned between them.

영상 프레임 간의 움직임(motion)을 평가하는 방법에는 광류 방법과 블록 매칭 방법이 있다. 광류 방법은 명도유형을 서서히 변화시킴으로써 발생하는 영상에서의 명백한 움직임의 속도 분포를 파악하는 방법이다. 블록 매칭 방법은 영상을 일정한 크기의 블록으로 분할하고 블록 내의 모든 픽셀을 하나의 움직임 벡터로 표현하는 방법으로, 움직임 벡터를 찾기 위해 이전 프레임의 블록들을 한 픽셀씩 이동하면서 현재의 블록과 가장 유사한 블록을 찾는 것이며 매칭 기준으로는 평균 절대 오차(mean absulute error : MAE)와 평균 제곱 오차(mean square error : MSE) 방법을 이용한다. 이하의 설명에서는 움직임 벡터 데이터의 오차를 줄일 수 있는 블록 매칭 방법을 적용한 실시예에 대해 언급하나, 이외에 광류 방법을 포함하여 영상 프레임 간의 움직임을 평가할 수 있는 다른 방법의 사용도 가능하다.Methods for evaluating motion between image frames include an optical flow method and a block matching method. The optical flow method is a method to grasp the velocity distribution of the apparent motion in the image that is generated by gradually changing the brightness type. The block matching method divides the image into blocks of a certain size and expresses all pixels within the block as a single motion vector. In order to find the motion vector, the blocks of the previous frame are moved pixel by pixel to find the block most similar to the current block , and the mean absolute error (MAE) and mean square error (MSE) methods are used as matching criteria. In the following description, an embodiment in which a block matching method capable of reducing an error of motion vector data is applied will be described, but other methods for evaluating motion between image frames including an optical flow method may also be used.

에지 영상 생성부(120)는 이전 영상 프레임에서 에지를 검출하여 에지 영상을 생성한다. 이전 영상 프레임에 대한 에지 영상은 에지 필터를 이용하는 방법과 방향 에지를 이용하는 방법 등에 의해 얻어질 수 있다. 에지 필터를 이용하는 경우에, 에지 영상 생성부(120)는 소스 영상에 에지 마스크를 적용하여 에지 영상을 생성한다. 이때 에지 영상 생성부(120)는 먼저 가우시안(Gaussian) 마스크를 이용하여 소스 영상으로부터 잡음을 제거한 후 소벨 마스크 또는 캐니 마스크와 같은 에지 검출 마스크를 수행하여 에지 영상을 생성한다. 이러한 두 번의 과정 중 첫 번째 과정에서 잡음이 제거되며, 두 번째 과정에서 잡음이 제거된 영상에서 에지가 검출된다. 소벨 에지 영상뿐만 아니라 캐니 에지 영상은 객체들의 외부 에지만 잘 표현될 뿐 내부 에지는 잘 표현되지 않는다. 도 2a 내지 도 2c에는 각각 소스 영상, 소벨 에지 영상 및 캐니 에지 영상이 도시되어 있다. 소벨 에지 영상은 임계치(Threshold)의 값을 100으로 설정하여 얻은 것이며, 캐니 에지 영상은 낮은 임계치(Low Threshold)를 1로 설정하고 높은 임계치(High Threshold)를 128로 설정하여 얻어진 것이다.The edge image generator 120 generates an edge image by detecting an edge in a previous image frame. The edge image for the previous image frame may be obtained by a method using an edge filter, a method using a directional edge, and the like. When an edge filter is used, the edge image generator 120 generates an edge image by applying an edge mask to the source image. In this case, the edge image generator 120 first removes noise from the source image using a Gaussian mask, and then performs an edge detection mask such as a Sobel mask or a Canny mask to generate an edge image. Among these two processes, in the first process, noise is removed, and in the second process, an edge is detected in the image from which the noise is removed. In the Canny Edge image as well as the Sobel edge image, only the outer edges of objects are well expressed, but the inner edges are not well expressed. 2A to 2C show a source image, a Sobel edge image, and a Canny edge image, respectively. The Sobel edge image is obtained by setting the threshold value to 100, and the Canny edge image is obtained by setting the Low Threshold to 1 and the High Threshold to 128.

방향 에지는 영상에서 명암의 결을 따라 형성되는 라인을 의미한다. 명암의 결은 소벨 에지 필터 또는 캐니 에지 필터 같은 일반적인 에지 필터를 이용하여 나타나는 에지와는 다르다. 왜냐하면 명암의 결은 두 명암 값의 경계면을 의미하는 반면에 일반적인 에지는 주변 픽셀들 간의 명도 또는 색상 값의 차이가 사용자가 지정한 임계치보다 큰 픽셀을 의미하기 때문이다. 다시 말해서, 일반적인 에지 영상은 방향 에지를 의미하는 명암의 결안에 포함된다고 할 수 있다. 또한 두 명암 값의 경계면을 표현하기 때문에 객체들의 외부 에지뿐만 아니라 내부에지도 잘 표현될 수 있다. 이러한 방향 에지는 캔버스 위에 덧칠되어지는 브러시 스트로크의 방향을 결정하기 위한 기준 에지가 된다. 방향 에지 영상을 생성하기 위해, 에지 영상 생성부(120)는 소스 영상의 연속적인 명암값을 사용자가 지정하는 N개(예를 들면, 4, 8 등)의 이산 명암도 중에서 지정함으로써 양자화한다. 다음으로 에지 영상 생성부(120)는 양자화된 영상을 이용하여 명암 값의 경계면을 에지로 설정함으로써 방향 에지 영상을 생성한다. 도 3에는 에지 영상 생성부(120)에 의한 방향 에지 영상의 생성과정이 도시되어 있다.The direction edge refers to a line formed along the texture of light and dark in an image. The contrast texture is different from the edges appearing using a typical edge filter such as a Sobel edge filter or a Canny edge filter. This is because the contrast texture means the boundary between two contrast values, whereas a general edge means a pixel whose difference in brightness or color between neighboring pixels is greater than a user-specified threshold. In other words, it can be said that the general edge image is included in the resolution of the contrast, which means the directional edge. In addition, since the boundary between two contrast values is expressed, not only the outer edges of objects but also the inner edges can be expressed well. This directional edge becomes the reference edge for determining the direction of the brush stroke to be overpainted on the canvas. In order to generate the directional edge image, the edge image generator 120 quantizes the continuous intensity values of the source image by designating them from among N (eg, 4, 8, etc.) discrete intensity values designated by the user. Next, the edge image generator 120 generates a directional edge image by setting the boundary surface of the contrast value as an edge using the quantized image. 3 illustrates a process of generating a directional edge image by the edge image generator 120 .

에지 영상을 생성함에 있어서 방향 에지를 이용하는 방법은 일반적인 에지 마스크를 사용하는 방법과 비교할 때 여러 장점이 있다. 먼저, 동영상에서 캐니 에지를 사용할 경우 사용자가 모든 프레임에 적당한 임계치를 설정한 다는 것은 매우 힘들다. 또한 모든 프레임에 같은 임계치를 적용할 경우 이전 프레임에 표현되었던 에지가 현재 프레임에 나타나지 않을 수도 있다. 또한 방향 에지는 각 프레임의 명암 값의 경계면을 이용하기 때문에 명암 값이 변한다 하더라도 프레임 간 에지는 유지된다는 장점이 있다. 또한 그라데이션(Gradation) 현상이 나타나는 영역에서도 두 명암 값의 경계면을 이용하기 때문에 에지를 표현할 수 있다.A method using a directional edge in generating an edge image has several advantages compared to a method using a general edge mask. First, it is very difficult for a user to set an appropriate threshold for every frame when using Canny Edge in a video. Also, when the same threshold is applied to all frames, the edge expressed in the previous frame may not appear in the current frame. Also, since the directional edge uses the boundary between the contrast values of each frame, the edge between frames is maintained even if the contrast value is changed. In addition, an edge can be expressed even in an area where a gradation phenomenon occurs because the boundary between two contrast values is used.

동영상을 회화적 렌더링으로 변환하기 위해서는 프레임 간 브러시 스트로크의 시간적 일관성을 유지하는 것이 중요하다. 본 발명에서는 이전 영상 프레임의 에지 영상과 이전 프레임과 현재 프레임 사이에 계산된 움직임 벡터 데이터를 이용하여 강한 움직임 맵(이하, '제1움직임 맵'이라 함)과 약한 움직임 맵(이하, '제2움직임 맵'이라 함)의 두 가지 형태의 움직임 맵을 생성한다.It is important to maintain temporal consistency of brush strokes between frames in order to transform a video into a pictorial rendering. In the present invention, a strong motion map (hereinafter referred to as a 'first motion map') and a weak motion map (hereinafter referred to as a 'second motion map') using the edge image of the previous image frame and motion vector data calculated between the previous frame and the current frame Two types of motion maps are generated: a 'motion map').

제1움직임 맵은 이전 프레임의 에지에 해당되는 픽셀들이 움직임 벡터에 의해서 현재 프레임으로 이동되는 픽셀들을 말한다. 계산된 움직임 벡터를 이용하여 이전 프레임의 에지에 해당되는 픽셀에 움직임 벡터를 더함으로써 현재 프레임의 에지의 픽셀을 계산할 수 있다. 제1움직임 맵은 픽셀에서 픽셀까지의 영역을 말한다. 다시 말해서, 제1움직임 맵은 프레임 간 전경이 배경으로 또는 배경이 전경으로 변하는 영역을 의미한다. 또한 제2움직임 맵은 프레임 간 모션은 발생하였으나 에지 이외의 영역을 말한다. 이 맵은 제1움직임 맵과는 달리 각 프레임에서 에지에 해당되는 픽셀들을 포함하고 있지 않기 때문에 주변 픽셀들 간의 색상 차이가 적은 부분이기도 하다.The first motion map refers to pixels in which pixels corresponding to edges of a previous frame are moved to a current frame by a motion vector. The pixel of the edge of the current frame may be calculated by adding the motion vector to the pixel corresponding to the edge of the previous frame using the calculated motion vector. The first motion map refers to an area from pixel to pixel. In other words, the first motion map refers to a region in which the foreground between frames is changed to the background or the background is changed to the foreground. In addition, the second motion map refers to an area other than the edge although motion between frames has occurred. Unlike the first motion map, since this map does not include pixels corresponding to edges in each frame, a color difference between neighboring pixels is also small.

다시 말해서, 제2움직임 맵은 프레임 간 전경은 전경으로 또는 배경은 배경으로 변하는 영역을 말한다. 본 발명에서는 이러한 두 가지 움직임 맵을 이용하여 다음 프레임에서 덧칠될 브러시 스트로크의 위치를 정확하게 파악함으로써 프레임 간 브러시 스트로크의 시간적 일관성을 유지 및 손으로 그린 듯 한 회화적 느낌을 표현할 수 있다.In other words, the second motion map refers to a region in which the foreground is changed to the foreground or the background is changed to the background between frames. In the present invention, by accurately grasping the location of the brush stroke to be painted in the next frame using these two motion maps, the temporal consistency of the brush strokes between frames can be maintained and a hand-drawn pictorial feeling can be expressed.

제1움직임 맵 생성부(130)는 이전 영상 프레임의 에지 영상을 구성하는 각각의 제1픽셀로부터 제1픽셀의 좌표에 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제1움직임 맵 Motion_Mapstr을 생성한다. 이러한 과정을 수학식으로 표현하면 다음과 같다. 이때 움직임 벡터의 값은 (10, 10)이상인 벡터만 사용하는 것이 바람직하다.The first motion map generator 130 generates a first motion map Motion_Mapstr by connecting each first pixel constituting the edge image of the previous image frame to a point obtained by adding a motion vector to the coordinates of the first pixel. . This process can be expressed in mathematical terms as follows. In this case, it is preferable to use only vectors with a value of (10, 10) or more of the motion vector.

수학식 1Equation 1

Figure pat00001
Figure pat00001

수학식 2Equation 2

Figure pat00002
Figure pat00002

수학식 1 및 2에서, A(x,y)는 이전 영상 프레임의 에지 영상을 구성하는 픽셀 중에서 움직임이 발생한 픽셀이고, MV(x,y)(Δu,Δv)는 이전 영상 프레임과 현재 영상 프레임 간 움직임 벡터이며, DL(A(x,y), B(x,y))는 두 점 A(x,y)와 B(x,y) 사이에 선을 그리는 함수이다.In Equations 1 and 2, A(x,y) is a pixel in which motion occurs among pixels constituting the edge image of the previous image frame, and MV(x,y)(Δu,Δv) is the previous image frame and the current image frame It is an inter-motion vector, and DL(A(x,y), B(x,y)) is a function that draws a line between two points A(x,y) and B(x,y).

도 4a 내지 도 4f에는 각각 이전 영상 프레임, 현재 영상 프레임, 이전 영상 프레임의 에지 영상, 에지 영상에서 움직임이 발생한 에지만을 추출하여 얻어진 영상, 에지 영상에서 움직임이 발생한 에지에 움직임 벡터를 더하여 얻어진 영상 및 제1움직임 맵이 도시되어 있다.4A to 4F, the previous image frame, the current image frame, the edge image of the previous image frame, the image obtained by extracting only the edge where motion occurs in the edge image, the image obtained by adding a motion vector to the edge where the motion occurs in the edge image, and A first motion map is shown.

제2움직임 맵 생성부(140)는 제1영상 프레임을 구성하는 픽셀들 중에서 에지 영상을 구성하는 제1픽셀을 제외한 위치가 이동된 각각의 제2픽셀로부터 제2픽셀의 좌표에 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제2움직임 맵을 생성한다. 이러한 과정을 수학식으로 표현하면 다음과 같다. 이때 제2움직임 맵은 주변 픽셀들 간의 색상 차이가 적은 부분들이기 때문에 제1움직임 맵과 달리 움직임 벡터의 값은 (20, 20)이상인 벡터만 사용하는 것이 바람직하다.The second motion map generator 140 adds a motion vector to the coordinates of the second pixel from each of the second pixels whose positions are moved except for the first pixel constituting the edge image among pixels constituting the first image frame. The second motion map is created by connecting the points obtained by This process can be expressed in mathematical terms as follows. In this case, since the second motion map is portions having a small color difference between neighboring pixels, it is preferable to use only vectors having a value of (20, 20) or more of the motion vector, unlike the first motion map.

수학식 3Equation 3

Figure pat00003
Figure pat00003

수학식 3에서, C(x,y)는 이전 영상 프레임을 구성하는 픽셀 중에서 에지를 제외한 움직임이 발생한 픽셀이고, MV(x,y)(Δu,Δv)는 이전 영상 프레임과 현재 영상 프레임 간 움직임 벡터이며, DL(C(x,y), D(x,y))는 두 점 C(x,y)와 D(x,y) 사이에 선을 그리는 함수이다.In Equation 3, C(x,y) is a pixel in which motion except for an edge has occurred among pixels constituting the previous image frame, and MV(x,y)(Δu,Δv) is a motion between the previous image frame and the current image frame. As a vector, DL(C(x,y), D(x,y)) is a function that draws a line between two points C(x,y) and D(x,y).

도 5a 내지 도 5f에는 각각 이전 영상 프레임, 현재 영상 프레임, 이전 영상 프레임에서 움직임이 발생한 에지 이외의 픽셀로 이루어진 영상, 이전 영상 프레임에서 움직임이 발생한 에지 이외의 픽셀로 이루어진 영상 및 제2움직임 맵이 도시되어 있다.5A to 5F, the previous image frame, the current image frame, the image composed of pixels other than the edge where the motion occurred in the previous image frame, the image composed of pixels other than the edge where the motion occurred in the previous image frame, and the second motion map are respectively shown. is shown.

상술한 바와 같은 제1 및 제2움직임 맵은 사용되는 에지 영상의 종류에 따라 다소 차이가 있다. 먼저 캐니 에지영상은 객체들의 외부 에지만 포함하고 있으므로, 이를 기초로 만들어진 움직임 맵은 브러시 스트로크를 덧칠할 때 객체들의 내부에 덧칠이 수행되지 않게 되어 프레임 간 플릭커링 현상이 나타날 가능성이 존재한다. 도 6a내지 도 6e에는 각각 이전 영상 프레임, 현재 영상 프레임, 이전 영상 프레임의 캐니 에지 영상, 제1움직임 맵 및 제2움직임 맵이 도시되어 있다. 다음으로 방향 에지 영상은 객체들의 외부 및 내부 에지를 모두 포함한다.The first and second motion maps as described above are slightly different depending on the type of edge image used. First of all, since the Canny edge image includes only the outer edges of objects, the motion map created based on this does not perform over-painting on the inside of objects when brush strokes are overlaid, so there is a possibility of flickering between frames. 6A to 6E show a previous image frame, a current image frame, a Canny edge image of the previous image frame, a first motion map, and a second motion map, respectively. Next, the directional edge image includes both the outer and inner edges of the objects.

따라서 보다 정확한 움직임 맵을 생성할 수 있으며, 브러시 스트로크를 덧칠할 때도 캐니 에지 영상을 이용하여 만들어진 움직임 맵보다는 좀 더 정확하게 덧칠할 수 있다. 도 7a 내지 도 7e에는 각각 이전 영상 프레임, 현재 영상 프레임, 이전 영상 프레임의 방향 에지 영상, 제1움직임 맵 및 제2움직임 맵이 도시되어 있다.Therefore, a more accurate motion map can be created, and when brush strokes are overlaid, they can be painted more accurately than a motion map created using canny edge images. 7A to 7E, a previous image frame, a current image frame, a directional edge image of the previous image frame, a first motion map, and a second motion map are respectively shown.

렌더링 영상 생성부(150)는 제1움직임 맵 및 제2움직임 맵을 기초로 이전 영상 프레임에 대응하는 제1렌더링 영상에 대해 덧칠을 수행하여 현재 영상 프레임에 대응하는 제2렌더링 영상을 생성한다. 이러한 렌더링 영상 생성부(150)는 브러시 스트로크의 종류, 색상 결정 방법, 렌더링 방법 등에 따라 다양한 구성을 가질 수 있다.The rendering image generator 150 generates a second rendered image corresponding to the current image frame by performing overpainting on the first rendered image corresponding to the previous image frame based on the first motion map and the second motion map. The rendering image generator 150 may have various configurations according to a type of brush stroke, a color determination method, a rendering method, and the like.

도 8a에는 렌더링 영상 생성부(150)에 대한 제1실시예의 구성이 도시되어 있다. 도 8a에 도시된 실시예는 브러시 스트로크 패턴이 곡선의 브러시 텍스쳐일 경우에 해당하는 렌더링 영상 생성부(150)의 예이다.FIG. 8A shows the configuration of the rendering image generator 150 according to the first embodiment. The embodiment illustrated in FIG. 8A is an example of the rendering image generating unit 150 corresponding to the case in which the brush stroke pattern is a curved brush texture.

도 8a를 참조하면, 렌더링 영상 생성부(150)는 덧칠방향 결정부(810), 덧칠지점 결정부(820), 스트로크 패턴 선택부(830) 및 렌더링부(840)를 구비한다.Referring to FIG. 8A , the rendering image generator 150 includes an overfill direction determiner 810 , an overfill point determiner 820 , a stroke pattern selector 830 , and a renderer 840 .

덧칠방향 결정부(810)는 에지 영상을 구성하는 각각의 픽셀들의 그라디언트 값을 기초로 이전 영상 프레임을 구성하는 각각의 픽셀들에 대한 덧칠방향을 결정한다. 이를 위해 덧칠방향 결정부(810)는 그라디언트 산출부(812), 강한 에지 선정부(814) 및 결정부(816)를 구비한다. 도 8b에는 덧칠방향 결정부(810)의 상세한 구성이 도시되어 있다. 그라디언트 산출부(812)는 다음의 수학식에 의해 이전 영상 프레임에서 검출된 에지 상의 픽셀들의 그라디언트 값을 산출한다.The overfill direction determiner 810 determines the overfill direction for each of the pixels constituting the previous image frame based on the gradient values of each of the pixels constituting the edge image. To this end, the overcoat direction determining unit 810 includes a gradient calculating unit 812 , a strong edge selecting unit 814 , and a determining unit 816 . 8B shows a detailed configuration of the overcoat direction determining unit 810 . The gradient calculator 812 calculates gradient values of pixels on edges detected in the previous image frame by the following equation.

수학식 4Equation 4

Figure pat00004
Figure pat00004

강한 에지 선정부(814)는 에지 상의 픽셀들의 그라디언트 값을 크기가 큰 픽셀들로부터 순차적으로 기준 픽셀을 선택하고, 선택된 기준 픽셀을 중심으로 소정의 제1영역(예를 들면, 기준 픽셀에 인접하는 픽셀을 포함하는 영역) 내에 존재하는 에지 상의 다른 픽셀들을 제거하여 강한 에지를 선정한다. 결정부(816)는 소정의 제2영역(예를 들면, 반경이 2픽셀인 원) 내에 존재하는 강한 에지들의 가중치와 그라디언트의 합을 기초로 산출한 이전 영상 프레임을 구성하는 각각의 픽셀들의 그라디언트 크기에 의해 이전 영상 프레임을 구성하는 각각의 픽셀들의 덧칠방향을 결정한다. 도 9a 내지 도 9e에는 각각 이전 영상 프레임, 캐니 에지 영상을 이용한 강한 에지 영상, 방향 에지 영상을 이용한 강한 에지 영상, 캐니 에지 영상을 이용한 강한 에지 영상에 의한 그라디언트 보간 영상 및 방향 에지 영상을 이용한 강한 에지 영상에 의한 그라디언트 보간 영상이 도시되어 있다.The strong edge selector 814 sequentially selects a reference pixel from pixels having large gradient values of pixels on the edge, and a predetermined first area (eg, adjacent to the reference pixel) with respect to the selected reference pixel. A strong edge is selected by removing other pixels on the edge that exist within the region including the pixel. The determiner 816 determines the gradient of each pixel constituting the previous image frame calculated based on the sum of the gradient and the weight of the strong edges existing in the predetermined second region (eg, a circle having a radius of 2 pixels). The overlapping direction of each pixel constituting the previous image frame is determined by the size. 9A to 9E, a gradient interpolation image using a previous image frame, a strong edge image using a Canny edge image, a strong edge image using a directional edge image, a strong edge image using a Canny edge image, and a strong edge using a directional edge image, respectively A gradient interpolation image by image is shown.

덧칠지점 결정부(820)는 이전 영상 프레임에 대응하는 제1렌더링 영상을 구성하는 픽셀 중에서 제1움직임 맵 및 제2움직임 맵에 대응하는 덧칠영역에 위치하는 제3픽셀들을 선택하고, 제3픽셀들 중에서 덧칠이 수행될 제4픽셀들을 선택한다. 이때 덧칠지점 결정부(820)는 브러시 스트로크의 위치를 랜덤하게 설정하거나, 영상의 모멘트를 이용하여 위치를 설정하거나, 캔버스 전체를 그리드로 나누고 그리드 하나당 하나의 브러시를 적용하거나, 영역 분할을 이용하여 분할된 하나의 영역을 하나의 브러시로 설정한다. 본 발명에서는 덧칠할 브러시 스트로크의 위치를 설정하는데 있어서 랜덤 또는 그리드 단위로 설정하는 방법을 사용하는 것이 바람직하다.The overpainting point determiner 820 selects third pixels located in the overpainting area corresponding to the first motion map and the second motion map from among pixels constituting the first rendered image corresponding to the previous image frame, and the third pixel Among them, fourth pixels to be overpainted are selected. In this case, the overpainting point determining unit 820 randomly sets the position of the brush stroke, sets the position using the moment of the image, divides the entire canvas into grids and applies one brush per grid, or uses region division to Set one divided area as one brush. In the present invention, in setting the position of the brush stroke to be overpainted, it is preferable to use a random or grid unit setting method.

랜덤으로 시드 값을 발생시켜 브러시 스트로크를 덧칠하는 경우에 시드 값은 브러시 스트로크의 중심 위치로 설정되며 캔버스 전역에 객체들의 특성에 맞게 골고루 퍼져있어야 한다. 그러나 랜덤으로 생성되는 브러시 스트로크의 위치는 객체들의 특징을 고려하지 않고 생성되는 값이기 때문에 디테일하게 회화적 느낌을 표현하려면 시드 값을 매우 많이 발생시켜야 하는 문제점이 있다. 도 9a 및 도 9b는 각각 3507개의 시드 값을 랜덤하게 발생하여 캔버스에 배치한 영상 및 3507개의 시드 값에 대응하는 브러시를 덧칠하여 얻어진 결과 영상을 도시한 도면이다.In case of overpainting brush strokes by generating a seed value at random, the seed value is set as the center position of the brush stroke and should be evenly spread across the canvas according to the characteristics of the objects. However, since the randomly generated brush stroke position is a value generated without considering the characteristics of the objects, there is a problem in that it is necessary to generate a very large number of seed values to express a detailed pictorial feeling. 9A and 9B are diagrams illustrating images obtained by randomly generating 3507 seed values and arranged on a canvas, and a resultant image obtained by overpainting with brushes corresponding to 3507 seed values.

이와 달리 캔버스를 격자로 분할하고, 각각의 격자에 한 개의 브러시 스트로크를 덧칠하는 방법이 적용될 수 있다. 이 방법은 캔버스를 4 ~ 6개 정도의 레이어로 나누고 각 레이어별로 브러시의 폭에 따라 격자로 나눈다. 이렇게 나누어진 격자는 캔버스와 소스 영상 간의 색상 값 비교를 통해 하나의 브러시가 덧칠된다. 또한 브러시의 폭이 큰 것에서 작은 순으로 이루어져 있기 때문에 격자 크기 역시 큰 격자에서 작은 순으로 구분한다. 도 10에는 브러시 스트로크들이 캔버스 위에 덧칠되는 단계들이 도시되어 있다. 도 10에 도시된 영상은 총 100번의 덧칠을 시도하여 87개의 브러시 스트로크가 캔버스위에 덧칠된 영상이다. 100번의 덧칠 시도에서 87번만 덧칠된 이유는 다음의 수학식에서 영역 에러값 AreaError이 사용자가 설정하는 임계치 T보다 클 경우만 덧칠하기 때문이다.Alternatively, a method of dividing the canvas into grids and repainting each grid with one brush stroke may be applied. In this method, the canvas is divided into 4 to 6 layers, and each layer is divided into a grid according to the width of the brush. The grid divided in this way is painted with a single brush through color value comparison between the canvas and the source image. Also, since the width of the brush is in the order from largest to smallest, the grid size is also classified from the largest to the smallest. 10 shows the steps in which brush strokes are painted over the canvas. The image shown in FIG. 10 is an image in which 87 brush strokes are overpainted on the canvas by over-painting a total of 100 times. The reason why only 87 overlapping attempts were made in 100 overlapping attempts is that in the following equation, the area error value AreaError is greater than the threshold T set by the user.

수학식 5Equation 5

Figure pat00005
Figure pat00005

여기서, Di,j는 (i,j)에서 소스 영상과 덧칠이 수행되는 렌더링 영상의 색상 차이값을 계산하는 함수이고, M은 (x,y)를 중심으로 하는 격자 영역이며, grid는 격자의 면적이다.Here, Di,j is a function that calculates the color difference between the source image and the rendered image on which the overlay is performed at (i,j), M is the grid area centered on (x,y), and grid is the is the area

스트로크 패턴 선택부(830)는 현재 영상 프레임을 구성하는 픽셀 중에서 덧칠이 수행될 제4픽셀에 대응하는 픽셀의 색상에 해당하는 스트로크 패턴을 선택한다. 이를 위해 사전에 상이한 모양과 질감을 갖는 복수 개의 스트로크 패턴들이 정의된다. 먼저 브러시 스트로크 패턴의 모양은 직선 브러시 스트로크와 곡선 브러시 스트로크로 구분된다. 직선 브러시 스트로크는 시작 위치 (x0, y0)가 결정되면 사용자가 지정한 브러시의 길이와 폭의 값에 따라 브러시 스트로크의 끝점 (x1, y1)이 결정된다. 도 11a에는 직선 브러시 스트로크의 생성방법이 도시되어 있다. 브러시 스트로크의 끝점을 정하는 방법은 시작 위치 (x0, y0)의 그라디언트 의 수직 방향으로 길이만큼 떨어진 지점을 선택한다. 곡선 브러시 스트로크는 스플라인 곡선에 의해 정의된다. 곡선 브러시 스트로크는 첫 번째 제어점 (x0, y0)에서 시작되며, 그라디언트 G0의 수직 방향인 D0로 결정된다. 이러서 두 번째 제어점 (x1, y1)으로부터 두 개의 수직 방향(θ1+π/2, θ1-π/2) 중에서 브러시 스트로크의 곡률이 작은 D1을 선택하며, 이러한 과정을 반복하여 곡선 브러시 스트로크가 생성된다. 도 11b에는 곡선 브러시 스트로크의 생성방법이 도시되어 있다.The stroke pattern selector 830 selects a stroke pattern corresponding to a color of a pixel corresponding to a fourth pixel to be overpainted from among pixels constituting the current image frame. For this purpose, a plurality of stroke patterns having different shapes and textures are defined in advance. First, the shape of the brush stroke pattern is divided into a straight brush stroke and a curved brush stroke. For a straight brush stroke, when the start position (x0, y0) is determined, the end point (x1, y1) of the brush stroke is determined according to the user-specified brush length and width values. 11A shows a method of generating a straight brush stroke. To determine the end point of the brush stroke, select a point separated by a length in the vertical direction of the gradient from the start position (x0, y0). A curved brush stroke is defined by a spline curve. A curved brush stroke starts at the first control point (x0, y0) and is determined by the gradient G0, which is the vertical direction D0. Thus, from the second control point (x1, y1), select D1 with a small brush stroke curvature among the two vertical directions (θ1+π/2, θ1-π/2), and repeat this process to create a curved brushstroke do. 11B shows a method of generating a curved brush stroke.

다음으로 브러시 스트로크 패턴의 질감은 솔리드 브러시 스트로크와 브러시 텍스쳐로 구분된다. 솔리드 브러시 스트로크는 브러시 하나당 한가지의 색상을 가지는 브러시를 말한다. 솔리드 브러시는 한가지의 색상만을 가지기 때문에 캔버스에 덧칠할 경우 색의 혼합 현상은 단순히 불투명도(Opacity) 만을 이용하여 조절가능하다. 또한 불투명도의 비율을 너무 많이 부여할 경우 수묵화 같은 효과가 나타나기도 한다. 이러한 특징들을 내포하고 있는 브러시 스트로크는 같은 색상을 가지는 여러 개의 솔리드 브러시 스트로크를 교차해서 덧칠할 경우 주변 브러시들 간의 혼합으로 인하여 덧칠의 느낌을 표현할 수 없다는 단점이 있다. 또한 덧칠해지는 브러시 스트로크 간 구분이 어렵다. 이와 달리 브러시 텍스쳐는 실제 붓을 이용하여 그린 후에 스캔하여 저장한 영상으로서 붓 결이 나타나는 브러시를 말한다. 이러한 특징을 가지는 브러시 스트로크는 여러 개의 브러시 텍스쳐를 교차해서 칠하더라도 덧칠의 느낌을 표현할 수 있으며 붓 결 사이로 밑에 묻어나는 브러시의 색상이 묻어나옴으로써 색의 혼합 현상도 표현할 수 있다. 도 12a 및 도 12b에는 각각 솔리드 브러시 스트로크와 브러시 텍스쳐의 예가 도시되어 있다.Next, the texture of the brush stroke pattern is divided into a solid brush stroke and a brush texture. A solid brush stroke is a brush that has one color per brush. Since a solid brush has only one color, when painting over the canvas, color mixing can be controlled simply by using Opacity. Also, if the opacity ratio is too high, an effect like ink painting may appear. Brush strokes with these features have a disadvantage in that when multiple solid brush strokes having the same color are intersected and painted over, the feeling of overpainting cannot be expressed due to mixing between surrounding brushes. Also, it is difficult to distinguish between brush strokes that are overpainted. Contrary to this, the brush texture refers to a brush in which the texture of the brush appears as an image that is scanned and saved after drawing with an actual brush. Brush strokes with these characteristics can express the feeling of over-painting even when multiple brush textures are intersected, and color mixing can also be expressed as the color of the underlying brush is buried between the brush textures. 12A and 12B show examples of solid brush strokes and brush textures, respectively.

스트로크 패턴 선택부(830)는 사전에 정의되어 저장되어 있는 다양한 모양과 질감을 갖는 브러시 스트로크 패턴중에서 무작위로 하나의 브러시를 선택한 후 색상을 부여한다. 이때 스트로크 패턴 선택부(830)는 상술한 바와 같이 현재 영상 프레임을 구성하는 픽셀 중에서 덧칠이 수행될 제4픽셀에 대응하는 픽셀의 색상에 해당하는 색상을 선택된 브러시 스트로크 패턴에 부여하는 방법 외에 다른 방법에 의해 브러시 스트로크 패턴에 색상을 부여할 수 있다. 일예로, 스트로크 패턴 선택부(830)는 서로 다른 모양과 질감을 갖는 복수의 브러시 스트로크 패턴 중에서 선택된 브러시 스트로크 패턴에 부여한 색상값과 현재 영상 프레임을 구성하는 픽셀 중에서 덧칠이 수행될 제4픽셀에 대응하는 픽셀의 색상값의 차이가 제1렌더링 영상을 구성하는 픽셀 중에서 덧칠이 수행될 제4픽셀에 대응하는 픽셀의 색상값과 현재 영상 프레임을 구성하는 픽셀 중에서 덧칠이 수행될 제4픽셀에 대응하는 픽셀의 색상값의 차이보다 작은 스트로크 패턴을 선택한다.The stroke pattern selector 830 randomly selects one brush from among the previously defined and stored brush stroke patterns having various shapes and textures, and then assigns a color to the brush. In this case, as described above, the stroke pattern selector 830 applies a color corresponding to the color of the pixel corresponding to the fourth pixel to be overpainted among the pixels constituting the current image frame to the selected brush stroke pattern, other than the method described above. color can be given to the brush stroke pattern. For example, the stroke pattern selector 830 corresponds to a color value given to a brush stroke pattern selected from a plurality of brush stroke patterns having different shapes and textures and a fourth pixel to be overpainted among pixels constituting the current image frame. The difference between the color values of pixels to be overpainted corresponds to a color value of a pixel corresponding to a fourth pixel to be overpainted among pixels constituting the first rendered image and a fourth pixel to be overpainted among pixels constituting the current image frame. Select a stroke pattern that is smaller than the difference in color values of pixels.

렌더링부(840)는 제1렌더링 영상에 대해 선택된 덧칠이 수행될 제4픽셀 각각에 대해 결정된 덧칠 방향으로 선택된 스트로크 패턴을 배치하여 제2렌더링 영상을 생성한다. 이때 렌더링부(840)는 제1움직임 맵에 대응하여 결정된 제4픽셀들 각각에 대해 선택된 스트로크 패턴을 제1렌더링 영상에 배치한 후 제2움직임 맵에 대응하여 결정된 제4픽셀들 각각에 대해 선택된 스트로크 패턴을 제1렌더링 영상에 배치하여 제2렌더링 영상을 생성한다. 제1움직임 맵에 대응하여 결정된 제4픽셀들에 대한 렌더링에 있어서, 브러시 텍스쳐를 사용하여 캔버스 위에 덧칠할 때는 하나의 브러시에 붓 결이 존재하기 때문에 홀이 발생할 수 있으며 이런 홀을 채우기 위해서는 같은 색상을 가지는 브러시 텍스쳐를 여러 번 덧칠을 해야 한다. 따라서 브러시 텍스쳐를 사용할 때는 제1움직임 맵에 해당되는 픽셀 수에 따라 브러시 스트로크의 덧칠을 시도하고 현재 영상 프레임과 제1렌더링 이미지 사이의 색상 차이 값을 이용하여 실제 브러시 텍스쳐를 덧칠한다.The rendering unit 840 generates the second rendered image by arranging the selected stroke pattern in the determined overpainting direction for each of the fourth pixels to be overpainted on the first rendered image. At this time, the rendering unit 840 arranges the stroke pattern selected for each of the fourth pixels determined in response to the first motion map in the first rendered image, and then selects the stroke pattern selected for each of the fourth pixels determined in response to the second motion map. A second rendered image is generated by arranging the stroke pattern on the first rendered image. In the rendering of the fourth pixels determined in response to the first motion map, when painting over the canvas using a brush texture, a hole may occur because a brush texture exists in one brush, and the same color is required to fill the hole. You need to paint over the brush texture with . Therefore, when using a brush texture, overpainting of brush strokes is attempted according to the number of pixels corresponding to the first motion map, and the actual brush texture is overpainted using the color difference value between the current image frame and the first rendered image.

제1움직임 맵에 대응하여 제1렌더링 영상에 브러시 텍스쳐를 덧칠하는 과정은 크게 여섯 단계로 이루어진다. 첫째, 이전 영상 프레임에 대응하는 제1렌더링 영상을 현재 영상 프레임에 대응하는 제2렌더링 영상의 초기 영상으로 설정한다. 둘째, 무작위로 복수 개의 브러시 텍스쳐 중에서 하나의 브러시 텍스쳐를 선택한다. 셋째, 제1움직임 맵에 해당되는 픽셀들을 데이터베이스화하고, 데이터베이스화된 픽셀들 중 하나를 선택하여 브러시 텍스쳐가 덧칠될 위치를 설정한다. 넷째, 브러시 텍스쳐가 칠해질 위치의 임의의 영역을 메모리 버퍼에 넣고 현재 영상 프레임과 버퍼 영역 간의 색상 차이 값(Error 1)을 계산한다. 다섯 번째, 브러시 텍스쳐를 덧칠하고 칠해진 영역과 현재 영상 프레임 간의 색상 차이 값(Error 2)을 계산한다. 마지막으로 Error 1과 Error 2를 비교하여 Error 1값이 Error 2 값보다 크면 다음 덧칠할 위치를 설정하고, Error 1값이 Error 2 값보다 작으면 칠하기 이전에 저장된 메모리 버퍼의 내용을 다시 제2렌더링 영상의 초기 영상에 복사한다. 도 13a 내지 도 13d에는 이전 영상 프레임, 현재 영상 프레임, 제1움직임 맵, 그리고, 상술한 과정을 통해 브러시 텍스쳐를 덧칠하여 얻어진 결과 영상이 도시되어 있다.The process of overpainting the brush texture on the first rendered image in response to the first motion map is largely comprised of six steps. First, a first rendered image corresponding to a previous image frame is set as an initial image of a second rendered image corresponding to a current image frame. Second, one brush texture is randomly selected from among a plurality of brush textures. Third, the pixels corresponding to the first motion map are databased, and a position where the brush texture is to be applied is set by selecting one of the databased pixels. Fourth, an arbitrary area where the brush texture is to be painted is put into the memory buffer, and a color difference value (Error 1) between the current image frame and the buffer area is calculated. Fifth, paint over the brush texture and calculate the color difference value (Error 2) between the painted area and the current image frame. Finally, by comparing Error 1 and Error 2, if the Error 1 value is greater than the Error 2 value, the next overcoating position is set. If the Error 1 value is less than the Error 2 value, the contents of the memory buffer saved before painting are re-written to the second second. Copies to the initial image of the rendered image. 13A to 13D show a previous image frame, a current image frame, a first motion map, and a result image obtained by overpainting a brush texture through the above-described process.

제2움직임 맵에 대응하여 제1움직임 맵을 기초로 일차적인 렌더링이 수행된 제1렌더링 영상에 브러시 텍스쳐를 덧칠하는 과정 역시 크게 여섯 단계로 이루어진다. 첫째, 제1움직임 맵을 이용하여 브러시 텍스쳐가 덧칠된 결과 영상을 현재 영상 프레임에 대응하는 제2렌더링 영상의 초기 영상으로 설정한다. 둘째, 무작위로 복수 개의 브러시 텍스쳐 중에서 하나의 브러시 텍스쳐를 선택한다. 셋째, 제2움직임 맵에 해당되는 픽셀들을 데이터베이스화한다. 이때 무작위로 덧칠을 수행할 위치를 설정하고 설정된 위치가 제1움직임 맵에 대응하는 데이터베이스에 존재하는지 확인한다. 만약 해당 위치가 데이터베이스에 존재하면, 그 위치에 브러시 텍스쳐의 덧칠을 시도하고, 그렇지 않으면 다음 위치를 선택한다. 이때 사용되는 브러시 텍스쳐의 덧칠 시도 횟수는 1000번 정도로 설정한다. 왜냐하면 제2움직임 맵은 제1움직임 맵과는 달리 주변 픽셀들 간의 색상 차이가 적게 나타나는 부분이며, 따라서 영상 프레임마다 덧칠을 하지 않아도 되는 부분이기 때문이다. 1000은 사용자가 임의로 지정한 수이며 실험적으로 결정된다. 넷째, 브러시 텍스쳐가 칠해질 위치의 임의의 영역을 메모리 버퍼에 넣고, 현재 영상 프레임과 버퍼 영역 간의 색상 차이 값(Error 1)을 계산한다. 다섯 번째, 브러시 텍스쳐를 덧칠하고 칠해진 영역과 현재 영상 프레임 간의 색상 차이 값(Error 2)을 계산한다. 마지막으로 Error 1와 Error 2를 비교하여 만일 Error 1값이 Error 2 값보다 크면, 다음 덧칠할 위치를 설정하고 Error 1값이 Error 2 값보다 적으면 칠하기 이전에 저장된 메모리 버퍼의 내용을 다시 제2렌더링 영상의 초기 영상으로 설정한다. 도 14a 내지 도 14d에는 이전 영상 프레임, 현재 영상 프레임, 제2움직임 맵, 그리고, 상술한 과정을 통해 브러시 텍스쳐를 덧칠하여 얻어진 결과 영상이 도시되어 있다.The process of overpainting the brush texture on the first rendered image on which the primary rendering is performed based on the first motion map in response to the second motion map is also largely comprised of six steps. First, the result image overlaid with the brush texture using the first motion map is set as the initial image of the second rendered image corresponding to the current image frame. Second, one brush texture is randomly selected from among a plurality of brush textures. Third, the pixels corresponding to the second motion map are databased. At this time, a location to be randomly applied is set, and it is checked whether the set location exists in the database corresponding to the first motion map. If the location exists in the database, it tries to paint over the brush texture at that location, otherwise selects the next location. In this case, the number of attempts to repaint the brush texture used is set to about 1000 times. This is because, unlike the first motion map, the second motion map is a part in which a color difference between neighboring pixels is small, and therefore, it is not necessary to repaint for each image frame. 1000 is a number randomly assigned by the user and is determined experimentally. Fourth, an arbitrary area where the brush texture is to be painted is put into the memory buffer, and a color difference value (Error 1) between the current image frame and the buffer area is calculated. Fifth, paint over the brush texture and calculate the color difference value (Error 2) between the painted area and the current image frame. Finally, by comparing Error 1 and Error 2, if the Error 1 value is greater than the Error 2 value, the next overcoating position is set. If the Error 1 value is less than the Error 2 value, the contents of the memory buffer saved before painting are re-created. 2Set as the initial image of the rendering image. 14A to 14D show a previous image frame, a current image frame, a second motion map, and a result image obtained by overpainting the brush texture through the above-described process.

도 8c에는 렌더링 영상 생성부(150)에 대한 제2실시예의 구성이 도시되어 있다. 도 8c에 도시된 실시예는 브러시 스트로크 패턴이 곡선의 솔리드 브러시 스트로크일 경우에 해당하는 렌더링 영상 생성부(150)의 예이다.8C shows the configuration of the second embodiment of the rendering image generator 150 . The embodiment illustrated in FIG. 8C is an example of the rendering image generating unit 150 corresponding to the case in which the brush stroke pattern is a curved solid brush stroke.

도 8c를 참조하면, 렌더링 영상 생성부(150)는 덧칠방향 결정부(860), 덧칠여부 결정부(870) 및 렌더링부(880)를 구비한다. 도 8c에 도시된 렌더링 영상 생성부(150)에 대한 제2실시예는 도 8a에 도시된 렌더링 영상 생성부(150)에 대한 제1실시예와 비교할 때 덧칠방향 결정부(860)의 구성 및 기능은 동일하므로, 이하에서는 덧칠여부 결정부(870) 및 렌더링부(880)의 구성 및 기능에 대해서만 설명한다.Referring to FIG. 8C , the rendering image generating unit 150 includes an overcoat direction determining unit 860 , an overpainting determining unit 870 , and a rendering unit 880 . The second embodiment of the rendering image generating unit 150 shown in FIG. 8C has a configuration of the overlaying direction determining unit 860 compared with the first embodiment of the rendering image generating unit 150 shown in FIG. 8A and Since the functions are the same, only the configuration and functions of the overpainting determination unit 870 and the rendering unit 880 will be described below.

덧칠여부 결정부(870)는 제1렌더링 영상, 제1움직임 맵 및 제2움직임 맵 상에 소정의 크기를 갖는 격자를 설정하고, 다음의 수학식으로 정의되는 결정규칙에 의해 제1렌더링 영상에 대해 설정된 격자들 중에서 제1움직임 맵 및 제2움직임 맵 상에 설정된 격자에 대응하는 격자들에 대한 덧칠여부를 결정한다. 이때 덧칠여부 결정부(870)는 A/C값이 제2임계값 TH2보다 크면 제1임계값 TH1을 증가시킨다.The overpainting determination unit 870 sets a grid having a predetermined size on the first rendered image, the first motion map, and the second motion map, and is applied to the first rendered image by a decision rule defined by the following equation. It is determined whether to overpaint the grids corresponding to the grids set on the first motion map and the second motion map from among the grids set for each other. At this time, the overcoat decision unit 870 increases the first threshold value TH1 when the A/C value is greater than the second threshold value TH2.

수학식 6Equation 6

Figure pat00006
Figure pat00006

여기서, Nall은 임의의 격자 내에 존재하는 픽셀의 수, Nst_motion 및 Nwe_motion은 각각 제1움직임 맵과 제2움직임 맵의 대응하는 격자 내에 존재하는 픽셀의 수, A는 제1움직임 맵에 존재하는 픽셀의 수, C는 제1렌더링 영상에 복수의 스트로크 패턴 중에서 선택된 스트로크 패턴을 적용하여 얻어진 영상과 제1움직임 맵 사이의 배타적 논리합을 수행한 결과로 얻어지는 픽셀의 수, Diff Map(i)는 제2영상 프레임과 제1렌더링 영상 사이의 색상 차이, N은 격자를 포함하는 소정 크기의 영역을 구성하는 픽셀의 수, 그리고, TH1 내지 TH4는 각각에 대해 설정된 임계값이다.Here, Nall is the number of pixels present in an arbitrary grid, Nst_motion and Nwe_motion are the number of pixels present in the corresponding grids of the first and second motion maps, respectively, and A is the number of pixels present in the first motion map. Number, C is the number of pixels obtained as a result of performing an exclusive OR between an image obtained by applying a stroke pattern selected from among a plurality of stroke patterns to the first rendered image and the first motion map, and Diff Map(i) is the second image A color difference between the frame and the first rendered image, N is the number of pixels constituting an area of a predetermined size including a grid, and TH1 to TH4 are threshold values set for each.

제1움직임 맵은 프레임 간 색상 변화가 뚜렷하게 나타나는 에지 부분을 포함하고 있다. 이러한 이유 때문에 제1렌더링 영상을 제2렌더링 영상의 초기 영상으로 설정하고 그 위에 색상 변화가 뚜렷하게 나타나는 제1움직임 맵부분을 덧칠하게 된다. 사용되는 브러시 스트로크의 종류(브러시 스트로크의 폭을 기준으로 나눔)에 따라 렌더링이 수행되는 캔버스를 N개의 레이어로 나누고 각 레이어별로 제1움직임 맵에 해당되는 최소한의 영역에 브러시 스트로크를 적용한다. 덧칠여부 결정부(870)는 수학식 6을 이용하여 덧칠이 수행될 캔버스 위에 브러시 스트로크의 덧칠 여부를 결정한다. 이때 하나의 레이어를 브러시 스트로크의 폭에 따라 여러 개의 그리드로 나누고 하나의 그리드 안에 하나의 브러시 스트로크를 적용한다. 또한 제1임계값 TH1과 브러시 스트로크의 덧칠 빈도수는 반비례한다.The first motion map includes an edge portion in which a color change between frames is clearly displayed. For this reason, the first rendered image is set as the initial image of the second rendered image, and the first motion map portion on which the color change is clearly displayed is overlaid. The canvas on which the rendering is performed is divided into N layers according to the type of brush stroke used (divided based on the width of the brush stroke), and the brush stroke is applied to the minimum area corresponding to the first motion map for each layer. The overpainting decision unit 870 determines whether to overpaint the brush stroke on the canvas to be overpainted by using Equation (6). At this time, one layer is divided into several grids according to the width of the brush stroke, and one brush stroke is applied within one grid. Also, the first threshold value TH1 and the frequency of brush strokes are inversely proportional to each other.

렌더링부(880)는 제1렌더링 영상에 대해 설정된 격자들 중에서 덧칠이 결정된 격자에 대해 결정된 덧칠 방향으로 복수의 스트로크 패턴 중에서 선택된 스트로크 패턴을 배치하여 제2렌더링 영상을 생성한다. 이때 렌더링부(880)는 제1움직임 맵에 대응하여 결정된 제4픽셀들 각각에 대해 선택된 스트로크 패턴을 제1렌더링 영상에 배치한 후 제2움직임 맵에 대응하여 결정된 제4픽셀들 각각에 대해 선택된 스트로크 패턴을 제1렌더링 영상에 배치하여 제2렌더링 영상을 생성한다.The rendering unit 880 generates a second rendered image by arranging a stroke pattern selected from a plurality of stroke patterns in an overpainting direction determined with respect to a grid for which an overcoat is determined from among the grids set for the first rendered image. In this case, the rendering unit 880 arranges the stroke pattern selected for each of the fourth pixels determined in response to the first motion map in the first rendered image, and then selects the stroke pattern selected for each of the fourth pixels determined in response to the second motion map. A second rendered image is generated by arranging the stroke pattern on the first rendered image.

먼저, 렌더링부(880)는 수학식 6에 의해 덧칠여부가 결정되어 임시 캔버스 위에 브러시 스트로크를 적용한 결과 영상과 제1움직임 맵 영상 간의 연산을 통해 중복적인 덧칠정도를 나타내는 OverlapRate값(즉, C/A의 값)이 제2임계값 TH2보다 작을 때까지 제1임계값 TH1을 조절한다. OverlapRate값이 제2임계값보다 크다는 것은 제1움직임 맵 영역보다 더 많이 브러시 스트로크가 덧칠되었다는 의미이며, 수학식 6의 제1임계값 TH1을 올려줌으로써 OverlapRate값을 줄일 수 있다. 도 15a 내지 도 15e에는 이전 영상 프레임, 현재 영상 프레임, 제1움직임 맵, 상술한 과정을 통해 솔리드 브러시 스트로크를 덧칠하여 얻어진 제1결과 영상(제1임계값 TH1: 05), 그리고, 상술한 과정을 통해 솔리드 브러시 스트로크를 덧칠하여 얻어진 제1결과 영상(제1임계값 TH1: 085)이 도시되어 있다.First, the rendering unit 880 determines whether to overpaint according to Equation 6, and an OverlapRate value (ie, C/ The first threshold value TH1 is adjusted until the value of A) is less than the second threshold value TH2. When the OverlapRate value is greater than the second threshold value, it means that more brush strokes are overpainted than in the first motion map area, and the OverlapRate value can be decreased by increasing the first threshold value TH1 of Equation (6). 15A to 15E show the previous image frame, the current image frame, the first motion map, and the first result image (first threshold value TH1: 05) obtained by overpainting the solid brush stroke through the above-described process, and the process described above. A first result image (first threshold value TH1: 085) obtained by overpainting a solid brush stroke through .

다음으로, 렌더링부(880)는 제1움직임 맵을 이용하여 덧칠을 수행한 캔버스 위에 제2움직임 맵을 이용하여 가장 작은 브러시 스트로크만을 덧칠하여 이전 캔버스와의 변화를 최소화한다. 즉, 렌더링부(880)는 임의의 픽셀 또는 영역 부분에 움직임이 일어났음에도 불구하고 주변 픽셀들 간의 색상 차이가 적으면 브러시 스트로크를 캔버스 위에 덧칠하지 않는다. 이는 주변 픽셀들 간의 색상 차이가 작은 부분에 솔리드 브러시 스트로크를 이용하여 캔버스 위에 덧칠할 경우 오히려 주변 픽셀들 간의 색상 차이를 가중시켜 프레임 간 브러시 스트로크의 플릭커링 현상을 초래할 수도 있기 때문이다. 본 발명에서는 이런 현상을 줄이기 위해 수학식 6에 의해 설정된 두 가지 조건을 만족할 경우에만 캔버스 위에 브러시 스트로크를 덧칠한다. 결과적으로 렌더링부(880)는 하나의 그리드 전체 영역에 대한 제2움직임 맵 영역의 비율을 고려하여 덧칠을 수행한다. 도 16a 내지 도 16e에는 이전 영상 프레임, 현재 영상 프레임, 제2움직임 맵, 상술한 과정을 통해 솔리드 브러시를 덧칠하여 얻어진 제1결과 영상(제3임계값 TH3: 082), 그리고, 상술한 과정을 통해 솔리드 브러시 스트로크를 덧칠하여 얻어진 제1결과 영상(제3임계값 TH3: 085)이 도시되어 있다.Next, the rendering unit 880 paints only the smallest brush strokes using the second motion map on the canvas on which the first motion map has been overpainted, thereby minimizing the change from the previous canvas. That is, the rendering unit 880 does not overpaint the brush strokes on the canvas if the color difference between neighboring pixels is small even though a movement occurs in an arbitrary pixel or region. This is because, when a solid brush stroke is used to paint over the canvas with a small color difference between neighboring pixels, the color difference between neighboring pixels is rather aggravated, leading to flickering of the brush strokes between frames. In the present invention, in order to reduce this phenomenon, brush strokes are overpainted on the canvas only when two conditions set by Equation 6 are satisfied. As a result, the rendering unit 880 performs overpainting in consideration of the ratio of the second motion map area to the entire area of one grid. 16A to 16E show the previous image frame, the current image frame, the second motion map, the first result image obtained by overpainting the solid brush through the above-described process (third threshold value TH3: 082), and the above-described process. A first result image (third threshold value TH3: 085) obtained by overpainting a solid brush stroke through a brush stroke is shown.

도 17은 본 발명에 따른 회화적 애니메이션 방법에 대한 바람직한 실시예의 수행과정을 도시한 흐름도이다.17 is a flowchart illustrating a process of performing a preferred embodiment of the pictorial animation method according to the present invention.

도 17을 참조하면, 움직임 벡터 산출부(110)는 복수개의 영상 프레임 중에서 시간적으로 앞서는 이전 영상 프레임을 구성하는 픽셀들 중에서 이전 영상 프레임에 이어지는 현재 영상 프레임 상에서의 위치가 이동된 픽셀들의 위치이동정도를 기초로 현재 영상 프레임에 대응하는 움직임 벡터를 산출한다(S1700). 다음으로 에지 영상 생성부(120)는 이전 영상 프레임에서 에지를 검출하여 에지 영상을 생성한다(S1710). 다음으로 제1움직임 맵 생성부(130)는 에지 영상을 구성하는 각각의 제1픽셀로부터 제1픽셀의 좌표에 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제1움직임 맵을 생성한다(S1720). 다음으로 제2움직임 맵 생성부(140)는 이전 영상 프레임을 구성하는 픽셀들 중에서 제1픽셀을 제외한 위치가 이동된 각각의 제2픽셀로부터 제2픽셀의 좌표에 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제2움직임 맵을 생성한다(S1730) 마지막으로 렌더링 영상 생성부(150)는 제1움직임 맵 및 제2움직임 맵을 기초로 이전 영상 프레임에 대응하는 제1렌더링 영상에 대해 덧칠을 수행하여 현재 영상 프레임에 대응하는 제2렌더링 영상을 생성한다(S1740).Referring to FIG. 17 , the motion vector calculator 110 calculates the degree of position movement of pixels whose positions on the current image frame following the previous image frame are moved among pixels constituting the temporally preceding previous image frame among the plurality of image frames. A motion vector corresponding to the current image frame is calculated based on ( S1700 ). Next, the edge image generator 120 generates an edge image by detecting an edge in the previous image frame (S1710). Next, the first motion map generating unit 130 generates a first motion map by connecting from each first pixel constituting the edge image to a point obtained by adding a motion vector to the coordinates of the first pixel (S1720) . Next, the second motion map generation unit 140 extends from each second pixel whose position is moved except for the first pixel among pixels constituting the previous image frame to a point obtained by adding a motion vector to the coordinates of the second pixel. to generate a second motion map (S1730). Finally, the rendered image generating unit 150 performs overpainting on the first rendered image corresponding to the previous image frame based on the first and second motion map. to generate a second rendered image corresponding to the current image frame (S1740).

도 18은 렌더링 영상 생성부(150)가 브러시 텍스쳐를 이용하여 제2렌더링 영상을 생성할 때 덧칠방향, 덧칠지점 및 스트로크 패턴을 결정하는 과정을 도시한 도면이다.18 is a diagram illustrating a process in which the rendering image generating unit 150 determines an overcoating direction, an overpainting point, and a stroke pattern when generating a second rendered image by using a brush texture.

도 18을 참조하면, 덧칠방향 결정부(810)는 수학식 4에 의해 이전 영상 프레임에서 검출된 에지 상의 픽셀들의 그라디언트 값을 산출한다(S1800). 다음으로 덧칠방향 결정부(810)는 에지 상의 픽셀들의 그라디언트 값을 크기가 큰 픽셀들로부터 순차적으로 기준 픽셀을 선택하고, 선택된 기준 픽셀을 중심으로 소정의 제1영역(예를Referring to FIG. 18 , the overfill direction determiner 810 calculates gradient values of pixels on the edge detected in the previous image frame by Equation 4 ( S1800 ). Next, the overfill direction determining unit 810 sequentially selects a reference pixel from pixels having large gradient values of pixels on the edge, and a predetermined first area (eg, a first area centered on the selected reference pixel).

들면, 기준 픽셀에 인접하는 픽셀을 포함하는 영역) 내에 존재하는 에지 상의 다른 픽셀들을 제거하여 강한 에지를 선정한다(S1810). 다음으로 덧칠방향 결정부(810)는 소정의 제2영역(예를 들면, 반경이 2픽셀인 원) 내에 존재하는 강한 에지들의 가중치와 그라디언트의 합을 기초로 산출한 이전 영상 프레임을 구성하는 각각의 픽셀들의 그라디언트 크기에 의해 이전 영상 프레임을 구성하는 각각의 픽셀들의 덧칠방향을 결정한다(S1820).For example, a strong edge is selected by removing other pixels on the edge existing in the area including the pixel adjacent to the reference pixel (S1810). Next, the overcoating direction determining unit 810 may configure each of the previous image frames calculated based on the sum of the weights and gradients of strong edges existing in a predetermined second area (eg, a circle having a radius of 2 pixels). The overlapping direction of each pixel constituting the previous image frame is determined by the gradient size of the pixels in S1820.

덧칠지점 결정부(820)는 이전 영상 프레임에 대응하는 제1렌더링 영상을 구성하는 픽셀 중에서 제1움직임 맵 및 제2움직임 맵에 대응하는 덧칠영역에 위치하는 제3픽셀들을 선택하고, 제3픽셀들 중에서 덧칠이 수행될 제4픽셀들을 선택한다(S1830). 이때 덧칠지점 결정부(820)는 브러시 스트로크의 위치를 랜덤하게 설정하거나, 영상의 모멘트를 이용하여 위치를 설정하거나, 캔버스 전체를 그리드로 나누고 그리드 하나당 하나의 브러시를 적용하거나, 영역 분할을 이용하여 분할된 하나의 영역을 하나의 브러시로 설정한다. 다음으로 스트로크 패턴 선택부(830)는 현재 영상 프레임을 구성하는 픽셀 중에서 덧칠이 수행될 제4픽셀에 대응하는 픽셀의 색상에 해당하는 스트로크 패턴을 선택한다(S1840). 이때 스트로크 패턴 선택부(830)는 사전에 정의되어 저장되어 있는 다양한 모양과 질감을 갖는 브러시 스트로크 패턴 중에서 무작위로 하나의 브러시를 선택한 후 색상을 부여한다.The overpainting point determiner 820 selects third pixels located in the overpainting area corresponding to the first motion map and the second motion map from among pixels constituting the first rendered image corresponding to the previous image frame, and the third pixel Among them, fourth pixels to be overpainted are selected ( S1830 ). In this case, the overpainting point determining unit 820 randomly sets the position of the brush stroke, sets the position using the moment of the image, divides the entire canvas into grids and applies one brush per grid, or uses region division to Set one divided area as one brush. Next, the stroke pattern selector 830 selects a stroke pattern corresponding to the color of the pixel corresponding to the fourth pixel to be overpainted from among the pixels constituting the current image frame (S1840). In this case, the stroke pattern selector 830 randomly selects one brush from among the previously defined and stored brush stroke patterns having various shapes and textures, and then assigns a color to the brush.

도 19a 및 도 19b는 렌더링 영상 생성부(150)가 브러시 텍스쳐를 이용하여 제2렌더링 영상을 생성하는 과정의 일 예를 도시한 도면이다.19A and 19B are diagrams illustrating an example of a process in which the rendering image generator 150 generates a second rendered image by using a brush texture.

도 19a 및 도 19b를 참조하면, 먼저 렌더링부(840)는 이전 영상 프레임에 대응하는 제1렌더링 영상을 현재 영상 프레임에 대응하는 제2렌더링 영상의 초기 영상으로 설정한다(S1900). 다음으로 렌더링부(840)는 제1움직임 맵에 해당되는 픽셀들을 데이터베이스화하고, 데이터베이스화된 픽셀들 중 하나를 선택하여 무작위로 복수 개의 브러시 텍스쳐 중에서 선택된 브러시 텍스쳐가 덧칠될 위치를 설정한다(S1905). 다음으로 렌더링부(840)는 브러시 텍스쳐가 칠해질 위치의 임의의 영역을 메모리 버퍼에 넣고 현재 영상 프레임과 버퍼 영역 간의 색상 차이값(Error 1)을 계산한다(S1910). 다음으로 렌더링부(840)는 브러시 텍스쳐를 덧칠하고 칠해진 영역과 현재 영상프레임 간의 색상 차이 값(Error 2)을 계산한다(S1915) 이어서 렌더링부(840)는 Error 1과 Error 2를 비교하여(S1920), Error 1값이 Error 2 값보다 크면 다음 덧칠할 위치를 설정하고(S1925), Error 1값이 Error 2 값보다 작으면 칠하기 이전에 저장된 메모리 버퍼의 내용을 다시 제2렌더링 영상의 초기 영상에 복사한다(S1930).19A and 19B , first, the rendering unit 840 sets the first rendered image corresponding to the previous image frame as the initial image of the second rendered image corresponding to the current image frame ( S1900 ). Next, the rendering unit 840 databaseizes the pixels corresponding to the first motion map, selects one of the databased pixels, and sets a location where the brush texture selected from among the plurality of brush textures is to be painted over at random (S1905). ). Next, the rendering unit 840 places an arbitrary area at a position where the brush texture is to be painted into the memory buffer and calculates a color difference value (Error 1) between the current image frame and the buffer area ( S1910 ). Next, the rendering unit 840 overpaints the brush texture and calculates a color difference value (Error 2) between the painted area and the current image frame (S1915). Subsequently, the rendering unit 840 compares Error 1 and Error 2 (S1920). ), if the Error 1 value is greater than the Error 2 value, the next overcoating position is set (S1925), and if the Error 1 value is less than the Error 2 value, the contents of the memory buffer saved before painting are rewritten as the initial image of the second rendering image. is copied to (S1930).

이상의 과정에 의해 제1움직임 맵에 의한 렌더링이 완료되면, 렌더링부(840)는 제1움직임 맵을 이용하여 브러시 텍스쳐가 덧칠된 결과 영상을 현재 영상 프레임에 대응하는 제2렌더링 영상의 초기 영상으로 설정한다(S1935).When the rendering by the first motion map is completed through the above process, the rendering unit 840 converts the resulting image overlaid with the brush texture using the first motion map as an initial image of the second rendering image corresponding to the current image frame. set (S1935).

다음으로 렌더링부(840)는 제2움직임 맵에 해당되는 픽셀들을 데이터베이스화한 후 무작위로 덧칠을 수행할 위치를 설정하고 설정된 위치가 제1움직임 맵에 대응하는 데이터베이스에 존재하는지 확인한다(S1940) 만약 해당 위치가 데이터베이스에 존재하면(S1945), 그 위치에 무작위로 복수 개의 브러시 텍스쳐 중에서 선택된 브러시 텍스쳐를 덧칠하고(S1950), 그렇지 않으면 다음 위치를 선택한다(S1955). 다음으로 렌더링부(840)는 브러시 텍스쳐가 칠해질 위치의 임의의 영역을 메모리 버퍼에 넣고, 현재 영상 프레임과 버퍼 영역 간의 색상 차이 값(Error 1)을 계산한다(S1960) 다음으로 렌더링부(840)는 브러시 텍스쳐를 덧칠하고 칠해진 영역과 현재 영상 프레임 간의 색상 차이 값(Error 2)을 계산한다(S1965) 마지막으로 렌더링부(840)는 Error 1과 Error 2를 비교한다(S1970). 만약 Error 1값이 Error 2 값보다 크면 렌더링부(840)는 다음 덧칠할 위치를 설정하고(S1975),Next, the rendering unit 840 databaseizes the pixels corresponding to the second motion map, sets a location to be overpainted at random, and checks whether the set location exists in the database corresponding to the first motion map (S1940) If the location exists in the database (S1945), a brush texture selected from among a plurality of brush textures is randomly applied to the location (S1950), otherwise the next location is selected (S1955). Next, the rendering unit 840 puts an arbitrary area where the brush texture is to be painted into the memory buffer, and calculates a color difference value (Error 1) between the current image frame and the buffer area (S1960). Next, the rendering unit 840 ) overpaints the brush texture and calculates a color difference value (Error 2) between the painted area and the current image frame (S1965). Finally, the rendering unit 840 compares Error 1 and Error 2 (S1970). If the Error 1 value is greater than the Error 2 value, the rendering unit 840 sets a position to be next painted (S1975),

Error 1값이 Error 2 값보다 적으면 렌더링부(840)는 칠하기 이전에 저장된 메모리 버퍼의 내용을 다시 제2렌더링 영상의 초기 영상으로 설정한다(S1980).If the Error 1 value is less than the Error 2 value, the rendering unit 840 sets the contents of the memory buffer stored before painting as the initial image of the second rendered image again (S1980).

도 20은 렌더링 영상 생성부(150)가 솔리드 브러시 스트로크를 이용하여 제2렌더링 영상을 생성하는 과정의 일 예를 도시한 도면이다.20 is a diagram illustrating an example of a process in which the rendering image generator 150 generates a second rendered image by using a solid brush stroke.

도 20을 참조하면, 덧칠여부 결정부(870)는 제1렌더링 영상, 제1움직임 맵 및 제2움직임 맵 상에 소정의 크기를 갖는 격자를 설정하고, 수학식 6의 제1임계값의 초기값(예를 들면, 05)을 설정한다(S2000). 다음으로 덧칠을 수행할 격자 내의 모든 픽셀 수와 해당 격자 내의 제1움직임 맵에 해당하는 픽셀 수의 비가 제1임계값보다 크거나 같으면(S2005) 덧칠여부 결정부(870)는 임시 캔버스 상의 해당 격자에 도 18을 참조하여 설명한 바와 같은 방법에 의해 선택된 솔리드 브러시 스트로크를 적용한다(S2010) 다음으로 렌더링부(880)는 임시 캔버스 상에 선택된 솔리드 브러시 스트로크를 적용하여 얻어진 결과 영상과 제1움직임 맵 영상 간의 배타적 논리합 연산을 수행하여 얻어진 영상을 기초로 중복적인 덧칠정도를 나타내는 OverlapRate값(즉, 수학식 6의 C/A)을 산출한다(S2015). 다음으로 렌더링부(880)는 OverlapRate값과 제2임계값을 비교한다(S2020). 만약 OverlapRate값이 제2 임계값보다 크면, 렌더링부(880)는 제1임계값을 증가시키고(S2025), OverlapRate값이 제2임계값보다 작거나 같으면, 렌더링부(880)는 제1임계값을 결정한 후 제1렌더링 영상 위의 해당 격자 영역에 선택된 솔리드 브러시 스트로크를 적용한다(S2030).Referring to FIG. 20 , the overcoat determination unit 870 sets a grid having a predetermined size on the first rendered image, the first motion map, and the second motion map, and sets the initial value of the first threshold of Equation (6). A value (eg, 05) is set (S2000). Next, when the ratio of the number of pixels in the grid to be overpainted to the number of pixels corresponding to the first motion map in the grid is greater than or equal to the first threshold value (S2005), the overpainting decision unit 870 determines whether the grid on the temporary canvas The solid brushstroke selected by the method as described with reference to FIG. 18 is applied to the image (S2010). Next, the rendering unit 880 applies the selected solid brushstroke to the temporary canvas and the resultant image and the first motion map image. An OverlapRate value (ie, C/A in Equation 6) indicating the degree of overlapping is calculated based on the image obtained by performing an exclusive OR operation between the two (S2015). Next, the rendering unit 880 compares the OverlapRate value and the second threshold value (S2020). If the OverlapRate value is greater than the second threshold value, the rendering unit 880 increases the first threshold value (S2025), and if the OverlapRate value is less than or equal to the second threshold value, the rendering unit 880 increases the first threshold value After determining , the selected solid brush stroke is applied to the corresponding grid area on the first rendered image (S2030).

이상의 과정에 의해 제1움직임 맵에 의한 렌더링이 완료되면, 렌더링부(880)는 제1움직임 맵을 이용하여 솔리드 브러시 스트로크가 덧칠된 결과 영상을 현재 영상 프레임에 대응하는 제2렌더링 영상의 초기 영상으로 설정한다(S2035). 다음으로 렌더링부(880)는 수학식 6의 제2움직임 맵에 대한 결정조건이 만족되면, 해당 격자에 도 18을 참조하여 설명한 바와 같은 방법에 의해 선택된 솔리드 브러시 스트로크를 적용한다(S2040).When the rendering by the first motion map is completed through the above process, the rendering unit 880 converts the result image overlaid with solid brush strokes using the first motion map as an initial image of the second rendering image corresponding to the current image frame. set to (S2035). Next, when the determination condition for the second motion map of Equation 6 is satisfied, the rendering unit 880 applies the solid brush stroke selected by the method described with reference to FIG. 18 to the corresponding grid (S2040).

한편 이전 영상 프레임에 대응하는 제1렌더링 영상은 도 8a 내지 도 8c를 참조하여 설명한 렌더링 영상 생성부(150)에 의해 생성된다. 이때 제1렌더링 영상에 대해서는 에지 영상 및 움직임 맵을 생성할 필요가 없으며, 이전 영상 프레임의 각각의 픽셀에 대해 덧칠방향과 덧칠지점을 결정한 후 스트로크 패턴을 선택하여 회화적 렌더링 영상을 생성한다.Meanwhile, the first rendered image corresponding to the previous image frame is generated by the rendered image generator 150 described with reference to FIGS. 8A to 8C . In this case, it is not necessary to generate an edge image and a motion map for the first rendered image, and a pictorial rendering image is generated by determining an overlay direction and an overlay point for each pixel of the previous image frame, and then selecting a stroke pattern.

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다.The present invention can also be implemented as computer-readable codes on a computer-readable recording medium.

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

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

Claims (19)

복수개의 영상 프레임 중에서 시간적으로 앞서는 제1영상 프레임을 구성하는 픽셀들 중에서 상기 제1영상 프레임에 이어지는 제2영상 프레임 상에서의 위치가 이동된 픽셀들의 위치이동정도를 기초로 상기 제2영상 프레임에 대응하는 움직임 벡터를 산출하는 움직임 벡터 산출부;
상기 제1영상 프레임에서 에지를 검출하여 에지 영상을 생성하는 에지 영상 생성부;
상기 에지 영상을 구성하는 각각의 제1픽셀로부터 상기 제1픽셀의 좌표에 상기 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제1움직임 맵을 생성하는 제1움직임 맵 생성부;
상기 제1영상 프레임을 구성하는 픽셀들 중에서 상기 제1픽셀을 제외한 위치가 이동된 각각의 제2픽셀로부터 상기 제2픽셀의 좌표에 상기 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제2움직임 맵을 생성하는 제2움직임 맵 생성부; 및
상기 제1움직임 맵 및 상기 제2움직임 맵을 기초로 상기 제1영상 프레임에 대응하는 제1렌더링 영상에 대해 덧칠을 수행하여 상기 제2영상 프레임에 대응하는 제2렌더링 영상을 생성하는 렌더링 영상 생성부;를 포함하는 것을 특징으로 하는 회화적 애니메이션 장*.
Among the plurality of image frames, among the pixels constituting the temporally preceding first image frame, corresponding to the second image frame based on the degree of movement of the pixels whose positions on the second image frame following the first image frame have been moved. a motion vector calculator that calculates a motion vector of
an edge image generator configured to generate an edge image by detecting an edge in the first image frame;
a first motion map generator configured to generate a first motion map by connecting each first pixel constituting the edge image to a point obtained by adding the motion vector to the coordinates of the first pixel;
A second motion map by connecting each second pixel whose position is moved except for the first pixel among pixels constituting the first image frame to a point obtained by adding the motion vector to the coordinates of the second pixel. a second motion map generator to generate and
Rendering image generation for generating a second rendered image corresponding to the second image frame by performing overpainting on the first rendered image corresponding to the first image frame based on the first motion map and the second motion map A pictorial animation chapter*, comprising:
제 1항에 있어서,
상기 렌더링 영상 생성부는,
상기 에지 영상을 구성하는 각각의 픽셀들의 그라디언트 값을 기초로 상기 제1영상 프레임을 구성하는 각각의 픽셀들에 대한 덧칠방향을 결정하는 덧칠방향 결정부;
상기 제1렌더링 영상을 구성하는 픽셀 중에서 상기 제1움직임 맵 및 상기 제2움직임 맵에 대응하는 덧칠영역에 위치하는 제3픽셀들을 선택하고, 상기 제3픽셀들 중에서 덧칠이 수행될 제4픽셀들을 선택하는 덧칠 지점 결정부;
상기 제2영상 프레임을 구성하는 픽셀 중에서 상기 제4픽셀에 대응하는 픽셀의 색상에 해당하는 스트로크 패턴을 선택하는 스트로크 패턴 선택부; 및
상기 제1렌더링 영상에 대해 선택된 상기 제4픽셀 각각에 대해 결정된 덧칠 방향으로 상기 선택된 스트로크 패턴을 배치하여 상기 제2렌더링 영상을 생성하는 렌더링부;를 포함하는 것을 특징으로 하는 애니메이션의 회화적 표현 장치.
The method of claim 1,
The rendering image generating unit,
an overfill direction determiner configured to determine an overfill direction for each pixel constituting the first image frame based on a gradient value of each pixel constituting the edge image;
Selecting third pixels located in an overcoat area corresponding to the first motion map and the second motion map from among pixels constituting the first rendered image, and selecting fourth pixels to be overpainted from among the third pixels Overpainting point determining unit to select;
a stroke pattern selection unit for selecting a stroke pattern corresponding to a color of a pixel corresponding to the fourth pixel from among pixels constituting the second image frame; and
A pictorial expression apparatus for animation, comprising: a rendering unit configured to generate the second rendered image by arranging the selected stroke pattern in the overpainting direction determined for each of the fourth pixels selected for the first rendered image .
제 1항에 있어서,
상기 렌더링 영상 생성부는,
상기 에지 영상을 구성하는 각각의 픽셀들의 그라디언트 값을 기초로 상기 제1영상 프레임을 구성하는 각각의 픽셀들에 대한 덧칠방향을 결정하는 덧칠방향 결정부;
상기 제1렌더링 영상, 상기 제1움직임 맵 및 상기 제2움직임 맵 상에 소정의 크기를 갖는 격자를 설정하고, 다음의 결정규칙에 의해 상기 제1렌더링 영상에 대해 설정된 격자들 중에서 상기 제1움직임 맵 및 상기 제2움직임 맵 상에 설정된 격자에 대응하는 격자들에 대한 덧칠여부를 결정하는 덧칠여부 결정부; 및
상기 제1렌더링 영상에 대해 설정된 격자들 중에서 덧칠이 결정된 격자에 대해 상기 결정된 덧칠 방향으로 복수의 스트로크 패턴 중에서 선택된 스트로크 패턴을 배치하여 상기 제2렌더링 영상을 생성하는 렌더링부;를 포함하는 것을 특징으로 하는 애니메이션의 회화적 표현 장치:
[결정규칙]
Figure pat00007

여기서, Nall은 임의의 격자 내에 존재하는 픽셀의 수, Nst_motion 및 Nwe_motion은 각각 제1움직임 맵과 제2움직임 맵의 대응하는 격자 내에 존재하는 픽셀의 수, A는 제1움직임 맵에 존재하는 픽셀의 수, C는 제1렌더링 영상에 복수의 스트로크 패턴 중에서 선택된 스트로크 패턴을 적용하여 얻어진 영상과 제1움직임 맵 사이의 배타적 논리합을 수행한 결과로 얻어지는 픽셀의 수, Diff Map(i)는 제2영상 프레임과 제1렌더링 영상 사이의 색상 차이, N은 격자를 포함하는 소정 크기의 영역을 구성하는 픽셀의 수, 그리고, TH1 내지 TH4는 각각에 대해 설정된 임계값이다.
The method of claim 1,
The rendering image generating unit,
an overfill direction determiner configured to determine an overfill direction for each pixel constituting the first image frame based on a gradient value of each pixel constituting the edge image;
A grid having a predetermined size is set on the first rendered image, the first motion map, and the second motion map, and the first motion among the grids set for the first rendered image according to the following decision rule an overpainting determination unit that determines whether to overpaint the grids corresponding to the grids set on the map and the second motion map; and
A rendering unit configured to generate the second rendered image by arranging a stroke pattern selected from a plurality of stroke patterns in the determined overpainting direction with respect to a grid for which an overcoat is determined from among the grids set for the first rendered image. A pictorial expression device for animation:
[Decision Rule]
Figure pat00007

Here, Nall is the number of pixels present in an arbitrary grid, Nst_motion and Nwe_motion are the number of pixels present in the corresponding grids of the first and second motion maps, respectively, and A is the number of pixels present in the first motion map. Number, C is the number of pixels obtained as a result of performing an exclusive OR between an image obtained by applying a stroke pattern selected from among a plurality of stroke patterns to the first rendered image and the first motion map, and Diff Map(i) is the second image A color difference between the frame and the first rendered image, N is the number of pixels constituting an area of a predetermined size including a grid, and TH1 to TH4 are threshold values set for each.
제 3항에 있어서,
상기 덧칠 여부 결정부는 상기 A/C값이 상기 TH2보다 크면 상기 TH1을 증가시키는 것을 특징으로 하는 애니메이션의 회화적 표현 장치.
4. The method of claim 3,
The pictorial expression apparatus of animation, characterized in that the overcoat determining unit increases the TH1 when the A/C value is greater than the TH2.
제 1항에 있어서,
상기 렌더링 영상 생성부는,
상기 에지 영상을 구성하는 각각의 픽셀들의 그라디언트 값을 기초로 상기 제1영상 프레임을 구성하는 각각의 픽셀들에 대한 덧칠방향을 결정하는 덧칠방향 결정부;
상기 제1렌더링 영상을 구성하는 픽셀 중에서 상기 제1움직임 맵 및 상기 제2움직임 맵에 대응하는 덧칠영역에 위치하는 제3픽셀들을 선택하고, 상기 제3픽셀들 중에서 덧칠이 수행될 제4픽셀들을 선택하는 덧칠 지점 결정부;
서로 다른 모양과 질감을 갖는 복수의 스트로크 패턴 중에서 선택된 스트로크 패턴에 대해 부여한 색상값과 상기 제2영상 프레임을 구성하는 픽셀 중에서 상기 제4픽셀에 대응하는 픽셀의 색상값의 차이가 상기 제1렌더링 영상을 구성하는 픽셀 중에서 상기 제4픽셀에 대응하는 픽셀의 색상값과 상기 제2영상 프레임을 구성하는 픽셀 중에서 상기 제4픽셀에 대응하는 픽셀의 색상값의 차이보다 작은 스트로크 패턴을 선택하는 스트로크 패턴 선택부; 및
상기 제4픽셀들 각각에 대해 결정된 덧칠 방향으로 상기 선택된 스트로크 패턴을 상기 제1렌더링 영상에 배치하여 상기 제2렌더링 영상을 생성하는 렌더링부;를 포함하는 것을 특징으로 하는 애니메이션의 회화적 표현 장치.
The method of claim 1,
The rendering image generating unit,
an overfill direction determiner configured to determine an overfill direction for each pixel constituting the first image frame based on a gradient value of each pixel constituting the edge image;
Selecting third pixels located in an overcoat area corresponding to the first motion map and the second motion map from among pixels constituting the first rendered image, and selecting fourth pixels to be overpainted from among the third pixels Overpainting point determining unit to select;
A difference between a color value given to a stroke pattern selected from a plurality of stroke patterns having different shapes and textures and a color value of a pixel corresponding to the fourth pixel among pixels constituting the second image frame is determined in the first rendered image Stroke pattern selection for selecting a stroke pattern that is smaller than a difference between a color value of a pixel corresponding to the fourth pixel among pixels constituting a pixel and a color value of a pixel corresponding to the fourth pixel among pixels constituting the second image frame part; and
and a rendering unit configured to generate the second rendered image by arranging the selected stroke pattern on the first rendered image in the overlapping direction determined for each of the fourth pixels.
제 3항 또는 제 5항에 있어서,
상기 렌더링부는 상기 제1움직임 맵에 대응하여 결정된 제4픽셀들 각각에 대해 상기 선택된 스트로크 패턴을 상기 제1렌더링 영상에 배치한 후 상기 제2움직임 맵에 대응하여 결정된 제4픽셀들 각각에 대해 상기 선택된 스트로크 패턴을 상기 제1렌더링 영상에 배치하여 상기 제2렌더링 영상을 생성하는 것을 특징으로 하는 회화적 애니메이션 장*.
6. The method according to claim 3 or 5,
The rendering unit arranges the selected stroke pattern for each of the fourth pixels determined in response to the first motion map in the first rendered image, and then applies the selected stroke pattern to each of the fourth pixels determined to correspond to the second motion map. A pictorial animation chapter*, characterized in that the second rendered image is generated by arranging the selected stroke pattern on the first rendered image.
제 1항 내지 제 5항 중 어느 한 항에 있어서,
상기 에지 영상 생성부는 소벨 에지 필터 또는 캐니 에지 필터에 의해 상기 제1영상 프레임에 대응하는 에지 영상을 생성하는 것을 특징으로 하는 회화적 애니메이션 장*.
6. The method according to any one of claims 1 to 5,
The edge image generator generates an edge image corresponding to the first image frame by a Sobel edge filter or a Canny edge filter.
제 1항 내지 제 5항 중 어느 한 항에 있어서,
상기 에지 영상 생성부는 상기 제1영상 프레임을 소정의 양자화 계수에 의해 양자화한 후 양자화된 영상의 명암값의 경계를 에지로 설정하여 상기 제1영상 프레임에 대응하는 에지 영상을 생성하는 것을 특징으로 하는 애니메이션의 회화적 표현 장치.
6. The method according to any one of claims 1 to 5,
The edge image generator generates an edge image corresponding to the first image frame by quantizing the first image frame by a predetermined quantization coefficient and setting a boundary between the contrast values of the quantized image as an edge. A pictorial expression device for animation.
제 2항 내지 제 5항 중 어느 한 항에 있어서,
상기 덧칠방향 결정부는,
상기 제1영상 프레임에서 검출된 에지 상의 픽셀들의 그라디언트 값을 산출하는 그라디언트 산출부;
상기 에지 상의 픽셀들의 그라디언트 값을 크기가 큰 픽셀들로부터 순차적으로 기준 픽셀을 선택하고, 선택된 기준 픽셀을 중심으로 소정의 제1영역 내에 존재하는 에지 상의 다른 픽셀들을 제거하여 강한 에지를 선정하는 강한 에지 선정부; 및
소정의 제2영역 내에 존재하는 상기 강한 에지들의 가중치와 그라디언트의 합을 기초로 산출한 상기 제1영상 프레임을 구성하는 각각의 픽셀들의 그라디언트 크기에 의해 상기 제1영상 프레임을 구성하는 각각의 픽셀들의 덧칠방향을 결정하는 결정부;를 포함하는 것을 특징으로 하는 애니메이션의 회화적 표현 장치.
6. The method according to any one of claims 2 to 5,
The coating direction determining unit,
a gradient calculator for calculating gradient values of pixels on edges detected in the first image frame;
A strong edge selecting a strong edge by sequentially selecting a reference pixel from pixels having a large gradient value of the pixels on the edge, and removing other pixels on the edge existing in a predetermined first area around the selected reference pixel. selection department; and
Each pixel constituting the first image frame is determined by the gradient size of each pixel constituting the first image frame calculated based on the sum of the gradient and the weight of the strong edges existing in the second predetermined region. A pictorial expression device for animation, comprising: a determining unit that determines the overcoating direction.
복수개의 영상 프레임 중에서 시간적으로 앞서는 제1영상 프레임을 구성하는 픽셀들 중에서 상기 제1영상 프레임에 이어지는 제2영상 프레임 상에서의 위치가 이동된 픽셀들의 위치이동정도를 기초로 상기 제2영상 프레임에 대응하는 움직임 벡터를 산출하는 움직임 벡터 산출 단계;
상기 제1영상 프레임에서 에지를 검출하여 에지 영상을 생성하는 에지 영상 생성 단계;
상기 에지 영상을 구성하는 각각의 제1픽셀로부터 상기 제1픽셀의 좌표에 상기 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제1움직임 맵을 생성하는 제1움직임 맵 생성 단계;
상기 제1영상 프레임을 구성하는 픽셀들 중에서 상기 제1픽셀을 제외한 위치가 이동된 각각의 제2픽셀로부터 상기 제2픽셀의 좌표에 상기 움직임 벡터를 가산하여 얻어진 지점까지를 연결하여 제2움직임 맵을 생성하는 제2움직임 맵 생성 단계; 및
상기 제1움직임 맵 및 상기 제2움직임 맵을 기초로 상기 제1영상 프레임에 대응하는 제1렌더링 영상에 대해 덧칠을 수행하여 상기 제2영상 프레임에 대응하는 제2렌더링 영상을 생성하는 렌더링 영상 생성 단계;를 포함하는 것을 특징으로 하는 회화적 애니메이션 방법.
Among the plurality of image frames, among the pixels constituting the temporally preceding first image frame, corresponding to the second image frame based on the degree of movement of the pixels whose positions on the second image frame following the first image frame have been moved. a motion vector calculation step of calculating a motion vector of
an edge image generating step of generating an edge image by detecting an edge in the first image frame;
a first motion map generating step of generating a first motion map by connecting each first pixel constituting the edge image to a point obtained by adding the motion vector to the coordinates of the first pixel;
A second motion map by connecting each second pixel whose position is moved except for the first pixel among pixels constituting the first image frame to a point obtained by adding the motion vector to the coordinates of the second pixel. a second motion map generation step of generating and
Rendering image generation for generating a second rendered image corresponding to the second image frame by performing overpainting on the first rendered image corresponding to the first image frame based on the first motion map and the second motion map Step; Conversational animation method comprising the.
제 10항에 있어서,
상기 렌더링 영상 생성 단계는,
상기 에지 영상을 구성하는 각각의 픽셀들의 그라디언트 값을 기초로 상기 제1영상 프레임을 구성하는 각각의 픽셀들에 대한 덧칠방향을 결정하는 덧칠방향 결정 단계;
상기 제1렌더링 영상을 구성하는 픽셀 중에서 상기 제1움직임 맵 및 상기 제2움직임 맵에 대응하는 덧칠영역에 위치하는 제3픽셀들을 선택하고, 상기 제3픽셀들 중에서 덧칠이 수행될 제4픽셀들을 선택하는 픽셀 선택 단계;
상기 제2영상 프레임을 구성하는 픽셀 중에서 상기 제4픽셀에 대응하는 픽셀의 색상에 해당하는 스트로크 패턴을 선택하는 스트로크 패턴 선택 단계; 및
상기 제1렌더링 영상에 대해 선택된 상기 제4픽셀 각각에 대해 결정된 덧칠 방향으로 상기 선택된 스트로크 패턴을 배치하여 상기 제2렌더링 영상을 생성하는 렌더링 단계;를 포함하는 것을 특징으로 하는 회화적 애니메이션 방법.
11. The method of claim 10,
The rendering image generation step includes:
an overlay direction determining step of determining an overlay direction for each pixel constituting the first image frame based on the gradient values of each pixel constituting the edge image;
Selecting third pixels located in an overcoat area corresponding to the first motion map and the second motion map from among pixels constituting the first rendered image, and selecting fourth pixels to be overpainted from among the third pixels a pixel selection step to select;
a stroke pattern selection step of selecting a stroke pattern corresponding to a color of a pixel corresponding to the fourth pixel from among pixels constituting the second image frame; and
and a rendering step of generating the second rendered image by arranging the selected stroke pattern in the overlapping direction determined for each of the fourth pixels selected for the first rendered image.
제 10항에 있어서,
상기 렌더링 영상 생성 단계는,
상기 에지 영상을 구성하는 각각의 픽셀들의 그라디언트 값을 기초로 상기 제1영상 프레임을 구성하는 각각의 픽셀들에 대한 덧칠방향을 결정하는 덧칠방향 결정 단계;
상기 제1렌더링 영상, 상기 제1움직임 맵 및 상기 제2움직임 맵 상에 소정의 크기를 갖는 격자를 설정하고, 다음의 결정규칙에 의해 상기 제1렌더링 영상에 대해 설정된 격자들 중에서 상기 제1움직임 맵 및 상기 제2움직임 맵 상에 설정된 격자에 대응하는 격자들에 대한 덧칠여부를 결정하는 덧칠여부 결정 단계; 및
상기 제1렌더링 영상에 대해 설정된 격자들 중에서 덧칠이 결정된 격자에 대해 상기 결정된 덧칠 방향으로 복수의 스트로크 패턴 중에서 선택된 스트로크 패턴을 배치하여 상기 제2렌더링 영상을 생성하는 렌더링 단계;를 포함하는 것을 특징으로 하는 회화적 애니메이션 방법:
[결정규칙]
Figure pat00008

여기서, Nall은 임의의 격자 내에 존재하는 픽셀의 수, Nst_motion 및 Nwe_motion은 각각 제1움직임 맵과 제2움직임 맵의 대응하는 격자 내에 존재하는 픽셀의 수, A는 제1움직임 맵에 존재하는 픽셀의 수, C는 제1렌더링 영상에 복수의 스트로크 패턴 중에서 선택된 스트로크 패턴을 적용하여 얻어진 영상과 제1움직임 맵 사이의 배타적 논리합을 수행한 결과로 얻어지는 픽셀의 수, Diff Map(i)는 제2영상 프레임과 제1렌더링 영상 사이의 색상 차이, N은 격자를 포함하는 소정 크기의 영역을 구성하는 픽셀의 수, 그리고, TH1 내지 TH4는 각각에 대해 설정된 임계값이다.
11. The method of claim 10,
The rendering image generation step includes:
an overlay direction determining step of determining an overlay direction for each pixel constituting the first image frame based on the gradient values of each pixel constituting the edge image;
A grid having a predetermined size is set on the first rendered image, the first motion map, and the second motion map, and the first motion among the grids set for the first rendered image according to the following decision rule an overcoat determination step of determining whether to overpaint the grids corresponding to the grids set on the map and the second motion map; and
A rendering step of generating the second rendered image by arranging a stroke pattern selected from a plurality of stroke patterns in the determined overpainting direction with respect to a grid for which an overcoat is determined from among the grids set for the first rendered image. How to do pictorial animation:
[Decision Rule]
Figure pat00008

Here, Nall is the number of pixels present in an arbitrary grid, Nst_motion and Nwe_motion are the number of pixels present in the corresponding grids of the first and second motion maps, respectively, and A is the number of pixels present in the first motion map. Number, C is the number of pixels obtained as a result of performing an exclusive OR between an image obtained by applying a stroke pattern selected from among a plurality of stroke patterns to the first rendered image and the first motion map, and Diff Map(i) is the second image A color difference between the frame and the first rendered image, N is the number of pixels constituting an area of a predetermined size including a grid, and TH1 to TH4 are threshold values set for each.
제 12항에 있어서,
상기 덧칠방향 결정 단계에서, 상기 A/C값이 상기 TH2보다 크면 상기 TH1을 증가시키는 것을 특징으로 하는 회화적 애니메이션 방법.
13. The method of claim 12,
In the step of determining the overcoat direction, if the A/C value is greater than the TH2, the TH1 is increased.
제 10항에 있어서,
상기 렌더링 영상 생성 단계는,
상기 에지 영상을 구성하는 각각의 픽셀들의 그라디언트 값을 기초로 상기 제1영상 프레임을 구성하는 각각의 픽셀들에 대한 덧칠방향을 결정하는 덧칠방향 결정 단계;
상기 제1렌더링 영상을 구성하는 픽셀 중에서 상기 제1움직임 맵 및 상기 제2움직임 맵에 대응하는 덧칠영역에 위치하는 제3픽셀들을 선택하고, 상기 제3픽셀들 중에서 덧칠이 수행될 제4픽셀들을 선택하는 픽셀 선택 단계;
서로 다른 모양과 질감을 갖는 복수의 스트로크 패턴 중에서 선택된 스트로크 패턴에 부여한 색상값과 상기 제2 영상 프레임을 구성하는 픽셀 중에서 상기 제4픽셀에 대응하는 픽셀의 색상값의 차이가 상기 제1렌더링 영상을 구성하는 픽셀 중에서 상기 제4픽셀에 대응하는 픽셀의 색상값과 상기 제2영상 프레임을 구성하는 픽셀 중에서 상기 제4픽셀에 대응하는 픽셀의 색상값의 차이보다 작은 스트로크 패턴을 선택하는 스트로크 패턴 선택 단계; 및
상기 제4픽셀들 각각에 대해 결정된 덧칠 방향으로 상기 선택된 스트로크 패턴을 상기 제1렌더링 영상에 배치하여 상기 제2렌더링 영상을 생성하는 렌더링 단계;를 포함하는 것을 특징으로 하는 회화적 애니메이션 방법.
11. The method of claim 10,
The rendering image generation step includes:
an overlay direction determining step of determining an overlay direction for each pixel constituting the first image frame based on the gradient values of each pixel constituting the edge image;
Selecting third pixels located in an overcoat area corresponding to the first motion map and the second motion map from among pixels constituting the first rendered image, and selecting fourth pixels to be overpainted from among the third pixels a pixel selection step to select;
The difference between a color value given to a stroke pattern selected from a plurality of stroke patterns having different shapes and textures and a color value of a pixel corresponding to the fourth pixel among pixels constituting the second image frame is the first rendered image. A stroke pattern selection step of selecting a stroke pattern smaller than a difference between a color value of a pixel corresponding to the fourth pixel from among the pixels and a color value of a pixel corresponding to the fourth pixel from among pixels constituting the second image frame ; and
and a rendering step of generating the second rendered image by arranging the selected stroke pattern on the first rendered image in the overlapping direction determined for each of the fourth pixels.
제 12항 또는 제 14항에 있어서,
상기 렌더링 단계는,
상기 제1움직임 맵에 대응하여 결정된 제4픽셀들 각각에 대해 상기 선택된 스트로크 패턴을 상기 제1렌더링 영상에 배치하는 스트로크 패턴 배치 단계; 및
상기 제2움직임 맵에 대응하여 결정된 제4픽셀들 각각에 대해 상기 선택된 스트로크 패턴을 상기 제1렌더링 영상에 배치하여 상기 제2렌더링 영상을 생성하는 영상 생성 단계;를 포함하는 것을 특징으로 하는 회화적 애니메이션 방법.
15. The method of claim 12 or 14,
The rendering step is
a stroke pattern arrangement step of arranging the selected stroke pattern for each of the fourth pixels determined to correspond to the first motion map in the first rendered image; and
and an image generating step of generating the second rendered image by arranging the selected stroke pattern for each of the fourth pixels determined in response to the second motion map on the first rendered image. animation method.
제 10항 내지 제 14항 중 어느 한 항에 있어서,
상기 에지 영상 생성 단계에서, 소벨 에지 필터 또는 캐니 에지 필터에 의해 상기 제1영상 프레임에 대응하는 에지 영상을 생성하는 것을 특징으로 하는 회화적 애니메이션 방법.
15. The method according to any one of claims 10 to 14,
In the edge image generating step, a pictorial animation method, characterized in that generating an edge image corresponding to the first image frame by a Sobel edge filter or a Canny edge filter.
제 10항 내지 제 14항 중 어느 한 항에 있어서,
상기 에지 영상 생성 단계에서, 상기 제1영상 프레임을 소정의 양자화 계수에 의해 양자화한 후 양자화된 영상의 명암값의 경계를 에지로 설정하여 상기 제1영상 프레임에 대응하는 에지 영상을 생성하는 것을 특징으로 하는 회화적 애니메이션 방법.
15. The method according to any one of claims 10 to 14,
In the edge image generating step, after quantizing the first image frame by a predetermined quantization coefficient, an edge image corresponding to the first image frame is generated by setting a boundary of a contrast value of the quantized image to an edge. pictorial animation method.
제 11항 내지 제 14항 중 어느 한 항에 있어서,
상기 덧칠방향 결정 단계는,
상기 제1영상 프레임에서 검출된 에지 상의 픽셀들의 그라디언트 값을 산출하는 그라디언트 산출 단계;
상기 에지 상의 픽셀들의 그라디언트 값을 크기가 큰 픽셀들로부터 순차적으로 기준 픽셀을 선택하고, 선택된 기준 픽셀을 중심으로 소정의 제1영역 내에 존재하는 에지 상의 다른 픽셀들을 제거하여 강한 에지를 선정하는 강한 에지 선정 단계; 및
소정의 제2영역 내에 존재하는 상기 강한 에지들의 가중치와 그라디언트의 합을 기초로 산출한 상기 제1영상 프레임을 구성하는 각각의 픽셀들의 그라디언트 크기에 의해 상기 제1영상 프레임을 구성하는 각각의 픽셀들의 덧칠방향을 결정하는 결정 단계;를 포함하는 것을 특징으로 하는 회화적 애니메이션 방법.
15. The method according to any one of claims 11 to 14,
The step of determining the overcoating direction is
a gradient calculation step of calculating gradient values of pixels on edges detected in the first image frame;
A strong edge selecting a strong edge by sequentially selecting a reference pixel from pixels having a large gradient value of the pixels on the edge, and removing other pixels on the edge existing in a predetermined first area around the selected reference pixel. selection stage; and
Each pixel constituting the first image frame is determined by the gradient size of each pixel constituting the first image frame calculated based on the sum of the gradient and the weight of the strong edges existing in the second predetermined region. A pictorial animation method comprising; a determining step of determining an overcoat direction.
제 10항 내지 제 14항 중 어느 한 항에 기재된 회화적 애니메이션 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.
A computer-readable recording medium recording a program for executing the pictorial animation method according to any one of claims 10 to 14 on a computer.
KR1020190168585A 2019-12-17 2019-12-17 Apparatus for painterly animation KR20210077204A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190168585A KR20210077204A (en) 2019-12-17 2019-12-17 Apparatus for painterly animation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190168585A KR20210077204A (en) 2019-12-17 2019-12-17 Apparatus for painterly animation

Publications (1)

Publication Number Publication Date
KR20210077204A true KR20210077204A (en) 2021-06-25

Family

ID=76629030

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190168585A KR20210077204A (en) 2019-12-17 2019-12-17 Apparatus for painterly animation

Country Status (1)

Country Link
KR (1) KR20210077204A (en)

Similar Documents

Publication Publication Date Title
US11534688B2 (en) Method and apparatus for enhanced graphics rendering in a video game environment
Hertzmann Fast paint texture
Lake et al. Stylized rendering techniques for scalable real-time 3d animation
US9710951B2 (en) Techniques for processing image data generated from three-dimensional graphic models
Gooch et al. Artistic vision: painterly rendering using computer vision techniques
US7676086B2 (en) Automatic coloring of pixels exposed during manipulation of image regions
Lu et al. Interactive painterly stylization of images, videos and 3D animations
US8917282B2 (en) Separating water from pigment in procedural painting algorithms
KR100896762B1 (en) Apparatus and method for painterly animation
CN114419297A (en) 3D target camouflage generation method based on background style migration
CN110610504A (en) Pencil drawing generation method and device based on skeleton and tone
Haller et al. A loose and sketchy approach in a mediated reality environment
KR20210077204A (en) Apparatus for painterly animation
CN114049423A (en) Automatic realistic three-dimensional model texture mapping method
Kang et al. Animation for ancient tile mosaics
US7880743B2 (en) Systems and methods for elliptical filtering
Kang et al. Generation of coherent mosaic animations: enhancement and evaluation of temporal coherence
Sauvaget et al. Stylization of lighting effects for images
Yamane et al. A watercolor painting image generation using stroke-based rendering
Kwon et al. Pencil rendering on 3D meshes using convolution
Istead et al. Stylized stereoscopic 3D line drawings from 3D images
Sauvaget et al. Comics stylization from photographs
Kang et al. Landscape painterly rendering based on observation
Ding et al. Object Inflation for Artistic Augmentation in Images and Animations
Neto et al. Message in a bottle: Stylized rendering of sand movies