KR20190074920A - Method and system for background estimation of scene comprising at least one frames - Google Patents

Method and system for background estimation of scene comprising at least one frames Download PDF

Info

Publication number
KR20190074920A
KR20190074920A KR1020180041503A KR20180041503A KR20190074920A KR 20190074920 A KR20190074920 A KR 20190074920A KR 1020180041503 A KR1020180041503 A KR 1020180041503A KR 20180041503 A KR20180041503 A KR 20180041503A KR 20190074920 A KR20190074920 A KR 20190074920A
Authority
KR
South Korea
Prior art keywords
pixel
motion
background
background image
pattern
Prior art date
Application number
KR1020180041503A
Other languages
Korean (ko)
Other versions
KR102031941B1 (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 경희대학교 산학협력단
Publication of KR20190074920A publication Critical patent/KR20190074920A/en
Application granted granted Critical
Publication of KR102031941B1 publication Critical patent/KR102031941B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/144Movement detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators

Abstract

The present invention relates to a method of enabling a server to estimate the background of a scene including at least one frame. The method includes: an initializing step of setting a first frame of the scene as a first background image; a step of extracting a first motion pixel, in which a difference between pixel values is no less than a preset threshold value, by comparing an n^th frame subsequent to the n^th-1 frame (n>=2) with a n^th-1 background image; a step of calculating a stabilizing coefficient by pixel by reflecting a pixel change on a corresponding position in the n^th frame and the n^th-1 background image; a step of selecting a second motion pixel in which the stabilizing coefficient satisfies a preset condition from the first motion pixel; a step of generating a pixel pattern of the second motion pixel by applying a directional mask to the second motion pixel, and generating a background pixel pattern by extracting a pixel corresponding to the position of the second motion pixel and its adjacent pixel from the n^th-1 background image; and a step of updating a n^th background image by using a standard deviation of the pixel pattern and a standard deviation of the background pixel pattern. Therefore, the present invention is capable of reducing costs for calculation by refining only motion pixels.

Description

하나 이상의 프레임을 포함하는 장면의 배경 추정 방법 및 시스템 {METHOD AND SYSTEM FOR BACKGROUND ESTIMATION OF SCENE COMPRISING AT LEAST ONE FRAMES}BACKGROUND OF THE INVENTION 1. Field of the Invention [0001] The present invention relates to a method and a system for estimating a background of a scene including one or more frames,

본 발명은 배경을 추정하는 방법 및 시스템에 관한 것으로, 보다 구체적으로 하나 이상의 프레임을 포함하는 장면의 배경을 추정하는 방법 및 시스템에 관한 것이다.The present invention relates to a method and system for estimating a background, and more particularly to a method and system for estimating the background of a scene comprising one or more frames.

영상에 있어서 배경을 제외한 전경을 추출하는 기술은 물체 탐지 및 추적, 비정상 행동 탐지 및 인식, 지능형 환경 이해 및 분석과 같은 다양한 이미지 처리에 사용된다.Techniques for extracting the foreground except the background in the image are used for various image processing such as object detection and tracking, abnormal behavior detection and recognition, intelligent environment understanding and analysis.

전경을 검출하는데 주로 사용되는 배경 차감 기술은 입력 이미지와 배경 이미지 간의 차이를 이용하여 장면 내의 움직이는 물체를 검출한다. 장면에 있어서 별도의 기준이 되는 배경 이미지는 사용할 수 없기 때문에 장면에 포함된 이전 프레임에 대해 연속적으로 추정된다.The background subtraction technique, which is mainly used to detect the foreground, detects moving objects in the scene using the difference between the input image and the background image. Since the background image, which is a separate reference in the scene, can not be used, it is continuously estimated for the previous frame included in the scene.

배경 이미지를 추출하기 위해서 단일 가우스 모델링, 가우스 혼합 모델링, 비 파라미터 접근법, 비주얼 배경 추출기 등이 등장하였다. 그러나 단일 가우스 모델링은 동적인 배경을 검출하기 어려우며, 가우스 혼합 모델링은 특정 배경 이미지 각각에 대한 매개 변수를 추정해야 하기 때문에 하드웨어 구현에는 적합하지 않고, 비 파라미터 접근법은 픽셀 단위의 커널을 추정하는 데 계산 비용과 메모리 소모가 크고 처리 속도가 느리다는 어려움이 각각 존재한다. 또한 비주얼 배경 추출기는 어두운 배경, 그림자 및 빈번한 배경의 변경과 같은 배경 모델을 처리하는 데에 어려움을 가진다.Single Gaussian modeling, Gaussian mixture modeling, nonparametric approach, and visual background extractor have emerged to extract background images. However, single Gaussian modeling is difficult to detect dynamic backgrounds, and Gaussian mixture modeling is not suitable for hardware implementations because it requires estimating parameters for each specific background image, and the nonparametric approach is used to estimate the kernel per pixel There are difficulties in cost, memory consumption, and slow processing speed. Visual background extractors also have difficulty processing background models such as changing dark backgrounds, shadows, and frequent backgrounds.

위와 같은 배경 모델 접근법과 반대로 배경 이미지를 참조하는 배경 차감 방법은 필터링 접근법과 히스토그램을 이용하여 배경 이미지를 하나 이상의 입력 프레임으로부터 추정한다. 따라서 배경 이미지는 각 입력 프레임에 대해 연속적으로 업데이트되나 버퍼 설치에 많은 메모리를 소비하며 메모리가 누적됨에 따라 배경 이미지 추정에 있어서 메모리 소모가 증가한다는 단점이 있다.Contrasting with the background model approach, the background subtraction method that references the background image estimates the background image from one or more input frames using a filtering approach and a histogram. Therefore, although the background image is continuously updated for each input frame, it consumes a large amount of memory for buffer installation, and memory consumption increases in the background image estimation as the memory is accumulated.

본 발명은 전술한 문제를 해결하기 위한 것으로, 배경을 검출하여 전경과 배경을 구분하는 것을 일 목적으로 한다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and one object of the present invention is to detect a background and distinguish between foreground and background.

또한 본 발명은 모션 픽셀만을 정제하여 계산 비용을 감소시키는 것을 일 목적으로 한다.It is also an object of the present invention to reduce the calculation cost by refining only the motion pixels.

또한 본 발명은 모션 픽셀을 정제하여 배경 이미지의 일관성을 향상시키는 것을 일 목적으로 한다.It is also an object of the present invention to improve the consistency of background images by refining motion pixels.

또한 본 발명은 방향성 마스크를 사용하여 배경 추정에 대한 정확도를 향상시키는 것을 일 목적으로 한다.It is also an object of the present invention to improve the accuracy of background estimation using a directional mask.

이러한 목적을 달성하기 위한 본 발명은 서버가 하나 이상의 프레임을 포함하는 장면의 배경을 추정하는 방법에 있어서, 상기 장면의 제1 프레임을 제1 배경 이미지로 설정하는 초기화 단계, 상기 제n-1 프레임(n≥2)에 연속하는 제n 프레임을 상기 제n-1 배경 이미지와 비교하여 픽셀 값의 차이가 기 설정된 임계 값 이상인 제1 모션 픽셀을 추출하는 단계, 상기 제n-1 배경 이미지 및 제n 프레임 내 상응하는 위치의 픽셀 변화를 반영하여 픽셀 별 안정화 계수를 산출하는 단계, 상기 제1 모션 픽셀에서 상기 안정화 계수가 기 설정된 조건을 만족하는 제2 모션 픽셀을 선정하는 단계, 상기 제2 모션 픽셀에 방향성 마스크를 적용하여 상기 제2 모션 픽셀의 픽셀 패턴을 생성하고, 상기 제n-1 배경 이미지에서 상기 제2 모션 픽셀 위치에 대응되는 픽셀 및 그 이웃 픽셀을 추출하여 배경 픽셀 패턴을 생성하는 단계, 상기 픽셀 패턴의 표준 편차와 상기 배경 픽셀 패턴의 표준 편차를 이용하여 제n 배경 이미지를 업데이트하는 단계를 포함하는 것을 일 특징으로 한다.According to another aspect of the present invention, there is provided a method of estimating a background of a scene including at least one frame, the method comprising: an initialization step of setting a first frame of the scene as a first background image; (n > = 2) to the (n-1) -th background image, extracting a first motion pixel whose difference in pixel value is equal to or greater than a predetermined threshold value, calculating a stabilization coefficient for each pixel by reflecting a pixel change at a corresponding position in the n-th frame, selecting a second motion pixel in the first motion pixel that satisfies a preset condition of the stabilization coefficient, Generating a pixel pattern of the second motion pixel by applying a directional mask to the pixel, and generating a pixel corresponding to the second motion pixel position in the n-1 & Extracting a cell to generate a background pixel pattern, and updating the n-th background image using the standard deviation of the pixel pattern and the standard deviation of the background pixel pattern.

또한 상기 픽셀 별 안정화 계수를 산출하는 단계는 제1 안정화 계수를 0으로 설정하는 단계, 상기 제n 프레임에 속하는 픽셀이 상기 제1 모션 픽셀일 경우 제n-1 안정화 계수에 1을 감하고, 상기 제1 모션 픽셀이 아닐 경우 제n-1 안정화 계수에 1을 더하여 제n 안정화 계수를 연산하는 단계를 포함하는 것을 일 특징으로 한다.The step of calculating the pixel-by-pixel stabilization coefficient may further include setting a first stabilization coefficient to 0, subtracting 1 from the n-1 stabilization coefficient when the pixel belonging to the n-th frame is the first motion pixel, And adding 1 to the (n-1) -th stabilization coefficient to calculate the n-th stabilization coefficient when the first motion pixel is not the first motion pixel.

나아가 상기 픽셀 패턴을 생성하는 단계는, 하나 이상의 상기 제2 모션 픽셀이 이루는 블롭의 중심점과 상기 블롭의 경계에 포함된 상기 제2 모션 픽셀의 각도를 연산하는 단계, 상기 각도에 대응되는 상기 방향성 마스크를 식별하는 단계를 포함하고, 상기 픽셀 패턴을 생성하는 단계는 상기 블롭의 중심점에 도달할 때까지 상기 블롭의 내부 경계에 연속적으로 적용되는 것을 일 특징으로 한다.The method of claim 1, wherein the generating the pixel pattern further comprises: computing an angle of a second motion pixel included at a boundary of the blob with a center point of a blob of one or more of the second motion pixels; Wherein the step of generating the pixel pattern is continuously applied to the inner boundary of the blob until the center point of the blob is reached.

또한 상기 제n 배경 이미지를 업데이트하는 단계는, 상기 픽셀 패턴의 표준 편차가 상기 배경 픽셀 패턴의 표준 편차보다 작으면 제n 배경 이미지에의 제1 모션 픽셀과 상응하는 위치의 픽셀을 제1 모션 픽셀로 업데이트하는 것을 일 특징으로 한다. The step of updating the nth background image further comprises: if the standard deviation of the pixel pattern is smaller than the standard deviation of the background pixel pattern, the pixel at the position corresponding to the first motion pixel to the nth background image is referred to as a first motion pixel To a predetermined value.

나아가 상기 방향성 마스크는 수평 마스크, 수직 마스크, 상승 마스크, 하락 마스크, 그리고 원형 마스크 중 어느 하나를 의미하는 것을 일 특징으로 한다.Further, the directional mask means any one of a horizontal mask, a vertical mask, a rising mask, a falling mask, and a circular mask.

또한 본 발명은 하나 이상의 프레임을 포함하는 장면의 배경을 추정하는 시스템에 있어서, 상기 장면의 제1 프레임을 제1 배경 이미지로 설정하는 초기화부, 상기 제n-1 프레임(n≥2)에 연속하는 제n 프레임을 상기 제n-1 배경 이미지와 비교하여 픽셀 값의 차이가 기 설정된 임계 값 이상인 제1 모션 픽셀을 추출하고, 상기 제n-1 배경 이미지 및 제n 프레임 내 상응하는 위치의 픽셀 변화를 반영하여 픽셀 별 안정화 계수를 산출하고, 상기 제1 모션 픽셀에서 상기 안정화 계수가 기 설정된 조건을 만족하는 제2 모션 픽셀을 선정하고, 상기 제2 모션 픽셀에 방향성 마스크를 적용하여 상기 제2 모션 픽셀의 픽셀 패턴을 생성하고, 상기 제n-1 배경 이미지에서 상기 제2 모션 픽셀 위치에 대응되는 픽셀 및 그 이웃 픽셀을 추출하여 배경 픽셀 패턴을 생성하는 연산부, 상기 픽셀 패턴의 표준 편차와 상기 배경 픽셀 패턴의 표준 편차를 이용하여 제n 배경 이미지를 업데이트하는 업데이트부를 포함하는 것을 일 특징으로 한다.The present invention also provides a system for estimating a background of a scene including one or more frames, the system comprising: an initialization unit for setting a first frame of the scene as a first background image; N-th background image and the (n-1) -th background image, extracting a first motion pixel whose difference in pixel value is equal to or greater than a preset threshold value, A second motion pixel that satisfies a preset condition of the stabilization coefficient in the first motion pixel is selected and a directional mask is applied to the second motion pixel to calculate the second motion pixel by applying the directional mask to the second motion pixel, An operation for generating a pixel pattern of the motion pixel, extracting a pixel corresponding to the second motion pixel position in the (n-1) -th background image and its neighboring pixels to generate a background pixel pattern And in that it comprises parts of updating to update the n-th background image by using the standard deviation and the standard deviation of the background pixel pattern of the pixel pattern in one aspect.

전술한 바와 같은 본 발명에 의하면, 배경을 검출하여 전경과 배경을 구분할 수 있다.According to the present invention as described above, the background can be detected to distinguish the foreground and the background.

또한 본 발명은 모션 픽셀만을 정제하여 계산 비용을 감소시킬 수 있다.Further, the present invention can reduce the computation cost by refining only the motion pixels.

또한 본 발명은 모션 픽셀을 정제하여 배경 이미지의 일관성을 향상시킬 수 있다.Further, the present invention can improve the consistency of the background image by refining motion pixels.

또한 본 발명은 방향성 마스크를 사용하여 배경 추정에 대한 정확도를 향상시킬 수 있다.The present invention can also improve the accuracy of background estimation using a directional mask.

도1은 본 발명의 일 실시 예에 의한 배경 추정 시스템의 구성을 도시한 도면이다.
도2는 본 발명의 일 실시 예에 의한 배경 추정 방법을 설명하기 위한 도면이다.
도3은 본 발명의 일 실시 예에 의한 마스크 식별 방법을 설명하기 위한 도면이다.
도4는 본 발명의 일 실시 예에 의한 배경 이미지 업데이트 방법을 설명하기 위한 도면이다.
도5는 본 발명의 일 실시 예에 의한 블롭을 도시한 도면이다.
도6은 본 발명의 일 실시 예에 의한 연속적으로 픽셀 패턴을 생성하는 방법을 설명하기 위한 도면이다.
도7은 본 발명의 일 실시 예에 의한 픽셀 패턴의 각도를 측정하는 방법을 설명하기 위한 도면이다.
도8은 본 발명의 일 실시 예에 의한 픽셀 패턴의 각도를 설명하기 위한 도면이다.
도9는 본 발명의 일 실시 예에 의한 방향성 마스크를 설명하기 위한 도면이다.
도10은 본 발명의 일 실시 예에 의한 모션 픽셀에 마스크를 적용하는 방법을 설명하기 위한 도면이다.
도11은 본 발명의 일 실시 예에 의한 삼 색에 대해 배경 이미지를 각각 업데이트 하는 방법을 설명하기 위한 도면이다.
FIG. 1 is a diagram illustrating a configuration of a background estimation system according to an embodiment of the present invention.
2 is a diagram for explaining a background estimation method according to an embodiment of the present invention.
3 is a view for explaining a mask identification method according to an embodiment of the present invention.
4 is a diagram for explaining a background image update method according to an embodiment of the present invention.
5 is a diagram illustrating a blob according to an embodiment of the present invention.
6 is a diagram for explaining a method of continuously generating a pixel pattern according to an embodiment of the present invention.
7 is a view for explaining a method of measuring an angle of a pixel pattern according to an embodiment of the present invention.
8 is a view for explaining the angle of a pixel pattern according to an embodiment of the present invention.
9 is a view for explaining a directional mask according to an embodiment of the present invention.
10 is a view for explaining a method of applying a mask to motion pixels according to an embodiment of the present invention.
FIG. 11 is a diagram for explaining a method of updating a background image in response to a tristimulus according to an embodiment of the present invention.

전술한 목적, 특징 및 장점은 첨부된 도면을 참조하여 상세하게 후술되며, 이에 따라 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 상세한 설명을 생략한다. The above and other objects, features, and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings, which are not intended to limit the scope of the present invention. In the following description, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail.

도면에서 동일한 참조부호는 동일 또는 유사한 구성요소를 가리키는 것으로 사용되며, 명세서 및 특허청구의 범위에 기재된 모든 조합은 임의의 방식으로 조합될 수 있다. 그리고 다른 식으로 규정하지 않는 한, 단수에 대한 언급은 하나 이상을 포함할 수 있고, 단수 표현에 대한 언급은 또한 복수 표현을 포함할 수 있음이 이해되어야 한다. In the drawings, the same reference numerals are used to designate the same or similar components, and all combinations described in the specification and claims can be combined in any manner. It is to be understood that, unless the context requires otherwise, references to singular forms may include more than one, and references to singular forms may also include plural forms.

본 명세서에서 사용되는 용어는 단지 특정 예시적 실시 예들을 설명할 목적을 가지고 있으며 한정할 의도로 사용되는 것이 아니다. 본 명세서에서 사용된 바와 같은 단수적 표현들은 또한, 해당 문장에서 명확하게 달리 표시하지 않는 한, 복수의 의미를 포함하도록 의도될 수 있다. 용어 "및/또는," "그리고/또는"은 그 관련되어 나열되는 항목들의 모든 조합들 및 어느 하나를 포함한다. 용어 "포함한다", "포함하는", "포함하고 있는", "구비하는", "갖는", "가지고 있는" 등은 내포적 의미를 갖는 바, 이에 따라 이러한 용어들은 그 기재된 특징, 정수, 단계, 동작, 요소, 및/또는 컴포넌트를 특정하며, 하나 이상의 다른 특징, 정수, 단계, 동작, 요소, 컴포넌트, 및/또는 이들의 그룹의 존재 혹은 추가를 배제하지 않는다. 본 명세서에서 설명되는 방법의 단계들, 프로세스들, 동작들은, 구체적으로 그 수행 순서가 확정되는 경우가 아니라면, 이들의 수행을 논의된 혹은 예시된 그러한 특정 순서로 반드시 해야 하는 것으로 해석돼서는 안 된다. 추가적인 혹은 대안적인 단계들이 사용될 수 있음을 또한 이해해야 한다.The terminology used herein is for the purpose of describing particular illustrative embodiments only and is not intended to be limiting. Singular representations as used herein may also be intended to include a plurality of meanings, unless the context clearly dictates otherwise. The terms "and / or" " and / or "include any and all combinations of the items listed therein. The terms "comprises," "comprising," "including," "having," "having," "having," and the like have the implicit significance, Steps, operations, elements, and / or components, and does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / Steps, processes, and operations of the methods described herein should not be construed as necessarily enforcing their performance in such specific order as discussed or illustrated unless specifically concluded the order of their performance . It should also be understood that additional or alternative steps may be used.

또한, 각각의 구성요소는 각각 하드웨어 프로세서로 구현될 수 있고, 위 구성요소들이 통합되어 하나의 하드웨어 프로세서로 구현될 수 있으며, 또는 위 구성요소들이 서로 조합되어 복수 개의 하드웨어 프로세서로 구현될 수도 있다. In addition, each of the components may be implemented as a hardware processor, the components may be integrated into one hardware processor, or a combination of the components may be implemented as a plurality of hardware processors.

또한, 본 발명에서 사용되는 픽셀 값은 픽셀의 밝기 값을 의미하는 것으로 0에서 255 사이의 값을 가질 수 있다.In addition, the pixel value used in the present invention means a brightness value of a pixel and may have a value between 0 and 255. [

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시 예를 상세히 설명하기로 한다. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도1은 본 발명의 일 실시 예에 의한 배경 추정 시스템의 구성을 도시한 도면이다. 도1을 참조하면, 본 발명의 일 실시 예에 의한 배경 추정 시스템은 초기화부(10), 연산부(20), 그리고 업데이트부(30)을 포함할 수 있다.FIG. 1 is a diagram illustrating a configuration of a background estimation system according to an embodiment of the present invention. Referring to FIG. 1, a background estimation system according to an embodiment of the present invention may include an initialization unit 10, an operation unit 20, and an update unit 30.

초기화부(10)는 장면의 제1 프레임을 제1 배경 이미지로 설정할 수 있다. 기존의 배경을 추정하는 방법에 있어서 초기 배경 이미지는 복수 개의 프레임의 평균을 사용하나 이러한 방법은 복수 개의 프레임을 버퍼에 저장해야 하기 때문에 메모리의 소모가 크다는 단점이 있다. 따라서 본 발명은 일 장면에 포함된 프레임과 비교할 배경 이미지를 제1 프레임으로 설정하여 메모리의 소모를 줄일 수 있다. 이 때, 제1 배경 이미지는 모션 픽셀을 포함할 수도 있고 그렇지 않을 수도 있다. The initialization unit 10 may set the first frame of the scene as the first background image. In the method of estimating an existing background, an initial background image uses an average of a plurality of frames, but this method has a disadvantage of consuming a large amount of memory because a plurality of frames must be stored in a buffer. Therefore, the present invention can reduce the consumption of the memory by setting the background image to be compared with the frame included in one scene as the first frame. At this time, the first background image may or may not include motion pixels.

연산부(20)는 프레임에 포함된 픽셀이 모션 픽셀인지의 여부를 판단하는 것으로, 안정화 계수 연산부(22), 모션 픽셀 연산부(24), 그리고 픽셀 패턴 연산부(26)를 포함할 수 있다.The operation unit 20 determines whether or not a pixel included in the frame is a motion pixel and may include a stabilization coefficient operation unit 22, a motion pixel operation unit 24, and a pixel pattern operation unit 26.

안정화 계수 연산부(22)는 제n-1 배경 이미지 및 제n 프레임 내 상응하는 위치의 픽셀 변화를 반영하여 픽셀 별 안정화 계수를 산출할 수 있다. 움직임이 많은 픽셀의 경우 노이즈가 심하기 때문에 모션 픽셀에 대한 정확도를 높이기 위하여 안정화 계수를 사용할 수 있다. 안정화 계수는 프레임 내에 속하는 모든 픽셀의 변화 횟수를 의미한다. 안정화 계수 연산부(22)는 제n-1 배경 이미지와 제n 프레임에 포함된 모든 픽셀에 대한 안정화 계수를 연산할 수 있다. 보다 구체적으로 안정화 계수 연산부(22)는 제n-1 프레임과 제n 프레임에 상응하는 위치의 픽셀의 변화 횟수를 모든 픽셀에 대하여 측정할 수 있다.The stabilization coefficient operation unit 22 may calculate the pixel-by-pixel stabilization coefficient by reflecting the pixel change of the (n-1) -th background image and the corresponding position in the n-th frame. In the case of a pixel with a lot of motion, since the noise is large, a stabilization coefficient can be used to improve the accuracy with respect to the motion pixel. The stabilization coefficient means the number of changes of all the pixels belonging to the frame. The stabilization coefficient operation unit 22 can calculate the stabilization coefficient for all pixels included in the (n-1) -th background image and the n-th frame. More specifically, the stabilization coefficient calculator 22 can measure the number of changes of the pixel at the position corresponding to the (n-1) th frame and the n-th frame with respect to all the pixels.

안정화 계수 연산부(22)는 안정화 계수의 초기 값을 0으로 초기화할 수 있다. 안정화 계수 연산부(22)는 제n 프레임의 (x, y)에 위치한 픽셀이 모션 픽셀일 경우 제n-1 안정화 계수에 1을 감하고, 제n 프레임의 (x, y)에 위치한 픽셀이 모션 픽셀이 아닐 경우 제n-1 안정화 계수에 1을 더할 수 있다. 즉 프레임 내에서 지속적으로 픽셀 값이 변화한다면 안정화 계수는 더욱 낮아질 것이고 픽셀 값이 크게 변하지 않는다면 안정화 계수는 높아질 수 있다.The stabilization coefficient computing unit 22 can initialize the initial value of the stabilization coefficient to zero. The stabilization coefficient calculator 22 subtracts 1 from the n-1 stabilization coefficient when the pixel located at (x, y) of the n-th frame is a motion pixel, and the pixel located at (x, y) If it is not a pixel, it may add 1 to the n-1 stabilization coefficient. That is, if the pixel value continuously changes in the frame, the stabilization coefficient will be further lowered, and if the pixel value does not change significantly, the stabilization coefficient can be increased.

모션 픽셀 연산부(24)는 제n-1 프레임(n≥2)에 연속하는 제n 프레임을 제n-1 배경 이미지와 비교하여 픽셀 값의 차이가 기 설정된 임계 값 이상인 제1 모션 픽셀을 추출하고, 제1 모션 픽셀에서 상기 안정화 계수가 기 설정된 조건을 만족하는 제2 모션 픽셀을 선정할 수 있다.The motion pixel arithmetic unit 24 compares the n-th frame contiguous to the (n-1) th frame (n? 2) with the n-1 th background image to extract a first motion pixel whose difference in pixel value is greater than or equal to a preset threshold value , And a second motion pixel in which the stabilization coefficient satisfies a predetermined condition in the first motion pixel.

보다 구체적으로 모션 픽셀 연산부(24)는 제n-1 프레임과 제n 프레임에서 상응하는 위치의 픽셀의 픽셀 값을 비교할 수 있다. 이 때, 픽셀 값의 차이는 그레이 스케일로 표현될 수 있다. 제n 프레임의 픽셀이 제1 모션 픽셀인지의 여부를 확인하기 위해 모션 픽셀 연산부(24)는 미리 설정된 픽셀 값에 대한 임계 값을 이용하여 픽셀 값의 차이가 임계 값을 초과하면 픽셀의 밝기 값에 대한 변화가 크다고 판단할 수 있다. 따라서 모션 픽셀 연산부(24)는 픽셀 값의 차이가 임계 값을 초과하면 해당 픽셀을 제1 모션 픽셀이라고 판단할 수 있다.More specifically, the motion pixel arithmetic operation unit 24 can compare pixel values of pixels at corresponding positions in the n-1-th frame and the n-th frame. At this time, the difference in pixel values can be expressed in gray scale. In order to confirm whether or not the pixel of the n-th frame is the first motion pixel, the motion pixel arithmetic operation unit 24 uses a threshold value for a preset pixel value, and if the difference of the pixel value exceeds a threshold value, It can be judged that the change is large. Therefore, the motion pixel arithmetic operation unit 24 can determine that the pixel is the first motion pixel if the difference of the pixel values exceeds the threshold value.

또한 모션 픽셀 연산부(24)는 제1 모션 픽셀을 추출한 후, 안정화 계수 연산부(22)가 계산한 결과를 통해 제2 모션 픽셀을 선정할 수 있다. 모션 픽셀 연산부(24)는 추출된 제1 모션 픽셀에 대한 안정화 계수가 기 설정된 수치 이하일 경우 제1 모션 픽셀을 제2 모션 픽셀으로 선정할 수 있다. 안정화 계수와 비교되는 수치는 장면의 특성에 따라 상이한 값을 가질 수 있다. 예를 들어 고속도로, 교차로, 쇼핑몰 등과 같은 동적인 모션 장면에 대해서는 작은 값을 가질 수 있으며, 사무실, 주차장 등과 같은 정적인 모션 장면에 대해서는 높은 값을 가질 수 있다. 제2 모션 픽셀을 선정함에 따라 본 발명은 노이즈가 아닌 실제의 움직임이 있는 픽셀을 정확하게 추출하고, 배경 이미지의 일관성을 향상시킬 수 있다.The motion pixel arithmetic unit 24 may extract the first motion pixel and then select the second motion pixel through the calculation result of the stabilization coefficient arithmetic unit 22. [ The motion pixel arithmetic unit 24 can select the first motion pixel as the second motion pixel when the stabilization coefficient for the extracted first motion pixel is equal to or less than a predetermined value. The numerical value compared with the stabilization coefficient may have different values depending on the characteristics of the scene. For example, it may have a small value for dynamic motion scenes such as a highway, an intersection, a shopping mall, etc., and a high value for a static motion scene such as an office, a parking lot, and the like. By selecting the second motion pixel, the present invention can accurately extract pixels that have actual motion, not noise, and improve the consistency of the background image.

픽셀 패턴 연산부(26)는 제2 모션 픽셀에 방향성 마스크를 적용하여 제2 모션 픽셀의 픽셀 패턴을 생성하고, 제n-1 배경 이미지에서 제2 모션 픽셀 위치에 대응되는 픽셀 및 그 이웃 픽셀을 추출하여 배경 픽셀 패턴을 생성할 수 있다.The pixel pattern computation unit 26 applies a directional mask to the second motion pixel to generate a pixel pattern of the second motion pixel, extracts a pixel corresponding to the second motion pixel position in the (n-1) -th background image and its neighboring pixels Thereby generating a background pixel pattern.

보다 구체적으로 픽셀 패턴 연산부(26)는 하나 이상의 제2 모션 픽셀이 이루는 블롭을 이용하여 제2 모션 픽셀에 대응되는 방향성 마스크를 식별할 수 있다.More specifically, the pixel pattern computing unit 26 can identify a directional mask corresponding to the second motion pixel using the blob of one or more second motion pixels.

제2 모션 픽셀로 구성된 블롭은 도5와 같이 나타낼 수 있다. 도5를 참조하면 블롭은 단일 블롭(402)과 다중 블롭(401)으로 구분될 수 있다. 단일 블롭은 하나의 제2 모션 픽셀로 구성될 수 있고, 다중 픽셀은 둘 이상의 제2 모션 픽셀로 구성될 수 있다. 단일 블롭은 원형 마스크만이 대응되기 때문에 아래와 같은 각도를 연산하지 않을 수 있기 때문에 다음과 같은 과정은 모두 다중 블롭에서 수행되는 과정이다.The blob composed of the second motion pixels can be represented as shown in FIG. Referring to FIG. 5, a blob may be divided into a single blob 402 and a multiple blob 401. A single blob can consist of one second motion pixel, and multiple pixels can consist of more than one second motion pixel. Since a single blob corresponds to only a circular mask, it is not necessary to calculate the following angles. Therefore, the following steps are all performed in a multi-blob.

도7을 참조하면, 픽셀 패턴 연산부(26)는 블롭의 중심점(702)과 블롭의 경계에 포함된 제2 모션 픽셀(701) 사이의 각도(703)를 연산할 수 있다. 각도를 연산하면, 픽셀 패턴 연산부(26)는 연산된 각도에 대응되는 방향성 마스크를 식별할 수 있다. 픽셀 패턴 연산부(26)는 블롭의 중심점과 블롭의 경계에 포함된 제2 모션 픽셀 사이의 각도를 도8 및 수학식1과 같이 8개의 구간으로 분류할 수 있다. 7, the pixel pattern computing unit 26 may calculate an angle 703 between the center point 702 of the blob and the second motion pixel 701 included at the boundary of the blob. When the angle is calculated, the pixel pattern operation unit 26 can identify the directional mask corresponding to the calculated angle. The pixel pattern computing unit 26 can classify the angle between the center point of the blob and the second motion pixel included in the boundary of the blob into eight sections as shown in FIG. 8 and Equation (1).

Figure pat00001
Figure pat00001

픽셀 패턴 연산부(26)는 8개의 구간으로 분류된 각도를 수학식2와 같이 4개의 방향성 마스크로 분류할 수 있다.The pixel pattern computing unit 26 can classify the angles classified into eight sections into four directional masks as shown in Equation 2. [

Figure pat00002
Figure pat00002

분류된 방향성 마스크는 수평 마스크(M15), 수직 마스크(M37), 상승 마스크(M48), 하락 마스크(M26)를 포함할 수 있다. 도9를 참조하면, 수평 마스크는 901과 같은 형태를, 수직 마스크는 902와 같은 형태를, 상승 마스크는 903과 같은 형태를, 하락 마스크는 904와 같은 형태를, 원형 마스크는 905와 같은 형태를 가질 수 있다. 원형 마스크는 다중 블롭이 아닌 단일 블롭에 사용될 수 있다.The classified directional mask may include a horizontal mask M15, a vertical mask M37, a rising mask M48, and a falling mask M26. Referring to FIG. 9, the horizontal mask has a shape such as 901, the vertical mask has a shape such as 902, the rising mask has a shape such as 903, the falling mask has a shape such as 904, Lt; / RTI > A circular mask can be used for a single blob rather than multiple blobs.

또한 방향성 마스크의 크기는 이미지 처리를 시작하기 이전에 배경의 질감에 따라 유연하게 설정될 수 있다. 예를 들어, 배경이 세부적인 픽셀을 포함하고 있는 경우 방향성 마스크의 크기는 작게 설정될 수 있다. 제2 모션 픽셀에 각 제2 모션 픽셀에 대응되는 방향성 마스크를 적용하는 구성은 제2 모션 픽셀의 값을 더 정확하게 할 수 있는 효과가 있다. Also, the size of the directional mask can be set flexibly according to the texture of the background before starting the image processing. For example, if the background contains detailed pixels, the size of the directional mask may be set small. The configuration of applying the directional mask corresponding to each second motion pixel to the second motion pixel has the effect of making the value of the second motion pixel more accurate.

예를 들어, 도7에 도시된 블롭의 경계선에 포함된 일 제2 모션 픽셀(701)에 대한 픽셀 패턴을 구하기 위하여, 블롭의 중심(702)과 제2 모션 픽셀(701) 사이의 각도를 측정해야 한다. 측정된 각도(703)를 45도로 가정하면, 픽셀 패턴 연산부(26)는 그 각도를 Q2로 분류할 수 있다. Q2는 하락 마스크(M26)로 분류되기 때문에 픽셀 패턴 연산부(26)는 제2 모션 픽셀(701)과 대응되는 방향성 마스크를 하락 마스크라고 판단할 수 있다.For example, to determine the pixel pattern for a second motion pixel 701 included in the borders of the blob shown in FIG. 7, the angle between the center 702 of the blob and the second motion pixel 701 is measured Should be. Assuming that the measured angle 703 is 45 degrees, the pixel pattern computing unit 26 can classify the angle into Q2. Q2 is classified as the drop mask M26, the pixel pattern operation unit 26 can determine that the directional mask corresponding to the second motion pixel 701 is a drop mask.

또한 제2 모션 픽셀(704)에 대한 픽셀 패턴을 구하기 위하여, 블롭의 중심(702)과 제2 모션 픽셀(704) 사이의 각도를 측정해야 한다. 제2 모션 픽셀(704)는 블롭의 중심(702)과 수평하기 때문에 그 각도는 0도이다. 픽셀 패턴 연산부(26)는 그 각도를 Q1로 분류할 수 있다. Q1은 수평 마스크(M15)로 분류되기 때문에 픽셀 패턴 연산부(26)는 제2 모션 픽셀(704)과 대응되는 방향성 마스크를 수평 마스크라고 판단할 수 있다.In order to obtain the pixel pattern for the second motion pixel 704, the angle between the center 702 of the blob and the second motion pixel 704 must also be measured. Because the second motion pixel 704 is horizontal with the center 702 of the blob, the angle is 0 degrees. The pixel pattern computing unit 26 can classify the angle into Q1. Since Q1 is classified as the horizontal mask M15, the pixel pattern operation unit 26 can determine that the directional mask corresponding to the second motion pixel 704 is a horizontal mask.

제2 모션 픽셀과 대응되는 방향성 마스크가 식별되면, 픽셀 패턴 연산부(26)는 제2 모션 픽셀에 방향성 마스크를 적용하여 픽셀 패턴을 생성할 수 있다. 픽셀 패턴 연산부(26)는 제2 모션 픽셀을 중심으로 기 설정된 방향성 마스크의 크기와 같도록 주위 픽셀을 포함하는 픽셀 그룹을 설정할 수 있다. 예를 들어, 기 설정된 방향성 마스크의 크기가 5x5일 경우, 픽셀 그룹은 5x5의 크기를 갖고 제2 모션 픽셀이 그 중심이 되도록 생성될 수 있다. 도10을 참조하면, 픽셀 패턴 연산부(26)는 제n 프레임(1003) 내에 존재하는 제2 모션 픽셀(1001)에 대한 5x5 크기를 갖는 픽셀 그룹(1002)을 설정할 수 있다. If a directional mask corresponding to the second motion pixel is identified, the pixel pattern operation unit 26 can apply a directional mask to the second motion pixel to generate the pixel pattern. The pixel pattern computing unit 26 can set a group of pixels including surrounding pixels so as to be equal to the size of the predetermined directional mask around the second motion pixel. For example, if the size of the predetermined directional mask is 5x5, the pixel group may be generated to have a size of 5x5 and a second motion pixel as its center. Referring to FIG. 10, the pixel pattern operation unit 26 may set a pixel group 1002 having a size of 5x5 for the second motion pixel 1001 existing in the nth frame 1003.

픽셀 패턴 연산부(26)는 픽셀 그룹에 동일한 크기를 갖는 방향성 마스크(1004)를 곱하여 픽셀 패턴(1005)를 생성할 수 있다. 이 때, 곱연산은 픽셀 그룹과 방향성 마스크의 상응하는 위치에 존재하는 픽셀들의 곱을 연산하는 것을 의미한다. 예를 들어 도10를 참조하면 제2 모션 픽셀과 방향성 마스크의 곱연산을 하는 과정에서, 방향성 마스크의 p0, p4, p20, p24와 상응하는 위치의 값은 0이기 때문에 픽셀 패턴의 p0, p4, p20, p24와 상응하는 위치에 대한 값은 0을 가질 수 있다. 그 외의 위치에서 방향성 마스크의 값은 1이기 때문에 그 외의 위치에 대한 픽셀 패턴의 값은 픽셀 그룹의 값을 그대로 가질 수 있다.The pixel pattern operation unit 26 can generate the pixel pattern 1005 by multiplying the pixel group by a directional mask 1004 having the same size. Here, the multiplication operation means computing the product of the pixels existing at the corresponding positions of the pixel group and the directional mask. For example, referring to FIG. 10, in a process of performing a multiplication operation of a second motion pixel and a directional mask, since the value of a position corresponding to p0, p4, p20, p24 of the directional mask is 0, Values for positions corresponding to p20, p24 may have a value of zero. Since the value of the directional mask at the other positions is 1, the value of the pixel pattern for other positions can have the value of the pixel group as it is.

픽셀 패턴 연산부(26)는 생성된 픽셀 패턴에 대한 표준 편차를 연산할 수 있다. 보다 구체적으로, 픽셀 패턴 연산부(26)는 픽셀 패턴에 포함된 복수 개의 픽셀 값의 표준 편차를 연산할 수 있다. 일반적으로 배경은 전경보다 픽셀의 움직임이 적기 때문에 픽셀 패턴의 변동의 정도를 측정하기 위해 표준 편차를 연산한다. 픽셀 패턴 연산부(26)는 연산된 표준 편차를 픽셀 패턴에 대한 표준 편차라고 설정할 수 있다.The pixel pattern computing unit 26 can calculate a standard deviation of the generated pixel pattern. More specifically, the pixel pattern computing unit 26 may calculate a standard deviation of a plurality of pixel values included in the pixel pattern. In general, the background computes the standard deviation to measure the degree of variation of the pixel pattern since the pixel motion is less than foreground. The pixel pattern computing unit 26 can set the calculated standard deviation as a standard deviation of the pixel pattern.

표준 편차와의 비교 대상인 배경 표준 편차를 계산하기 위하여 픽셀 패턴 연산부(26)는 제n-1 배경 프레임에서 제n 프레임의 제2 모션 픽셀 위치와 상응하는 위치의 픽셀에 대한 배경 픽셀 패턴을 생성할 수 있다. In order to calculate the background standard deviation to be compared with the standard deviation, the pixel pattern operation unit 26 generates a background pixel pattern for a pixel at a position corresponding to the second motion pixel position of the n-th frame in the n-1-th background frame .

제n-1 배경 이미지에는 모션 픽셀이 존재하지 않기 때문에 픽셀 패턴 연산부(26)는 모션 픽셀에 대한 배경 픽셀 패턴을 생성할 수 없다. 따라서 제n-1 배경 이미지에서 제n 프레임의 제2 모션 픽셀과 상응하는 위치의 픽셀을 중심으로 하고 주위 픽셀을 포함하는 배경 픽셀 그룹을 생성할 수 있다. 배경 픽셀 그룹 또한 방향성 마스크를 적용해야 하므로 기 설정된 방향성 마스크와 같은 크기를 가질 수 있다. 픽셀 패턴 연산부(26)가 배경 픽셀 그룹을 생성하면, 배경 픽셀 그룹에 방향성 마스크를 곱하여 배경 픽셀 패턴을 생성할 수 있다.The pixel pattern operation unit 26 can not generate the background pixel pattern for the motion pixel because there is no motion pixel in the (n-1) -th background image. Accordingly, a background pixel group including surrounding pixels around a pixel at a position corresponding to the second motion pixel of the n-th frame in the (n-1) -th background image can be generated. The background pixel group may also have the same size as a predetermined directional mask since a directional mask must be applied. When the pixel pattern operation unit 26 generates a background pixel group, the background pixel group can be multiplied by a directional mask to generate a background pixel pattern.

픽셀 패턴 연산부(26)는 생성된 배경 픽셀 패턴의 표준 편차를 연산할 수 있다. 보다 구체적으로, 픽셀 패턴 연산부(26)는 배경 픽셀 패턴에 포함된 복수 개의 픽셀 값의 표준 편차를 연산할 수 있다. 픽셀 패턴 연산부(26)는 연산된 배경 표준 편차를 배경 픽셀 패턴의 표준 편차라고 설정할 수 있다.The pixel pattern computing unit 26 can calculate the standard deviation of the generated background pixel pattern. More specifically, the pixel pattern computing unit 26 may calculate a standard deviation of a plurality of pixel values included in the background pixel pattern. The pixel pattern computation unit 26 can set the computed background standard deviation as the standard deviation of the background pixel pattern.

표준 편차와 픽셀의 동질성은 서로 반비례하여 표준 편차가 낮으면 배경에 가깝다고 판단하고 표준 편차가 높으면 전경에 가깝다고 판단할 수 있다.The standard deviation and the homogeneity of the pixels are inversely proportional to each other. If the standard deviation is low, it is determined that the background is close to the background, and if the standard deviation is high, it is determined that it is close to the foreground.

업데이트부(30)는 픽셀 패턴의 표준 편차와 배경 픽셀 패턴의 표준 편차를 이용하여 제n 배경 이미지를 업데이트할 수 있다. The update unit 30 can update the nth background image using the standard deviation of the pixel pattern and the standard deviation of the background pixel pattern.

보다 구체적으로 업데이트부(30)는 픽셀 패턴의 표준 편차와 배경 픽셀 패턴의 표준 편차를 비교할 수 있다. 업데이트부(30)는 제n 프레임에 포함된 제2 모션 픽셀의 위치에 대해서만 제n 배경 이미지를 업데이트 하기 때문에 계산 횟수를 감소시켜 이미지 처리 속도를 향상시킬 수 있다. 업데이트부(30)는 제2 모션 픽셀이 아닌 픽셀의 위치에 상응하는 제n 배경 이미지의 픽셀을 제n-1 배경 이미지의 픽셀의 값으로 유지할 수 있다.More specifically, the updating unit 30 may compare the standard deviation of the pixel pattern with the standard deviation of the background pixel pattern. Since the update unit 30 updates the n-th background image only for the position of the second motion pixel included in the n-th frame, the number of calculations can be reduced to improve the image processing speed. The update unit 30 may maintain the pixel of the n-th background image corresponding to the position of the pixel other than the second motion pixel as the value of the pixel of the (n-1) -th background image.

업데이트부(30)는 제2 모션 픽셀에 대해 연산한 픽셀 패턴의 표준 편차가 배경 픽셀 패턴의 표준 편차보다 크거나 같으면, 제2 모션 픽셀보다 배경 픽셀이 더욱 배경에 가깝다고 판단하여 해당 픽셀이 포함된 위치에 상응하는 제n 배경 이미지의 픽셀 값은 업데이트 하지 않고 제n-1 배경 이미지의 값을 유지할 수 있다.If the standard deviation of the pixel pattern calculated for the second motion pixel is greater than or equal to the standard deviation of the background pixel pattern, the updating unit 30 determines that the background pixel is closer to the background than the second motion pixel, The pixel value of the n-th background image corresponding to the position can be maintained without updating the value of the n-th background image.

또한 업데이트부(30)는 제2 모션 픽셀에 대해 연산한 픽셀 패턴의 표준 편차가 배경 픽셀의 표준 편차보다 작으면, 제2 모션 픽셀이 배경 픽셀보다 더욱 배경에 가깝다고 판단하여 해당 픽셀이 포함된 위치에 상응하는 제n 배경 이미지의 픽셀 값을 제2 모션 픽셀의 값으로 업데이트할 수 있다.If the standard deviation of the pixel pattern calculated for the second motion pixel is smaller than the standard deviation of the background pixel, the updating unit 30 determines that the second motion pixel is closer to the background than the background pixel, To the value of the second motion pixel.

도6을 참조하면, 픽셀 패턴 연산부(26)와 업데이트부(30)는 제2 모션 픽셀이 포함된 블롭의 경계부터 중심점에 도달할 때까지 블롭의 내부 경계에 연속적으로 동작하여 블롭에 존재하는 모든 제2 모션 픽셀의 상대적인 위치 특성에 기초하여 픽셀 패턴을 생성하고, 픽셀 패턴에 대한 표준 편차를 생성하고, 표준 편차를 이용하여 배경 이미지를 업데이트할 수 있다. 블롭의 경계를 중심으로 픽셀 패턴을 생성하는 구성을 통해 배경 업데이트가 보다 정확하게 수행될 수 있다.Referring to FIG. 6, the pixel pattern operation unit 26 and the update unit 30 continuously operate on the inner boundary of the blob until the blob boundary including the second motion pixel reaches the center point, Generate a pixel pattern based on the relative positional characteristics of the second motion pixel, generate a standard deviation for the pixel pattern, and update the background image using the standard deviation. The background update can be performed more accurately through the configuration of generating the pixel pattern around the blob boundary.

또한, 초기화부(10), 연산부(20), 그리고 업데이트부(30)는 장면에 대한 프레임을 그레이 스케일 이미지로 변환하여 이미지 처리를 할 수 있다. 컬러 스케일 이미지를 그레이 스케일 이미지로 변환하기 위해서는 수학식3을 이용할 수 있다.In addition, the initialization unit 10, the operation unit 20, and the update unit 30 can convert a frame of a scene into a grayscale image and perform image processing. To convert a color scale image to a grayscale image, Equation (3) can be used.

Figure pat00003
Figure pat00003

또한, 도11을 참조하면, 배경 이미지의 업데이트는 적색, 녹색 및 청색에 대해 각각 실행될 수도 있다. 적색, 녹색 및 청색에 대해 각각 실행됨에 따라 컬러 배경 이미지의 업데이트에 대한 정확도를 높일 수 있다.11, the update of the background image may be performed for red, green, and blue, respectively. As each run against red, green, and blue, you can increase the accuracy of updating the color background image.

이와 같은 일련의 과정을 통해 업데이트된 배경 이미지는 전경을 검출하기 위해 사용될 수 있다.Through such a series of processes, the updated background image can be used to detect the foreground.

이하에서는 도2 내지 도4를 참조하여 본 발명의 일 실시 예에 의한 배경 검출 방법을 설명한다. 배경 검출 방법에 관한 설명에서 전술한 배경 검출 시스템과 중복되는 세부 실시 예는 생략될 수 있다.Hereinafter, a background detecting method according to an embodiment of the present invention will be described with reference to FIG. 2 to FIG. The detailed embodiment overlapping with the background detection system described above in the description of the background detection method may be omitted.

도2는 본 발명의 일 실시 예에 의한 배경 추정 방법을 설명하기 위한 도면이다. 도2를 참조하면, 서버는 하나 이상의 프레임이 포함된 장면에 대한 배경 검출을 수행할 수 있다. 보다 구체적으로, 서버는 장면의 첫 번째 프레임인 제1 프레임을 제1 배경 이미지로 설정할 수 있다(S100). 제1 프레임을 제1 배경 이미지로 설정한 후, 서버는 제1 프레임과 연속되는 제2 프레임에 대해 배경 검출 처리를 수행할 수 있다.2 is a diagram for explaining a background estimation method according to an embodiment of the present invention. Referring to FIG. 2, the server may perform background detection on a scene including one or more frames. More specifically, the server can set the first frame, which is the first frame of the scene, as the first background image (S100). After setting the first frame as the first background image, the server can perform background detection processing on the second frame subsequent to the first frame.

서버는 제n 프레임과 제n-1 배경 이미지에 포함된 동일 위치의 픽셀에 대한 차이 값을 연산할 수 있다. 서버는 연산된 픽셀 별 차이 값이 기 설정된 임계 값 이상인 픽셀을 추출하여 제1 모션 픽셀으로 설정할 수 있다(S200).The server can calculate the difference value for the pixels at the same position included in the n-th frame and the (n-1) -th background image. The server may extract a pixel having a computed difference value per pixel equal to or greater than a predetermined threshold value and set the pixel as a first motion pixel (S200).

서버는 제1 모션 픽셀에 대해 픽셀의 안정성을 높이기 위해 안정화 계수를 연산할 수 있다(S300). 보다 구체적으로 서버는 제n 프레임에 포함된 모든 픽셀에 대하여 안정화 계수를 연산할 수 있다. 서버는 일 픽셀이 모션 픽셀일 경우 제n-1 안정화 계수에 1을 감하여 제n 안정화 계수를 생성하고, 모션 픽셀이 아닐 경우 제n-1 안정화 계수에 1을 더하여 제n 안정화 계수를 생성할 수 있다. 이와 같이 생성된 안정화 계수는 그 크기가 작을수록 전경일 가능성이 높은 것을 의미한다.The server may calculate the stabilization coefficient to increase the stability of the pixel with respect to the first motion pixel (S300). More specifically, the server can calculate the stabilization coefficient for all pixels included in the n-th frame. The server may generate an n-th stabilization coefficient by subtracting 1 from the n-1 stabilization coefficient if one pixel is a motion pixel, and add 1 to the n-1 stabilization coefficient when the pixel is not a motion pixel. have. The stabilization coefficient thus generated means that the smaller the size, the more likely it is the foreground.

서버는 생성된 안정화 계수를 이용하여 제1 모션 픽셀에 대해서 제2 모션 픽셀을 선정할 수 있다(S400). 보다 구체적으로 서버는 안정화 계수가 기 설정된 기준 값보다 작은 제1 모션 픽셀을 제2 모션 픽셀으로 선정할 수 있다. 제1 모션 픽셀을 제2 모션 픽셀로 정제하는 것은 전경을 보다 정확하게 추출하고, 배경의 일관성을 향상시킬 수 있도록 하는 효과가 있다.The server may select a second motion pixel for the first motion pixel using the generated stabilization coefficient (S400). More specifically, the server may select a first motion pixel having a stabilization coefficient smaller than a preset reference value as a second motion pixel. Purifying the first motion pixel into the second motion pixel has the effect of extracting the foreground more accurately and improving the consistency of the background.

서버는 모든 제2 모션 픽셀에 대하여 픽셀 패턴을 생성할 수 있다(S500). 보다 구체적으로 서버는 제2 모션 픽셀을 중심으로 하는 방향성 마스크와 동일한 크기로 픽셀 그룹을 생성할 수 있다. 예를 들어 방향성 마스크가 5x5의 크기인 경우 제2 모션 픽셀을 중심으로 하는 픽셀 그룹 또한 5x5의 크기를 가질 수 있다. 서버는 제2 모션 픽셀을 중심으로 하는 픽셀 그룹에 방향성 마스크를 적용하여 제2 모션 픽셀에 대한 픽셀 패턴을 생성할 수 있다. 서버가 픽셀 패턴을 생성하는 구체적인 내용은 도3에 대한 설명에서 부가 설명한다.The server may generate a pixel pattern for all second motion pixels (S500). More specifically, the server may generate a pixel group with the same size as a directional mask centered on the second motion pixel. For example, if the directional mask has a size of 5x5, the pixel group centered on the second motion pixel may also have a size of 5x5. The server may generate a pixel pattern for the second motion pixel by applying a directional mask to the group of pixels centered on the second motion pixel. The details of how the server generates the pixel pattern will be further explained in the description of FIG.

또한 서버는 픽셀 패턴과 비교하기 위한 배경 픽셀 패턴을 생성할 수 있다. 배경 픽셀 패턴은 제n-1 배경 이미지에서 생성되는 것으로, 서버는 제n 프레임의 제2 모션 픽셀의 위치와 상응하는 위치의 픽셀을 중심으로 하는 배경 픽셀 그룹을 생성할 수 있다. 서버는 생성된 배경 픽셀 그룹에 방향성 마스크를 적용하여 제n-1 배경 이미지에서 제2 모션 픽셀과 상응하는 위치의 픽셀에 대한 배경 픽셀 패턴을 생성할 수 있다.The server may also generate a background pixel pattern for comparison with the pixel pattern. The background pixel pattern is generated in the n-1 background image, and the server can generate a background pixel group centered on the pixel at the position corresponding to the position of the second motion pixel in the nth frame. The server may apply a directional mask to the generated background pixel group to generate a background pixel pattern for a pixel at a position corresponding to the second motion pixel in the n-1 background image.

서버는 픽셀 패턴과 배경 픽셀 패턴을 이용하여 배경 이미지를 업데이트할 수 있다(S600). 배경 이미지를 업데이트 하는 구체적인 내용은 도4에 대한 설명에서 부가 설명한다.The server may update the background image using the pixel pattern and the background pixel pattern (S600). The details of updating the background image will be further explained in the description of FIG.

도3은 본 발명의 일 실시 예에 의한 마스크 식별 방법을 설명하기 위한 도면이다. 도3을 참조하면, 서버는 하나 이상의 제2 모션 픽셀을 포함하는 블롭을 이용하여 제2 모션 픽셀에 대한 픽셀 패턴을 생성할 수 있다.3 is a view for explaining a mask identification method according to an embodiment of the present invention. Referring to FIG. 3, a server may generate a pixel pattern for a second motion pixel using a blob that includes one or more second motion pixels.

서버는 블롭에 대한 경계를 추출할 수 있다(S510). 본 발명에서 경계는 블롭을 둘러싸고 있는 제2 모션 픽셀의 집합을 의미한다. 예를 들어 블롭의 경계는 도6의 601을 말한다. The server can extract boundaries for the blob (S510). In the present invention, a boundary means a set of second motion pixels surrounding a blob. For example, the boundary of the blob refers to 601 in Fig.

서버는 블롭의 경계에 포함된 제2 모션 픽셀과 블롭의 중심점 사이의 각도를 연산할 수 있다(S520).The server may calculate an angle between the second motion pixel included in the blob boundary and the center point of the blob (S520).

서버는 연산된 각도를 이용하여 제2 모션 픽셀과 대응되는 방향성 마스크를 식별할 수 있다(S530). 방향성 마스크는 수평 마스크, 수직 마스크, 상승 마스크, 하락 마스크 그리고 원형 마스크의 5가지의 형태를 가지며 제2 모션 픽셀의 픽셀 패턴에 적용함으로써 제2 모션 픽셀의 픽셀 패턴이 보다 명확한 값을 갖도록 한다.The server may identify the directional mask corresponding to the second motion pixel using the calculated angle (S530). The directional mask has five forms of a horizontal mask, a vertical mask, a rising mask, a falling mask, and a circular mask, and applies the pixel pattern of the second motion pixel to a more specific value.

도4는 본 발명의 일 실시 예에 의한 배경 이미지 업데이트 방법을 설명하기 위한 도면이다. 도4를 참조하면, 서버는 제2 모션 픽셀의 픽셀 패턴에 대한 표준 편차를 연산할 수 있다(S610). 보다 구체적으로, 서버는 픽셀 패턴에 포함된 복수 개의 픽셀에 대한 표준 편차를 연산할 수 있다.4 is a diagram for explaining a background image update method according to an embodiment of the present invention. Referring to FIG. 4, the server may calculate a standard deviation of a pixel pattern of the second motion pixel (S610). More specifically, the server may calculate a standard deviation for a plurality of pixels included in the pixel pattern.

서버는 제2 모션 픽셀의 픽셀 패턴의 비교 대상인 배경 픽셀 패턴에 대한 표준 편차를 연산할 수 있다(S620). 보다 구체적으로, 서버는 배경 픽셀 패턴에 포함된 복수 개의 픽셀에 대한 표준 편차를 연산할 수 있다.The server can calculate the standard deviation of the background pixel pattern to be compared with the pixel pattern of the second motion pixel (S620). More specifically, the server may calculate a standard deviation for a plurality of pixels included in the background pixel pattern.

서버는 픽셀 패턴에 대한 표준 편차와 배경 픽셀 패턴에 대한 표준 편차를 비교할 수 있다(S630). The server may compare the standard deviation of the pixel pattern with the standard deviation of the background pixel pattern (S630).

서버는 픽셀 패턴에 대한 표준 편차와 배경 픽셀 패턴에 대한 표준 편차를 비교하여 픽셀 패턴에 대한 표준 편차가 배경 픽셀 패턴에 대한 표준 편차보다 작으면 제2 모션 픽셀의 위치에 상응하는 제n 배경 이미지의 픽셀 값을 제2 모션 픽셀의 값으로 업데이트할 수 있다(S640).The server compares the standard deviation of the pixel pattern with the standard deviation of the background pixel pattern so that if the standard deviation of the pixel pattern is smaller than the standard deviation of the background pixel pattern, The pixel value may be updated with the value of the second motion pixel (S640).

본 명세서와 도면에 개시된 본 발명의 실시 예들은 본 발명의 기술 내용을 쉽게 설명하고 본 발명의 이해를 돕기 위해 특정 예를 제시한 것뿐이며, 본 발명의 범위를 한정하고자 하는 것은 아니다. 여기에 개시된 실시 예들 이외에도 본 발명의 기술적 사상에 바탕을 둔 다른 변형 예들이 실시 가능하다는 것은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 자명한 것이다.The embodiments of the present invention disclosed in the present specification and drawings are merely illustrative of specific embodiments of the present invention and are not intended to limit the scope of the present invention in order to facilitate understanding of the present invention. It is to be understood by those skilled in the art that other modifications based on the technical idea of the present invention are possible in addition to the embodiments disclosed herein.

Claims (9)

서버가 하나 이상의 프레임을 포함하는 장면의 배경을 추정하는 방법에 있어서,
상기 장면의 제1 프레임을 제1 배경 이미지로 설정하는 초기화 단계;
제n-1 프레임(n≥2)에 연속하는 제n 프레임을 제n-1 배경 이미지와 비교하여 픽셀 값의 차이가 기 설정된 임계 값 이상인 제1 모션 픽셀을 추출하는 단계;
상기 제n-1 배경 이미지 및 제n 프레임 내 상응하는 위치의 픽셀 변화를 반영하여 픽셀 별 안정화 계수를 산출하는 단계;
상기 제1 모션 픽셀에서 상기 안정화 계수가 기 설정된 조건을 만족하는 제2 모션 픽셀을 선정하는 단계;
상기 제2 모션 픽셀에 방향성 마스크를 적용하여 상기 제2 모션 픽셀의 픽셀 패턴을 생성하고, 상기 제n-1 배경 이미지에서 상기 제2 모션 픽셀 위치에 대응되는 픽셀 및 그 이웃 픽셀을 추출하여 배경 픽셀 패턴을 생성하는 단계;
상기 픽셀 패턴의 표준 편차와 상기 배경 픽셀 패턴의 표준 편차를 이용하여 제n 배경 이미지를 업데이트하는 단계를 포함하는 배경 추정 방법.
A method for estimating a background of a scene in which a server includes one or more frames,
An initialization step of setting a first frame of the scene as a first background image;
Comparing the n-th frame continuous to the (n-1) -th frame (n? 2) with the (n-1) -th background image to extract a first motion pixel whose difference in pixel value is greater than or equal to a predetermined threshold value;
Calculating a pixel-by-pixel stabilization coefficient by reflecting a pixel change at the corresponding position in the n-1-th background image and the n-th frame;
Selecting a second motion pixel in the first motion pixel that satisfies a preset condition of the stabilization coefficient;
A pixel pattern of the second motion pixel is generated by applying a directional mask to the second motion pixel, and a pixel corresponding to the second motion pixel position and a neighboring pixel thereof are extracted from the n-1-th background image, Generating a pattern;
And updating the n-th background image using the standard deviation of the pixel pattern and the standard deviation of the background pixel pattern.
제1항에 있어서,
상기 픽셀 별 안정화 계수를 산출하는 단계는,
제1 안정화 계수를 0으로 설정하는 단계;
상기 제n 프레임에 속하는 픽셀이 상기 제1 모션 픽셀일 경우 제n-1 안정화 계수에 1을 감하고, 상기 제1 모션 픽셀이 아닐 경우 제n-1 안정화 계수에 1을 더하여 제n 안정화 계수를 연산하는 단계를 포함하는 배경 추정 방법.
The method according to claim 1,
The step of calculating the pixel-
Setting a first stabilization coefficient to zero;
1 is added to the (n-1) -stabilization coefficient when the pixel belonging to the n-th frame is the first motion pixel, and the n-th stabilization coefficient is multiplied by 1 when the pixel belonging to the n-th frame is the first motion pixel, And calculating the background image.
제1항에 있어서,
상기 픽셀 패턴을 생성하는 단계는,
하나 이상의 상기 제2 모션 픽셀이 이루는 블롭의 중심점과 상기 블롭의 경계에 포함된 상기 제2 모션 픽셀의 각도를 연산하는 단계;
상기 각도에 대응되는 상기 방향성 마스크를 식별하는 단계를 포함하고,
상기 픽셀 패턴을 생성하는 단계는 상기 블롭의 중심점에 도달할 때까지 상기 블롭의 내부 경계에 연속적으로 적용되는 것을 특징으로 하는 배경 추정 방법.
The method according to claim 1,
Wherein the generating the pixel pattern comprises:
Calculating an angle of the second motion pixel included in the boundary of the blob with the center point of the blob formed by the at least one second motion pixel;
Identifying the directional mask corresponding to the angle,
Wherein the step of generating the pixel pattern is continuously applied to the inner boundary of the blob until the center point of the blob is reached.
제3항에 있어서,
상기 픽셀 패턴을 생성하는 단계는,
상기 제2 모션 픽셀을 중심으로 하고 그 이웃 픽셀을 포함하는 픽셀 그룹을 생성하는 단계;
상기 픽셀 그룹과 상기 방향성 마스크를 곱하여 상기 픽셀 패턴을 생성하는 단계를 포함하고,
상기 픽셀 그룹은 상기 방향성 마스크와 동일한 크기를 갖는 것을 특징으로 하는 배경 추정 방법.
The method of claim 3,
Wherein the generating the pixel pattern comprises:
Generating a pixel group centered on the second motion pixel and including neighboring pixels thereof;
Multiplying the group of pixels by the directional mask to generate the pixel pattern,
Wherein the pixel group has the same size as the directional mask.
제1항에 있어서,
상기 제n 배경 이미지를 업데이트하는 단계는,
상기 픽셀 패턴의 표준 편차가 상기 배경 픽셀 패턴의 표준 편차보다 작으면 제n 배경 이미지에의 제1 모션 픽셀과 상응하는 위치의 픽셀을 제1 모션 픽셀로 업데이트하는 것을 특징으로 하는 배경 추정 방법.
The method according to claim 1,
Wherein updating the n-th background image comprises:
And updates a pixel at a position corresponding to the first motion pixel to the nth background image to the first motion pixel if the standard deviation of the pixel pattern is smaller than the standard deviation of the background pixel pattern.
제1항에 있어서,
상기 방향성 마스크는 수평 마스크, 수직 마스크, 상승 마스크, 하락 마스크, 그리고 원형 마스크 중 어느 하나를 의미하는 것을 특징으로 하는 배경 추정 방법.
The method according to claim 1,
Wherein the directional mask means any one of a horizontal mask, a vertical mask, a rising mask, a falling mask, and a circular mask.
하나 이상의 프레임을 포함하는 장면의 배경을 추정하는 시스템에 있어서,
상기 장면의 제1 프레임을 제1 배경 이미지로 설정하는 초기화부;
제n-1 배경 이미지 및 제n 프레임 내 상응하는 위치의 픽셀 변화를 반영하여 픽셀 별 안정화 계수를 산출하는 안정화 계수 연산부, 제n-1 프레임(n≥2)에 연속하는 제n 프레임을 제n-1 배경 이미지와 비교하여 픽셀 값의 차이가 기 설정된 임계 값 이상인 제1 모션 픽셀을 추출하고, 상기 제1 모션 픽셀에서 상기 안정화 계수가 기 설정된 조건을 만족하는 제2 모션 픽셀을 선정하는 모션 픽셀 연산부, 상기 제2 모션 픽셀에 방향성 마스크를 적용하여 상기 제2 모션 픽셀의 픽셀 패턴을 생성하고, 상기 제n-1 배경 이미지에서 상기 제2 모션 픽셀 위치에 대응되는 픽셀 및 그 이웃 픽셀을 추출하여 배경 픽셀 패턴을 생성하는 픽셀 패턴 연산부를 포함하는 연산부;
상기 픽셀 패턴의 표준 편차와 상기 배경 픽셀 패턴의 표준 편차를 이용하여 제n 배경 이미지를 업데이트하는 업데이트부를 포함하는 배경 추정 시스템.
A system for estimating a background of a scene comprising one or more frames,
An initialization unit for setting a first frame of the scene as a first background image;
A stabilization coefficient operation unit for calculating a stabilization coefficient for each pixel by reflecting a pixel change at a corresponding position in an n-1th background image and an n-th frame, an n-th frame contiguous to the (n-1) -1 motion pixel for which a difference in pixel value is greater than or equal to a preset threshold value in comparison with a background image and a second motion pixel for which the stabilization coefficient in the first motion pixel satisfies a predetermined condition, An operation unit for generating a pixel pattern of the second motion pixel by applying a directional mask to the second motion pixel and extracting a pixel corresponding to the second motion pixel position and its neighboring pixels in the n-1 background image An operation unit including a pixel pattern operation unit for generating a background pixel pattern;
And an update unit updating the n-th background image using the standard deviation of the pixel pattern and the standard deviation of the background pixel pattern.
제7항에 있어서,
상기 픽셀 패턴 생성부는 하나 이상의 상기 제2 모션 픽셀을 포함하는 블롭의 중심점에 도달할 때까지 상기 블롭의 내부 경계에 연속적으로 적용되는 것을 특징으로 하는 배경 추정 시스템.
8. The method of claim 7,
Wherein the pixel pattern generator is continuously applied to the inner boundary of the blob until it reaches a center point of the blob comprising the at least one second motion pixel.
제7항에 있어서,
상기 업데이트부는 상기 픽셀 패턴의 표준 편차가 상기 배경 픽셀 패턴의 표준 편차보다 작으면 제n 배경 이미지에의 제1 모션 픽셀과 상응하는 위치의 픽셀을 제1 모션 픽셀로 업데이트하는 것을 특징으로 하는 배경 추정 시스템.
8. The method of claim 7,
Wherein if the standard deviation of the pixel pattern is smaller than the standard deviation of the background pixel pattern, the updating unit updates the pixel at the position corresponding to the first motion pixel to the nth background image to the first motion pixel. system.
KR1020180041503A 2017-12-20 2018-04-10 Method and system for background estimation of scene comprising at least one frames KR102031941B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20170176344 2017-12-20
KR1020170176344 2017-12-20

Publications (2)

Publication Number Publication Date
KR20190074920A true KR20190074920A (en) 2019-06-28
KR102031941B1 KR102031941B1 (en) 2019-10-14

Family

ID=67066181

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180041503A KR102031941B1 (en) 2017-12-20 2018-04-10 Method and system for background estimation of scene comprising at least one frames

Country Status (1)

Country Link
KR (1) KR102031941B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080226172A1 (en) * 2006-02-02 2008-09-18 International Business Machines Corporation Method and Apparatus for Maintaining a Background Image Model in a Background Subtraction System Using Accumulated Motion
JP2010206286A (en) * 2009-02-27 2010-09-16 Toshiba Teli Corp Image processing apparatus and background image detection processing program
KR20160136157A (en) * 2015-05-19 2016-11-29 에스케이텔레콤 주식회사 Method and Apparatus for Segmenting Background Motion Region From Image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080226172A1 (en) * 2006-02-02 2008-09-18 International Business Machines Corporation Method and Apparatus for Maintaining a Background Image Model in a Background Subtraction System Using Accumulated Motion
JP2010206286A (en) * 2009-02-27 2010-09-16 Toshiba Teli Corp Image processing apparatus and background image detection processing program
KR20160136157A (en) * 2015-05-19 2016-11-29 에스케이텔레콤 주식회사 Method and Apparatus for Segmenting Background Motion Region From Image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
홍석진 외 4명,"지역 하이브리드 패턴 기반 배경모델링을 위한 개선된 에지코드 생성 및 유사도 측정 방법", 한국정보과학회 2016년 한국컴퓨터종합학술대회 논문집, 2016.6, 1169-1171 (20161.06.29.) 1부.* *

Also Published As

Publication number Publication date
KR102031941B1 (en) 2019-10-14

Similar Documents

Publication Publication Date Title
Fu et al. Centroid weighted Kalman filter for visual object tracking
Kim et al. Efficient region-based motion segmentation for a video monitoring system
Park et al. Comparative study of vision tracking methods for tracking of construction site resources
JP6620888B2 (en) Smoke detection apparatus, method and image processing apparatus
EP2858008B1 (en) Target detecting method and system
KR101051459B1 (en) Apparatus and method for extracting edges of an image
CN109919053A (en) A kind of deep learning vehicle parking detection method based on monitor video
CN106327488B (en) Self-adaptive foreground detection method and detection device thereof
CN109478329B (en) Image processing method and device
CN109919002B (en) Yellow stop line identification method and device, computer equipment and storage medium
CN104933738A (en) Visual saliency map generation method based on local structure detection and contrast
US11720745B2 (en) Detecting occlusion of digital ink
JP6652051B2 (en) Detection system, detection method and program
CN116229359A (en) Smoke identification method based on improved classical optical flow method model
Halmaoui et al. Contrast restoration of road images taken in foggy weather
EP3376468A1 (en) Object detection device and object detection method
JP2015082287A (en) Image processing apparatus, image processing method, and image processing program
CN104484865A (en) Method for removing raindrops in video image
CN110321808B (en) Method, apparatus and storage medium for detecting carry-over and stolen object
CN105844671B (en) A kind of fast background relief method under the conditions of change illumination
Chang et al. Segmentation based on fusion of range and intensity images using robust trimmed methods
KR102031941B1 (en) Method and system for background estimation of scene comprising at least one frames
EP3598175B1 (en) Object detection system
Chowdhury et al. A background subtraction method using color information in the frame averaging process
Li et al. Combination of local binary pattern operator with sample consensus model for moving objects detection

Legal Events

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