KR101471199B1 - Method and apparatus for separating foreground and background from image, Method and apparatus for substituting separated background - Google Patents

Method and apparatus for separating foreground and background from image, Method and apparatus for substituting separated background Download PDF

Info

Publication number
KR101471199B1
KR101471199B1 KR1020080037563A KR20080037563A KR101471199B1 KR 101471199 B1 KR101471199 B1 KR 101471199B1 KR 1020080037563 A KR1020080037563 A KR 1020080037563A KR 20080037563 A KR20080037563 A KR 20080037563A KR 101471199 B1 KR101471199 B1 KR 101471199B1
Authority
KR
South Korea
Prior art keywords
foreground
background
image
region
probability
Prior art date
Application number
KR1020080037563A
Other languages
Korean (ko)
Other versions
KR20090111939A (en
Inventor
이주용
변혜란
박희철
서창렬
정학진
장성환
Original Assignee
주식회사 케이티
연세대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 케이티, 연세대학교 산학협력단 filed Critical 주식회사 케이티
Priority to KR1020080037563A priority Critical patent/KR101471199B1/en
Publication of KR20090111939A publication Critical patent/KR20090111939A/en
Application granted granted Critical
Publication of KR101471199B1 publication Critical patent/KR101471199B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

영상을 전경과 배경으로 분리하는 방법 및 장치, 영상을 전경과 배경으로 분리하여 배경을 대체하는 방법 및 장치, 그리고 상기 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체가 개시된다. 본 발명에 따른 영상을 전경과 배경으로 분리하는 방법은, 입력되는 현재 프레임의 영상을 배경 모델과 비교하여, 상기 영상을 화소 단위로 전경과 배경으로 분리하는 단계; 상기 영상을 복수 개의 영역들로 분할하고, 상기 분할된 영역들 중 전경 영역인지 배경 영역인지 불확실한 영역들을 추출하는 단계; 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 단계; 및 상기 분류된 결과에 따라 상기 추출된 영역들에 속한 화소들의 전경 배경 분리 결과를 보정하는 단계를 포함하는 것을 특징으로 한다. 이러한 본 발명에 의하면, 실시간으로 정확하게 전경과 배경을 분리할 수 있는 효과가 있다.A method and apparatus for separating an image into foreground and background, a method and apparatus for separating an image into foreground and background to replace the background, and a computer-readable recording medium on which a program for executing the method is recorded. A method of separating an image according to the present invention into a foreground and a background includes the steps of: comparing an image of an input current frame with a background model, and separating the image into foreground and background in pixel units; Dividing the image into a plurality of regions and extracting uncertain regions, which are foreground regions or background regions, of the divided regions; Classifying the extracted regions into a foreground region and a background region; And correcting a foreground background separation result of pixels belonging to the extracted regions according to the classified result. According to the present invention, the foreground and background can be accurately separated in real time.

영상 처리, 전경 분리, 배경 대체 Image processing, foreground separation, background substitution

Description

영상을 전경과 배경으로 분리하는 방법 및 장치, 영상을 전경과 배경으로 분리하여 배경을 대체하는 방법 및 장치{Method and apparatus for separating foreground and background from image, Method and apparatus for substituting separated background}BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for separating an image into foreground and background,

본 발명은 영상 처리에 관한 것으로, 보다 상세하게는, 영상을 전경과 배경으로 분리하는 방법 및 장치, 영상을 전경과 배경으로 분리하여 배경을 대체하는 방법 및 장치, 그리고 상기 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체에 관한 것이다. The present invention relates to image processing, and more particularly, to a method and apparatus for separating an image into foreground and background, a method and apparatus for separating a foreground and background into separate images, and a program The present invention relates to a computer-readable recording medium having recorded thereon a computer program.

영상을 전경과 배경으로 분리하는 기술은 비디오 감시, 인간 계수(human counting), 비디오 편집 등을 포함한 다양한 시각 시스템에서 사용된다. 특히 근래에 인터넷 망의 발달과 웹카메라의 등장으로 음성과 영상을 함께 이용한 화상대화가 상용화되고 있는데, 이러한 화상대화에서는 본인이 원하지 않은 많은 부분이 카메라로 노출될 가능성이 있다. 따라서 통신의 주체가 되는 사람과 배경을 분리하여 노출을 원하지 않는 배경을 새로운 배경으로 대체하여 전송함으로써 개인의 사생활을 보호하는 방안이 강구되고 있다. 이러한 배경 대체 기술에 있어서도 영상을 전 경에 해당하는 사람과 배경으로 분리하는 것이 선행되어야 한다. Techniques for separating images into foreground and background are used in various visual systems including video surveillance, human counting, and video editing. Particularly in recent years, the development of the Internet network and the appearance of web cameras have brought about the commercialization of videoconferencing using voice and video. In such videoconferencing, there is a possibility that a large part of the user is not exposed to the camera. Therefore, there is a way to protect the personal privacy of a person by separating the person who is the subject of communication from the background and substituting a background that does not want to be exposed with a new background. In such a background substitution technique, it is necessary to separate the image into the background and the person corresponding to the background.

종래의 영상 분리 기술로 배경 차분을 통한 움직이는 객체를 분리하는 방법이 있다. 배경 차분은 현재 이미지를, 일정 기간 동안 정적인 배경으로부터 얻어지는 참조 영상으로부터 동일한 부분을 차분하는 방법이다. 이러한 제거 과정을 거치면, 화면 상에는 단지 움직이는 물체 또는 새로운 물체만이 남게 된다. 실시간 처리는 가능하나 조명변화에 민감하다는 단점이 있으며 배경과 유사한 색상의 옷을 입은 사람이 등장하게 되면 영상 분리가 정확하지 않다는 문제점을 가지고 있다. There is a method of separating a moving object through a background difference with a conventional image separation technique. The background difference is a method of subtracting the current image from the reference image obtained from a static background for a certain period of time. After this removal process, only moving objects or new objects remain on the screen. Real-time processing is possible, but there is a disadvantage that it is sensitive to illumination change, and when a person dressed in a color similar to the background appears, image separation is inaccurate.

모델 기반의 영상 분리 기술은 사람의 대략적인 위치를 추정하기 위해 칼라정보 이용하여 얼굴영역을 검출한 뒤, 사람의 상반신만 나타난다는 것을 가정하여 사람의 머리와 몸통 모델을 이용하여 영상을 분리해 내는 기술이다. 모델을 이용하는 방법이기 때문에 사람의 상반신이 아닌 전신이 나타나거나 사람이 손을 드는 등의 다양한 자세를 취하였을 때는 영상 분리가 불가능하다는 단점이 있다.The model-based image segmentation technique detects the face region using color information to estimate the approximate position of a person and then separates the image using the human head and body model assuming that only the upper half of the person appears Technology. This method is disadvantageous in that it is impossible to separate images when a variety of attitudes are taken such as the whole body is displayed instead of the upper body of a person, or a person takes a hand.

모션 기반의 영상 분리 기술은 입력영상에서 광류(Optical Flow) 등과 같은 모션 정보를 추출하여 알고리즘을 이용하여 이전 프레임과 현재프레임의 움직임을 추출한다. 추출된 움직임 정보는 배경과 움직이는 사람이 다르게 나타나기 때문에 움직이는 사람의 모션만을 추출하여 영상 분리를 하는 방법이다. 이 기술에 의하면, 사람이 움직이지 않으면 모션 정보가 나타나지 않기 때문에 움직이는 사람만 분리가 가능하며 또한 이전 프레임과 현재프레임의 조명 변화가 존재하지 않는다는 가정을 해야만 모션 정보를 정확히 추출해 낼 수 있기 때문에 약한 조명변화에도 민감하다는 단점이 있다. Motion - based image segmentation technique extracts motion information such as optical flow from input image and extracts motion of previous frame and current frame using algorithm. The extracted motion information is a method of extracting only the motion of the moving person and separating the image because the background and the moving person appear differently. According to this technique, since the motion information is not displayed if the person does not move, only the moving person can be separated. Furthermore, since the motion information can be accurately extracted only assuming that there is no illumination change between the previous frame and the current frame, It is also sensitive to changes.

또한, 스테레오 카메라를 이용하여 카메라로부터 물체까지의 거리를 측정하여 물체와 배경을 구별하는 방법이 있는데, 이 방법은 스테레오 카메라, 즉 두 대의 카메라가 필요하기 때문에, 장치의 크기가 커지고, 휴대성이 현저히 떨어지며 비용 면에서도 불리한 단점이 있다.In addition, there is a method of distinguishing the object from the background by measuring the distance from the camera to the object using a stereo camera. Since this method requires a stereo camera, i.e., two cameras, the size of the device increases, It has a disadvantage in that it is significantly disadvantageous in terms of cost.

본 발명이 이루고자 하는 기술적 과제는 단일 카메라를 이용하여 실시간으로 영상을 전경과 배경으로 정확하게 분리할 수 있는, 영상을 전경과 배경으로 분리하는 방법 및 장치, 그리고 상기 방법을 실행시키기 위한 컴퓨터로 읽을 수 있는 기록 매체를 제공하는 데 있다. SUMMARY OF THE INVENTION The present invention is directed to a method and apparatus for separating an image into a foreground and a background, which can accurately separate an image in foreground and background in real time using a single camera, and a computer- And a recording medium.

본 발명이 이루고자 하는 다른 기술적 과제는 단일 카메라를 이용하여 실시간으로 영상을 전경과 배경으로 정확하게 분리하고, 영상의 배경을 다른 배경으로 대체할 수 있는, 영상을 전경과 배경으로 분리하여 배경을 대체하는 방법 및 장치, 그리고 상기 방법을 실행시키기 위한 컴퓨터로 읽을 수 있는 기록매체를 제공하는 데 있다. Another object of the present invention is to provide an image processing apparatus and method which can separate a foreground and a background accurately by using a single camera in real time and replace the background of the image with another background, A method and an apparatus, and a computer-readable recording medium for executing the method.

상기 기술적 과제를 해결하기 위하여 본 발명에 따른, 영상을 전경과 배경으로 분리하는 방법은, (a) 입력되는 현재 프레임의 영상을 배경 모델과 비교하여, 상기 영상을 화소 단위로 전경과 배경으로 분리하는 단계; (b) 상기 영상을 복수 개의 영역들로 분할하고, 상기 분할된 영역들 중 전경 영역인지 배경 영역인지 불 확실한 영역들을 추출하는 단계; (c) 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 단계; 및 (d) 상기 (c) 단계에서 분류된 결과에 따라 상기 추출된 영역들에 속한 화소들의 전경 배경 분리 결과를 보정하는 단계를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided a method for separating an image into foreground and background, comprising the steps of: (a) comparing an image of an input current frame with a background model; ; (b) dividing the image into a plurality of regions, and extracting uncertain regions, which are foreground regions or background regions, of the divided regions; (c) classifying the extracted regions into a foreground region and a background region; And (d) correcting a foreground background separation result of pixels belonging to the extracted regions according to a result classified in the step (c).

여기서 상기 방법은, 상기 배경 모델을 생성하는 단계를 더 포함하고, 상기 배경 모델은 전경에 해당하는 물체 또는 사람이 등장하기 이전 프레임까지의 매 프레임마다 학습된 모델을 따를 수 있다.The method may further include generating the background model, wherein the background model may follow a learned model for every frame up to an object in foreground or a frame before a person appears.

또한, 상기 (a) 단계에서, 화소 단위로 상기 영상과 상기 배경 영상의 유사도를 계산하고, 상기 계산된 유사도를 소정 제1 임계값과 비교함으로써 상기 영상을 전경과 배경으로 분리할 수 있다.In the step (a), the similarity between the image and the background image may be calculated on a pixel-by-pixel basis, and the calculated similarity may be compared with a predetermined first threshold value to divide the image into foreground and background.

또한, 상기 (b) 단계에서, 상기 분할된 영역들 각각에 대하여, 상기 (a) 단계에서 화소 단위로 전경과 배경으로 분리된 결과를 이용하여 전경 영역인지 배경 영역인지 불확실할 확률을 계산하고, 상기 계산된 확률을 소정 제2 임계값과 비교함으로써 상기 불확실할 영역들을 추출할 수 있다.In the step (b), for each of the divided regions, a probability of uncertainty of whether the foreground region or the background region is uncertain is calculated using the results separated in foreground and background in pixel units in the step (a) The uncertainty regions may be extracted by comparing the calculated probability with a predetermined second threshold value.

또한, 상기 (c) 단계는, (c1) 상기 추출된 영역들 각각에 대하여, 전경 영역일 확률을 계산하는 단계; 및 (c2) 상기 계산된 확률을 소정 제3 임계값과 비교함으로써 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 단계를 포함할 수 있다.The step (c) includes the steps of: (c1) calculating a probability of a foreground region for each of the extracted regions; And (c2) classifying the extracted regions into a foreground region and a background region by comparing the calculated probability with a predetermined third threshold value.

또한, 상기 (a) 단계에서, 화소 단위로 상기 영상과 상기 배경 영상의 유사도를 계산하고, 상기 계산된 유사도를 소정 제1 임계값과 비교함으로써 상기 영상 을 전경과 배경으로 분리하며, 상기 (c1) 단계에서, 상기 계산된 유사도를 이용하여 상기 전경 영역일 확률을 계산할 수 있다.In the step (a), the degree of similarity between the image and the background image is calculated on a pixel-by-pixel basis, and the calculated degree of similarity is compared with a predetermined first threshold value to divide the image into foreground and background, ), It is possible to calculate the probability of the foreground region using the calculated similarity.

또한, 상기 전경 영역일 확률은 다음 수학식에 따라 구해질 수 있다.In addition, the probability of the foreground region can be obtained according to the following equation.

Figure 112008028898119-pat00001
Figure 112008028898119-pat00001

여기서, P Fg (R i )는 불확실 영역 R i 의 전경 영역일 확률을, N Fg (R i )는 불확실 영역 R i 에서의 전경 화소의 개수를, N Bg (R i )는 불확실 영역 R i 에서의 배경 화소의 개수를 의미한다. Here, P Fg (R i) is the probability of the foreground area of the uncertainty region R i, N Fg (R i) is the number of foreground pixels in the uncertain region R i, N Bg (R i) is uncertain region R i The number of background pixels in the background image.

또한, 상기 방법은, 소정의 과거 프레임으로부터 상기 현재 프레임까지 상기 (a) 단계에서 화소 단위로 전경과 배경으로 분리된 결과 영상을 누적하여 전경 확률 모델을 생성하는 단계를 더 포함하고, 상기 (c1) 단계에서, 상기 생성된 전경 확률 모델을 이용하여 상기 전경 영역일 확률을 계산할 수 있다.The method further includes the step of generating a foreground probability model by accumulating the foreground and background separated images in the foreground and background in a pixel unit in the step (a) from a predetermined past frame to the current frame, ), It is possible to calculate the probability of the foreground region using the generated foreground probability model.

또한, 상기 전경 확률 모델은, 다음 수학식에 따라 표현될 수 있다.Also, the foreground probability model can be expressed according to the following equation.

Figure 112008028898119-pat00002
Figure 112008028898119-pat00002

여기서,

Figure 112008028898119-pat00003
는 프레임 t의 영상에서 화소 p가 전경 화소일 확률을,
Figure 112008028898119-pat00004
는 프레임 t-1의 영상에서 화소 p가 전경 화소일 확률을,
Figure 112008028898119-pat00005
는 프레임 t의 영상에서 화소 p의 전경 분리 결과값을 의미하며,
Figure 112008028898119-pat00006
는 소정 값이다.here,
Figure 112008028898119-pat00003
Shows the probability that the pixel p is the foreground pixel in the image of the frame t,
Figure 112008028898119-pat00004
The probability that the pixel p is the foreground pixel in the image of the frame t-1,
Figure 112008028898119-pat00005
Denotes the foreground separation result of the pixel p in the image of the frame t,
Figure 112008028898119-pat00006
Is a predetermined value.

또한, 상기 전경 영역일 확률은 다음 수학식에 따라 구해질 수 있다.In addition, the probability of the foreground region can be obtained according to the following equation.

Figure 112008028898119-pat00007
Figure 112008028898119-pat00007

여기서, P Fg t (R i )는 현재 프레임인 t번째 프레임에서 불확실 영역 R i 의 전경 영역일 확률을, P Fg t-1 (R i )은 이전 프레임인 t-1번째 프레임에서의 불확실 영역 R i 의 전경 영역일 확률을, N Fg (R i )N Bg (R i )는 t번째 프레임에서 불확실 영역 R i 의 전경 화소의 개수 및 배경 화소의 개수를 나타낸다. Here, P Fg t (R i) is the probability of the foreground area of the uncertainty region R i in a t-th frame is the current frame, P Fg t-1 (R i) is the previous frame is a t-1 uncertainty region of the second frame the probability of the foreground region of the R i, N Fg (R i) and Bg N (R i) is the number of the number of foreground pixels and background pixels in the uncertain region R i in the t-th frame.

상기 기술적 과제를 해결하기 위하여 상기된 본 발명에 따른 영상을 전경과 배경으로 분리하는 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공한다.According to an aspect of the present invention, there is provided a computer-readable recording medium having recorded thereon a program for executing a method of dividing an image into foreground and background according to the present invention.

상기 기술적 과제를 해결하기 위하여 본 발명에 따른, 영상을 전경과 배경으로 분리하는 장치는, 입력되는 현재 프레임의 영상을 배경 모델과 비교하여, 상기 영상을 화소 단위로 전경과 배경으로 분리하는 화소 단위 분리부; 상기 영상을 복수 개의 영역들로 분할하고, 상기 분할된 영역들 중 전경 영역인지 배경 영역인지 불확실한 영역들을 추출하는 불확실 영역 추출부; 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 영역 단위 분류부; 및 상기 영역 단위 분류부에서 분류된 결과에 따라 상기 추출된 영역들에 속한 화소들의 전경 배경 분리 결과를 보정하는 보정부를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided an apparatus for separating an image into a foreground and a background, the apparatus comprising: an input unit that compares an image of an input current frame with a background model, Separator; An uncertainty region extraction unit for dividing the image into a plurality of regions and extracting uncertain regions, which are foreground regions or background regions, of the divided regions; A region unit classification unit for classifying the extracted regions into a foreground region and a background region; And a correction unit correcting a foreground background separation result of pixels belonging to the extracted regions according to a result classified by the region unit classifier.

상기 다른 기술적 과제를 해결하기 위하여 본 발명에 따른, 영상을 전경과 배경으로 분리하여 배경을 대체하는 방법은, (a) 입력되는 영상을 배경 모델과 비교하여, 상기 영상을 화소 단위로 전경과 배경으로 분리하는 단계; (b) 상기 영상을 복수 개의 영역들로 분할하고, 상기 분할된 영역들 중 전경 영역인지 배경 영역인지 불확실한 영역들을 추출하는 단계; (c) 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 단계; (d) 상기 (c) 단계에서 분류된 결과에 따라 상기 추출된 영역들에 속한 화소들의 전경 배경 분리 결과를 보정하여, 전경 영상을 출력하는 단계; 및 (e) 상기 전경 영상에 미리 마련된 배경 영상을 합성하는 단계를 포함하는 것을 특징으로 한다.According to another aspect of the present invention, there is provided a method of separating a foreground and a background into foreground and background, comprising the steps of: (a) comparing an input image with a background model, ; (b) dividing the image into a plurality of regions and extracting uncertain regions, whether the region is a foreground region or a background region, among the divided regions; (c) classifying the extracted regions into a foreground region and a background region; (d) correcting foreground background separation results of pixels belonging to the extracted regions according to a result classified in step (c), and outputting a foreground image; And (e) synthesizing a background image prepared in advance in the foreground image.

여기서, 상기 (e) 단계는, 상기 전경 영상과 상기 배경 영상의 각 컬러채널 값에 따라 상기 배경 영상의 색상을 보정하는 단계를 포함할 수 있다.The step (e) may include correcting the hue of the background image according to each color channel value of the foreground image and the background image.

또한, 상기 (e) 단계는, 상기 전경 영상의 색상 정보를 분석하고, 특정 컬러채널에 편중되어 있는지 여부에 따라서 선택적으로, 상기 전경 영상과 배경 영상의 각 컬러채널 값에 따라 상기 배경 영상의 색상을 보정하거나, 상기 배경 영상의 밝기를 보정하는 단계를 포함할 수 있다.The step (e) may further include analyzing the color information of the foreground image and selectively extracting the color of the background image according to each color channel value of the foreground image and the background image, Or correcting the brightness of the background image.

상기 다른 기술적 과제를 해결하기 위하여 상기된 본 발명에 따른 영상을 전경과 배경으로 분리하여 배경을 대체하는 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공한다.According to another aspect of the present invention, there is provided a computer-readable recording medium having recorded thereon a program for executing a method of replacing a background by dividing an image according to the present invention into foreground and background.

상기 다른 기술적 과제를 해결하기 위하여 본 발명에 따른 영상을 전경과 배경으로 분리하여 배경을 대체하는 장치는, 입력되는 영상을 배경 모델과 비교하여, 상기 영상을 화소 단위로 전경과 배경으로 분리하는 화소 단위 분리부; 상기 영상을 복수 개의 영역들로 분할하고, 상기 분할된 영역들 중 전경 영역인지 배경 영역인지 불확실한 영역들을 추출하는 불확실 영역 추출부; 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 영역 단위 분류부; 상기 영역 단위 분류부에서 분류된 결과에 따라 상기 추출된 영역들에 속한 화소들의 전경 배경 분리 결과를 보정하여, 전경 영상을 출력하는 보정부; 및 상기 전경 영상에 미리 마련된 배경 영상을 합성하는 배경 영상 합성부를 포함하는 것을 특징으로 한다.According to another aspect of the present invention, there is provided an apparatus for separating an image into foreground and background and comparing the input image with a background model, A unit separation unit; An uncertainty region extraction unit for dividing the image into a plurality of regions and extracting uncertain regions, which are foreground regions or background regions, of the divided regions; A region unit classification unit for classifying the extracted regions into a foreground region and a background region; A correction unit correcting a foreground background separation result of pixels belonging to the extracted regions according to a result classified by the region unit classifier and outputting a foreground image; And a background image synthesizing unit synthesizing a background image prepared in advance in the foreground image.

상술한 본 발명에 의하면, 영상을 복수 개의 영역들로 분할하고, 분할된 영역들 중 불확실한 영역들을 전경과 배경으로 분류하여 보정함으로써, 조명의 변화나 전경과 배경에 유사한 색상이 존재하더라도 실시간으로 정확하게 전경과 배경을 분리할 수 있다. 또한, 전경과 배경으로 분리된 결과 영상을 누적하여 생성된 전경 확률 모델을 이용함으로써 더 정확하게 전경과 배경을 분리할 수 있다.According to the present invention, an image is divided into a plurality of areas, and uncertain areas of the divided areas are classified and corrected by foreground and background, so that even if there is a similar color in a change of illumination or foreground and background, You can separate foreground and background. In addition, the foreground and background can be separated more precisely by using the foreground probability model generated by accumulating the result images separated into foreground and background.

이하에서는 도면을 참조하여 본 발명의 바람직한 실시예들을 상세히 설명한다. 이하 설명 및 첨부된 도면들에서 실질적으로 동일한 구성요소들은 각각 동일한 부호들로 나타냄으로써 중복 설명을 생략하기로 한다. 또한 본 발명을 설명함에 있어 관련된 공지기능 혹은 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그에 대한 상세한 설명은 생략하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. In the following description and the accompanying drawings, substantially the same components are denoted by the same reference numerals, and redundant description will be omitted. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.

도 1은 본 발명의 일 실시예에 따른, 영상을 전경과 배경으로 분리하는 장치의 블록도이다. 본 실시예에 따른 전경 배경 분리 장치(10)는, 배경 모델 생성부(100), 화소 단위 분리부(110), 불확실 영역 추출부(120), 영역 단위 분류부(130), 보정부(140)를 포함하여 이루어진다. 전경 배경 분리 장치(10)에는 카메라(미도시)로부터 획득된 프레임 단위의 영상이 입력된다. 1 is a block diagram of an apparatus for separating an image into foreground and background, according to an embodiment of the present invention. The foreground background separating apparatus 10 according to the present embodiment includes a background model generating unit 100, a pixel unit separating unit 110, an uncertainty region extracting unit 120, a region unit classifying unit 130, a corrector 140 ). In the foreground background separating apparatus 10, a frame-by-frame image obtained from a camera (not shown) is input.

배경 모델 생성부(100)는, 후술할 화소 단위 분리부(110)가 입력되는 영상을 전경과 배경으로 분리하고자 할 때 입력되는 영상과 비교 대상이 되는 배경 모델을 생성한다. 이때 배경 모델 생성부(100)는, 전경에 해당하는 물체 또는 사람이 영상에 등장하기 이전 프레임까지의 매 프레임마다 모델을 학습하고, 이렇게 학습된 모델을 배경 모델로서 생성하여 저장한다. 도시되지는 않았으나, 본 실시예에 따른 전경 배경 분리 장치(10)에는 상기 배경 모델을 저장하기 위한 저장 수단(미도시)이 포함될 수 있다.The background model generating unit 100 generates a background model to be compared with an input image when the pixel-based separating unit 110, which will be described later, divides the input image into foreground and background. At this time, the background model generation unit 100 learns a model for every frame up to a frame before the object corresponding to foreground or a person appears in the image, and generates and stores the learned model as a background model. Although not shown, the foreground background separating apparatus 10 according to the present embodiment may include storage means (not shown) for storing the background model.

이하에서는, 본 발명의 일 실시예에 따른 배경 모델에 관하여 보다 상세히 설명하기로 한다. 본 실시예에 따른 배경 모델에 의하면, 입력 영상 내의 임의의 화소 p는 다음과 같은 4개의 요소,

Figure 112008028898119-pat00008
로 모델링된다. 여기서,
Figure 112008028898119-pat00009
는 화소 p에서의 컬러 기댓값을,
Figure 112008028898119-pat00010
는 컬러값의 표준편차를,
Figure 112008028898119-pat00011
는 밝기 왜곡의 변화(variation of brightness distortion),
Figure 112008028898119-pat00012
는 색도 왜곡의 변화(variation of chromaticity distortion)를 의미한다. 밝기 왜곡의 변화와, 색도 왜곡의 변화에 관하여는 논문 [T. Horprasert, D. Harwood, L.S. Davis "A Statistical Approach for Real-time Robust Background Subtraction and Shadow Detection", IEEE Frame Rate Workshop, pp. 1-19, 1999.]에 개시되어 있으므로, 상세한 설명은 생략하기로 한다.Hereinafter, a background model according to an embodiment of the present invention will be described in more detail. According to the background model of the present embodiment, an arbitrary pixel p in the input image has the following four elements:
Figure 112008028898119-pat00008
Lt; / RTI > here,
Figure 112008028898119-pat00009
The color expected value at pixel p ,
Figure 112008028898119-pat00010
The standard deviation of the color values,
Figure 112008028898119-pat00011
A variation of brightness distortion,
Figure 112008028898119-pat00012
Means a variation of chromaticity distortion. Regarding the change of the brightness distortion and the change of the chromaticity distortion, the paper [T. Horprasert, D. Harwood, LS Davis, "A Statistical Approach for Real-time Robust Background Subtraction and Shadow Detection", IEEE Frame Rate Workshop, pp. 1-19, 1999.], detailed description thereof will be omitted.

본 실시예에 의하면, 배경 모델 생성부(100)는 영상 내에 물체 또는 사람이 등장하기 전까지 매 프레임마다

Figure 112008028898119-pat00013
을 계산한다. t번째 프레임에서 계산되는
Figure 112008028898119-pat00014
Figure 112008028898119-pat00015
라 표현하면, 예를 들어 N번째 프레임에서 사람이 등장했다면, N-1 번째 프레임까지 계산된
Figure 112008028898119-pat00016
가 배경 모델로서 생성된다. According to the present embodiment, the background model generation unit 100 generates the background model for every frame until an object or a person appears in the image
Figure 112008028898119-pat00013
. calculated in the t-th frame
Figure 112008028898119-pat00014
To
Figure 112008028898119-pat00015
For example, if a person appears in the N-th frame,
Figure 112008028898119-pat00016
Is generated as a background model.

t번째 프레임에 대하여, 화소 p에서의 컬러 기댓값의 벡터

Figure 112008028898119-pat00017
와 표준편차의 벡터
Figure 112008028898119-pat00018
는 다음 수학식과 같이, r, g, b 컬러값 각각에 대한 평균 및 표준편차의 성분을 가진다.For the t-th frame, the vector of the color expectation value at pixel p
Figure 112008028898119-pat00017
And the standard deviation vector
Figure 112008028898119-pat00018
Has the components of mean and standard deviation for each of the r, g, b color values, as shown in the following equation.

Figure 112008028898119-pat00019
Figure 112008028898119-pat00019

Figure 112008028898119-pat00020
Figure 112008028898119-pat00020

본 실시예에 의하면, 매 프레임마다 배경 모델을 학습하는 바, t번째 프레임의 영상 내 화소 p에서의 컬러값 i에 대한 평균

Figure 112008028898119-pat00021
및 표준편차
Figure 112008028898119-pat00022
는 다음 수학식에 따라 이전 프레임인 t-1 번째 프레임의 평균
Figure 112008028898119-pat00023
및 표준편차
Figure 112008028898119-pat00024
를 이용하여 구해질 수 있다.According to the present embodiment, the background model is learned every frame, and the average value of the color values i in the in-video pixel p of the t-
Figure 112008028898119-pat00021
And standard deviation
Figure 112008028898119-pat00022
The average of the (t-1) -th frame, which is the previous frame, according to the following equation
Figure 112008028898119-pat00023
And standard deviation
Figure 112008028898119-pat00024
. ≪ / RTI >

Figure 112008028898119-pat00025
Figure 112008028898119-pat00025

Figure 112008028898119-pat00026
Figure 112008028898119-pat00026

여기서, 아래첨자 i는 r, g, b 중 어느 하나를,

Figure 112008028898119-pat00027
는 화소 p에서의 컬러 i의 컬러값을 의미한다. Here, the subscript i denotes any one of r, g, and b,
Figure 112008028898119-pat00027
Means the color value of the color i in the pixel p .

또한, t번째 프레임의 영상 내 화소 p에서의 밝기 왜곡

Figure 112008028898119-pat00028
와 색도 왜곡
Figure 112008028898119-pat00029
는 다음 수학식에 따라 구해질 수 있다.Further, the brightness distortion in the in-video pixel p of the t-th frame
Figure 112008028898119-pat00028
And chromaticity distortion
Figure 112008028898119-pat00029
Can be obtained according to the following equation.

Figure 112008028898119-pat00030
Figure 112008028898119-pat00030

이때, t번째 프레임의 영상 내 화소 p에서의 밝기 왜곡의 변화도

Figure 112008028898119-pat00031
와 색도 왜곡의 변화도
Figure 112008028898119-pat00032
는 다음 수학식에 따라 이전 프레임인 t-1번째 프레임의 밝기 왜곡 의 변화
Figure 112008028898119-pat00033
과 색도 왜곡의 변화
Figure 112008028898119-pat00034
를 이용하여 구해질 수 있다. At this time, the change in brightness distortion in the in-video pixel p of the t-
Figure 112008028898119-pat00031
And chromaticity distortion
Figure 112008028898119-pat00032
Of the brightness distortion of the (t-1) -th frame, which is the previous frame, according to the following equation
Figure 112008028898119-pat00033
And chromaticity distortion
Figure 112008028898119-pat00034
. ≪ / RTI >

Figure 112008028898119-pat00035
Figure 112008028898119-pat00035

Figure 112008028898119-pat00036
Figure 112008028898119-pat00036

배경 모델 생성부(100)에서, 전경에 해당하는 물체 또는 사람이 등장하는 프레임 이전의 프레임까지 상술한 바와 같이 학습된 배경 모델은 저장 수단(미도시)에 저장된다.In the background model generation unit 100, the learned background model is stored in the storage means (not shown) until the frame corresponding to the foreground or the frame before the frame in which the person appears.

배경 모델 생성부(100)에 의해 배경 모델이 생성되면, 화소 단위 분리부(110)는 입력되는 프레임의 영상을 배경 모델 생성부(100)에서 생성된 배경 모델과 비교하여, 상기 영상을 화소 단위로 전경과 배경으로 분리한다. 여기서, 입력되는 프레임은 전경에 해당하는 물체 또는 사람이 등장한 프레임 및 그 이후의 프레임들 각각을 의미하며, 화소 단위 분리부(110)는 이들 각 프레임마다의 영상을 배경 모델과 비교하여 화소 단위로 전경과 배경으로 분리한다. 화소 단위로 전경과 배경으로 분리한다는 것은, 다시 말하면 하나의 영상 내의 화소들 각각이 전경에 해당하는지 배경에 해당하는지를 구분하는 것이다. When the background model is generated by the background model generation unit 100, the pixel-based separation unit 110 compares the input frame image with the background model generated by the background model generation unit 100, As foreground and background. Here, the input frame refers to a foreground object or a frame in which a person appears, and frames thereafter, and the pixel unit separator 110 compares the image of each frame with the background model, Separate into foreground and background. The separation of foreground and background in pixel units means that each pixel in a single image corresponds to foreground or background.

화소 단위 분리부(110)는 입력되는 영상을 배경 모델과 비교하기 위하여 영상에 속하는 각 화소마다, 입력되는 영상과 배경 모델의 유사도를 계산한다. 그리고 이 유사도에 따라서 각 화소를 전경 화소 또는 배경 화소 중 어느 하나로 분류하는데, 예를 들어 유사도가 높으면 배경 화소로, 유사도가 낮으면 전경 화소로 분 류한다. In order to compare the input image with the background model, the pixel-unit separation unit 110 calculates the similarity between the input image and the background model for each pixel belonging to the image. Each pixel is classified into a foreground pixel or a background pixel according to the degree of similarity. For example, if the degree of similarity is high, the background pixel is classified. If the degree of similarity is low, the foreground pixel is classified.

영상 내의 임의의 화소 p에 대한 유사도 l(p)는 밝기 왜곡 분포와 색도 왜곡 분포를 이용하여 다음 수학식에 따라 구해질 수 있다. The similarity l (p) for an arbitrary pixel p in an image can be obtained according to the following equation using a brightness distortion distribution and a chromaticity distortion distribution.

Figure 112008028898119-pat00037
Figure 112008028898119-pat00037

여기서,

Figure 112008028898119-pat00038
는 화소 p에 대한 밝기 왜곡 분포를,
Figure 112008028898119-pat00039
는 화소 p에 대한 색도 왜곡 분포를 의미하며,
Figure 112008028898119-pat00040
는 실제적으로 색도 유사도가 밝기 유사도보다 상대적으로 적음을 반영하기 위한 값으로서, 1 이상의 소정 값이다. here,
Figure 112008028898119-pat00038
Represents the brightness distortion distribution for the pixel p ,
Figure 112008028898119-pat00039
Represents the chromaticity distortion distribution for the pixel p ,
Figure 112008028898119-pat00040
Is a value for reflecting the fact that the chromaticity similarity is relatively smaller than the brightness similarity, and is a predetermined value or more.

상기 밝기 왜곡 분포

Figure 112008028898119-pat00041
와 색도 왜곡 분포
Figure 112008028898119-pat00042
는 다음 수학식에 따라 구해질 수 있다. The brightness distortion distribution
Figure 112008028898119-pat00041
And chromaticity distortion distribution
Figure 112008028898119-pat00042
Can be obtained according to the following equation.

Figure 112008028898119-pat00043
Figure 112008028898119-pat00043

Figure 112008028898119-pat00044
Figure 112008028898119-pat00044

그리고, 화소 단위 분리부(110)는 상기 유사도를 소정 임계값

Figure 112008028898119-pat00045
과 비교하고, 비교 결과에 따라 전경 화소 또는 배경 화소로 분류한다. 이는 다음 수학식과 같이 표현될 수 있다.Then, the pixel-unit separation unit 110 divides the similarity into a predetermined threshold value
Figure 112008028898119-pat00045
And classified into foreground pixels or background pixels according to the comparison result. This can be expressed as the following equation.

Figure 112008028898119-pat00046
Figure 112008028898119-pat00046

여기서,

Figure 112008028898119-pat00047
는 임의의 화소 p가 전경 화소 또는 배경 화소로 분리된 결과를 나타내고, 1은 전경 화소로 분류되었음을, 0은 배경 화소로 분류되었음을 의미한다. here,
Figure 112008028898119-pat00047
Indicates that a pixel p is divided into a foreground pixel or a background pixel, 1 represents a foreground pixel, and 0 represents a background pixel.

도 2는 상술한 실시예에 따라서 입력 영상이 전경과 배경으로 분리된 결과를 보여준다. 도 2에서, (a)는 상술한 실시예에 따라 생성된 배경 모델에 따른 영상을 나타내고, (b)는 입력된 영상을 나타내며, (c)는 화소 단위로 전경과 배경이 분리된 결과 영상을 나타낸다. (c)에서 흰색으로 표시된 부분이 전경 화소를, 검정색으로 표시된 부분이 배경 화소를 나타낸다.FIG. 2 shows a result obtained by dividing an input image into foreground and background in accordance with the above-described embodiment. In FIG. 2, (a) represents an image according to the background model generated according to the above-described embodiment, (b) represents an input image, and (c) . In (c), white indicates the foreground pixel, and black indicates the background pixel.

불확실 영역 추출부(120)는 입력 영상을 복수 개의 영역들로 분할하고, 분할된 영역들 중에서 전경 영역인지 배경 영역인지 불확실한 영역들을 추출한다. 그리고 영역 단위 분류부(130)는 불확실 영역 추출부(120)에서 추출된 영역들, 즉 불확실 영역들을 전경 영역과 배경 영역으로 분리한다. The uncertainty region extraction unit 120 divides the input image into a plurality of regions, and extracts uncertain regions, which are foreground regions or background regions, from the divided regions. The region unit classification unit 130 separates the regions extracted from the uncertainty region extraction unit 120, that is, the uncertainty regions into a foreground region and a background region.

도 2의 (c)를 참조하면, 화소 단위 분리부(110)에서 획득된 전경과 배경이 분리된 결과 영상은, 전경임에도 배경으로, 혹은 배경임에도 전경으로 판단된 부분이 상당히 존재함을 알 수 있다. 이러한 결과는 조명 또는 자연광의 영향으로 전경과 배경의 색이 변하거나, 전경과 배경의 색이 유사한 경우에 더 두드러지게 나타나게 된다. 따라서 불확실 영역 추출부(120)와 영역 단위 분류부(130)가 전경인지 배경인지 불확실한 영역들에 대하여 다시 판단을 하고, 이 결과에 따라 후술하는 보정부(140)가 화소 단위 분리부(110)에서 획득된 전경과 배경이 분리된 결과 영상을 보정한다.Referring to FIG. 2 (c), it can be seen that the result image in which the foreground and the background obtained in the pixel-unit separation unit 110 are separated from each other is considerably inferred from the foreground, have. These results are more prominent when the foreground and background colors change due to illumination or natural light, or when the foreground and background colors are similar. Therefore, the uncertainty region extraction unit 120 and the region unit classification unit 130 determine again whether the foreground or background is uncertain, and the correction unit 140, which will be described later, And the result obtained by separating the foreground and the background obtained in the second step is corrected.

불확실 영역 추출부(120)는 먼저 입력 영상을 복수 개의 영역들로 분할하는데, 이때 예를 들어, Mean-Shift 알고리즘을 사용할 수 있다. Mean-Shift 알고리즘이란, 특정 데이터의 근방에 존재하는 주변 데이터들의 평균 쪽으로 중심을 이동시키면서 유사한 데이터를 군집화하는 알고리즘이다. The uncertainty region extraction unit 120 firstly divides the input image into a plurality of regions, for example, a mean-shift algorithm. The mean-shift algorithm is an algorithm for grouping similar data while shifting the center of the data around the average of neighboring data in the vicinity of the specific data.

그리고, 불확실 영역 추출부(120)는, 분할된 영역들 중에서 전경 영역인지 배경 영역인지 불확실한 영역(이하, 불확실 영역)들을 추출하는데, 이때 화소 단위 분리부(110)에서 각 화소가 전경 또는 배경으로 분리된 결과를 이용한다. 구체적으로 설명하면, 불확실 영역 추출부(120)는 분할된 영역들 각각에 대하여, 해당 영역에 속하는 화소들 각각의 전경 배경 분리 결과를 이용하여 전경 영역인지 배경 영역인지 불확실할 확률(이하, 불확실 확률)을 계산하고, 상기 불확실 확률이 높으면 해당 영역을 불확실 영역으로 분류한다. The uncertainty region extraction unit 120 extracts an uncertain region (hereinafter, uncertainty region) from the divided regions, that is, the foreground region or the background region. At this time, in the pixel-based separation unit 110, Separate results are used. More specifically, the uncertainty region extracting unit 120 extracts, for each of the divided regions, a probability that the uncertainty of the foreground region or the background region is uncertain (hereinafter referred to as an uncertainty probability ), And classifies the region into an uncertainty region if the uncertainty probability is high.

여기서, 임의의 영역 R i 에 대한 불확실 확률 P U (R i )는 다음 수학식에 따라 구해질 수 있다. Here, the uncertainty probability P U (R i ) for an arbitrary region R i can be obtained according to the following equation.

Figure 112008028898119-pat00048
Figure 112008028898119-pat00048

여기서, n은 분할된 영역의 개수를,

Figure 112008028898119-pat00049
는 분할된 영역들의 집 합을, N Fg ( R i )는 영역 R i 에서의 전경 화소의 개수를, N Bg ( R i )는 영역 R i 에서의 배경 화소의 개수를 의미한다. Here, n denotes the number of divided areas,
Figure 112008028898119-pat00049
N Fg ( R i ) is the number of foreground pixels in the region R i , and N Bg ( R i ) is the number of background pixels in the region R i .

불확실 영역 추출부(120)는 불확실 확률 P U (R i )를 소정 임계값

Figure 112008028898119-pat00050
와 비교하고, 비교 결과에 따라 불확실 영역인지 여부를 결정한다. 이는 다음 수학식과 같이 표현될 수 있다.Uncertainty region extraction unit 120 is the uncertainty probability P U (R i) a predetermined threshold value
Figure 112008028898119-pat00050
And determines whether it is an uncertainty region or not according to the comparison result. This can be expressed as the following equation.

Figure 112008028898119-pat00051
Figure 112008028898119-pat00051

여기서 UR은 해당 영역이 불확실 영역임을, NON_UR은 해당 영역이 불확실 영역이 아님을 나타낸다. 상기 수학식에 따르면, 불확실 확률 P U (R i )가 소정 임계값

Figure 112008028898119-pat00052
보다 크면 불확실 영역으로, 그렇지 않으면 불확실 영역이 아닌 것으로 결정한다.Here, UR indicates that the corresponding region is an uncertainty region, and NON_UR indicates that the corresponding region is not an uncertainty region. According to the above equation, when the uncertainty probability P U (R i )
Figure 112008028898119-pat00052
If it is greater than the uncertainty region, it is determined that it is not an uncertainty region.

영역 단위 분류부(130)는 불확실 영역 추출부(120)에서 추출된 불확실 영역들을 전경 영역과 배경 영역으로 분류한다. 이를 위하여, 영역 단위 분류부(130)는 우선 불확실 영역들 각각에 대하여 해당 영역이 전경 영역일 확률을 계산한다. 이 확률은 해당 영역에 속한 화소들의, 화소 단위 분리부(110)에서 계산된 유사도를 이용하여 다음 수학식에 따라 구해질 수 있다.The region unit classification unit 130 classifies the uncertainty regions extracted by the uncertainty region extraction unit 120 into a foreground region and a background region. For this purpose, the region unit classifier 130 first calculates the probability that the corresponding region is the foreground region for each uncertainty region. This probability can be obtained according to the following equation using the similarity calculated by the pixel unit separation unit 110 of the pixels belonging to the corresponding region.

Figure 112008028898119-pat00053
Figure 112008028898119-pat00053

여기서, P Fg (R i )는 불확실 영역 R i 의 전경 영역일 확률을, N Fg (R i )는 불확실 영역 R i 에서의 전경 화소의 개수를, N Bg (R i )는 불확실 영역 R i 에서의 배경 화소의 개수를 의미한다. Here, P Fg (R i) is the probability of the foreground area of the uncertainty region R i, N Fg (R i) is the number of foreground pixels in the uncertain region R i, N Bg (R i) is uncertain region R i The number of background pixels in the background image.

그리고 영역 단위 분류부(130)는 상기 계산된 확률을 소정 임계값

Figure 112008028898119-pat00054
와 비교하고, 비교 결과에 따라 전경 영역인지 배경 영역인지를 결정한다. 이는 다음 수학식과 같이 표현될 수 있다.The region unit classifying unit 130 classifies the calculated probability as a predetermined threshold value
Figure 112008028898119-pat00054
And determines whether it is a foreground area or a background area according to the comparison result. This can be expressed as the following equation.

Figure 112008028898119-pat00055
Figure 112008028898119-pat00055

여기서,

Figure 112008028898119-pat00056
는 불확실 영역 R i 가 전경 영역 또는 배경 영역으로 분류된 결과를 나타내고, 1은 전경 영역으로 분류되었음을, 0은 배경 영역으로 분류되었음을 의미한다. 상기 수학식에 따르면, 전경 영역일 확률 P Fg (R i )가 소정 임계값
Figure 112008028898119-pat00057
보다 크면, 전경 영역으로, 그렇지 않으면 배경 영역으로 분류한다. here,
Figure 112008028898119-pat00056
Indicates that the uncertainty region R i is classified into a foreground region or a background region, 1 denotes a foreground region, and 0 denotes a background region. According to the above equation, when the probability P Fg (R i ) of the foreground region is smaller than a predetermined threshold value
Figure 112008028898119-pat00057
If it is larger, it is classified as foreground area, otherwise it is classified as background area.

본 실시예에서, 영역 단위 분류부(130)는, 전경 영역일 확률을 계산하고, 이 확률을 소정 임계값과 비교하였으나, 마찬가지의 방식으로 배경 영역일 확률을 계 산하고, 이 확률을 소정 임계값과 비교하는 형태로 구현될 수도 있음은 물론이다. In the present embodiment, the area unit classification unit 130 calculates the probability of the foreground area and compares the probability with a predetermined threshold value. However, the area unit classification unit 130 calculates the probability of the background area in the same manner, And may be implemented in a form to be compared with a value.

보정부(140)는 영상 내의 화소들 중 불확실 영역들에 속한 화소들의 전경 배경 분리 결과를 영역 단위 분류부(130)에서 분류된 결과에 따라 보정한다. 즉, 화소 단위 분리부(110)에서 전경으로 분류된 화소가 영역 단위 분류부(130)에서 분류된 배경 영역에 속한다면 배경 화소로 보정하고, 화소 단위 분리부(110)에서 배경으로 분류된 화소가 영역 단위 분류부(130)에서 분류된 전경 영역에 속한다면 전경 화소로 보정한다. 그리고 보정부(140)는 분리된 배경을 제거함으로써 전경 영상을 출력한다.The correction unit 140 corrects the foreground background separation result of the pixels belonging to the uncertainty regions among the pixels in the image according to the classification result in the region unit classification unit 130. [ That is, if the pixel classified by the foreground in the pixel unit separator 110 belongs to the background area classified by the area unit classifier 130, the pixel is corrected to be a background pixel, If the pixel belongs to the foreground area classified by the area unit classifier 130, it is corrected to the foreground pixel. Then, the correction unit 140 outputs the foreground image by removing the separated background.

도 3은 상술한 실시예에 따라 입력 영상이 전경과 배경으로 분리되는 과정을 나타낸다. 도 3에서, (a)는 입력 영상을, (b)는 Mean-Shift 알고리즘을 사용하여 복수 개의 영역들로 분할된 영상을 나타낸다. (c)는 화소 단위로 전경과 배경이 분리된 결과 영상으로서, 흰색으로 표시된 부분이 전경 화소를, 검정색으로 표시된 부분이 배경 화소를 나타낸다. (d)에서는 불확실 영역들을 흰색으로 나타내었고, (e)는 불확실 영역들이 전경 영역과 배경 영역으로 분류된 결과로서, 전경 영역은 붉은색으로, 배경 영역은 파란색으로 나타내었다. (f)는 화소 단위로 전경과 배경이 분리된 결과 영상 (c)를 영역 단위로 전경과 배경으로 분류된 결과 (e)에 따라 보정된 영상을 나타낸다. FIG. 3 illustrates a process in which an input image is divided into foreground and background according to the above-described embodiment. In FIG. 3, (a) shows an input image, and (b) shows an image divided into a plurality of regions using a mean-shift algorithm. (c) is a result image in which the foreground and the background are separated in pixel units, and the white portion represents the foreground pixel and the black portion represents the background pixel. (d) shows the uncertainty areas in white, and (e) shows the uncertainty areas as the foreground and background regions, with the foreground region as red and the background region as blue. (f) shows the image obtained by dividing the foreground and the background in pixel units and the image (c) corrected according to the result (e) classified into the foreground and background in the area unit.

도 3의 (c)와 (f)를 참고하면, 전경에 해당하는 사람의 옷 색상이 배경과 유사하여 (c)에서 전경이 전경임에도 배경으로 잘못 판단되는 현상이 두드러지게 나타나는 반면, 보정된 영상 (f)에서는 이러한 문제점이 거의 나타나지 않음을 알 수 있다. Referring to FIGS. 3 (c) and 3 (f), the color of the clothes of the person corresponding to the foreground is similar to the background, so that in the case of (c) (f) shows that such a problem is hardly observed.

도 4는 본 발명의 다른 실시예에 따른, 영상을 전경과 배경으로 분리하는 장치의 블록도이다. 본 실시예에 따른 전경 배경 분리 장치(20)는, 배경 모델 생성부(100), 화소 단위 분리부(110), 불확실 영역 추출부(120), 영역 단위 분류부(135), 보정부(140), 전경 확률 모델 생성부(145)를 포함하여 이루어진다. 도 1에 도시된 전경 배경 분리 장치와 마찬가지로, 본 실시예에 따른 전경 배경 분리 장치(10)에도 역시 카메라(미도시)로부터 획득된 프레임 단위의 영상이 입력된다. 4 is a block diagram of an apparatus for separating an image into foreground and background, according to another embodiment of the present invention. The foreground background separating apparatus 20 according to the present embodiment includes a background model generating unit 100, a pixel unit separating unit 110, an uncertainty region extracting unit 120, a region unit classifying unit 135, a corrector 140 And a foreground probability model generating unit 145. Like the foreground background separating apparatus shown in FIG. 1, the foreground background separating apparatus 10 according to the present embodiment also receives a frame-based image obtained from a camera (not shown).

본 실시예에 따른 전경 배경 분리 장치(20)에서, 배경 모델 생성부(100), 화소 단위 분리부(110), 불확실 영역 추출부(120), 보정부(140)의 동작은 도 1에 관하여 설명된 바와 동일하므로, 설명은 생략하기로 한다.In the foreground background separating apparatus 20 according to the present embodiment, the operations of the background model generating unit 100, the pixel unit separating unit 110, the uncertainty region extracting unit 120, The description is omitted.

먼저, 전경 확률 모델 생성부(145)에 관하여 설명한다. 일반적으로 동영상에서 중요한 특징으로 시간에 따라 영상이 변화하지만 인접한 프레임 간의 영상에서 그 차이는 크지 않은 특징이 있다. 따라서, 이전 프레임에서 전경으로 분류되었던 화소들은 현재 프레임에서도 전경으로 분류된 확률이 높다고 볼 수 있다. 전경 확률 모델 생성부(145)는 이러한 특징을 이용, 과거 프레임의 정보를 반영하여 현재 프레임의 영상의 화소들이 전경 화소일 확률을 나타내는 전경 확률 모델을 생성한다. 이를 위하여, 전경 확률 모델 생성(145)는 화소 단위 분리부(110)에서 화소 단위로 전경과 배경으로 분리된 결과 영상을 누적하여 전경 확률 모델을 생성한다. 이러한 전경 확률 모델을 편의상, 시간적 전경 확률 모델(Temporal Foreground Probability Model, TFPM)이라 명명하기로 한다. 시간적 전경 확률 모델은 다음 수 학식과 같이, 이전 프레임의 전경 확률과 현재 프레임의 전경 분리 결과값의 가중치 합으로 표현될 수 있다.First, the foreground probability model generating unit 145 will be described. Generally, video is an important feature in video, but the difference is not large in the images between adjacent frames. Therefore, it can be seen that the pixels classified into the foreground in the previous frame are highly classified into the foreground in the current frame. The foreground probability model generating unit 145 generates a foreground probability model indicating the probability that the pixels of the image of the current frame are the foreground pixels by reflecting the information of the past frame using this feature. To this end, the foreground probability model generation unit 145 generates a foreground probability model by accumulating the result images separated into foreground and background in the pixel unit separation unit 110 on a pixel-by-pixel basis. For the sake of simplicity, this foreground probability model is called the Temporal Foreground Probability Model (TFPM). The temporal foreground probability model can be expressed as a weighted sum of the foreground probability of the previous frame and the foreground separation result of the current frame, as in the following equation.

Figure 112008028898119-pat00058
Figure 112008028898119-pat00058

Figure 112008028898119-pat00059
Figure 112008028898119-pat00059

여기서,

Figure 112008028898119-pat00060
는 현재 프레임인 t번째 프레임의 영상에서 화소 p가 전경 화소일 확률을,
Figure 112008028898119-pat00061
는, t-1번째 프레임의 영상에서 화소 p가 전경 화소일 확률을,
Figure 112008028898119-pat00062
는 t번째 프레임의 영상에 대한 화소 단위 분리부(110)에서 화소 p의 전경 분리 결과값을 의미하며, 0번째 프레임은 영상에 사람이 등장한 프레임이다.here,
Figure 112008028898119-pat00060
Represents the probability that the pixel p is the foreground pixel in the image of the t-th frame, which is the current frame,
Figure 112008028898119-pat00061
The probability that the pixel p is the foreground pixel in the image of the (t-1) th frame,
Figure 112008028898119-pat00062
Denotes the foreground separation result of the pixel p in the pixel unit separation unit 110 for the image of the t-th frame, and the 0th frame is a frame in which a human appears in the image.

또한,

Figure 112008028898119-pat00063
는 미리 정의되는 소정 값으로서 0에서 1 사이의 값으로 부여되며, 전경 변화의 정도에 따라 그 값을 달리 정의할 수 있다. 예를 들어, 사람의 움직임이 작은 경우에는 바로 이전 프레임의 영상에 가중치를 비교적 높게 주어야 하므로,
Figure 112008028898119-pat00064
를 상대적으로 큰 값으로 정의하고, 사람의 움직임이 큰 경우에는 이전 프레임과 현재 프레임의 차이가 크기 때문에 사람의 움직임이 작은 경우에 비해 이전 프레임의 영상에 가중치를 비교적 낮게 주어야 하므로
Figure 112008028898119-pat00065
를 상대적으로 작은 값으로 정의할 수 있을 것이다. 화상 대화나 화상 회의에서는 사람이 급격하게 움직이는 경우가 적다고 본다면, 본 실시예를 화상 대화나 화상 회의에 적용하고자 할 때
Figure 112008028898119-pat00066
를 상대적으로 큰 값으로 정의할 수 있을 것이다. Also,
Figure 112008028898119-pat00063
Is a predefined predetermined value given as a value between 0 and 1, and the value can be defined differently according to the degree of foreground change. For example, if the motion of the person is small, the weight of the image of the immediately preceding frame should be relatively high,
Figure 112008028898119-pat00064
If the human motion is large, the difference between the previous frame and the current frame is large. Therefore, the weight of the previous frame should be relatively low compared to the case where the human motion is small
Figure 112008028898119-pat00065
Can be defined as a relatively small value. If it is assumed that a person is suddenly moved in an image conversation or a video conference in a small number, if the present embodiment is to be applied to an image conversation or a video conference
Figure 112008028898119-pat00066
Can be defined as a relatively large value.

도 5는 이러한 시간적 전경 확률 모델을 나타내는 도면으로서, (a)는 프레임 별 입력 영상을, (b)는 상술한 시간적 전경 확률 모델에 따라 구해진 전경 확률에 따른 영상을 나타낸다. 시간적 전경 확률 모델에서는 전경 분리 결과가 계속적으로 누적되는 바, (b)를 참조하면 계속적으로 전경으로 분리되는 부분은 흰색의 농도가 짙게 나타나는 것을 알 수 있으며, 이러한 부분은 다음 프레임에서도 전경일 확률이 높다고 할 수 있다. FIG. 5 is a diagram showing such a temporal foreground probability model, in which (a) shows an input image for each frame, and (b) shows an image according to the foreground probability obtained according to the above-described temporal foreground probability model. In the temporal foreground probability model, the result of foreground separation is continuously accumulated. Referring to (b), it can be seen that the white background is consistently concentrated in the part separated into the foreground continuously. can do.

상술한 시간적 전경 확률 모델을 이용하면 전경인 사람의 몸에 홀이 발생하는 등의 문제점을 해결할 수 있는 장점이 있다. 사람의 몸에 홀이 생성된 영역이 매우 작다고 하더라도 사람의 몸이나 머리 부분에 홀이 발생하게 되면, 배경을 다른 영상으로 합성하였을 때 영상을 보는 사람의 눈에 확 띄게 된다. 그러나 상술한 시간적 전경 확률 모델에 따르면 과거의 전경 분리 결과를 누적하여 전경일 확률이 구해지므로 홀이 발생하는 문제점을 해결할 수 있다.The use of the temporal foreground probability model described above has the advantage of solving problems such as the occurrence of holes in the foreground human body. Even if the area where the hole is created in the human body is very small, if holes are formed in the human body or the head part, the image becomes noticeable to the viewer when the background is synthesized with another image. However, according to the above-described temporal foreground probability model, the problem of the occurrence of a hole can be solved because the past foreground separation result is accumulated to obtain the probability of a foreground.

영역 단위 분류부(135)는 도 1에 관하여 설명된 영역 단위 분류부(130)와 마찬가지로, 불확실 영역 추출부(120)에서 추출된 불확실 영역들에 대하여 전경 영역일 확률을 계산하고, 이 확률에 따라 불확실 영역들을 전경 영역 또는 배경 영역으로 분류한다. 다만, 본 실시예에서는 전경 확률 모델 생성부(145)에서 생성된 시간적 전경 확률 모델이, 불확실 영역들에 대한 전경 영역일 확률을 계산하는 데 이용된다. 본 실시예에 따르면, 영역 단위 분류부(135)에서 불확실 영역들 각각에 대하여 해당 영역이 전경 영역일 확률은 다음 수학식에 따라 구해질 수 있다.The area unit classifying unit 135 calculates the probability that the uncertainty area extracted by the uncertainty area extracting unit 120 is the foreground area as in the case of the area unit classifying unit 130 described with reference to FIG. Accordingly, the uncertainty regions are classified into the foreground region or the background region. However, in the present embodiment, the temporal foreground probability model generated by the foreground probability model generator 145 is used to calculate the probability of the foreground region for uncertainty regions. According to this embodiment, the probability that the corresponding region is the foreground region for each of the uncertainty regions in the region unit classifier 135 can be obtained according to the following equation.

Figure 112008028898119-pat00067
Figure 112008028898119-pat00067

여기서, P Fg t (R i )는 현재 프레임인 t번째 프레임에서 불확실 영역 R i 의 전경 영역일 확률을, P Fg t-1 (R i )은 이전 프레임인 t-1번째 프레임에서의 불확실 영역 R i 의 전경 영역일 확률을, N Fg (R i )N Bg (R i )는 t번째 프레임에서 불확실 영역 R i 의 전경 화소의 개수 및 배경 화소의 개수를 의미한다. 그리고

Figure 112008028898119-pat00068
는 상기된 수학식 10에 따른 현재 프레임인 t번째 프레임의 영상에서 화소 p가 전경 화소일 확률을 나타낸다. Here, P Fg t (R i) is the probability of the foreground area of the uncertainty region R i in a t-th frame is the current frame, P Fg t-1 (R i) is the previous frame is a t-1 uncertainty region of the second frame the probability of the foreground region of the R i, N Fg (R i) and Bg N (R i) is the number of the number of foreground pixels and background pixels in the uncertain region R i in the t-th frame. And
Figure 112008028898119-pat00068
Represents the probability that the pixel p is the foreground pixel in the image of the t-th frame, which is the current frame according to Equation (10).

도 6은 본 발명의 일 실시예에 따른, 영상을 전경과 배경으로 분리하여 배경을 대체하는 장치의 블록도이다. 본 실시예에 따른 배경 대체 장치는, 전경 배경 분리부(30) 및 배경 영상 합성부(40)를 포함하여 이루어진다.FIG. 6 is a block diagram of an apparatus for separating backgrounds into foreground and background images according to an embodiment of the present invention. Referring to FIG. The background substitution apparatus according to the present embodiment includes a foreground background separating unit 30 and a background image synthesizing unit 40.

전경 배경 분리부(30)는 입력 영상을 전경과 배경으로 분리하여, 배경이 제거된 전경 영상을 출력한다. 전경 배경 분리부(30)는 도 1에 관하여 설명된 전경 배경 분리 장치(10) 또는 도 4에 관하여 설명된 전경 배경 분리 장치(20)의 구성 및 동작과 동일하므로, 여기서 설명은 생략하기로 한다. The foreground background separating unit 30 separates the input image into foreground and background, and outputs a foreground image in which the background is removed. The foreground background separating unit 30 is the same as the foreground background separating apparatus 10 described with reference to FIG. 1 or the foreground background separating apparatus 20 described with reference to FIG. 4, and thus description thereof will be omitted .

배경 영상 합성부(40)는 전경 배경 분리부(30)에서 출력된 전경 영상에 미리 마련된 대체될 배경 영상을 합성하여, 입력 영상에서 배경이 대체된 영상을 출력한 다. The background image synthesis unit 40 synthesizes a background image to be replaced, which is provided in advance in the foreground image output from the foreground background separator 30, and outputs an image in which the background is replaced in the input image.

단순히 분리된 사람 영상에 새로운 배경 영상을 대체하는 경우, 완전히 다른 조건에서 생성된 두 영상이기 때문에 사람 영역을 가위로 오려 새로운 배경에 붙여놓은 듯한 느낌을 줄 수 있다. 즉, 전경 영상과 대체될 새로운 배경 영상은 완전히 서로 다른 조명 조건에서 촬영된 영상이기 때문에 하나의 영상으로 합성할 경우 각 영상의 전체적인 밝기와 색상이 전혀 달라 자연스러운 하나의 영상으로 보이지 않을 수 있다. 이러한 문제점을 해결하기 위해서는 배경 영상을 전경 영상과 같은 조명 조건에서 촬영한 것처럼 보이기 위한 밝기와 색상에 대한 보정 작업이 필요하다. 따라서 본 실시예에서, 배경 영상 합성부(40)는 전경 영상의 색상 정보를 고려하여, 합성된 배경 영상의 색상 또는 밝기를 보정한다.In the case of simply replacing a new background image with a separated human image, since the two images are generated under completely different conditions, it is possible to give the impression that the human region is scissors cut and pasted on a new background. In other words, since the new background image to be replaced with the foreground image is an image photographed under completely different lighting conditions, the overall brightness and color of each image may be completely different from each other, resulting in a single natural image. To solve these problems, it is necessary to correct the brightness and color of the background image to make it appear as if the background image is photographed in the same lighting condition as the foreground image. Therefore, in the present embodiment, the background image composition unit 40 corrects the color or brightness of the synthesized background image in consideration of the color information of the foreground image.

먼저, 배경 영상의 색상 보정에 관하여 설명한다. 본 실시예에서, 전경 영상과 배경 영상 간의 색상 차이를 보정하기 위해 대각선 모델(diagonal model)을 이용한 색상 변환(color transform) 방법을 사용한다. 대각선 모델을 이용한 색상 보정은 두 영상 내에 서로 대응되는 화소가 존재하지 않아도 색상 보정이 가능하며 속도가 매우 빠르다는 장점이 있다. First, the color correction of the background image will be described. In this embodiment, a color transform method using a diagonal model is used to correct a color difference between a foreground image and a background image. The color correction using the diagonal model is advantageous in that color correction is possible and speed is very fast even if there are no corresponding pixels in two images.

대체될 배경의 색상 보정은 다음 수학식에서와 같이 대체될 배경과 대각선 모델 M의 곱으로 나타내어질 수 있다. The color correction of the background to be replaced can be represented by the product of the background to be replaced and the diagonal model M as in the following equation.

Figure 112008028898119-pat00069
대체될 배경 x M = 보정된 배경,
Figure 112008028898119-pat00069
Background to be replaced x M = corrected background,

여기서, α, β, γ는 각각 전경 영상과 대체될 배경 영상의 R, G, B 컬러채널의 평균 명암도(intensity)의 비율을 나타내며, 다음 수학식에 따라 구해진다.Here,?,?, And? Represent the ratio of the average intensity of the R, G, and B color channels of the foreground image and the background image to be replaced, respectively, and are obtained according to the following equations.

Figure 112008028898119-pat00070
Figure 112008028898119-pat00070

여기서, mean ( R F )mean ( R B )는 각각 전경 영상의 R 컬러채널 값의 평균 및 대체될 배경 영상의 R 컬러채널 값의 평균을 나타낸다. G 컬러채널 및 B 컬러채널에 관하여도 마찬가지이다. Mean ( R F ) and mean ( R B ) represent the average of the R color channel values of the foreground image and the average of the R color channel values of the background image to be replaced, respectively. The same is true for the G color channel and the B color channel.

다만, 배경 영상의 색상을 보정하는 경우, 전경 영상의 색상 분포가 특정 컬러채널에 지나치게 편중되어 있다면, 상술한 바와 같이 전경 영상의 컬러채널 값을 고려하여 배경 영상의 색상을 보정하는 것은 좋지 않은 결과를 초래할 수 있다. 예를 들어, 배경 영역이 특정 컬러채널에 편중되도록 보정될 수 있다. 이러한 경우 배경 영역의 색상을 보정하기보다 밝기만 보정하는 것이 더욱 좋은 결과를 나타낼 수 있다. 따라서 본 실시예에서는, 전경 영상의 색상 정보를 분석하고, 색상이 특정 컬러채널에 지나치게 편중되어 있는지 여부에 따라서 선택적으로, 배경 영상의 색상을 보정하거나, 배경 영상의 밝기를 보정한다.However, in the case of correcting the color of the background image, if the color distribution of the foreground image is excessively concentrated on the specific color channel, correcting the color of the background image in consideration of the color channel value of the foreground image as described above is not preferable ≪ / RTI > For example, the background area may be corrected to be biased to a particular color channel. In this case, correcting only the brightness rather than the color of the background area may give better results. Therefore, in the present embodiment, the color information of the foreground image is analyzed, and the color of the background image is selectively corrected or the brightness of the background image is corrected depending on whether the color is excessively concentrated on the specific color channel.

도 7은 본 발명의 일 실시예에 따라 배경 영상의 색상 또는 밝기를 선택적으로 보정하는 방법을 나타낸 흐름도이다.FIG. 7 is a flowchart illustrating a method of selectively correcting hue or brightness of a background image according to an exemplary embodiment of the present invention. Referring to FIG.

먼저 610단계에서, 전경 영상 및 대체될 배경 영상의 R, G, B 컬러채널 값의 평균을 각각 계산한다.First, in step 610, the average of the R, G, and B color channel values of the foreground image and the background image to be replaced are respectively calculated.

620단계에서 전경 영상의 색상 분포가 특정 컬러채널에 지나치게 편중되어 있는지 판단한다. 여기서, 특정 컬러채널에 지나치게 편중되어 있는지 여부는 전경 영상의 컬러채널 값의 평균들 중 특정 컬러채널 값의 평균이 소정 임계값보다 큰지 여부에 따라 판단할 수 있다. 또는, 각 컬러채널 값의 평균을 서로 비교하여 그 차이가 소정 임계값보다 큰지 여부에 따라 판단할 수도 있을 것이다. It is determined in step 620 whether the color distribution of the foreground image is excessively concentrated on the specific color channel. Here, whether or not the specific color channel is excessively biased can be determined according to whether an average of the specific color channel values among the averages of the color channel values of the foreground image is greater than a predetermined threshold value. Alternatively, the average of the color channel values may be compared with each other to determine whether the difference is greater than a predetermined threshold value.

620단계에서 지나치게 편중되어 있는 것으로 판단되었다면, 630단계로 진행하여 배경 영상의 밝기 보정을 수행한다. 배경 영상의 밝기 보정은, 상기된 수학식 12의 대각선 모델 M을 다음 수학식에 따른 대각선 모델, 즉 성분 α, β, γ가 모두 동일한 값을 가지는 대각선 모델로 치환함으로써 나타내어질 수 있다.If it is determined in step 620 that the brightness of the background image is excessively concentrated, the brightness of the background image is corrected in step 630. The brightness correction of the background image can be represented by replacing the diagonal model M of Equation (12) with a diagonal model according to the following equation, i.e., by substituting diagonal models having the same values of all the components?,?, And?.

Figure 112008028898119-pat00071
Figure 112008028898119-pat00071

상술한 바와 같이 선택적으로 밝기 보정 또는 색상 보정을 함으로써, 배경 영상 합성 시 발생할 수 있는 배경은 어둡고 전경은 밝아서 발생하는 부자연스러운 문제점 또는 배경과 전경의 색 비율이 다른 경우 발생하는 부자연스러운 문제점 등 이 해결됨으로써 보다 자연스러운 배경 합성이 이루어질 수 있다.By selectively performing brightness correction or color correction as described above, it is possible to solve unnatural problems caused by dark background and bright foreground, or unnatural problems caused when background and foreground color ratios are different from each other A more natural background composition can be achieved.

한편, 색과 밝기를 잘 보정하였다고 하더라도 배경과 사람의 경계부분이 부드럽게 처리되지 않으면 사람 영역을 가위로 오려 다른 배경에 붙인 듯한 느낌을 줄 수 있다. 이러한 문제점을 해결하기 위하여, 본 실시예에서 배경 영상 합성부(40)는 전경 영상과 배경 영상의 경계 영역에 블러링 효과를 주어 두 영상의 분리감을 최소화한다. 블러링 효과를 위해 5ㅧ5 마스크를 가지는 가우시안 완곡화 필터를 적용하였으며 가우시안 완곡화 필터의 형식은 다음 수학식에 따라 정의될 수 있다.On the other hand, even if the color and brightness are well corrected, if the boundary between the background and the human is not smoothly processed, it may give the impression that the human area is scissored and attached to another background. In order to solve such a problem, in the present embodiment, the background image composer 40 minimizes the separation of the two images by blurring the boundary region between the foreground image and the background image. For the blurring effect, a Gaussian dithering filter with a 5 ㅧ 5 mask is applied, and the format of the Gaussian dithering filter can be defined by the following equation.

Figure 112008028898119-pat00072
Figure 112008028898119-pat00072

가우시안 완곡화 필터의 실시간 적용을 위하여 매번 계산하지 않고 미리 계산된 필터를 사용할 수 있으며, 이러한 필터의 형태를 도 8에 도시하였다. 그리고 필터의 적용 범위는, 전경과 배경으로 분할된 영상에서 에지를 구하고, 팽창 연산을 수행하여 블러링 마스크를 생성함으로써 적용 범위를 제한한다.For the real-time application of the Gaussian dithering filter, a pre-computed filter can be used without being calculated every time, and the form of such a filter is shown in FIG. And the application range of the filter is limited by applying the blurring mask by calculating the edge from the image divided into the foreground and the background and performing the dilation operation.

도 9는 블러링 마스크와 가우시안 완곡화 필터가 적용되는 모습을 보여주기위한 도면이다. 도 9에서, (a)는 필터를 사용하지 않은 배경 대체 결과에 따른 영상을, (b)는 필터를 적용하기 위한 블러링 마스크를, (c)는 블러링 마스크를 이용하여 가우시안 완곡화 필터를 적용한 결과에 따른 영상을 나타낸다. 9 is a view for showing a state in which a blurring mask and a Gaussian divergent filter are applied. In FIG. 9, (a) shows an image according to a background substitution result that does not use a filter, (b) shows a blurring mask for applying a filter, and (c) shows a Gaussian dithering filter using a blurring mask. It shows the image according to the applied result.

도 10은 상술한 본 발명의 실시예에 따라 입력 영상의 배경을 새로운 배경으 로 대체한 결과를 나타낸다. 도 9에서 (a-1), (a-2), (a-3)은 입력 영상을, (b-1), (b-2), (b-3)은 입력 영상의 배경을 새로운 배경으로 대체한 결과를 나타낸다. 10 shows a result of replacing the background of the input image with a new background according to the embodiment of the present invention described above. 9, (a-1), (a-2) and (a-3) As shown in Fig.

한편, 상술한 본 발명의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다. 상기 컴퓨터로 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드 디스크 등), 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등) 및 캐리어 웨이브(예를 들면, 인터넷을 통한 전송)와 같은 저장매체를 포함한다.The above-described embodiments of the present invention can be embodied in a general-purpose digital computer that can be embodied as a program that can be executed by a computer and operates the program using a computer-readable recording medium. The computer readable recording medium may be a magnetic storage medium such as a ROM, a floppy disk, a hard disk, etc., an optical reading medium such as a CD-ROM or a DVD and a carrier wave such as the Internet Lt; / RTI > transmission).

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.The present invention has been described with reference to the preferred embodiments. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

도 1은 본 발명의 일 실시예에 따른 영상을 전경과 배경으로 분리하는 장치의 블록도이다.1 is a block diagram of an apparatus for separating an image into foreground and background according to an embodiment of the present invention.

도 2는 본 발명의 일 실시예에 따라서 입력 영상이 전경과 배경으로 분리된 결과를 보여준다. FIG. 2 shows a result obtained by dividing an input image into a foreground and background according to an embodiment of the present invention.

도 3은 본 발명의 일 실시예에 따라 입력 영상이 전경과 배경으로 분리되는 과정을 나타낸다. FIG. 3 illustrates a process in which an input image is divided into foreground and background according to an embodiment of the present invention.

도 4는 본 발명의 다른 실시예에 따른 영상을 전경과 배경으로 분리하는 장치의 블록도이다. 4 is a block diagram of an apparatus for separating an image into foreground and background according to another embodiment of the present invention.

도 5는 본 발명에 따른 시간적 전경 확률 모델을 나타내는 도면이다.5 is a diagram illustrating a temporal foreground probability model according to the present invention.

도 6은 본 발명의 일 실시예에 따른, 영상을 전경과 배경으로 분리하여 배경을 대체하는 장치의 블록도이다.FIG. 6 is a block diagram of an apparatus for separating backgrounds into foreground and background images according to an embodiment of the present invention. Referring to FIG.

도 7은 본 발명의 일 실시예에 따라 배경 영상의 색상 또는 밝기를 선택적으로 보정하는 방법을 나타낸 흐름도이다.FIG. 7 is a flowchart illustrating a method of selectively correcting hue or brightness of a background image according to an exemplary embodiment of the present invention. Referring to FIG.

도 8은 가우시안 완곡화 필터의 실시간 적용을 위하여 미리 계산된 필터의 형태를 나타낸다.FIG. 8 shows the form of a pre-computed filter for real-time application of the Gaussian convolution filter.

도 9는 블러링 마스크와 가우시안 완곡화 필터가 적용되는 모습을 보여주기위한 도면이다. 9 is a view for showing a state in which a blurring mask and a Gaussian divergent filter are applied.

도 10은 본 발명의 일 실시예에 따라 입력 영상의 배경을 새로운 배경으로 대체한 결과를 나타낸다.10 shows a result of replacing the background of an input image with a new background according to an embodiment of the present invention.

Claims (26)

영상을 전경과 배경으로 분리하는 방법에 있어서,A method for separating an image into foreground and background, (a) 입력되는 현재 프레임의 영상을 배경 모델과 비교하여, 상기 영상을 화소 단위로 전경과 배경으로 분리하는 단계;(a) comparing an image of an input current frame with a background model, and separating the image into foreground and background in units of pixels; (b) 상기 영상을 복수 개의 영역들로 분할하고, 상기 분할된 영역들 중 전경 영역인지 배경 영역인지 불확실한 영역들을 추출하는 단계;(b) dividing the image into a plurality of regions and extracting uncertain regions, whether the region is a foreground region or a background region, among the divided regions; (c) 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 단계; 및(c) classifying the extracted regions into a foreground region and a background region; And (d) 상기 (c) 단계에서 분류된 결과에 따라 상기 추출된 영역들에 속한 화소들의 전경 배경 분리 결과를 보정하는 단계를 포함하는 것을 특징으로 하는 전경 배경 분리 방법.(d) correcting the foreground background separation result of the pixels belonging to the extracted regions according to the result classified in the step (c). 제1항에 있어서,The method according to claim 1, 상기 배경 모델을 생성하는 단계를 더 포함하고, 상기 배경 모델은 전경에 해당하는 물체 또는 사람이 등장하기 이전 프레임까지의 매 프레임마다 학습된 모델을 따르는 것을 특징으로 하는 전경 배경 분리 방법.Further comprising generating the background model, wherein the background model follows a learned model for every frame up to an object in foreground or a frame before the appearance of a person. 제1항에 있어서,The method according to claim 1, 상기 (a) 단계는, 화소 단위로 상기 영상과 상기 배경 모델의 유사도를 계산하고, 상기 계산된 유사도를 소정 제1 임계값과 비교함으로써 상기 영상을 전경과 배경으로 분리하는 것을 특징으로 하는 전경 배경 분리 방법.Wherein the step (a) comprises: dividing the image into foreground and background by calculating the similarity between the image and the background model on a pixel-by-pixel basis, and comparing the calculated similarity with a predetermined first threshold value, Separation method. 제1항에 있어서,The method according to claim 1, 상기 (b) 단계는, 상기 분할된 영역들 각각에 대하여, 상기 (a) 단계에서 화소 단위로 전경과 배경으로 분리된 결과를 이용하여 전경 영역인지 배경 영역인지 불확실할 확률을 계산하고, 상기 계산된 확률을 소정 제2 임계값과 비교함으로써 상기 불확실할 영역들을 추출하는 것을 특징으로 하는 전경 배경 분리 방법.The step (b) may include calculating a probability that the background region is uncertain whether the foreground region or the background region is divided using foreground and background separated results for each pixel in the step (a) And extracting the uncertainty regions by comparing the probability of occurrence of the uncertainty region with a predetermined second threshold value. 제1항에 있어서, 상기 (c) 단계는,The method of claim 1, wherein the step (c) (c1) 상기 추출된 영역들 각각에 대하여, 전경 영역일 확률을 계산하는 단계; 및(c1) calculating a probability of a foreground region for each of the extracted regions; And (c2) 상기 계산된 확률을 소정 제3 임계값과 비교함으로써 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 단계를 포함하는 것을 특징으로 하는 전경 배경 분리 방법.(c2) classifying the extracted regions into a foreground region and a background region by comparing the calculated probability with a predetermined third threshold value. 제5항에 있어서,6. The method of claim 5, 상기 (a) 단계는, 화소 단위로 상기 영상과 상기 배경 모델의 유사도를 계산하고, 상기 계산된 유사도를 소정 제1 임계값과 비교함으로써 상기 영상을 전경과 배경으로 분리하며,The step (a) may include calculating the similarity between the image and the background model on a pixel-by-pixel basis, separating the image into foreground and background by comparing the calculated similarity with a predetermined first threshold value, 상기 (c1) 단계는, 상기 계산된 유사도를 이용하여 상기 전경 영역일 확률을 계산하는 것을 특징으로 하는 전경 배경 분리 방법.Wherein the calculating of the probability of the foreground region using the calculated similarity is performed in step (c1). 제6항에 있어서,The method according to claim 6, 상기 전경 영역일 확률은 다음 수학식에 따라 구해지는 것을 특징으로 하는 전경 배경 분리 방법.Wherein the probability of the foreground region is determined according to the following equation.
Figure 112014068428007-pat00073
Figure 112014068428007-pat00073
여기서, PFg(Ri)는 불확실 영역 Ri 의 전경 영역일 확률을, NFg(Ri)는 불확실 영역 Ri 에서의 전경 화소의 개수를, NBg(Ri)는 불확실 영역 Ri 에서의 배경 화소의 개수를, UR은 불확실 영역을, p는 화소를, l(p)는 영상 내의 임의의 화소 p에 대한 유사도를 의미한다.Here, P Fg (R i) is the probability of the foreground area of the uncertainty region R i, N Fg (R i) is the number of foreground pixels in the uncertain region R i, N Bg (R i) is uncertain region R i Where UR is the uncertainty region, p is the pixel, and l (p) is the similarity to any pixel p in the image.
제5항에 있어서,6. The method of claim 5, 소정의 과거 프레임으로부터 상기 현재 프레임까지 상기 (a) 단계에서 화소 단위로 전경과 배경으로 분리된 결과 영상을 누적하여 전경 확률 모델을 생성하는 단계를 더 포함하고, Further comprising the step of generating a foreground probability model by accumulating the result images separated in foreground and background from the predetermined past frame to the current frame in units of pixels in step (a) 상기 (c1) 단계는, 상기 생성된 전경 확률 모델을 이용하여 상기 전경 영역일 확률을 계산하는 것을 특징으로 하는 전경 배경 분리 방법.Wherein the step (c1) calculates the probability of the foreground region using the generated foreground probability model. 제8항에 있어서,9. The method of claim 8, 상기 전경 확률 모델은, 다음 수학식에 따라 표현되는 것을 특징으로 하는 전경 배경 분리 방법.Wherein the foreground probability model is expressed according to the following equation.
Figure 112008028898119-pat00074
Figure 112008028898119-pat00074
여기서,
Figure 112008028898119-pat00075
는 프레임 t의 영상에서 화소 p가 전경 화소일 확률을,
Figure 112008028898119-pat00076
는 프레임 t-1의 영상에서 화소 p가 전경 화소일 확률을,
Figure 112008028898119-pat00077
는 프레임 t의 영상에서 화소 p의 전경 분리 결과값을 의미하며,
Figure 112008028898119-pat00078
는 소정 값이다.
here,
Figure 112008028898119-pat00075
Shows the probability that the pixel p is the foreground pixel in the image of the frame t,
Figure 112008028898119-pat00076
The probability that the pixel p is the foreground pixel in the image of the frame t-1,
Figure 112008028898119-pat00077
Denotes the foreground separation result of the pixel p in the image of the frame t,
Figure 112008028898119-pat00078
Is a predetermined value.
제9항에 있어서,10. The method of claim 9, 상기 전경 영역일 확률은 다음 수학식에 따라 구해지는 것을 특징으로 하는 전경 배경 분리 방법.Wherein the probability of the foreground region is determined according to the following equation.
Figure 112014068428007-pat00079
Figure 112014068428007-pat00079
여기서, PFg t(Ri)는 현재 프레임인 t번째 프레임에서 불확실 영역 Ri 의 전경 영역일 확률을, PFg t-1(Ri)은 이전 프레임인 t-1번째 프레임에서의 불확실 영역 Ri 의 전경 영역일 확률을, NFg(Ri)NBg(Ri)는 t번째 프레임에서 불확실 영역 Ri 의 전경 화소의 개수 및 배경 화소의 개수를, UR은 불확실 영역을 나타낸다. Here, P Fg t (R i) is the probability of the foreground area of the uncertainty region R i in a t-th frame is the current frame, P Fg t-1 (R i) is the previous frame is a t-1 uncertainty region of the second frame the probability of the foreground region of the R i, N Fg (R i) and N Bg (R i) is a t a number of the number and background pixels of the foreground pixels in the uncertain region R i in the second frame, UR represents the uncertainty region.
제1항 내지 제10항 중 어느 한 항에 기재된, 영상을 전경과 배경으로 분리하 는 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체.A computer-readable recording medium having recorded thereon a program according to any one of claims 1 to 10 for executing a method for dividing an image into foreground and background. 영상을 전경과 배경으로 분리하는 장치에 있어서,An apparatus for separating an image into foreground and background, comprising: 입력되는 현재 프레임의 영상을 배경 모델과 비교하여, 상기 영상을 화소 단위로 전경과 배경으로 분리하는 화소 단위 분리부;A pixel unit separator for comparing an image of an input current frame with a background model and separating the image into a foreground and a background in units of pixels; 상기 영상을 복수 개의 영역들로 분할하고, 상기 분할된 영역들 중 전경 영역인지 배경 영역인지 불확실한 영역들을 추출하는 불확실 영역 추출부;An uncertainty region extraction unit for dividing the image into a plurality of regions and extracting uncertain regions, which are foreground regions or background regions, of the divided regions; 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 영역 단위 분류부; 및A region unit classification unit for classifying the extracted regions into a foreground region and a background region; And 상기 영역 단위 분류부에서 분류된 결과에 따라 상기 추출된 영역들에 속한 화소들의 전경 배경 분리 결과를 보정하는 보정부를 포함하는 것을 특징으로 하는 전경 배경 분리 장치.And a correction unit for correcting a foreground background separation result of pixels belonging to the extracted regions according to a result classified by the region unit classifier. 제12항에 있어서,13. The method of claim 12, 상기 배경 모델을 생성하는 배경 모델 생성부를 더 포함하고, 상기 배경 모델은 전경에 해당하는 물체 또는 사람이 등장하기 이전 프레임까지의 매 프레임마다 학습된 모델을 따르는 것을 특징으로 하는 전경 배경 분리 장치.Further comprising a background model generation unit for generating the background model, wherein the background model follows a learned model for every frame up to an object corresponding to the foreground or a frame before the appearance of the person. 제12항에 있어서,13. The method of claim 12, 상기 화소 단위 분리부는, 화소 단위로 상기 영상과 상기 배경 모델의 유사도를 계산하고, 상기 계산된 유사도를 소정 제1 임계값과 비교함으로써 상기 영상을 전경과 배경으로 분리하는 것을 특징으로 하는 전경 배경 분리 장치.Wherein the pixel unit separation unit divides the image into foreground and background by calculating the similarity between the image and the background model on a pixel basis and comparing the calculated similarity with a predetermined first threshold value, Device. 제12항에 있어서,13. The method of claim 12, 상기 불확실 영역 추출부는, 상기 분할된 영역들 각각에 대하여, 상기 화소 단위 분리부에서 화소 단위로 전경과 배경으로 분리된 결과를 이용하여 전경 영역인지 배경 영역인지 불확실할 확률을 계산하고, 상기 계산된 확률을 소정 제2 임계값과 비교함으로써 상기 불확실할 영역들을 추출하는 것을 특징으로 하는 전경 배경 분리 장치.Wherein the uncertainty region extraction unit calculates a probability that an uncertainty of the foreground region or the background region is uncertain for each of the divided regions, And extracts the uncertainty areas by comparing the probability with a predetermined second threshold. 제12항에 있어서,13. The method of claim 12, 상기 영역 단위 분류부는, 상기 추출된 영역들 각각에 대하여, 전경 영역일 확률을 계산하고, 상기 계산된 확률을 소정 제3 임계값과 비교함으로써 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 것을 특징으로 하는 전경 배경 분리 장치.The region unit classification unit may classify the extracted regions into a foreground region and a background region by calculating a probability of a foreground region for each of the extracted regions and comparing the calculated probability with a predetermined third threshold value Features a foreground background separation device. 제16항에 있어서,17. The method of claim 16, 상기 화소 단위 분리부는, 화소 단위로 상기 영상과 상기 배경 모델의 유사도를 계산하고, 상기 계산된 유사도를 소정 제1 임계값과 비교함으로써 상기 영상을 전경과 배경으로 분리하며,Wherein the pixel unit separation unit calculates the similarity between the image and the background model on a pixel basis and separates the image into foreground and background by comparing the calculated similarity with a predetermined first threshold, 상기 영역 단위 분류부는, 상기 계산된 유사도를 이용하여 상기 전경 영역일 확률을 계산하는 것을 특징으로 하는 전경 배경 분리 장치.Wherein the area unit classification unit calculates a probability of the foreground region using the calculated similarity. 제17항에 있어서,18. The method of claim 17, 상기 전경 영역일 확률은 다음 수학식에 따라 구해지는 것을 특징으로 하는 전경 배경 분리 장치.Wherein the probability of the foreground region is obtained according to the following equation.
Figure 112014068428007-pat00080
Figure 112014068428007-pat00080
여기서, PFg(Ri)는 불확실 영역 Ri 의 전경 영역일 확률을, NFg(Ri)는 불확실 영역 Ri 에서의 전경 화소의 개수를, NBg(Ri)는 불확실 영역 Ri 에서의 배경 화소의 개수를, UR은 불확실 영역을, p는 화소를, l(p)는 영상 내의 임의의 화소 p에 대한 유사도를 의미한다.Here, P Fg (R i) is the probability of the foreground area of the uncertainty region R i, N Fg (R i) is the number of foreground pixels in the uncertain region R i, N Bg (R i) is uncertain region R i Where UR is the uncertainty region, p is the pixel, and l (p) is the similarity to any pixel p in the image.
제16항에 있어서,17. The method of claim 16, 소정의 과거 프레임으로부터 상기 현재 프레임까지 상기 화소 단위 분리부에서 화소 단위로 전경과 배경으로 분리된 결과 영상을 누적하여 전경 확률 모델을 생성하는 확률 모델 생성부를 더 포함하고, Further comprising: a probability model generation unit for generating a foreground probability model by accumulating the result images separated into the foreground and the background in units of pixels in the pixel unit separation unit from a predetermined past frame to the current frame, 상기 영역 단위 분류부는, 상기 생성된 전경 확률 모델을 이용하여 상기 전경 영역일 확률을 계산하는 것을 특징으로 하는 전경 배경 분리 장치.Wherein the area unit classification unit calculates the probability of the foreground area using the generated foreground probability model. 제19항에 있어서,20. The method of claim 19, 상기 전경 확률 모델은, 다음 수학식에 따라 표현되는 것을 특징으로 하는 전경 배경 분리 장치.Wherein the foreground probability model is expressed according to the following equation.
Figure 112008028898119-pat00081
Figure 112008028898119-pat00081
여기서,
Figure 112008028898119-pat00082
는 프레임 t의 영상에서 화소 p가 전경 화소일 확률을,
Figure 112008028898119-pat00083
는 프레임 t-1의 영상에서 화소 p가 전경 화소일 확률을,
Figure 112008028898119-pat00084
는 프레임 t의 영상에서 화소 p의 전경 분리 결과값을 의미하며,
Figure 112008028898119-pat00085
는 소정 값이다.
here,
Figure 112008028898119-pat00082
Shows the probability that the pixel p is the foreground pixel in the image of the frame t,
Figure 112008028898119-pat00083
The probability that the pixel p is the foreground pixel in the image of the frame t-1,
Figure 112008028898119-pat00084
Denotes the foreground separation result of the pixel p in the image of the frame t,
Figure 112008028898119-pat00085
Is a predetermined value.
제20항에 있어서,21. The method of claim 20, 상기 전경 영역일 확률은 다음 수학식에 따라 구해지는 것을 특징으로 하는 전경 배경 분리 장치.Wherein the probability of the foreground region is obtained according to the following equation.
Figure 112014068428007-pat00086
Figure 112014068428007-pat00086
여기서, PFg t(Ri)는 현재 프레임인 t번째 프레임에서 불확실 영역 Ri 의 전경 영역일 확률을, PFg t-1(Ri)은 이전 프레임인 t-1번째 프레임에서의 불확실 영역 Ri 의 전경 영역일 확률을, NFg(Ri)NBg(Ri)는 t번째 프레임에서 불확실 영역 Ri 의 전경 화소의 개수 및 배경 화소의 개수를, UR은 불확실 영역을 나타낸다. Here, P Fg t (R i) is the probability of the foreground area of the uncertainty region R i in a t-th frame is the current frame, P Fg t-1 (R i) is the previous frame is a t-1 uncertainty region of the second frame the probability of the foreground region of the R i, N Fg (R i) and N Bg (R i) is a t a number of the number and background pixels of the foreground pixels in the uncertain region R i in the second frame, UR represents the uncertainty region.
영상을 전경과 배경으로 분리하여 배경을 대체하는 방법에 있어서,A method of replacing a background by dividing an image into foreground and background, (a) 입력되는 영상을 배경 모델과 비교하여, 상기 영상을 화소 단위로 전경과 배경으로 분리하는 단계;(a) comparing an input image with a background model, and separating the image into foreground and background in units of pixels; (b) 상기 영상을 복수 개의 영역들로 분할하고, 상기 분할된 영역들 중 전경 영역인지 배경 영역인지 불확실한 영역들을 추출하는 단계;(b) dividing the image into a plurality of regions and extracting uncertain regions, whether the region is a foreground region or a background region, among the divided regions; (c) 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 단계;(c) classifying the extracted regions into a foreground region and a background region; (d) 상기 (c) 단계에서 분류된 결과에 따라 상기 추출된 영역들에 속한 화소들의 전경 배경 분리 결과를 보정하여, 전경 영상을 출력하는 단계; 및(d) correcting foreground background separation results of pixels belonging to the extracted regions according to a result classified in step (c), and outputting a foreground image; And (e) 상기 전경 영상에 미리 마련된 배경 영상을 합성하는 단계를 포함하는 것을 특징으로 하는 배경 대체 방법.(e) synthesizing a background image prepared in advance in the foreground image. 제22항에 있어서,23. The method of claim 22, 상기 (e) 단계는, 상기 전경 영상과 상기 배경 영상의 각 컬러채널 값에 따라 상기 배경 영상의 색상을 보정하는 단계를 포함하는 것을 특징으로 하는 배경 대체 방법.Wherein the step (e) includes the step of correcting the hue of the background image according to each color channel value of the foreground image and the background image. 제22항에 있어서,23. The method of claim 22, 상기 (e) 단계는, 상기 전경 영상의 색상 정보를 분석하고, 특정 컬러채널에 편중되어 있는지 여부에 따라서 선택적으로, 상기 전경 영상과 배경 영상의 각 컬러채널 값에 따라 상기 배경 영상의 색상을 보정하거나, 상기 배경 영상의 밝기를 보정하는 단계를 포함하는 것을 특징으로 하는 배경 대체 방법.The step (e) may include: analyzing color information of the foreground image and selectively adjusting a color of the background image according to each color channel value of the foreground image and the background image, Or correcting the brightness of the background image. 제22항 내지 제24항 중 어느 한 항에 기재된, 영상을 전경과 배경으로 분리하여 배경을 대체하는 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체.A computer-readable recording medium having recorded thereon a program according to any one of claims 22 to 24 for executing a method of separating a foreground and background into images and replacing the background. 영상을 전경과 배경으로 분리하여 배경을 대체하는 장치에 있어서,1. An apparatus for separating a background into foreground and background, 입력되는 영상을 배경 모델과 비교하여, 상기 영상을 화소 단위로 전경과 배경으로 분리하는 화소 단위 분리부;A pixel unit separation unit for comparing an input image with a background model and separating the image into a foreground and a background in units of pixels; 상기 영상을 복수 개의 영역들로 분할하고, 상기 분할된 영역들 중 전경 영역인지 배경 영역인지 불확실한 영역들을 추출하는 불확실 영역 추출부;An uncertainty region extraction unit for dividing the image into a plurality of regions and extracting uncertain regions, which are foreground regions or background regions, of the divided regions; 상기 추출된 영역들을 전경 영역과 배경 영역으로 분류하는 영역 단위 분류부;A region unit classification unit for classifying the extracted regions into a foreground region and a background region; 상기 영역 단위 분류부에서 분류된 결과에 따라 상기 추출된 영역들에 속한 화소들의 전경 배경 분리 결과를 보정하여, 전경 영상을 출력하는 보정부; 및A correction unit correcting a foreground background separation result of pixels belonging to the extracted regions according to a result classified by the region unit classifier and outputting a foreground image; And 상기 전경 영상에 미리 마련된 배경 영상을 합성하는 배경 영상 합성부를 포함하는 것을 특징으로 하는 배경 대체 장치.And a background image synthesizing unit synthesizing a background image prepared in advance in the foreground image.
KR1020080037563A 2008-04-23 2008-04-23 Method and apparatus for separating foreground and background from image, Method and apparatus for substituting separated background KR101471199B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080037563A KR101471199B1 (en) 2008-04-23 2008-04-23 Method and apparatus for separating foreground and background from image, Method and apparatus for substituting separated background

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080037563A KR101471199B1 (en) 2008-04-23 2008-04-23 Method and apparatus for separating foreground and background from image, Method and apparatus for substituting separated background

Publications (2)

Publication Number Publication Date
KR20090111939A KR20090111939A (en) 2009-10-28
KR101471199B1 true KR101471199B1 (en) 2014-12-09

Family

ID=41553181

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080037563A KR101471199B1 (en) 2008-04-23 2008-04-23 Method and apparatus for separating foreground and background from image, Method and apparatus for substituting separated background

Country Status (1)

Country Link
KR (1) KR101471199B1 (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101158728B1 (en) * 2010-03-31 2012-06-22 한국과학기술원 Real-time Foreground Detection Method
KR101648562B1 (en) * 2010-04-26 2016-08-16 한화테크윈 주식회사 Apparatus for detecting moving object
WO2012020977A2 (en) * 2010-08-10 2012-02-16 삼성전자주식회사 Image processing device and method
KR20120069331A (en) 2010-12-20 2012-06-28 삼성전자주식회사 Method of separating front view and background
CN102707864A (en) * 2011-03-28 2012-10-03 日电(中国)有限公司 Object segmentation method and system based on mixed marks
KR101297396B1 (en) * 2011-12-28 2013-08-14 충북대학교 산학협력단 Method of shadow removal based on relative similarity
KR101739025B1 (en) 2012-03-13 2017-05-24 한화테크윈 주식회사 Method for processing image
KR101624801B1 (en) 2014-10-15 2016-05-26 포항공과대학교 산학협력단 Matting method for extracting object of foreground and apparatus for performing the matting method
KR101954851B1 (en) * 2015-02-16 2019-03-06 삼성전자주식회사 Metadata-based image processing method and apparatus
KR101918159B1 (en) * 2015-05-19 2018-11-13 에스케이 텔레콤주식회사 Method and Apparatus for Segmenting Background Motion Region From Image
WO2020085694A1 (en) * 2018-10-23 2020-04-30 삼성전자 주식회사 Image-capturing device and method for controlling same
KR102578292B1 (en) * 2020-12-15 2023-09-15 한국과학기술연구원 Object/region detection and classification system with improved computer memory efficiency
WO2023287250A1 (en) * 2021-07-16 2023-01-19 Samsung Electronics Co., Ltd. Brightness adjustment method and apparatus thereof
US12003859B2 (en) 2021-07-16 2024-06-04 Samsung Electronics Co., Ltd. Brightness adjustment method, and apparatus thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080020595A (en) * 2005-05-31 2008-03-05 오브젝트비디오 인코퍼레이티드 Human detection and tracking for security applications

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080020595A (en) * 2005-05-31 2008-03-05 오브젝트비디오 인코퍼레이티드 Human detection and tracking for security applications

Also Published As

Publication number Publication date
KR20090111939A (en) 2009-10-28

Similar Documents

Publication Publication Date Title
KR101471199B1 (en) Method and apparatus for separating foreground and background from image, Method and apparatus for substituting separated background
KR101670282B1 (en) Video matting based on foreground-background constraint propagation
US8594439B2 (en) Image processing
US6912313B2 (en) Image background replacement method
JP4746050B2 (en) Method and system for processing video data
US8773548B2 (en) Image selection device and image selecting method
Hillman et al. Alpha channel estimation in high resolution images and image sequences
US20200258196A1 (en) Image processing apparatus, image processing method, and storage medium
US20100098331A1 (en) System and method for segmenting foreground and background in a video
Karaman et al. Comparison of static background segmentation methods
Cavallaro et al. Shadow-aware object-based video processing
KR102142567B1 (en) Image composition apparatus using virtual chroma-key background, method and computer program
CA3039239C (en) Conformance of media content to original camera source using optical character recognition
Wang et al. Simultaneous matting and compositing
CN111815528A (en) Bad weather image classification enhancement method based on convolution model and feature fusion
JP2011054080A (en) Image processing apparatus, method and program
Kim et al. Effective character segmentation for license plate recognition under illumination changing environment
Gallego et al. Enhanced bayesian foreground segmentation using brightness and color distortion region-based model for shadow removal
Arsic et al. Improved lip detection algorithm based on region segmentation and edge detection
CN113253890A (en) Video image matting method, system and medium
CN111160340A (en) Moving target detection method and device, storage medium and terminal equipment
JP2008129864A (en) Image processor, image processing method and image processing program
Calagari et al. Data driven 2-D-to-3-D video conversion for soccer
Ekin et al. Spatial detection of TV channel logos as outliers from the content
CN113222870A (en) Image processing method, device and equipment

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant