KR102156024B1 - Shadow removal method for image recognition and apparatus using the same - Google Patents

Shadow removal method for image recognition and apparatus using the same Download PDF

Info

Publication number
KR102156024B1
KR102156024B1 KR1020140130049A KR20140130049A KR102156024B1 KR 102156024 B1 KR102156024 B1 KR 102156024B1 KR 1020140130049 A KR1020140130049 A KR 1020140130049A KR 20140130049 A KR20140130049 A KR 20140130049A KR 102156024 B1 KR102156024 B1 KR 102156024B1
Authority
KR
South Korea
Prior art keywords
shadow
pixel
algorithm
area
foreground
Prior art date
Application number
KR1020140130049A
Other languages
Korean (ko)
Other versions
KR20160037481A (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 KR1020140130049A priority Critical patent/KR102156024B1/en
Publication of KR20160037481A publication Critical patent/KR20160037481A/en
Application granted granted Critical
Publication of KR102156024B1 publication Critical patent/KR102156024B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4023Scaling of whole images or parts thereof, e.g. expanding or contracting based on decimating pixels or lines of pixels; based on inserting pixels or lines of pixels
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Landscapes

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

Abstract

본 발명은 영상 인식을 위한 그림자 제거 방법에 관한 것으로, 이를 위한 본 발명의 일 실시 예에 따른 영상 인식을 위한 그림자 제거 방법은 연속되어 입력되는 각 영상 프레임을 전경 영역 및 배경 영역으로 분리하는 단계, 상기 영상 프레임, 상기 영상 프레임에서 분리된 전경 영역 및 배경 영역을 대상으로 하나 이상의 그림자 제거를 위한 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계, 상기 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하고, 적용된 가중치에 따라 그림자 후보 픽셀을 혼합하여 최종 그림자 픽셀을 결정하는 단계 및 상기 전경 영역에서 상기 결정된 그림자 픽셀을 제거하는 단계를 포함하여 이뤄지는 것을 특징으로 한다. The present invention relates to a shadow removal method for image recognition, and the shadow removal method for image recognition according to an embodiment of the present invention includes the steps of separating each continuously input image frame into a foreground region and a background region, Extracting shadow candidate pixels using an algorithm for removing one or more shadows from the image frame, the foreground region and the background region separated from the image frame, weighting each of the extracted shadow candidate pixels according to the used algorithm And determining a final shadow pixel by applying and mixing shadow candidate pixels according to the applied weight, and removing the determined shadow pixel from the foreground region.

Description

영상 인식을 위한 그림자 제거 방법 및 이를 위한 그림자 제거 장치{SHADOW REMOVAL METHOD FOR IMAGE RECOGNITION AND APPARATUS USING THE SAME}A shadow removal method for image recognition and a shadow removal device therefor {SHADOW REMOVAL METHOD FOR IMAGE RECOGNITION AND APPARATUS USING THE SAME}

본 발명은 영상 인식을 위한 그림자 제거 방법에 관한 것으로, 더욱 상세하게는 연속되는 영상 프레임을 대상으로 하나 이상의 그림자 제거를 위한 알고리즘을 이용하여 그림자 후보 픽셀을 추출한 후, 상기 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 이용된 분석 기법에 따른 가중치를 적용하여 적용된 가중치에 따라 최종 그림자 픽셀을 결정한 후, 결정된 그림자 픽셀을 제거할 수 있는 영상 인식을 위한 그림자 제거 방법 및 이를 위한 그림자 제거 장치에 관한 것이다. The present invention relates to a shadow removal method for image recognition, and more particularly, a shadow candidate pixel is extracted using an algorithm for removing one or more shadows for consecutive image frames, and then extracted according to the used algorithm. A shadow removal method for image recognition capable of removing the determined shadow pixel after determining a final shadow pixel according to the applied weight by applying a weight according to the analysis technique used to each shadow candidate pixel, and a shadow removal apparatus therefor. .

이 부분에 기술된 내용은 단순히 본 실시 예에 대한 배경 정보를 제공할 뿐 종래기술을 구성하는 것은 아니다.The content described in this section merely provides background information on the present embodiment and does not constitute the prior art.

일반적으로 영상 보안/감시 시스템, 군사용 장비 등에 활용되는 영상 감시 시스템과 같은 영상 분석 및 인식 기능은 기본적으로 카메라로부터 입력되는 영상 내에서 전경 영역(foreground region) 및 배경 영역(background region)으로 구분하고, 전경 영역 내에서 물체를 검출하고 추적하게 된다. 이때, 분리된 전경 영역의 형태가 실제 물체의 형태와 얼마나 유사하냐에 따라 영상 인식의 정확도가 좌우되게 된다. 그러나, 햇빛 변화가 심한 야외의 실외 환경과 조명 변화가 심한 실내 환경에서는 시시각각 변하는 그림자로 인해 전경 및 배경 분리가 어려워지게 되고, 분리된 전경 영역이 그림자로 인해 왜곡되고 불필요한 영역까지 검출되어 분석 정확도를 현저히 떨어뜨리게 된다. In general, video analysis and recognition functions such as video surveillance systems used in video security/surveillance systems and military equipment are basically divided into a foreground region and a background region within an image input from a camera, Objects are detected and tracked within the foreground area. In this case, the accuracy of image recognition depends on how similar the shape of the separated foreground area is to the shape of an actual object. However, in an outdoor environment with severe sunlight changes and an indoor environment with severe lighting changes, it becomes difficult to separate the foreground and background due to the ever-changing shadow, and the separated foreground area is distorted by the shadow and even unnecessary areas are detected to improve analysis accuracy. It drops significantly.

이에, 영상 내 그림자를 제거하기 위해 다양한 기술들이 소개되고 있다. 그러나 현재까지의 그림자 제거 기술들은 단순히 밝기 값을 기준으로 그림자를 제거하거나, 영상에서 분리된 전경 영역에서 임계 값을 적용하여 임계값을 벗어나는 부분을 그림자로 간주하여 제거함으로써, 그림자의 세기가 강하거나 다양한 환경에 일관성 있는 그림자 제거가 어렵다는 문제점이 있다. Accordingly, various technologies have been introduced to remove shadows in images. However, the shadow removal techniques up to now simply remove the shadow based on the brightness value, or apply a threshold value in the foreground area separated from the image and remove the part outside the threshold value as a shadow. There is a problem that it is difficult to remove shadows consistently in various environments.

한국공개특허 제2013-0076049호, 2013년 7월 8일 공개 (명칭: 상대적인 상관도 기반의 그림자 제거 방법)Korean Patent Publication No. 2013-0076049, published on July 8, 2013 (Name: Shadow removal method based on relative correlation)

본 발명은 상기한 종래의 문제점을 해결하기 위해 제안된 것으로서, 특히 다양한 환경에서도 효과적으로 그림자를 제거할 수 있는 영상 인식을 위한 그림자 제거 방법 및 이를 위한 그림자 제거 장치를 제공하는 데 목적이 있다. The present invention has been proposed to solve the above-described problems in the related art, and in particular, an object of the present invention is to provide a shadow removal method for image recognition capable of effectively removing shadows even in various environments, and a shadow removal apparatus therefor.

이를 위해, 본 발명은 연속되는 영상 프레임을 대상으로 컬러 및 조도 분석, 벡터 내적 분석, 경계 분포 분석, 프레임 화소 분석 중 적어도 하나 이상의 분석 기법을 이용하여 그림자 후보 픽셀을 추출한 후, 추출된 그림자 후보 픽셀 각각에 이용된 분석 기법에 따른 가중치를 적용하여 적용된 가중치에 따라 최종 그림자 픽셀을 결정한 후, 결정된 그림자 픽셀을 제거할 수 있는 영상 인식을 위한 그림자 제거 방법 및 이를 위한 그림자 제거 장치를 제공하는 데 그 목적이 있다. To this end, the present invention extracts shadow candidate pixels by using at least one analysis technique among color and illuminance analysis, vector dot product analysis, boundary distribution analysis, and frame pixel analysis for consecutive image frames, and then extracts shadow candidate pixels. To provide a shadow removal method for image recognition capable of removing the determined shadow pixels after determining a final shadow pixel according to the applied weight by applying a weight according to the analysis technique used for each, and a shadow removal device for the same. There is this.

그러나, 이러한 본 발명의 목적은 상기의 목적으로 제한되지 않으며, 언급되지 않은 또 다른 목적들은 아래의 기재로부터 명확하게 이해될 수 있을 것이다.However, the object of the present invention is not limited to the above object, and other objects that are not mentioned will be clearly understood from the following description.

상술한 바와 같은 목적을 달성하기 위한 본 발명의 실시 예에 따른 영상 인식을 위한 그림자 제거 방법은 연속되어 입력되는 각 영상 프레임을 전경 영역 및 배경 영역으로 분리하는 단계; 상기 영상 프레임, 상기 영상 프레임에서 분리된 전경 영역 및 배경 영역을 대상으로 하나 이상의 그림자 제거를 위한 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계; 상기 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하고, 적용된 가중치에 따라 그림자 후보 픽셀을 혼합하여 최종 그림자 픽셀을 결정하는 단계; 및 상기 전경 영역에서 상기 결정된 그림자 픽셀을 제거하는 단계;를 포함하여 이뤄질 수 있다. A shadow removal method for image recognition according to an embodiment of the present invention for achieving the above object includes the steps of separating each continuously input image frame into a foreground area and a background area; Extracting shadow candidate pixels using an algorithm for removing one or more shadows from the image frame, a foreground region and a background region separated from the image frame; Applying a weight to each of the extracted shadow candidate pixels according to the used algorithm and mixing the shadow candidate pixels according to the applied weight to determine a final shadow pixel; And removing the determined shadow pixel from the foreground area.

이때, 상기 그림자 제거를 위한 알고리즘은 컬러 및 조도 분석, 벡터 내적 분석, 경계 분포 분석, 프레임 화소 분석이 될 수 있다. In this case, the algorithm for removing the shadow may be color and illuminance analysis, vector dot product analysis, boundary distribution analysis, and frame pixel analysis.

여기서, 상기 컬러 및 조도 분석 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계는 상기 전경 영역 및 배경 영역의 RGB 색상 좌표계를 HSV 색상 좌표계로 변환하는 단계; 상기 변환된 전경 영역 및 배경 영역에서 명도 값을 기준으로 어두운 영역을 검출하는 단계; 상기 전경 영역의 어두운 영역 및 상기 배경 영역의 어두운 영역을 대상으로 채도 비교를 통해 기 설정된 임계치 이상의 픽셀을 그림자 후보 픽셀로 1차 추출하는 단계; 상기 배경 영역 및 전경 영역에서 1차 추출된 그림자 후보 픽셀을 대상으로 명도 변화량을 분석하는 단계; 및 명도 변화량이 상기 기 설정된 임계치 미만인 픽셀을 최종 그림자 후보 픽셀로 추출하는 단계;를 포함하여 이뤄질 수 있다. Here, the step of extracting the shadow candidate pixels using the color and illuminance analysis algorithm may include converting the RGB color coordinate system of the foreground area and the background area into an HSV color coordinate system; Detecting a dark area based on a brightness value in the converted foreground area and background area; Firstly extracting a pixel having a predetermined threshold value or higher as a shadow candidate pixel through a saturation comparison of the dark area of the foreground area and the dark area of the background area; Analyzing an amount of change in brightness for the shadow candidate pixels first extracted from the background area and the foreground area; And extracting a pixel whose brightness change amount is less than the preset threshold as a final shadow candidate pixel.

또한, 상기 벡터 내적 분석 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계는 상기 배경 영역 및 전경 영역을 대상으로 일정 크기의 윈도우를 설정하는 단계; 상기 배경 영역에서의 상기 윈도우 내의 픽셀과 상기 전경 영역에서의 상기 윈도우 내의 픽셀의 벡터 값의 내적(inner product)을 산출하는 단계; 및 상기 배경 영역에서의 내적과 상기 전경 영역에서의 내적을 비교하여, 벡터 값의 변화량이 기 설정된 임계치 이상의 픽셀을 그림자 후보 픽셀로 추출하는 단계;를 포함하여 이뤄질 수 있다. In addition, the step of extracting the shadow candidate pixel using the vector dot product analysis algorithm may include setting a window having a predetermined size for the background region and the foreground region; Calculating an inner product of a vector value of a pixel in the window in the background area and a pixel in the window in the foreground area; And comparing the dot product in the background area with the dot product in the foreground area, and extracting a pixel with a variation of a vector value equal to or greater than a preset threshold as a shadow candidate pixel.

또한, 상기 경계 분포 분석 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계는 상기 전경 영역에 대한 수직 히스토그램을 생성하는 단계; 상기 수직 히스토그램을 이용하여 가장 높은 값을 가지는 x축의 범위를 중심축으로 설정하는 단계; 상기 중심축을 기준으로 일정 반경 내 픽셀 명도 값을 분석하여 그림자의 방향을 예측하는 단계; 및 그림자 방향이 예측되면, 상기 중심축에서 그림자 방향으로 일정 거리 이상의 픽셀을 그림자 후보 픽셀로 추출하는 단계;를 포함하여 이뤄질 수 있다. In addition, the extracting of the shadow candidate pixel using the boundary distribution analysis algorithm may include generating a vertical histogram for the foreground region; Setting a range of the x-axis having the highest value as a central axis using the vertical histogram; Predicting a direction of a shadow by analyzing a pixel brightness value within a predetermined radius based on the central axis; And when the shadow direction is predicted, extracting a pixel of a predetermined distance or more from the central axis in the shadow direction as a shadow candidate pixel.

이때, 상기 중심축으로 설정하는 단계는 상기 수직 히스토그램을 일정 개수의 블록으로 나누어서 블록 별 히스토그램 평균치가 높은 블록 영역을 중심축으로 결정할 수 있다. In this case, the step of setting the central axis may include dividing the vertical histogram into a predetermined number of blocks and determining a block area having a high average histogram value for each block as the central axis.

또한, 상기 프레임 화소 분석 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계는 상기 영상 프레임의 조명 성분을 추출하는 단계; 상기 조명 성분을 이용하여 반사 성분을 생성하는 단계; 상기 반사 성분의 값을 이용하여 어두운 영역을 보정하는 단계; 및 상기 보정된 어두운 영역에 해당하는 픽셀을 그림자 후보 픽셀로 추출하는 단계;를 포함하여 이뤄질 수 있다. In addition, the extracting of the shadow candidate pixel using the frame pixel analysis algorithm may include extracting an illumination component of the image frame; Generating a reflection component using the lighting component; Correcting a dark area using the value of the reflection component; And extracting a pixel corresponding to the corrected dark area as a shadow candidate pixel.

이때, 상기 최종 그림자 픽셀을 결정하는 단계는 현재 영상 프레임의 주변 한경 정보를 분석하는 단계; 상기 현재 영상 프레임의 주변 환경 정보와 이전 영상 프레임의 주변 환경 정보를 비교하여 주변 환경 정보의 변화량을 분석하고, 상기 주변 환경 정보의 변화량을 기초로 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하는 단계; 및 적용된 가중치에 따라 상기 그림자 후보 픽셀을 혼합하여 최종 그림자 픽셀을 결정하는 단계;를 포함하여 이뤄질 수 있다. In this case, the determining of the final shadow pixel may include analyzing information on surrounding landscapes of the current image frame; By comparing the surrounding environment information of the current image frame and the surrounding environment information of the previous image frame, analyzing the amount of change in the surrounding environment information, and weighting each of the extracted shadow candidate pixels according to the algorithm used based on the change amount of the surrounding environment information Applying; And determining a final shadow pixel by mixing the shadow candidate pixels according to the applied weight.

여기서, 상기 주변 환경 정보의 변화량은 그림자 픽셀 분포도, 히스토그램을 기초로 분석된 그림자의 세기 및 광량 변화량이 될 수 있다. Here, the amount of change of the surrounding environment information may be a shadow pixel distribution map, and an amount of change in intensity and amount of light analyzed based on a histogram.

또한, 상기 최종 그림자 픽셀을 결정하는 단계는 이전 영상 프레임이 존재하지 않을 경우, 각 알고리즘에 따라 추출된 그림자 후보 픽셀의 겹침 여부를 판단하고, 겹침 정도가 큰 그림자 후보 픽셀을 최종 그림자 픽셀로 결정할 수도 있다. In addition, in the determining of the final shadow pixel, when no previous image frame exists, it is determined whether or not the shadow candidate pixels extracted according to each algorithm overlap, and a shadow candidate pixel having a large overlapping degree may be determined as the final shadow pixel. have.

추가로 본 발명은 상술한 바와 같은 영상 인식을 위한 그림자 제거 방법을 기록한 컴퓨터 판독 가능한 기록 매체를 제공할 수 있다.In addition, the present invention can provide a computer-readable recording medium recording the shadow removal method for image recognition as described above.

상술한 바와 같은 목적을 달성하기 위한 본 발명의 실시 예에 따른 그림자 제거 장치는 연속되어 입력되는 각 영상 프레임을 전경 영역 및 배경 영역으로 분리하는 전경 배경 분리부; 및 상기 영상 프레임, 상기 영상 프레임에서 분리된 전경 영역 및 배경 영역을 대상으로 하나 이상의 그림자 제거를 위한 알고리즘을 이용하여 그림자 후보 픽셀을 추출하고, 상기 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하고, 적용된 가중치에 따라 그림자 후보 픽셀을 혼합하여 최종 그림자 픽셀을 결정하여, 상기 전경 영역에서 상기 결정된 그림자 픽셀을 제거하는 그림자 제거부;를 포함하여 구성될 수 있다. A shadow removal apparatus according to an embodiment of the present invention for achieving the above-described object includes: a foreground background separator for separating each continuously input image frame into a foreground region and a background region; And extracting shadow candidate pixels using an algorithm for removing one or more shadows from the image frame, the foreground region and the background region separated from the image frame, and weighting each of the extracted shadow candidate pixels according to the used algorithm. And a shadow removal unit configured to remove the determined shadow pixel from the foreground area by applying and mixing shadow candidate pixels according to the applied weight to determine a final shadow pixel.

본 발명의 영상 인식을 위한 그림자 제거 방법 및 이를 위한 그림자 제거 장치에 의하면, 영상 내 조명 밝기 변화, 전경 및 배경의 복잡도, 색상의 다양성 등 복잡한 영상 환경에서도 적응적으로 동작이 가능하여 보다 효율적인 영상 내 그림자 제거가 가능하게 된다. According to the shadow removal method for image recognition of the present invention and the shadow removal device therefor, it is possible to adaptively operate even in complex image environments such as changes in lighting brightness, complexity of foreground and background, and diversity of colors in an image, and thus more efficient Shadow removal becomes possible.

아울러, 상술한 효과 이외의 다양한 효과들이 후술될 본 발명의 실시 예에 따른 상세한 설명에서 직접적 또는 암시적으로 개시될 수 있다.In addition, various effects other than the above-described effects may be directly or implicitly disclosed in the detailed description according to an embodiment of the present invention to be described later.

도 1은 본 발명의 실시 예에 따른 그림자 제거 장치를 이용한 영상 인식 장치의 주요 구성을 도시한 블록도이다.
도 2는 본 발명의 실시 예에 다른 그림자 제거 장치의 주요 구성을 도시한 블록도이다.
도 3은 본 발명의 실시 예에 따른 영상 인식을 위한 그림자 제거 방법을 설명하기 위한 흐름도이다.
도 4는 본 발명의 실시 예에 따른 영상 인식을 위한 그림자 제거 방법을 보다 구체적으로 설명하기 위한 흐름도이다.
도 5 내지 도 8은 본 발명의 실시 예에 따른 그림자 제거를 위한 알고리즘의 처리 과정을 설명하기 위한 흐름도이다.
1 is a block diagram showing a main configuration of an image recognition apparatus using a shadow removal apparatus according to an embodiment of the present invention.
2 is a block diagram showing the main configuration of a shadow removal apparatus according to an embodiment of the present invention.
3 is a flowchart illustrating a shadow removal method for image recognition according to an embodiment of the present invention.
4 is a flowchart illustrating a shadow removal method for image recognition according to an embodiment of the present invention in more detail.
5 to 8 are flowcharts illustrating a processing process of an algorithm for removing shadows according to an embodiment of the present invention.

이하 첨부된 도면을 참조하여 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있는 바람직한 실시예를 상세히 설명한다. 다만, 본 발명의 바람직한 실시예에 대한 동작 원리를 상세하게 설명함에 있어 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다. 이는 불필요한 설명을 생략함으로써 본 발명의 핵심을 흐리지 않고 더욱 명확히 전달하기 위함이다. 또한 본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시 예를 가질 수 있는 바, 특정 실시 예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 하나, 이는 본 발명을 특정한 실시 형태로 한정하려는 것은 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, when it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the subject matter of the present invention in describing the operating principle of the preferred embodiment of the present invention in detail, the detailed description thereof will be omitted. This is to more clearly convey the core of the present invention by omitting unnecessary description. In addition, the present invention is intended to illustrate specific embodiments in the drawings and describe in detail in the detailed description, as various changes may be made and various embodiments may be applied, but this is not intended to limit the present invention to specific embodiments, It is to be understood as including all changes, equivalents, and substitutes included in the spirit and scope of the present invention.

또한, 제1, 제2 등과 같이 서수를 포함하는 용어는 다양한 구성요소들을 설명하기 위해 사용하는 것으로, 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용될 뿐, 상기 구성요소들을 한정하기 위해 사용되지 않는다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제2 구성요소는 제1 구성요소로 명명될 수 있고, 유사하게 제1 구성요소도 제2 구성요소로 명명될 수 있다.In addition, terms including ordinal numbers such as first and second are used to describe various elements, and are only used for the purpose of distinguishing one element from other elements, and to limit the elements. Not used. For example, without departing from the scope of the present invention, a second component may be referred to as a first component, and similarly, a first component may be referred to as a second component.

더하여, 어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급할 경우, 이는 논리적 또는 물리적으로 연결되거나, 접속될 수 있음을 의미한다. 다시 말해, 구성요소가 다른 구성요소에 직접적으로 연결되거나 접속되어 있을 수 있지만, 중간에 다른 구성요소가 존재할 수도 있으며, 간접적으로 연결되거나 접속될 수도 있다고 이해되어야 할 것이다. In addition, when a component is referred to as being "connected" or "connected" to another component, it means that it is logically or physically connected, or can be connected. In other words, it should be understood that a component may be directly connected or connected to another component, but another component may exist in the middle, or may be indirectly connected or connected.

또한, 본 명세서에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 또한, 본 명세서에서 기술되는 "포함 한다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.In addition, terms used in the present specification are only used to describe specific embodiments, and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In addition, terms such as "comprises" or "have" described in the present specification are intended to designate the existence of features, numbers, steps, actions, components, parts, or a combination thereof described in the specification. It is to be understood that the above other features, or the possibility of the presence or addition of numbers, steps, actions, components, parts, or combinations thereof, are not preliminarily excluded.

이제 본 발명의 실시 예에 따른 영상 인식을 위한 그림자 제거 방법 및 이를 위한 그림자 제거 장치에 대하여 도면을 참조하여 상세하게 설명하도록 한다. 이때, 도면 전체에 걸쳐 유사한 기능 및 작용을 하는 부분에 대해서는 동일한 도면 부호를 사용하며, 이에 대한 중복되는 설명은 생략하기로 한다.Now, a shadow removal method for image recognition and a shadow removal apparatus for the same according to an embodiment of the present invention will be described in detail with reference to the drawings. In this case, the same reference numerals are used for portions having similar functions and functions throughout the drawings, and redundant descriptions thereof will be omitted.

먼저, 본 발명의 실시 예에 따른 그림자 제거 장치를 이용한 영상 인식 장치에 대해 간략히 설명하도록 한다. First, an image recognition apparatus using a shadow removal apparatus according to an embodiment of the present invention will be briefly described.

도 1은 본 발명의 실시 예에 따른 그림자 제거 장치를 이용한 영상 인식 장치의 주요 구성을 도시한 블록도이다. 1 is a block diagram showing a main configuration of an image recognition apparatus using a shadow removal apparatus according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 실시 예에 따른 그림자 제거 장치(100)는 영상 인식 장치(1000)의 일 구성 요소로 존재할 수 있으며, 영상 인식 장치(1000)는 영상 수신 장치(200), 표시 장치(300), 저장 장치(400)를 더 포함하여 구성될 수 있다.Referring to FIG. 1, the shadow removal apparatus 100 according to an embodiment of the present invention may exist as a component of the image recognition apparatus 1000, and the image recognition apparatus 1000 includes an image receiving apparatus 200 and a display. The device 300 and the storage device 400 may be further included.

영상 수신 장치(200)는 연속적인 영상 프레임을 실시간 입력 받는 역할을 수행한다. 상기 영상 인식 장치(1000)가 카메라 장치의 일 구성 요소로 존재할 경우, 영상 수신 장치(200)는 CCD(Charge Coupled Device)/CMOS(Complementary Metal-Oxide Semiconductor) 등의 센서를 통해 입력되는 영상을 수신하는 역할을 수행할 수 있다. 또한, 영상 수신 장치(200)는 통신망(미도시)을 통해 외부의 별도 장치에서 전송되는 영상 프레임을 실시간 수신하여 입력 받을 수도 있다. 이때의 영상 수신 장치(200)는 예컨대, WLAN(Wireless LAN), 와이파이(Wi-Fi), 와이브로(Wibro), 와이맥스(Wimax), HSDPA(High Speed Downlink Packet Access) 등의 무선 통신 방식 또는 이더넷(Ethernet), xDSL(ADSL, VDSL), HFC(Hybrid Fiber Coaxial Cable), FTTC(Fiber to The Curb), FTTH(Fiber To The Home) 등의 유선 통신 방식의 통신망(미도시)을 통해 영상 프레임을 수신할 수 있다. 이외에도 기타 널리 공지되었거나 향후 개발될 모든 형태의 통신 방식에 따른 통신망(미도시)을 통해 영상 프레임을 수신할 수도 있다. The image receiving device 200 serves to receive continuous image frames in real time. When the image recognition device 1000 exists as a component of a camera device, the image receiving device 200 receives an image input through a sensor such as a charge coupled device (CCD)/Complementary Metal-Oxide Semiconductor (CMOS). You can play a role. Also, the image receiving device 200 may receive and receive an image frame transmitted from an external device in real time through a communication network (not shown). At this time, the image receiving device 200 may be a wireless communication method such as WLAN (Wireless LAN), Wi-Fi, Wibro, Wimax, High Speed Downlink Packet Access (HSDPA), or Ethernet ( Ethernet), xDSL (ADSL, VDSL), HFC (Hybrid Fiber Coaxial Cable), FTTC (Fiber to The Curb), FTTH (Fiber To The Home), etc. through wired communication network (not shown) can do. In addition, it is also possible to receive an image frame through a communication network (not shown) according to any other well-known or future developed communication method.

그림자 제거 장치(100)는 본 발명의 실시 예에 따른 영상 인식을 위한 그림자 제거 방법에 따라 입력된 영상 프레임에서 그림자를 제거하는 역할을 수행하는 장치이다. 이때의 그림자 제거 장치(100)는 영상 수신 장치(200)를 통해 전달되는 연속되어 입력된 각 영상 프레임을 전경 영역 및 배경 영역으로 분리하고, 영상 프레임, 상기 영상 프레임에서 분리된 전경 영역 및 배경 영역 중 적어도 하나 이상을 대상으로 컬러 및 조도 분석, 벡터 내적 분석, 경계 분포 분석, 프레임 화소 분석 중 적어도 하나 이상의 분석 기법을 이용하여 그림자 후보 픽셀을 추출한 후, 상기 이용된 분석 기법에 따라 그림자 후보 픽셀 각각에 가중치를 적용하고, 적용된 가중치에 따라 그림자 후보 픽셀을 혼합하여 최종 그림자 픽셀을 결정하여, 상기 전경 영역에서 상기 결정된 그림자 픽셀을 제거하게 된다. 보다 구체적인 그림자 제거 장치(100)의 주요 구성 및 동작 방법에 대해서는 후술하도록 한다. The shadow removal apparatus 100 is a device that removes a shadow from an input image frame according to a shadow removal method for image recognition according to an embodiment of the present invention. At this time, the shadow removal device 100 separates each continuously input image frame transmitted through the image receiving device 200 into a foreground area and a background area, and includes an image frame, a foreground area and a background area separated from the image frame. After extracting shadow candidate pixels using at least one analysis method among color and illuminance analysis, vector dot product analysis, boundary distribution analysis, and frame pixel analysis for at least one of the targets, each of the shadow candidate pixels according to the used analysis technique A weight is applied to and a shadow candidate pixel is mixed according to the applied weight to determine a final shadow pixel, and the determined shadow pixel is removed from the foreground area. A more specific configuration and operation method of the shadow removal apparatus 100 will be described later.

표시 장치(300)는 그림자 제거 장치(100)를 통해 그림자가 제거된 영상을 표시하는 역할을 수행할 수 있다. 또한, 표시 장치(300)는 영상 인식에 다른 각종 결과 화면을 표시하는 역할을 수행할 수도 있다. 이러한 본 발명의 표시 장치(300)는 LCD(Liquid Crystal Display), TFT-LCD(Thin Film Transistor LCD), OLED(Organic Light Emitting Diodes), 발광다이오드(LED), AMOLED(Active Matrix Organic LED), 플렉시블 디스플레이(Flexible display) 및 3차원 디스플레이(3 Dimension) 등으로 구성될 수 있다. 또한 이들 중 일부 디스플레이는 그를 통해 외부를 볼 수 있도록 투명형 또는 광투과형으로 구성될 수 있다. 이는 TOLED(Transparant OLED)를 포함하는 투명 디스플레이 형태로 구성될 수 있다.The display device 300 may play a role of displaying an image from which a shadow has been removed through the shadow removal device 100. In addition, the display device 300 may play a role of displaying various result screens other than image recognition. The display device 300 of the present invention includes a Liquid Crystal Display (LCD), a Thin Film Transistor LCD (TFT-LCD), an Organic Light Emitting Diodes (OLED), a light emitting diode (LED), an Active Matrix Organic LED (AMOLED), and a flexible display device. It may be composed of a display (flexible display) and a three-dimensional display (3 Dimension). In addition, some of these displays may be configured as a transparent type or a light-transmitting type so that the outside can be seen through them. This may be configured in the form of a transparent display including TOLED (Transparant OLED).

저장 장치(400)는 입력되는 영상 프레임을 일시 또는 영구적으로 저장하는 역할을 수행하며, 그림자 제거 장치(100)를 통해 영상 프레임에서 그림자를 제거하기 위한 다양한 정보를 저장하고 관리할 수 있다. 특히, 본 발명의 실시 예에 따른 저장 장치(400)는 현재 프레임에 대한 정보 및 그림자 제거 정보를 이전 프레임에 대한 정보로 저장하고 기록하는 역할을 수행할 수 있다. 이러한 본 발명의 실시 예에 따른 저장 장치(400)는 플래시 메모리(flash memory), 하드디스크(hard disk), 멀티미디어 카드 마이크로(multimedia card micro) 타입의 메모리(예컨대, SD 또는 XD 메모리 등), 램(RAM), 롬(ROM) 등의 저장매체를 포함하여 구성될 수 있다. The storage device 400 serves to temporarily or permanently store an input image frame, and may store and manage various pieces of information for removing a shadow from an image frame through the shadow removal device 100. In particular, the storage device 400 according to an embodiment of the present invention may serve to store and record information on a current frame and information on a shadow removal as information on a previous frame. The storage device 400 according to the exemplary embodiment of the present invention includes a flash memory, a hard disk, a multimedia card micro type memory (eg, SD or XD memory, etc.), and RAM. It may be configured to include a storage medium such as (RAM) and ROM.

이러한 그림자 제거 장치(100) 또는 영상 인식 장치(1000)에 탑재되는 프로세서는 본 발명에 따른 방법을 실행하기 위한 프로그램 명령을 처리할 수 있다. 일 구현 예에서, 이 프로세서는 싱글 쓰레드(Single-threaded) 프로세서일 수 있으며, 다른 구현 예에서 본 프로세서는 멀티 쓰레드(Multithreaded) 프로세서일 수 있다. 나아가 본 프로세서는 저장 장치(400) 상에 저장된 명령을 처리하는 것이 가능하다.A processor mounted in the shadow removal apparatus 100 or the image recognition apparatus 1000 may process a program command for executing the method according to the present invention. In one implementation example, the processor may be a single-threaded processor, and in another implementation example, the processor may be a multithreaded processor. Furthermore, the processor may process commands stored on the storage device 400.

또한, 본 발명의 영상 인식 장치(1000)는 설명의 편의를 위해, 영상 수신 장치(200), 그림자 제거 장치(100), 표시 장치(300) 및 저장 장치(400) 만을 포함하는 것을 예로 들어 설명하였으나, 이에 한정되는 것은 아니며, 영상 인식을 위한 다양한 장치 또는 모듈의 집합으로 구성될 수 있다. 영상 인식을 위한 다양한 장치 또는 모듈은 공지된 다양한 방식을 이용할 수 있으므로, 구체적인 설명은 생략하도록 한다. In addition, for convenience of description, the image recognition apparatus 1000 of the present invention is described as an example that includes only the image receiving apparatus 200, the shadow removing apparatus 100, the display apparatus 300, and the storage apparatus 400. However, the present invention is not limited thereto, and may be configured as a set of various devices or modules for image recognition. Since various devices or modules for image recognition can use various known methods, detailed descriptions will be omitted.

이하, 본 발명의 실시 예에 따른 그림자 제거 장치(100)의 주요 구성 및 동작 방법에 대해 설명하도록 한다. Hereinafter, the main configuration and operation method of the shadow removal apparatus 100 according to an embodiment of the present invention will be described.

도 2는 본 발명의 실시 예에 다른 그림자 제거 장치의 주요 구성을 도시한 블록도이다. 2 is a block diagram showing the main configuration of a shadow removal apparatus according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 실시 예에 따른 그림자 제거 장치(100)는 전처리부(10), 전경 배경 분리부(20), 그림자 제거부(30) 및 후처리부(40)를 포함하여 구성될 수 있다. Referring to FIG. 2, a shadow removal apparatus 100 according to an embodiment of the present invention includes a pre-processing unit 10, a foreground and background separation unit 20, a shadow removing unit 30, and a post-processing unit 40. Can be.

전처리부(10)는 연속되어 입력되는 영상 프레임에 대한 전처리 과정을 수행한다. 예컨대, 전처리부(10)는 영상 내 존재하는 잡음 제거, 컬러 보정, 감마 보정 등을 통해 그림자 제거 성능 향상 및 영상 인식 효율을 향상시키기 위한 다양한 처리를 수행할 수 있다. The preprocessor 10 performs a preprocessing process for continuously input image frames. For example, the preprocessor 10 may perform various processes to improve shadow removal performance and image recognition efficiency through noise removal, color correction, gamma correction, etc. existing in the image.

전경 배경 분리부(20)는 전처리부(10)를 통해 전처리 과정이 수행된 영상 프레임을 전경 영역 및 배경 영역으로 분리하게 된다. 예를 들어 전경 배경 분리부(20)는 소정의 개수의 가우시안 노드(Gaussian Node)를 포함하는 픽셀 중 가우시안 노드에 대한 가중치(Weight)가 소정의 기준보다 큰 복수 개의 노드를 배경 픽셀로 지정하고, 지정된 배경 픽셀을 기준으로 영상 프레임 내에서 전경 픽셀을 판별한다. 그리고, 전경 배경 분리부(20)는 판별된 전경 픽셀을 이용하여 전경 영역을 분리하게 된다. 또한, 전경 배경 분리부(20)는 통계 모델 또는 가우시안 혼합 모델(GMM; Gaussian Mixture Model) 등과 같은 특정 알고리즘에 따라 배경 모델을 생성하고, 배경 모델을 토대로 전경 영역 및 배경 영역을 분리할 수도 있다. The foreground background separating unit 20 separates the image frame on which the preprocessing process has been performed through the preprocessor 10 into a foreground area and a background area. For example, the foreground background separation unit 20 designates a plurality of nodes having a weight greater than a predetermined criterion among pixels including a predetermined number of Gaussian nodes as background pixels, A foreground pixel within an image frame is determined based on a specified background pixel. In addition, the foreground background separating unit 20 separates the foreground region using the determined foreground pixels. In addition, the foreground background separating unit 20 may generate a background model according to a specific algorithm such as a statistical model or a Gaussian Mixture Model (GMM), and may separate the foreground region and the background region based on the background model.

분리된 전경 영역은 사람, 자동차 등과 같이 인식 및 추적하고자 하는 물체를 포함한다. 그러나, 전경 영역은 인식 및 추적하고자 하는 물체 이외 그림자도 같이 물체로 인식하여 분리되게 되는 데, 이는 전술한 바와 같이 전경 및 배경 영역을 분리하는 기법이 현재 프레임과 이전 프레임의 화소 변화 정도 등을 기반으로 분리하기 때문에, 영상 내 물체와 같이 움직이는 그림자도 물체의 일부분으로 인식함으로써 발생되게 된다. The separated foreground area includes objects to be recognized and tracked, such as people and cars. However, the foreground area is separated by recognizing shadows as well as objects other than the object to be recognized and tracked. This is because, as described above, the technique of separating the foreground and background areas is based on the degree of pixel change between the current frame and the previous frame. Because of the separation, shadows that move like objects in the image are also generated by recognizing them as part of the object.

따라서, 전경 영역 내에 포함되는 그림자를 제거하는 과정이 필수적으로 이뤄져야 한다. Therefore, the process of removing the shadow included in the foreground area must be performed.

그림자 제거부(30)는 상술한 바와 같이 전경 영역 내 포함되는 그림자를 제거하는 역할을 수행한다. 특히, 본 발명의 실시 예에 다른 그림자 제거부(30)는 전경 및 배경 영역이 분리되기 이전의 원본 영상 프레임, 상기 영상 프레임에서 분리된 전경 영역 및 배경 영역 중 적어도 하나 이상을 대상으로 기 정해진 방식의 그림자 제거를 위한 알고리즘을 이용하여 그림자 후보 픽셀을 추출하게 된다. 여기서, 기 정해진 방식의 그림자 제거를 위한 알고리즘은 컬러 및 조도 분석, 벡터 내적 분석, 경계 분포 분석, 프레임 화소 분석 알고리즘이 될 수 있다. As described above, the shadow removal unit 30 removes the shadow included in the foreground area. In particular, the shadow removal unit 30 according to an embodiment of the present invention is a predetermined method for at least one of an original image frame before the foreground and background regions are separated, a foreground region and a background region separated from the image frame. The shadow candidate pixels are extracted by using an algorithm for removing the shadow of. Here, the algorithm for removing the shadow of a predetermined method may be color and illuminance analysis, vector dot product analysis, boundary distribution analysis, and frame pixel analysis algorithm.

컬러 및 조도 분석 알고리즘은 전경 영역 및 배경 영역의 색상 및 밝기에 따라 그림자 후보 픽셀을 추출할 수 있는 알고리즘으로, RGB 색상 시스템에서 그림자와 배경 영역 간에는 색상 및 채도 변화량은 적지만 밝기 변화량은 크며, 그림자는 일반적으로 어두운 색을 나타내는 특징으로 전경 영역에서 그림자의 후보가 되는 픽셀을 결정하는 방식이다.The color and illuminance analysis algorithm is an algorithm that can extract shadow candidate pixels according to the color and brightness of the foreground and background areas.In the RGB color system, the color and saturation change between the shadow and the background area is small, but the brightness change is large. Is a method of determining a pixel that is a candidate for a shadow in the foreground region, which is a feature that generally represents a dark color.

벡터 내적 분석 알고리즘은 일정 크기의 윈도우 상에 존재하는 픽셀의 움직임 벡터에 따라 그림자 후보 픽셀을 추출할 수 있는 알고리즘이다. 컬러 및 조도 분석 알고리즘은 개별 픽셀의 변화 정도를 측정하고 이에 따라 그림자 후보 픽셀을 추출하는 방식인 반면, 벡터 내적 분석 알고리즘은 일정 크기의 윈도우를 먼저 설정함으로써, 개별 픽셀들의 집합인 그룹(region)별로 변화 정도를 측정하고 이에 따라 그림자 후보 픽셀을 추출하는 방식으로, 컬러 및 조도 분석 알고리즘을 상호 보완할 수 있는 알고리즘이다. The vector dot product analysis algorithm is an algorithm capable of extracting a shadow candidate pixel according to a motion vector of a pixel existing on a window of a predetermined size. The color and illuminance analysis algorithm measures the degree of change of individual pixels and extracts shadow candidate pixels accordingly, while the vector dot product analysis algorithm sets a window of a certain size first, so that each region is a set of individual pixels. It is an algorithm that can complement color and illuminance analysis algorithms by measuring the degree of change and extracting shadow candidate pixels accordingly.

경계 분포 분석 알고리즘은 픽셀의 변화 정도가 아닌 전경 영역의 에지의 중심을 구하고, 그림자 방향을 획득한 후 기준 거리 이상의 픽셀을 그림자로 가정하여 그림자의 후보 픽셀을 추출할 수 있는 방식이다. 경계 분포 분석 알고리즘은 그림자는 물체에 가려져 생기는 것으로 물체 크기를 기준으로 일정 거리 이상에서 생기는 원리를 이용하는 알고리즘 방식이다. The boundary distribution analysis algorithm is a method that obtains the center of the edge of the foreground region, not the degree of change of the pixel, obtains the shadow direction, and then extracts the candidate pixel of the shadow by assuming a pixel larger than the reference distance as a shadow. The boundary distribution analysis algorithm is an algorithm method that uses the principle that shadows are hidden by an object and occur at a certain distance or more based on the size of the object.

프레임 변화 분석 알고리즘은 전경 영역 및 배경 영역이 아닌 현재 프레임과 이전 프레임의 전체 영상에 대한 픽셀 변화율에 따라 영상의 픽셀을 보정하고, 보정된 픽셀을 그림자 후보 픽셀로 추출할 수 있는 방식이다. The frame change analysis algorithm corrects pixels of an image according to a pixel change rate of the entire image of the current frame and the previous frame, not the foreground and background regions, and extracts the corrected pixels as shadow candidate pixels.

본 발명의 실시 예에 따른 그림자 제거를 위한 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 방식에 대한 구체적인 설명은 후술하도록 하며, 본 발명의 그림자 제거부(30)는 상술한 바와 같은 하나 이상의 그림자 제거를 위한 알고리즘을 이용하여 그림자 후보 픽셀을 추출한 후, 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 자중치를 적용하고, 적용된 가중치에 따라 그림자 후보 픽셀을 혼합하여 최종 그림자 픽셀을 결정하고, 전경 영역에서 결정된 그림자 픽셀을 제거하게 된다. A detailed description of a method of extracting shadow candidate pixels using an algorithm for shadow removal according to an embodiment of the present invention will be described later, and the shadow removal unit 30 of the present invention performs one or more shadow removal as described above. After extracting the shadow candidate pixels using the algorithm for, a self weight value is applied to each of the extracted shadow candidate pixels according to the used algorithm, and the final shadow pixels are determined by mixing the shadow candidate pixels according to the applied weight, and It will remove the shadow pixels.

보다 구체적으로 설명하면, 그림자 제거부(30)는 먼저, 현재 입력된 영상 프레임의 주변 환경 정보 이전 영상 프레임의 주변 환경 정보를 비교하고, 주변 환경 정보의 변화량을 통해 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하게 된다. 여기서, 주변 환경 정보의 변화량은 그림자 픽셀 분포도, 히스토그램을 기초로 분석될 수 있는 정보로 예컨대, 그림자의 세기 및 광량 변화량이 될 수 있다. 보다 구체적인 예를 들면, 현재 영상 프레임의 크기가 4x4 크기이며, 컬러 및 조도 분석 알고리즘을 이용하여 추출된 그림자 후보 픽셀이 (2,1), (2,2)이고, 벡터 내적 분석 알고리즘을 이용하여 추출된 그림자 후보 픽셀이 (2,2), (2,3)이고, 경계 분포 분석 알고리즘을 이용하여 추출된 그림자 후보 픽셀이 (3,2), (3,3)이고, 프레임 화소 분석 알고리즘을 이용하여 추출된 그림자 후보 픽셀이 (3,2), (3,3), (4,2), (4,3)이라 가정한다. 그리고 주변 환경 정보의 변화량을 분석한 결과, 그림자 세기가 예를 들어 20 일 경우, 각 알고리즘별로 기 설정된 그림자 세기의 임계 값을 확인하여, 프레임 화소 분석 알고리즘에 기 설정된 그림자 세기의 임계 값이 10일 경우, 상기 임계 값 이상인 그림자 세기이므로, 프레임 화소 분석 알고리즘에 가중치를 부여한다. 또한, 주변 환경 정보의 변화량을 분석한 결과, 광량 변화량이 100이며, 각 알고리즘별로 기 설정된 광량 변화량의 임계 값을 확인하여 벡터 내적 분석 알고리즘에 기 설정된 광량 변화량의 임계 값이 90일 경우, 상기 임계 값 이상인 광량 변화량이므로, 벡터 내적 분석 알고리즘에 가중치를 부여한다. 그리고, 가중치가 부여된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하고, 가중치가 높거나 가중치가 소정의 기준보다 높은 그림자 후보 픽셀 (2,2), (2,3), (3,2), (3,3), (4,2), (4,3)을 최종 그림자 픽셀로 결정할 수 있다.More specifically, the shadow removal unit 30 first compares the surrounding environment information of the currently input image frame and the surrounding environment information of the previous image frame, and the shadow extracted according to the algorithm used through the amount of change in the surrounding environment information. A weight is applied to each of the candidate pixels. Here, the amount of change in the surrounding environment information is information that can be analyzed based on a shadow pixel distribution map and a histogram, and may be, for example, a change amount of the intensity and light amount of the shadow. For a more specific example, the size of the current image frame is 4x4, the shadow candidate pixels extracted using the color and illuminance analysis algorithm are (2,1), (2,2), and the vector dot product analysis algorithm is used. The extracted shadow candidate pixels are (2,2), (2,3), the extracted shadow candidate pixels using the boundary distribution analysis algorithm are (3,2), (3,3), and the frame pixel analysis algorithm It is assumed that the shadow candidate pixels extracted by using are (3,2), (3,3), (4,2), (4,3). And as a result of analyzing the amount of change in the surrounding environment information, if the shadow intensity is 20, for example, by checking the threshold of the shadow intensity preset for each algorithm, the threshold of the shadow intensity preset in the frame pixel analysis algorithm is 10 days. In this case, since the shadow intensity is equal to or greater than the threshold value, a weight is given to the frame pixel analysis algorithm. In addition, as a result of analyzing the amount of change in the surrounding environment information, when the amount of change in the amount of light is 100, and the threshold value of the amount of change in the amount of light preset for each algorithm is checked, and the threshold value of the amount of change in the amount of light preset in the vector dot product analysis algorithm is 90, the threshold Since the amount of light change is greater than or equal to the value, a weight is given to the vector dot product analysis algorithm. In addition, a weight is applied to each of the extracted shadow candidate pixels according to the weighted algorithm, and the shadow candidate pixels (2,2), (2,3), (3,) having a higher weight or higher weight than a predetermined criterion. 2), (3,3), (4,2), (4,3) can be determined as final shadow pixels.

이러한 분석 알고리즘별로 가중치는 주변 환경 정보의 변화량이 따라 강한 그림자 환경, 강한 광량 환경에서는 컬러 및 조도 분석 및 벡터 내적 분석 알고리즘의 가중치가 높게 지정될 수 있으며, 약한 그림자 환경, 약한 광량 환경에서는 프레임 화소 분석 알고리즘의 가중치가 높게 지정될 수 있으며, 애매한 환경에서는 경계 분포 분석 알고리즘의 가중치가 높게 지정될 수 있다. The weight for each of these analysis algorithms can be assigned a high weight for the color and illuminance analysis and vector dot product analysis algorithm in a strong shadow environment, depending on the amount of change in surrounding environment information, and in a strong light environment, and frame pixel analysis in a weak shadow environment and weak light environment. The algorithm may have a high weight, and in an ambiguous environment, the boundary distribution analysis algorithm may have a high weight.

반면, 이전 영상 프레임이 존재하지 않는 최초 영상 프레임이 경우, 주변 환경 정보의 변화량 분석의 정확도가 떨어질 수 있으므로, 이 경우, 각 분석 알고리즘에 따라 추출된 그림자 후보 픽셀 간의 겹침 정도를 분석하고, 겹침 횟수가 가장 높은 그림자 후보 픽셀을 최종 그림자 픽셀로 결정할 수도 있다. 전술한 예에서, (2,2), (3,2), (3,3)을 최종 그림자 픽셀로 결정할 수도 있다. On the other hand, in the case of the first image frame in which no previous image frame exists, the accuracy of the analysis of the amount of change in the surrounding environment information may be degraded. In this case, the degree of overlap between shadow candidate pixels extracted according to each analysis algorithm is analyzed, and the number of overlaps The shadow candidate pixel having the highest value may be determined as the final shadow pixel. In the above example, (2,2), (3,2), (3,3) may be determined as the final shadow pixel.

그림자 제거부(30)는 이러한 과정을 거쳐 최종 그림자 픽셀을 결정하고, 결정된 그림자 픽셀을 전경 영역에서 제거하게 된다. The shadow removal unit 30 determines the final shadow pixel through this process, and removes the determined shadow pixel from the foreground area.

후처리부(40)는 그림자 제거부(30)를 통해 그림자가 제거된 전경 영역에서의 손실을 보완하는 역할을 수행한다. 다시 말해, 물체와 그림자가 섞여 있는 환경에서 그림자를 제거하다 보면 부득이하게 물체에 해당하는 픽셀의 손실이 발생될 수 있는데, 후처리부(40)에서는 그림자 제거 중 오류로 인한 영역에 대한 채우기 기법 등을 적용하여 영상을 보정하게 된다.The post-processing unit 40 serves to compensate for loss in the foreground area from which the shadow has been removed through the shadow removal unit 30. In other words, if a shadow is removed in an environment where an object and a shadow are mixed, loss of pixels corresponding to the object may inevitably occur. In the post-processing unit 40, a fill technique for the area due to an error during shadow removal is performed. It is applied to correct the image.

이러한 과정을 거쳐 영상 프레임에서의 그림자를 제거할 수 있으며, 추후 그림자가 제거된 전경 영역의 물체에 대한 감시 및 추적이 보다 용이하게 이뤄질 수 있게 된다. Through this process, the shadow from the image frame can be removed, and the object in the foreground area from which the shadow has been removed can be monitored and tracked more easily.

이상으로 본 발명의 실시 예에 따른 그림자 제거 장치(100)의 주요 구성 및 동작 방법에 대해 설명하였다. 그러나 도 2를 통해 도시된 구성요소가 모두 필수 구성요소인 것은 아니며, 도시된 구성요소보다 많은 구성 요소에 의해 그림자 제거 장치(100)가 구현될 수 있고, 그 보다 적은 구성 요소에 의해 그림자 제거 장치(100)가 구현될 수도 있다. 예를 들어, 본 발명의 일 실시 예에서는 각 프레임에 대한 정보 및 그림자가 제거된 프레임에 대한 정보가 도 1을 통해 도시된 저장 장치(400)에 저장되고 관리되는 것을 예로 들어 설명하였으나, 이에 한정되는 것은 아니며 그림자 제거 장치(100)의 일 구성 요소로 존재할 수도 있다. In the above, the main configuration and operation method of the shadow removal apparatus 100 according to an embodiment of the present invention have been described. However, not all of the components shown through FIG. 2 are essential components, and the shadow removal device 100 may be implemented by more components than the shown components, and the shadow removal device by fewer components. 100 may be implemented. For example, in an embodiment of the present invention, information on each frame and information on a frame from which a shadow has been removed have been described as an example that is stored and managed in the storage device 400 illustrated in FIG. 1. It is not possible and may exist as a component of the shadow removal device 100.

또한, 본 발명의 그림자 제거 장치(100)를 구성하는 각 요소들을 그림자 제거 순서의 흐름에 따라 배치하였으나, 이에 한정되는 것이 아님을 명시해야 한다. In addition, although the elements constituting the shadow removal apparatus 100 of the present invention are arranged according to the flow of the shadow removal sequence, it should be clarified that the present invention is not limited thereto.

비록 본 명세서와 도면에서는 예시적인 장치 구성을 기술하고 있지만, 본 명세서에서 설명하는 기능적인 동작과 주제의 구현물들은 다른 유형의 디지털 전자 회로로 구현되거나, 본 명세서에서 개시하는 구조 및 그 구조적인 등가물들을 포함하는 컴퓨터 소프트웨어, 펌웨어 혹은 하드웨어로 구현되거나, 이들 중 하나 이상의 결합으로 구현 가능하다. 본 명세서에서 설명하는 주제의 구현물들은 하나 이상의 컴퓨터 프로그램 제품, 다시 말해 본 발명에 따른 장치의 동작을 제어하기 위하여 혹은 이것에 의한 실행을 위하여 유형의 프로그램 저장매체 상에 인코딩된 컴퓨터 프로그램 명령에 관한 하나 이상의 모듈로서 구현될 수 있다. 컴퓨터로 판독 가능한 매체는 기계로 판독 가능한 저장 장치, 기계로 판독 가능한 저장 기판, 메모리 장치, 기계로 판독 가능한 전파형 신호에 영향을 미치는 물질의 조성물 혹은 이들 중 하나 이상의 조합일 수 있다.Although the present specification and drawings describe exemplary device configurations, the functional operations and implementations of the subject described in this specification may be implemented with other types of digital electronic circuits, or the structures disclosed herein and structural equivalents thereof. It may be implemented with computer software, firmware, or hardware, or may be implemented by a combination of one or more of them. Implementations of the subject matter described in this specification are one or more computer program products, that is, one relating to computer program instructions encoded on a tangible program storage medium for execution by or for controlling the operation of a device according to the invention. It can be implemented as the above module. The computer-readable medium may be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of materials that affect a machine-readable radio wave signal, or a combination of one or more of them.

이하, 본 발명의 실시 예에 다른 영상 인식을 위한 그림자 제거 방법에 대해 설명하도록 한다. Hereinafter, a method of removing a shadow for image recognition according to an embodiment of the present invention will be described.

도 3은 본 발명의 실시 예에 따른 영상 인식을 위한 그림자 제거 방법을 설명하기 위한 흐름도이다. 3 is a flowchart illustrating a shadow removal method for image recognition according to an embodiment of the present invention.

도 3을 참조하면, 본 발명의 그림자 제거 장치(100)는 먼저, 연속되는 영상 프레임이 입력되면, 현재 영상 프레임을 전경 영역 및 배경 영역으로 분리한다(S110). 이때, 그림자 제거 장치(100)는 각 영상 프레임 내의 움직임에 따른 픽셀의 특성 변화를 분석하여 영상 프레임에서 전경 영역 및 배경 영역으로 분리할 수 있으며, 이외 영상 프레임을 전경 영역 및 배경 영역으로 분리하기 위한 공지된 다양한 구성을 적용할 수 있다. Referring to FIG. 3, when a continuous image frame is input, the shadow removal apparatus 100 of the present invention separates a current image frame into a foreground region and a background region (S110). At this time, the shadow removal apparatus 100 may analyze the characteristic change of the pixel according to the motion in each image frame to separate the image frame into a foreground region and a background region, and separate image frames into a foreground region and a background region. Various known configurations can be applied.

이때, 분리된 전경 영역은 인식하고자 하는 물체뿐 아니라 그림자를 포함하고 있을 수 있으므로, 전경 영역에서 그림자를 제거하기 위해, 영상 프레임, 전경 영역 및 배경 영역을 대상으로 컬러 및 조도 분석, 벡터 내적 분석, 경계 분포 분석, 프레임 화소 분석의 하나 이상의 그림자 제거를 위한 알고리즘을 이용하여 분석을 수행한다(S120). 이러한 그림자 제거를 위한 알고리즘에 따라 그림자 후보 픽셀을 먼저 추출하고(S130), 이용된 분석 기법, 즉 알고리즘에 따라 각 그림자 후보 픽셀별로 가중치를 적용하며(S140), 최종 그림자 픽셀을 결정한 후(S150), 결정된 최종 그림자 픽셀을 전경 영역에서 제거할 수 있게 된다(S160). At this time, since the separated foreground area may include a shadow as well as an object to be recognized, color and illumination analysis, vector dot product analysis, targeting the image frame, foreground area, and background area, in order to remove the shadow from the foreground area. Analysis is performed using an algorithm for removing one or more shadows of boundary distribution analysis and frame pixel analysis (S120). A shadow candidate pixel is first extracted according to the algorithm for shadow removal (S130), a weight is applied for each shadow candidate pixel according to the used analysis technique, that is, the algorithm (S140), and a final shadow pixel is determined (S150). , It is possible to remove the determined final shadow pixel from the foreground area (S160).

이하, 본 발명의 실시 예에 따른 영상 인식을 위한 그림자 제거 방법에 대해 도 4 내지 도 8을 참조하여 보다 구체적으로 설명하도록 한다. Hereinafter, a shadow removal method for image recognition according to an embodiment of the present invention will be described in more detail with reference to FIGS. 4 to 8.

도 4는 본 발명의 실시 예에 따른 영상 인식을 위한 그림자 제거 방법을 보다 구체적으로 설명하기 위한 흐름도이며, 도 5 내지 도 8은 본 발명의 실시 예에 따른 그림자 제거를 위한 알고리즘의 처리 과정을 설명하기 위한 흐름도이다. 4 is a flowchart illustrating a shadow removal method for image recognition according to an embodiment of the present invention in more detail, and FIGS. 5 to 8 illustrate a processing process of an algorithm for shadow removal according to an embodiment of the present invention. This is a flow chart for

먼저, 도 4를 참조하면, 도 1을 통해 도시한 영상 수신 장치(100)를 통해 연속되는 영상 프레임이 수신되면(S200), 그림자 제거 장치(100)는 그림자 제거 및 영상 인식의 효율을 보다 높이기 위해 먼저 전처리 과정을 수행한다(S300). 예컨대, 그림자 제거 장치(100)는 영상 내 존재하는 잡음 제거, 컬러 보정, 감마 보정 등을 수행할 수 있다. First, referring to FIG. 4, when a continuous image frame is received through the image receiving device 100 shown in FIG. 1 (S200), the shadow removal device 100 further enhances the efficiency of shadow removal and image recognition. First, a pre-processing process is performed (S300). For example, the shadow removal apparatus 100 may perform noise removal, color correction, gamma correction, and the like existing in an image.

그리고, 그림자 제거 장치(100)는 전처리 과정이 수행된 영상 프레임 내에서 움직임에 따른 각 픽셀의 특성 변화를 분석하여 상기 영상 프레임을 전경 영역 및 배경 영역으로 분리하게 된다(S400). 예를 들어 그림자 제거 장치(100)는 소정의 개수의 가우시안 노드(Gaussian Node)를 포함하는 픽셀 중 가우시안 노드에 대한 가중치(Weight)가 소정의 기준보다 큰 복수 개의 노드를 배경 픽셀로 지정하고, 지정된 배경 픽셀을 기준으로 영상 프레임 내에서 전경 픽셀을 판별한 후 판별된 전경 픽셀을 이용하여 전경 영역을 분리하게 된다. 또한, 그림자 제거 장치(100)는 통계 모델 또는 가우시안 혼합 모델(GMM; Gaussian Mixture Model) 등과 같은 특정 알고리즘에 따라 배경 모델을 생성하고, 배경 모델을 토대로 전경 영역 및 배경 영역을 분리할 수도 있다. In addition, the shadow removal apparatus 100 separates the image frame into a foreground region and a background region by analyzing a change in characteristics of each pixel according to movement in the image frame on which the preprocessing process has been performed (S400). For example, the shadow removal apparatus 100 designates a plurality of nodes having a weight greater than a predetermined criterion among pixels including a predetermined number of Gaussian nodes as background pixels, and After determining the foreground pixel in the image frame based on the background pixel, the foreground region is separated using the determined foreground pixel. In addition, the shadow removal apparatus 100 may generate a background model according to a specific algorithm such as a statistical model or a Gaussian Mixture Model (GMM), and may separate the foreground region and the background region based on the background model.

분리된 전경 영역은 사람, 자동차 등과 같이 인식 및 추적하고자 하는 물체를 포함한다. 그러나, 전경 영역은 인식 및 추적하고자 하는 물체 이외 그림자도 같이 물체로 인식하여 분리되게 되는 데, 이는 전술한 바와 같이 전경 및 배경 영역을 분리하는 기법이 현재 프레임과 이전 프레임의 화소 변화 정도 등을 기반으로 분리하기 때문에, 영상 내 물체와 같이 움직이는 그림자도 물체의 일부분으로 인식함으로써 발생되게 된다. The separated foreground area includes objects to be recognized and tracked, such as people and cars. However, the foreground area is separated by recognizing shadows as well as objects other than the object to be recognized and tracked. This is because, as described above, the technique of separating the foreground and background areas is based on the degree of pixel change between the current frame and the previous frame. Because of the separation, shadows that move like objects in the image are also generated by recognizing them as part of the object.

따라서, 전경 영역 내에 포함되는 그림자를 제거하는 과정이 필수적으로 이뤄져야 한다. 이를 위해, 먼저, 전경 영역에 대한 이진화 또는 잡음 제거 등 전경 영역에 대한 전처리 과정을 수행할 수 있다(S500). 그리고, 이진화를 포함하는 전처리 과정이 수행된 전경 영역, 영상 프레임에서 분리된 배경 영역 그리고 원본에 해당하는 전처리 과정이 끝난 상태의 영상 프레임을 대상으로 기 정해진 방식의 그림자 제거를 위한 알고리즘을 이용하여 분석을 수행하고 이에 따라 그림자 후보 픽셀을 추출하게 된다(S600 ~ S700). 여기서, 기 정해진 방식의 그림자 제거를 위한 알고리즘은 컬러 및 조도 분석, 벡터 내적 분석, 경계 분포 분석, 프레임 화소 분석 알고리즘이 될 수 있다. Therefore, the process of removing the shadow included in the foreground area must be performed. To this end, first, a pre-processing process for the foreground region such as binarization or noise removal for the foreground region may be performed (S500). And, the foreground area in which the pre-processing process including binarization has been performed, the background area separated from the image frame, and the image frame after the pre-processing process corresponding to the original are analyzed using an algorithm for shadow removal in a predetermined manner. Then, shadow candidate pixels are extracted accordingly (S600 to S700). Here, the algorithm for removing the shadow of a predetermined method may be color and illuminance analysis, vector dot product analysis, boundary distribution analysis, and frame pixel analysis algorithm.

먼저 컬러 및 조도 분석 알고리즘은 전경 영역 및 배경 영역의 색상 및 밝기에 따라 그림자 후보 픽셀을 추출할 수 있는 알고리즘으로, RGB 색상 시스템에서 그림자와 배경 영역 간에는 색상 및 채도 변화량은 적지만 밝기 변화량은 크며, 그림자는 일반적으로 어두운 색을 나타내는 특징으로 전경 영역에서 그림자의 후보가 되는 픽셀을 결정하는 방식이다.First, the color and illuminance analysis algorithm is an algorithm that can extract shadow candidate pixels according to the color and brightness of the foreground and background areas.In the RGB color system, the amount of change in color and saturation between the shadow and the background area is small, but the amount of change in brightness is large. Shadows are generally dark colors and are a method of determining pixels that are candidates for shadows in the foreground area.

이에 대해 도 5를 참조하여 설명하면, 컬러 및 조도 분석 알고리즘에 다라 그림자 후보 픽셀을 추출하기 위해, 먼저, 그림자 제거 장치(100)는 전경 영역 및 배경 영역을 대상으로 RGB 색상 좌표계를 HSV 색상 좌표계로 변환한다(S610). 그리고, 그림자 제거 장치(100)는 변환된 전경 영역 및 배경 영역에서 명도 값을 기준으로 어두운 영역을 검출한다(S611).This will be described with reference to FIG. 5, in order to extract shadow candidate pixels according to the color and illuminance analysis algorithm, first, the shadow removal device 100 uses the RGB color coordinate system as the HSV color coordinate system for the foreground area and the background area. Convert (S610). In addition, the shadow removal apparatus 100 detects a dark area based on a brightness value in the converted foreground area and background area (S611).

그리고, 그림자 제거 장치(100)는 전경 영역의 어두운 영역 및 상기 배경 영역의 어두운 영역을 대상으로 채도 비교를 통해 기 설정된 임계치 이상의 픽셀을 그림자 후보 픽셀로 1차 추출한다(S612). 이때, 그림자 제거 장치(100)는 히스토그램 비교 분석에 따라 색상 및 채도 값을 비교하여 그림자 후보 픽셀을 1차 추출할 수 있게 된다.In addition, the shadow removal apparatus 100 first extracts a pixel having a predetermined threshold value or higher as a shadow candidate pixel through a saturation comparison for a dark area in the foreground area and a dark area in the background area (S612). In this case, the shadow removal apparatus 100 may first extract a shadow candidate pixel by comparing hue and saturation values according to the histogram comparison analysis.

이후, 그림자 제거 장치(100)는 배경 영역 및 전경 영역에서 1차 추출된 그림자 후보 픽셀을 대상으로 명도 변화량을 분석하고(S613), 명도 변화량이 상기 기 설정된 값 이내에 존재하는 픽셀을 최종 그림자 후보 픽셀로 추출하게 된다(S614). Thereafter, the shadow removal apparatus 100 analyzes the amount of change in brightness targeting the shadow candidate pixels first extracted from the background area and the foreground area (S613), and selects a pixel whose brightness change amount is within the preset value as a final shadow candidate pixel. It is extracted with (S614).

반면, 벡터 내적 분석 알고리즘은 일정 크기의 윈도우 상에 존재하는 픽셀의 움직임 벡터에 따라 그림자 후보 픽셀을 추출할 수 있는 알고리즘이다. 컬러 및 조도 분석 알고리즘은 개별 픽셀의 변화 정도를 측정하고 이에 따라 그림자 후보 픽셀을 추출하는 방식인 반면, 벡터 내적 분석 알고리즘은 일정 크기의 윈도우를 먼저 설정함으로써, 개별 픽셀들의 집합인 그룹(region)별로 변화 정도를 측정하고 이에 따라 그림자 후보 픽셀을 추출하는 방식으로, 컬러 및 조도 분석 알고리즘을 상호 보완할 수 있는 알고리즘이다. On the other hand, the vector dot product analysis algorithm is an algorithm capable of extracting a shadow candidate pixel according to a motion vector of a pixel existing on a window of a predetermined size. The color and illuminance analysis algorithm measures the degree of change of individual pixels and extracts shadow candidate pixels accordingly, while the vector dot product analysis algorithm sets a window of a certain size first, so that each region is a set of individual pixels. It is an algorithm that can complement color and illuminance analysis algorithms by measuring the degree of change and extracting shadow candidate pixels accordingly.

벡터 내적 분석 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 과정에 대해 도 6을 참조하여 설명하면, 먼저, 그림자 제거 장치(100)는 배경 영역 및 전경 영역을 대상으로 일정 크기의 윈도우(window)를 설정한다(S620). 여기서 일정 크기는 표시 장치의 해상도와 같은 시스템의 성능에 따라 변경될 수 있다. 또한 사용자에 의해 직접 설정될 수도 있다. 그리고, 배경 영역에서의 윈도우 내의 픽셀과 상기 전경 영역에서의 상기 윈도우 내의 픽셀의 벡터 값의 내적(inner product)을 산출한다(S621). 예를 들어, 설정된 윈도우 내의 픽셀의 평균, 최대값, 최소값 등의 변화량을 픽셀의 대한 벡터 값을 산출하게 된다. 그림자 제거 장치(100)는 배경 영역에서의 내적과 상기 전경 영역에서의 내적을 비교하여(S622), 벡터 값의 변화량이 기 설정된 임계치 이상의 픽셀을 그림자 후보 픽셀로 추출하게 된다(S623).A process of extracting a shadow candidate pixel using a vector dot product analysis algorithm will be described with reference to FIG. 6. First, the shadow removal apparatus 100 sets a window of a predetermined size for the background area and the foreground area. Do (S620). Here, the predetermined size may be changed according to system performance such as the resolution of the display device. It can also be set directly by the user. Then, the inner product of the vector values of the pixel in the window in the background area and the pixel in the window in the foreground area is calculated (S621). For example, a vector value of a pixel is calculated from the amount of change, such as an average, a maximum value, and a minimum value, of a pixel in a set window. The shadow removal apparatus 100 compares the dot product in the background area with the dot product in the foreground area (S622), and extracts a pixel with a change amount of a vector value equal to or greater than a preset threshold as a shadow candidate pixel (S623).

반면, 경계 분포 분석 알고리즘은 픽셀의 변화 정도가 아닌 전경 영역의 에지의 중심을 구하고, 그림자 방향을 획득한 후 기준 거리 이상의 픽셀을 그림자로 가정하여 그림자의 후보 픽셀을 추출할 수 있는 방식이다. 경계 분포 분석 알고리즘은 그림자는 물체에 가려져 생기는 것으로 물체 크기를 기준으로 일정 거리 이상에서 생기는 원리를 이용하는 알고리즘 방식이다. On the other hand, the boundary distribution analysis algorithm is a method that obtains the center of the edge of the foreground region rather than the degree of change of the pixel, obtains the shadow direction, and then extracts the candidate pixel of the shadow by assuming a pixel equal to or greater than the reference distance as a shadow. The boundary distribution analysis algorithm is an algorithm method that uses the principle that shadows are hidden by an object and occur at a certain distance or more based on the size of the object.

경계 분포 분석 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 과정에 대해 도 7을 참조하여 설명하면, 먼저, 그림자 제거 장치(100)는 전경 영역에 대한 수직 히스토그램을 생성한다(S630). 그리고, 생성된 수직 히스토그램을 이용하여 가장 높은 값을 가지는 x축의 범위를 중심축으로 설정한다(S631). 여기서, 중심축은 그림자의 방향을 판단하기 위한 기준으로 사용되는 것으로, 일반적으로 사람의 경우 머리 위치가 중심축이 될 수 있으므로, 전술한 바와 같이 수직 히스토그램에서 가장 높은 값을 가지는 x축의 범위를 중심축으로 설정하게 된다.A process of extracting a shadow candidate pixel using a boundary distribution analysis algorithm will be described with reference to FIG. 7. First, the shadow removal apparatus 100 generates a vertical histogram for a foreground area (S630). Then, the range of the x-axis having the highest value is set as the central axis by using the generated vertical histogram (S631). Here, the central axis is used as a criterion for determining the direction of the shadow. In general, the head position can be the central axis in the case of a person, so the range of the x-axis having the highest value in the vertical histogram is the central axis. Is set to.

또한, 수직 히스토그램의 가장 높은 값은 상황에 따라 변할 수도 있으므로, 그림자 제거 장치(100)는 수직 히스토그램을 일정 개수의 블록으로 나누어서 블록별 히스토그램 평균치가 높은 블록 영역을 중심축으로 결정할 수도 있다. Also, since the highest value of the vertical histogram may change depending on the situation, the shadow removal apparatus 100 may divide the vertical histogram into a predetermined number of blocks and determine a block area having a high average histogram value for each block as a central axis.

그림자 제거 장치(100)는 이후, 중심축을 기준으로 일정 반경 내 픽셀 명도 값을 분석하여 그림자의 방향을 예측하고(S632), 그림자 방향이 예측되면, 상기 중심축에서 그림자 방향으로 일정 거리 이상의 픽셀을 그림자 후보 픽셀로 추출하게 된다(S633). 여기서, 그림자 방향으로 일정 거리는 사람의 크기를 고려하여 설정될 수 있다. 이때, 사람의 크기를 고려하여 사용자가 직접 설정하거나, 자동으로 설정될 수 있다. Subsequently, the shadow removal apparatus 100 predicts the direction of the shadow by analyzing the pixel brightness value within a certain radius based on the central axis (S632), and when the shadow direction is predicted, a pixel of a predetermined distance or more from the central axis to the shadow direction. It is extracted as a shadow candidate pixel (S633). Here, a certain distance in the shadow direction may be set in consideration of the size of a person. In this case, the user may directly set it or set automatically in consideration of the size of the person.

반면, 프레임 변화 분석 알고리즘은 전경 영역 및 배경 영역이 아닌 현재 프레임과 이전 프레임의 전체 영상에 대한 픽셀 변화율에 따라 영상의 픽셀을 보정하고, 보정된 픽셀을 그림자 후보 픽셀로 추출할 수 있는 방식이다.On the other hand, the frame change analysis algorithm corrects the pixels of an image according to the pixel change rate of the entire image of the current frame and the previous frame, not the foreground area and the background area, and extracts the corrected pixels as shadow candidate pixels.

본 발명의 실시 예에 따른 프레임 변화 분석 알고리즘에 따른 그림자 후보 픽셀 추출 과정에 대해 도 8을 참조하여 설명하면, 그림자 제거 장치(100)는 먼저, 전경 및 배경 영역이 분리되기 이전의 원본인 영상 프레임에서 조명 성분을 추출한다(S640). 이때, 그림자 제거 장치(100)는 저역 통과 필터를 사용하여 조명 성분을 추출할 수 있다. 그리고, 그림자 제거 장치(100)는 조명 성분을 이용하여 반사 성분을 생성할 수 있다(S641). 이때, 그림자 제거 장치(100)는 영상 프레임과 추출된 조명 성분 각각에 로그 연산을 취한 뒤 그 차를 구함으로써 반사 성분을 생성하게 된다. 그리고, 그림자 제거 장치(100)는 반사 성분의 값을 이용하여 어두운 영역을 보정하고(S642), 어두원 영역이 보정된 픽셀을 그림자 후보 픽셀로 추출하게 된다(S643).Referring to FIG. 8, a shadow candidate pixel extraction process according to a frame change analysis algorithm according to an embodiment of the present invention will be described with reference to FIG. 8, in which the shadow removal apparatus 100 is firstly used as an original image frame before the foreground and background regions are separated. The lighting component is extracted from (S640). In this case, the shadow removal apparatus 100 may extract the lighting component using a low-pass filter. In addition, the shadow removal apparatus 100 may generate a reflection component by using the lighting component (S641). In this case, the shadow removal apparatus 100 generates a reflection component by calculating a logarithmic operation on each of the image frame and the extracted lighting component and then calculating the difference therebetween. Then, the shadow removal apparatus 100 corrects the dark area using the value of the reflection component (S642), and extracts a pixel whose dark circle area is corrected as a shadow candidate pixel (S643).

다시 도 4를 참조하여, 상술한 과정을 거쳐 그림자 후보 픽셀이 추출되면(S700), 그림자 제거 장치(100)는 최종 그림자 픽셀을 결정하게 된다(S800). 이때, 그림자 후보 픽셀 추출에 적용된 알고리즘이 1개 일 경우, 추출된 그림자 후보 픽셀 모두를 최종 그림자 픽셀로 결정할 수 있으며, 그림자 후보 픽셀 추출에 적용된 알고리즘이 두 개 이상일 경우, 각 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하고, 가중치에 따라 특정 그림자 후보 픽셀만을 최종 그림자 픽셀로 결정할 수도 있다. Referring back to FIG. 4, when a shadow candidate pixel is extracted through the above-described process (S700), the shadow removal apparatus 100 determines a final shadow pixel (S800). At this time, if there is one algorithm applied to the shadow candidate pixel extraction, all of the extracted shadow candidate pixels can be determined as the final shadow pixels, and if there are two or more algorithms applied to the shadow candidate pixel extraction, the shadow extracted according to each algorithm A weight may be applied to each of the candidate pixels, and only a specific shadow candidate pixel may be determined as a final shadow pixel according to the weight.

보다 구체적으로 설명하면, 그림자 제거 장치(100)는 먼저, 현재 입력된 영상 프레임의 주변 환경 정보 이전 영상 프레임의 주변 환경 정보를 비교하고, 주변 환경 정보의 변화량을 통해 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하게 된다. 여기서, 주변 환경 정보의 변화량은 그림자 픽셀 분포도, 히스토그램을 기초로 분석될 수 있는 정보로 예컨대, 그림자의 세기 및 광량 변화량이 될 수 있다. 보다 구체적인 예를 들면, 현재 영상 프레임의 크기가 4x4 크기이며, 컬러 및 조도 분석 알고리즘을 이용하여 추출된 그림자 후보 픽셀이 (2,1), (2,2)이고, 벡터 내적 분석 알고리즘을 이용하여 추출된 그림자 후보 픽셀이 (2,2), (2,3)이고, 경계 분포 분석 알고리즘을 이용하여 추출된 그림자 후보 픽셀이 (3,2), (3,3)이고, 프레임 화소 분석 알고리즘을 이용하여 추출된 그림자 후보 픽셀이 (3,2), (3,3), (4,2), (4,3)이라 가정한다. 그리고 주변 환경 정보의 변화량을 분석한 결과, 그림자 세기가 예를 들어 20 일 경우, 각 알고리즘별로 기 설정된 그림자 세기의 임계 값을 확인하여, 프레임 화소 분석 알고리즘에 기 설정된 그림자 세기의 임계 값이 10일 경우, 상기 임계 값 이상인 그림자 세기이므로, 프레임 화소 분석 알고리즘에 가중치를 부여한다. 또한, 주변 환경 정보의 변화량을 분석한 결과, 광량 변화량이 100이며, 각 알고리즘별로 기 설정된 광량 변화량의 임계 값을 확인하여 벡터 내적 분석 알고리즘에 기 설정된 광량 변화량의 임계 값이 90일 경우, 상기 임계 값 이상인 광량 변화량이므로, 벡터 내적 분석 알고리즘에 가중치를 부여한다. 그리고, 가중치가 부여된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하고, 가중치가 높은 그림자 후보 픽셀 (2,2), (2,3), (3,2), (3,3), (4,2), (4,3)을 최종 그림자 픽셀로 결정할 수 있다.More specifically, the shadow removal apparatus 100 first compares the surrounding environment information of the currently input image frame and the surrounding environment information of the previous image frame, and the shadow extracted according to the algorithm used through the amount of change in the surrounding environment information. A weight is applied to each of the candidate pixels. Here, the amount of change in the surrounding environment information is information that can be analyzed based on a shadow pixel distribution map and a histogram, and may be, for example, a change amount of the intensity and light amount of the shadow. For a more specific example, the size of the current image frame is 4x4, the shadow candidate pixels extracted using the color and illuminance analysis algorithm are (2,1), (2,2), and the vector dot product analysis algorithm is used. The extracted shadow candidate pixels are (2,2), (2,3), the extracted shadow candidate pixels using the boundary distribution analysis algorithm are (3,2), (3,3), and the frame pixel analysis algorithm It is assumed that the shadow candidate pixels extracted by using are (3,2), (3,3), (4,2), (4,3). And as a result of analyzing the amount of change in the surrounding environment information, if the shadow intensity is 20, for example, by checking the threshold of the shadow intensity preset for each algorithm, the threshold of the shadow intensity preset in the frame pixel analysis algorithm is 10 days. In this case, since the shadow intensity is equal to or greater than the threshold value, a weight is given to the frame pixel analysis algorithm. In addition, as a result of analyzing the amount of change in the surrounding environment information, when the amount of change in the amount of light is 100, and the threshold value of the amount of change in the amount of light preset for each algorithm is checked, Since the amount of light change is greater than or equal to the value, a weight is given to the vector dot product analysis algorithm. Then, a weight is applied to each of the extracted shadow candidate pixels according to the weighted algorithm, and the shadow candidate pixels with high weight (2,2), (2,3), (3,2), (3,3) , (4,2), (4,3) can be determined as final shadow pixels.

이러한 분석 알고리즘별로 가중치는 주변 환경 정보의 변화량이 따라 강한 그림자 환경, 강한 광량 환경에서는 컬러 및 조도 분석 및 벡터 내적 분석 알고리즘의 가중치가 높게 지정될 수 있으며, 약한 그림자 환경, 약한 광량 환경에서는 프레임 화소 분석 알고리즘의 가중치가 높게 지정될 수 있으며, 애매한 환경에서는 경계 분포 분석 알고리즘의 가중치가 높게 지정될 수 있다. The weight for each of these analysis algorithms can be assigned a high weight for the color and illuminance analysis and vector dot product analysis algorithm in a strong shadow environment, depending on the amount of change in surrounding environment information, and in a strong light environment, and frame pixel analysis in a weak shadow environment and weak light environment. The algorithm may have a high weight, and in an ambiguous environment, the boundary distribution analysis algorithm may have a high weight.

반면, 이전 영상 프레임이 존재하지 않는 최초 영상 프레임이 경우, 주변 환경 정보의 변화량 분석의 정확도가 떨어질 수 있으므로, 이 경우, 각 분석 알고리즘에 따라 추출된 그림자 후보 픽셀 간의 겹침 정도를 분석하고, 겹침 횟수가 가장 높은 그림자 후보 픽셀을 최종 그림자 픽셀로 결정할 수도 있다. 전술한 예에서, (2,2), (3,2), (3,3)을 최종 그림자 픽셀로 결정할 수도 있다. On the other hand, in the case of the first image frame in which no previous image frame exists, the accuracy of the analysis of the amount of change in the surrounding environment information may be degraded. In this case, the degree of overlap between shadow candidate pixels extracted according to each analysis algorithm is analyzed, and the number of overlaps The shadow candidate pixel having the highest value may be determined as the final shadow pixel. In the above example, (2,2), (3,2), (3,3) may be determined as the final shadow pixel.

그림자 제거 장치(100)는 이러한 과정을 거쳐 최종 그림자 픽셀을 결정하고, 결정된 그림자 픽셀을 전경 영역에서 제거하게 된다(S900). 그리고, 그림자 픽셀이 제거된 전경 영역 및 배경 영역, 원본 영상 프레임을 이전 프레임에 대한 정보로 저장(S1000)함으로써, 다음 프레임에서 최종 그림자 픽셀 추출 과정에 활용될 수 있도록 하게 된다. The shadow removal apparatus 100 determines a final shadow pixel through such a process, and removes the determined shadow pixel from the foreground area (S900). The foreground area, background area, and the original image frame from which the shadow pixels have been removed are stored as information on the previous frame (S1000), so that they can be used in the final shadow pixel extraction process in the next frame.

이후, 그림자 제거 장치(100)는 그림자가 제거된 전경 영역에서의 손실을 보완하는 역할을 수행한다. 다시 말해, 물체와 그림자가 섞여 있는 환경에서 그림자를 제거하다 보면 부득이하게 물체에 해당하는 픽셀의 손실이 발생될 수 있는데, 그림자 제거 장치(100)는 그림자 제거 중 오류로 인한 영역에 대한 채우기 기법 등을 적용하여 영상을 보정하게 된다(S1100). 그리고, 그림자가 제거된 전경 영역에 대한 결과를 도 1에 도시된 표시 장치(300)로 전달하여 출력하게 된다(S1200).Thereafter, the shadow removal apparatus 100 serves to compensate for the loss in the foreground area from which the shadow has been removed. In other words, if the shadow is removed in an environment where an object and a shadow are mixed, loss of pixels corresponding to the object may inevitably occur. The shadow removal device 100 uses a method of filling the area due to an error during shadow removal. The image is corrected by applying (S1100). Then, the result of the foreground area from which the shadow is removed is transmitted to the display device 300 illustrated in FIG. 1 and outputted (S1200).

이상으로 본 발명의 실시 예에 따른 영상 인식을 위한 그림자 제거 방법에 대해 설명하였다.In the above, a shadow removal method for image recognition according to an embodiment of the present invention has been described.

상술한 바와 같은 본 발명의 영상 인식을 위한 그림자 제거 방법은 컴퓨터 프로그램 명령어와 데이터를 저장하기에 적합한 컴퓨터로 판독 가능한 매체의 형태로 제공될 수도 있다. 본 발명의 일 실시 예에 따른 영상 인식을 위한 그림자 제거 방법을 구현하기 위한 기록매체에 기록되는 프로그램은 연속되어 입력되는 각 영상 프레임을 전경 영역 및 배경 영역으로 분리하는 단계, 상기 영상 프레임, 상기 영상 프레임에서 분리된 전경 영역 및 배경 영역을 대상으로 하나 이상의 그림자 제거를 위한 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계, 상기 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하고, 적용된 가중치에 따라 그림자 후보 픽셀을 혼합하여 최종 그림자 픽셀을 결정하는 단계 및 상기 전경 영역에서 상기 결정된 그림자 픽셀을 제거하는 단계 등을 실행할 수 있다. The shadow removal method for image recognition of the present invention as described above may be provided in the form of a computer-readable medium suitable for storing computer program commands and data. A program recorded on a recording medium for implementing a shadow removal method for image recognition according to an embodiment of the present invention comprises the steps of separating each continuously input image frame into a foreground region and a background region, the image frame, and the image Extracting shadow candidate pixels using an algorithm for removing one or more shadows for the foreground and background areas separated from the frame, applying a weight to each of the extracted shadow candidate pixels according to the used algorithm, and applying a weight According to the method, a final shadow pixel may be determined by mixing shadow candidate pixels, and a step of removing the determined shadow pixel from the foreground area may be performed.

이때, 기록매체에 기록된 프로그램은 컴퓨터에서 읽히어 설치되고 실행됨으로써 전술한 기능들을 실행할 수 있다. At this time, the program recorded on the recording medium can be read, installed, and executed by a computer to execute the above-described functions.

여기서, 컴퓨터가 기록매체에 기록된 프로그램을 읽어 들여 프로그램으로 구현된 기능들을 실행시키기 위하여, 전술한 프로그램은 컴퓨터의 프로세서(CPU)가 컴퓨터의 장치 인터페이스(Interface)를 통해 읽힐 수 있는 C, C++, JAVA, 기계어 등의 컴퓨터 언어로 코드화된 코드(Code)를 포함할 수 있다. Here, in order for the computer to read the program recorded on the recording medium and execute the functions implemented as the program, the above-described program is C, C++, which can be read by the computer's processor (CPU) through the computer's device interface. It may include code coded in a computer language such as JAVA and machine language.

이러한 코드는 전술한 기능들을 정의한 함수 등과 관련된 기능적인 코드(Function Code)를 포함할 수 있고, 전술한 기능들을 컴퓨터의 프로세서가 소정의 절차대로 실행시키는데 필요한 실행 절차 관련 제어 코드를 포함할 수도 있다. 또한, 이러한 코드는 전술한 기능들을 컴퓨터의 프로세서가 실행시키는데 필요한 추가 정보나 미디어가 컴퓨터의 내부 또는 외부 메모리의 어느 위치(주소 번지)에서 참조 되어야 하는지에 대한 메모리 참조 관련 코드를 더 포함할 수 있다. 또한, 컴퓨터의 프로세서가 전술한 기능들을 실행시키기 위하여 원격(Remote)에 있는 어떠한 다른 컴퓨터나 서버 등과 통신이 필요한 경우, 코드는 컴퓨터의 프로세서가 컴퓨터의 통신 모듈을 이용하여 원격(Remote)에 있는 어떠한 다른 컴퓨터나 서버 등과 어떻게 통신해야만 하는지, 통신 시 어떠한 정보나 미디어를 송수신해야 하는지 등에 대한 통신 관련 코드를 더 포함할 수도 있다.This code may include a functional code related to a function defining the above-described functions, and may include a control code related to an execution procedure necessary for the processor of the computer to execute the above-described functions according to a predetermined procedure. In addition, these codes may further include additional information necessary for the processor of the computer to execute the above-described functions, or code related to a memory reference to which location (address address) of the internal or external memory of the computer should be referenced. . In addition, when the computer's processor needs to communicate with any other computer or server in a remote in order to execute the above-described functions, the code is used by the computer's processor using the computer's communication module. It may further include a communication-related code for how to communicate with other computers or servers, and what information or media should be transmitted and received during communication.

이러한, 컴퓨터 프로그램 명령어와 데이터를 저장하기에 적합한 컴퓨터로 판독 가능한 매체는, 예컨대 기록매체는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(Magnetic Media), CD-ROM(Compact Disk Read Only Memory), DVD(Digital Video Disk)와 같은 광 기록 매체(Optical Media), 플롭티컬 디스크(Floptical Disk)와 같은 자기-광 매체(Magneto-Optical Media), 및 롬(ROM, Read Only Memory), 램(RAM, Random Access Memory), 플래시 메모리, EPROM(Erasable Programmable ROM), EEPROM(Electrically Erasable Programmable ROM)과 같은 반도체 메모리를 포함한다. 프로세서와 메모리는 특수 목적의 논리 회로에 의해 보충되거나, 그것에 통합될 수 있다. Such computer-readable media suitable for storing computer program commands and data include, for example, magnetic media such as hard disks, floppy disks, and magnetic tapes, and compact disk read only memory (CD-ROM). , Optical Media such as DVD (Digital Video Disk), Magneto-Optical Media such as Floptical Disk, and ROM (Read Only Memory), RAM (RAM) , Random Access Memory), flash memory, EPROM (Erasable Programmable ROM), and EEPROM (Electrically Erasable Programmable ROM). The processor and memory can be supplemented by special purpose logic circuits or incorporated into it.

또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다. 그리고, 본 발명을 구현하기 위한 기능적인(Functional) 프로그램과 이와 관련된 코드 및 코드 세그먼트 등은, 기록매체를 읽어서 프로그램을 실행시키는 컴퓨터의 시스템 환경 등을 고려하여, 본 발명이 속하는 기술분야의 프로그래머들에 의해 용이하게 추론되거나 변경될 수도 있다.In addition, the computer-readable recording medium is distributed over a computer system connected through a network, so that computer-readable codes can be stored and executed in a distributed manner. In addition, a functional program for implementing the present invention, and related codes and code segments, etc., are programmers in the technical field to which the present invention pertains in consideration of the system environment of a computer that reads the recording medium and executes the program. May be easily inferred or modified by

본 명세서는 다수의 특정한 구현물의 세부사항들을 포함하지만, 이들은 어떠한 발명이나 청구 가능한 것의 범위에 대해서도 제한적인 것으로서 이해되어서는 안되며, 오히려 특정한 발명의 특정한 실시형태에 특유할 수 있는 특징들에 대한 설명으로서 이해되어야 한다. 개별적인 실시형태의 문맥에서 본 명세서에 기술된 특정한 특징들은 단일 실시형태에서 조합하여 구현될 수도 있다. 반대로, 단일 실시형태의 문맥에서 기술한 다양한 특징들 역시 개별적으로 혹은 어떠한 적절한 하위 조합으로도 복수의 실시형태에서 구현 가능하다. 나아가, 특징들이 특정한 조합으로 동작하고 초기에 그와 같이 청구된 바와 같이 묘사될 수 있지만, 청구된 조합으로부터의 하나 이상의 특징들은 일부 경우에 그 조합으로부터 배제될 수 있으며, 그 청구된 조합은 하위 조합이나 하위 조합의 변형물로 변경될 수 있다.While this specification includes details of a number of specific implementations, these should not be construed as limiting to the scope of any invention or claim, but rather as a description of features that may be peculiar to a particular embodiment of a particular invention. It must be understood. Certain features described herein in the context of separate embodiments may be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination. Furthermore, although features operate in a particular combination and may be initially described as so claimed, one or more features from a claimed combination may in some cases be excluded from the combination, and the claimed combination may be a subcombination. Or sub-combination variations.

마찬가지로, 특정한 순서로 도면에서 동작들을 묘사하고 있지만, 이는 바람직한 결과를 얻기 위하여 도시된 그 특정한 순서나 순차적인 순서대로 그러한 동작들을 수행하여야 한다거나 모든 도시된 동작들이 수행되어야 하는 것으로 이해되어서는 안 된다. 특정한 경우, 멀티태스킹과 병렬 프로세싱이 유리할 수 있다. 또한, 상술한 실시형태의 다양한 시스템 컴포넌트의 분리는 그러한 분리를 모든 실시형태에서 요구하는 것으로 이해되어서는 안되며, 설명한 프로그램 컴포넌트와 시스템들은 일반적으로 단일의 소프트웨어 제품으로 함께 통합되거나 다중 소프트웨어 제품에 패키징 될 수 있다는 점을 이해하여야 한다.Likewise, although operations are depicted in the drawings in a specific order, it should not be understood that such operations must be performed in that particular order or sequential order shown or that all illustrated operations must be performed in order to obtain a desired result. In certain cases, multitasking and parallel processing can be advantageous. In addition, separation of the various system components of the above-described embodiments should not be understood as requiring such separation in all embodiments, and the program components and systems described are generally integrated together into a single software product or packaged in multiple software products. You should understand that you can.

본 발명은 영상 인식을 위한 그림자 제거 방법에 관한 것으로, 더욱 상세하게는 연속되는 영상 프레임을 대상으로 하나 이상의 그림자 제거를 위한 알고리즘을 이용하여 그림자 후보 픽셀을 추출한 후, 상기 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 이용된 분석 기법에 따른 가중치를 적용하여 적용된 가중치에 따라 최종 그림자 픽셀을 결정한 후, 결정된 그림자 픽셀을 제거할 수 있는 영상 인식을 위한 그림자 제거 방법 및 이를 위한 그림자 제거 장치에 관한 것이다.The present invention relates to a shadow removal method for image recognition, and more particularly, a shadow candidate pixel is extracted using an algorithm for removing one or more shadows for consecutive image frames, and then extracted according to the used algorithm. A shadow removal method for image recognition capable of removing the determined shadow pixel after determining a final shadow pixel according to the applied weight by applying a weight according to the analysis technique used to each shadow candidate pixel, and a shadow removal apparatus therefor. .

본 발명에 의하면, 다양한 영상 환경에서도 적응적으로 그림자 제거가 가능하여 야외 환경에서의 영상보안/감시 시스템, 교통 분석 및 관제 시스템, 군사용 시스템의 영상분석/인식 장치에 활용될 수 있다. According to the present invention, it is possible to adaptively remove shadows in various video environments, and thus can be used in video security/surveillance systems, traffic analysis and control systems, and video analysis/recognition devices of military systems.

더불어, 본 발명은 시판 또는 영업의 가능성이 충분할 뿐만 아니라 현실적으로 명백하게 실시할 수 있는 정도이므로 산업상 이용가능성이 있다.In addition, the present invention is not only sufficiently commercially available or commercially possible, but also has industrial applicability because it can be implemented clearly in reality.

10: 전처리부 20: 전경 배경 분리부
30: 그림자 제거부 40: 후처리부
100: 그림자 제거 장치 200: 영상 수신 장치
300: 표시 장치 400: 저장 장치
1000: 영상 인식 장치
10: preprocessing unit 20: foreground and background separation unit
30: shadow removal unit 40: post-processing unit
100: shadow removal device 200: image receiving device
300: display device 400: storage device
1000: image recognition device

Claims (12)

연속되어 입력되는 각 영상 프레임을 전경 영역 및 배경 영역으로 분리하는 단계;
상기 영상 프레임, 상기 영상 프레임에서 분리된 전경 영역 및 배경 영역을 대상으로 하나 이상의 그림자 제거를 위한 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계;
상기 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하고, 적용된 가중치에 따라 그림자 후보 픽셀을 혼합하여 최종 그림자 픽셀을 결정하는 단계; 및
상기 전경 영역에서 상기 결정된 그림자 픽셀을 제거하는 단계;를 포함하고,
상기 최종 그림자 픽셀을 결정하는 단계는,
현재 영상 프레임의 주변 환경 정보를 분석하는 단계;
상기 현재 영상 프레임의 주변 환경 정보와 이전 영상 프레임의 주변 환경 정보를 비교하여 주변 환경 정보의 변화량을 분석하고, 상기 주변 환경 정보의 변화량을 기초로 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하는 단계; 및
적용된 가중치에 따라 상기 그림자 후보 픽셀을 혼합하여 최종 그림자 픽셀을 결정하는 단계;
를 포함하는 것을 특징으로 하는 영상 인식을 위한 그림자 제거 방법.
Separating each continuously inputted image frame into a foreground area and a background area;
Extracting shadow candidate pixels using an algorithm for removing one or more shadows from the image frame, a foreground region and a background region separated from the image frame;
Applying a weight to each of the extracted shadow candidate pixels according to the used algorithm and mixing the shadow candidate pixels according to the applied weight to determine a final shadow pixel; And
Including; removing the determined shadow pixel from the foreground area,
Determining the final shadow pixel,
Analyzing information about the surrounding environment of the current image frame;
By comparing the surrounding environment information of the current image frame with the surrounding environment information of the previous image frame, analyzing the amount of change in the surrounding environment information, and weighting each of the extracted shadow candidate pixels according to the algorithm used based on the change amount of the surrounding environment information Applying; And
Mixing the shadow candidate pixels according to the applied weight to determine a final shadow pixel;
Shadow removal method for image recognition comprising a.
◈청구항 2은(는) 설정등록료 납부시 포기되었습니다.◈◈ Claim 2 was abandoned upon payment of the set registration fee. 제1 항에 있어서,
상기 그림자 제거를 위한 알고리즘은
컬러 및 조도 분석, 벡터 내적 분석, 경계 분포 분석, 프레임 화소 분석인 것을 특징으로 하는 영상 인식을 위한 그림자 제거 방법.
The method of claim 1,
The algorithm for removing the shadow is
A shadow removal method for image recognition, comprising color and illuminance analysis, vector dot product analysis, boundary distribution analysis, and frame pixel analysis.
◈청구항 3은(는) 설정등록료 납부시 포기되었습니다.◈◈ Claim 3 was abandoned upon payment of the set registration fee. 제2 항에 있어서,
상기 컬러 및 조도 분석 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계는
상기 전경 영역 및 배경 영역의 RGB 색상 좌표계를 HSV 색상 좌표계로 변환하는 단계;
상기 변환된 전경 영역 및 배경 영역에서 명도 값을 기준으로 어두운 영역을 검출하는 단계;
상기 전경 영역의 어두운 영역 및 상기 배경 영역의 어두운 영역을 대상으로 채도 비교를 통해 기 설정된 임계치 이상의 픽셀을 그림자 후보 픽셀로 1차 추출하는 단계;
상기 배경 영역 및 전경 영역에서 1차 추출된 그림자 후보 픽셀을 대상으로 명도 변화량을 분석하는 단계; 및
명도 변화량이 상기 기 설정된 임계치 미만인 픽셀을 최종 그림자 후보 픽셀로 추출하는 단계;
를 포함하는 것을 특징으로 하는 영상 인식을 위한 그림자 제거 방법.
The method of claim 2,
Extracting a shadow candidate pixel using the color and illuminance analysis algorithm
Converting the RGB color coordinate system of the foreground area and the background area into an HSV color coordinate system;
Detecting a dark area based on a brightness value in the converted foreground area and background area;
Firstly extracting a pixel having a predetermined threshold value or higher as a shadow candidate pixel through a saturation comparison of the dark area of the foreground area and the dark area of the background area;
Analyzing an amount of change in brightness for the shadow candidate pixels first extracted from the background area and the foreground area; And
Extracting a pixel whose brightness change amount is less than the preset threshold as a final shadow candidate pixel;
Shadow removal method for image recognition comprising a.
◈청구항 4은(는) 설정등록료 납부시 포기되었습니다.◈◈ Claim 4 was abandoned upon payment of the set registration fee. 제2 항에 있어서,
상기 벡터 내적 분석 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계는
상기 배경 영역 및 전경 영역을 대상으로 일정 크기의 윈도우를 설정하는 단계;
상기 배경 영역에서의 상기 윈도우 내의 픽셀과 상기 전경 영역에서의 상기 윈도우 내의 픽셀의 벡터 값의 내적(inner product)을 산출하는 단계; 및
상기 배경 영역에서의 내적과 상기 전경 영역에서의 내적을 비교하여, 벡터 값의 변화량이 기 설정된 임계치 이상의 픽셀을 그림자 후보 픽셀로 추출하는 단계;
를 포함하는 것을 특징으로 하는 영상 인식을 위한 그림자 제거 방법.
The method of claim 2,
Extracting the shadow candidate pixel using the vector dot product analysis algorithm
Setting a window of a predetermined size for the background area and the foreground area;
Calculating an inner product of a vector value of a pixel in the window in the background area and a pixel in the window in the foreground area; And
Comparing the dot product in the background area with the dot product in the foreground area, and extracting a pixel with a change amount equal to or greater than a preset threshold as a shadow candidate pixel;
Shadow removal method for image recognition comprising a.
◈청구항 5은(는) 설정등록료 납부시 포기되었습니다.◈◈ Claim 5 was abandoned upon payment of the set registration fee. 제2 항에 있어서,
상기 경계 분포 분석 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계는
상기 전경 영역에 대한 수직 히스토그램을 생성하는 단계;
상기 수직 히스토그램을 이용하여 가장 높은 값을 가지는 x축의 범위를 중심축으로 설정하는 단계;
상기 중심축을 기준으로 일정 반경 내 픽셀 명도 값을 분석하여 그림자의 방향을 예측하는 단계; 및
그림자 방향이 예측되면, 상기 중심축에서 그림자 방향으로 일정 거리 이상의 픽셀을 그림자 후보 픽셀로 추출하는 단계;
를 포함하는 것을 특징으로 하는 영상 인식을 위한 그림자 제거 방법.
The method of claim 2,
Extracting the shadow candidate pixel using the boundary distribution analysis algorithm
Generating a vertical histogram for the foreground area;
Setting a range of the x-axis having the highest value as a central axis using the vertical histogram;
Predicting a direction of a shadow by analyzing a pixel brightness value within a predetermined radius based on the central axis; And
If a shadow direction is predicted, extracting a pixel of a predetermined distance or more from the central axis in the shadow direction as a shadow candidate pixel;
Shadow removal method for image recognition comprising a.
◈청구항 6은(는) 설정등록료 납부시 포기되었습니다.◈◈ Claim 6 was abandoned upon payment of the set registration fee. 제5 항에 있어서,
상기 중심축으로 설정하는 단계는
상기 수직 히스토그램을 일정 개수의 블록으로 나누어서 블록 별 히스토그램 평균치가 가장 높은 블록 영역을 중심축으로 결정하는 것을 특징으로 하는 영상 인식을 위한 그림자 제거 방법.
The method of claim 5,
The step of setting as the central axis
The method for removing shadows for image recognition, comprising dividing the vertical histogram into a predetermined number of blocks and determining a block area having the highest average histogram value for each block as a central axis.
◈청구항 7은(는) 설정등록료 납부시 포기되었습니다.◈◈ Claim 7 was abandoned upon payment of the set registration fee. 제2 항에 있어서,
상기 프레임 화소 분석 알고리즘을 이용하여 그림자 후보 픽셀을 추출하는 단계는
상기 영상 프레임의 조명 성분을 추출하는 단계;
상기 조명 성분을 이용하여 반사 성분을 생성하는 단계;
상기 반사 성분의 값을 이용하여 어두운 영역을 보정하는 단계; 및
상기 보정된 어두운 영역에 해당하는 픽셀을 그림자 후보 픽셀로 추출하는 단계;
를 포함하는 것을 특징으로 하는 영상 인식을 위한 그림자 제거 방법.
The method of claim 2,
Extracting the shadow candidate pixel using the frame pixel analysis algorithm
Extracting a lighting component of the image frame;
Generating a reflection component using the lighting component;
Correcting a dark area using the value of the reflection component; And
Extracting a pixel corresponding to the corrected dark area as a shadow candidate pixel;
Shadow removal method for image recognition comprising a.
삭제delete ◈청구항 9은(는) 설정등록료 납부시 포기되었습니다.◈◈ Claim 9 was abandoned upon payment of the set registration fee. 제1 항에 있어서,
상기 주변 환경 정보의 변화량은
그림자 픽셀 분포도, 히스토그램을 기초로 분석된 그림자의 세기 및 광량 변화량인 것을 특징으로 하는 영상 인식을 위한 그림자 제거 방법.
The method of claim 1,
The amount of change in the surrounding environment information is
A shadow removal method for image recognition, comprising a shadow pixel distribution diagram and an amount of change in intensity and amount of light analyzed based on a histogram.
◈청구항 10은(는) 설정등록료 납부시 포기되었습니다.◈◈ Claim 10 was abandoned upon payment of the set registration fee. 제1 항에 있어서,
상기 최종 그림자 픽셀을 결정하는 단계는
이전 영상 프레임이 존재하지 않을 경우,
각 알고리즘에 따라 추출된 그림자 후보 픽셀의 겹침 여부를 판단하고, 겹침 정도가 가장 큰 그림자 후보 픽셀을 최종 그림자 픽셀로 결정하는 것을 특징으로 하는 영상 인식을 위한 그림자 제거 방법.
The method of claim 1,
Determining the final shadow pixel
If there is no previous video frame,
A shadow removal method for image recognition, comprising: determining whether or not the shadow candidate pixels extracted according to each algorithm overlap, and determining the shadow candidate pixel having the largest overlapping degree as a final shadow pixel.
◈청구항 11은(는) 설정등록료 납부시 포기되었습니다.◈◈ Claim 11 was abandoned upon payment of the set registration fee. 제1항 내지 제7항, 제9항 및 제10항 중 어느 하나의 항에 기재된 영상 인식을 위한 그림자 제거 방법을 실행하는 프로그램을 기록한 컴퓨터 판독 가능한 기록매체.A computer-readable recording medium on which a program for executing the shadow removal method for image recognition according to any one of claims 1 to 7, 9 and 10 is recorded. 연속되어 입력되는 각 영상 프레임을 전경 영역 및 배경 영역으로 분리하는 전경 배경 분리부; 및
상기 영상 프레임, 상기 영상 프레임에서 분리된 전경 영역 및 배경 영역을 대상으로 하나 이상의 그림자 제거를 위한 알고리즘을 이용하여 그림자 후보 픽셀을 추출하고, 상기 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하고, 적용된 가중치에 따라 그림자 후보 픽셀을 혼합하여 최종 그림자 픽셀을 결정하여, 상기 전경 영역에서 상기 결정된 그림자 픽셀을 제거하는 그림자 제거부; 를 포함하고,
상기 그림자 제거부는,
현재 영상 프레임의 주변 환경 정보와 이전 영상 프레임의 주변 환경 정보를 비교하여 주변 환경 정보의 변화량을 분석하고, 상기 주변 환경 정보의 변화량을 기초로 이용된 알고리즘에 따라 추출된 그림자 후보 픽셀 각각에 가중치를 적용하고, 적용된 가중치에 따라 상기 그림자 후보 픽셀을 혼합하여 최종 그림자 픽셀을 결정하는 것을 특징으로 하는 그림자 제거 장치.
A foreground background separating unit for separating each continuously input image frame into a foreground area and a background area; And
For the image frame, a foreground region and a background region separated from the image frame, a shadow candidate pixel is extracted using an algorithm for removing one or more shadows, and a weight is applied to each of the extracted shadow candidate pixels according to the used algorithm. A shadow removal unit configured to determine a final shadow pixel by applying and mixing shadow candidate pixels according to the applied weight, and removing the determined shadow pixel from the foreground area; Including,
The shadow removal unit,
By comparing the surrounding environment information of the current image frame and the surrounding environment information of the previous image frame, the amount of change in the surrounding environment information is analyzed, and a weight is applied to each of the shadow candidate pixels extracted according to the algorithm used based on the change amount of the surrounding environment information. And determine a final shadow pixel by mixing the shadow candidate pixels according to the applied weight.
KR1020140130049A 2014-09-29 2014-09-29 Shadow removal method for image recognition and apparatus using the same KR102156024B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140130049A KR102156024B1 (en) 2014-09-29 2014-09-29 Shadow removal method for image recognition and apparatus using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140130049A KR102156024B1 (en) 2014-09-29 2014-09-29 Shadow removal method for image recognition and apparatus using the same

Publications (2)

Publication Number Publication Date
KR20160037481A KR20160037481A (en) 2016-04-06
KR102156024B1 true KR102156024B1 (en) 2020-09-15

Family

ID=55790456

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140130049A KR102156024B1 (en) 2014-09-29 2014-09-29 Shadow removal method for image recognition and apparatus using the same

Country Status (1)

Country Link
KR (1) KR102156024B1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108305217A (en) * 2017-12-28 2018-07-20 北京大学深圳研究生院 Image shadow removing method and apparatus
CN109166080A (en) * 2018-08-16 2019-01-08 北京汽车股份有限公司 Removing method, device and the storage medium of shade
KR102180381B1 (en) * 2019-07-26 2020-11-18 강원대학교 산학협력단 The method for removing shadow of input image
KR102301924B1 (en) * 2020-02-26 2021-09-13 목원대학교 산학협력단 Shadow reconstruction method using multi-scale gamma correction
CN113628153A (en) * 2020-04-22 2021-11-09 北京京东乾石科技有限公司 Shadow region detection method and device
CN111951176A (en) * 2020-06-30 2020-11-17 重庆灵翎互娱科技有限公司 Method and equipment for removing local shadows of face image

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010204941A (en) * 2009-03-03 2010-09-16 Toshiba Teli Corp Image processing apparatus and shadow removal processing program
JP2013058162A (en) 2011-09-09 2013-03-28 Sumitomo Electric Ind Ltd Feature quantity extraction device, target object detection system, computer program, and feature quantity extraction method
KR101281783B1 (en) 2012-01-17 2013-07-04 한국과학기술원 Method and apparatus for detecting shadows from a single image

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100696725B1 (en) * 2005-08-30 2007-03-20 경북대학교 산학협력단 Shadow casting method using symmetric and distance feature of the object region
KR101297396B1 (en) 2011-12-28 2013-08-14 충북대학교 산학협력단 Method of shadow removal based on relative similarity

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010204941A (en) * 2009-03-03 2010-09-16 Toshiba Teli Corp Image processing apparatus and shadow removal processing program
JP2013058162A (en) 2011-09-09 2013-03-28 Sumitomo Electric Ind Ltd Feature quantity extraction device, target object detection system, computer program, and feature quantity extraction method
KR101281783B1 (en) 2012-01-17 2013-07-04 한국과학기술원 Method and apparatus for detecting shadows from a single image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
색상 적응적인 차량 그림자 제거방법, 한국교통연구원, 2011

Also Published As

Publication number Publication date
KR20160037481A (en) 2016-04-06

Similar Documents

Publication Publication Date Title
KR102156024B1 (en) Shadow removal method for image recognition and apparatus using the same
WO2020259249A1 (en) Focusing method and device, electronic device and computer-readable storage medium
CN109753913B (en) Multi-mode video semantic segmentation method with high calculation efficiency
CN109035304B (en) Target tracking method, medium, computing device and apparatus
CN111507210B (en) Traffic signal lamp identification method, system, computing equipment and intelligent vehicle
US9524558B2 (en) Method, system and software module for foreground extraction
US10255504B2 (en) Object position tracking using motion estimation
US10489674B2 (en) Information extraction using image data
US11037303B2 (en) Optical flow based detection and tracking of multiple moving objects in successive frames
US20200250836A1 (en) Moving object detection in image frames based on optical flow maps
EP3839888B1 (en) Compute device and method for detection of occlusions on a camera
WO2013186662A1 (en) Multi-cue object detection and analysis
CN112396116A (en) Thunder and lightning detection method and device, computer equipment and readable medium
US9600739B2 (en) Architecture for real-time extraction of extended maximally stable extremal regions (X-MSERs)
CN105144710A (en) Technologies for increasing the accuracy of depth camera images
US11600039B2 (en) Mechanism for improved light estimation
US8290277B2 (en) Method and apparatus for setting a lip region for lip reading
US20210295529A1 (en) Method and system for image processing
CN112149636A (en) Method, apparatus, electronic device and storage medium for detecting target object
KR102598459B1 (en) Lost foot recovery of human objects from image sequences based on horizon detection.
CN108734684B (en) Image background subtraction for dynamic illumination scene
US20230394829A1 (en) Methods, systems, and computer-readable storage mediums for detecting a state of a signal light
CN109754034A (en) A kind of terminal device localization method and device based on two dimensional code
CN115760912A (en) Moving object tracking method, device, equipment and computer readable storage medium
US20230177712A1 (en) Simultaneous localization and mapping using cameras capturing multiple spectra of light

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