KR101693643B1 - Apparatus and method for inpainting image - Google Patents

Apparatus and method for inpainting image Download PDF

Info

Publication number
KR101693643B1
KR101693643B1 KR1020150132537A KR20150132537A KR101693643B1 KR 101693643 B1 KR101693643 B1 KR 101693643B1 KR 1020150132537 A KR1020150132537 A KR 1020150132537A KR 20150132537 A KR20150132537 A KR 20150132537A KR 101693643 B1 KR101693643 B1 KR 101693643B1
Authority
KR
South Korea
Prior art keywords
patch
candidate
target
difference value
image
Prior art date
Application number
KR1020150132537A
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 KR1020150132537A priority Critical patent/KR101693643B1/en
Application granted granted Critical
Publication of KR101693643B1 publication Critical patent/KR101693643B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/001Image restoration

Abstract

The present invention relates to an apparatus and a method for restoring an image. The image restoration apparatus according to the present invention includes: a patch priority detection unit configured to detect a priority of a target patch having a predetermined pixel region including a target region which is set by a target region setting unit and a source region in the form of an original image; a comparison patch selection unit for selecting a candidate patch to be compared with similar images by using an average value and a standard deviation of known pixels of each target patch detected by the patch priority detection unit and an average value and a standard deviation calculated by a candidate patch calculation unit; a similar image patch detection unit for detecting a most similar candidate patch by stopping calculation and setting a patch difference value with respect to a next similar image candidate patch when the patch difference value between the known pixels of each target patch detected by the patch priority detection unit and the corresponding pixels of the similar image comparison candidate patch selected by the comparison patch selection unit is greater than the minimum patch difference value, and resetting the minimum patch difference value when the patch difference value is less than the previous patch difference value; and a patch restoration processing unit for restoring the patch by copying corresponding pixels of the candidate patch, which is detected by the similar image patch detection unit, to an unknown area of the target patch. The image can be restored by detecting the most similar candidate patch at a high speed.

Description

이미지 복원 장치 및 방법{APPARATUS AND METHOD FOR INPAINTING IMAGE}[0001] APPARATUS AND METHOD FOR INPAINTING IMAGE [0002]

본 발명은 이미지 복원 장치 및 방법에 관한 것으로, 원본에 근거한 이미지 복원 방법에서 비교 대상의 후보 패치를 줄여서 가장 유사한 후보 패치를 고속으로 검출하여 이미지를 복원하는 이미지 복원 장치 및 방법에 관한 것이다.The present invention relates to an image restoration apparatus and method, and more particularly, to an image restoration apparatus and method for restoring an image by rapidly detecting a candidate patch that is the most similar by reducing a candidate patch of a comparison object in an original image restoration method.

이미지 복원 기술은 이미지의 미지 영역을 채우는 것과 관련된 기술로, 스크래치들과 얼룩들을 제거하고, 이미지가 제거된 부분들을 회복하고, 그리고 원하지 않는 오브젝트를 제거한 후 사람의 눈에 그럴듯하게 보이는 배경으로 대체하는 것들을 포함한다.Image restoration technology is a technology related to filling in the unknown area of an image, which removes scratches and stains, restores the parts of the image that have been removed, and removes unwanted objects and replaces them with a plausible looking background ≪ / RTI >

이러한 이미지 복원 방법은 크게 PDE(Partial Difference Equation)에 근거하거나 원본(Exemplar)에 근거하여 이미지를 복원한다. PDE에 근거한 이미지 복원 방법은 이웃하는 기지의 픽셀들을 확산시킴으로써 미지의 영역을 채우게 되는데, 스크래치들과 같은 작은 갭들을 채우는 경우에는 우수하나 이미지가 제거된 영역들이 넓으면 좋은 결과를 얻을 수 없었다. This image restoration method largely restores an image based on PDE (Partial Difference Equation) or based on an original (Exemplar). The PDE-based image reconstruction method fills an unknown area by spreading neighboring known pixels. In the case of filling small gaps such as scratches, it is excellent, but it is not possible to obtain a good result when the areas where the image is removed are wide.

한편, Criminisi 등은 원본에 근거한 이미지 복원 방법을 비특허문헌 1에 제안하였다. 이 이미지 복원 방법은 이미지의 미지 영역을 기지의 이미지로부터 채우는 방법으로, 먼저 경계선을 포함한 미지 영역과 기지 영역을 타겟 패치로 선택하고 기지 영역으로부터 같은 크기의 모든 패치에 대해 유사 여부를 판단하여 베스트 패치를 선택함으로써 미지 영역을 반복적으로 채운다. 그러나 이 이미지 복원 방법은 이미지 복원과 관련된 처리량이 너무 많아 스마트폰과 같은 작은 디바이스에서는 처리 시간이 너무 길어지는 문제점이 있었다.On the other hand, Criminisi et al. Proposed an image-based image restoration method in Non-Patent Document 1. This image restoration method is a method of filling the unknown region of the image from the base image. First, the unknown region including the boundary and the base region are selected as the target patches, and similarity judgment is performed for all the patches of the same size from the base region. To fill the unknown area repeatedly. However, this image restoration method has a problem that the processing time is too long in a small device such as a smart phone because the throughput related to image restoration is too large.

따라서 본 출원인은 가장 유사한 후보 패치를 고속으로 검출하여 이미지를 복원하는 이미지 복원 장치 및 방법을 출원하여 특허등록 제1539013호를 받았다. 하지만, 영상 품질의 저하 없은 더 빠른 복원은 여전히 요구된다. Accordingly, the present applicant filed a patent application No. 1539013 for an image restoration apparatus and method for recovering an image by detecting the most similar candidate patch at high speed. However, faster restoration without degradation of image quality is still required.

특허문헌 1 : 한국특허등록 제1539013호Patent Document 1: Korea Patent No. 1539013

비특허문헌 1 : IEEE TRANSACTIONS ON IMAGE PROCESSING VOL.13 NO.9,SEP 2004(Region Filling and Object Removal by Exemplar-Based Image Inpainting) Non-Patent Document 1: IEEE TRANSACTIONS ON IMAGE PROCESSING VOL.13 NO.9, SEP 2004 (Region Filling and Object Removal by Exemplar-Based Image Inpainting)

상술한 문제점을 해결하기 위해, 본 발명은 원본에 근거한 이미지 복원 방법에서 비교 대상의 후보 패치를 줄여서 가장 유사한 후보 패치를 고속으로 검출하여 이미지를 복원하는 이미지 복원 장치 및 방법을 제공하는 것을 목적으로 한다.In order to solve the above-described problems, it is an object of the present invention to provide an image restoration apparatus and method for restoring an image by detecting a candidate patch of a comparative object at a high speed by reducing a candidate patch to be compared in an original- .

상술한 목적을 달성하기 위해, 본 발명의 일실시예에 따른 이미지 복원 장치는 원본 이미지에서 복원이 필요한 영역을 타겟 영역으로 설정하는 타겟 영역 설정부와, 원본 이미지로 된 소스 영역의 후보 패치들의 평균값 및 표준편차를 계산하는 후보 패치 계산부와, 상기 타겟 영역 설정부에서 설정된 타겟 영역과 원본 이미지로 된 소스 영역을 포함하는 소정의 픽셀 영역을 갖는 타겟 패치의 우선순위를 검출하는 패치 우선순위 검출부와, 상기 패치 우선순위 검출부에서 검출된 각 타겟 패치의 기지의 픽셀들의 평균값 및 표준편차와 상기 후보 패치 계산부에서 계산된 평균값 및 표준편차를 이용하여 유사 이미지를 비교할 후보 패치를 선택하는 비교 패치 선택부와, 상기 패치 우선순위 검출부에서 검출된 각 타겟 패치의 기지의 픽셀들과 상기 비교 패치 선택부에서 선택된 유사 이미지 비교 후보 패치의 대응하는 픽셀들의 패치 차이 값이 최소 패치 차이 값보다 크면 계산을 중지한 후 다음의 유사 이미지 비교 후보 패치에 대하여 패치 차이 값을 수행하고, 이전의 패치 차이 값보다 작으면 최소 패치 차이 값으로 저장함으로써 가장 유사한 후보 패치를 검출하는 유사 이미지 패치 검출부와, 및 타겟 패치의 미지 영역에 상기 유사 이미지 패치 검출부에서 검출된 후보 패치의 대응하는 픽셀들을 복사하여 복원하는 패치 복원 처리부를 제공한다. According to an aspect of the present invention, there is provided an image restoration apparatus including a target region setting unit configured to set a target region in an original image to be restored, A patch priority calculation unit for calculating a priority of a target patch having a predetermined pixel area including a target area set in the target area setting unit and a source area in the original image, A comparison patch selection unit for selecting a candidate patch to be compared with a similar image by using an average value and a standard deviation of known pixels of each target patch detected by the patch priority detection unit and an average value and a standard deviation calculated by the candidate patch calculation unit, And comparing the known pixels of each target patch detected by the patch priority detector with the known pixels If the patch difference value of the corresponding pixels of the similar image comparison candidate patch selected by the value selection unit is larger than the minimum patch difference value, the calculation is stopped and then the patch difference value is performed for the next similar image comparison candidate patch, A similar image patch detection section for detecting the most similar candidate patch by storing the same as the minimum patch difference value, and a corresponding pixel of the candidate patch detected by the similar image patch detection section in the unknown area of the target patch, And provides a patch restoration processing unit.

상기 비교 패치 선택부는 상기 패치 우선순위 검출부에서 검출된 각 타겟 패치의 기지의 픽셀들의 평균값 및 표준편차와 상기 후보 패치 계산부에서 계산된 평균값 및 표준편차를 이용하여 하부 바운드를 계산하고, 계산된 하부 바운드가 현재의 최소 패치 차이 값보다 크면, 해당 후보 패치는 스킵되고, 현재의 최소 패치 차이 값보다 작으면 유사 이미지 비교 후보 패치로 선택될 수 있다.The comparison patch selection unit may calculate a lower bound using an average value and a standard deviation of known pixels of each target patch detected by the patch priority detection unit, an average value and a standard deviation calculated by the candidate patch calculation unit, If the bound is greater than the current minimum patch difference value, the candidate patch is skipped, and if it is smaller than the current minimum patch difference value, the similar image comparison candidate patch can be selected.

상기 유사 이미지 패치 검출부는 소스 영역의 픽셀들에 대해 히스토그램을 이용하여 각 스케일 값의 빈도수를 구하고, 타겟 소스의 기지의 픽셀들 중 빈도수가 낮은 스케일 값을 갖는 픽셀의 순서로 패치 차이 값을 계산할 수 있다. The similar image patch detector may calculate the patch difference value in the order of the pixels having the low frequency value among the known pixels of the target source by using the histogram for the pixels of the source area, have.

상기 유사 이미지 패치 검출부는 소스 영역에서의 후보 패치들 중 타겟 패치와 거리가 가까운 순서로 패치 차이 값을 계산할 수 있다.The similar image patch detection unit may calculate the patch difference value in the order of closest proximity to the target patch among the candidate patches in the source region.

본 발명의 다른 실시예에 따른 이미지 복원 방법은 원본 이미지에서 복원이 필요한 영역을 타겟 영역으로 설정하는 단계와, 원본 이미지로 된 소스 영역의 후보 패치들의 평균값 및 표준편차를 계산하는 단계와, 상기 타겟으로 설정하는 단계에서 설정된 타겟 영역과 원본 이미지로 된 소스 영역을 포함하는 소정의 픽셀 영역을 갖는 타겟 패치의 우선순위를 검출하는 단계와, 상기 우선순위를 검출하는 단계에서 검출된 각 타겟 패치의 기지의 픽셀들의 평균값 및 표준편차와 상기 후보 패치들의 평균값 및 표준편차를 계산하는 단계에서 계산된 평균값 및 표준편차를 이용하여 유사 이미지를 비교할 후보 패치를 선택하는 단계와, 상기 우선순위를 검출하는 단계에서 검출된 타겟 패치의 기지의 픽셀들과 상기 후보 패치를 선택하는 단계에서 선택된 유사 이미지 비교 후보 패치의 대응하는 픽셀들의 패치 차이 값이 최소 패치 차이 값보다 크면 계산을 중지한 후 다음 유사 이미지 비교 후보 패치에 대하여 패치 차이 값을 수행하고, 이전의 패치 차이 값보다 작으면 최소 패치 차이 값으로 저장함으로써 가장 유사한 후보 패치를 검출하는 단계와, 및 타겟 패치의 미지 영역에 상기 가장 유사한 휴보 패치를 검출하는 단계에서 검출된 후보 패치의 대응하는 픽셀들을 복사하여 복원하는 단계를 제공함으로써, 상술한 목적을 달성할 수 있다.According to another aspect of the present invention, there is provided an image restoration method including: setting an area requiring restoration in an original image as a target area; calculating an average value and a standard deviation of candidate patches of a source area as an original image; The method comprising the steps of: detecting a priority of a target patch having a predetermined pixel area including a target area set as an original image and a source area set as an original image; and detecting a priority of each target patch detected in the step of detecting the priority Selecting candidate patches to be compared with similar images using the average value and standard deviation of the pixels of the candidate patches and the average value and standard deviation calculated in the step of calculating the average and standard deviation of the candidate patches, Selecting the candidate patches from the known pixels of the detected target patches, If the patch difference value of the corresponding pixels of the image comparison candidate patch is larger than the minimum patch difference value, the calculation is stopped and then the patch difference value is performed for the next similar image comparison candidate patch. If the patch difference value is smaller than the previous patch difference value, Detecting the most similar candidate patch by storing the difference value as a difference value and detecting the most similar hatching patch in the unknown region of the target patch by providing the step of copying and restoring the corresponding pixels of the detected candidate patch, The above-described object can be achieved.

상술한 구성에 의해, 본 발명은 가장 유사한 후보 패치를 고속으로 검출하여 이미지를 복원할 수 있다.With the above-described configuration, the present invention can detect the most similar candidate patch at high speed and restore the image.

또한, 본 발명은 시간이 오래 걸리는 유사 이미지 패치 검출부의 부담을 경감시킬 수 있다. In addition, the present invention can alleviate the burden on the similar image patch detection unit which takes a long time.

또한, 본 발명은 타겟 패치에 대한 우선순위를 검출함으로써 이미지를 복원함에 있어서 오류를 줄일 수 있다.In addition, the present invention can reduce the error in restoring the image by detecting the priority of the target patch.

도 1은 본 발명의 일실시예에 따른 이미지 복원 장치의 블록도를 도시하는 도면이다.
도 2는 본 발명의 일실시예에 따른 이미지 복원 장치에 의한 이미지 복원 처리 과정을 도시하는 도면이다.
도 3은 본 발명의 일실시예에 따른 이미지 복원 장치에 사용되는 테스트 이미지들을 도시하는 도면이다.
도 4는 타겟 패치의 센터와 가장 유사한 후보 패치의 센터 간의 맨해튼 거리의 누적 분포 함수를 도시하는 도면이다.
도 5는 본 발명의 다른 실시예에 따른 이미지 복원 방법의 흐름도를 도시하는 도면이다.
1 is a block diagram of an image restoration apparatus according to an embodiment of the present invention.
2 is a diagram illustrating an image restoration process by the image restoration apparatus according to an embodiment of the present invention.
3 is a diagram illustrating test images used in an image restoration apparatus according to an embodiment of the present invention.
4 is a diagram showing the cumulative distribution function of the Manhattan distance between the centers of the candidate patches most similar to the center of the target patch.
5 is a flowchart illustrating an image restoration method according to another embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명에 따른 이미지 복원 장치 및 방법의 바람직한 실시예를 설명한다. 참고로, 아래에서 본 발명을 설명함에 있어서, 본 발명의 구성요소를 지칭하는 용어들은 각각의 구성 요소들의 기능을 고려하여 명명된 것이므로, 본 발명의 기술적 구성요소를 한정하는 의미로 이해되어서는 안 될 것이다.Hereinafter, preferred embodiments of an image restoration apparatus and method according to the present invention will be described with reference to the accompanying drawings. In the following description of the present invention, it is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the technical scope of the present invention. Will be.

도 1은 본 발명의 일실시예에 따른 이미지 복원 장치의 블록도를 도시하는 도면이고, 도 2는 본 발명의 일실시예에 따른 이미지 복원 장치에 의한 이미지 복원 처리 과정을 도시하는 도면이고, 도 3은 본 발명의 일실시예에 따른 이미지 복원 장치에 사용되는 테스트 이미지들을 도시하는 도면이고, 도 4는 타겟 패치의 센터와 가장 유사한 후보 패치의 센터 간의 맨해튼 거리의 누적 분포 함수를 도시하는 도면이다.FIG. 1 is a block diagram of an image restoration apparatus according to an embodiment of the present invention. FIG. 2 is a diagram illustrating a process of restoring an image by an image restoration apparatus according to an embodiment of the present invention. 3 is a view showing test images used in an image restoration apparatus according to an embodiment of the present invention, and FIG. 4 is a diagram showing a cumulative distribution function of Manhattan distance between centers of a candidate patch most similar to a center of a target patch .

도 1에 도시된 바와 같이, 이미지 복원 장치는 타겟 영역 설정부(110), 후보 패치 계산부(120), 패치 우선순위 검출부(130), 비교 패치 선택부(140), 유사 이미지 패치 검출부(150), 패치 복원 처리부(160) 및 복원 이미지 출력부(170)를 포함한다.1, the image restoration apparatus includes a target area setting unit 110, a candidate patch calculation unit 120, a patch priority detection unit 130, a comparison patch selection unit 140, a similar image patch detection unit 150 A patch restoration processing unit 160, and a restored image output unit 170.

타겟 영역 설정부(110)는 입력된 원본 이미지에서 복원이 필요한 영역을 타겟 영역으로 설정한다. 타겟 영역은 사용자 인터페이스(미도시됨)를 통해 설정될 수 있다. 도 2의 a에 타겟 영역(Target region)(Ω)이 표시되어 있으며, 아울러 타겟 영역(Ω)에 채워질 원본 이미지가 소스 영역(Source region)(Φ)으로 표시되어 있다. 그리고 타겟 영역(Ω)의 경계선은 (δΩ)로 표시되어 있다.The target area setting unit 110 sets an area required to be restored in the input original image as a target area. The target area may be set via a user interface (not shown). In FIG. 2A, a target region (?) Is displayed and an original image to be filled in the target region (?) Is indicated as a source region (?). And the boundary line of the target area? Is indicated by??.

후보 패치 계산부(120)는 타겟 영역 설정부(110)에서 설정된 타겟 영역 이외의 원본 이미지로 된 소스 영역의 각 후보 패치에 대해 평균값 및 표준편차를 계산한다. 후보 패치 계산부(120)는 CIE 색체계에 따라 L(명도), a(적색-녹색 색영역), b(황색-청색 색영역)의 평균값 및 표준편차를 계산할 수 있다.The candidate patch calculation unit 120 calculates an average value and a standard deviation for each candidate patch of a source region that is an original image other than the target region set in the target region setting unit 110. [ The candidate patch calculation unit 120 can calculate an average value and a standard deviation of L (lightness), a (red-green region) and b (yellow-blue region) according to the CIE color system.

후보 패치 계산부(120)에서 계산된 후보 패치의 평균값 및 표준편차를 저장하기 위해 4바이트(2바이트는 평균값, 2바이트는 표준편차)가 필요하며, 소수점 이하를 제거하면 단지 2바이트만으로도 평균값 및 표준편차를 저장할 수 있다.In order to store the average value and the standard deviation of the candidate patches calculated by the candidate patch calculation unit 120, four bytes (two bytes mean value and two bytes standard deviation) are required. Standard deviation can be stored.

패치 우선순위 검출부(130)는 설정된 타겟 영역에서 가장 먼저 복원할 패치 영역에 대한 우선순위를 정하는데, 패치 우선순위 검출부(130)에서의 우선순위의 검출이 잘못되면 복원 이미지에 상당한 오류가 발생할 수 있다. 도 2의 b에 소스 영역의 기지의 이미지로부터 채워질 타겟 패치(Ψp)가 표시되어 있다. 본 발명에서 이용되는 타겟 패치(Ψp)의 크기는 9 X 9 픽셀이다.The patch priority detector 130 determines the priority of the patch area to be restored first in the set target area. If the detection of the priority in the patch priority detector 130 is incorrect, a considerable error may occur in the restored image have. In Fig. 2 (b), the target patch (? P) to be filled from the known image of the source region is shown. The size of the target patch? P used in the present invention is 9 X 9 pixels.

즉, 패치 우선순위 검출부(130)는 먼저 복원할 타겟 패치(Ψp)를 검출하는데, 여기서 패치의 우선순위는 <수학식 1>과 같이 정의된다.That is, the patch priority detector 130 first detects a target patch? P to be restored, wherein the priority of the patch is defined as in Equation (1).

Figure 112015091201597-pat00001
Figure 112015091201597-pat00001

여기서 C(p)는 신뢰 항(confidence term)으로, D(p)는 데이터 항으로 불리는데, C(p) D(p) <수학식 2>와 같이 정의된다.Where C (p) is the confidence term and D (p) is the data term, C (p) and D (p) Is defined as Equation (2).

Figure 112015091201597-pat00002
Figure 112015091201597-pat00002

여기서 │Ψp│는 Ψp의 면적이며, α는 정규화 요소(예를 들면, 그레이 레벨 이미지에 대해 α=255)이다. np는 p에서 경계선(δΩ)에 대한 직각인 단위 벡터이며,

Figure 112015091201597-pat00003
는 픽셀(p)에서의 등광도선(isophote)이다.Where? P is the area of? P, and? Is the normalization factor (for example,? = 255 for the gray level image). n p is a unit vector orthogonal to the boundary line (delta OMEGA) at p,
Figure 112015091201597-pat00003
Is an isophote in the pixel p.

패치 우선순위 검출부(130)에 대한 보다 상세한 내용은 비특허문헌 1에 기재되어 있는바, 비특허문헌 1은 패치 우선순위 검출부(130)의 이해를 위해 본 발명에 참조로서 통합된다.The details of the patch priority detector 130 are described in Non-Patent Document 1, and Non-Patent Document 1 is incorporated by reference into the present invention for understanding of the patch priority detector 130. [

비교 패치 선택부(140)는 패치 우선순위 검출부(130)에 검출된 각 타겟 패치의 기지의 픽셀들의 평균값 및 표준편차와 후보 패치 계산부(120)에서 계산된 평균값 및 표준편차를 이용하여 유사 이미지를 비교할 후보 패치를 선택한다.The comparison patch selection unit 140 selects the similarity image and the standard deviation using the average value and the standard deviation of the known pixels of each target patch detected by the patch priority detection unit 130 and the average value and the standard deviation calculated by the candidate patch calculation unit 120, The candidate patch to be compared is selected.

비교 패치 선택부(140)는 후보 패치 계산부(120)에서 계산된 L, a, b의 평균값 및 표준편차를 이용하여 타겟 패치와의 차이에 대한 하부 바운드를 얻을 수 있다. 만약 하부 바운드가 소정값, 예를 들어 최소 패치 차이 값을 초과하면 유사 이미지 비교 후보 패치에서 제거된다. The comparison patch selection unit 140 can obtain a lower bound on the difference between the target patch and the target patch by using the average value and the standard deviation of L, a, b calculated by the candidate patch calculation unit 120. [ If the subbound exceeds a predetermined value, e. G. A minimum patch difference value, it is removed from the similar image comparison candidate patch.

한 패치의 픽셀들의 수를 d라고 하고, 타겟 패치에 대한 기지의 픽셀들의 수를 k라 하면, 9 X 9 패치에서, d는 81이며, k는 81 미만이다. X는 후보 패치의 모든 픽셀들의 세트이고,

Figure 112015091201597-pat00004
는 타겟 패치의 기지의 픽셀들에 대응하는 후보 패치의 픽셀들의 세트이다. 이 경우
Figure 112015091201597-pat00005
의 평균값과 표준편차는 <수학식 3>과 같은 범위를 가질 수 있다.Let d be the number of pixels in a patch, and let k be the number of known pixels for the target patch, then in a 9 x 9 patch, d is 81 and k is less than 81. X is a set of all pixels of the candidate patch,
Figure 112015091201597-pat00004
Is a set of pixels of the candidate patch corresponding to known pixels of the target patch. in this case
Figure 112015091201597-pat00005
The mean value and the standard deviation of the average value of the three-dimensional image data may have a range as shown in Equation (3).

Figure 112015091201597-pat00006
Figure 112015091201597-pat00006

여기서 μc 및 σc는 X의 평균 및 표준 편차이고,

Figure 112015091201597-pat00007
Figure 112015091201597-pat00008
Figure 112015091201597-pat00009
의 평균 및 표준 편차이다.Where μ c and σ c are the mean and standard deviation of X,
Figure 112015091201597-pat00007
And
Figure 112015091201597-pat00008
The
Figure 112015091201597-pat00009
&Lt; / RTI &gt;

이에 대한 수학적 증명은 출원서에 기재된 [공지예외적용대상]으로 첨부된 본 발명자의 논문에 기재되어 있으며, 이 논문은 본 명세서에 통합된다.The mathematical proof for this is described in the present inventor's article, which is incorporated herein by reference, and is incorporated herein by reference.

또한, 타겟 패치의 기지의 픽셀들의 평균값 및 표준편차를

Figure 112015091201597-pat00010
Figure 112015091201597-pat00011
라고 하고, 후보 패치 계산부(120)에서 계산된 각 후보 패치의 모든 픽셀의 평균값 및 표준편차를 μq 및 σq 라고 하면, 평균값 및 표준편차의 각 최소 차이 값을 <수학식 4>에서 얻을 수 있다.Further, the average value and the standard deviation of the known pixels of the target patch
Figure 112015091201597-pat00010
And
Figure 112015091201597-pat00011
And an average value and a standard deviation of all the pixels of each candidate patch calculated by the candidate patch calculation unit 120 are denoted by μ q and σ q , The minimum difference value between the average value and the standard deviation can be obtained from Equation (4).

Figure 112015091201597-pat00012
Figure 112015091201597-pat00012

Figure 112015091201597-pat00013
Figure 112015091201597-pat00013

이어서, 상기 차이 값들을 이용한 하부 바운드는 <수학식 5>를 이용하여 계산될 수 있다.Then, the lower bound using the difference values may be calculated using Equation (5).

Figure 112015091201597-pat00014
Figure 112015091201597-pat00014

여기서 c ∈ {L, a, b}는 L, a, b 각각에 대해 모두 계산함을 의미한다.Here, c ∈ {L, a, b} means to calculate for each of L, a, and b.

비교 패치 선택부(140)에 최초로 최소 패치 차이 값이 설정되는 경우에는 큰 수가 설정될 수 있다. 비교 패치 선택부(140)는 후보 패치 계산부(120)에서 계산된 각 후보 패치의 모든 픽셀의 평균값 및 표준편차를 이용하여 하부 바운드를 계산한다. 하부 바운드가 현재의 최소 패치 차이 값보다 크면, 해당 후보 패치는 스킵되고, 현재의 최소 패치 차이 값보다 작으면 유사 이미지 비교 패치 후보로 선택된다.When the minimum patch difference value is initially set in the comparison patch selection unit 140, a large number can be set. The comparison patch selection unit 140 calculates a lower bound using the average value and the standard deviation of all the pixels of each candidate patch calculated by the candidate patch calculation unit 120. [ If the subbound is greater than the current minimum patch difference value, the candidate patch is skipped, and if it is smaller than the current minimum patch difference value, it is selected as the similar image comparison patch candidate.

유사 이미지 패치 검출부(150)는 패치 우선순위 검출부(130)에서 검출된 우선순위의 타겟 패치에 채워질 가장 유사한 이미지 패치를 검출한다. 구체적으로 유사 이미지 패치 검출부(150)는 타겟 패치와 타겟 패치에 대응하는 소스 영역의 후보 패치(Ψq)마다 SSD(Sum of Squared Difference)를 이용하여 픽셀 값의 차이 값을 계산하여 합산한 후 패치 차이 값을 구하고 이들 패치 차이 값들 중에서 최소 패치 차이 값을 갖는 후보 패치를 가장 유사한 패치로 선정한다. 도 2의 c에 소스 영역의 후보 패치(Ψq)가 표시되어 있다. The similar image patch detecting unit 150 detects the most similar image patch to be filled in the target patch of the priority order detected by the patch priority detecting unit 130. Specifically, the similar image patch detector 150 calculates and adds a difference value of pixel values using SSD (Sum of Squared Difference) for each candidate patch q in the source region corresponding to the target patch and the target patch, And a candidate patch having a minimum patch difference value among these patch difference values is selected as the most similar patch. The candidate patch qq of the source region is shown in Fig. 2c.

유사 이미지 패치 검출부(150)는 타겟 패치(Ψp)의 각 기지 픽셀(ci)의 픽셀값에서 후보 패치(Ψq)의 픽셀(c'i)의 픽셀값을 이용하여 픽셀 차이 값(δi)을 계산하는데, 이 차이 값은 <수학식 6>과 같이 정의된다.The similar image patch detecting section 150 detects the pixel difference value delta i using the pixel value of the pixel c ' i of the candidate patch qq from the pixel value of each known pixel c i of the target patch p This difference value is defined as Equation (6).

Figure 112015091201597-pat00015
Figure 112015091201597-pat00015

이 방정식에서 c i,R , c i,G , c i,B 는 픽셀(ci)의 R, G, B 값들이다.In this equation, c i, R , c i, G , c i, and B are the R, G, and B values of the pixel (ci).

한편, Ψp와 Ψq 간의 패치 차이 값(Dp,q)은 다음과 같이 정의된다.On the other hand, the patch difference value (Dp, q) between? P and? Q is defined as follows.

Figure 112015091201597-pat00016
Figure 112015091201597-pat00016

<수학식 7>는, 예를 들어 타겟 패치(Ψp)에서 기지 픽셀들의 수가 k이면 기지 영역의 각 후보 패치(Ψq)에 대해 k번씩 픽셀 차이 값(δ)을 계산해야 함을 표현하고 있다.Equation (7) expresses that the pixel difference value? Should be calculated k times for each candidate patch? Q in the known region if the number of known pixels in the target patch? P is k, for example.

유사 이미지 패치 검출부(150)는 <수학식 7>를 이용하여 계산된 후보 패치(Ψq')의 패치 차이 값이 다른 후보 패치(Ψq")의 패치 차이 값보다 작다면 더 작은 패치 차이 값을 갖는 후보 패치(Ψq')가 타겟 패치(Ψp)에 더 적합하다고 판단한다.If the patch difference value of the candidate patch (? Q ') calculated using Equation (7) is smaller than the patch difference value of the other candidate patch (? Q' '), the similar image patch detection unit (150) It is judged that the candidate patch? Q 'is more suitable for the target patch? P.

한편, 유사 이미지 패치 검출부(150)는 보다 고속으로 유사 이미지 패치를 검출하기 위해, 바운딩(bounding) 알고리즘을 포함한다. 여기서 바운딩 알고리즘이란 지금까지 계산한 후보 패치들(Ψq)의 패치 차이 값 중 최소 패치 차이 값을 기준으로, 현재 수행하고 있는 후보 패치(Ψq)의 패치 차이 값이 가장 작은 패치 차이 값을 오버하면 더 이상 진행하지 않고 다음 후보 패치(Ψq)에 대해 계산을 수행하고, 현재 수행하고 있는 후보 패치(Ψq)의 패치 차이 값이 가장 작은 패치 차이 값을 오버하지 않으면 계산후 최소 패치 차이 값으로 저장한다.On the other hand, the similar image patch detecting section 150 includes a bounding algorithm for detecting a similar image patch at a higher speed. Here, if the patch difference value of the currently executed candidate patch (qq) exceeds the patch difference value that is the smallest based on the minimum patch difference value among the patch difference values of the candidate patches (qq) calculated so far, The calculation is performed for the next candidate patch qq without proceeding abnormally and if the patch difference value of the candidate patch qq currently being executed does not exceed the smallest patch difference value, it is stored as the minimum patch difference value after calculation.

이러한 바운딩 알고리즘은 <표 1>과 같이 표시될 수 있다.These bounding algorithms can be displayed as shown in Table 1.

Figure 112015091201597-pat00017
Figure 112015091201597-pat00017

이 바운딩 알고리즘를 이용하면 표 1에 도시된 바와 같이, 계산 과정을 상당하게 줄일 수 있다. 이 바운딩 알고리즘에서, 후보 패치는 순차적인 순서로 선택되며, 상부-왼쪽 코너에서의 후보 패치로부터 출발할 수 있다. 하지만, 바운딩 알고리즘의 실행은 이후의 픽셀들과 패치들의 비교 순서를 포함하는 것이 바람직하다. Using this bounding algorithm, as shown in Table 1, the calculation process can be considerably reduced. In this bounding algorithm, the candidate patches are selected in a sequential order, and can start from candidate patches in the upper-left corner. However, it is desirable that the execution of the bounding algorithm includes a comparison order of subsequent pixels and patches.

유사 이미지 패치 검출부(150)는 바운딩 알고리즘에 의해, 계산된 패치 차이 값들 중 타겟 패치의 기지의 이미지와 가장 작은 패치 차이값을 가지는 후보 패치를 유사 이미지 패치로 선택하면서도 계산 과정을 고속으로 수행할 수 있다.The similar image patch detection unit 150 can perform a calculation process at a high speed while selecting a candidate patch having the smallest patch difference value and the known image of the target patch among the calculated patch difference values as the similar image patch by the bounding algorithm have.

또한, 유사 이미지 패치 검출부(150)는 타겟 패치와 후보 패치간의 패치 차이 값을 계산함에 있어 계산하는 픽셀 순서를 바꿈으로서 더 고속으로 유사 패치 이미지를 검출할 수 있다.In addition, the similar image patch detecting section 150 can detect the similar patch image at a higher speed by changing the pixel order to be calculated in calculating the patch difference value between the target patch and the candidate patch.

일반적으로 타겟 패치의 어느 픽셀이 후보 패치의 대응하는 픽셀과 어느 정도의 색상 차를 가지고 있는지 알 수 없다. 따라서 유사 이미지 패치 검출부(150)는 후보 패치에서 가장 큰 색상차를 갖는 픽셀을 결정하기 위해 다음과 같은 통계적인 방법을 이용한다.In general, it is not known which pixel of the target patch has a color difference with the corresponding pixel of the candidate patch. Therefore, the similar image patch detecting unit 150 uses the following statistical method to determine the pixel having the largest color difference in the candidate patch.

유사 이미지 패치 검출부(150)는 먼저, 이미지가 존재하는 소스 영역의 각 픽셀에 대해 히스토그램을 생성하는데, 그레이-스케일 값(0 내지 255)을 사용할 수 있다. 이에 의해 기지의 이미지의 각 그레이-스케일 값들에 대해 빈도수를 얻을 수 있다. 여기서 빈도수가 낮은 픽셀에 대해 먼저 계산을 수행하면, 위의 바운딩 알고리즘을 이용하여 유사한 이미지 패치를 더 빠르게 검출할 수 있다.The similar image patch detecting section 150 may first use a gray-scale value (0 to 255) to generate a histogram for each pixel of the source region in which the image exists. Whereby the frequency can be obtained for each gray-scale value of the known image. Here, if the calculation is first performed on a pixel having a low frequency, a similar image patch can be detected more quickly by using the above bounding algorithm.

이러한 픽셀 순서 알고리즘은 <표 2>와 같이 표현될 수 있다.These pixel order algorithms can be expressed as shown in Table 2.

Figure 112015091201597-pat00018
Figure 112015091201597-pat00018

여기서 H(cm)는 픽셀(cm)과 동일한 그레이-스케일 색상을 갖는 (I-Ω)의 픽셀들의 수이며, argmin H(cm)은 빈도수가 가장 작은 값이다.Where H (cm) is the number of pixels (I-OMEGA) with gray-scale hue equal to pixel (cm), and argmin H (cm) is the smallest frequency.

위에서 각 색상에 대해 픽셀들의 수를 카운팅할 때 그레이-스케일 값(0 내지 255)을 사용하였는데, 픽셀들을 선택하기 위한 대안적인 방법들로는 (1) 각 (R, G, B) 값에 대해 픽셀들의 수를 카운트하거나, (2) RGB에 대해 개별적으로 픽셀들의 수를 카운트하고, 카운트를 가산하고, 그리고 최소 합계를 갖는 픽셀들을 선택하거나, (3) RGB에 대해 개별적으로 픽셀들의 수를 카운트하고, RGB와 무관하게 최소 카운트를 갖는 픽셀을 선택할 수 있다. The gray-scale values (0 to 255) are used when counting the number of pixels for each color above. Alternative methods for selecting the pixels include (1) (2) counting the number of pixels individually for RGB, adding a count, and selecting pixels with a minimum sum, (3) counting the number of pixels individually for RGB, and A pixel having a minimum count regardless of RGB can be selected.

유사 이미지 패치 검출부(150)는 타겟 패치에 유사한 이미지 패치를 더 빠르게 검출하기 위해 소스 영역의 후보 패치들을 비교하는 순서를 바꿀 수 있다. 즉, 계산 과정을 통해 최소 패치 차이 값을 더 빠르게 검출할 수 있다면 유사한 이미지 패치를 더 빠르게 검출할 수 있다.The similar image patch detecting section 150 can change the order of comparing candidate patches of the source region to detect an image patch similar to the target patch more quickly. That is, similar image patches can be detected more quickly if the minimum patch difference value can be detected more quickly through the calculation process.

이를 위해, 유사 이미지 패치 검출부(150)는 타겟 패치의 근처에 있는 후보 패치들이 더 멀리 있는 후보 패치들보다 순서적으로 더 일찍 처리되도록 순서를 정할 수 있다.To this end, the similar image patch detection section 150 may order the candidate patches near the target patch to be processed earlier than the candidate patches that are farther away.

이러한 패치 순서의 변경은 타겟 영역의 이웃으로 검색 크기를 제한하는 경우보다 시간은 더 걸리지만 잘못된 이미지를 검출할 가능성을 줄일 수 있을 뿐만 아니라 바운딩 알고리즘과 결합함으로써 유사 이미지를 더 빠르게 검출할 수 있다.Such a change in the patch order may take more time than limiting the search size to the neighborhood of the target area, but it may also reduce the possibility of detecting false images, as well as detect similar images faster by combining with the bounding algorithm.

이러한 패치 순서 알고리즘은 <표 3>와 같이 표현될 수 있다.This patch sequence algorithm can be expressed as in Table 3.

Figure 112015091201597-pat00019
Figure 112015091201597-pat00019

기본적으로, 후보 패치들은 타겟 패치에 가장 가까운 패치가 먼저 처리되도록 순서가 정해지는데, 여기서 M(p,q)는 픽셀(p)와 픽셀(q)의 맨해튼 거리로 <수학식 5>에 의해 정의된다.Basically, the candidate patches are ordered such that the patch closest to the target patch is processed first, where M (p, q) is the Manhattan distance of the pixel p and pixel q, do.

Figure 112015091201597-pat00020
Figure 112015091201597-pat00020

여기서 px 및 py는 픽셀(p)의 x 및 y 좌표이다.Where px and py are the x and y coordinates of the pixel p.

타겟 패치의 센터와 가장 좋은 후보 패치의 센터 사이의 맨해튼 거리의 누적 분포 함수(CDF)가 도 3에 도시되어 있다. 도 3을 통해 알 수 있듯이, 대부분의 경우에 타겟 패치에 더 가까운 후보 패치들을 먼저 비교하는 것이 바람직함을 알 수 있다.The cumulative distribution function (CDF) of the Manhattan distance between the center of the target patch and the center of the best candidate patch is shown in FIG. As can be seen from FIG. 3, it can be seen that in most cases it is desirable to first compare candidate patches closer to the target patch.

패치 복원 처리부(160)는 유사 이미지 패치 검출부(150)에서 검출한 가장 유사한 이미지 패치를 이용하여 타겟 패치를 채운다. 도 2의 d에 이렇게 타겟 패치를 복원하는 내용이 표현되어 있다.The patch restoration processing unit 160 fills the target patch using the most similar image patch detected by the similar image patch detection unit 150. [ The contents of restoring the target patch are shown in Fig. 2D.

패치 복원 처리부(160)는 타겟 영역의 이미지 복원이 모두 완료되면 복원 이미지 출력부(170)로 복원이 완료된 이미지를 전달한다. 하지만 패치 복원 처리부(160)는 이미지 복원이 완료되지 않으면 복원 처리된 이미지를 다시 패치 우선순위 검출부(130)로 전달하여 타겟 영역에 유사 이미지가 다 채워질 때까지 이미지 복원 동작을 계속적으로 수행하도록 한다.The patch restoration processing unit 160 delivers the restored image to the restored image output unit 170 when the image restoration of the target area is completed. However, if the image restoration is not completed, the patch restoration processing unit 160 transmits the restored image to the patch priority detection unit 130, and continues the image restoration operation until the similar image is filled in the target area.

복원 이미지 출력부(170)는 복원이 완료된 최종 이미지를 디스플레이부에 표시한다.The restored image output unit 170 displays the restored final image on the display unit.

상술한 구성에 의해 복원된 이미지들이 도 3에 도시되어 있다. 복원된 이미지들에 차이가 없음을 알 수 있다. 그리고 본 발명에 의한 처리 속도는 비특허문헌 1(Criminisi) 및 특허문헌 1(Method A+B)에 의해 처리된 경우보다 상당히 개선되고 있음을 <표 4>를 통해 알 수 있다.The images restored by the above-described configuration are shown in Fig. It can be seen that there is no difference between the reconstructed images. It can be seen from Table 4 that the processing speed according to the present invention is considerably improved as compared with the case where it is processed by non-Patent Document 1 (Criminisi) and Patent Document 1 (Method A + B).

Figure 112015091201597-pat00021
Figure 112015091201597-pat00021

도 5는 본 발명의 다른 실시예에 따른 이미지 복원 방법의 흐름도를 도시하는 도면이다. 5 is a flowchart illustrating an image restoration method according to another embodiment of the present invention.

이미지 복원 장치는 복원할 이미지를 입력받는다(S502). 타겟 영역 설정부(110)는 입력된 원본 이미지에서 복원이 필요한 영역을 타겟 영역으로 설정한다(S504). 타겟 영역은 사용자 인터페이스(미도시됨)를 통해 설정될 수 있다. The image restoration device receives an image to be restored (S502). The target area setting unit 110 sets an area required to be restored in the input original image as a target area (S504). The target area may be set via a user interface (not shown).

후보 패치 계산부(120)는 원본 이미지로 된 소스 영역의 각 후보 패치에 대해 평균값 및 표준편차를 계산한다(S506). 패치 우선순위 검출부(130)는 설정된 타겟 영역에서 가장 먼저 복원할 패치 영역에 대한 우선순위를 구하여 타겟 패치를 검출한다(S508).The candidate patch calculation unit 120 calculates an average value and a standard deviation for each candidate patch of the source region of the original image (S506). The patch priority detector 130 detects a target patch by obtaining a priority for a patch area to be restored first in the set target area (S508).

비교 패치 선택부(140)는 패치 우선순위 검출부(130)에 검출된 각 타겟 패치의 기지의 픽셀들의 평균값 및 표준편차와 후보 패치 계산부(120)에서 계산된 평균값 및 표준편차를 이용하여 유사 이미지를 비교할 후보 패치를 선택한다(S510). 비교 패치 선택부(140)는 후보 패치 계산부(120)에서 계산된 L, a, b의 평균값 및 표준편차를 이용하여 타겟 패치와의 차이에 대한 하부 바운드를 얻을 수 있다.The comparison patch selection unit 140 selects the similarity image and the standard deviation using the average value and the standard deviation of the known pixels of each target patch detected by the patch priority detection unit 130 and the average value and the standard deviation calculated by the candidate patch calculation unit 120, A candidate patch to be compared is selected (S510). The comparison patch selection unit 140 can obtain a lower bound on the difference between the target patch and the target patch by using the average value and the standard deviation of L, a, b calculated by the candidate patch calculation unit 120. [

유사 이미지 패치 검출부(150)는 타겟 패치에 유사한 이미지 패치를 더 빠르게 검출하기 위해 소스 영역의 패치들의 비교하는 순서를 바꿀 수 있다. 즉, 유사 이미지 패치 검출부(150)는 타겟 패치의 근처에 있는 패치들이 더 멀리 있는 패치들보다 순서적으로 더 일찍 처리되도록 순서를 정할 수 있다(S512).The similar image patch detecting section 150 can change the order of comparing the patches of the source region in order to detect the image patches similar to the target patch more quickly. That is, the similar image patch detecting unit 150 may order the patches near the target patch to be processed earlier in order than the patches farther away (S512).

또한, 유사 이미지 패치 검출부(150)는 타겟 패치와 후보 패치간의 패치 차이 값을 계산함에 있어 계산하는 픽셀 순서를 바꿈으로서 더 고속으로 유사 패치 이미지를 검출할 수 있다. 유사 이미지 패치 검출부(150)는 먼저, 이미지가 존재하는 소스 영역의 각 픽셀에 대해 히스토그램을 생성하는데, 그레이-스케일 값(0 내지 255)을 사용한다. 이에 의해 기지의 이미지의 각 그레이-스케일 값들에 대해 빈도수를 얻을 수 있다. 여기서 빈도수가 낮은 픽셀에 대해 먼저 계산을 수행하면(S514), 위의 바운딩 알고리즘을 이용하여 유사한 이미지 패치를 더 빠르게 검출할 수 있다.In addition, the similar image patch detecting section 150 can detect the similar patch image at a higher speed by changing the pixel order to be calculated in calculating the patch difference value between the target patch and the candidate patch. The similar image patch detecting section 150 first uses a gray-scale value (0 to 255) to generate a histogram for each pixel of the source region in which the image exists. Whereby the frequency can be obtained for each gray-scale value of the known image. If a calculation is first performed on a pixel having a low frequency (S514), similar image patches can be detected more quickly using the above bounding algorithm.

또한, 유사 이미지 패치 검출부(150)는 지금까지 계산한 후보 패치들(Ψq)의 패치 차이 값 중 최소 패치 차이 값을 기준으로, 현재 수행하고 있는 후보 패치(Ψq)의 패치 차이 값이 가장 작은 패치 차이 값을 오버하면(S516) 더 이상 진행하지 않고 다음 후보 패치(Ψq)에 대해 계산을 수행하고, 현재 수행하고 있는 후보 패치(Ψq)의 패치 차이 값이 가장 작은 패치 차이 값을 오버하지 않으면 계산후 최소 패치 차이 값으로 저장한다(S518).In addition, the similar image patch detecting unit 150 detects a patch difference value of the candidate patch qq currently being executed based on the minimum patch difference value among the patch difference values of the candidate patches qq calculated so far If the difference value is exceeded (S516), the calculation is performed on the next candidate patch (qq), and if the patch difference value of the candidate patch (qq) currently being executed does not exceed the smallest patch difference value As a minimum patch difference value (S518).

타겟 패치에 대한 모든 후보 패치들이 비교되었으면(S520), 패치 복원 처리부(160)는 유사 이미지 패치 검출부(150)에서 검출한 가장 유사한 이미지 패치를 이용하여 타겟 패치를 채운다(S522). If all the candidate patches for the target patch have been compared (S520), the patch restoration processing unit 160 fills the target patch using the most similar image patch detected by the similar image patch detecting unit 150 (S522).

패치 복원 처리부(160)는 타겟 영역의 이미지 복원이 모두 완료되면(S524) 복원 이미지 출력부(170)로 복원이 완료된 이미지를 전달한다. 하지만, 패치 복원 처리부(160)는 이미지 복원이 완료되지 않으면 복원 처리된 이미지를 다시 패치 우선순위 검출부(130)로 전달하여 타겟 영역에 유사 이미지가 다 채워질 때까지 이미지 복원 동작을 계속적으로 수행하도록 한다.The patch restoration processing unit 160 delivers the restored image to the restored image output unit 170 when the image restoration of the target area is completed (S524). However, if the image restoration process is not completed, the patch restoration process unit 160 transmits the restored image to the patch priority detection unit 130 and continuously performs the image restoration operation until the similar image is filled in the target area .

복원 이미지 출력부(170)는 복원이 완료된 최종 이미지를 디스플레이부에 표시한다(S524).The restored image output unit 170 displays the restored final image on the display unit (S524).

이상에서 설명된 본 발명의 실시예들은 본 발명의 기술 사상을 예시적으로 보여준 것에 불과하며, 본 발명의 보호 범위는 이하 특허청구범위에 의하여 해석되어야 마땅할 것이다. 또한, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것인 바, 본 발명과 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The embodiments of the present invention described above are merely illustrative of the technical idea of the present invention, and the scope of protection of the present invention should be interpreted according to the claims. It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit and scope of the invention as defined by the appended claims. It should be interpreted that it is included in the scope of right.

110: 타겟 영역 설정부 120: 후보 패치 계산부
130: 패치 우선순위 검출부 140: 비교 패치 선택부
150: 유사 이미지 패치 검출부 160: 패치 복원 처리부
170: 복원 이미지 출력부
110: target area setting unit 120: candidate patch calculation unit
130: patch priority detection unit 140: comparison patch selection unit
150: Pseudo image patch detection unit 160: Patch restoration processing unit
170: restored image output unit

Claims (7)

원본 이미지에서 복원이 필요한 영역을 타겟 영역으로 설정하는 타겟 영역 설정부와,
원본 이미지로 된 소스 영역의 후보 패치들의 평균값 및 표준편차를 계산하는 후보 패치 계산부와,
상기 타겟 영역 설정부에서 설정된 타겟 영역과 원본 이미지로 된 소스 영역을 포함하는 소정의 픽셀 영역을 갖는 타겟 패치의 우선순위를 검출하는 패치 우선순위 검출부와,
상기 패치 우선순위 검출부에서 검출된 각 타겟 패치의 기지의 픽셀들의 평균값 및 표준편차와 상기 후보 패치 계산부에서 계산된 평균값 및 표준편차를 이용하여 유사 이미지를 비교할 후보 패치를 선택하는 비교 패치 선택부와,
상기 패치 우선순위 검출부에서 검출된 각 타겟 패치의 기지의 픽셀들과 상기 비교 패치 선택부에서 선택된 유사 이미지 비교 후보 패치의 대응하는 픽셀들의 패치 차이 값이 최소 패치 차이 값보다 크면 계산을 중지한 후 다음의 유사 이미지 비교 후보 패치에 대하여 패치 차이 값을 수행하고, 이전의 패치 차이 값보다 작으면 최소 패치 차이 값으로 저장함으로써 가장 유사한 후보 패치를 검출하는 유사 이미지 패치 검출부와, 및
타겟 패치의 미지 영역에 상기 유사 이미지 패치 검출부에서 검출된 후보 패치의 대응하는 픽셀들을 복사하여 복원하는 패치 복원 처리부를 포함하고,
상기 비교 패치 선택부는 상기 패치 우선순위 검출부에서 검출된 각 타겟 패치의 기지의 픽셀들의 평균값 및 표준편차와 상기 후보 패치 계산부에서 계산된 평균값 및 표준편차를 이용하여 하부 바운드를 계산하고, 계산된 하부 바운드가 현재의 최소 패치 차이 값보다 크면, 해당 후보 패치는 스킵되고, 현재의 최소 패치 차이 값보다 작으면 유사 이미지 비교 후보 패치로 선택되는 것을 특징으로 하는 이미지 복원 장치.
A target area setting unit for setting an area requiring restoration in the original image as a target area,
A candidate patch calculation unit for calculating an average value and a standard deviation of candidate patches of the source region of the original image,
A patch priority detector for detecting a priority of a target patch having a target area set in the target area setting part and a predetermined pixel area including a source area in the original image;
A comparison patch selection unit for selecting a candidate patch to be compared with a similar image by using an average value and a standard deviation of known pixels of each target patch detected by the patch priority detection unit and an average value and a standard deviation calculated by the candidate patch calculation unit; ,
If the patch difference value of the known pixels of each target patch detected by the patch priority detector and the corresponding pixels of the similar image comparison candidate patch selected by the comparison patch selector is greater than the minimum patch difference value, A similar image patch detection section for detecting the most similar candidate patch by storing the patch difference value for the similar image comparison candidate patch and storing it as a minimum patch difference value if the patch difference value is smaller than the previous patch difference value;
And a patch recovery processing unit for copying and restoring corresponding pixels of the candidate patch detected by the similar image patch detecting unit in a unknown area of the target patch,
The comparison patch selection unit may calculate a lower bound using an average value and a standard deviation of known pixels of each target patch detected by the patch priority detection unit, an average value and a standard deviation calculated by the candidate patch calculation unit, If the bound is larger than the current minimum patch difference value, the candidate patch is skipped, and if it is smaller than the current minimum patch difference value, the similar image comparison candidate patch is selected.
삭제delete 제1항에 있어서,
상기 유사 이미지 패치 검출부는 소스 영역의 픽셀들에 대해 히스토그램을 이용하여 각 스케일 값의 빈도수를 구하고, 타겟 소스의 기지의 픽셀들 중 빈도수가 낮은 스케일 값을 갖는 픽셀의 순서로 패치 차이 값을 계산하는 것을 특징으로 하는 이미지 복원 장치.
The method according to claim 1,
The similar image patch detection unit calculates a patch difference value in the order of pixels having a low scale value among the known pixels of the target source by obtaining the frequency of each scale value using the histogram for the pixels of the source region The image restoration device comprising:
제3항에 있어서,
상기 유사 이미지 패치 검출부는 소스 영역에서의 후보 패치들 중 타겟 패치와 거리가 가까운 순서로 패치 차이 값을 계산하는 것을 특징으로 하는 이미지 복원 장치.
The method of claim 3,
Wherein the similar image patch detection unit calculates the patch difference value in the order of closest distance to the target patch among the candidate patches in the source region.
원본 이미지에서 복원이 필요한 영역을 타겟 영역으로 설정하는 단계와,
원본 이미지로 된 소스 영역의 후보 패치들의 평균값 및 표준편차를 계산하는 단계와,
상기 타겟으로 설정하는 단계에서 설정된 타겟 영역과 원본 이미지로 된 소스 영역을 포함하는 소정의 픽셀 영역을 갖는 타겟 패치의 우선순위를 검출하는 단계와,
상기 우선순위를 검출하는 단계에서 검출된 각 타겟 패치의 기지의 픽셀들의 평균값 및 표준편차와 상기 후보 패치들의 평균값 및 표준편차를 계산하는 단계에서 계산된 평균값 및 표준편차를 이용하여 유사 이미지를 비교할 후보 패치를 선택하는 단계와,
상기 우선순위를 검출하는 단계에서 검출된 타겟 패치의 기지의 픽셀들과 상기 후보 패치를 선택하는 단계에서 선택된 유사 이미지 비교 후보 패치의 대응하는 픽셀들의 패치 차이 값이 최소 패치 차이 값보다 크면 계산을 중지한 후 다음 유사 이미지 비교 후보 패치에 대하여 패치 차이 값을 수행하고, 이전의 패치 차이 값보다 작으면 최소 패치 차이 값으로 저장함으로써 가장 유사한 후보 패치를 검출하는 단계와, 및
타겟 패치의 미지 영역에 상기 가장 유사한 후보 패치를 검출하는 단계에서 검출된 후보 패치의 대응하는 픽셀들을 복사하여 복원하는 단계를 포함하고,
상기 후보 패치를 선택하는 단계는, 상기 우선순위를 검출하는 단계에서 검출된 각 타겟 패치의 기지의 픽셀들의 평균값 및 표준편차와 상기 후보 패치들의 평균값 및 표준편차를 계산하는 단계에서 계산된 평균값 및 표준편차를 이용하여 하부 바운드를 계산하고, 계산된 하부 바운드가 현재의 최소 패치 차이 값보다 크면, 해당 후보 패치는 스킵되고, 현재의 최소 패치 차이 값보다 작으면 유사 이미지 비교 후보 패치로 선택되는 것을 특징으로 하는 이미지 복원 방법.
Setting an area requiring restoration in the original image as a target area,
Calculating an average value and a standard deviation of candidate patches of the source region in the original image,
Detecting a priority of a target patch having a predetermined pixel area including a target area set in the target and a source area in the original image;
A candidate to be compared with the similar image using the average value and the standard deviation calculated in the step of calculating the average value and the standard deviation of the known pixels of each target patch detected in the step of detecting the priority and the average value and the standard deviation of the candidate patches Selecting a patch,
If the patch difference value of the known pixels of the target patch detected in the step of detecting the priority and the corresponding pixels of the similar image comparison candidate patch selected in the step of selecting the candidate patch is larger than the minimum patch difference value, Detecting the most similar candidate patch by performing a patch difference value for the next similar image comparison candidate patch and storing the difference value as a minimum patch difference value when the difference value is smaller than the previous patch difference value;
And copying and restoring the corresponding pixels of the candidate patch detected in the step of detecting the most similar candidate patch in the unknown region of the target patch,
Wherein the step of selecting the candidate patch comprises the steps of calculating an average value and a standard deviation of known pixels of each target patch detected in the step of detecting the priority and a mean value and standard deviation calculated in the step of calculating an average value and a standard deviation of the candidate patches, If the calculated lower bound is larger than the current minimum patch difference value, the candidate patch is skipped. If the calculated lower bound is smaller than the current minimum patch difference value, it is selected as the similar image comparison candidate patch .
제5항에 있어서,
상기 가장 유사한 후보 패치를 검출하는 단계는 소스 영역의 픽셀들에 대해 히스토그램을 이용하여 각 스케일 값의 빈도수를 구하고, 타겟 소스의 기지의 픽셀들 중 빈도수가 낮은 스케일 값을 갖는 픽셀의 순서로 패치 차이 값을 계산하는 것을 특징으로 하는 이미지 복원 방법.
6. The method of claim 5,
Wherein the step of detecting the most similar candidate patch comprises: obtaining a frequency of each scale value by using a histogram for pixels of the source region; calculating a difference between the number of known pixels of the target source and the number of pixels having a low- And calculating a value of the image.
제5항 또는 제6항에 있어서,
상기 가장 유사한 후보 패치를 검출하는 단계는 소스 영역에서의 후보 패치들 중 타겟 패치와 거리가 가까운 순서로 패치 차이 값을 계산하는 것을 특징으로 하는 이미지 복원 방법.
The method according to claim 5 or 6,
Wherein the step of detecting the most similar candidate patch calculates a patch difference value in the order of closest proximity to the target patch among the candidate patches in the source region.
KR1020150132537A 2015-09-18 2015-09-18 Apparatus and method for inpainting image KR101693643B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020150132537A KR101693643B1 (en) 2015-09-18 2015-09-18 Apparatus and method for inpainting image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150132537A KR101693643B1 (en) 2015-09-18 2015-09-18 Apparatus and method for inpainting image

Publications (1)

Publication Number Publication Date
KR101693643B1 true KR101693643B1 (en) 2017-01-17

Family

ID=57990179

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150132537A KR101693643B1 (en) 2015-09-18 2015-09-18 Apparatus and method for inpainting image

Country Status (1)

Country Link
KR (1) KR101693643B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102371145B1 (en) * 2021-11-10 2022-03-07 주식회사 스누아이랩 Apparatus for Image Synthesis and Driving Method Thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR950010642A (en) * 1993-09-09 1995-04-28 오오가 노리오 Motion vector detection device and method
KR100286818B1 (en) * 1999-02-11 2001-04-16 이형도 Fast motion estimating method for real-time video coding
KR101539013B1 (en) 2014-03-19 2015-07-24 한림대학교 산학협력단 Apparatus and method for inpainting image
KR20150093993A (en) * 2014-02-10 2015-08-19 한국전자통신연구원 Method and apparatus for image reconstruction using super-resolution

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR950010642A (en) * 1993-09-09 1995-04-28 오오가 노리오 Motion vector detection device and method
KR100286818B1 (en) * 1999-02-11 2001-04-16 이형도 Fast motion estimating method for real-time video coding
KR20150093993A (en) * 2014-02-10 2015-08-19 한국전자통신연구원 Method and apparatus for image reconstruction using super-resolution
KR101539013B1 (en) 2014-03-19 2015-07-24 한림대학교 산학협력단 Apparatus and method for inpainting image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
비특허문헌 1 : IEEE TRANSACTIONS ON IMAGE PROCESSING VOL.13 NO.9,SEP 2004(Region Filling and Object Removal by Exemplar-Based Image Inpainting)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102371145B1 (en) * 2021-11-10 2022-03-07 주식회사 스누아이랩 Apparatus for Image Synthesis and Driving Method Thereof

Similar Documents

Publication Publication Date Title
KR101539013B1 (en) Apparatus and method for inpainting image
EP3327668B1 (en) Image-processing device and method for foreground mask correction for object segmentation
JP6225256B2 (en) Image processing system and computer-readable recording medium
EP3032494B1 (en) Using depth for recovering missing information in an image
US9235879B2 (en) Apparatus, system, and method for temporal domain hole filling based on background modeling for view synthesis
KR20120063858A (en) Image registration device and image registration method thereof
US9280830B2 (en) Image processing apparatus and segmentation method
KR101677559B1 (en) Image registration device and operation method thereof
KR20170057362A (en) Method and system for unsupervised image segmentation using a trained quality metric
EP3142045A1 (en) Predicting accuracy of object recognition in a stitched image
EP2804369A1 (en) Image processing method, image processing apparatus, and image processing program
KR20160037643A (en) Method and Apparatus for Setting Candidate Area of Object for Recognizing Object
JP2016509805A (en) High frame rate of image stream
KR101693643B1 (en) Apparatus and method for inpainting image
CN111209908A (en) Method and device for updating label box, storage medium and computer equipment
JP2016086245A (en) Image processing device, image processing system, image processing device control method, and program
US10096116B2 (en) Method and apparatus for segmentation of 3D image data
JP6404794B2 (en) Image information acquisition method, image evaluation method, image information acquisition device, image evaluation device, and image processing program
JP6388507B2 (en) Image processing device
WO2020188402A1 (en) Point cloud global tetris packing
Patel et al. Improved exemplar based image inpainting using structure tensor
JPWO2011086594A1 (en) Image processing apparatus and method
US9361540B2 (en) Fast image processing for recognition objectives system
Ghorai et al. Patch sparsity based image inpainting using local patch statistics and steering kernel descriptor
JPWO2016142965A1 (en) Video processing apparatus, video processing method, and recording medium for storing video processing program

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20200102

Year of fee payment: 4