KR101733125B1 - Method of chroma key image synthesis without background screen - Google Patents

Method of chroma key image synthesis without background screen Download PDF

Info

Publication number
KR101733125B1
KR101733125B1 KR1020150162017A KR20150162017A KR101733125B1 KR 101733125 B1 KR101733125 B1 KR 101733125B1 KR 1020150162017 A KR1020150162017 A KR 1020150162017A KR 20150162017 A KR20150162017 A KR 20150162017A KR 101733125 B1 KR101733125 B1 KR 101733125B1
Authority
KR
South Korea
Prior art keywords
image
pixel
value
background
chroma key
Prior art date
Application number
KR1020150162017A
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 KR1020150162017A priority Critical patent/KR101733125B1/en
Priority to PCT/KR2015/012808 priority patent/WO2017086522A1/en
Priority to CN201580021027.1A priority patent/CN107534762A/en
Application granted granted Critical
Publication of KR101733125B1 publication Critical patent/KR101733125B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/74Circuits for processing colour signals for obtaining special effects
    • H04N9/75Chroma key

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Circuits (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

According to an embodiment of the present invention, a chroma key image combining method of a chroma key combining device includes: a step of taking a first image which does not include an object in the background and reading and maintaining color information of the first image; a step of taking a second image which includes the object in the background and reading and maintaining color information of the second image; a step of obtaining an object image from which the background is removed from the second image to extract only the object by removing a color value corresponding to the color information of the first image from the second image; a step of taking an infrared image which includes the object in the background and acquiring an object depth image in which the object is tracked in the infrared image based on depth information read from the infrared image; a step of correcting the object image using the object depth image; and a step of combining the corrected object image with a selected background image. Therefore, the object image necessary for chroma key combination can be accurately and easily obtained even in an environment without the background screen.

Description

배경스크린이 필요 없는 크로마키 영상 합성 방법{METHOD OF CHROMA KEY IMAGE SYNTHESIS WITHOUT BACKGROUND SCREEN}{METHOD OF CHROMA KEY IMAGE SYNTHESIS WITHOUT BACKGROUND SCREEN}

본 발명은 배경스크린이 필요 없는 크로마키 영상 합성 방법에 관한 것으로 더욱 상세하게는 일반적인 배경에서 객체를 촬영한 컬러 영상과 적외선 영상에서 객체를 추출하여 상기 컬러 영상의 객체 픽셀 구멍을 상기 적외선 영상을 통해 보정하고 상기 적외선 영상의 객체 윤곽선을 상기 컬러 영상을 통해 보정한 후 서로 합성함으로써 배경스크린이 없는 환경에서도 크로마키 합성에 필요한 객체 영상을 보다 편리하고 정확하게 획득할 수 있는 배경스크린이 필요 없는 크로마키 영상 합성 방법에 관한 것이다.The present invention relates to a chroma key image synthesis method that does not require a background screen, and more particularly, to a chroma key image synthesis method that extracts an object from a color image and an infrared image in which an object is photographed in a general background, The object contour of the infrared image is corrected through the color image and then synthesized with each other. Thus, even in an environment without a background screen, a chroma key image Lt; / RTI >

일반적인 크로마키(chroma key) 합성 장치를 살펴보면, 특정한 색(chroma)을 키(key)로 지정한 후, 크로마키(chroma key)를 바탕으로 카메라를 통해 촬상된 객체와 배경스크린 영상에서 배경스크린 영상을 다른 배경영상으로 대체하여 합성된 영상을 생성한다. 크로마키(chroma key)는 영상 합성을 위한 것으로, 특정한 색(chroma)을 키(key)로 지정한 후, 주 영상에서 키(key)에 해당하는 화소(pixel)를 다른 영상으로 대체한다. 이때, 크로마키(chroma key)를 수행하는 알고리즘에서 키(key)는 단일한 크로마(chroma) 값이 아니라, 크로마(chroma) 값의 범위를 의미한다. 따라서, 크로마키(chroma key)를 수행하기 위해서는 키(key)가 될 배경스크린(background screen)이 필요하며, 배경스크린의 크로마(chroma) 값의 변위는 작아야 한다. 그리고, 배경스크린과 객체(object)(사람을 포함하여 스크린과 구분되는 모든 물체)는 크로마(chroma)를 기준으로 서로 분리되어 있어야 한다.In a typical chroma key synthesizer, a specific color (chroma) is designated as a key, and a background screen image is displayed on an object captured through a camera based on a chroma key and a background screen image The background image is replaced with another background image to generate a synthesized image. A chroma key is used for image synthesis. After a specific chroma is designated as a key, a pixel corresponding to a key in the main image is replaced with another image. In this case, in an algorithm for performing a chroma key, a key means a range of a chroma value, not a single chroma value. Therefore, to perform a chroma key, a background screen to be a key is required, and a displacement of the chroma value of the background screen must be small. And the background screen and the objects (all objects that are separated from the screen, including people) must be separated from each other by chroma.

이러한 크로마키 기술에 있어서, 배경스크린(background screen)과 객체(object)가 분리되기 위해서는 객체의 색상이 배경의 색상과 같아지지 않도록 미리 계획해야 한다. 아울러, 객체의 색상이 배경의 색상과 다르더라도, 특정 조명 조건하에서는 같아질 수 있으므로 조명 조건을 미리 계획해야 한다. 또한, 객체가 특정한 카메라 연출 기법 하에서 배경(background)과 동일한 크로마(chroma) 범위에 들 수 있으므로 카메라 기법을 미리 계획해야 한다. 또한, 객체가 다른 객체의 등장으로 인해 반사 또는 그림자, 조명 상태의 변화 등을 유발하여 배경과 동일한 색상 범위에 들 수 있으므로, 이를 미리 계획해야 한다. In such a chroma key technique, in order to separate a background screen and an object, it is necessary to plan in advance so that the color of the object does not become the same as the background color. In addition, even if the color of the object is different from the background color, the lighting condition must be planned in advance because it may be the same under certain lighting conditions. In addition, the camera technique must be planned in advance because the object may fall within the same chroma range as the background under a particular camera rendering technique. In addition, objects must be planned in advance because they may fall into the same color range as the background, due to the appearance of other objects, causing reflections, shadows, changes in lighting conditions, and the like.

또한, 객체와 카메라, 조명 등을 미리 계획하기 위해서는 촬영 전에 배경의 크로마키(chroma key) 값을 예상할 수 있어야 한다. 또한, 모든 카메라는 실물의 색상과 기타 상태를 일정 정도 왜곡하기 때문에, 배경스크린의 크로마키(chroma key) 값도 눈으로 보는 키(key) 값과 카메라(camera)를 통해 들어오는 영상신호의 크로마키(chroma key) 값이 차이가 나므로, 이러한 차이를 최소화해야 미리 계획한 색상 구성대로 촬영할 수 있다. 또한, 객체와 조명, 카메라 연출 기법 등에 의해 배경스크린의 크로마(chroma) 성분이 변화될 수 있기 때문에, 이 경우 기준이 되는 키(key) 값도 변할 수 있으므로 이러한 현상이 발생하지 않도록 미리 계획하여야 한다.In addition, in order to plan objects, cameras, lights, etc. in advance, it is necessary to be able to predict the chroma key value of the background before shooting. In addition, since all cameras distort the color and other states of the real thing to a certain degree, the chroma key value of the background screen is also used as a key value for the eye and a chroma key of the video signal coming through the camera Since the chroma key values are different, this difference should be minimized so that you can shoot with a pre-planned color scheme. In addition, since the chroma component of the background screen can be changed by objects, lighting, and a camera rendering technique, a key value to be a reference may be changed in this case. Therefore, it should be planned in advance so that such a phenomenon does not occur .

이와 같이 종래기술에 따른 크로마키 기술은 배경스크린을 필수로 한다. 즉, 크로마키 합성에 필요한 객체를 촬영할 때, 객체가 특정 색상을 갖는 배경스크린에서 위치하도록 하여 촬영한 후, 촬영된 영상에 크로마키잉(chroma keying)을 수행하여 객체만을 추출하여 원하는 영상에 합성하는 방식으로 구현되고 있는 바, 특정 크로마를 갖는 배경스크린에서의 촬영은 필수적이다. 따라서 종래의 크로마키 영상합성을 수행하기 위해서는 배경스크린이 구비된 실내 등의 특정한 공간에서만 영상의 촬영이 가능하다는 불편함이 뒤따른다. 이러한 종래기술의 문제점에 따라 배경스크린 없이 촬영한 영상을 보다 유연하면서 정확도가 높게 크로마키 영상 합성을 수행할 수 있도록 하는 기술의 개발이 요구되고 있다.Thus, the chroma key technology according to the prior art requires a background screen. That is, when an object necessary for chroma key synthesis is photographed, the object is positioned on a background screen having a specific color, and then chroma keying is performed on the captured image to extract only the object, , It is necessary to take a picture on a background screen having a specific chroma. Therefore, in order to perform the conventional chroma key image synthesis, it is inconvenient that the image can be taken only in a specific space such as a room having a background screen. In order to solve the problems of the related art, it is required to develop a technique of performing chroma key image synthesis with flexibility and high accuracy in images taken without a background screen.

공개특허공보 제10-2003-0079316호(2003.10.10.)Patent Document 10-2003-0079316 (October 10, 2003)

본 발명은 상기와 같은 종래 기술을 개선하기 위해 안출된 것으로서, 일반적인 배경에서 객체를 촬영한 컬러 영상과 적외선 영상에서 객체를 추출하여 상기 컬러 영상의 객체 픽셀 구멍을 상기 적외선 영상을 통해 보정하고 상기 적외선 영상의 객체 윤곽선을 상기 컬러 영상을 통해 보정한 후 서로 합성함으로써 배경스크린이 없는 환경에서도 크로마키 합성에 필요한 객체 영상을 보다 편리하고 정확하게 획득할 수 있는 배경스크린이 필요 없는 크로마키 영상 합성 방법을 제공하는 것을 목적으로 한다.The object of the present invention is to provide a method and an apparatus for correcting an object pixel hole of a color image by using an infrared image and extracting an object from a color image and an infrared image, The object contour of the image is corrected through the color image and then synthesized with each other to provide a chroma key image synthesis method that does not require a background screen that can acquire object images necessary for chroma key synthesis more conveniently and accurately even in an environment without a background screen .

상기의 목적을 이루고 종래기술의 문제점을 해결하기 위하여, 본 발명의 일실시예에 따른 크로마키 합성 장치의 크로마키 합성 방법은, 배경(background)에 객체(object)가 포함되지 않은 제1 영상을 촬영하고 상기 제1 영상의 색상정보를 판독하여 유지하는 단계; 상기 배경에 상기 객체가 포함된 제2 영상을 촬영하고 상기 제2 영상의 색상정보를 판독하여 유지하는 단계; 상기 제2 영상에서 상기 제1 영상의 색상정보에 해당하는 색상 값을 제거하여, 상기 제2 영상으로부터 상기 배경이 제거되고 상기 객체만 추출된 객체 영상을 획득하는 단계; 상기 배경에 상기 객체가 포함된 적외선 영상을 촬영하고 상기 적외선 영상으로부터 판독하는 깊이 정보를 통해 상기 적외선 영상에서 상기 객체가 트래킹된 객체 깊이 영상을 획득하는 단계; 상기 객체 영상의 픽셀과 상기 객체 깊이 영상의 픽셀을 서로의 픽셀 정보를 통해 보정하여 상기 객체 영상과 상기 객체 깊이 영상을 합성하여 크로마키 객체 영상을 획득하는 단계; 및 상기 크로마키 객체 영상을 선정된 배경 영상과 합성하는 단계를 포함한다.According to another aspect of the present invention, there is provided a method of composing a chroma key of a chroma key combination apparatus, comprising: receiving a first image including no object in a background; Capturing and storing color information of the first image; Capturing a second image including the object on the background and reading and maintaining color information of the second image; Removing a color value corresponding to the color information of the first image from the second image and obtaining the object image from which the background is removed from the second image and extracting only the object; Capturing an infrared image including the object on the background and obtaining an object depth image in which the object is tracked in the infrared image through depth information read from the infrared image; Acquiring a chroma key object image by synthesizing the object image and the object depth image by correcting pixels of the object image and pixels of the object depth image through mutual pixel information; And compositing the chroma key object image with the selected background image.

또한, 본 발명의 일실시예에 따른 크로마키 합성 장치의 크로마키 합성 방법에 있어서, 상기 제2 영상에서 상기 제1 영상의 색상정보에 해당하는 색상 값을 제거하여, 상기 제2 영상으로부터 상기 배경이 제거되고 상기 객체만 추출된 객체 영상을 획득하는 단계는, 상기 제2 영상의 각 픽셀의 RGB(YUV) 값에 대응하여 상기 제1 영상의 각 픽셀의 RGB(YUV) 값을 영상의 크기(Width*Height)만큼 매칭하는 단계; 상기 제2 영상의 어느 하나의 픽셀 값을 r1, g1, b1이라 하고, 상기 제1 영상의 어느 하나의 픽셀 값을 r2, g2, b2라 하며, 상기 객체 영상의 어느 하나의 픽셀 값을 r3, g3, b3라 하는 경우,

Figure 112015112648620-pat00001
를 연산하는 단계; 및 상기 r3, 상기 g3, 상기 b3 가 각각 0에 수렴하는 경우 해당 픽셀을 상기 배경으로 판독하고, 선정된 임계값 이상인 경우 해당 픽셀을 상기 객체로 판독하는 단계를 포함한다.Further, in the chroma key synthesis method of the chroma key combination apparatus according to an embodiment of the present invention, the chroma key corresponding to the color information of the first image may be removed from the second image, (YUV) value of each pixel of the first image corresponding to the RGB (YUV) value of each pixel of the second image to the size of the image Width * Height); One of the pixel values of the second image is denoted by r1, g1 and b1, one of the pixel values of the first image is denoted by r2, g2 and b2, and one of the pixel values of the object image is denoted by r3, g3, and b3,
Figure 112015112648620-pat00001
; And reading the corresponding pixel as the background when r3, g3, and b3 respectively converge to zero, and reading the pixel as the object if the pixel is greater than the predetermined threshold value.

또한, 본 발명의 일실시예에 따른 크로마키 합성 장치의 크로마키 합성 방법은 상기 r3, 상기 g3, 상기 b3를 연산하는 단계 이후,

Figure 112015112648620-pat00002
의 수식을 통해 상기 상기 r3, 상기 g3, 상기 b3를 보정하는 단계를 더 포함하고, 상기 수식에서, rt, gt, bt는 각 픽셀의 임계값이고, 선정된 시간 동안 촬영되는 배경 영상의 각 픽셀 값 변화를 감지하고, 상기 감지된 상기 각 픽셀 값 변화에서 최소값과 최대값을 연산하여 상기 각 픽셀의 임계값이 산출되는 것을 특징으로 한다.In addition, the chroma key synthesis method of the chroma key synthesizer according to an embodiment of the present invention may further include a step of calculating r3, g3, and b3,
Figure 112015112648620-pat00002
Wherein rt, gt, and bt are threshold values of each pixel, and each pixel of the background image that is photographed during a predetermined period of time includes the step of correcting the r3, g3, And a threshold value of each pixel is calculated by calculating a minimum value and a maximum value in the detected change of each pixel value.

또한, 본 발명의 일실시예에 따른 크로마키 합성 장치의 크로마키 합성 방법에 있어서, 상기 배경에 상기 객체가 포함된 적외선 영상을 촬영하고 상기 적외선 영상으로부터 판독하는 깊이 정보를 통해 상기 적외선 영상에서 상기 객체가 트래킹된 객체 깊이 영상을 획득하는 단계는, 상기 객체 영상의 픽셀 정보를 이용하여, 상기 객체 깊이 영상의 윤곽선에 대한 노이즈를 제거하는 단계; 상기 객체 깊이 영상의 픽셀 정보를 이용하여, 상기 객체 영상이 포함하는 픽셀 구멍에 해당하는 픽셀을 매칭시키는 단계; 및 상기 노이즈가 제거된 객체 깊이 영상과 상기 픽셀 구멍이 매칭된 객체 영상을 합성하는 단계를 포함한다.In another aspect of the present invention, there is provided a chroma key synthesizing method for a chroma key synthesizer, comprising the steps of: capturing an infrared image including the object on the background and reading depth information from the infrared image; The step of acquiring the depth information of the tracked object may include the steps of: removing noise of a contour line of the depth information image using pixel information of the object image; Matching a pixel corresponding to a pixel hole included in the object image using pixel information of the object depth image; And synthesizing the noise-removed object depth image and the object image matched with the pixel hole.

또한, 본 발명의 일실시예에 따른 크로마키 합성 장치의 크로마키 합성 방법의 상기 객체 영상의 픽셀 정보를 이용하여 상기 객체 깊이 영상의 윤곽선에 대한 노이즈를 제거하는 단계에서, 중심픽셀의 기준으로 이웃하는 8개의 픽셀의 값을 확인하여 상기 8개의 픽셀 중 어느 하나라도 값이 없는 경우 상기 중심픽셀 값을 포기하는 영상처리 모폴로지 연산(Morphological Operation) 중 축소(Erosion) 연산을 통해 상기 객체 깊이 영상에 대한 마스킹 영상 노이즈를 제거하는 것을 특징으로 한다.In addition, in the step of removing noise on the contour of the object depth image using pixel information of the object image in the chroma key combination method of the chroma key combination apparatus according to an embodiment of the present invention, Of the eight depths of the object depth image by checking the eight pixel values of the eight depth pixels and discarding the center pixel value if any one of the eight pixels has no value, And removing the masking image noise.

또한, 본 발명의 일실시예에 따른 크로마키 합성 장치의 크로마키 합성 방법의 상기 객체 깊이 영상의 픽셀 정보를 이용하여 상기 객체 영상이 포함하는 픽셀 구멍에 해당하는 픽셀을 매칭시키는 단계는, 중심픽셀의 기준으로 이웃하는 8개의 픽셀의 값을 확인하여 상기 8개의 픽셀 중 어느 하나라도 값이 있는 경우 상기 중심픽셀 값으로 설정하는 영상처리 모폴로지 연산(Morphological Operation) 중 확대(Dilation) 연산을 통해 상기 객체 영상에 대한 마스킹 영상 구멍 채우기 기법을 수행하는 것을 특징으로 한다.The step of matching the pixel corresponding to the pixel hole included in the object image using the pixel depth information of the object depth image of the chroma key combination method of the chroma key combination apparatus according to an embodiment of the present invention includes: (8) of the eight pixels are set as the center pixel value when any one of the eight pixels is a value, and the pixel value And a masking image hole filling technique for the image is performed.

본 발명의 크로마키 합성 장치의 크로마키 합성 방법에 따르면, 블루스크린 등의 배경스크린에서 객체를 촬영하지 않고 일반적인 배경에서 객체를 촬영하는 컬러 영상과 적외선 영상만으로 크로마키 영상 합성에 요구되는 객체에 대한 영상을 보다 정확하면서 편리하게 획득할 수 있는 효과를 얻을 수 있다.According to the chroma key synthesis method of the chroma key composition apparatus of the present invention, it is possible to perform chroma key composition for an object required for chroma key image synthesis using only a color image and an infrared image for taking an object in a general background without shooting an object on a background screen such as a blue screen It is possible to obtain a more accurate and convenient image acquisition.

도 1은 본 발명의 일실시예에 따른 크로마키 합성 장치의 구성을 도시한 블록도이다.
도 2는 본 발명의 일실시예에 따른 크로마키 합성 방법의 흐름을 도시한 순서도이다.
도 3은 본 발명의 일시예에 따른 크로마키 합성 방법의 흐름을 도시한 다른 순서도이다.
도 4는 본 발명의 일실시예에 따른 제1 영상의 일례를 도시한 도면이다.
도 5는 본 발명의 일실시예에 따른 제2 영상의 일례를 도시한 도면이다.
도 6은 본 발명의 일실시예에 따른 제1 영상과 제2 영상 간의 픽셀 연산을 통해 획득되는 객체 영상을 도시한 도면이다.
도 7은 본 발명의 일실시예에 따라 객체 영상에서 발생하는 문제점을 도시한 도면이다.
도 8은 본 발명의 일실시예에 따라 획득되는 객체 깊이 영상을 도시한 도면이다.
도 9는 본 발명의 일실시예에 따라 객체 깊이 영상에 대하여 전경 마스킹 영상 노이즈가 제거된 객체 깊이 영상을 도시한 도면이다.
도 10은 본 발명의 일실시예에 따른 컬러 객체 영상과 적외선 객체 영상을 합성한 크로마키 객체 영상을 도시한 도면이다.
도 11은 본 발명이 일실시예에 따른 크로마키 객체 영상의 전경 마스킹을 도시한 도면이다.
1 is a block diagram showing a configuration of a chroma key synthesizer according to an embodiment of the present invention.
2 is a flowchart showing a flow of a chroma key synthesis method according to an embodiment of the present invention.
3 is another flowchart showing the flow of a chroma key synthesis method according to a temporal example of the present invention.
4 is a diagram illustrating an example of a first image according to an embodiment of the present invention.
5 is a diagram illustrating an example of a second image according to an embodiment of the present invention.
FIG. 6 is a diagram illustrating an object image obtained through a pixel operation between a first image and a second image according to an embodiment of the present invention. Referring to FIG.
FIG. 7 illustrates a problem occurring in an object image according to an exemplary embodiment of the present invention. Referring to FIG.
8 is a view showing an object depth image obtained according to an embodiment of the present invention.
9 is a view showing an object depth image in which foreground masking image noise is removed from an object depth image according to an embodiment of the present invention.
10 is a diagram illustrating a chroma key object image obtained by synthesizing a color object image and an infrared object image according to an embodiment of the present invention.
11 is a diagram illustrating foreground masking of a chroma key object image according to an embodiment of the present invention.

이하에서는 첨부된 도면을 참조하여 본 발명의 실시예를 상세히 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일실시예에 따른 크로마키 합성 장치의 구성을 도시한 블록도이다.1 is a block diagram showing a configuration of a chroma key synthesizer according to an embodiment of the present invention.

본 발명에 따른 배경 스크린이 필요 없는 크로마키 영상 합성 방법을 수행하는 크로마키 합성 장치는 컴퓨팅 디바이스(110), 카메라(121), 적외선 카메라(122), 모니터(130)를 포함하도록 구성될 수 있다. 모니터(130)는 합성 완료된 크로마키 합성 영상을 출력하기 위한 수단일 뿐 반드시 모니터인 것으로 한정되지 않으며, 스마트 단말기 등과 같은 다른 출력 수단을 통해 크로마키 합성 영상을 출력할 수도 있다.A chroma key synthesizer that performs a chroma key image synthesis method that does not require a background screen in accordance with the present invention may be configured to include a computing device 110, a camera 121, an infrared camera 122, and a monitor 130 . The monitor 130 is a means for outputting a synthesized chroma key composite image, but is not limited to a monitor, and may output a chroma key composite image through another output means such as a smart terminal.

카메라(121)는 일정 대상을 영상으로 촬영하기 위한 수단으로 캠코더, 디지털 카메라, 웹카메라 등 카메라의 종류에 한정되지 않고, 영상을 촬영하여 컴퓨팅 디바이스(110)에 입력하기 위한 구성이면 충분하다. 적외선 카메라(122) 또한 적외선 영상을 촬영하여 해당 적외선 영상을 컴퓨팅 디바이스(110)에 전송하는 구성으로 구현될 수 있다. The camera 121 is not limited to a camera such as a camcorder, a digital camera, and a web camera as a means for capturing an image of a certain object, and a configuration for capturing an image and inputting the image to the computing device 110 is sufficient. The infrared camera 122 may also be configured to capture an infrared image and transmit the infrared image to the computing device 110.

컴퓨팅 디바이스(110)은 카메라(121) 및 적외선 카메라(122)를 통해 촬영된 영상을 입력받아 입력 영상을 생성하고, 상기 입력 영상에서 피사체의 외곽선 및 움직임을 추적하며, 추출될 타겟 피사체를 포함하는 영상을 생성하고, 상기 영상과 다른 배경영상을 합성하기 위한 기능을 수행하며, 영상 입력부(111), 영상 처리부(112), 영상 합성부(113), 영상 저장부(114), 및 영상 출력부(115)를 포함할 수 있다. 컴퓨팅 디바이스(110)는 소정의 연산능력을 구비한 프로세서와 운영체제(OS: Operating System)를 포함하는 디바이스로 구현될 수 있다. 예를 들어, 컴퓨팅 디바이스(110)는 PC, MAC, 노트북, 태블릿 PC, 콘솔 게임기, 스마트폰, 스마트패드 등 프로세서와 운영체제를 구비한 다양한 종류의 디바이스로 구현될 수 있다.The computing device 110 receives an image captured through the camera 121 and the infrared camera 122, generates an input image, tracks an outline and a movement of the object in the input image, and includes a target object to be extracted And an image synthesizing unit 113. The image synthesizing unit 113 synthesizes the synthesized image and the background image and synthesizes the synthesized image and the background image. The image input unit 111, the image processing unit 112, the image synthesizing unit 113, (115). The computing device 110 may be implemented as a device including a processor having an operating capability and an operating system (OS). For example, the computing device 110 may be implemented as a variety of devices including a processor and an operating system such as a PC, a MAC, a notebook PC, a tablet PC, a console game machine, a smart phone, and a smart pad.

도 2는 본 발명의 일실시예에 따른 크로마키 합성 방법의 흐름을 도시한 순서도이고, 도 3은 본 발명의 일시예에 따른 크로마키 합성 방법의 흐름을 도시한 다른 순서도이다.FIG. 2 is a flowchart showing a flow of a chroma key synthesis method according to an embodiment of the present invention, and FIG. 3 is another flowchart showing a flow of a chroma key synthesis method according to a temporal example of the present invention.

본 발명의 일실시예에 따르면, 크로마키 합성 장치는 배경(background)에 객체(object)가 포함되지 않은 제1 영상을 촬영하고 상기 제1 영상의 색상정보를 판독하여 유지한다(단계(210)). 상기 제1 영상은 도 4에 도시된 바와 같이 객체가 포함되지 않도록 구현될 수 있다. 상기 제1 영상의 컬러 값을 판독하여 저장한다. 칼라영상의 각 픽셀은 RGB(YUV) 칼라로 8바이트의 3가지 값을 가진다. According to an embodiment of the present invention, the chroma key synthesizer captures a first image that does not include an object in a background and reads and holds color information of the first image (step 210) ). The first image may be implemented such that no object is included as shown in FIG. And reads and stores the color value of the first image. Each pixel of the color image has three values of 8 bytes in RGB (YUV) color.

RGB: Red(8Byte) + Green(8Byte) + Blue(8Byte)RGB: Red (8Byte) + Green (8Byte) + Blue (8Byte)

YUV: Y(8Byte) + U(8Byte) + V(8Byte)
YUV: Y (8 bytes) + U (8 bytes) + V (8 bytes)

Figure 112015112648620-pat00003
Figure 112015112648620-pat00003

영상 크기라 1920 x 1080 인 Full HD 영상의 경우 저장되는 영상의 크기는 1,920(width) x 1,080(height) x 8(Byte) x 3 = 49,766,400(Byte)의 메모리가 필요할 수 있다. 또한, 각 칼라(RGB, YUV)의 R, G, B, Y, U, V 의 각각의 값들은 8Byte 이기 때문에 0 ~ 255의 값을 가진다. 계산의 편의를 위해 위의 값은 0 ~ 1의 실수로 표현하기도 한다.For a full HD video with a video size of 1920 x 1080, the size of the stored video may be 1,920 (width) x 1,080 (height) x 8 (bytes) x 3 = 49,766,400 bytes. The values of R, G, B, Y, U, and V of each color (RGB, YUV) have values of 0 to 255 since they are 8 bytes. For convenience of calculation, the above value may be expressed as a real number from 0 to 1.

상기 크로마키 합성 장치는 상기 배경에 상기 객체가 포함된 제2 영상을 촬영하고 상기 제2 영상의 색상정보를 판독하여 유지한다(단계(220)). 상기 제2 영상은 도 5와 같이 제1 영상과 같은 배경을 가지면서 객체가 포함된 영상을 의미한다. 상기 제2 영상 또한 RGB(YUV) 값으로 메모리에 저장할 수 있다.The chroma key synthesizer captures a second image including the object on the background and reads and maintains color information of the second image (step 220). The second image is an image including an object having the same background as the first image as shown in FIG. The second image may also be stored in the memory as RGB (YUV) values.

상기 크로마키 합성 장치는 상기 제2 영상에서 상기 제1 영상의 색상정보에 해당하는 색상 값을 제거하여, 상기 제2 영상으로부터 상기 배경이 제거되고 상기 객체만 추출된 객체 영상을 획득한다(단계(230)). 상기 추출된 객체 영상은 도 6과 같이 구현될 수 있다. The chroma key combination apparatus removes the color value corresponding to the color information of the first image from the second image and obtains the object image from which the background is removed from the second image and extracts only the object 230). The extracted object image may be implemented as shown in FIG.

단계(230)은, 상기 제2 영상의 각 픽셀의 RGB(YUV) 값에 대응하여 상기 제1 영상의 각 픽셀의 RGB(YUV) 값을 영상의 크기(Width*Height)만큼 매칭하는 단계와, 상기 제2 영상의 어느 하나의 픽셀 값을 r1, g1, b1이라 하고, 상기 제1 영상의 어느 하나의 픽셀 값을 r2, g2, b2라 하며, 상기 객체 영상의 어느 하나의 픽셀 값을 r3, g3, b3라 하는 경우,

Figure 112015112648620-pat00004
를 연산하는 단계와, 상기 r3, 상기 g3, 상기 b3 가 각각 0에 수렴하는 경우 해당 픽셀을 상기 배경으로 판독하고, 선정된 임계값 이상인 경우 해당 픽셀을 상기 객체로 판독하는 단계를 포함한다. Step 230 includes matching the RGB (YUV) value of each pixel of the first image by the image size (Width * Height) corresponding to the RGB (YUV) value of each pixel of the second image, One of the pixel values of the second image is denoted by r1, g1 and b1, one of the pixel values of the first image is denoted by r2, g2 and b2, and one of the pixel values of the object image is denoted by r3, g3, and b3,
Figure 112015112648620-pat00004
And reading the corresponding pixel as the background if the r3, the g3, and the b3 converge to 0, and reading the corresponding pixel as the object if the pixel is larger than the predetermined threshold value.

또한, 상기 r3, 상기 g3, 상기 b3를 연산하는 단계 이후,

Figure 112015112648620-pat00005
의 수식을 통해 상기 상기 r3, 상기 g3, 상기 b3를 보정하는 단계를 더 포함할 수 있다. 상기 수식에서, rt, gt, bt는 각 픽셀의 임계값이고, 선정된 시간 동안 촬영되는 배경 영상의 각 픽셀 값 변화를 감지하고, 상기 감지된 상기 각 픽셀 값 변화에서 최소값과 최대값을 연산하여 상기 각 픽셀의 임계값이 산출될 수 있다.After calculating r3, g3, and b3,
Figure 112015112648620-pat00005
And correcting the r3, the g3, and the b3 through the following equation. In the above equation, rt, gt, and bt are threshold values of each pixel, and a change in each pixel value of a background image photographed for a predetermined time is detected, and a minimum value and a maximum value are calculated The threshold value of each pixel can be calculated.

단계(230)에서, 제2 영상의 한 픽셀의 값 RGB(YUV)에서 제1 영상의 대응되는 한 픽셀 RGB(YUV) 값을 영상의 크기인 width * height 만큼 수행한다. 제2 영상의 한픽셀을 r1, g1, b1 로 하고 제1 영상의 한픽셀을 r2, g2, b2로 하며, 객체 영상의 한픽셀을 r3, g3, b3 이라고 했을 때,

Figure 112015112648620-pat00006
의 각 값을 산출한다. 따라서 r3, g3, b3 이 0에 한없이 가까워 질 때 해당 픽셀은 배경으로 인식하게 되고 차이가 크면 전경으로 인식할 수 있다. 이 때, 제2 영상의 배경의 변화(조도 변화 및 기타 환경변화)로 인하여 의도치 않은 값이 생길 경우 이를 보정하기 위한, 각각의 칼라 값의 임계치 rt, gt, bt를 정해 이를 보정할 수 있다. 따라서 최종 알고리즘은 다음과 같다.In step 230, a corresponding one pixel RGB (YUV) value of the first image in the value RGB (YUV) of one pixel of the second image is performed by width * height, which is the size of the image. When one pixel of the second image is represented by r1, g1, and b1, one pixel of the first image is represented by r2, g2, and b2, and one pixel of the object image is represented by r3, g3,
Figure 112015112648620-pat00006
Respectively. Therefore, when r3, g3, and b3 are close to zero, the corresponding pixel is recognized as the background, and if the difference is large, it can be recognized as the foreground. At this time, if an unintended value occurs due to a change in the background of the second image (change in illuminance and other environment), the threshold value rt, gt, bt of each color value for correcting the unintended value can be corrected and corrected . Therefore, the final algorithm is as follows.

Figure 112015112648620-pat00007
Figure 112015112648620-pat00007

if(r3 < 0 && g3 < 0 && b3 < 0) 조건이 만족하면 배경 픽셀이고 그렇지 않은 경우 전경 픽셀로 인식할 수 있다.If (r3 <0 && g3 <0 && b3 <0) condition is satisfied, it can be recognized as background pixel, otherwise it can be recognized as foreground pixel.

임계치 rt, gt, bt 구하기에 있어서, 칼라영상 크로마키의 핵심은 rt, gt, bt의 값을 얻는데 있으므로, 본 발명에서는 위의 값을 얻는데 있어 수동방식과 자동방식 두 가지 방식이 구현될 수 있다. 우선, 수동 방식의 경우 위의 3가지 값을 사용자가 직접 입력하여 전체 픽셀에 적용하게 된다. 이때 결과 값을 직접 눈으로 확인하여 최상의 결과가 나오는 3가지 값을 지정할 수 있다. 이러한 수동방식은 한번에 값을 얻을 수 있는 장점이 있다. 또한, 자동 방식의 경우 일정한 시간(약 10초) 정도 배경이 될 영상을 촬영하여 각각 픽셀의 값이 변화하는 최소치 와 최대치를 구해 각각의 픽셀의 3가지 임계치를 구하게 된다. 이러한 자동방식은 각각 픽셀마다 임계치 값이 다르므로 정확한 결과를 얻을 수 있는 장점이 있다. Since the values of rt, gt, and bt are obtained at the core of the color image chroma key in obtaining the threshold values rt, gt, and bt, in the present invention, two methods can be implemented in order to obtain the above values . First, in the case of the manual method, the user inputs the above three values and applies them to all the pixels. At this time, you can visually check the result value and specify three values that give the best result. This manual approach has the advantage of being able to obtain values at once. In the case of the automatic method, a background image is photographed for a predetermined time (about 10 seconds), and three threshold values of each pixel are obtained by finding the minimum and maximum values of the pixel values. This automatic method has an advantage of obtaining an accurate result because the threshold value is different for each pixel.

단계(230)을 통해 획득된 컬러 객체 영상은 해당 픽셀의 칼라 값을 기준으로 전경 영상을 구하기 때문에 배경 영상과 같은 색상일 경우 도 7에 도시된 바와 같이 빨간색 테두리처럼 홀이 생기게 된다.Since the foreground image is obtained on the basis of the color value of the corresponding color object image obtained in the step 230, if the foreground image is the same color as the background image, holes are formed like a red frame as shown in FIG.

이를 보완하기 위하여, 상기 크로마키 합성 장치는 상기 배경에 상기 객체가 포함된 적외선 영상을 촬영하고 상기 적외선 영상으로부터 판독하는 깊이 정보를 통해 상기 적외선 영상에서 상기 객체가 트래킹된 객체 깊이 영상을 획득한다(단계(240)). 상기 객체 깊이 영상은 도 8과 같이 획득될 수 있다. In order to compensate for this, the chroma key synthesizer captures an infrared image including the object on the background and acquires an object depth image on which the object is tracked in the infrared image through depth information read from the infrared image Step 240). The object depth image can be obtained as shown in FIG.

상기 크로마키 합성 장치는 RGB 영상뿐만 아니라 특정한 적외선 점 패턴을 물체에 투영하여 점 패턴의 특성을 분석하여 깊이 정보를 획득하고 스켈레톤 트랙킹을 제공할 수 있다. 상기 크로마키 합성 장치는 깊이 영상 생성을 위해 물체에 반사되어 돌아오는 적외선의 패턴을 수광센서로 검출할 수 있다. 하지만 발광장치와 수광센서간의 거리 차이로 인한 사각 지대 발생, 매끄러운 물체 표면으로 인하여 적외선의 난반사가 적게 일어나 수광센서로 레이저가 돌아오지 못하는 경우에 적외선 패턴을 감지할 수 없기 때문에 검출되지 않은 위치에 대한 값은 깊이 영상에서 홀(hole)의 형태로 나타날 수 있다. 또한 깊이 정보의 불연속점과 적외선 송출부가 수직일 경우에는 객체 경계 주변에 홀이 발생할 수 있으므로, 따라서 각각의 깊이 영상을 동영상으로 연속 재생 할 경우 경계 주변의 흔들림 현상을 확인할 수 있으며 가상 시점 영상을 생성하기 위해서는 이러한 흔들림 현상을 제거할 수 있다. 깊이 영상은 적외선 영사기에서 조사한 적외선 패턴을 적외선 카메라로 읽어 패턴 매칭 방식으로 생성할 수도 있다. The chroma key synthesizer can acquire depth information and provide skeleton tracking by analyzing characteristics of a dot pattern by projecting not only RGB images but also specific infrared dot patterns onto an object. The chroma key synthesizer can detect a pattern of infrared ray reflected by an object and generate a depth image using a light receiving sensor. However, due to the occurrence of a blind spot due to the difference in distance between the light emitting device and the light receiving sensor, the diffuse reflection of the infrared rays due to the smooth surface of the object is small and the infrared ray pattern can not be detected when the laser can not return to the light receiving sensor. The value may appear as a hole in the depth image. In addition, if the discontinuity of the depth information and the vertical direction of the infrared ray emitting part are vertical, a hole may be formed around the object boundary. Therefore, when each depth image is continuously reproduced as a moving image, In order to do so, it is possible to eliminate such fluctuation. The depth image can be generated by a pattern matching method by reading an infrared ray pattern inspected by an infrared ray projector with an infrared camera.

상기 크로마키 합성 장치는 상기 객체 영상의 픽셀과 상기 객체 깊이 영상의 픽셀을 서로의 픽셀 정보를 통해 보정하여 상기 객체 영상과 상기 객체 깊이 영상을 합성하여 크로마키 객체 영상을 획득한다(단계(250)). The chroma key synthesizer corrects the pixel of the object image and the pixel of the object depth image through pixel information of each other to synthesize the object image and the object depth image to obtain a chroma key object image (step 250) ).

단계(250)은 상기 객체 영상의 픽셀 정보를 이용하여, 상기 객체 깊이 영상의 윤곽선에 대한 노이즈를 제거하는 단계와, 상기 객체 깊이 영상의 픽셀 정보를 이용하여, 상기 객체 영상이 포함하는 픽셀 구멍에 해당하는 픽셀을 매칭시키는 단계와, 상기 노이즈가 제거된 객체 깊이 영상과 상기 픽셀 구멍이 매칭된 객체 영상을 합성하는 단계를 포함한다.In operation 250, the noise of the outline of the object depth image is removed using the pixel information of the object image, and the pixel depth of the object depth image is calculated using the pixel information of the object depth image. Matching the corresponding pixels with each other, and synthesizing the noise-removed object depth image and the object image matched with the pixel hole.

상기 객체 영상의 픽셀 정보를 이용하여, 상기 객체 깊이 영상의 윤곽선에 대한 노이즈를 제거하는 단계에서, 상기 크로마키 합성 장치는 중심픽셀의 기준으로 이웃하는 8개의 픽셀의 값을 확인하여 상기 8개의 픽셀 중 어느 하나라도 값이 없는 경우 상기 중심픽셀 값을 포기하는 영상처리 모폴로지 연산(Morphological Operation) 중 축소(Erosion) 연산을 통해 상기 객체 깊이 영상에 대한 마스킹 영상 노이즈를 제거할 수 있다. Wherein the chroma key combination apparatus identifies eight neighboring pixels on the basis of a center pixel and outputs the eight pixels of the object pixel based on the pixel information of the object image, The masking image noise of the object depth image can be removed by performing an erosion operation among the morphological operations of discarding the center pixel value.

또한, 상기 객체 깊이 영상의 픽셀 정보를 이용하여, 상기 객체 영상이 포함하는 픽셀 구멍에 해당하는 픽셀을 매칭시키는 단계에서, 상기 크로마키 합성 장치는 중심픽셀의 기준으로 이웃하는 8개의 픽셀의 값을 확인하여 상기 8개의 픽셀 중 어느 하나라도 값이 있는 경우 상기 중심픽셀 값으로 설정하는 영상처리 모폴로지 연산(Morphological Operation) 중 확대(Dilation) 연산을 통해 상기 객체 영상에 대한 마스킹 영상 구멍 채우기 기법을 수행할 수 있다.Also, in the step of matching pixels corresponding to the pixel holes included in the object image using the pixel depth information of the object depth image, the chroma key synthesizer may calculate values of eight neighboring pixels based on the center pixel And performs a masking image hole filling technique on the object image through a dilation operation in an image processing morphological operation in which any one of the eight pixels is set as the center pixel value .

상기 크로마키 합성 장치는 도 9에 도시된 바와 같이 영상처리 모폴로지 연산중 축소(Erosion) 연산을 통하여 마스킹 영상 잡음 제거할 수 있다. As shown in FIG. 9, the chroma key synthesizer may remove masking image noise through an erosion operation during the image processing morphology operation.

- 축소연산 (Erosion 알고리즘)- reduction operation (Erosion algorithm)

Figure 112015112648620-pat00008

Figure 112015112648620-pat00008

위와 같이 중심픽셀을 기점으로 이웃하는 8개의 픽셀의 값을 확인하여 8개의 픽셀중 하나라도 값이 없는 경우 중심픽셀 값을 포기할 수 있다.As described above, by checking the values of eight neighboring pixels starting from the center pixel, if any one of the eight pixels does not exist, the center pixel value can be abandoned.

상기 크로마키 합성 장치는 영상처리 모폴로지 연산중 확대(Dilation) 연산을 통하여 마스킹 영상 구멍 채우기 기법을 수행할 수 있다. The chroma key synthesizer may perform a masking image hole filling technique through a dilation operation during the image processing morphology operation.

- 확대연산 (Dilation 알고리즘)- Dilation algorithm (Dilation algorithm)

Figure 112015112648620-pat00009

Figure 112015112648620-pat00009

위와 같이 중심픽셀을 기점으로 이웃하는 8개의 픽셀의 값을 확인하여 8개의 픽셀중 하나라도 값이 있을 경우 중심픽셀 값을 가지게 될 수 있다.As described above, if the value of one of eight pixels is found by checking the values of eight neighboring pixels starting from the center pixel, the center pixel value can be obtained.

상기 크로마키 합성 장치는 도 10과 도 11에 도시된 바와 같이 컬러 객체 영상과 적외선 객체 영상의 각 단점을 보완하여 두 영상을 합성할 수 있다. 도 11에 있어서, 칼라영상 전경 마스킹 중 검은색의 값은 0, 빨간색의 값은 255 이고, 적외선영상 전경 마스킹 중 검은색의 값은 0, 녹색의 값은 255 이다. 이 때, a)영상과 b)영상의 값을 합치면, 3가지 값이 나오는데, 0, 255, 510 이다. 결과 값이 0 이면 배경이미지로 결정할 수 있고, 결과 값이 255 이면 전경 칼라로 간주할 수 있다. 또한, 결과 값이 510 이면 전경 칼라로 결정할 수 있다. 또한, 결과 값이 255 인 경우는 a)와 b)중 전경 칼라로 간주 할 수 있기 때문에 주변 픽셀을 조사하여 255이상이 분포하고 있으면 전경으로 결정하고 0 값이 있을 경우에는 배경으로 결정할 수 있다. As shown in FIGS. 10 and 11, the chroma key synthesizer can synthesize two images by complementing the respective disadvantages of the color object image and the infrared object image. 11, the black color value is 0, the red color value is 255, and the black color value is 0 and the green color value is 255 in the foreground masking of the infrared image. In this case, when the values of a) image and b) image are combined, there are three values, 0, 255, and 510. If the result value is 0, it can be determined as the background image. If the result value is 255, it can be regarded as the foreground color. If the result is 510, the foreground color can be determined. If the result value is 255, it can be regarded as a foreground color in a) and b). Therefore, it is possible to determine the foreground if the 255 or more pixels are distributed. If the value is 0, the background can be determined.

상기 크로마키 합성 장치는 이러한 방법에 따라 획득한 상기 크로마키 객체 영상을 선정된 배경 영상과 합성하여 크로마키 영상 합성을 수행할 수 있다(단계(260)).The chroma key synthesizer may perform chroma key image synthesis by synthesizing the chroma key object image obtained according to this method with the selected background image (step 260).

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

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

그러므로, 본 발명의 범위는 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined by the equivalents of the claims, as well as the claims.

110: 컴퓨팅 디바이스
121: 카메라
122: 적외선 카메라
130: 모니터
110: computing device
121: camera
122: Infrared camera
130: Monitor

Claims (7)

배경(background)에 객체(object)가 포함되지 않은 제1 영상을 촬영하고 상기 제1 영상의 색상정보를 판독하여 유지하는 단계;
상기 배경에 상기 객체가 포함된 제2 영상을 촬영하고 상기 제2 영상의 색상정보를 판독하여 유지하는 단계;
상기 제2 영상의 각 픽셀의 RGB(YUV) 값에 대응하여 상기 제1 영상의 각 픽셀의 RGB(YUV) 값을 영상의 크기(Width*Height)만큼 매칭하는 단계와, 상기 제2 영상의 어느 하나의 픽셀 값을 r1, g1, b1이라 하고, 상기 제1 영상의 어느 하나의 픽셀 값을 r2, g2, b2라 하며, 상기 객체 영상의 어느 하나의 픽셀 값을 r3, g3, b3라 하는 경우,
Figure 112016097283011-pat00023
를 연산하는 단계와, 상기 r3, 상기 g3, 상기 b3를 연산하는 단계 이후, 선정된 시간 동안 촬영되는 배경 영상의 각 픽셀 값 변화를 감지하고 상기 감지된 상기 각 픽셀 값 변화에서 최소값과 최대값을 연산하여 산출되는 각 픽셀의 임계값인 rt, gt, bt가 적용되는
Figure 112016097283011-pat00024
의 수식을 통해 상기 r3, 상기 g3, 상기 b3를 보정하는 단계와, 상기 r3, 상기 g3, 상기 b3 가 각각 0에 수렴하는 경우 해당 픽셀을 상기 배경으로 판독하고, 선정된 임계값 이상인 경우 해당 픽셀을 상기 객체로 판독하는 단계를 통해, 상기 제2 영상에서 상기 제1 영상의 색상정보에 해당하는 색상 값을 제거하여 상기 제2 영상으로부터 상기 배경이 제거되고 상기 객체만 추출된 객체 영상을 획득하는 단계;
상기 배경에 상기 객체가 포함된 적외선 영상을 촬영하고 상기 적외선 영상으로부터 판독하는 깊이 정보를 통해 상기 적외선 영상에서 상기 객체가 트래킹된 객체 깊이 영상을 획득하는 단계;
상기 객체 영상의 픽셀과 상기 객체 깊이 영상의 픽셀을 서로의 픽셀 정보를 통해 보정하여 상기 객체 영상과 상기 객체 깊이 영상을 합성하여 크로마키 객체 영상을 획득하는 단계; 및
상기 크로마키 객체 영상을 선정된 배경 영상과 합성하는 단계
를 포함하는 것을 특징으로 하는 크로마키 합성 장치의 크로마키 합성 방법.
Capturing a first image that does not include an object in a background and reading and maintaining color information of the first image;
Capturing a second image including the object on the background and reading and maintaining color information of the second image;
(YUV) value of each pixel of the first image corresponding to the RGB (YUV) value of each pixel of the second image by the size of the image (Width * Height) One pixel value is referred to as r1, g1, and b1, one of the pixel values of the first image is referred to as r2, g2, and b2, and one of the pixel values of the object image is referred to as r3, g3, ,
Figure 112016097283011-pat00023
Calculating a minimum value and a maximum value from a change in each pixel value detected in the step of calculating r3, g3, and b3, detecting a change in each pixel value of a background image photographed during a predetermined period of time, Rt, gt, and bt, which are threshold values of each pixel calculated and calculated, are applied
Figure 112016097283011-pat00024
And correcting the r3, the g3, and the b3 through a formula of a pixel of interest, and if the r3, the g3, and the b3 converge to 0, the corresponding pixel is read as the background, The color value corresponding to the color information of the first image is removed from the second image to obtain the object image from which the background is removed and only the object is extracted from the second image step;
Capturing an infrared image including the object on the background and obtaining an object depth image in which the object is tracked in the infrared image through depth information read from the infrared image;
Acquiring a chroma key object image by synthesizing the object image and the object depth image by correcting pixels of the object image and pixels of the object depth image through mutual pixel information; And
Synthesizing the chroma key object image with the selected background image
Wherein the chroma-key synthesizing method comprises the steps of:
삭제delete 삭제delete 제1항에 있어서,
상기 객체 영상의 픽셀과 상기 객체 깊이 영상의 픽셀을 서로의 픽셀 정보를 통해 보정하여 상기 객체 영상과 상기 객체 깊이 영상을 합성하여 크로마키 객체 영상을 획득하는 단계는,
상기 객체 영상의 픽셀 정보를 이용하여, 상기 객체 깊이 영상의 윤곽선에 대한 노이즈를 제거하는 단계;
상기 객체 깊이 영상의 픽셀 정보를 이용하여, 상기 객체 영상이 포함하는 픽셀 구멍에 해당하는 픽셀을 매칭시키는 단계; 및
상기 노이즈가 제거된 객체 깊이 영상과 상기 픽셀 구멍이 매칭된 객체 영상을 합성하는 단계
를 포함하는 것을 특징으로 하는 크로마키 합성 장치의 크로마키 합성 방법.
The method according to claim 1,
The step of correcting the pixel of the object image and the pixel of the object depth image through pixel information of each other to synthesize the object image and the object depth image to obtain a chroma key object image,
Removing noise from a contour of the object depth image using pixel information of the object image;
Matching a pixel corresponding to a pixel hole included in the object image using pixel information of the object depth image; And
Synthesizing the noise-removed object depth image and the object image matched with the pixel hole
Wherein the chroma-key synthesizing method comprises the steps of:
제4항에 있어서,
상기 객체 영상의 픽셀 정보를 이용하여, 상기 객체 깊이 영상의 윤곽선에 대한 노이즈를 제거하는 단계에서, 중심픽셀의 기준으로 이웃하는 8개의 픽셀의 값을 확인하여 상기 8개의 픽셀 중 어느 하나라도 값이 없는 경우 상기 중심픽셀 값을 포기하는 영상처리 모폴로지 연산(Morphological Operation) 중 축소(Erosion) 연산을 통해 상기 객체 깊이 영상에 대한 마스킹 영상 노이즈를 제거하는 것을 특징으로 하는 크로마키 합성 장치의 크로마키 합성 방법.
5. The method of claim 4,
The method of claim 1, wherein removing the noise of the contour of the object depth image using the pixel information of the object image identifies eight neighboring pixels on the basis of the center pixel, And removing the masking image noise for the object depth image by performing an erosion operation among the morphological operations for discarding the center pixel value when there is no chrominance image synthesizing method .
제4항에 있어서,
상기 객체 깊이 영상의 픽셀 정보를 이용하여, 상기 객체 영상이 포함하는 픽셀 구멍에 해당하는 픽셀을 매칭시키는 단계에서, 중심픽셀의 기준으로 이웃하는 8개의 픽셀의 값을 확인하여 상기 8개의 픽셀 중 어느 하나라도 값이 있는 경우 상기 중심픽셀 값으로 설정하는 영상처리 모폴로지 연산(Morphological Operation) 중 확대(Dilation) 연산을 통해 상기 객체 영상에 대한 마스킹 영상 구멍 채우기 기법을 수행하는 것을 특징으로 하는 크로마키 합성 장치의 크로마키 합성 방법.
5. The method of claim 4,
And matching the pixels corresponding to the pixel holes included in the object image using the pixel depth information of the object depth image to check the values of the neighboring eight pixels based on the center pixel, And a masking image hole filling method for the object image is performed through a dilation operation in an image processing morphological operation to set the center pixel value when there is a value of at least one value. &Lt; / RTI &gt;
제1항, 제4항, 제5항, 및 제6항 중 어느 한 항의 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터 판독 가능한 기록 매체.A computer-readable recording medium recording a program for executing the method of any one of claims 1, 4, 5, and 6.
KR1020150162017A 2015-11-18 2015-11-18 Method of chroma key image synthesis without background screen KR101733125B1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
KR1020150162017A KR101733125B1 (en) 2015-11-18 2015-11-18 Method of chroma key image synthesis without background screen
PCT/KR2015/012808 WO2017086522A1 (en) 2015-11-18 2015-11-27 Method for synthesizing chroma key image without requiring background screen
CN201580021027.1A CN107534762A (en) 2015-11-18 2015-11-27 The chroma key image synthesis method of background screen is not needed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150162017A KR101733125B1 (en) 2015-11-18 2015-11-18 Method of chroma key image synthesis without background screen

Publications (1)

Publication Number Publication Date
KR101733125B1 true KR101733125B1 (en) 2017-05-08

Family

ID=58717487

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150162017A KR101733125B1 (en) 2015-11-18 2015-11-18 Method of chroma key image synthesis without background screen

Country Status (3)

Country Link
KR (1) KR101733125B1 (en)
CN (1) CN107534762A (en)
WO (1) WO2017086522A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190130380A (en) * 2018-05-14 2019-11-22 이정협 Method for video synthesis
US11151747B2 (en) 2019-03-20 2021-10-19 Kt Corporation Creating video augmented reality using set-top box
KR102574103B1 (en) * 2023-04-04 2023-09-04 (주)팬옵틱스 Apparatus and System for Detecting Hidden Object Based on Artificial Intelligence learning Model Using THz Scan Image

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002318104A (en) * 2001-04-20 2002-10-31 Victor Co Of Japan Ltd Optical imaging device and optical ranging device
KR101473648B1 (en) * 2013-07-08 2014-12-17 한남대학교 산학협력단 Method and system for real-time chroma-key image synthesis without background screen

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998037702A1 (en) * 1997-02-20 1998-08-27 Sony Corporation Video signal processing device and method, image synthesizing device, and editing device
KR20070064082A (en) * 2005-12-16 2007-06-20 주식회사 피알존 System and method for producing moving image using chroma-key
CN101674418B (en) * 2008-09-10 2013-09-18 新奥特(北京)视频技术有限公司 Method for detecting depth of emcee in virtual studio system
KR101048441B1 (en) * 2009-08-31 2011-07-12 한국산업기술대학교산학협력단 Object tracking method and device therefor in multi-camera system
JP5182590B2 (en) * 2009-09-09 2013-04-17 Nkワークス株式会社 Image composition apparatus and image composition method
KR101129713B1 (en) * 2010-05-28 2012-03-28 광운대학교 산학협력단 A multi-view image illumination compensation method based on the histogram matching by using image depth and the recording medium thereof
KR20120051213A (en) * 2010-11-12 2012-05-22 엘지전자 주식회사 Method for image photographing of multimedia device and multimedia device thereof
KR101349699B1 (en) * 2012-06-29 2014-01-10 에스케이플래닛 주식회사 Apparatus and method for extracting and synthesizing image
KR101901184B1 (en) * 2012-09-20 2018-09-21 삼성전자주식회사 Apparatus and method for processing color image using depth image
CN103578113A (en) * 2013-11-19 2014-02-12 汕头大学 Method for extracting foreground images

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002318104A (en) * 2001-04-20 2002-10-31 Victor Co Of Japan Ltd Optical imaging device and optical ranging device
KR101473648B1 (en) * 2013-07-08 2014-12-17 한남대학교 산학협력단 Method and system for real-time chroma-key image synthesis without background screen

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190130380A (en) * 2018-05-14 2019-11-22 이정협 Method for video synthesis
KR102062982B1 (en) * 2018-05-14 2020-01-07 이정협 Method for video synthesis
US11151747B2 (en) 2019-03-20 2021-10-19 Kt Corporation Creating video augmented reality using set-top box
KR102574103B1 (en) * 2023-04-04 2023-09-04 (주)팬옵틱스 Apparatus and System for Detecting Hidden Object Based on Artificial Intelligence learning Model Using THz Scan Image

Also Published As

Publication number Publication date
WO2017086522A1 (en) 2017-05-26
CN107534762A (en) 2018-01-02

Similar Documents

Publication Publication Date Title
JP7139452B2 (en) Image processing method, computer readable storage medium, and electronic device
US8254630B2 (en) Subject extracting method and device by eliminating a background region using binary masks
US20100149210A1 (en) Image capturing apparatus having subject cut-out function
WO2019105151A1 (en) Method and device for image white balance, storage medium and electronic equipment
JP6935247B2 (en) Image processing equipment, image processing methods, and programs
JP6579868B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP7223079B2 (en) IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS
US10863113B2 (en) Image processing apparatus, image processing method, and storage medium
KR20120090491A (en) Image segmentation device and method based on sequential frame imagery of a static scene
KR101733125B1 (en) Method of chroma key image synthesis without background screen
JP2008259161A (en) Target tracing device
JP6937603B2 (en) Image processing equipment and its control methods, programs, and storage media
JP4565273B2 (en) Subject tracking device and camera
WO2012014946A1 (en) Image processing device and image processing program
JP2017138927A (en) Image processing device, imaging apparatus, control method and program thereof
JP2018182700A (en) Image processing apparatus, control method of the same, program, and storage medium
JP6450107B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP2013074466A (en) Moving image capturing system, moving image analysis device, moving image analysis method, and computer program
US11683596B2 (en) Image capture apparatus, electronic apparatus, and chroma suppression program
JP6921606B2 (en) Image processing equipment, image processing methods and programs
JP2014225763A (en) Imaging apparatus, control method of the same, program, and storage medium
JP6774915B2 (en) Image processing equipment, image processing method and image processing program
JP4361818B2 (en) Screen display area detection device, screen display area detection method, and screen display area detection program
JP2012123721A (en) Image processing device and image processing method
KR20130032578A (en) Method and system for extracting image using thermal camera

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20200210

Year of fee payment: 4