KR102066412B1 - Apparatus and method for acquiring foreground image - Google Patents
Apparatus and method for acquiring foreground image Download PDFInfo
- Publication number
- KR102066412B1 KR102066412B1 KR1020180058188A KR20180058188A KR102066412B1 KR 102066412 B1 KR102066412 B1 KR 102066412B1 KR 1020180058188 A KR1020180058188 A KR 1020180058188A KR 20180058188 A KR20180058188 A KR 20180058188A KR 102066412 B1 KR102066412 B1 KR 102066412B1
- Authority
- KR
- South Korea
- Prior art keywords
- image
- pixel
- pixel value
- foreground
- comparison
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0007—Image acquisition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
Abstract
본 발명은 전경 영상 추출 장치에 관한 것으로서, 상기 전경 영상 추출 장치는 원본 영상이 입력되는 입력부, 상기 원본 영상의 각 화소에 대하여, 전경 영상에 해당하는 화소의 화소값을 제1 화소값으로 지정하고, 배경 영상에 해당하는 화소의 화소값을 제2 화소값으로 지정하여 중간 영상을 생성하는 중간 영상 생성부, 및 상기 원본 영상의 화소 중 상기 제1 화소값을 갖는 화소에 대응하는 좌표의 화소의 화소값을 결과 영상의 동일 좌표에 기록하여 결과 영상을 생성하는 결과 영상 생성부를 포함한다. The present invention relates to a foreground image extracting apparatus, wherein the foreground image extracting apparatus specifies an input unit to which an original image is input, and a pixel value of a pixel corresponding to the foreground image as a first pixel value for each pixel of the original image. A middle image generator configured to generate an intermediate image by designating a pixel value of a pixel corresponding to a background image as a second pixel value, and a pixel having a coordinate corresponding to a pixel having the first pixel value among the pixels of the original image. And a result image generator for generating a result image by recording the pixel values in the same coordinates of the result image.
Description
본 발명은 전경 영상 추출 장치 및 방법에 관한 것이다. The present invention relates to a foreground image extraction apparatus and method.
배경(背景)과 전경(前景)을 구비하고 있는 원본 영상에서, 전경(前景, foreground) 부분에 해당하는 영상(이하, 이 영상을 '전경 영상'이라 함)만을 추출하기 위해서는 배경의 색상을 녹색(green)이나 청색(blue)으로 한 후 피사체를 촬영하여 영상 데이터를 획득한 후 배경 부분에 해당하는 영상(이하, 이 영상을 '배경 영상'이라 함)에 대한 컬러 키(color key)에 해당하는 영상 데이터만을 분리하여 전경 영상만을 남기는 기법[이른바, 크로마 키(Chroma Key) 기법)]을 사용하였다. In order to extract only the image corresponding to the foreground part (hereinafter, referred to as 'foreground image') from the original image having the background and the foreground, the background color is green. (green) or blue (blue) and then photograph the subject to acquire the image data, and then corresponds to the color key for the image corresponding to the background (hereinafter referred to as 'background image') A technique of separating only the image data and leaving only the foreground image (so-called Chroma Key technique) was used.
그러나 이러한 경우, 전경 영상의 적어도 일부가 배경 영상과 동일한 컬러 키를 갖는 경우, 전경 영상의 해당 부분도 함께 삭제되어 온전한 전경 영상의 획득이 어렵다는 문제가 있었다. In this case, however, when at least a portion of the foreground image has the same color key as the background image, the corresponding portion of the foreground image is also deleted, which makes it difficult to obtain an entire foreground image.
예컨대, 푸른 눈동자를 가진 기상 캐스터를 청색의 스크린(screen) 앞에서 촬영을 하는 경우, 영상 편집 후 눈동자 부위가 텅 비게 되는 문제가 있었다.For example, when a weather caster having blue eyes is photographed in front of a blue screen, there is a problem that the pupil area becomes empty after image editing.
따라서, 이러한 문제를 해결하기 위하여 각각의 촬영된 영상에 대한 영상 데이터를 구비하고 있는 영상 프레임마다 손실된 전경 영상의 영역을 수작업으로 마킹해주는 방법을 사용하기도 하였다. Therefore, in order to solve this problem, a method of manually marking a lost foreground image area for each image frame including image data of each captured image has been used.
그러나, 이러한 방법은 동영상 촬영 시 1초 당 수십 개의 영상 프레임이 획득되므로, 획득된 각 영상 프레임 각각에 대하여 수작업으로 해당 영상 영역을 보정하는 데 많은 시간과 인력이 소요되므로, 시간과 인력의 낭비가 심각하였다.However, since this method acquires dozens of image frames per second during video shooting, it takes a lot of time and manpower to manually correct the corresponding image area for each of the acquired image frames, which wastes time and manpower. It was serious.
또한, 수작업으로 이루어짐에 따라 해당 영상 영역에 대한 마킹 동작이 정밀하게 이루어지지 않음으로써, 획득되는 전경 영상에 원치 않는 영상이 부가되거나 전경 영상의 일부가 손실되는 문제가 발생하였다. In addition, since the marking operation on the corresponding image area is not precisely performed as a manual operation, an unwanted image is added to the obtained foreground image or a part of the foreground image is lost.
특히, 머신 러닝(machine learning)을 이용하여 제품 사진을 식별한 후 식별된 제품 사진과 제품 정보를 매칭하는 동작을 실시하는 시스템 등과 같이 머신 러닝에서 제품의 영상을 학습하여야 하는 경우, 추출된 영상을 이용하여 머신 러닝이 이루어지므로 "제품만의 영상"만을 정확히 추출해야 러닝 머신 학습 엔진의 정확성이 높아질 수 있다. In particular, when a machine image is to be learned using machine learning, such as a system that performs an operation of matching the identified product photo with the product information, the image of the product must be learned in machine learning. Since machine learning is performed using only "product-specific images", the accuracy of the treadmill learning engine can be improved.
이처럼, 남겨진 제품 영상의 정확도에 따라 러닝 머신 학습 엔진의 정확도가 정해지므로, 제품 영상의 추출에 대한 많은 시간과 인력이 낭비되고 있다.As such, since the accuracy of the treadmill learning engine is determined according to the accuracy of the left product image, a lot of time and manpower for extracting the product image are wasted.
따라서, 특정 대상물(object)을 포함하도록 촬영된 영상에서 특정 대상물만을 남기고 배경을 제거하는 영상처리 기술에 대한 요구가 절실히 요구되고 있었다.Therefore, there is an urgent need for an image processing technique that removes a background while leaving only a specific object in an image photographed to include a specific object.
본 발명이 해결하려는 과제는 촬영된 영상에서 전경 영상만을 신속하고 정확하게 추출하기 위한 것이다.An object of the present invention is to quickly and accurately extract only the foreground image from the captured image.
본 발명이 해결하려는 다른 과제는 전경 영상의 추출 시간을 단축시키기 위한 것이다.Another object of the present invention is to shorten the extraction time of the foreground image.
상기 과제를 해결하기 위한 본 발명의 한 특징에 따른 전경 영상 추출 장치는 원본 영상이 입력되는 입력부, 상기 원본 영상의 각 화소에 대하여, 전경 영상에 해당하는 화소의 화소값을 제1 화소값으로 지정하고, 배경 영상에 해당하는 화소의 화소값을 제2 화소값으로 지정하여 중간 영상을 생성하는 중간 영상 생성부; 및 상기 원본 영상의 화소 중 상기 제1 화소값을 갖는 중간 영상의 화소에 대응하는 좌표의 화소의 화소값을 결과 영상의 동일 좌표에 기록하여 결과 영상을 생성하는 결과 영상 생성부를 포함한다. In the foreground image extracting apparatus according to an aspect of the present invention for solving the above problems, an input unit to which an original image is input, and a pixel value of a pixel corresponding to the foreground image is designated as a first pixel value for each pixel of the original image. An intermediate image generator configured to generate an intermediate image by designating a pixel value of a pixel corresponding to a background image as a second pixel value; And a result image generator configured to generate a result image by recording the pixel value of the pixel having the coordinate corresponding to the pixel of the intermediate image having the first pixel value among the pixels of the original image at the same coordinate of the result image.
상기 중간 영상 생성부는 상기 원본 영상에서 화소값을 변화량을 이용하여 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 원본 영상의 일부를 잘라내어 비교용 원본 영상을 생성하고, 상기 중간 영상에서 화소값의 변화량을 이용하여 상기 제1 화소값을 갖는 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 중간 영상의 일부를 잘라내어 비교용 중간 영상을 생성하며, 상기 비교용 원본 영상과 상기 비교용 중간 영상을 상기 결과 영상 생성부로 출력하고, 상기 결과 영상 생성부는 상기 비교용 원본 영상의 화소 중에서 상기 제1 화소값을 갖는 상기 비교용 중간 영상의 화소에 대응하는 좌표의 화소의 화소값을 결과 영상의 동일 좌표에 기록하여 결과 영상을 생성할 수 있다. The intermediate image generating unit determines the foreground area by using the change amount of the pixel value in the original image, generates a comparison original image by cutting out a portion of the original image to include the determined foreground image, and generates the pixel value in the intermediate image. A foreground area having the first pixel value is determined by using a change amount of, and a portion of the intermediate image is cut out to include the determined foreground image, and a comparison intermediate image is generated. The comparison original image and the comparison intermediate image are generated. Outputs an image to the resultant image generating unit, and the resultant image generating unit outputs a pixel value of a pixel having a coordinate corresponding to the pixel of the comparison intermediate image having the first pixel value among the pixels of the comparison original image; The resultant image may be generated by recording the same coordinates.
상기 중간 영상 생성부는 상기 원본 영상의 각 화소에 대하여, 전경 영상에 해당하는 화소의 화소값을 제1 화소값으로, 배경 영상에 해당하는 화소의 화소값을 제3 화소값으로 지정하여 중간 영상을 생성하고, 상기 원본 영상에서 화소값을 변화량을 이용하여 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 원본 영상의 일부를 잘라내어 비교용 원본 영상을 생성하고, 상기 중간 영상에서 화소값의 변화량을 이용하여 상기 제1 화소값을 갖는 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 중간 영상의 일부를 잘라내어 제1 비교용 중간 영상을 생성하고, 상기 생성된 제1 비교용 중간 영상에서 제3 화소값을 갖는 화소의 화소값을 상기 제2 화소값으로 변경하여 최종 비교용 중간 영상을 생성하며, 상기 비교용 원본 영상과 상기 최종 비교용 중간 영상을 상기 결과 영상 생성부로 출력하고, 상기 결과 영상 생성부는 상기 비교용 원본 영상의 화소 중에서 상기 제1 화소값을 갖는 상기 최종 비교용 중간 영상의 화소에 대응하는 좌표의 화소의 화소값을 결과 영상의 동일 좌표에 기록하여 결과 영상을 생성할 수 있다.The intermediate image generating unit designates an intermediate image by specifying a pixel value of a pixel corresponding to a foreground image as a first pixel value and a pixel value of a pixel corresponding to a background image as a third pixel value for each pixel of the original image. Generating a foreground image by using a change amount of a pixel value in the original image, cutting a portion of the original image to include the determined foreground image, and generating a comparison original image, and changing the pixel value in the intermediate image. Determine a foreground area having the first pixel value by using the first image value, and cut out a portion of the intermediate image to include the determined foreground image to generate a first comparison intermediate image, and generate the first comparison intermediate image from the generated first comparison intermediate image. Generating a final comparison intermediate image by changing a pixel value of a pixel having a third pixel value to the second pixel value, wherein the comparison original image and the A longitudinal comparison intermediate image is output to the result image generation unit, and the result image generation unit is a pixel of a pixel having a coordinate corresponding to the pixel of the final comparison intermediate image having the first pixel value among the pixels of the comparison original image. The resultant image may be generated by recording a value in the same coordinates of the resultant image.
상기 제1 화소값과 상기 제2 화소값은 서로 상이하고, 상기 제2 화소값은 값을 갖고 있지 않는 널(null) 상태일 수 있다.The first pixel value and the second pixel value may be different from each other, and the second pixel value may be in a null state having no value.
본 발명의 다른 특징에 따른 전경 영상 추출 방법은 입력부로부터 원본 영상이 입력되는 단계, 중간 영상 생성부는 상기 원본 영상의 각 화소에 대하여, 전경 영상에 해당하는 화소의 화소값을 제1 화소값으로 지정하고, 배경 영상에 해당하는 화소의 화소값을 제2 화소값으로 지정하여 중간 영상을 생성하는 단계, 및 결과 영상 생성부는 상기 원본 영상의 화소 중 상기 제1 화소값을 갖는 화소에 대응하는 좌표의 화소의 화소값을 결과 영상의 동일 좌표에 기록하여 결과 영상을 생성하는 단계를 포함한다.In the foreground image extracting method according to another aspect of the present invention, the step of inputting the original image from the input unit, the intermediate image generating unit designates the pixel value of the pixel corresponding to the foreground image as the first pixel value for each pixel of the original image; And generating an intermediate image by designating a pixel value of a pixel corresponding to a background image as a second pixel value, and a resultant image generating unit having a coordinate corresponding to a pixel having the first pixel value among pixels of the original image. And recording the pixel values of the pixels in the same coordinates of the resultant image to generate the resultant image.
상기 중간 영상 생성 단계는 상기 중간 영상 생성부가 상기 원본 영상에서 화소값을 변화량을 이용하여 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 원본 영상의 일부를 잘라내어 비교용 원본 영상을 생성하는 단계, 상기 중간 영상 생성부가 상기 중간 영상에서 화소값의 변화량을 이용하여 상기 제1 화소값을 갖는 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 중간 영상의 일부를 잘라내어 비교용 중간 영상을 생성하는 단계, 그리고 상기 중간 영상 생성부는 상기 비교용 원본 영상과 상기 비교용 중간 영상을 상기 결과 영상 생성부로 출력하는 단계를 포함할 수 있고, 상기 결과 영상 생성 단계는 상기 결과 영상 생성부가 상기 비교용 원본 영상의 화소 중에서 상기 제1 화소값을 갖는 상기 비교용 중간 영상의 화소에 대응하는 좌표의 화소의 화소값을 결과 영상의 동일 좌표에 기록하여 결과 영상을 생성하는 단계를 포함할 수 있다. The generating of the intermediate image comprises: determining, by the intermediate image generating unit, a foreground area by using a change amount of a pixel value in the original image, and cutting out a portion of the original image to include the determined foreground image to generate a comparison original image. The intermediate image generator determines a foreground area having the first pixel value by using a change amount of pixel values in the intermediate image, and cuts a portion of the intermediate image to include the determined foreground image to generate a comparison intermediate image. And the intermediate image generation unit outputting the comparison original image and the comparison intermediate image to the result image generation unit. The result image generation step may include the result image generation unit generating the comparison original image. To pixels of the comparison intermediate image having the first pixel value among pixels of the image. By recording the pixel value of the pixel of the coordinates in response to the same coordinates of the resultant image may include the results to produce an image.
상기 중간 영상 생성 단계는 상기 중간 영상 생성부가 상기 원본 영상의 각 화소에 대하여, 전경 영상에 해당하는 화소의 화소값을 제1 화소값으로, 배경 영상에 해당하는 화소의 화소값을 제3 화소값으로 지정하여 중간 영상을 생성하는 단계, 상기 중간 영상 생성부가 상기 원본 영상에서 화소값을 변화량을 이용하여 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 원본 영상의 일부를 잘라내어 비교용 원본 영상을 생성하는 단계, 상기 중간 영상 생성부가 상기 중간 영상에서 화소값의 변화량을 이용하여 상기 제1 화소값을 갖는 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 중간 영상의 일부를 잘라내어 제1 비교용 중간 영상을 생성하는 단계, 상기 중간 영상 생성부가 상기 생성된 제1 비교용 중간 영상에서 제3 화소값을 갖는 화소의 화소값을 상기 제2 화소값으로 변경하여 최종 비교용 중간 영상을 생성하는 단계, 상기 중간 영상 생성부가 상기 비교용 원본 영상과 상기 최종 비교용 중간 영상을 상기 결과 영상 생성부로 출력하는 단계, 그리고 상기 결과 영상 생성부가 상기 비교용 원본 영상의 화소 중에서 상기 제1 화소값을 갖는 상기 최종 비교용 중간 영상의 화소에 대응하는 좌표의 화소의 화소값을 결과 영상의 동일 좌표에 기록하여 결과 영상을 생성하는 단계를 포함할 수 있다.In the generating of the intermediate image, the intermediate image generating unit sets the pixel value of the pixel corresponding to the foreground image as the first pixel value and the pixel value of the pixel corresponding to the background image with respect to each pixel of the original image. Generating an intermediate image by using the intermediate image generator to determine a foreground area by using a change amount of a pixel value in the original image, and cut out a portion of the original image to include the determined foreground image to compare the original image; Generating an image, the intermediate image generator determines a foreground area having the first pixel value by using a change amount of pixel values in the intermediate image, and cuts a portion of the intermediate image to include the determined foreground image; Generating a comparison intermediate image, wherein the intermediate image generator is further configured to generate a third pixel value from the generated first comparison intermediate image; Generating a final comparison intermediate image by changing a pixel value of a pixel having the second pixel value, and outputting the comparison original image and the final comparison intermediate image to the result image generation unit by the intermediate image generation unit And the result image generator generates a pixel value of a pixel having a coordinate corresponding to a pixel of the final comparison intermediate image having the first pixel value among the pixels of the comparison original image in the same coordinate of the result image. It may include the step of generating.
상기 제1 화소값과 상기 제2 화소값은 서로 상이하고, 상기 제2 화소값은 값을 갖고 있지 않는 널(null) 상태일 수 있다.The first pixel value and the second pixel value may be different from each other, and the second pixel value may be in a null state having no value.
이러한 특징에 따르면, 중간 영상을 이용하여 전경 영상이 위치하고 있는 화소의 위치가 정확하게 판단되므로, 원본 영상에서 손실없이 전경 영상이 모든 추출된다. 따라서 전경 영상의 추출 동작에 대한 정확도가 크게 향상된다.According to this feature, since the position of the pixel in which the foreground image is located is accurately determined using the intermediate image, all the foreground image is extracted without loss from the original image. Therefore, the accuracy of the extraction operation of the foreground image is greatly improved.
또한, 원본 영상이 입력되면 자동으로 전경 영상이 추출되어 원본 영상에서 배경 영상이 배제된 전경 영상만이 신속하게 획득되므로, 전경 영상의 획득 시간이 크게 단축된다.In addition, when the original image is input, the foreground image is automatically extracted, and only the foreground image from which the background image is excluded from the original image is quickly obtained, thereby greatly reducing the acquisition time of the foreground image.
이에 더하여, 전경 영상에 대한 모든 전경 영상이 손실없이 추출되므로, 손실된 전경 영상을 위한 영상 보정 동작이 불필요하므로, 별도의 영상 보정 동작을 위한 많은 시간과 인력 낭비가 줄어든다.In addition, since all foreground images of the foreground image are extracted without loss, the image correction operation for the lost foreground image is unnecessary, thereby reducing a lot of time and manpower waste for a separate image correction operation.
도 1은 본 발명의 일 실시예에 따른 전경 영상 추출 장치의 블록도이다.
도 2a와 도 2b는 본 발명의 일 실시예에 따른 전경 영상 추출 유닛의 동작 순서도이다.
도 3a 내지 도 3d는 본 발명의 일 실시예에 따른 전경 영상 추출 장치에서 행해지는 머신 런닝을 위한 예시적인 영상을 도시한 도면이다.
도 4는 본 발명의 일 실시예에 따른 전경 영상 추출 장치의 중간 영상 생성부에서 머신 러닝을 위한 동작의 개념도이다.
도 5a 내지 도 5d는 본 발명의 일 실시예에 따른 전경 영상 추출 장치에서 전경 영상을 추출하는 과정에 대응하는 영상을 도시한 도면이다.
도 6a 및 도 6b는 본 발명의 다른 실시예에 따른 전경 영상 추출 장치에서 전경 영상을 추출하는 과정에 대응하는 영상을 도시한 도면이다. 1 is a block diagram of a foreground image extracting apparatus according to an embodiment of the present invention.
2A and 2B are flowcharts illustrating operations of the foreground image extraction unit, according to an exemplary embodiment.
3A to 3D are diagrams illustrating exemplary images for machine running performed in the foreground image extracting apparatus according to an embodiment of the present invention.
4 is a conceptual diagram of an operation for machine learning in the intermediate image generator of the foreground image extraction apparatus according to an embodiment of the present invention.
5A to 5D are views illustrating an image corresponding to a process of extracting a foreground image in the foreground image extracting apparatus according to an embodiment of the present invention.
6A and 6B illustrate an image corresponding to a process of extracting a foreground image in the foreground image extracting apparatus according to another embodiment of the present invention.
이하, 첨부된 도면을 참조하여 본 발명의 실시예들을 상세히 설명한다. 본 발명을 설명하는데 있어서, 해당 분야에 이미 공지된 기술 또는 구성에 대한 구체적인 설명을 부가하는 것이 본 발명의 요지를 불분명하게 할 수 있다고 판단되는 경우에는 상세한 설명에서 이를 일부 생략하도록 한다. 또한, 본 명세서에서 사용되는 용어들은 본 발명의 실시예들을 적절히 표현하기 위해 사용된 용어들로서, 이는 해당 분야의 관련된 사람 또는 관례 등에 따라 달라질 수 있다. 따라서, 본 용어들에 대한 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.Hereinafter, with reference to the accompanying drawings will be described embodiments of the present invention; In describing the present invention, if it is determined that adding specific descriptions of techniques or configurations already known in the art may make the gist of the present invention unclear, some of them will be omitted from the detailed description. In addition, terms used in the present specification are terms used to properly express the embodiments of the present invention, which may vary according to related persons or customs in the art. Therefore, the definitions of the terms should be made based on the contents throughout the specification.
여기서 사용되는 전문용어는 단지 특정 실시예를 언급하기 위한 것이며, 본 발명을 한정하는 것을 의도하지 않는다. 여기서 사용되는 단수 형태들은 문구들이 이와 명백히 반대의 의미를 나타내지 않는 한 복수 형태들도 포함한다. 명세서에서 사용되는 '포함하는'의 의미는 특정 특성, 영역, 정수, 단계, 동작, 요소 및/또는 성분을 구체화하며, 다른 특정 특성, 영역, 정수, 단계, 동작, 요소, 성분 및/또는 군의 존재나 부가를 제외시키는 것은 아니다.The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a,” “an,” and “the” include plural forms as well, unless the phrases clearly indicate the opposite. As used herein, the meaning of “comprising” specifies a particular characteristic, region, integer, step, operation, element, and / or component, and other specific characteristics, region, integer, step, operation, element, component, and / or group. It does not exclude the presence or addition of.
다음, 첨부된 도면을 참조하여 본 발명의 일 실시예에 따른 전경 영상 추출 장치 및 방법에 대해서 설명하도록 한다.Next, a foreground image extraction apparatus and method according to an embodiment of the present invention will be described with reference to the accompanying drawings.
먼저, 도 1을 참고로 하여, 본 발명의 일 실시예에 따른 전경 영상 추출 장치에 대하여 설명한다.First, a foreground image extracting apparatus according to an embodiment of the present invention will be described with reference to FIG. 1.
도 1에 도시한 것처럼, 본 예의 전경 영상 추출 장치는 원본 영상이 입력되는 전경 영상 추출 유닛(100), 전경 영상 추출 유닛(100)에 연결되어 있는 저장부(200), 그리고 전경 영상 추출 유닛(100)에 연결되어 있는 정보 출력부(300)를 구비한다.As shown in FIG. 1, the foreground image extracting apparatus of this example includes a foreground
본 예에서, 원본 영상은 영상 촬영부(도시하지 않음)의 동작에 의해 배경과 배경 앞에 놓여진 피사체를 모두 촬영하여 배경과 전경이 되는 피사체에 대한 촬영 영상이다.In this example, the original image is a photographed image of a subject to be a background and a foreground by photographing both the background and the subject placed in front of the background by an operation of an image photographing unit (not shown).
따라서, 원본 영상은 각 화소(pixel)의 위치정보인 좌표값과 각 화소의 색상과 명암 등에 관련된 화소값을 구비하고 있다.Therefore, the original image includes coordinate values, which are position information of each pixel, and pixel values related to color and contrast of each pixel.
이러한 원본 영상이 입력되는 전경 영상 추출 유닛(100)은 입력된 원본 영상을 배경 부분과 전경 부분으로 분리하여 출력하도록 학습된 영상 처리 엔진이다.The foreground
따라서, 이러한 전경 영상 추출 유닛(100)은 '원본 영상'과 원본 영상에 대응되는'결과 영상', 즉, 원본 영상에서 전경 부분에 해당하는 화소의 화소값으로 표시되는 영상이 서로 쌍을 이루어 학습이 수행되고, 수행된 학습의 동작으로 입력되는 원본 영상에서 전경 부분에 관련된 영상인 결과 영상만을 추출한다.Accordingly, the foreground
이러한 전경 영상 추출 유닛(100)은 원본 영상이 입력되는 입력부(110), 입력부(110)에 연결된 중간 영상 생성부(120), 그리고 중간 영상 생성부(120)에 연결되어 있는 결과 영상 생성부(130)를 구비한다.The foreground
입력부(110)는 원본 영상을 입력받아 중간 영상 생성부(120)로 출력한다.The
중간 영상 생성부(120)는 입력부(110)로부터 인가되는 원본 영상의 각 화소에 대하여, 전경 영상에 해당하는 화소의 화소값을 제1 화소값으로 지정하고, 배경 영상에 해당하는 화소의 화소값을 제2 화소값으로 지정하여 중간 영상을 생성한다. 생성된 중간 영상은 결과 영상 생성부(130)로 출력된다.The
이때, 제1 화소값과 제2 화소값은 서로 상이한다.In this case, the first pixel value and the second pixel value are different from each other.
일 예로, 제1 화소값은 흰 색상에 대응하는 화소값일 수 있다.For example, the first pixel value may be a pixel value corresponding to a white color.
결과 영상 생성부(130)는 원본 영상의 화소 중에서, 제1 화소값을 갖는 화소(즉, 중간 영상의 화소)의 좌표에 대응하는 화소(즉, 원본 영상의 화소)에 대한 화소값을 결과 영상의 동일 좌표에 기록한다.The result
이때, 중간 영상에서 제1 화소값을 갖지 않는 그 밖의 화소에 대응하는 결과 영상의 화소에는 제1 및 제2 화소값과 상이한 다른 화소값이 기록될 수 있다.In this case, other pixel values different from the first and second pixel values may be recorded in the pixels of the resultant image corresponding to other pixels having no first pixel value in the intermediate image.
전경 영상 추출 유닛(100)에 연결된 저장부(200)는 전경 영상 추출 장치의 동작에 필요한 데이터와 정보 그리고 동작 중에 생성되는 데이터 등을 저장하는 저장 매체로서, 메모리(memory) 등으로 이루어질 수 있다.The
정보 출력부(300)는 전경 영상 추출 유닛(100)의 제어에 따라 원본 영상, 중간 영상 및 결과 영상을 출력하는 표시 장치이다.The
따라서, 정보 출력부(300)는 전경 영상 추출 유닛(100)에서 생성되는 영상을 출력하므로, 사용자가 정보 출력부(300)로 표시되는 영상을 통하여 전경 영상 추출 과정을 시각적으로 확인할 수 있도록 한다. Therefore, since the
이러한 정보 출력부(300)는 액정 표시 장치(LCD, liquid crystal display)나 유기 발광 표시 장치(OLED, organic light emitting display) 등으로 이루어질 수 있다.The
다음, 도 2a 내지 도 5d를 참고로 하여, 이러한 구조는 갖는 전경 영상 추출 장치의 동작에 대하여 설명한다. 본 명세서에서, 투명한 상태는 흰색으로 도시되지만, 설명을 통해 투명한 상태와 흰색을 구분한다.Next, an operation of the foreground image extracting apparatus having such a structure will be described with reference to FIGS. 2A to 5D. In the present specification, the transparent state is shown in white, but the description distinguishes the transparent state from the white.
먼저, 전경 영상 추출 장치의 동작이 시작되면, 전경 영상 추출 유닛(100)의 입력부(110)는 원본 영상(예, 도 5a)이 입력되는지 판단하고(S11), 원본 영상이 입력되면 입력된 원본 영상을 중간 영상 생성부(120)로 출력한다(S12).First, when the operation of the foreground image extraction apparatus starts, the
이로 인해, 중간 영상 생성부(120)는 입력된 원본 영상을 저장부(200)에 저장한다(S13).For this reason, the
다음, 중간 영상 생성부(120)는 원본 영상에서 제1 영상과 제2 영상을 구분한다(S14). 여기서 제1 영상은 전경 부분에 해당하는 영상인 전경 영상일 수 있고, 제2 영상은 배경 부분에 해당하는 영상인 배경 영상일 수 있다(S14).Next, the
그런 다음, 중간 영상 생성부(120)는 전경 영상에 해당하는 화소의 화소값을 제1 화소값으로 정하고, 배경 영상에 해당하는 화소의 화소값을 제2 화소값을 정하여, 제1 화소값과 제2 화소값을 갖는 중간 영상을 생성한다(S15).Then, the
원본 영상에서 전경 영상과 배경 영상을 구분하고 중간 영상을 생성하는 간 영상 생성부(120)의 동작은 머신 러닝에 의한 학습에 의해 행해질 수 있다.The operation of the
머신 런닝의 한 예로서, 본 예의 전경 영상 추출 유닛(100)은 'image in→ image out'이 가능한 학습 모델을 이용한다.As an example of machine running, the foreground
따라서, 전경 영상 추출 유닛(100)은 획득된 원본 영상에서 어느 부분이 배경 영상이고 어느 부분이 전경 영상에 대한 학습 데이터를 필요로 한다.Therefore, the foreground
이를 위해, 전경 영상 추출 유닛(100)은 별도의 시뮬레이터(simulator)를 이용하여 전경 영상과 배경 영상을 합쳐 다양한 경우의 수에 대한 영상을 만들어낸다. To this end, the foreground
즉, 먼저 전경 영상만이 존재하고 배경 영상이 없는 제1 영상 즉, 배경 영상이 투명한 영상(예, 도 3a)과 배경만 존재하는 제2 영상(예, 도 3b)을 준비한다. 이때, 제1 영상은 사전에 포토샵 등과 같은 별도의 영상 편집 프로그램을 이용하여 작업자에 의해 생성될 수 있다.That is, first, a first image having only a foreground image and no background image, that is, a transparent image (eg, FIG. 3A) and a second image (eg, FIG. 3B) having only a background is prepared. In this case, the first image may be generated by an operator using a separate image editing program such as Photoshop.
그런 다음, 제1 영상을 랜덤하게 제2 영상에 붙여 입력 영상(input image)(도 3c)을 생성한다. 이때 생성된 입력 영상이 본 예의 전경 영상 추출 유닛(100)의 입력부(110)로 입력되는 원본 영상이 될 수 있다.Then, the first image is randomly attached to the second image to generate an input image (FIG. 3C). In this case, the generated input image may be an original image input to the
이때, 입력 영상에서 제1 영상이 위치하고 있는 좌표값을 알 수 있으므로, 제1 영상(즉, 전경 영상)이 위치하는 부분은 흰색에 대응하는 화소값으로 처리하고 나머지 제2 영상(즉, 배경 영상)에 해당하는 부분은 투명하거나 검은색에 대응하는 화소값으로 처리하여 출력 영상(output image)(예, 도 3d)을 생성한다. At this time, since the coordinate value where the first image is located in the input image can be known, the portion where the first image (that is, the foreground image) is located is processed as the pixel value corresponding to white and the remaining second image (that is, the background image). ) Is processed into a pixel value corresponding to transparent or black color to generate an output image (eg, FIG. 3D).
이러한 과정을 통해 영상 입력과 영상 출력에 해당하는 학습 데이터가 만들어지고, '입력 영상에 대한 정답은 출력 영상이다'라고 전경 영상 추출 유닛(100)의 중간 영상 생성부(120)를 학습시킨다. Through this process, training data corresponding to the image input and the image output is generated, and the
따라서, 이러한 학습 결과에 따라, 중간 영상 생성부(120)는 입력 영상이 인가되면 그에 대응하는 중간 영상을 생성한다. Therefore, according to the learning result, when the input image is applied, the
이러한 머신 러닝을 실시하는 중간 영상 생성부(120)에서 머신 러닝을 위한 동작의 개념도는 도 4와 같다.A conceptual diagram of an operation for machine learning in the
즉, 도 4를 참고로 하면, 입력층(input layer)으로 입력 영상이 입력되면 은닉층(hidden layer)을 거쳐 출력층(output layer)에서 출력 영상이 생성됩니다.That is, referring to FIG. 4, when an input image is input to an input layer, an output image is generated at an output layer through a hidden layer.
은닉층을 통과하면서 입력 영상 중에서 의미있는 데이터만 모아 압축이 되고, 출력층으로 출력되면서 의미있는 데이터를 중심으로 복구 동작이 이루어집니다.As it passes through the hidden layer, only the meaningful data from the input image is collected and compressed, and the output is output to the output layer.
따라서, 본 예의 중간 영상 생성부(120)의 경우, 입력층에서 은닉층으로 통과하는 인코딩(encoding) 과정에서 검정색(또는 투명한) 부분과 흰색 부분의 의미를 알아내고, 출력층으로 가는 디코딩(decoding) 과정에서 배경 부분을 투명하게 또는 검정색으로 처리하고 전경 부분을 흰색으로 처리한 영상, 즉 중간 영상을 만들어 낼 수 있다. Therefore, in the
이러한 중간 영상 생성부(120)의 동작에 의해 생성된 중간 영상에서, 전경 영상의 각 화소의 좌표값과 동일한 좌표값을 갖는 중간 영상의 화소는 제1 화소값을 갖게 되고, 배경 영상의 각 화소의 좌표값과 동일한 좌표값을 갖는 중간 영상의 화소는 제2 화소값을 갖는다. In the intermediate image generated by the operation of the
이미 기술한 것처럼, 제1 화소값과 제2 화소값은 각각 서로 상이하고, 하나의 예로서, 제1 색상은 흰색이고, 제2 화소값은 해당 화소를 투명하게 하는 것일 수 있다.As described above, the first pixel value and the second pixel value may be different from each other, and as an example, the first color may be white and the second pixel value may be to make the pixel transparent.
해당 화소를 투명하게 하기 위한 한 예로서, 해당 화소의 화소값을 실질적으로 제2 화소값은 정해진 범위 내의 화소값에 속하는 값 중에서 어떠한 값도 갖지 않은 '널(null)'상태로 만들어 해당 화소의 상태를 투명하게 할 수 있다. As an example to make the pixel transparent, the pixel value of the pixel is substantially made a 'null' state in which the second pixel value does not have any value among the values belonging to the pixel value within a predetermined range. The state can be made transparent.
이와 같이, 중간 영상이 화소값을 갖지 않는 화소를 구비함에 따라 중간 영상의 크기가 크게 줄어들고, 이로 인해 저장부(200)의 저장 용량과 영상 처리 속도 등이 크게 향상된다.As described above, as the intermediate image includes a pixel having no pixel value, the size of the intermediate image is greatly reduced, thereby greatly improving the storage capacity and the image processing speed of the
그런 다음, 중간 영상 생성부(120)는 원본 영상과 중간 영상에서 전경 영상의 경계를 기준으로 하여 정해진 크기로 전경 영상이 포함되도록 원본 영상과 중간 영상의 일부를 잘라내어, 비교용 원본 영상(도 5b)과 비교용 중간 영상(도 5c)을 생성한다(S151).Then, the intermediate
비교용 원본 영상을 생성하기 위한 한 예로서, 중간 영상 생성부(120)는 원본 영상의 각 화소값에 대한 변화량을 이용하여 전경 영상이 위치하는 전경 영역을 판정하고, 판정된 전경 영역에서 최좌측에 위치하는 화소, 최우측에 위치하는 화소, 최상단에 위치하는 화소 및 최하단에 위치하는 화소인 총 네 개의 화소를 꼭지점으로 하는 사각형 영역을 구획하여 그 사각형 영역에 포함된 영상을 추출하여 비교용 원본 영상을 생성한다.As an example for generating the original image for comparison, the
비교용 중간 영상을 생성하는 방식 역시 동일한 방식으로 중간 영상 생성부(120)는 중간 영상의 각 화소값의 변화량을 이용하여, 전경 영상이 위치하는 전경 영역(즉, 제1 화소값을 갖고 있는 화소들의 영역)을 판정하고, 판정된 전경 영역에서 최좌측에 위치하는 화소, 최우측에 위치하는 화소, 최상단에 위치하는 화소 및 최하단에 위치하는 화소에 의해 구획된 사각형 영역에 포함된 영상을 비교용 중간 영상으로 생성한다.중간 영상 생성부(120)의 동작에 의해 비교용 원본 영상과 비교용 중간 영상이 생성되면, 중간 영상 생성부(120)는 생성된 비교용 원본 영상과 비교용 중간 영상을 결과 영상 생성부(130)로 출력한다(S16).Similarly, the method of generating an intermediate image for comparison uses the amount of change of each pixel value of the intermediate image, so that the foreground image (ie, the pixel having the first pixel value) is located in the foreground image. Field of view), and the image included in the rectangular area partitioned by the pixel located at the leftmost side, the pixel located at the rightmost side, the pixel located at the top end, and the pixel located at the bottom end in the determined foreground area If the original image for comparison and the intermediate image for comparison are generated by the operation of the
중간 영상 생성부(120)로부터 비교용 원본 영상과 비교용 중간 영상이 입력되면, 결과 영상 생성부(130)는 입력된 두 영상을 저장부(200)에 저장한다(S17).When the comparison original image and the comparison intermediate image are input from the
그런 다음, 결과 영상 생성부(130)는 두 비교용 영상인 비교용 원본 영상과 비교용 중간 영상을 합쳐 비교용 원본 영상에서 전경 영상에 해당하는 화소의 화소값을 읽어와 대응하는 비교용 중간 영상의 해당 화소값으로 하여 최종적으로 결과 영상(도 5d)을 생성한다.Then, the
즉, 결과 영상 생성부(130)는, 비교용 원본 영상에서 전경 영상만을 추출하기 위해, 비교용 중간 영상의 첫번째 행과 첫번째 열에 해당하는 좌표값을 갖는 화소(예, 첫 번째 화소)의 화소값(예, 첫 번째 화소값)에서부터 마지막 행과 마지막 열에 해당하는 좌표값을 갖는 화소(예, 마지막 화소)의 화소값(예, 마지막 화소값)을 일일이 제1 화소값과 비교한다.That is, the
그런 다음, 제1 화소값과 동일한 화소값을 갖는 비교용 중간 영상의 좌표값을 판정하고, 판정된 좌표값과 동일한 좌표값을 갖는 비교용 원본 영상의 화소에 대한 화소값을 읽어와, 결과 영상의 해당 화소(즉, 판정된 좌표값과 동일한 좌표값을 갖는 결과 영상의 화소)의 화소값으로 기록한다. Then, the coordinate value of the comparison intermediate image having the same pixel value as the first pixel value is determined, the pixel value of the pixel of the comparison original image having the same coordinate value as the determined coordinate value is read, and the resultant image is read. It records as the pixel value of the corresponding pixel of (that is, the pixel of the resultant image having the same coordinate value as the determined coordinate value).
이로 인해, 결과 영상에서, 제1 화소값을 갖는 비교용 중간 영상의 화소와 대응되는 화소(제1 화소값을 갖는 비교용 중간 영상의 화소와 동일한 좌표값을 갖는 결과 영상의 화소)의 화소값은 비교용 원본 영상의 대응되는 화소의 화소값과 같다.Thus, in the resultant image, the pixel value of the pixel corresponding to the pixel of the comparison intermediate image having the first pixel value (pixel of the resultant image having the same coordinate value as the pixel of the comparison intermediate image having the first pixel value) Is equal to the pixel value of the corresponding pixel of the comparison original image.
이와 같이, 원본 영상 전체와 중간 영상 전체를 이용하여 결과 영상을 생성하는 대신, 전경 영상이 포함된 부분만을 추출한 비교용 원본 영상과 비교용 중간 영상을 이용하여 결과 영상을 생성하므로, 처리해야 할 영상 데이터의 양이 크게 줄어들어 데이터 처리 시간이 크게 감소한다.In this way, instead of generating the result image using the entire original image and the entire intermediate image, the result image is generated by using the comparison original image and the comparison intermediate image extracted only the part including the foreground image, and thus the image to be processed. The amount of data is greatly reduced, which significantly reduces data processing time.
하지만, 대안적인 예에서, 비교용 원본 영상과 비교용 중간 영상을 생성하는 단계는 생략할 수 있고, 이 경우, 결과 영상 생성부(130)는 원본 영상과 중간 영상을 서로 비교하여 결과 영상을 생성할 수 있다.However, in an alternative example, generating the comparison original image and the comparison intermediate image may be omitted, and in this case, the
이를 위해, 결과 영상 추출부(130)는, 도 2a의 단계(S18)에 도시한 것처럼, 비교용 중간 영상에서 현재 좌표값에 해당하는 화소의 화소값[예, 현재 화소값]을 읽어와(S18), 화소값이 제1 화소값과 동일한지 판단한다(S19).To this end, the resultant
판독된 화소값이 제1 화소값과 동일하면(S19), 결과 영상 생성부(130)는 현재 화소의 좌표값을 판정한다(S110).If the read pixel value is the same as the first pixel value (S19), the
그런 다음, 결과 영상 생성부(130)는 비교용 원본 영상에서 판정된 좌표값과 동일한 좌표값을 갖는 화소의 화소값을 읽어와 결과 영상의 화소값으로 기록하여 결과 영상을 생성하거나 비교용 중간 영상에서 해당 화소의 화소값을 읽어온 화소값으로 변경하여 결과 영상을 생성한다(S111). 따라서, 판독된 화소값은 판정된 좌표값과 동일한 좌표값을 갖는 결과 영상의 화소에 대한 화소값으로 기록된다. Then, the
그런 다음, 현재 좌표의 좌표값이 비교용 중간 영상의 마지막 번째 화소의 좌표값인지 판단한다(S112).Then, it is determined whether the coordinate value of the current coordinate is the coordinate value of the last pixel of the comparison intermediate image (S112).
현재 좌표값이 마지막 번째 화소의 좌표값이 아닌 경우(S112), 결과 영상 생성부(230)는 비교용 중간 영상에서 현재 좌표값을 다음 번째에 해당하는 좌표값으로 변경한 후(S113), 단계(S18)로 넘어간다.If the current coordinate value is not the coordinate value of the last pixel (S112), the result image generator 230 changes the current coordinate value from the comparison intermediate image to the next corresponding coordinate value (S113). Proceed to S18.
이때, 다음 번째로의 좌표값 변경 동작의 한 예는 정해진 스캔 방향(예, 지그재그 방향)에 따라 비교용 중간 영상의 화소에 대한 행 위치와 열 위치 중 적어도 하나를 순차적으로 변경하여 이루어질 수 있다. 이러한 화소의 좌표값 변경 동작은 이미 널리 알려져 있으므로, 본 명세서에서 자세한 설명은 생략한다. In this case, an example of the next coordinate value change operation may be performed by sequentially changing at least one of a row position and a column position of a pixel of a comparison intermediate image according to a predetermined scan direction (eg, a zigzag direction). Since the coordinate value changing operation of such a pixel is already widely known, a detailed description thereof will be omitted.
하지만, 현재 좌표값이 비교용 중간 영상의 마지막 번째 화소에 대한 좌표값이면(S), 결과 영상 생성부(130)은 동작을 종료한다(S100). However, if the current coordinate value is the coordinate value of the last pixel of the comparison intermediate image (S), the
다시 단계(S18)로 넘어가, 현재 판독된 비교용 중간 영상의 화소에 대한 화소값이 제1 화소값이 아닌 경우, 결과 영상 생성부(130)는 단계(S112)로 넘어가 현재 화소가 마지막 번째 화소인지 판단하여, 마지막 번째 화소가 아닌 경우 다음 번째 화소에 화소값이 제1 화소값인지를 판단하여 비교용 원본 영상에서 결과 영상을 추출하는 동작을 계속 실행하게 된다.If the pixel value of the pixel of the comparison intermediate image currently read is not the first pixel value, the
이와 같이, 비교용 중간 영상에서 화소값이 제1 화소값을 갖는 화소를 판정하고, 비교용 원본 영상에서 판정된 화소와 동일한 좌표값을 갖는 있는 화소의 화소값을 읽어온 후, 판정된 좌표값과 동일한 좌표값을 갖는 결과 영상의 화소에 대한 화소값으로 읽어온 화소값을 기록하거나 비교용 중간 영상에서 해당 좌표값을 갖는 화소의 화소값을 읽어온 화소값으로 변경하여 결과 영상을 생성한다.In this way, in the comparison intermediate image, the pixel value of the pixel having the first pixel value is determined, the pixel value of the pixel having the same coordinate value as that of the pixel determined in the comparison original image is read, and then the determined coordinate value is determined. The resultant image is generated by recording the pixel value read as the pixel value of the pixel of the resultant image having the same coordinate value as or by changing the pixel value of the pixel having the corresponding coordinate value to the read pixel value in the comparison intermediate image.
위에 기재한 본 예의 경우, 비교용 중간 영상은 제1 화소값과 제2 화소값을 갖고 있는 최종 비교용 중간 영상이 되는 한 개의 비교용 중간 영상이 존재한다.하지만, 대안적인 예에서, 비교용 중간 영상은 두 개 이상일 수 있다. In the present example described above, there is one comparison intermediate image which becomes the final comparison intermediate image having the first pixel value and the second pixel value. However, in an alternative example, the comparison intermediate image There may be two or more intermediate images.
즉, 도 6a 및 도 6b를 추가적으로 참조하면, 중간 영상 생성부(120)는 원본 영상에서 전경 영상의 화소에 대한 화소값을 제1 화소값으로 하고 배경 영상의 화소에 대한 화소값을 제3 화소값으로 하여 중간 영상(도 6a 참조)을 생성한다. 이때, 제3 화소값은 제1 색상과 다른 제2 색상에 해당하는 화소값으로서, 제2 색상은 검은색일 수 있다. 그런 다음, 중간 영상 생성부(120)는 흰색에 대응하는 제1 화소값과 검은색에 대응하는 제3 화소값을 갖는 화소들로 이루어져 있는 중간 영상에서 이미 기술한 것과 동일한 방식에 따라 화소값의 변화량을 이용해, 제1 화소값을 갖는 전경 영역을 판정하고 판정된 전경 영상이 포함되도록 상기 중간 영상의 일부를 잘라내어 제1 비교용 중간 영상(도 6b)을 생성한다.That is, referring to FIGS. 6A and 6B, the
즉, 중간 영상의 화소값의 변화량(즉, 차이)을 이용해 흰색 부분(즉, 전경 영상 부분)과 검은색 부분(즉, 배경 영상 부분)의 경계를 추출하여 전경 영상이 위치하는 전경 영역을 판정하고, 판정된 전경 영역에서 최좌측에 위치하는 화소, 최우측에 위치하는 화소, 최상단에 위치하는 화소 및 최하단에 위치하는 화소에 의해 구획된 사각형 영역에 포함된 영상을 제1 비교용 중간 영상으로 생성한다.That is, the boundary between the white part (i.e. foreground image part) and the black part (i.e. background image part) is extracted using the amount of change (i.e., the difference) of pixel values of the intermediate image to determine the foreground area where the foreground image is located. And the image included in the rectangular area partitioned by the pixel located at the leftmost side, the pixel located at the rightmost side, the pixel located at the top end, and the pixel located at the bottom end in the determined foreground area as the first comparison intermediate image. Create
따라서, 제1 비교용 중간 영상은 제1 화소값과 제3 화소값으로 이루어진 영상이다.Therefore, the first comparison intermediate image is an image including the first pixel value and the third pixel value.
그런 다음, 제1 비교용 중간 영상에서, 제1 화소값을 갖는 화소의 값은 그대로 제1 화소값을 유지하지만, 제3 화소값을 갖는 화소의 값은 제3 화소값과 다른 제2 화소값으로 하여, 제1 화소값과 제2 화소값을 갖는 최종 비교용 중간 영상인 제2 비교용 중간 영상(도 5c)을 생성할 수 있다.이러한, 본 예에 따른 전경 영상 추출 장치 및 방법에 따르면, 최종 비교용 중간 영상을 이용하여 전경 영상이 위치하고 있는 화소의 위치가 정확하게 판단되므로, 원본 영상에서 손실없이 전경 영상이 추출된다. 따라서 전경 영상의 추출 동작에 대한 정확도가 크게 향상된다.Then, in the first comparison intermediate image, the value of the pixel having the first pixel value is maintained as it is, but the value of the pixel having the third pixel value is the second pixel value different from the third pixel value. The second comparison intermediate image (FIG. 5C), which is the final comparison intermediate image having the first pixel value and the second pixel value, can be generated. According to the foreground image extracting apparatus and method according to the present example, Since the position of the pixel in which the foreground image is located is accurately determined using the final comparison intermediate image, the foreground image is extracted from the original image without loss. Therefore, the accuracy of the extraction operation of the foreground image is greatly improved.
또한, 원본 영상이 입력되면 자동으로 전경 영상이 추출되어 원본 영상에서 배경 영상이 배제된 전경 영상만이 신속하고 정확하게 획득된다.In addition, when the original image is input, the foreground image is automatically extracted so that only the foreground image from which the background image is excluded from the original image is quickly and accurately obtained.
이에 더하여, 전경 영상에 대한 모든 전경 영상이 손실없이 추출되므로, 손실된 전경 영상을 위한 별도의 영상 보정 동작이 불필요하다.In addition, since all foreground images of the foreground image are extracted without loss, a separate image correction operation for the lost foreground image is unnecessary.
이상, 본 발명의 전경 영상 추출 장치 및 방법의 실시예들에 대해 설명하였다. 본 발명은 상술한 실시예 및 첨부한 도면에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상의 지식을 가진 자의 관점에서 다양한 수정 및 변형이 가능할 것이다. 따라서 본 발명의 범위는 본 명세서의 청구범위뿐만 아니라 이 청구범위와 균등한 것들에 의해 정해져야 한다.In the above, embodiments of the foreground image extraction apparatus and method of the present invention have been described. The present invention is not limited to the above-described embodiment and the accompanying drawings, and various modifications and variations will be possible in view of those skilled in the art to which the present invention pertains. Therefore, the scope of the present invention should be defined not only by the claims of the present specification but also by the equivalents of the claims.
110: 입력부 120: 중간 영상 생성부
130: 결과 영상 생성부 200: 저장부110: input unit 120: intermediate image generating unit
130: result image generation unit 200: storage unit
Claims (8)
상기 원본 영상의 각 화소에 대하여, 전경 영상에 해당하는 화소의 화소값을 제1 화소값으로 지정하고, 배경 영상에 해당하는 화소의 화소값을 제2 화소값으로 지정하여 중간 영상을 생성하는 중간 영상 생성부; 및
상기 원본 영상의 화소 중 상기 제1 화소값을 갖는 중간 영상의 화소에 대응하는 좌표의 화소의 화소값을 결과 영상의 동일 좌표에 기록하여 결과 영상을 생성하는 결과 영상 생성부
를 포함하고,
상기 중간 영상 생성부는,
상기 원본 영상의 각 화소에 대하여, 전경 영상에 해당하는 화소의 화소값을 제1 화소값으로, 배경 영상에 해당하는 화소의 화소값을 제3 화소값으로 지정하여 중간 영상을 생성하고,
상기 원본 영상에서 화소값을 변화량을 이용하여 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 원본 영상의 일부를 잘라내어 비교용 원본 영상을 생성하고,
상기 중간 영상에서 화소값의 변화량을 이용하여 상기 제1 화소값을 갖는 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 중간 영상의 일부를 잘라내어 제1 비교용 중간 영상을 생성하고, 상기 생성된 제1 비교용 중간 영상에서 제3 화소값을 갖는 화소의 화소값을 상기 제2 화소값으로 변경하여 최종 비교용 중간 영상을 생성하며, 상기 비교용 원본 영상과 상기 최종 비교용 중간 영상을 상기 결과 영상 생성부로 출력하고,
상기 결과 영상 생성부는,
상기 비교용 원본 영상의 화소 중에서 상기 제1 화소값을 갖는 상기 최종 비교용 중간 영상의 화소에 대응하는 좌표의 화소의 화소값을 결과 영상의 동일 좌표에 기록하여 결과 영상을 생성하는
전경 영상 추출 장치.An input unit to input an original image;
For each pixel of the original image, a pixel value of a pixel corresponding to a foreground image is designated as a first pixel value, and a pixel value of a pixel corresponding to a background image is designated as a second pixel value to generate an intermediate image. An image generator; And
A result image generator for generating a result image by recording the pixel value of a pixel having a coordinate corresponding to the pixel of the intermediate image having the first pixel value among the pixels of the original image in the same coordinate of the result image
Including,
The intermediate image generator,
For each pixel of the original image, an intermediate image is generated by designating a pixel value of a pixel corresponding to a foreground image as a first pixel value and a pixel value of a pixel corresponding to a background image as a third pixel value.
A foreground area is determined by using a change amount of a pixel value in the original image, and a portion of the original image is cut out to include the determined foreground image, and a comparison original image is generated.
The foreground area having the first pixel value is determined using the change amount of the pixel value in the intermediate image, and a portion of the intermediate image is cut out to include the determined foreground image to generate a first comparison intermediate image. In the first comparison intermediate image, a pixel value of a pixel having a third pixel value is changed to the second pixel value to generate a final comparison intermediate image, wherein the comparison original image and the final comparison intermediate image are generated. Output to the result image generator,
The result image generator,
A pixel value of a pixel having a coordinate corresponding to a pixel of the final comparison intermediate image having the first pixel value among the pixels of the comparison original image is recorded at the same coordinates of a resultant image to generate a resultant image
Foreground image extraction device.
상기 제1 화소값과 상기 제2 화소값은 서로 상이하고, 상기 제2 화소값은 값을 갖고 있지 않는 널(null) 상태인 전경 영상 추출 장치.In claim 1,
And the first pixel value and the second pixel value are different from each other, and the second pixel value has a null state having no value.
중간 영상 생성부는 상기 원본 영상의 각 화소에 대하여, 전경 영상에 해당하는 화소의 화소값을 제1 화소값으로 지정하고, 배경 영상에 해당하는 화소의 화소값을 제2 화소값으로 지정하여 중간 영상을 생성하는 단계; 및
결과 영상 생성부는 상기 원본 영상의 화소 중 상기 제1 화소값을 갖는 화소에 대응하는 좌표의 화소의 화소값을 결과 영상의 동일 좌표에 기록하여 결과 영상을 생성하는 단계
를 포함하고,
상기 중간 영상 생성 단계는,
상기 중간 영상 생성부가 상기 원본 영상의 각 화소에 대하여, 전경 영상에 해당하는 화소의 화소값을 제1 화소값으로, 배경 영상에 해당하는 화소의 화소값을 제3 화소값으로 지정하여 중간 영상을 생성하는 단계,
상기 중간 영상 생성부가 상기 원본 영상에서 화소값을 변화량을 이용하여 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 원본 영상의 일부를 잘라내어 비교용 원본 영상을 생성하는 단계,
상기 중간 영상 생성부가 상기 중간 영상에서 화소값의 변화량을 이용하여 상기 제1 화소값을 갖는 전경 영역을 판정하고, 판정된 전경 영상이 포함되도록 상기 중간 영상의 일부를 잘라내어 제1 비교용 중간 영상을 생성하는 단계,
상기 중간 영상 생성부가 상기 생성된 제1 비교용 중간 영상에서 제3 화소값을 갖는 화소의 화소값을 상기 제2 화소값으로 변경하여 최종 비교용 중간 영상을 생성하는 단계,
상기 중간 영상 생성부가 상기 비교용 원본 영상과 상기 최종 비교용 중간 영상을 상기 결과 영상 생성부로 출력하는 단계
를 포함하고,
상기 결과 영상 생성 단계는,
상기 결과 영상 생성부가 상기 비교용 원본 영상의 화소 중에서 상기 제1 화소값을 갖는 상기 최종 비교용 중간 영상의 화소에 대응하는 좌표의 화소의 화소값을 결과 영상의 동일 좌표에 기록하여 결과 영상을 생성하는 단계
를 포함하는 전경 영상 추출 방법.Inputting an original image from an input unit;
The intermediate image generator designates the pixel value of the pixel corresponding to the foreground image as the first pixel value and the pixel value of the pixel corresponding to the background image as the second pixel value for each pixel of the original image. Generating a; And
A result image generator generating a result image by recording a pixel value of a pixel having a coordinate corresponding to the pixel having the first pixel value among the pixels of the original image in the same coordinate of the result image
Including,
The intermediate image generating step,
The intermediate image generating unit assigns the pixel value of the pixel corresponding to the foreground image as the first pixel value and the pixel value of the pixel corresponding to the background image as the third pixel value for each pixel of the original image. Generating step,
Determining, by the intermediate image generator, a foreground area by using a change amount of a pixel value in the original image, and cutting out a portion of the original image to include the determined foreground image to generate a comparison original image;
The intermediate image generator determines a foreground area having the first pixel value by using a change amount of pixel values in the intermediate image, and cuts a portion of the intermediate image to include the determined foreground image to produce a first comparison intermediate image. Generating step,
Generating, by the intermediate image generator, a final comparison intermediate image by changing a pixel value of a pixel having a third pixel value to the second pixel value in the generated first comparison intermediate image;
Outputting, by the intermediate image generator, the comparison original image and the final comparison intermediate image to the resultant image generator;
Including,
The result image generation step,
The result image generator generates a result image by recording pixel values of a pixel having a coordinate corresponding to a pixel of the final comparison intermediate image having the first pixel value among the pixels of the comparison original image at the same coordinates of the result image. Steps to
Foreground image extraction method comprising a.
상기 제1 화소값과 상기 제2 화소값은 서로 상이하고, 상기 제2 화소값은 값을 갖고 있지 않는 널(null) 상태인 전경 영상 추출 방법.
In claim 5,
And the first pixel value and the second pixel value are different from each other, and the second pixel value has a null state having no value.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20170102262 | 2017-08-11 | ||
KR1020170102262 | 2017-08-11 |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20190017635A KR20190017635A (en) | 2019-02-20 |
KR102066412B1 true KR102066412B1 (en) | 2020-01-15 |
Family
ID=65562067
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020180058188A KR102066412B1 (en) | 2017-08-11 | 2018-05-23 | Apparatus and method for acquiring foreground image |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102066412B1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102434832B1 (en) * | 2020-06-30 | 2022-08-22 | (주)에이에스티홀딩스 | Method for providing artificial intelligence based virtual travel service using real-time background segmentation and object synthesis model |
KR102430486B1 (en) * | 2022-06-02 | 2022-08-08 | (주) 인터마인즈 | Device, method and program for calculating the position of products in a product showcase based on artificial intelligence using a load cell arrangement structure |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101392978B1 (en) * | 2014-02-04 | 2014-05-08 | (주)나인정보시스템 | Object labeling method and apparatus using hybrid parallel processing |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2870372B2 (en) * | 1993-09-08 | 1999-03-17 | 住友電気工業株式会社 | Object recognition device |
IES20060564A2 (en) | 2006-05-03 | 2006-11-01 | Fotonation Vision Ltd | Improved foreground / background separation |
KR20090049933A (en) * | 2007-11-14 | 2009-05-19 | 부산대학교 산학협력단 | System for recognizing vermin and method thereof |
KR101392406B1 (en) | 2012-09-26 | 2014-08-14 | 주식회사 에이아이오코리아 | Method and Apparatus for Chromakey compositing of Subject Image and Background Image |
-
2018
- 2018-05-23 KR KR1020180058188A patent/KR102066412B1/en active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101392978B1 (en) * | 2014-02-04 | 2014-05-08 | (주)나인정보시스템 | Object labeling method and apparatus using hybrid parallel processing |
Also Published As
Publication number | Publication date |
---|---|
KR20190017635A (en) | 2019-02-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7852410B2 (en) | Image superimposing apparatus | |
US7636477B2 (en) | Device for detecting red eye, program therefor, and recording medium storing the program | |
CN108463823B (en) | Reconstruction method and device of user hair model and terminal | |
CN102111556B (en) | Image pickup device, image processing method | |
SE1150505A1 (en) | Method and apparatus for taking pictures | |
US8265167B2 (en) | Application specific video format | |
SE1000142A1 (en) | Digital image manipulation including identification of a target area in a target image and seamless replacement of image information from a source image | |
KR102208694B1 (en) | Apparatus and method for analyzing mark in facility floor plan | |
CN110730381A (en) | Method, device, terminal and storage medium for synthesizing video based on video template | |
US20150302600A1 (en) | Method for obfuscating images or video to prevent digital recording or capture while remaining visible to humans | |
KR102066412B1 (en) | Apparatus and method for acquiring foreground image | |
US20090245625A1 (en) | Image trimming device and program | |
CN107730461A (en) | Image processing method, apparatus, device and medium | |
US20060036948A1 (en) | Image selection device and image selecting method | |
JP2010020602A (en) | Image matching device and camera | |
CN113011432A (en) | Two-dimensional code layered display and identification method and device | |
CN108268904B (en) | Picture identification method and device and electronic equipment | |
EP3357035A1 (en) | Method and apparatus for correction of an image | |
JPH05114045A (en) | Area separating method and image processor | |
KR20070113099A (en) | Image processing method | |
CN116485638A (en) | Image style migration method, device and equipment based on depth convolution network | |
CN109389600B (en) | Method and device for normalizing fundus images | |
CN110866487B (en) | Large-scale pedestrian detection and re-identification sample set construction method and device | |
KR100350790B1 (en) | method of adaptive object extraction by feature element learning object dependent | |
JPH06162109A (en) | Electronic filing system |
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 | ||
G170 | Publication of correction |