KR101539013B1 - Apparatus and method for inpainting image - Google Patents
Apparatus and method for inpainting image Download PDFInfo
- Publication number
- KR101539013B1 KR101539013B1 KR1020140032255A KR20140032255A KR101539013B1 KR 101539013 B1 KR101539013 B1 KR 101539013B1 KR 1020140032255 A KR1020140032255 A KR 1020140032255A KR 20140032255 A KR20140032255 A KR 20140032255A KR 101539013 B1 KR101539013 B1 KR 101539013B1
- Authority
- KR
- South Korea
- Prior art keywords
- patch
- target
- difference value
- image
- candidate
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration by the use of histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
Abstract
Description
본 발명은 이미지 복원 장치 및 방법에 관한 것으로, 원본에 근거한 이미지 복원 방법에서 가장 유사한 후보 패치를 고속으로 검출하여 이미지를 복원하는 이미지 복원 장치 및 방법에 관한 것이다.The present invention relates to an image restoration apparatus and method, and more particularly, to an apparatus and method for restoring an image by detecting a most similar candidate patch at high speed 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.
상술한 문제점을 해결하기 위해, 본 발명은 원본에 근거한 이미지 복원 방법에서 가장 유사한 후보 패치를 고속으로 검출하여 이미지를 복원하는 이미지 복원 장치 및 방법을 제공하는 것을 목적으로 한다.In order to solve the above-described problems, it is an object of the present invention to provide an apparatus and method for restoring an image by detecting the most similar candidate patch at high speed in an original-based image restoration method.
상술한 목적을 달성하기 위해, 본 발명의 일실시예에 따른 이미지 복원 장치는 원본 이미지에서 복원이 필요한 영역을 타겟 영역으로 설정하는 타겟 영역 설정부와, 상기 타겟 영역 설정부에서 설정된 타겟 영역과 원본 이미지로 된 소스 영역을 포함하는 소정의 픽셀 영역을 갖는 타겟 패치의 우선 순위를 검출하는 패치 우선 순위 검출부와, 상기 패치 우선 순위 검출부에서 검출된 타겟 패치의 기지의 픽셀들과 소스 영역에서의 후보 패치의 대응하는 픽셀들의 패치 차이 값이 최소 패치 차이 값보다 크면 계산을 중지한 후 다음 후보 패치에 대하여 패치 차이 값을 수행하고, 이전의 패치 차이 값보다 작으면 최소 패치 차이 값으로 저장함으로써 가장 유사한 후보 패치를 검출하는 유사 이미지 패치 검출부와, 타겟 패치의 미지 영역에 상기 유사 이미지 패치 검출부에서 검출된 후보 패치의 대응하는 픽셀들을 복사하여 복원하는 패치 복원 처리부를 제공한다.According to an aspect of the present invention, there is provided an image restoration apparatus including a target area setting unit configured to set a target area as an area required to be restored from an original image; A patch priority detector for detecting a priority of a target patch having a predetermined pixel area including a source region of an image; If the patch difference value of the corresponding pixels of the first candidate patch is greater than the minimum patch difference value, the calculation is stopped, then the patch difference value is performed for the next candidate patch, and if it is smaller than the previous patch difference value, A similar image patch detector for detecting a patch; It provides a patch restoration processing to restore a copy of the corresponding pixel of the candidate patch detected by the patch detection.
상기 유사 이미지 패치 검출부는 소스 영역의 픽셀들에 대해 히스토그램을 이용하여 각 스케일 값의 빈도수를 구하고, 타겟 소스의 기지의 픽셀들 중 빈도수가 낮은 스케일 값을 갖는 픽셀의 순서로 패치 차이 값을 계산할 수 있다.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 detector may use a gray scale value as each scale value.
상기 유사 이미지 패치 검출부는 소스 영역에서의 후보 패치들 중 타겟 패치와 거리가 가까운 순서로 패치 차이 값을 계산할 수 있다.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; setting a target area in a target area and a predetermined area Detecting a priority of a target patch having a pixel area; detecting a priority difference between a known patch of the target patch detected in the step of detecting the priority and a corresponding patch pixel of a candidate patch in the source area, Detecting the most similar candidate patch by storing the patch difference value for the next candidate patch after stopping the calculation if the difference is greater than the difference value and storing the patch difference value as the minimum patch difference value if the difference is smaller than the previous patch difference value; Detecting a most similar hatching patch in a region of the detected candidate patch, By providing the step of restoring the copy, it is possible to achieve the above object.
상술한 구성에 의해, 본 발명은 가장 유사한 후보 패치를 고속으로 검출하여 이미지를 복원할 수 있다.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 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)를 포함한다.1, the image restoration apparatus includes a target
타겟 영역 설정부(110)는 입력된 원본 이미지에서 복원이 필요한 영역을 타겟 영역으로 설정한다. 타겟 영역은 사용자 인터페이스(미도시됨)를 통해 설정될 수 있다. 도 2의 a에 타겟 영역(Target region)(Ω)이 표시되어 있으며, 아울러 타겟 영역(Ω)에 채워질 원본 이미지가 소스 영역(Source region)(Φ)으로 표시되어 있다. 그리고 타겟 영역(Ω)의 경계선은 (δΩ)로 표시되어 있다.The target
패치 우선 순위 검출부(120)는 설정된 타겟 영역에서 가장 먼저 복원할 패치 영역에 대한 우선 순위를 정하는데, 패치 우선 순위 검출부(120)에서의 우선 순위의 검출이 잘못되면 복원 이미지에 상당한 오류가 발생할 수 있다. 도 2의 b에 소스 영역의 기지의 이미지로부터 채워질 타겟 패치(Ψp)가 표시되어 있다. 본 발명에서 이용되는 타겟 패치(Ψp)의 크기는 9 X 9 픽셀이다.The
즉, 패치 우선 순위 검출부(120)는 먼저 복원할 타겟 패치(Ψp)를 검출하는데, 여기서 패치의 우선 순위는 <수학식 1>과 같이 정의된다.That is, the
여기서 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).
여기서 │Ψp│는 Ψp의 면적이며, α는 정규화 요소(예를 들면, 그레이 레벨 이미지에 대해 α=255)이다. np는 p에서 경계선(δΩ)에 대한 직각인 단위 벡터이며, 는 픽셀(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, Is an isophote in the pixel p.
패치 우선 순위 검출부(120)에 대한 보다 상세한 내용은 비특허문헌 1에 기재되어 있는바, 비특허문헌 1은 패치 우선 순위 검출부(120)의 이해를 위해 본 발명에 참조로서 통합된다.The details of the
유사 이미지 패치 검출부(130)는 패치 우선 순위 검출부(120)에서 검출된 우선 순위의 타겟 패치에 채워질 가장 유사한 이미지 패치를 검출한다. 구체적으로 유사 이미지 패치 검출부(130)는 타겟 패치와 타겟 패치에 대응하는 소스 영역의 후보 패치(Ψq)마다 SSD(Sum of Squared Difference)를 이용하여 픽셀 값의 차이 값을 계산하여 합산한 후 패치 차이 값을 구하고 이들 패치 차이 값들 중에서 최소 패치 차이 값을 갖는 후보 패치를 가장 유사한 패치로 선정한다. 도 2의 c에 소스 영역의 후보 패치(Ψq)가 표시되어 있다. The similar image
유사 이미지 패치 검출부(130)는 타겟 패치(Ψp)의 각 기지 픽셀(ci)의 픽셀값에서 후보 패치(Ψq)의 픽셀(c'i)의 픽셀값을 이용하여 픽셀 차이 값(δi)을 계산하는데, 이 차이 값은 <수학식 3>과 같이 정의된다.The similar image
이 방정식에서 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.
<수학식 4>는, 예를 들어 타겟 패치(Ψp)에서 기지 픽셀들의 수가 k이면 기지 영역의 각 후보 패치(Ψq)에 대해 k번씩 픽셀 차이 값(δ)을 계산해야 함을 표현하고 있다.Equation 4 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.
유사 이미지 패치 검출부(130)는 <수학식 4>를 이용하여 계산된 후보 패치(Ψq')의 패치 차이 값이 다른 후보 패치(Ψq")의 패치 차이 값보다 작다면 더 작은 패치 차이 값을 갖는 후보 패치(Ψq')가 타겟 패치(Ψp)에 더 적합하다고 판단한다.If the patch difference value of the candidate patch (qq ') calculated using Equation (4) is smaller than the patch difference value of the other candidate patch (qq "), the similar image patch detection unit (130) It is judged that the candidate patch? Q 'is more suitable for the target patch? P.
한편, 유사 이미지 패치 검출부(130)는 보다 고속으로 유사 이미지 패치를 검출하기 위해, 바운딩(bounding) 알고리즘을 포함한다. 여기서 바운딩 알고리즘이란 지금까지 계산한 후보 패치들(Ψq)의 패치 차이 값 중 최소 패치 차이 값을 기준으로, 현재 수행하고 있는 후보 패치(Ψq)의 패치 차이 값이 가장 작은 패치 차이 값을 오버하면 더 이상 진행하지 않고 다음 후보 패치(Ψq)에 대해 계산을 수행하고, 현재 수행하고 있는 후보 패치(Ψq)의 패치 차이 값이 가장 작은 패치 차이 값을 오버하지 않으면 계산후 최소 패치 차이 값으로 저장한다.On the other hand, the similar image
이러한 바운딩 알고리즘은 <표 1>과 같이 표시될 수 있다.These bounding algorithms can be displayed as shown in Table 1.
이 바운딩 알고리즘를 이용하면 표 4에 도시된 바와 같이, 계산 과정을 상당하게 줄일 수 있다. 이 바운딩 알고리즘에서, 후보 패치는 순차적인 순서로 선택되며, 상부-왼쪽 코너에서의 후보 패치로부터 출발할 수 있다. 하지만, 바운딩 알고리즘의 실행은 이후의 픽셀들과 패치들의 비교 순서를 포함하는 것이 바람직하다. Using this bounding algorithm, as shown in Table 4, the calculation process can be significantly 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.
유사 이미지 패치 검출부(130)는 바운딩 알고리즘에 의해, 계산된 패치 차이 값들 중 타겟 패치의 기지의 이미지와 가장 작은 패치 차이값을 가지는 후보 패치를 유사 이미지 패치로 선택하면서도 계산 과정을 고속으로 수행할 수 있다.The similar image
또한, 유사 이미지 패치 검출부(130)는 타겟 패치와 후보 패치간의 패치 차이 값을 계산함에 있어 계산하는 픽셀 순서를 바꿈으로서 더 고속으로 유사 패치 이미지를 검출할 수 있다.In addition, the similar image
일반적으로 타겟 패치의 어느 픽셀이 후보 패치의 대응하는 픽셀과 어느 정도의 색상 차를 가지고 있는지 알 수 없다. 따라서 유사 이미지 패치 검출부(130)는 후보 패치에서 가장 큰 색상차를 갖는 픽셀을 결정하기 위해 다음과 같은 통계적인 방법을 이용한다.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
유사 이미지 패치 검출부(130)는 먼저, 이미지가 존재하는 소스 영역의 각 픽셀에 대해 히스토그램을 생성하는데, 그레이-스케일 값(0 내지 255)을 사용할 수 있다. 이에 의해 기지의 이미지의 각 그레이-스케일 값들에 대해 빈도수를 얻을 수 있다. 여기서 빈도수가 낮은 픽셀에 대해 먼저 계산을 수행하면, 위의 바운딩 알고리즘을 이용하여 유사한 이미지 패치를 더 빠르게 검출할 수 있다.The similar image
이러한 픽셀 순서 알고리즘은 <표 2>와 같이 표현될 수 있다.These pixel order algorithms can be expressed as shown in Table 2.
여기서 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.
유사 이미지 패치 검출부(130)는 타겟 패치에 유사한 이미지 패치를 더 빠르게 검출하기 위해 소스 영역의 후보 패치들을 비교하는 순서를 바꿀 수 있다. 즉, 계산 과정을 통해 최소 패치 차이 값을 더 빠르게 검출할 수 있다면 유사한 이미지 패치를 더 빠르게 검출할 수 있다.The similar image
이를 위해, 유사 이미지 패치 검출부(130)는 타겟 패치의 근처에 있는 후보 패치들이 더 멀리 있는 후보 패치들보다 순서적으로 더 일찍 처리되도록 순서를 정할 수 있다.To this end, the similar image
이러한 패치 순서의 변경은 타겟 영역의 이웃으로 검색 크기를 제한하는 경우보다 시간은 더 걸리지만 잘못된 이미지를 검출할 가능성을 줄일 수 있을 뿐만 아니라 바운딩 알고리즘과 결합함으로써 유사 이미지를 더 빠르게 검출할 수 있다.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.
기본적으로, 후보 패치들은 타겟 패치에 가장 가까운 패치가 먼저 처리되도록 순서가 정해지는데, 여기서 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.
여기서 px 및 py는 픽셀(p)의 x 및 y 좌표이다.Where px and py are the x and y coordinates of the pixel p.
타겟 패치의 센터와 가장 좋은 후보 패치의 센터 사이의 맨해튼 거리의 누적 분포 함수(CDF)가 도 4에 도시되어 있다. 도 4를 통해 알 수 있듯이, 대부분의 경우에 타겟 패치에 더 가까운 후보 패치들을 먼저 비교하는 것이 바람직함을 알 수 있다.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. 4, it can be seen that in most cases it is desirable to first compare candidate patches closer to the target patch.
패치 복원 처리부(140)는 유사 이미지 패치 검출부(130)에서 검출한 가장 유사한 이미지 패치를 이용하여 타겟 패치를 채운다. 도 2의 d에 이렇게 타겟 패치를 복원하는 내용이 표현되어 있다.The patch
패치 복원 처리부(140)는 타겟 영역의 이미지 복원이 모두 완료되면 복원 이미지 출력부(150)로 복원이 완료된 이미지를 전달한다. 하지만 패치 복원 처리부(140)는 이미지 복원이 완료되지 않으면 복원 처리된 이미지를 다시 패치 우선 순위 검출부(120)로 전달하여 타겟 영역에 유사 이미지가 다 채워질 때까지 이미지 복원 동작을 계속적으로 수행하도록 한다.The patch
복원 이미지 출력부(150)는 복원이 완료된 최종 이미지를 디스플레이부에 표시한다.The restored
상술한 구성들에 의한 처리 속도는 비특허문헌 1에 의해 처리된 경우보다 상당히 개선되었음을 <표 4>를 통해 알 수 있다.It can be seen from Table 4 that the processing speed by the above-described configurations is considerably improved as compared with the case of processing by the non-patent document 1. [
그리고 상술한 구성에 의해 복원된 이미지들이 도 3에 도시되어 있다.And images restored by the above-described configuration are shown in Fig.
도 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
패치 우선 순위 검출부(120)는 설정된 타겟 영역에서 가장 먼저 복원할 패치 영역에 대한 우선 순위를 구하여 타겟 패치를 검출한다(S506).The
유사 이미지 패치 검출부(130)는 타겟 패치에 유사한 이미지 패치를 더 빠르게 검출하기 위해 소스 영역의 패치들의 비교하는 순서를 바꿀 수 있다. 즉, 유사 이미지 패치 검출부(130)는 타겟 패치의 근처에 있는 패치들이 더 멀리 있는 패치들보다 순서적으로 더 일찍 처리되도록 순서를 정할 수 있다(S508).The similar image
또한, 유사 이미지 패치 검출부(130)는 타겟 패치와 후보 패치간의 패치 차이 값을 계산함에 있어 계산하는 픽셀 순서를 바꿈으로서 더 고속으로 유사 패치 이미지를 검출할 수 있다. 유사 이미지 패치 검출부(130)는 먼저, 이미지가 존재하는 소스 영역의 각 픽셀에 대해 히스토그램을 생성하는데, 그레이-스케일 값(0 내지 255)을 사용한다. 이에 의해 기지의 이미지의 각 그레이-스케일 값들에 대해 빈도수를 얻을 수 있다. 여기서 빈도수가 낮은 픽셀에 대해 먼저 계산을 수행하면(S510), 위의 바운딩 알고리즘을 이용하여 유사한 이미지 패치를 더 빠르게 검출할 수 있다.In addition, the similar image
또한, 유사 이미지 패치 검출부(130)는 지금까지 계산한 후보 패치들(Ψq)의 패치 차이 값 중 최소 패치 차이 값을 기준으로, 현재 수행하고 있는 후보 패치(Ψq)의 패치 차이 값이 가장 작은 패치 차이 값을 오버하면(S512) 더 이상 진행하지 않고 다음 후보 패치(Ψq)에 대해 계산을 수행하고, 현재 수행하고 있는 후보 패치(Ψq)의 패치 차이 값이 가장 작은 패치 차이 값을 오버하지 않으면 계산후 최소 패치 차이 값으로 저장한다(S514).In addition, the similar image
타겟 패치에 대한 모든 후보 패치들이 비교되었으면(S516), 패치 복원 처리부(140)는 유사 이미지 패치 검출부(130)에서 검출한 가장 유사한 이미지 패치를 이용하여 타겟 패치를 채운다(S518). If all the candidate patches for the target patch have been compared (S516), the patch
패치 복원 처리부(140)는 타겟 영역의 이미지 복원이 모두 완료되면(S520) 복원 이미지 출력부(150)로 복원이 완료된 이미지를 전달한다. 하지만 패치 복원 처리부(140)는 이미지 복원이 완료되지 않으면 복원 처리된 이미지를 다시 패치 우선 순위 검출부(120)로 전달하여 타겟 영역에 유사 이미지가 다 채워질 때까지 이미지 복원 동작을 계속적으로 수행하도록 한다.The patch
복원 이미지 출력부(150)는 복원이 완료된 최종 이미지를 디스플레이부에 표시한다(S520).The restored
이상에서 설명된 본 발명의 실시예들은 본 발명의 기술 사상을 예시적으로 보여준 것에 불과하며, 본 발명의 보호 범위는 이하 특허청구범위에 의하여 해석되어야 마땅할 것이다. 또한, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것인 바, 본 발명과 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.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: 복원 이미지 출력부110: target area setting unit 120: patch priority detector
130: Pseudo image patch detection unit 140: Patch restoration processing unit
150: 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 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;
If the patch difference value of the known pixels of the target patch detected by the patch priority detector and the corresponding pixels of the candidate patches in the source region is larger 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 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 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 Wherein the image restoration device comprises:
상기 유사 이미지 패치 검출부는 각 스케일 값으로 그레이 스케일 값을 이용하는 것을 특징으로 하는 이미지 복원 장치. The method according to claim 1,
Wherein the similar image patch detecting unit uses a gray scale value as each scale value.
상기 유사 이미지 패치 검출부는 소스 영역에서의 후보 패치들 중 타겟 패치와 거리가 가까운 순서로 패치 차이 값을 계산하는 것을 특징으로 하는 이미지 복원 장치.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,
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;
If the patch difference value of the detected pixels of the target patch and the corresponding pixels of the candidate patches in the source region detected in the step of detecting the priority is greater than the minimum patch difference value, Detecting the most similar candidate patch by storing the difference value as a minimum patch difference value if 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 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.
상기 가장 유사한 후보 패치를 검출하는 단계는 소스 영역에서의 후보 패치들 중 타겟 패치와 거리가 가까운 순서로 패치 차이 값을 계산하는 것을 특징으로 하는 이미지 복원 방법.6. The method of claim 5,
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.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020140032255A KR101539013B1 (en) | 2014-03-19 | 2014-03-19 | Apparatus and method for inpainting image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020140032255A KR101539013B1 (en) | 2014-03-19 | 2014-03-19 | Apparatus and method for inpainting image |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101539013B1 true KR101539013B1 (en) | 2015-07-24 |
Family
ID=53876044
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020140032255A KR101539013B1 (en) | 2014-03-19 | 2014-03-19 | Apparatus and method for inpainting image |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101539013B1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101559896B1 (en) | 2015-07-28 | 2015-10-15 | (주)그린공간정보 | Terrain relief ortho image editing system confirming the shadow by up and down |
KR101578819B1 (en) * | 2015-07-27 | 2015-12-21 | (주)동광지엔티 | Auto edit method for secure storage on aerial image |
KR101693643B1 (en) | 2015-09-18 | 2017-01-17 | 한림대학교 산학협력단 | Apparatus and method for inpainting image |
US10582179B2 (en) | 2016-02-01 | 2020-03-03 | Samsung Electronics Co., Ltd. | Method and apparatus for processing binocular disparity image |
CN112419179A (en) * | 2020-11-18 | 2021-02-26 | 北京字跳网络技术有限公司 | Method, device, equipment and computer readable medium for repairing image |
KR102225024B1 (en) | 2019-10-24 | 2021-03-08 | 연세대학교 산학협력단 | Apparatus and method for image inpainting |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100286818B1 (en) * | 1999-02-11 | 2001-04-16 | 이형도 | Fast motion estimating method for real-time video coding |
KR20100083498A (en) * | 2009-01-14 | 2010-07-22 | 삼성전자주식회사 | Apparatus and method for inpainting image |
-
2014
- 2014-03-19 KR KR1020140032255A patent/KR101539013B1/en active IP Right Grant
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100286818B1 (en) * | 1999-02-11 | 2001-04-16 | 이형도 | Fast motion estimating method for real-time video coding |
KR20100083498A (en) * | 2009-01-14 | 2010-07-22 | 삼성전자주식회사 | Apparatus and method for inpainting image |
Non-Patent Citations (2)
Title |
---|
Image Processing, IEEE Transactions on (Volume:13, Issue:9), "Region filling and object removal by exemplar based image inpainting", 8.2004 * |
전자공학회논문지 제48권 CI편 제1호, "다중 패치를 이용한 예제 기반 영상 인페인팅", 2011.1, 8-16 (9pages) * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101578819B1 (en) * | 2015-07-27 | 2015-12-21 | (주)동광지엔티 | Auto edit method for secure storage on aerial image |
KR101559896B1 (en) | 2015-07-28 | 2015-10-15 | (주)그린공간정보 | Terrain relief ortho image editing system confirming the shadow by up and down |
KR101693643B1 (en) | 2015-09-18 | 2017-01-17 | 한림대학교 산학협력단 | Apparatus and method for inpainting image |
US10582179B2 (en) | 2016-02-01 | 2020-03-03 | Samsung Electronics Co., Ltd. | Method and apparatus for processing binocular disparity image |
KR102225024B1 (en) | 2019-10-24 | 2021-03-08 | 연세대학교 산학협력단 | Apparatus and method for image inpainting |
CN112419179A (en) * | 2020-11-18 | 2021-02-26 | 北京字跳网络技术有限公司 | Method, device, equipment and computer readable medium for repairing image |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101539013B1 (en) | Apparatus and method for inpainting image | |
AU2017232186B2 (en) | Fast and robust image alignment for burst mode | |
JP6225256B2 (en) | Image processing system and computer-readable recording medium | |
KR101899866B1 (en) | Apparatus and method for detecting error of lesion contour, apparatus and method for correcting error of lesion contour and, apparatus for insecting error of lesion contour | |
AU2016225841B2 (en) | Predicting accuracy of object recognition in a stitched image | |
US10595006B2 (en) | Method, system and medium for improving the quality of 2D-to-3D automatic image conversion using machine learning techniques | |
TW201428688A (en) | Image similarity judgment system and method | |
US9280830B2 (en) | Image processing apparatus and segmentation method | |
KR20100083498A (en) | Apparatus and method for inpainting image | |
US20190139228A1 (en) | Object segmentation apparatus and method using gaussian mixture model and total variation | |
US20170270140A1 (en) | Rating and Advising for Selection of Augmented Reality Markers | |
KR101693643B1 (en) | Apparatus and method for inpainting image | |
JP2017085570A (en) | Image correction method and image correction device | |
JP6937782B2 (en) | Image processing method and device | |
JP6388507B2 (en) | Image processing device | |
Srikakulapu et al. | Depth estimation from single image using defocus and texture cues | |
GB2557417A (en) | Image alignment for burst mode images | |
KR20200083202A (en) | Image similarity evaluation algorithm based on similarity condition of triangles | |
JP2015045919A (en) | Image recognition method and robot | |
JP6643301B2 (en) | Defect inspection device and defect inspection method | |
CN107862679B (en) | Method and device for determining image detection area | |
JP2017162179A5 (en) | ||
CN113167568B (en) | Coordinate calculation device, coordinate calculation method, and computer-readable recording medium | |
Padalkar et al. | Svd based automatic detection of target regions for image inpainting | |
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: 20180702 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20190703 Year of fee payment: 5 |