KR20210080790A - Method of Brush Drawing Effect Data Generation related to Robot Art - Google Patents

Method of Brush Drawing Effect Data Generation related to Robot Art Download PDF

Info

Publication number
KR20210080790A
KR20210080790A KR1020190172727A KR20190172727A KR20210080790A KR 20210080790 A KR20210080790 A KR 20210080790A KR 1020190172727 A KR1020190172727 A KR 1020190172727A KR 20190172727 A KR20190172727 A KR 20190172727A KR 20210080790 A KR20210080790 A KR 20210080790A
Authority
KR
South Korea
Prior art keywords
image
brush
processor
line segment
line segments
Prior art date
Application number
KR1020190172727A
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 KR1020190172727A priority Critical patent/KR20210080790A/en
Publication of KR20210080790A publication Critical patent/KR20210080790A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T3/0056
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/10Selection of transformation methods according to the characteristics of the input images

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

According to an embodiment disclosed in the present document, a brush drawing effect data generation device includes: a memory; and a processor. The processor acquires an image from the memory, converts the acquired image into an image to which a brush effect is applied, extracts line segments from the converted image, and connects adjacent line segments among the line segments to generate strokes and generates drawing data related to a drawing process in units of strokes based on the generated strokes. It is possible to generate a drawing process related to an image with a brush effect applied to an input image.

Description

로봇 아트를 위한 붓 그리기 효과 데이터 생성 장치{Method of Brush Drawing Effect Data Generation related to Robot Art}{Method of Brush Drawing Effect Data Generation related to Robot Art}

본 문서에서 개시되는 다양한 실시 예들은, 로봇 아트 기술과 관련된다.Various embodiments disclosed in this document are related to robot art technology.

전자 장치는 이미지에서 추출된 정보를 기반으로 이미지를 다른 화풍으로 변환할 수 있다. 종래의 이미지 변환은 입력 이미지를 픽셀 단위로 변환하고, 변환된 결과 이미지를 제공하므로 활용 범위가 제한적일 수 있다. The electronic device may convert the image into another style based on information extracted from the image. Conventional image conversion converts an input image in units of pixels and provides a converted result image, so the application range may be limited.

AR/VR 기기 및 로봇 기술이 급속도로 발전함에 따라 해당 기술에 기반한 콘텐츠 개발 및 보급이 이뤄지고 있다. AR/VR 기기는 이미지를 단순히 표시하기 보다는 이미지로부터 추출된 정보(정점 좌표, 정점으로 구성된 선분 등)에 기반하여 다양한 효과를 적용할 수 있다. With the rapid development of AR/VR device and robot technology, content development and distribution based on the technology is being carried out. AR/VR devices can apply various effects based on information extracted from the image (vertex coordinates, line segments composed of vertices, etc.) rather than simply displaying the image.

로봇 아트 분야가 발전함에 따라 로봇에 의한 그리기 과정에 대한 연구가 활발하게 진행되고 있다. 예를 들어, 로봇은 입력 이미지를 기반으로 자동으로 조색이나 붓을 그리는 위치를 결정하고, 결정된 조색이나 위치에 따라 그리는 동작을 수행하여 그림을 완성할 수 있다. 이를 위하여, 모션 복사 시스템은 햅틱 장비를 이용하여 사람의 그리는 과정 정보를 기록하고, 로봇은 상기 기록된 그리는 과정 정보를 재현함에 따라 그림을 완성할 수 있다.As the field of robot art develops, research on the drawing process by robots is being actively conducted. For example, the robot may automatically determine a position to draw a color or a brush based on an input image, and may complete a painting by performing a drawing operation according to the determined color or position. To this end, the motion copy system records information about the drawing process of a person using a haptic device, and the robot can complete the picture by reproducing the recorded drawing process information.

종래 로봇 아트는 그림을 그리는 세밀한 과정 정보가 필요한데 이를 모션 복사 시스템을 필요로 하므로, 광범위하게 활용되기는 어려웠다. 또는 이미지를 분석하여 필요한 과정 정보를 추출하고 이를 이용하여 결과 이미지를 생성하였으나 단순 실선 그리기 등으로 효과가 제한적이었다. Conventional robot art requires detailed process information for drawing, but it requires a motion copy system, so it has been difficult to be widely used. Alternatively, necessary process information was extracted by analyzing the image and the resulting image was generated using this, but the effect was limited by drawing a simple solid line.

본 문서에 개시되는 다양한 실시예들은 입력 이미지에 붓 효과를 적용한 이미지에 관련된 그리기 과정을 생성할 수 있는 붓 효과 그리기 데이터 생성 장치를 제공할 수 있다.Various embodiments disclosed in this document may provide an apparatus for generating brush effect drawing data capable of generating a drawing process related to an image to which a brush effect is applied to an input image.

본 문서에 개시되는 일 실시 예에 따른 전자 장치는, 메모리; 및 프로세서를 포함하고, 상기 프로세서는, 상기 메모리로부터 이미지를 획득하고, 상기 획득한 이미지를 붓 효과가 적용된 이미지로 변환하고, 상기 변환된 이미지로부터 선분들을 추출하고, 상기 선분들 중 인접 선분들을 연결하여 획들을 생성하고, 상기 생성된 획들에 기반하여 획 단위의 그리기 과정과 관련된 그리기 데이터를 생성할 수 있다.An electronic device according to an embodiment disclosed in this document includes: a memory; and a processor, wherein the processor acquires an image from the memory, converts the acquired image into an image to which a brush effect is applied, extracts line segments from the converted image, and adjacent line segments among the line segments. may be connected to generate strokes, and based on the generated strokes, drawing data related to a drawing process in a stroke unit may be generated.

본 문서에 개시되는 다양한 실시 예들에 따르면, 입력 이미지에 효과를 적용한 이미지에 관련된 그리기 과정을 생성할 수 있다. 이 외에, 본 문서를 통해 직접적 또는 간접적으로 파악되는 다양한 효과들이 제공될 수 있다.According to various embodiments disclosed in this document, a drawing process related to an image to which an effect is applied to an input image may be generated. In addition, various effects directly or indirectly identified through this document may be provided.

도 1은 일 실시예에 따른 붓 효과 그리기 데이터 생성 방법을 나타낸다.
도 2는 일 실시예에 따른 붓 효과 그리기 데이터 생성 장치의 구성도를 나타낸다.
도 3은 일 실시예에 따른 에지 이미지, 윤곽선 이미지 및 붓 효과 이미지를 나타낸다.
도 4는 일 실시예에 따른 붓 효과 이미지 생성 과정을 나타낸다.
도 5는 일 실시예에 따른 붓 효과 이미지 재구성 방법을 나타낸다.
도 6은 일 실시예에 따른 세선화 과정의 예시도를 나타낸다.
도 7은 일 실시예에 따른 연결점 분석 과정의 예시도를 나타낸다.
도 8은 일 실시예에 따른 선분 두께 산출 과정의 예시도를 나타낸다.
도 9는 일 실시예에 따른 무효 선분 삭제 과정의 예시도를 나타낸다.
도 10은 일 실시예에 따른 획 생성 과정을 설명하기 위한 예시도를 나타낸다.
도 11은 일 실시예에 따른 획 생성 과정에 관련된 프로그래밍 알고리즘을 나타낸다.
도 12는 일 실시예에 따른 그리기 과정의 붓 두께 구현 방법을 나타낸다.
도 13은 일 실시예에 따른 좌측 상단에 기준한 그리기 과정을 표현한 예시도를 나타낸다.
도면의 설명과 관련하여, 동일 또는 유사한 구성요소에 대해서는 동일 또는 유사한 참조 부호가 사용될 수 있다.
1 illustrates a method of generating brush effect drawing data according to an exemplary embodiment.
2 is a block diagram of an apparatus for generating brush effect drawing data according to an exemplary embodiment.
3 illustrates an edge image, an outline image, and a brush effect image according to an exemplary embodiment.
4 illustrates a process of generating a brush effect image according to an exemplary embodiment.
5 illustrates a method of reconstructing a brush effect image according to an exemplary embodiment.
6 is a diagram illustrating an example of a thinning process according to an embodiment.
7 shows an exemplary diagram of a connection point analysis process according to an embodiment.
8 is a diagram illustrating an example of a line segment thickness calculation process according to an embodiment.
9 is a diagram illustrating an example of an invalid line segment deletion process according to an embodiment.
10 is an exemplary diagram illustrating a stroke generation process according to an embodiment.
11 illustrates a programming algorithm related to a stroke generation process according to an exemplary embodiment.
12 illustrates a method of implementing a brush thickness in a drawing process according to an exemplary embodiment.
13 is an exemplary diagram illustrating a drawing process based on the upper left corner according to an exemplary embodiment.
In connection with the description of the drawings, the same or similar reference numerals may be used for the same or similar components.

도 1은 일 실시예에 따른 로봇 아트를 위한 그리기 데이터 생성 방법을 나타낸다.1 illustrates a method of generating drawing data for robot art according to an exemplary embodiment.

도 1을 참조하면, 동작 110에서, 붓 효과 그리기 데이터 생성 장치는 입력 이미지를 붓 효과가 적용된 붓 효과 이미지로 변환할 수 있다. 예를 들어, 붓 그리기 데이터 생성 장치는 입력 이미지에 펜스타일 필터 및 임계치 필터를 적용함에 따라 입력 이미지를 붓 효과 이미지로 변환할 수 있다.Referring to FIG. 1 , in operation 110 , the apparatus for generating brush effect drawing data may convert an input image into a brush effect image to which a brush effect is applied. For example, the apparatus for generating brush drawing data may convert the input image into a brush effect image by applying a pen style filter and a threshold filter to the input image.

동작 120에서, 붓 그리기 데이터 생성 장치는 붓 효과 이미지를 분석하여 붓 효과 이미지로부터 선분들을 추출할 수 있다. 예를 들어, 붓 그리기 데이터 생성 장치는 붓 효과 이미지에 세선화, 연결점 분석 및 선분 추출을 수행하고, 추출된 선분의 두께 정보를 산출한 후 평탄화를 거쳐 부드러운 선분을 생성할 수 있다. 붓 그리기 데이터 생성 장치는 생성된 선분들 중 무효 선분(예: 지정길이 이하의 선분)을 삭제할 수 있다.In operation 120, the brush drawing data generating apparatus may analyze the brush effect image and extract line segments from the brush effect image. For example, the apparatus for generating brush drawing data may perform thinning, analysis of connection points, and line segment extraction on the brush effect image, calculate thickness information of the extracted line segment, and then generate smooth line segments through flattening. The device for generating brush drawing data may delete invalid line segments (eg, a line segment having a specified length or less) among the generated line segments.

동작 130에서, 붓 그리기 데이터 생성 장치는 추출된 선분들을 연결하여 획(stroke)를 생성할 수 있다. 예를 들어, 붓 그리기 데이터 생성 장치는 추출된 선분들 중 인접 선분들을 연결함에 따라 획들을 생성할 수 있다. In operation 130, the apparatus for generating brush drawing data may generate a stroke by connecting the extracted line segments. For example, the apparatus for generating brush drawing data may generate strokes by connecting adjacent line segments among the extracted line segments.

동작 140에서, 붓 그리기 데이터 생성 장치는 생성된 획들을 재나열하여 그리기 과정에 관련된 그리기 데이터를 생성할 수 있다. 예를 들어, 붓 그리기 데이터 생성 장치는 지정된 기준점에 기반하여 생성된 획들을 재나열하여 그리기 과정을 생성하고, 생성된 그리기 과정에 관련된 그리기 데이터를 생성할 수 있다. 예를 들어, 프로세서(240)는 사용자 입력에 의하여 상기 기준점을 결정하거나, 입력 이미지의 일정(예: 중심점)을 상기 기준점으로 결정할 수 있다. 다른 예를 들어, 프로세서(240)는 상기 생성된 그리기 과정을 붓 그리기 데이터 생성 장치에서 활용 가능한 포맷의 데이터로 변환함에 따라 그리기 데이터를 생성할 수 있다.In operation 140, the apparatus for generating brush drawing data may generate drawing data related to a drawing process by rearranging the generated strokes. For example, the apparatus for generating brush drawing data may generate a drawing process by rearranging the generated strokes based on a specified reference point, and may generate drawing data related to the generated drawing process. For example, the processor 240 may determine the reference point in response to a user input or may determine a predetermined (eg, central point) of an input image as the reference point. As another example, the processor 240 may generate drawing data by converting the generated drawing process into data in a format usable by the brush drawing data generating apparatus.

상술한 실시예에 따르면, 붓 그리기 데이터 생성 장치는 입력 이미지에 대하여 다양한 효과를 표현(또는, 적용)할 수 있고, 모션 복사와 같은 시스템 없이도 입력 이미지에 대하여 붓 그리기 효과가 적용된 이미지를 그리기 할 수 있다.According to the above-described embodiment, the device for generating brush drawing data can express (or apply) various effects to the input image, and can draw an image to which the brush drawing effect is applied on the input image without a system such as motion copying. have.

또한, 상술한 실시예에 따르면, 붓 그리기 데이터 생성 장치는 입력 이미지에서 선분을 추출하고, 인접 선분들을 연결하여 획들을 생성하고, 획을 일정 순서로 재나열한 획 단위의 그리기 과정에 관련된 그리기 데이터를 생성함에 따라 자연스러운 그리기 과정을 지원할 수 있다. Further, according to the above-described embodiment, the apparatus for generating brush drawing data extracts line segments from an input image, generates strokes by connecting adjacent line segments, and draws data related to a drawing process in units of strokes in which the strokes are rearranged in a predetermined order. A natural drawing process can be supported by creating

도 2는 일 실시예에 따른 붓 그리기 데이터 생성 장치의 구성도를 나타낸다.2 is a block diagram of an apparatus for generating brush drawing data according to an exemplary embodiment.

도 2를 참조하면, 일 실시예에 따른 붓 그리기 데이터 생성 장치(200)는 메모리(230) 및 프로세서(240)를 포함할 수 있다. 일 실시 예에서, 붓 그리기 데이터 생성 장치(200)는 일부 구성요소가 생략되거나, 추가적인 구성요소를 더 포함할 수 있다. 예를 들어, 붓 그리기 데이터 생성 장치(200)는 입력 장치(210) 및 출력 장치(220)를 더 포함할 수 있다. 본 문서에서는 붓 그리기 데이터 생성 장치(200)가 입력 장치(210) 및 출력 장치(220)를 더 포함하는 경우를 예로 들어 설명하지만, 이에 한정되지 않는다. 또한, 붓 그리기 데이터 생성 장치(200)의 구성요소들 중 일부가 결합되어 하나의 개체로 구성되되, 결합 이전의 해당 구성요소들의 기능을 동일하게 수행할 수 있다. 일 실시예에 따른 붓 그리기 데이터 생성 장치(200)는 VR/AR 기기 및 로봇 중 적어도 하나의 장치를 포함할 수 있다.Referring to FIG. 2 , the apparatus 200 for generating brush drawing data according to an embodiment may include a memory 230 and a processor 240 . In an embodiment, the apparatus 200 for generating brush drawing data may omit some components or further include additional components. For example, the brush drawing data generating apparatus 200 may further include an input device 210 and an output device 220 . In this document, a case in which the brush drawing data generating apparatus 200 further includes the input device 210 and the output device 220 will be described as an example, but the present invention is not limited thereto. In addition, some of the components of the brush drawing data generating apparatus 200 are combined to form a single object, and functions of the components prior to the combination may be performed identically. The apparatus 200 for generating brush drawing data according to an embodiment may include at least one of a VR/AR device and a robot.

입력 장치(210)는 사용자 입력을 감지 또는 수신할 수 있다. 예를 들어, 입력 장치(210)는 터치 센서 및 물리적 버튼 중 적어도 하나를 포함할 수 있다. 다른 예를 들어, 입력 장치(210)는 입력 이미지를 촬영 가능한 카메라를 포함할 수 있다. The input device 210 may sense or receive a user input. For example, the input device 210 may include at least one of a touch sensor and a physical button. As another example, the input device 210 may include a camera capable of capturing an input image.

출력 장치(220)는 프로세서(240)의 명령에 따른 이미지를 출력하거나, 상기명령에 따른 동작을 수행할 수 있다. 예를 들어, 붓 그리기 데이터 생성 장치(200)가 VR/AR 기기인 경우, 출력 장치(220)는 그리기 데이터에 따른 그리기 과정을 재생하는 디스플레이를 포함할 수 있다. 붓 그리기 데이터 생성 장치(200)가 그리기 과정을 수행 가능한 로봇인 경우, 출력 장치(220)는 로봇 암을 포함할 수 있다. 본 문서에서는 붓 그리기 데이터 생성 장치(200)가 로봇이고 출력 장치(220)가 로봇 암을 조절하는 장치인 경우를 예로 들어 설명한다. The output device 220 may output an image according to a command of the processor 240 or perform an operation according to the command. For example, when the brush drawing data generating apparatus 200 is a VR/AR device, the output device 220 may include a display that reproduces a drawing process according to the drawing data. When the brush drawing data generating device 200 is a robot capable of performing a drawing process, the output device 220 may include a robot arm. In this document, a case in which the device for generating brush drawing data 200 is a robot and the output device 220 is a device for controlling a robot arm will be described as an example.

메모리(230)는 붓 그리기 데이터 생성 장치(200)의 적어도 하나의 구성요소(예: 프로세서(240))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는 예를 들어, 소프트웨어 및 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 예를 들어, 메모리(230)는 그리기 데이터 생성을 위한 적어도 하나의 인스트럭션(instruction)을 저장할 수 있다. 메모리(230)는 휘발성 메모리 또는 비휘발성 메모리를 포함할 수 있다.The memory 230 may store various data used by at least one component (eg, the processor 240 ) of the brush drawing data generating apparatus 200 . Data may include, for example, input data or output data for software and related instructions. For example, the memory 230 may store at least one instruction for generating drawing data. The memory 230 may include a volatile memory or a non-volatile memory.

프로세서(240)는 적어도 하나의 인스트럭션을 실행함에 따라 붓 그리기 데이터 생성 장치(200)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 프로세서(240)는 예를 들어, 중앙처리장치(CPU), 그래픽처리장치(GPU), 마이크로프로세서, 애플리케이션 프로세서(application processor), 주문형 반도체(ASIC(application specific integrated circuit), FPGA(field programmable gate arrays)) 중 적어도 하나를 포함할 수 있으며, 복수의 코어를 가질 수 있다. 프로세서(240)는 붓 효과 적용부(241), 선분 추출부(243), 획 생성부(245) 및 그리기 데이터 생성부(247)를 포함할 수 있다. 붓 효과 적용부(241), 선분 추출부(243), 획 생성부(245) 및 그리기 데이터 생성부(247)는 각각 별도의 하드웨어 모듈이거나 또는 적어도 하나의 프로세서에 의해 구현되는 소프트웨어 모듈일 수 있다. 예를 들어, 붓 효과 적용부(241), 선분 추출부(243), 획 생성부(245) 및 그리기 데이터 생성부(247)가 수행하는 기능은 하나의 프로세서에 의해 수행되거나 또는 각각 별도의 프로세서에 의해 수행될 수도 있다. 이하의 문서에서는 설명의 편의성을 위하여, 붓 효과 적용부(241), 선분 추출부(243), 획 생성부(245) 및 그리기 데이터 생성부(247)의 구성을 구분하지 않고, 프로세서(240)를 주체로 하여 설명한다. The processor 240 may control at least one other component (eg, a hardware or software component) of the brush drawing data generating apparatus 200 by executing at least one instruction, and perform various data processing or operations. can do. The processor 240 may include, for example, a central processing unit (CPU), a graphic processing unit (GPU), a microprocessor, an application processor, an application specific integrated circuit (ASIC), or field programmable gate arrays (FPGA). )), and may have a plurality of cores. The processor 240 may include a brush effect application unit 241 , a line segment extraction unit 243 , a stroke generation unit 245 , and a drawing data generation unit 247 . The brush effect application unit 241 , the line segment extraction unit 243 , the stroke generation unit 245 , and the drawing data generation unit 247 may each be a separate hardware module or a software module implemented by at least one processor. . For example, functions performed by the brush effect application unit 241 , the line segment extraction unit 243 , the stroke generation unit 245 , and the drawing data generation unit 247 are performed by one processor or separate processors. may be performed by In the following document, for convenience of explanation, the configuration of the brush effect application unit 241 , the line segment extraction unit 243 , the stroke generation unit 245 , and the drawing data generation unit 247 is not divided, and the processor 240 . is described as the subject.

일 실시예에 따르면, 프로세서(240)는 메모리(230)로부터 그리기 데이터를 생성할 이미지를 획득할 수 있다. 상기 이미지는 예를 들면, 카메라(입력 장치(210))에 의하여 촬영되어 메모리(230)에 저장된 것일 수 있다. 상기 이미지는 다른 예를 들면, 다른 붓 그리기 데이터 생성 장치로부터 예컨대, 통신 채널을 통해 획득된 것일 수 있다. 이 경우, 붓 그리기 데이터 생성 장치(200)는 통신 회로를 더 포함할 수 있다. According to an embodiment, the processor 240 may obtain an image for generating drawing data from the memory 230 . The image may be, for example, captured by a camera (input device 210 ) and stored in the memory 230 . The image may be obtained from another device for generating brush drawing data, for example, through a communication channel. In this case, the brush drawing data generating apparatus 200 may further include a communication circuit.

일 실시예에 따르면, 프로세서(240)(예: 붓 효과 적용부(241))는 획득된 이미지(또는, 입력 이미지)를 붓 효과 이미지로 변환할 수 있다. 예를 들어, 프로세서(240)는 펜스타일 필터 및 임계치 필터(또는, 가우시안 흐림 필터)를 적용하여 상기 붓 효과 이미지를 생성할 수 있다. 예를 들어, 프로세서(240)는 획득된 이미지를 그레이(gray) 이미지(또는, 단색 이미지)로 변환하고, 그레이 이미지에 가우시안 필터를 적용한 후 인식 정보를 수집하고, 인식 정보에 임계치를 적용하여 붓 효과 이미지를 생성할 수 있다. 이와 관련하여, 프로세서(240)는 Bruce Gooch에 의해 2004년 발표된 캐리커쳐 제작 기법에 따른 Brightness Perception 기반의 흑백 이미지를 생성하는 일러스트레이션 기법에 기반하여 획득된 이미지를 붓 효과 이미지로 변환할 수 있다.According to an embodiment, the processor 240 (eg, the brush effect application unit 241 ) may convert the acquired image (or the input image) into a brush effect image. For example, the processor 240 may generate the brush effect image by applying a pen style filter and a threshold filter (or a Gaussian blur filter). For example, the processor 240 converts the acquired image into a gray image (or a monochrome image), collects recognition information after applying a Gaussian filter to the gray image, and applies a threshold to the recognition information You can create effect images. In this regard, the processor 240 may convert the acquired image into a brush effect image based on an illustration technique for generating a black-and-white image based on Brightness Perception according to a caricature production technique announced in 2004 by Bruce Gooch.

일 실시예에 따르면, 프로세서(240)(예: 선분 추출부(243))는 붓 효과 이미지에 대한 세선화 및 연결점 분석을 통해 붓 효과 이미지로부터 선분을 추출하고, 추출된 선분에 기반하여 재구성된 붓 효과 이미지를 생성할 수 있다. 예를 들어, 프로세서(240)는 붓 효과 이미지 중 붓 터치 영역의 중심선을 따라서 세선을 생성할 수 있다. 프로세서(240)는 생성된 세선에 포함된 점들을 추출하고, 추출된 점들이 주변 점들과 연결된 형태에 따라 상기 주출된 점들을 끝점, 연결점 및 분기점 중 하나의 유형으로 분류할 수 있다. 상기 끝점은 그와 연결된 점이 1개인 점이고, 상기 연결점은 그와 연결된 점이 2개인 점이고, 상기 분기점은 그와 연결된 점이 3개 이상인 점일 수 있다. 프로세서(240)는 분류된 점들의 연결성에 기반하여 세선으로부터 선분들을 추출할 수 있다. 프로세서(240)는 붓 효과 이미지를 반전하여 마스크 이미지(mask image)를 생성하고, 상기 마스크 이미지에 상기 추출된 선분들을 중첩한 후 중첩 영상을 생성할 수 있다. 프로세서(240)는 중첩 영상에서 각 점들이 속한 영역에 대한 선분을 구성하는 모든 점들의 두께(또는, 지름) 정보를 산출할 수 있다. 프로세서(240)는 예를 들면, 중첩 영상에서 선분을 구성하는 각 점들에서 가장 가까운 검은색 픽셀까지의 거리를 산출하고, 산출된 거리에 기반하여 선분 두께 정보(예: 산출된 거리의 2배)를 산출할 수 있다. 프로세서(240)는 산출된 두께 정보에 기반하여 선분들을 평탄화함(또는, 연접한 점들 간의 두께 정보 편차를 줄임)에 따라 부드러운 선분을 생성할 수 있다. 프로세서(240)는 상기 생성된 선분 중에서 지정된 길이 이하의 선분을 노이즈로 간주하여 삭제함에 따라 붓 효과 이미지를 재구성할 수 있다. 이와 관련하여, 프로세서(240)는 선분을 구성하는 점의 개수를 선분의 길이로 확인할 수 있다. According to an embodiment, the processor 240 (eg, the line segment extractor 243 ) extracts a line segment from the brush effect image through thinning and connection point analysis of the brush effect image, and reconstructed based on the extracted line segment. You can create a brush effect image. For example, the processor 240 may generate a thin line along the center line of the brush touch area in the brush effect image. The processor 240 may extract points included in the generated thin line, and classify the extracted points into one type of an endpoint, a connection point, and a branch point according to a shape in which the extracted points are connected to neighboring points. The end point may be a point connected thereto with one point, the connection point may be a point having two points connected thereto, and the branch point may be a point with three or more points connected thereto. The processor 240 may extract line segments from the thin line based on the connectedness of the classified points. The processor 240 may generate a mask image by inverting the brush effect image, superimpose the extracted line segments on the mask image, and then generate an overlapping image. The processor 240 may calculate thickness (or diameter) information of all points constituting a line segment of a region to which each point belongs in the overlapping image. The processor 240 calculates, for example, a distance from each point constituting a line segment in the overlapping image to the nearest black pixel, and line segment thickness information (eg, twice the calculated distance) based on the calculated distance. can be calculated. The processor 240 may generate a smooth line segment by flattening the line segments based on the calculated thickness information (or reducing thickness information deviation between adjacent points). The processor 240 may reconstruct the brush effect image by deleting a line segment having a length less than a specified length among the generated line segments as noise. In this regard, the processor 240 may determine the number of points constituting the line segment as the length of the line segment.

일 실시예에 따르면, 프로세서(240)(예: 획 생성부(245))는 재구성된 붓 효과 이미지에 포함된 선분들 중 인접 선분들을 연결하여 그리기 과정에 관련된 획들을 생성할 수 있다. 예를 들어, 프로세서(240)는 인접 선분들 간의 각도에 기반하여 하나의 획에 포함될 선분을 결정할 수 있다. 프로세서(240)는 예를 들면, 일 선분이 복수의 다른 선분들과 인접하는 경우에 하나의 선분과 복수의 다른 선분들이 만나는 지점의 꺽인 정도(예: 각도)를 확인하고, 복수의 다른 선분들 중 확인된 꺽인 정도가 상대적으로 큰 선분을 일 선분과 연결함에 따라 순차적으로 획을 생성할 수 있다. 프로세서(240)는 생성중인 획과 인접하는 선분이 더 이상 없거나, 하나의 획에 포함될 최대 선분 개수를 초과하면, 생성중인 획에 대한 획 생성 과정을 종료할 수 있다. 프로세서(240)는 획에 포함되지 않는 다른 선분들에 대해서도 상술된 동작을 수행함에 따라 재구성된 붓 효과 이미지에 포함된 모든 선분들에 대하여 획들을 생성할 수 있다.According to an embodiment, the processor 240 (eg, the stroke generator 245 ) may generate strokes related to a drawing process by connecting adjacent line segments among line segments included in the reconstructed brush effect image. For example, the processor 240 may determine a line segment to be included in one stroke based on an angle between adjacent line segments. For example, when one line segment is adjacent to a plurality of other line segments, the processor 240 checks a bending degree (eg, an angle) of a point where one line segment and a plurality of other line segments meet, and a plurality of other line segments Strokes may be sequentially generated by connecting a line segment having a relatively large degree of bending identified among the line segments with one line segment. When there are no more line segments adjacent to the generated stroke or the maximum number of line segments to be included in one stroke is exceeded, the processor 240 may end the stroke generation process for the currently generating stroke. The processor 240 may generate strokes for all the line segments included in the reconstructed brush effect image by performing the above-described operation on other line segments not included in the stroke.

일 실시예에 따르면, 프로세서(240)(예: 그리기 데이터 생성부(247))는 지정된 기준점에 기반하여 생성된 획들을 재나열하여 그리기 과정을 생성할 수있다. 상기 기준점은 피봇(pivot)이라고 불리우며, 예를 들면, 좌상점(왼쪽 위), 우상점(오른쪽 위) 또는 중심점으로 지정될 수 있다. 상기 기준점은 입력 장치(210)를 통해 사용자에 의해 지정될 수 있다. 입력 이미지가 얼굴을 포함할 경우에, 프로세서(240)는 얼굴 검출을 통해서 얼굴의 중심점과 같은 상기 기준점을 결정할 수 있다. 일 실시예에서, 프로세서(240)는 생성된 그리기 과정에 관련된 지정된 포맷의 그리기 데이터를 생성할 수 있다. 상기 지정된 포맷은 그리기 과정을 재현 또는 재생 가능한 다양한 포맷일 수 있다. According to an embodiment, the processor 240 (eg, the drawing data generator 247 ) may generate a drawing process by rearranging the strokes generated based on the specified reference point. The reference point is called a pivot, and may be designated, for example, as an upper left point (upper left), an upper right point (upper right), or a center point. The reference point may be designated by a user through the input device 210 . When the input image includes a face, the processor 240 may determine the reference point, such as a center point of the face, through face detection. In an embodiment, the processor 240 may generate drawing data in a specified format related to the generated drawing process. The specified format may be various formats capable of reproducing or reproducing the drawing process.

일 실시예에 따르면, 입력 이미지는 이미지 좌표계에 따르므로, 상기 재나열된 획들은 (x, y) 값 만을 가질 수 있다. 다양한 두께의 획들을 재현 또는 재생 가능한 그리기 과정을 생성하기 위하여, 프로세서(240)는 상기 산출된 선분 두께 정보에 기반하여 획들에 포함된 각 점과 관련된 z값을 결정할 수 있다. 예를 들어, 프로세서(240)는 선분 두께 정보에 기반하여 로봇 암에 의해 붓 눌림 정도(예: 붓을 누르는 힘)를 결정하고, 출력 장치(220)를 통해 상기 붓 눌림 정도를 조절 가능한 그리기 과정을 생성할 수 있다. According to an embodiment, since the input image follows the image coordinate system, the re-ordered strokes may have only (x, y) values. In order to generate a drawing process capable of reproducing or reproducing strokes of various thicknesses, the processor 240 may determine a z value associated with each point included in the strokes based on the calculated line segment thickness information. For example, the processor 240 determines the degree of brush pressure (eg, the force of pressing the brush) by the robot arm based on the line segment thickness information, and a drawing process in which the degree of brush pressure can be adjusted through the output device 220 . can create

상술한 실시예에 따르면, 붓 그리기 데이터 생성 장치(200)는 입력 이미지에 그대로 그리지 않고, 입력 이미지에 대하여 다양한 효과를 표현(또는, 적용)할 수 있고, 모션 복사와 같은 시스템 없이도 입력 이미지에 대하여 효과를 적용할 수 있다.According to the above-described embodiment, the brush drawing data generating apparatus 200 may express (or apply) various effects to the input image without drawing directly on the input image, and may apply various effects to the input image without a system such as motion copying. effects can be applied.

또한, 상술한 실시예에 따르면, 붓 그리기 데이터 생성 장치(200)는 입력 이미지에서 선분을 추출하고, 인접 선분들을 연결하여 획들을 생성하고, 획을 일정 순서로 재나열한 획 단위의 그리기 과정에 관련된 그리기 데이터를 생성함에 따라 자연스러운 그리기 과정을 수행할 수 있다. Further, according to the above-described embodiment, the brush drawing data generating apparatus 200 extracts a line segment from an input image, generates strokes by connecting adjacent line segments, and re-orders the strokes in a stroke unit drawing process. By generating related drawing data, a natural drawing process can be performed.

또한, 상술한 실시예에 따르면, 붓 그리기 데이터 생성 장치(200)는 상기 붓 눌림 정도에 따라 붓이 지면에 닿는 면적을 조절하여 그리기 과정을 수행함에 따라 그려지는 그림의 선분 두께를 조절할 수 있다.Also, according to the above-described embodiment, the brush drawing data generating apparatus 200 may adjust the thickness of the line segment of the drawing drawn as the drawing process is performed by adjusting the area in which the brush touches the ground according to the degree of the brush pressure.

도 3은 일 실시예에 따른 에지 이미지, 윤곽선 이미지 및 붓 효과 이미지를 나타낸다.3 illustrates an edge image, an outline image, and a brush effect image according to an exemplary embodiment.

도 3을 참조하면, 입력 이미지(310)로부터 기존 방법들(공지된 기술)로부터 에지 이미지(320)를 생성하거나, 윤곽선(contour) 이미지(330)를 생성할 수 있다. 그런데, 에지 이미지(320)에는 특징선 이외에 많은 노이즈가 함께 추출되므로, 추출된 에지 중 유효 에지와 노이즈를 분류할 필요가 있다. 또한, 윤곽선 영상(330)은 노이즈가 상대적으로 적지만, 윤곽선 영상으로부터 객체의 윤곽(예: 얼굴)을 알아보기가 어려울 수 있다. Referring to FIG. 3 , an edge image 320 may be generated from an input image 310 by existing methods (known techniques) or a contour image 330 may be generated. However, since a lot of noise is extracted from the edge image 320 in addition to the feature line, it is necessary to classify the effective edge and the noise among the extracted edges. Also, although the contour image 330 has relatively little noise, it may be difficult to recognize the contour (eg, face) of the object from the contour image.

이와 달리, 일 실시예에 따른 프로세서(240)는 입력 이미지를 붓 효과 이미지(340)로 변환하고, 붓 효과 이미지(340)에 기반하여 그리기 과정을 생성함에 따라 입력 이미지의 특징 선과 특징 선의 두께 변화까지 적절하게 표현할 수 있다.Contrary to this, the processor 240 according to an exemplary embodiment converts the input image into the brush effect image 340 and generates a drawing process based on the brush effect image 340, thereby changing the feature lines of the input image and the thickness of the feature lines. can be properly expressed.

도 4는 일 실시예에 따른 붓 효과 이미지 생성 과정을 나타낸다.4 illustrates a process of generating a brush effect image according to an exemplary embodiment.

도 4를 참조하면, 일 실시예에 따른 프로세서(240)는 입력 이미지(410)를 단색 이미지(또는, 그레이 이미지)로 변환함에 따라 펜 스타일 이미지(420)를 생성할 수 있다. 프로세서(240)는 펜 스타일 이미지(420)에 가우시안 필터를 적용한 후 인식 정보를 수집하고 인식 정보에 임계치를 적용하여 붓 효과 이미지(430)를 생성할 수 있다. 상기 인식 정보는 예를 들면, 가우시안 필터의 적용 전과 적용 후의 픽셀 값의 차이를 가중치 누적한 것일 수 있다. 이와 관련하여, 프로세서(240)는 Bruce Gooch에 의해 2004년 발표된 캐리커쳐 제작 기법에 따른 Brightness Perception 기반의 흑백 이미지를 생성하는 일러스트레이션 기법에 기반하여 획득된 이미지를 붓 효과 이미지로 변환할 수 있다.Referring to FIG. 4 , the processor 240 according to an exemplary embodiment may generate a pen-style image 420 by converting an input image 410 into a monochrome image (or a gray image). After applying the Gaussian filter to the pen style image 420 , the processor 240 may collect recognition information and apply a threshold to the recognition information to generate the brush effect image 430 . The recognition information may be, for example, weight accumulation of a difference between pixel values before and after application of the Gaussian filter. In this regard, the processor 240 may convert the acquired image into a brush effect image based on an illustration technique for generating a black-and-white image based on Brightness Perception according to a caricature production technique announced in 2004 by Bruce Gooch.

도 5는 일 실시예에 따른 붓 효과 이미지 재구성 방법을 나타내고, 도 6, 도 7, 도 8 및 도 9는 일 실시예에 따른 붓 효과 이미지에 기반한 선분 추출 과정을 설명하기 위한 도면들이다.5 is a diagram illustrating a method of reconstructing a brush effect image according to an embodiment, and FIGS. 6, 7, 8, and 9 are diagrams for explaining a line segment extraction process based on a brush effect image according to an embodiment.

도 5 및 도 6을 참조하면, 동작 510에서, 프로세서(240)는 붓 효과 이미지를 세선화할 수 있다. 예를 들어, 프로세서(240)는 붓 효과 이미지 중 붓 터치 영역(예: 도 6의 검은색 영역)의 중심선을 따라서 세선(예: 도 6의 빨간색 실선)을 생성할 수 있다.5 and 6 , in operation 510 , the processor 240 may thin the brush effect image. For example, the processor 240 may generate a thin line (eg, a red solid line of FIG. 6 ) along a center line of the brush touch area (eg, a black region of FIG. 6 ) in the brush effect image.

도 5 및 도 7을 참조하면, 동작 520에서, 프로세서(240)는 생성된 세선에서 점들을 추출하고, 추출된 점들이 주변 점들과 연결된 형태에 따라 상기 주출된 점들을 끝점(예: 도 7의 노란색 점들), 연결점(예: 도 7의 흰색 점들) 및 분기점(예: 도 7의 빨간색 점들) 중 하나의 유형으로 분류할 수 있다. 5 and 7 , in operation 520 , the processor 240 extracts points from the generated thin line, and selects the extracted points as endpoints (eg, in FIG. 7 ) according to a shape in which the extracted points are connected to surrounding points. yellow dots), connection points (eg, white dots in FIG. 7 ), and branching points (eg, red dots in FIG. 7 ).

동작 530에서, 프로세서(240)는 분류된 점들에 기반하여 점들을 연결된 선분들로 추출할 수 있다. 예를 들어, 프로세서(240)는 추출된 선분의 양 끝단에 위치한 점들과 점들의 연결성에 따라 각 선분들을 끝점과 끝점 간의 연결, 끝점과 분기점 간의 연결 및 분기점과 분기점 간의 연결을 포함하는 선분 타입으로 분류(또는, 정의)할 수 있다. In operation 530, the processor 240 may extract points as connected line segments based on the classified points. For example, the processor 240 separates each line segment according to the connectivity of the points and the points located at both ends of the extracted line segment. A line segment type including a connection between an end point and an end point, a connection between an endpoint and a branch point, and a connection between a branch point can be classified (or defined) as

도 5 및 도 8을 참조하면, 동작 540에서, 프로세서(240)는 추출된 선분의 두께 정보(또는, 점의 지름 정보)를 산출할 수 있다. 예를 들어, 프로세서(240)는 붓 효과 이미지를 반전하여 마스크 이미지(810)를 생성하고, 상기 마스크 이미지(810)에 추출된 선분(도 8의 갈색 실선)들 포함하는 이미지(820)를 중첩할 수 있다. 프로세서(240)는 중첩 영상(830)에서 선분을 구성하는 각 점들에서 가장 가까운 검은색 픽셀까지의 거리를 산출하고, 산출된 거리에 기반하여 선분 두께 정보를 산출할 수 있다. 프로세서(240)는 예를 들면, 산출된 거리의 2배를 선분 두께 정보로 산출할 수 있다. 프로세서(240)는 다른 예를 들면, 상기 각 점들에서 상대적으로 가까운 두 개의 검은색 픽셀(마스크 이미지의 픽셀)까지의 거리들을 각기 산출하고, 산출된 거리들을 합산하여 상기 선분 두께 정보를 산출할 수 있다. 이후, 프로세서(240)는 산출된 두께 정보에 기반하여 추출된 선분들을 평탄화함에 따라 부드러운 선분을 생성할 수 있다. 5 and 8 , in operation 540 , the processor 240 may calculate the extracted thickness information (or point diameter information) of the line segment. For example, the processor 240 generates a mask image 810 by inverting the brush effect image, and superimposes an image 820 including extracted line segments (solid brown lines in FIG. 8 ) on the mask image 810 . can do. The processor 240 may calculate a distance from each point constituting a line segment in the overlapped image 830 to the nearest black pixel, and may calculate line segment thickness information based on the calculated distance. The processor 240 may calculate, for example, twice the calculated distance as line segment thickness information. For another example, the processor 240 may calculate the distances from each of the points to two relatively close black pixels (pixels of the mask image), and calculate the line segment thickness information by summing the calculated distances. have. Thereafter, the processor 240 may generate smooth line segments by flattening the extracted line segments based on the calculated thickness information.

도 5 및 도 9를 참조하면, 동작 550에서, 프로세서(240)는 생성된 선분들을 포함하는 이미지(910)에서 지정된 길이 이하의 선분을 노이즈(또는, 무효 선분)로 간주하여 삭제함에 따라 재구성된 붓 효과 이미지(920)를 생성할 수 있다. 예를 들어, 프로세서(240)는 선분을 구성하는 점의 개수를 선분의 길이로 확인할 수 있다. 5 and 9 , in operation 550 , in operation 550 , the processor 240 considers a line segment having a length less than or equal to a specified length in the image 910 including the generated line segments as noise (or invalid line segment) and deletes it and reconstructs it. A brush effect image 920 may be generated. For example, the processor 240 may determine the number of points constituting the line segment as the length of the line segment.

도 10은 일 실시예에 따른 획 생성 과정을 설명하기 위한 예시도를 나타내고, 도 11은 일 실시예에 따른 획 생성 과정에 관련된 프로그래밍 알고리즘나타낸다. 도 10의 경우, 도 8에서 오른쪽 눈 영역의 선분들을 포함하는 이미지(도 8의 810)를 확대 후 반전한 이미지일 수 있다. 도 11에서, 일부 텍스트들은 프로그래밍 알고리즘에 대한 설명일 수 있다. 10 shows an exemplary diagram for explaining a stroke generating process according to an embodiment, and FIG. 11 shows a programming algorithm related to a stroke generating process according to an embodiment. In the case of FIG. 10 , the image including the line segments of the right eye region in FIG. 8 ( 810 of FIG. 8 ) may be enlarged and then inverted. In FIG. 11 , some texts may be descriptions of a programming algorithm.

도 10 및 도 11을 참조하면, 프로세서(240)는 재구성된 붓 효과 이미지에 포함된 선분들 중 인접 선분들을 연결하여 그리기 과정에 관련된 획(stroke)들을 생성할 수 있다. 10 and 11 , the processor 240 may generate strokes related to a drawing process by connecting adjacent line segments among line segments included in the reconstructed brush effect image.

도 10을 참조하면, 오른쪽 눈은 모두 7개의 선분들로 구성된 것을 확인할 수 있다. 선분 단위로 그림을 그리는 경우에는 총 7번의 획으로 선분을 그릴 수 있다. 하지만, 일 실시예에 따르면, 프로세서(240)는 7개의 선분들을 3개의 획으로 생성하여 획 단위로 그리기 과정을 생성함에 따라 3번의 붓 놀림으로 오른쪽 눈을 그리도록 지원할 수 있다. 이를 위해, 프로세서(240)는 선분 ①, 선분 ②, 선분 ③ 및 선분 ④를 포함하는 1획으로 생성하고, 선분 ⑤ 및 선분 ⑥을 포함하는 2획을 생성하고, 선분 ⑦을 포함하는 3획을 생성함에 따라 오른쪽 눈에 대하여 총 3획을 생성할 수 있다. Referring to FIG. 10 , it can be seen that the right eye is composed of all seven line segments. In case of drawing in line segment units, line segments can be drawn with a total of 7 strokes. However, according to an embodiment, the processor 240 may support drawing the right eye with three brush strokes as the seven line segments are generated as three strokes to generate a drawing process in stroke units. To this end, the processor 240 generates one stroke including the line segment ①, the line segment ②, the line segment ③ and the line segment ④, generates two strokes including the line segment ⑤ and the line segment ⑥, and generates three strokes including the line segment ⑦. As it is generated, a total of 3 strokes can be generated for the right eye.

도 11을 참조하면, 프로세서(240)는 인접 선분들을 연결할 때에, 인접 선분들 간의 각도에 기반하여 하나의 획에 포함될 선분을 결정할 수 있다. 예를 들어, 프로세서(240)는 선분 ①에서 시작한 경우에, 선분 ①과 인접한 다른 선분들인 선분 ②와 선분 ③ 중에서 상대적으로 획이 덜 꺽이는 선분 ②를 다음 선분으로 선택할 수 있다. 이와 관련하여, 선분 ①과 선분 ②이 만나는 지점의 각도가 선분 ①과 선분 ⑤가 만나는 지점의 각도보다 크므로, 획이 꺽이는 정도가 적을 수 있다. 이에, 프로세서(240)는 획이 꺽이는 정도가 적은 선분 ②를 다음 선분으로 선택할 수 있다. 마찬가지로, 프로세서(240)는 선분 ②의 다음 선분으로 선분 ③을 선택하고, 선분 ③의 다음 선분으로 선분 ④를 선택할 수 있다. 프로세서(240)는 선분 ④와 연결된 다른 선분이 없으므로, 추가 선분을 연결하지 않고, 선분 ①, 선분 ②, 선분 ③ 및 선분 ④을 포함하는 1획을 생성할 수 있다. 이어서, 프로세서(240)는 획으로 생성되지 않은 선분들 ⑤ 내지 ⑦에 대하여 획 생성 과정을 지속할 수 있다. Referring to FIG. 11 , when connecting adjacent line segments, the processor 240 may determine a line segment to be included in one stroke based on an angle between the adjacent line segments. For example, when starting from the line segment ①, the processor 240 may select, as the next line segment, a line segment ② having a relatively less curved stroke among other line segments adjacent to the line segment ① and a line segment ② and a line segment ③. In this regard, since the angle at the point where the line segments ① and ② meet is greater than the angle at the point where the line segments ① and ⑤ meet, the degree of bending of the stroke may be small. Accordingly, the processor 240 may select the line segment ② having a small degree of bending as the next line segment. Similarly, the processor 240 may select the line segment ③ as the next line segment of the line segment ②, and select the line segment ④ as the next line segment of the line segment ③. Since there is no other line segment connected to the line segment ④, the processor 240 may generate one stroke including the line segment ①, the line segment ②, the line segment ③ and the line segment ④ without connecting the additional line segments. Subsequently, the processor 240 may continue the stroke generation process for the line segments ⑤ to ⑦ that are not generated as a stroke.

이후, 프로세서(240)는 지정된 기준점에 기반하여 생성된 획들을 재나열하여 그리기 과정을 생성하고, 그리기 과정에 관련된 지정된 포맷의 그리기 데이터를 생성할 수 있다. 상기 기준점은 예를 들면, 좌상점, 우상점 또는 중심점으로 지정될 수 있다. Thereafter, the processor 240 may generate a drawing process by reordering the generated strokes based on the designated reference point, and may generate drawing data in a designated format related to the drawing process. The reference point may be, for example, an upper left point, an upper right point, or a center point.

도 12는 일 실시예에 따른 그리기 과정의 붓 두께 구현 방법을 나타낸다.12 illustrates a method of implementing a brush thickness in a drawing process according to an exemplary embodiment.

도 12를 참조하면, 프로세서(240)는 선분들의 두께 정보에 기반하여 그리기 과정과 관련된 붓 눌림 정도를 결정할 수 있다. 입력 이미지는 이미지 좌표계에 따르므로, 상기 생성된 획들은 (x, y) 값 만을 가질 수 있다. 프로세서(240)는 상기 선분 두께 정보에 기반하여 각 획들에 포함된 점들의 z값을 결정할 수 있다. 예를 들어, 프로세서(240)는 선분 두께 정보에 기반하여 로봇 암에 의해 붓 눌림 정도(예: 붓을 누르는 힘)를 결정하고, 결정된 붓 눌림 정도를 각 획들에 포함된 점들과 관련시킬 수 있다. 이에, 프로세서(240)는 출력 장치(220)를 통해 상기 붓 눌림 정도를 조절 가능한 그리기 과정을 생성할 수 있다. 따라서, 프로세서(240)는 일정 두께의 선분들로만 그리기 과정을 생성하던 종래 기술과 달리, 다양한 두께의 선분들을 그릴 수 있는 그리기 과정을 생성할 수 있다. 상술한 실시예에 따르면, 프로세서(240)는 그리기 데이터에 기반하여 그리기 과정을 수행할 때 붓 눌림 정도에 따라 붓이 지면에 닿는 면적을 조절함에 따라 그려질 선의 두께를 조절할 수 있다.Referring to FIG. 12 , the processor 240 may determine the degree of brush pressure related to the drawing process based on the thickness information of the line segments. Since the input image follows the image coordinate system, the generated strokes may have only (x, y) values. The processor 240 may determine z-values of points included in each stroke based on the line segment thickness information. For example, the processor 240 may determine the degree of brush pressure (eg, the force of pressing the brush) by the robot arm based on the line segment thickness information, and associate the determined degree of brush pressure with points included in each stroke. . Accordingly, the processor 240 may generate a drawing process in which the degree of brush pressure can be adjusted through the output device 220 . Accordingly, the processor 240 may generate a drawing process capable of drawing line segments of various thicknesses, unlike the prior art in which a drawing process is generated only with line segments of a certain thickness. According to the above-described embodiment, when performing a drawing process based on drawing data, the processor 240 may adjust the thickness of the line to be drawn by adjusting the area where the brush touches the ground according to the degree of brush pressure.

도 13은 일 실시예에 따른 좌측 상단에 기준한 그리기 과정을 표현한 예시도를 나타낸다.13 is an exemplary diagram illustrating a drawing process based on the upper left corner according to an exemplary embodiment.

도 13을 참조하면, 프로세서(240)는 출력 장치(220)를 통해 좌측 상단을 기준으로 재나열된 획들을 순차적으로 그림에 따라 그리기 과정을 수행할 수 있다. 예를 들어, 프로세서(240)는 로봇 암을 통해 재나열된 획들을 순차적으로 그리기 할 수 있다. 다른 예를 들어, 프로세서(240)는 디스플레이를 통해 재나열된 획들을 순차적으로 표시할 수 있다.Referring to FIG. 13 , the processor 240 may sequentially perform a drawing process on the re-ordered strokes based on the upper left corner through the output device 220 . For example, the processor 240 may sequentially draw the re-ordered strokes through the robot arm. As another example, the processor 240 may sequentially display the re-ordered strokes through the display.

일 실시예에 따르면, 붓 그리기 데이터 생성 장치(예: 도 2의 붓 그리기 데이터 생성 장치(200))는 메모리(예: 도 2의 메모리(230)); 및 프로세서(예: 도 2의 프로세서(240))를 포함하고, 상기 프로세서는 상기 메모리로부터 이미지를 획득하고, 상기 획득된 이미지로부터 선분들을 추출하고, 상기 선분들 중 인접 선분들을 연결하여 획들을 생성하고, 상기 생성된 획들에 기반하여 획 단위의 그리기 과정과 관련된 그리기 데이터를 생성할 수 있다. According to an embodiment, the apparatus for generating brush drawing data (eg, the apparatus 200 for generating brush drawing data of FIG. 2 ) includes a memory (eg, the memory 230 of FIG. 2 ); and a processor (eg, the processor 240 of FIG. 2 ), wherein the processor obtains an image from the memory, extracts line segments from the obtained image, and connects adjacent line segments among the line segments to create a may be generated, and drawing data related to a drawing process in units of strokes may be generated based on the generated strokes.

상기 프로세서는 상기 획득된 이미지를 붓 효과 이미지로 변환하고, 상기 붓 효과 이미지로부터 상기 선분들을 추출할 수 있다. The processor may convert the acquired image into a brush effect image and extract the line segments from the brush effect image.

상기 프로세서는 상기 획득된 이미지에 펜스타일 필터 및 임계치 필터를 적용하여 상기 붓 효과 이미지를 생성할 수 있다. The processor may generate the brush effect image by applying a pen style filter and a threshold filter to the acquired image.

상기 프로세서는 상기 붓 효과 이미지를 세선화하여 점들을 추출하고, 상기 추출된 점들의 연결성에 기반하여 선분들을 추출할 수 있다.The processor may thin the brush effect image to extract points, and extract line segments based on the connectivity of the extracted points.

상기 프로세서는 상기 붓 효과 이미지 중 붓 터치 영역의 중심선을 따라서 세선화를 수행할 수 있다. The processor may perform thinning along a center line of the brush touch area in the brush effect image.

상기 프로세서는 상기 붓 효과 이미지에 대해 세선을 생성하고, 상기 세선에 포함된 상기 점들의 연결 형태에 기반하여 상기 선분들의 선분 타입을 분류하고, 상기 선분 타입에 기반하여 상기 획들을 생성할 수 있다.The processor may generate a thin line with respect to the brush effect image, classify a line segment type of the line segments based on a connection shape of the dots included in the thin line, and generate the strokes based on the line segment type. .

상기 프로세서는 상기 추출된 선분을 구성하는 점들의 두께 정보를 산출하고, 상기 두께 정보를 평탄화함에 따라 상기 선분들에 기반하여 부드러운 선분을 생성할 수 있다.The processor may calculate thickness information of points constituting the extracted line segment, and generate a smooth line segment based on the line segment as the thickness information is flattened.

상기 프로세서는 상기 추출된 선분들 중에서 지정된 길이 이하의 무효 선분을 삭제할 수 있다.The processor may delete an invalid line segment having a length less than or equal to a specified length from among the extracted line segments.

상기 프로세서는 상기 인접 선분들 간의 각도에 기반하여 하나의 획에 포함될 선분을 결정할 수 있다.The processor may determine a line segment to be included in one stroke based on an angle between the adjacent line segments.

상기 프로세서는 지정된 기준점에 기반하여 상기 획들을 재나열함에 따라 상기 그리기 과정을 생성하고, 상기 그리기 과정에 관련된 지정된 포맷의 그리기 데이터를 생성할 수 있다.The processor may generate the drawing process by rearranging the strokes based on a designated reference point, and may generate drawing data in a designated format related to the drawing process.

본 문서의 다양한 실시예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나",“A 또는 B 중 적어도 하나”, "A, B 또는 C", "A, B 및 C 중 적어도 하나” 및 “A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제1", "제2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제1) 구성요소가 다른(예: 제2) 구성요소에, “기능적으로” 또는 “통신적으로”라는 용어와 함께 또는 이런 용어 없이, “커플드” 또는 “커넥티드”라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.It should be understood that the various embodiments of this document and the terms used therein are not intended to limit the technical features described in this document to specific embodiments, and include various modifications, equivalents, or substitutions of the embodiments. In connection with the description of the drawings, like reference numerals may be used for similar or related components. The singular form of the noun corresponding to the item may include one or more of the item, unless the relevant context clearly dictates otherwise. As used herein, “A or B”, “at least one of A and B”, “at least one of A or B”, “A, B or C”, “at least one of A, B and C” and “A, Each of the phrases "at least one of B, or C" may include any one of, or all possible combinations of, items listed together in the corresponding one of the phrases. Terms such as “first”, “second”, or “first” or “second” may simply be used to distinguish the component from other components in question, and may refer components to other aspects (e.g., importance or order) is not limited. that one (eg first) component is "coupled" or "connected" to another (eg, second) component with or without the terms "functionally" or "communicatively" When referenced, it means that one component can be connected to the other component directly (eg by wire), wirelessly, or through a third component.

본 문서에서 사용된 용어 "모듈", "부" 및 "수단"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일실시예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다.As used herein, the terms “module,” “part,” and “means” may include units implemented in hardware, software, or firmware, and include terms such as, for example, logic, logical blocks, components, or circuits; They can be used interchangeably. A module may be an integrally formed part or a minimum unit or a part of the part that performs one or more functions. For example, according to an embodiment, the module may be implemented in the form of an application-specific integrated circuit (ASIC).

본 문서의 다양한 실시예들은 기기(machine)(예: 붓 그리기 데이터 생성 장치(200))에 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리 또는 외장 메모리)(메모리(230))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램)로서 구현될 수 있다. 예를 들면, 기기(예: 붓 그리기 데이터 생성 장치(200))의 프로세서(예: 프로세서(240))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장매체 는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, ‘비일시적’은 저장매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.Various embodiments of the present document are stored in a storage medium (eg, internal memory or external memory) (memory 230) readable by a machine (eg, brush drawing data generating apparatus 200). It may be implemented as software (eg, a program) including one or more stored instructions. For example, a processor (eg, processor 240 ) of a device (eg, brush drawing data generating apparatus 200 ) may call at least one of one or more instructions stored from a storage medium and execute it. . This makes it possible for the device to be operated to perform at least one function according to the at least one command called. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' only means that the storage medium is a tangible device and does not include a signal (eg, electromagnetic wave), and this term is used in cases where data is semi-permanently stored in the storage medium and It does not distinguish between temporary storage cases.

일실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두개의 사용자 장치들(예: 스마트폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to one embodiment, the method according to various embodiments disclosed in this document may be provided in a computer program product (computer program product). Computer program products may be traded between sellers and buyers as commodities. The computer program product is distributed in the form of a machine-readable storage medium (eg compact disc read only memory (CD-ROM)), or via an application store (eg Play Store TM ) or on two user devices ( It can be distributed (eg downloaded or uploaded) directly, online between smartphones (eg: smartphones). In the case of online distribution, at least a part of the computer program product may be temporarily stored or temporarily created in a machine-readable storage medium such as a memory of a server of a manufacturer, a server of an application store, or a relay server.

다양한 실시예들에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있다. 다양한 실시예들에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.According to various embodiments, each component (eg, a module or a program) of the above-described components may include a singular or a plurality of entities. According to various embodiments, one or more components or operations among the above-described corresponding components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (eg, a module or a program) may be integrated into one component. In this case, the integrated component may perform one or more functions of each component of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. . According to various embodiments, operations performed by a module, program, or other component are executed sequentially, in parallel, repeatedly, or heuristically, or one or more of the operations are executed in a different order, or omitted. or one or more other operations may be added.

Claims (1)

붓 그리기 데이터 생성 장치에 있어서,
메모리; 및
프로세서를 포함하고, 상기 프로세서는,
상기 메모리로부터 이미지를 획득하고,
상기 획득된 이미지를 붓 효과 이미지로 변환하고,
상기 변환된 붓 효과 이미지로부터 선분들을 추출하고,
상기 선분들 중 인접 선분들을 연결하여 획들을 생성하고,
상기 생성된 획들에 기반하여 획 단위 그리기 과정과 관련된 그리기 데이터를 생성하는, 붓 그리기 데이터 생성 장치.
A device for generating brush drawing data, comprising:
Memory; and
A processor comprising:
acquiring an image from the memory;
Converting the acquired image to a brush effect image,
Extracting line segments from the converted brush effect image,
generating strokes by connecting adjacent line segments among the line segments;
A brush drawing data generating apparatus for generating drawing data related to a stroke-by-stroke drawing process based on the generated strokes.
KR1020190172727A 2019-12-23 2019-12-23 Method of Brush Drawing Effect Data Generation related to Robot Art KR20210080790A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190172727A KR20210080790A (en) 2019-12-23 2019-12-23 Method of Brush Drawing Effect Data Generation related to Robot Art

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190172727A KR20210080790A (en) 2019-12-23 2019-12-23 Method of Brush Drawing Effect Data Generation related to Robot Art

Publications (1)

Publication Number Publication Date
KR20210080790A true KR20210080790A (en) 2021-07-01

Family

ID=76860402

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190172727A KR20210080790A (en) 2019-12-23 2019-12-23 Method of Brush Drawing Effect Data Generation related to Robot Art

Country Status (1)

Country Link
KR (1) KR20210080790A (en)

Similar Documents

Publication Publication Date Title
JP6636154B2 (en) Face image processing method and apparatus, and storage medium
EP3992919B1 (en) Three-dimensional facial model generation method and apparatus, device, and medium
US10347052B2 (en) Color-based geometric feature enhancement for 3D models
WO2019035155A1 (en) Image processing system, image processing method, and program
US20210158593A1 (en) Pose selection and animation of characters using video data and training techniques
US20220180597A1 (en) Image processing apparatus, image processing method, and program
KR100553850B1 (en) System and method for face recognition / facial expression recognition
US11361467B2 (en) Pose selection and animation of characters using video data and training techniques
US10403038B2 (en) 3D geometry enhancement method and apparatus therefor
KR20210080790A (en) Method of Brush Drawing Effect Data Generation related to Robot Art
CN113313631B (en) Image rendering method and device
CN115330980A (en) Expression migration method and device, electronic equipment and storage medium
CN115797661A (en) Image processing method and device, electronic device and storage medium
CN115222895A (en) Image generation method, device, equipment and storage medium
CN114862716A (en) Image enhancement method, device and equipment for face image and storage medium
JPH11175765A (en) Method and device for generating three-dimensional model and storage medium
KR102374141B1 (en) Costume region removal method for flexible virtual fitting image generation
KR101223857B1 (en) Apparatus and Method for Determining Symmetry of Face
KR101803532B1 (en) Method Controlling Quality of Augmented Reality
CN111144374A (en) Facial expression recognition method and device, storage medium and electronic equipment
JP7459151B2 (en) Information processing device, information processing system, information processing method, and program
US11508083B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
CN116030201B (en) Method, device, terminal and storage medium for generating multi-color hairstyle demonstration image
CN107589834A (en) Terminal device operating method and device, terminal device
JP7117177B2 (en) Area identification device and program