KR20180050967A - Device for extracting image - Google Patents

Device for extracting image Download PDF

Info

Publication number
KR20180050967A
KR20180050967A KR1020160147652A KR20160147652A KR20180050967A KR 20180050967 A KR20180050967 A KR 20180050967A KR 1020160147652 A KR1020160147652 A KR 1020160147652A KR 20160147652 A KR20160147652 A KR 20160147652A KR 20180050967 A KR20180050967 A KR 20180050967A
Authority
KR
South Korea
Prior art keywords
image
contour
background
input
current
Prior art date
Application number
KR1020160147652A
Other languages
Korean (ko)
Inventor
박미영
Original Assignee
주식회사 온비쥬얼
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 온비쥬얼 filed Critical 주식회사 온비쥬얼
Priority to KR1020160147652A priority Critical patent/KR20180050967A/en
Publication of KR20180050967A publication Critical patent/KR20180050967A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • 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/20112Image segmentation details
    • G06T2207/20132Image cropping

Landscapes

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

Abstract

The present invention relates to a device for extracting a subject from an image, the device including: a camera unit for photographing a region of a specific place to output an image signal; an outline detecting unit for calculating an outline image from the image photographed by the camera unit; a field memory for receiving the outline image calculated by the outline detecting unit and storing the outline image as a background outline image during one field; and a control unit for calculating a background outline image from an inputted background image and storing the calculated background outline image in the field memory when the background image photographed first by the camera unit is inputted, and then calculating a current outline image from an inputted current image when the current image photographed later by the camera unit is inputted, and then calculating and outputting an output outline image using the calculated current outline image and the stored background outline image.

Description

영상에서 배경을 지우기 위한 장치{DEVICE FOR EXTRACTING IMAGE}[0001] DEVICE FOR EXTRACTING IMAGES [0002]

본 발명은 영상에서 피사체 추출을 위한 장치 및 방법에 관한 것으로, 특히 영상에서 배경 영상을 미리 저장하고 이후 영상 신호가 입력되면 이후 입력되는 현재 영상과 미리 저장된 배경 영상을 이용하여 새로 나타난 피사체 영상을 추출하는 장치 및 방법에 관한 것이다.In particular, the present invention relates to an apparatus and method for extracting a subject from an image, and more particularly, to a method and apparatus for extracting a background image from an image and extracting a newly displayed subject image using a pre- And more particularly,

일반적으로 영상으로부터 배경을 지우는 작업은 포토샵과 같은 유틸리티 프로그램을 이용하여 일일이 사람이 손으로 지워나가는 방식으로 작업을 하게 되므로 영상으로부터 배경을 지우는 일에 많은 시간이 소요되는 문제가 발생하게 되며 따라서 이미지를 처리하는데 많은 비용을 발생시키는 원인이 된다. In general, erasing the background from the image requires a lot of time to erase the background from the image because the user manually erases the image by using a utility program such as Photoshop. Therefore, Which causes a great deal of cost in processing.

따라서 본 발명의 목적은 영상에서 광량 변화 또는 조도 변화에 대한 민감도가 낮은 윤곽선 영상을 이용하여 특정 영역을 확인하고, 특정영역과 다른 영역을 구분하여 배경을 지울 수 있도록 하는 장치 및 방법을 제공하는데 있다.SUMMARY OF THE INVENTION It is, therefore, an object of the present invention to provide an apparatus and method for identifying a specific region using an image having a low sensitivity to light intensity change or illumination change in an image, and deleting a background by distinguishing a specific region from another region .

영상에서 배경을 지우기 위한 장치는 특정 장소의 영역을 촬영하여 영상 신호로 출력하는 카메라부와, 상기 카메라로부터 촬영된 영상에서 윤곽선 영상을 산출하는 윤곽선 검출부와, 상기 윤곽선 검출부로부터 산출되는 상기 윤곽선 영상을 입력받아 한 필드 동안 배경 윤곽선 영상으로 저장하는 필드메모리와, 상기 카메라로부터 먼저 촬영된 배경 영상이 입력되면 상기 입력된 배경 영상에서 배경 윤곽선 영상을 산출하고 상기 산출된 배경 윤곽선 영상을 필드메모리에 저장한 후, 상기 카메라로부터 나중 촬영된 현재 영상이 입력되면 상기 입력된 현재 영상에서 현재 윤곽선 영상을 산출하고, 상기 산출된 현재 윤곽선 영상과 상기 저장된 배경 윤곽선 영상을 이용하여 출력 윤곽선 영상을 구하여 출력하는 제어부로 구성되는 것이 바람직하다. An apparatus for erasing a background in an image includes a camera unit for photographing an area of a specific place and outputting the image as a video signal, an outline detection unit for calculating an outline image from the image captured by the camera, and an outline detection unit A field memory for storing a background contour line image in a field for inputting and receiving a background image taken from the camera, a background contour line image is calculated in the input background image, and the calculated background contour line image is stored in a field memory A control unit for calculating a current contour line image from the input current image when a current image photographed later from the camera is inputted and outputting an output contour line image using the calculated current contour line image and the stored background contour line image, .

영상에서 배경을 지우기 위한 장치는 카메라로부터 먼저 촬영된 배경 영상이 입력되면 상기 입력된 배경 영상의 각 픽셀을 중심으로 소벨 윤곽선 검출 마스크를 이용한 계산을 수행하여 배경 윤곽선 영상을 산출하고 상기 산출된 배경 윤곽선 영상을 필드메모리에 저장하는 제1 과정과, 제1 과정 후, 상기 카메라로부터 나중 촬영된 현재 영상이 입력되면 상기 입력된 현재 영상에 대해 각 픽셀을 중심으로 소벨 윤곽선 검출 마스크를 이용한 계산을 수행하여 현재 윤곽선 영상을 산출하는 제2 과정과, 상기 산출된 입력 윤곽선 영상과 상기 저장된 배경 윤곽선 영상의 각 픽셀 값을 이용하여 출력 윤곽선 영상에 대응하는 각 픽셀 값을 구하는 제3 과정과, 상기 구해진 픽셀 값을 이용하여 출력 윤곽선 영상을 출력하는 제4 과정으로 이루어짐을 특징으로 한다. An apparatus for erasing a background in an image includes a background image generation unit for performing a calculation using a Sobel outline detection mask based on each pixel of the input background image when a background image photographed first from a camera is input to calculate a background outline image, A first step of storing an image in a field memory; and a step of performing a calculation using a Sobel contour detection mask around each pixel with respect to the input current image when a current image photographed later from the camera is inputted after the first step A third step of calculating each pixel value corresponding to the output contour image using each pixel value of the calculated input contour image and the stored background contour image; And outputting an output contour image by using the output contour image All.

상술한 바와 같이 본 발명의 영상에서 배경을 지우기 위한 장치는 먼저 입력되는 배경 영상 신호에서 미리 배경 윤곽선 영상을 산출 및 저장하고 이후 입력되는 현재 영상에 대한 현재 윤곽선 영상을 산출한다. 그리고 나서 산출된 현재 윤곽선 영상과 미리 저장된 배경 윤곽선 영상을 이용하여 출력 윤곽선 영상을 구하고 구해진 출력 윤곽 선 영상을 표시부에 표시한다.As described above, the apparatus for clearing the background in the image of the present invention calculates and stores a background contour image in advance in the input background image signal, and then calculates a current contour image of the current image to be input. Then, an output contour image is obtained using the current contour image and the previously stored background contour image, and the obtained output contour line image is displayed on the display unit.

여기서 출력 윤곽선 영상은 배경 윤곽선 영상에 새로 나타난 피사체의 윤곽선 영상을 나타낸다. 따라서 사용자는 상기 출력 윤곽선 영상을 통해 미리 저장된 배경 영상에 대해 새로 나타난 물체를 쉽게 인식할 수 있다. 또한, 본 발명의 피사체 추출 장치는 복잡한 배경 윤곽선 영상에서 불필요하게 많은 윤곽선들을 제거하고 새롭게 나타난 피사체의 윤곽선만 표시하므로 영상 처리의 정확도 및 효율성을 높일 수 있다.Here, the output contour image represents the contour image of the new object appearing on the background contour image. Accordingly, the user can easily recognize the newly displayed object with respect to the background image stored in advance through the output contour image. In addition, the object extracting apparatus of the present invention can remove unnecessarily large number of contour lines from a complicated background contour image and display only the outline of a newly displayed object, thereby improving the accuracy and efficiency of image processing.

도 1은 본 발명의 실시 예에 따른 영상에서 피사체 추출을 위한 장치의 블록 구성도이다.
도 2a 내지 도 2c는 본 발명의 실시 예에 따라 추출된 윤곽선 영상 일예도 이다.
도 3은 본 발명의 실시 예에 따른 피사체 추출을 위한 장치에서의 제어 흐름도이다.
도 4a 내지 도 4b는 본 발명의 실시 예에 따라 영상로부터 입력되는 영상에서 윤곽선 영상을 추출하기 위해 이용되는 소벨 마스크를 나타낸 도면이다.
도 5는 본 발명의 실시 예에 따라 추출된 배경 윤곽선 영상과 현재 윤곽선 영상을 이용하여 출력 윤곽선 영상을 구하는 방식을 설명하기 위한 도면이다.
1 is a block diagram of an apparatus for subject extraction in an image according to an embodiment of the present invention.
FIGS. 2A to 2C illustrate examples of extracted contour images according to an embodiment of the present invention.
3 is a control flowchart of an apparatus for subject extraction according to an embodiment of the present invention.
4A and 4B are Sobel masks used for extracting a contour image from an image input from an image according to an embodiment of the present invention.
5 is a diagram for explaining a method of obtaining an output contour image using the extracted background contour image and current contour image according to an embodiment of the present invention.

이하 본 발명의 바람직한 실시 예들을 첨부한 도면을 참조하여 상세히 설명한다. 도면들 중 동일한 구성요소들은 가능한 한 어느 곳에서든지 동일한 부호들로 나타내고 있음에 유의해야 한다. 또한 본 발명의 요지를 불필요하게 흐릴 수 있는 공지 기능 및 구성에 대한 상세한 설명은 생략한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. It is to be noted that the same elements among the drawings are denoted by the same reference numerals whenever possible. In the following description, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail.

도 1은 본 발명의 실시 예에 따른 영상에서 피사체 추출을 위한 장치의 블록 구성도이다. 도 1을 참조하면 본 발명의 실시 예에 따른 영상에서 피사체 추출을 위한 장치는 카메라(2), 전처리부(4), 제어부(6), 윤곽선 검출부(8), 필드 메모리(10), 표시부(12)로 구성된다.1 is a block diagram of an apparatus for subject extraction in an image according to an embodiment of the present invention. Referring to FIG. 1, an apparatus for extracting a subject in an image according to an embodiment of the present invention includes a camera 2, a preprocessing unit 4, a control unit 6, an outline detection unit 8, a field memory 10, 12).

카메라(2)는 광학상을 집광하고 입사된 광학상을 광전 변환을 통해 촬상한다. The camera 2 focuses the optical image and picks up the incident optical image through photoelectric conversion.

전처리부(4)는 카메라(2)로부터 출력된 영상 신호의 전처리를 수행한다. 본 발명의 실시 예에 따르면 전처리부(4)는 카메라(2)로부터 출력된 영상 신호에 대해밝기 조절(Contrast enhancement), 잡음 제거, 왜곡을 보완하기 위한 기하보정, 윤곽선 강조 처리를 수행하여 출력한다.The preprocessing unit (4) preprocesses the video signal output from the camera (2). According to an embodiment of the present invention, the preprocessing unit 4 performs contrast enhancement, noise removal, geometric correction and contour enhancement processing to compensate for distortion of the image signal output from the camera 2 .

제어부(6)는 전처리부(4)로부터 입력되는 영상을 통해 미리 배경 윤곽선 영상을 산출 및 저장하고, 이후 입력되는 영상 즉, 현재 영상에서 현재 윤곽선 영상을 산출한다. 그리고 제어부(6)는 산출된 현재 윤곽선 영상의 픽셀 값과 미리 저장된 배경 윤곽선 영상의 픽셀 값을 이용하여 출력 윤곽선 영상의 픽셀 값을 구하고 구해진 픽셀 값에 해당하는 출력 윤곽선 영상 신호를 출력한다.The control unit 6 calculates and stores the background contour image in advance through the image input from the preprocessing unit 4, and calculates the current contour image from the input image, that is, the current image. Then, the controller 6 obtains the pixel value of the output contour image using the pixel value of the calculated current contour image and the pixel value of the previously stored background contour image, and outputs the output contour image signal corresponding to the obtained pixel value.

윤곽선 검출부(8)는 제어부(6)의 제어 하에 전처리부(4)로부터 입력되는 영상에서 윤곽선 영상을 산출한다. 본 발명의 실시 예에 따르면 윤곽선 영상 검출부(8)는 소벨 윤곽선 검출 마스크(Sobel edge detection mask)를 이용한다.The contour detection unit 8 calculates an outline image from a video input from the preprocessing unit 4 under the control of the control unit 6. [ According to the embodiment of the present invention, the contour image detecting unit 8 uses a Sobel edge detection mask.

소벨 윤곽선 검출 마스크(이하 '소벨 마스크'라 칭함)는 2차 미분 연산자를 이용하여 해당 영상의 각 픽셀 값을 x축, y축으로 각각 한번씩 미분하는 알고리즘이다. 윤곽선 영상 검출부(8)는 상기 소벨 마스크를 이용하여 전처리부(4)로부터 입력되는 영상을 통해 윤곽선 영상을 산출하고 산출된 윤곽선 영상 신호를 출력한다.The Sobel outline detection mask (hereinafter referred to as "Sobel mask") is an algorithm for differentiating each pixel value of the corresponding image, once for each of the x-axis and the y-axis, using a second-order differential operator. The outline image detecting unit 8 calculates the outline image through the image input from the preprocessing unit 4 using the Sobel mask and outputs the calculated outline image signal.

필드메모리(10)는 제어부(6)의 제어 하에 윤곽선 검출부(8)로부터 출력되는 윤곽선 영상 신호를 입력받아 한 필드 동안 배경 윤곽선 영상으로 저장한다.The field memory 10 receives the outline video signal output from the outline detection unit 8 under the control of the control unit 6, and stores it as a background outline image for one field.

표시부(12)는 제어부(6)의 제어 하에 구해진 출력 윤곽선 영상에 대응하는 윤곽선 신호를 출력한다.The display unit 12 outputs an outline signal corresponding to the output contour image obtained under the control of the control unit 6. [

본 발명의 실시 예에 따르면 전술한 바와 같은 영상에서 피사체 추출 장치는 먼저 입력되는 배경 영상 신호에서 미리 배경 윤곽선 영상을 산출 및 저장하고 이후 입력되는 현재 영상에 대한 입력 윤곽선 영상을 산출한다. 그리고 나서 피사체 추출 장치는 산출된 현재 윤곽선 영상과 미리 저장된 배경 윤곽선 영상을 이용하여 출력 윤곽선 영상을 구하고 구해진 출력 윤곽선 영상에 대응하는 신호를 출력한다.According to the embodiment of the present invention, the object extracting apparatus in the image as described above calculates and stores the background contour image in advance in the input background image signal, and then calculates the input contour image for the current image to be input. Then, the subject extraction apparatus obtains an output contour image using the calculated current contour image and a previously stored background contour image, and outputs a signal corresponding to the obtained output contour image.

도 2a 내지 도 2c는 본 발명의 실시 예에 따라 산출된 윤곽선 영상 일예도이다. 도 2a 내지 도2c를 참조하면, 도 2a는 본 발명 실시 예에 따른 피사체 추출 장치가 먼저 입력되는 배경 영상 신호를 이용하여 산출한 배경 윤곽선 영상의 일예도를 보여준다. 그리고 도 2b는 본 발명의 실시 예에 따른 피사체 추출 장치가 이후 입력되는 현재 영상에 대해 산출한 현재 윤곽선 영상의 일예도를 보여준다. 또한, 도 2c는 본 발명의 실시 예에 따라 도 2b에 도시된 바와 같은 산출된 현재 윤곽선 영상과 도 2a에 도시된 바와 같은 배경 윤곽선 영상을 이용하여 구해진 출력 윤곽선 영상의 일예도를 보여준다. 여기서 도 2c에 도시된 출력 윤곽선 영상은 도 2a에 도시된 배경 윤곽선 영상과 대비하여 도 2b에 도시된 현재 윤곽선 영상에 새로 나 타난 피사체(100)의 윤곽선 영상이 추출된 것이다. 사용자는 상기 도 2c에 도시된 출력윤곽선 영상을 통해 미리 저장된 배경 윤곽선 영상에 대해 새로 나타난 피사체(100)를 쉽게 인식할 수 있다.FIGS. 2A to 2C are examples of contour images generated according to an embodiment of the present invention. 2A through 2C, FIG. 2A illustrates an example of a background contour image calculated using a background image signal input by an object extracting apparatus according to an exemplary embodiment of the present invention. FIG. 2B illustrates an example of a current contour image calculated for a current image input by the subject extracting apparatus according to an embodiment of the present invention. 2C shows an example of an output contour image obtained by using the calculated current contour image as shown in FIG. 2B and the background contour image as shown in FIG. 2A according to an embodiment of the present invention. The output contour image shown in FIG. 2C is obtained by extracting a contour image of a newly-appearing subject 100 in the current contour image shown in FIG. 2B in contrast to the background contour image shown in FIG. 2A. The user can easily recognize the newly displayed subject 100 with respect to the previously stored background contour image through the output contour image shown in FIG. 2C.

도 3은 본 발명의 실시 예에 따른 영상에서 피사체 추출을 위한 장치의 제어 흐름도이고, 도 4a 내지 도 4b는 본 발명의 실시 예에 따라 영상에 입력되는 영상에서 윤곽선 영상 추출 시 이용되는 소벨 마스크를 나타낸 도면이다. 그리고 도 5는 본 발명의 실시 예에 따라 추출된 배경 윤곽선 영상과 현재 윤곽선 영상을 이용하여 출력 윤곽선 영상을 구하는 방식을 설명하기 위한 도면이다.FIG. 3 is a flowchart illustrating an apparatus for extracting a subject in an image according to an exemplary embodiment of the present invention. FIGS. 4A and 4B illustrate a Sobel mask used for extracting a contour image from an image input to an image according to an embodiment of the present invention. Fig. FIG. 5 is a diagram for explaining a method of obtaining an output contour image using a extracted background contour image and a current contour image according to an embodiment of the present invention.

이하 도 1 내지 도 5를 참조하여 본 발명의 실시 예에 따른 피사체 추출 장치가 먼저 입력되는 배경 영상에 대한 배경 윤곽선 영상과 이후 입력되는 현재 영상에 대한 현재 윤곽선 영상을 이용하여 출력 윤곽선 영상을 표시하는 과정을 설명한다.1 to 5, an object extracting apparatus according to an exemplary embodiment of the present invention displays an output contour image using a background contour image for a background image input first and a contour image for a current image input thereafter Describe the process.

제어부(6)는 도 3의 20단계에서 배경 윤곽선 영상을 산출하고, 산출된 배경 윤곽선 영상을 필드메모리(10)에 저장한다. 즉, 제어부(6)는 카메라(2)로부터 촬영된 배경 영상 신호가 입력되면 윤곽선 검출부(8)를 통해 배경 윤곽선 영상을 산출한다. 이때 윤곽선 검출부(8)는 제어부(6)의 제어 하에 카메라(2)로부터 촬영된 배경 영상 신호에 대해 각 픽셀을 중심으로 소벨 마스크를 이용한 계산을 수행하여 배경 윤곽선 영상의 각 픽셀 값을 산출한다. 즉, 윤곽선 검출부(8)는 입력된 배경 영상에 대해 3a에 도시된 바와 같은 3 ×3 소벨 마스크(수직방향)와 도 3b에 도시된 바와 같은 3 ×3 소벨 마스크(수평방향)를 이용하여 배경 윤곽선 영상의 각 픽 셀 값을 산출한다. 좀더 구체적으로 설명하면, 윤곽선 검출부(8)는 입력되는 배경 영상의 전체 픽셀에 대하여 가로 방향으로 도 3a에 도시된 바와 같은 3 ×3수평방향 소벨 마스크를 곱한 다음 가운데 픽셀을 중심으로 주위 8개 픽셀 값의 평균을 구한다. 그리고 입력된 배경 영상의 전체 픽셀에 대하여 세로 방향으로 도 3b에 도시된 바와 같은 3 ×3 수직방향 소벨 마스크를 곱한 다음 가운데 픽셀을 중심으로 주위 8개 픽셀 값의 평균을 구하여 가로 상기 구한 가로방향의 계산 결과에 더한다. 그리고 나서 윤곽선 추출부(8)는 윤곽선 강화를 위하여 각 픽셀 값의 평균을 계산하고 계산된 평균값을 이용하여 경계값 처리(Thresholding)를 수행한다. 경계값 처리란 배경 윤곽선 영상의 각 픽셀 값이 각 픽셀 값의 평균값 이상일 경우에는 픽셀 값을 1로, 그 외의 경우는 0으로 하는 것을 말하며 다음과 같은 식에 의해 구해질 수 있다.The control unit 6 calculates the background contour image in step 20 of FIG. 3, and stores the calculated contour image in the field memory 10. That is, the control unit 6 calculates the background contour image through the contour detecting unit 8 when the background video signal photographed from the camera 2 is input. At this time, the contour detecting unit 8 calculates each pixel value of the background contour image by performing calculation using the Sobel mask on each pixel with respect to the background image signal photographed from the camera 2 under the control of the control unit 6. That is, the contour detecting unit 8 detects the background image using the 3 × 3 Sobel mask (vertical direction) as shown in 3a and the 3 × 3 Sobel mask (horizontal direction) as shown in FIG. And calculates each pixel value of the outline image. More specifically, the contour detecting unit 8 multiplies all of the pixels of the input background image by a 3 × 3 horizontal direction Sobel mask as shown in FIG. 3A in the horizontal direction, The average of the values is obtained. Then, all the pixels of the inputted background image are multiplied by a 3 × 3 vertical direction Sobel mask as shown in FIG. 3B in the vertical direction, and an average of 8 surrounding pixels around the center pixel is obtained. Add to the calculation result. Then, the contour extracting unit 8 calculates the average of each pixel value for contour enhancement and performs threshold value processing using the calculated average value. The boundary value processing means that the pixel value is set to 1 when the pixel value of the background contour image is equal to or more than the average value of each pixel value and is set to 0 otherwise.

수학식 2Equation 2

f(x, y) > = t 이면 g(x, y) = 1If f (x, y) > = t, g (x, y) = 1

f(x, y) < t 이면 g(x, y) = 0If f (x, y) <t, g (x, y) = 0

상기 수학식 2에서 f(x, y), g(x, y)는 각각 소벨 윤곽선 검출 전후의 위치(x, y)의 픽셀 값을, t는 경계값(threshold) 즉, 평균값을 나타낸다. 상기 경계값 처리는 수학식 2에서 경계값을 기준으로 반대로 처리될 수도 있다. 즉, 배경 윤곽선 영상의 각 픽셀 값이 각 픽셀 값의 평균값 이상일 경우에는 픽셀 값을 0으로, 그 외의 경우는 1로 처리될 수 있다.In Equation (2), f (x, y) and g (x, y) represent the pixel values of the position (x, y) before and after the Sobel contour detection and t represents the threshold value or average value. The boundary value processing may be reversed on the basis of the boundary value in Equation (2). That is, if each pixel value of the background contour image is equal to or greater than the average value of each pixel value, the pixel value can be processed as 0, otherwise, it can be processed as 1.

제어부(6)는 상기한 바와 같이 산출된 배경 윤곽선 영상의 각 픽셀 값을 필드메모리(10)에 저장한다. 그리고 나서 제어부(6)는 22단계에서 카메라(2)로부터 촬영된 현재 영상 신호를 입력받는다. 제어부(6)는 카메라(2)로부터 촬영된 현재 영상 신호를 입력받은 후, 24단계로 진행하여 입력받은 현재 영상 신호에서 현재 윤곽선 영상을 산출한다. 이때 제어부(6) 윤곽선 검출부(8)를 통해 현재 윤곽선 영상을 산출한다. 윤곽선 검출부(8)가 현재 윤곽선 영상을 검출하는 방식은 전술한 배경 윤곽선 영상을 검출하는 방식과 유사하다. 즉, 윤곽선 추출부(8)는 현재 영상의 전체 픽셀에 대하여 가로 방향으로 도 3a에 도시된 바와 같은 3 ×3수평방향 소벨 마스크를 곱한 다음 가운데 픽셀을 중심으로 주위 8개 픽셀 값의 평균을 구한다. 그리고 입력된 현재 영상의 전체 픽셀에 대하여 세로 방향으로 도 3b에 도시된 바와 같은 3 ×3 수직방향 소벨 마스크를 곱한 다음 가운데 픽셀을 중심으로 주위 8개 픽셀 값의 평균을 구하여 가로 방향의 계산 결과에 더한다. 그리고 나서 윤곽선 추출부(8)는 입력된 현재 영상의 각 픽셀 값의 평균을 계산하고 계산된 평균값을 이용하여 경계값 처리(Thresholding)를 수행한다. 이때 윤곽선 추출부(8)는 현재 영상의 픽셀 값이 상기 평균값 이상일 경우에는 현재 윤곽선 영상의 픽셀 값을 1로, 그 외의 경우는 0으로 한다. 여기서 상기 현재 윤곽선 영상의 각 픽셀 값이 각 픽셀 값의 평균값 이상일 경우 픽셀 값을 0으로, 그 외의 경우는 1로 처리될 수도 있다.The control unit 6 stores each pixel value of the background contour image calculated as described above in the field memory 10. Then, the control unit 6 receives the current video signal photographed from the camera 2 in step 22. The control unit 6 receives the current image signal photographed from the camera 2, and then proceeds to step 24 to calculate the current contour image from the received current image signal. At this time, the control unit 6 calculates the current contour image through the contour detecting unit 8. The manner in which the contour detection unit 8 detects the contour image is similar to the method of detecting the contour image described above. That is, the contour extracting section 8 multiplies all the pixels of the current image by a 3x3 horizontal direction Sobel mask as shown in FIG. 3A in the horizontal direction, and then obtains an average of eight surrounding pixel values around the middle pixel . Then, all the pixels of the input current image are multiplied by a 3 × 3 vertical direction Sobel mask as shown in FIG. 3B in the vertical direction, and an average of 8 pixel values around the center pixel is obtained. Add. Then, the contour extracting unit 8 calculates an average of each pixel value of the input current image and performs threshold value processing using the calculated average value. At this time, if the pixel value of the current image is equal to or higher than the average value, the contour extracting unit 8 sets the pixel value of the current contour image to 1, and otherwise, Here, if the pixel value of the current contour image is equal to or greater than the average value of each pixel value, the pixel value may be treated as 0, otherwise, the pixel value may be treated as 1.

제어부(6)는 상기한 바와 같이 전처리부(4)로부터 입력되는 현재 영상 신호로부터 현재 윤곽선 영상의 픽셀 값을 산출하고 나서 26단계로 진행한다. 제어부(6)는 26단계에서 산출된 현재 윤곽선 영상의 픽셀 값과 미리 저장된 배경 윤곽선의 픽셀 값을 이용하여 출력 윤곽선의 픽셀 값을 산출한다. 즉, 제어부(6)는 도 4에 도시된 바와 같이 미리 저장된 배경 윤곽선의 픽셀 값이 '0'이고 현재 윤곽선의 픽셀 값이 '0'이면 출력 윤곽선의 픽셀 값을 '0'으로 산출한다. 그리고 제어부(6)는 미리 저장된 배경 윤곽선의 픽셀 값이 '0'이고 현재 윤곽선의 픽셀 값이 '1'이면 출력 윤곽선의 픽셀 값을 '1'로 산출한다. 또한, 제어부(6)는 배경 윤곽선의 픽셀 값이 '1' 이고 현재 윤곽선의 픽셀 값이 '0'이면 출력 윤곽선의 픽셀 값을 '0'으로 산출하고, 배경 윤곽선의 픽셀 값이 '1'일 때 현재 윤곽선의 픽셀 값이 '1'이면 출력 윤곽선의 픽셀값을 '1'로 산출한다. 제어부(8)는 출력 윤곽선 영상의 픽셀 값이 구해지면 28단계에서 표시부(12)를 통해 구해진 픽셀 값에 해당하는 출력 윤각선 영상을 표시한다. 이때 표시부(12)에 표시되는 출력 윤곽선 영상은 배경 윤곽선 영상에 새로 나타난 피사체의 윤곽선 영상(100)임이 바람직하다.The control unit 6 calculates the pixel value of the current contour image from the current image signal input from the preprocessing unit 4 as described above, and then proceeds to step 26. [ The controller 6 calculates the pixel value of the output contour using the pixel value of the current contour image calculated in step 26 and the pixel value of the previously stored background contour. That is, as shown in FIG. 4, the controller 6 calculates the pixel value of the output contour line as '0' when the pixel value of the background contour line stored in advance is '0' and the pixel value of the current contour line is '0'. If the pixel value of the background contour stored in advance is '0' and the pixel value of the current contour line is '1', the control unit 6 calculates the pixel value of the output contour line as '1'. If the pixel value of the background contour line is '1' and the pixel value of the current contour line is '0', the controller 6 calculates the pixel value of the output contour line as '0', and if the pixel value of the background contour line is '1' , The pixel value of the output contour line is calculated as '1' when the pixel value of the current contour line is '1'. When the pixel value of the output contour image is obtained, the control unit 8 displays the output angle image corresponding to the pixel value obtained through the display unit 12 in step 28. At this time, the output contour image displayed on the display unit 12 is preferably the contour image 100 of the object newly displayed in the background contour image.

상술한 본 발명의 설명에서는 구체적인 실시 예에 관해 설명하였으나, 여러 가지 변형이 본 발명의 범위에서 벗어나지 않고 실시할 수 있다. 따라서 본 발명의 범위는 설명된 실시 예에 의하여 정할 것이 아니고 특허청구범위와 특허청구범위의 균등한 것에 의해 정해 져야 한다.While the present invention has been described in connection with what is presently considered to be practical exemplary embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. Therefore, the scope of the present invention should not be limited by the described embodiments but should be determined by the equivalents of the claims and the claims.

2 : 카메라부
4 : 전처리부
6 : 윤곽선 영상 산출부
8 : 제어부
10 : 필드메모리
12 : 표시부
2:
4:
6: contour image calculating section
8:
10: Field memory
12:

Claims (7)

영상에서 배경을 지우기 위한 장치에 있어서,
특정 장소의 영역을 촬영하여 영상 신호로 출력하는 카메라부와, 상기 카메라로부터 촬영된 영상에서 윤곽선 영상을 산출하는 윤곽선 검출부와, 상기 윤곽선 검출부로부터 산출되는 상기 윤곽선 영상을 입력받아 한 필드 동안 배경 윤곽선 영상으로 저장하는 필드메모리와, 상기 카메라로부터 먼저 촬영된 배경 영상이 입력되면 상기 입력된 배경 영상에서 배경 윤곽선 영상을 산출하고 상기 산출된 배경 윤곽선 영상을 필드메모리에 저장한 후, 상기 카메라로부터 나중 촬영된 현재 영상이 입력되면 상기 입력된 현재 영상에서 현재 윤곽선 영상을 산출하고, 상기 산출된 현재 윤곽선 영상과 상기 저장된 배경 윤곽선 영상을 이용하여 출력 윤곽선 영상을 구하여 출력하는 제어부로 구성됨을 특징으로 하는 영상에서 배경을 지우기 위한 장치.
An apparatus for erasing a background in an image,
A contour line detecting unit for calculating contour line images from the image photographed by the camera; and a contour detecting unit for receiving the contour line image calculated from the contour detecting unit, A background memory for storing the generated background contour image in the field memory when the background image photographed first from the camera is inputted, and the background contour image is calculated in the input background image, the calculated background contour image is stored in the field memory, And a controller for calculating a current contour line image from the input current image when the current image is input and outputting an output contour line image using the calculated current contour line image and the stored background contour line image, / RTI &gt;
제1항에 있어서,
상기 카메라로부터 입력된 영상 신호의 전처리를 수행하여 출력하는 전처리부를 더 포함함을 특징으로하는 영상에서 배경을 지우기 위한 장치.
The method according to claim 1,
Further comprising: a preprocessor for performing preprocessing of the video signal input from the camera and outputting the preprocessed video signal.
제1항에 있어서,
상기 제어부로부터 출력된 출력 윤곽선 영상을 표시하는 표시부를 더 포함함을 특징으로 하는 영상에서 배경을 지우기 위한 장치.
The method according to claim 1,
And a display unit for displaying an output contour image output from the control unit.
제2항에 있어서,
상기 전처리부는 상기 카메라로부터 출력된 영상 신호에 대해 밝기 조절, 잡음 제거, 기하 보정, 윤곽선 강조처리 중 하나 이상의 전처리를 수행함을 특징으로 하는 영상에서 배경을 지우기 위한 장치.
3. The method of claim 2,
Wherein the preprocessor performs at least one of brightness adjustment, noise removal, geometric correction, and contour enhancement processing on the image signal output from the camera.
제1항에 있어서,
상기 윤곽선 검출부는 소벨 윤곽선 검출 마스크를 이용하여 윤곽선 영상을 산출함을 특징으로 하는 영상에서 배경을 지우기 위한 장치.
The method according to claim 1,
Wherein the contour detection unit calculates a contour line image using a Sobel contour detection mask.
제5항에 있어서,
상기 윤곽선 검출부는 카메라로부터 촬영된 영상이 입력되면 상기 입력된 영상에 대해 소벨 윤곽선 검출 마스크를 이용한 계산을 수행하여 상기 입력된 영상에 대한 윤곽선 영상을 산출함을 특징으로 하는 영상에서 배경을 지우기 위한 장치.
6. The method of claim 5,
Wherein the contour detection unit calculates a contour line image for the input image by performing calculation using a Sobel contour detection mask for the input image when a captured image is input from a camera, .
제5항에 있어서,
상기 윤곽선 검출부는 카메라로부터 촬영된 영상이 입력되면 상기 입력된 영상에 대해 입력된 각 픽셀을 중심으로 소벨 윤곽선 검출 마스크를 이용한 계산을 수행하여 입력된 영상의 각 픽셀 값을 산출하고 상기 산출된 각 픽셀 값의 평균값을 계산하여 해당 픽셀의 값이 상기 평균값 이상이면 상기 해당 픽셀의 값을 1로 하고, 해당 픽셀의 값이 상기 평균값 이하이면 상기 해당 픽셀의 값을 0으로 하여 출력 윤곽선 영상을 산출함을 특징으로 하는 영상에서 배경을 지우기 위한 장치.
6. The method of claim 5,
Wherein the contour detection unit calculates each pixel value of the input image by performing calculation using a Sobel contour detection mask around each pixel input to the input image when a captured image is input from the camera, Calculating an average value of the pixel values and outputting the output contour image by setting the value of the corresponding pixel to 1 if the value of the pixel is equal to or greater than the average value and setting the value of the corresponding pixel to 0 if the value of the corresponding pixel is less than the average value; A device for erasing a background from a feature image.
KR1020160147652A 2016-11-07 2016-11-07 Device for extracting image KR20180050967A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160147652A KR20180050967A (en) 2016-11-07 2016-11-07 Device for extracting image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160147652A KR20180050967A (en) 2016-11-07 2016-11-07 Device for extracting image

Publications (1)

Publication Number Publication Date
KR20180050967A true KR20180050967A (en) 2018-05-16

Family

ID=62451880

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160147652A KR20180050967A (en) 2016-11-07 2016-11-07 Device for extracting image

Country Status (1)

Country Link
KR (1) KR20180050967A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220080253A (en) * 2020-12-07 2022-06-14 동의대학교 산학협력단 Classification of defective plating of hexagonal nuts using object segmentation pre-processing and convolutional neural network

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220080253A (en) * 2020-12-07 2022-06-14 동의대학교 산학협력단 Classification of defective plating of hexagonal nuts using object segmentation pre-processing and convolutional neural network

Similar Documents

Publication Publication Date Title
KR101861153B1 (en) Image processing apparatus and control method thereof
JP5781743B2 (en) Image processing apparatus, image processing method, and image processing program
KR101662846B1 (en) Apparatus and method for generating bokeh in out-of-focus shooting
JP4739870B2 (en) Sunglasses detection device and face center position detection device
KR102390918B1 (en) Defog system
CN110519485B (en) Image processing method, image processing device, storage medium and electronic equipment
US11538175B2 (en) Method and apparatus for detecting subject, electronic device, and computer readable storage medium
JP6525543B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM
JP2017138647A (en) Image processing device, image processing method, video photographing apparatus, video recording reproduction apparatus, program and recording medium
US20220124236A1 (en) Image processing device, image processing method, program and image processing system
CN112001853A (en) Image processing apparatus, image processing method, image capturing apparatus, and storage medium
US9338354B2 (en) Motion blur estimation and restoration using light trails
JP5974205B1 (en) Image processing apparatus and method of operating image processing apparatus
KR20180050967A (en) Device for extracting image
KR101553707B1 (en) Image stain detection method for camera module defect determination
KR20170131865A (en) Appratus method for extracting image
JP2020021314A (en) Image processing system and image processing method
JP6661268B2 (en) Image processing apparatus, image processing method, and program
JP2006277688A (en) Apparatus and method for improving image quality, and program therefor
KR20100081099A (en) Apparatus and method for out-focasing
JP6556033B2 (en) Image processing apparatus, image processing method, and program
KR20040083661A (en) Appratus and method for extracting subject in observing camera
JP4448119B2 (en) Image processing apparatus, noise removal method, and noise removal filter
KR101592732B1 (en) Apparatus for removing snow rain image in camera images and method for removing snow rain image using the same
JP4292219B2 (en) Image processing apparatus and image processing program