KR20090088022A - Apparatus and method for digital auto-focusing based on iterative restoration and fusion of image - Google Patents

Apparatus and method for digital auto-focusing based on iterative restoration and fusion of image Download PDF

Info

Publication number
KR20090088022A
KR20090088022A KR1020080013314A KR20080013314A KR20090088022A KR 20090088022 A KR20090088022 A KR 20090088022A KR 1020080013314 A KR1020080013314 A KR 1020080013314A KR 20080013314 A KR20080013314 A KR 20080013314A KR 20090088022 A KR20090088022 A KR 20090088022A
Authority
KR
South Korea
Prior art keywords
image
pixel
value
fusion
focus
Prior art date
Application number
KR1020080013314A
Other languages
Korean (ko)
Other versions
KR100935495B1 (en
Inventor
백준기
마이크 비벡
신정호
Original Assignee
중앙대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 중앙대학교 산학협력단 filed Critical 중앙대학교 산학협력단
Priority to KR1020080013314A priority Critical patent/KR100935495B1/en
Publication of KR20090088022A publication Critical patent/KR20090088022A/en
Application granted granted Critical
Publication of KR100935495B1 publication Critical patent/KR100935495B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/20Circuitry for controlling amplitude response
    • H04N5/205Circuitry for controlling amplitude response for correcting amplitude versus frequency characteristic
    • H04N5/208Circuitry for controlling amplitude response for correcting amplitude versus frequency characteristic for compensating for attenuation of high frequency components, e.g. crispening, aperture distortion correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/21Circuitry for suppressing or minimising disturbance, e.g. moiré or halo

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

A digital auto-focusing apparatus based on iterative restoration and fusion of images and a method thereof are provided to restore an image step by step through an iterative restoration process, thereby simplifying a computation process. The first/second restoration units(110,120) applies the first/second optimization functions to the original image/the first image to obtain the first/second intermediate images. A gradient of a pixel value about each pixel configuring the first/second intermediate images is calculated. The first/second restoration units generate the first/second images by multiplying the gradient value by a preset proportional factor from the pixel values. An image fusing unit(140) calculates a focus value of each pixel configuring the original image/the first image. The image fusing unit determines a fusing area configured by pixels which are larger than a preset reference focus value in the original image/the first image. The fusing areas are combined so that the image fusing unit generates a fusing image.

Description

영상의 반복적인 복원과 융합을 기반으로 한 자동초점복원장치 및 방법{Apparatus and method for digital auto-focusing based on iterative restoration and fusion of image} Apparatus and method for digital auto-focusing based on iterative restoration and fusion of image}

본 발명은 자동초점복원장치 및 방법에 관한 것으로, 보다 상세하게는, 열화된 부분이 존재하는 영상의 초점을 복원하는 장치 및 방법에 관한 것이다.The present invention relates to an automatic focus restoring apparatus and method, and more particularly, to an apparatus and method for restoring the focus of an image having a degraded portion.

디지털 영상 기술의 발전과 함께 영상 기기의 해상도와 정밀도가 증가하면서 촬영시 피사체나 영상 기기의 미세한 움직임 또는 영상 시스템의 물리적 한계로 인하여, 촬영된 영상에 원치않는 아웃 포커싱 현상, 블록 현상, 계단 현상 등과 같은 영상의 품질을 저하시키는 열화 현상이 발생하는 경우가 있다. 대부분의 영상 기기는 대표적인 영상 열화 현상 중 하나인 아웃 포커스 블러(out-of-focus blur)를 제거하기 위하여 디지털 자동초점복원 시스템을 적용하고 있다.As the resolution and precision of video equipment increases with the development of digital imaging technology, unwanted out-focusing phenomenon, block phenomenon, stair phenomenon, etc. In some cases, deterioration may occur that degrades the quality of the same image. Most imaging devices use a digital autofocus restoration system to remove out-of-focus blur, one of the typical image degradation.

디지털 자동초점복원 시스템의 주된 알고리즘인 영상복원기술에는 비선형 보간 벡터 양자화(nonlinear interpolative vector quantization : NLIVQ), 자기회귀 이동평균(autoregressive moving average : ARMA) 기반의 기술 등이 있다. 이러한 기술들은 영상에 초점이 빗나간 복수의 영역이 존재하는 경우에도 이를 고려하지 않고 획일적으로 영상을 복원하며, 깊이맵(depth map)에 기초한 추가적인 영상 분할에 의하여 계산의 복잡성을 유발한다. 그리고 점 확산 함수(point-spread function : PSF) 또는 블러 매개변수(blur parameter)에 대한 부정확한 추정으로 이미 초점이 맞춰져 있던 영역에 울림(ringing)이나 노이즈 클러스터링(noise clustering)과 같은 부적절한 현상이 발생할 수 있다는 단점을 가진다. 또한 현재 제안된 자동초점 기술은 영상형성 시스템의 점 확산 함수가 등방성(isotropic)이거나 모든 방향에서 대칭이라는 것을 전제로 구현된다. 이러한 기술은 하드웨어 및 연산 오버헤드(computational overhead)를 효과적으로 감소시키는 장점은 있으나, 점 확산 함수 추정을 위한 근사화로 인해 영상에서 재열화(reblurring) 현상 등과 같은 단점을 가지고 있다.Image restoration techniques, which are the main algorithms of digital autofocus restoration systems, include nonlinear interpolative vector quantization (NLIVQ) and autoregressive moving average (ARMA) based techniques. These techniques reconstruct the image uniformly even when there are a plurality of out-of-focus regions in the image, and cause complexity of calculation by additional image segmentation based on a depth map. Inaccurate estimates of point-spread functions (PSFs) or blur parameters can cause inadequate phenomena, such as ringing or noise clustering, on areas that are already in focus. Has the disadvantage that it can. In addition, the current autofocus technique is implemented on the premise that the point spreading function of the image forming system is isotropic or symmetric in all directions. This technique has the advantage of effectively reducing hardware and computational overhead, but has disadvantages such as reblurring in images due to the approximation for point spread function estimation.

한편 영상복원의 대안으로 제안된 영상융합기술은 공간 영역 또는 스펙트럼 영역에서 아웃 포커스된 영상의 품질을 향상시키는 데 사용되어 왔다. 기존의 영상융합기술은 웨이블렛 변환(wavelet transformation) 또는 이산 코사인 변환(discrete cosine transformation)에 기초하여 다초점 영상을 처리하거나 피라미드 기반 표현법(pyramid-based representation)을 이용하여 원본 영상을 서로 다른 공간적 스케일과 방향으로 분해한다. 그리고 분해된 서브밴드들 중에서 최대의 에너지를 가지는 서브밴드들을 선택하고 융합한 후 이를 재구성함으로써 출력을 생성한다. 그러나 이러한 기술들은 웨이블렛 변환의 민감성 때문에 복원된 영상의 품질 향상에 한계를 지닌다. 그리고 센서 평면이 프레임 사이에서 이동되어 발생하는 확대(magnification) 현상이나 프레임 간의 카메라 이동에 의한 오정 합(misregistration)으로 인하여 융합된 영상에서 오정렬(misalignment)이 발생한다. 이러한 오정렬 현상은 두 개 이상의 영상을 융합하여 초점이 복원된 영상을 생성하는 현재의 영상융합기술에 있어서 피할 수 없는 현상이다.Meanwhile, the image fusion technique proposed as an alternative to image restoration has been used to improve the quality of out-focused images in the spatial domain or the spectral domain. Conventional image fusion techniques process multifocal images based on wavelet transformations or discrete cosine transformations, or use pyramid-based representations to transform original images into different spatial scales. Disassemble in the direction. The subbands having the maximum energy among the decomposed subbands are selected, fused, and then reconstructed to generate an output. However, these techniques have limitations in improving the quality of reconstructed images due to the sensitivity of wavelet transform. In addition, misalignment occurs in a fused image due to magnification caused by the movement of the sensor plane between frames or misregistration due to camera movement between frames. This misalignment phenomenon is an unavoidable phenomenon in the current image fusion technology in which two or more images are fused to generate a defocused image.

본 발명이 이루고자 하는 기술적 과제는, 한 개의 원본영상에 대한 반복적인 복원 및 영상 융합에 의하여 복원된 영상을 생성하기 위한 계산 과정을 간단히 하고, 복수의 초점이 존재하는 영상을 재열화(reblurring)나 울림(ringing)현상없이 효과적으로 복원할 수 있는 자동초점복원장치 및 방법을 제공하는 데 있다.The technical problem to be achieved by the present invention is to simplify the calculation process for generating a reconstructed image by iterative reconstruction and image fusion of a single original image, and to reblurring an image having a plurality of focal points. It is an object of the present invention to provide an automatic focus restoring apparatus and method capable of effectively restoring without ringing.

본 발명이 이루고자 하는 다른 기술적 과제는, 한 개의 원본영상에 대한 반복적인 복원 및 영상 융합에 의하여 복원된 영상을 생성하기 위한 계산 과정을 간단히 하고, 복수의 초점이 존재하는 영상을 재열화(reblurring)나 울림(ringing)현상없이 효과적으로 복원할 수 있는 자동초점복원방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공하는 데 있다.Another technical problem to be solved by the present invention is to simplify a calculation process for generating a reconstructed image by iterative reconstruction and image fusion of one original image, and reblurring an image having a plurality of focal points. The present invention provides a computer-readable recording medium that records a program for executing an automatic focus restoration method that can be effectively restored without ringing.

상기의 기술적 과제를 달성하기 위한, 본 발명에 따른 자동초점복원장치는, 외부로부터 입력받은 원본영상의 복원을 위한 제1최적화 함수를 결정하고, 상기 원본영상에 상기 제1최적화 함수를 적용시켜 얻어진 제1중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후 상기 원본영상을 구성하는 각각의 화소의 화소값에서 상기 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제1영상을 생성하는 제1복원부; 상기 제1영상을 입력받아 상기 제1영상의 복원을 위한 제2최적화 함수를 결정하고, 상기 제1영상에 상기 제2최적화 함수를 적용시켜 얻어진 제2중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후 상기 제1영상을 구성하는 각각의 화소의 화소값에서 상기 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제2영상을 생성하는 제2복원부; 상기 제2영상을 입력받아 저장하는 프레임 메모리; 상기 원본영상 및 상기 제1영상을 구성하는 각 화소의 초점값을 산출하고 상기 원본영상 및 상기 제1영상에서 초점값이 사전에 설정된 기준 초점값 이상인 화소들로 이루어진 융합영역을 결정한 후 상기 융합영역들을 결합하여 융합영상을 생성하는 영상융합부; 및 상기 프레임 메모리로부터 독출한 상기 제2영상과 상기 융합영상의 유클리드 차분값을 산출하고, 상기 차분값을 기초로 상기 융합영상의 출력 여부를 결정하는 종결결정부;를 구비한다.In order to achieve the above technical problem, the automatic focus restoring apparatus according to the present invention is obtained by determining a first optimization function for reconstruction of an original image received from an external source and applying the first optimization function to the original image. After calculating a gradient of pixel values for each pixel constituting the first intermediate image, the first image is subtracted from a pixel value of each pixel constituting the original image by multiplying the gradient value by a preset proportional coefficient. A first restoring unit for generating a; A pixel for each pixel constituting a second intermediate image obtained by receiving the first image and determining a second optimization function for reconstruction of the first image, and applying the second optimization function to the first image A second restorer configured to generate a second image by calculating a gradient of a value and subtracting a value obtained by multiplying the gradient value by a preset proportional coefficient from a pixel value of each pixel constituting the first image; A frame memory configured to receive and store the second image; After calculating a focus value of each pixel constituting the original image and the first image and determining a fusion region of pixels in which the focus value is greater than or equal to a preset reference focus value in the original image and the first image, the fusion region is determined. Image fusion unit for combining them to create a fusion image; And a termination determination unit configured to calculate a Euclidean difference between the second image and the fused image read out from the frame memory, and determine whether to output the fused image based on the difference value.

상기의 다른 기술적 과제를 달성하기 위한, 본 발명에 따른 자동초점복원방법은, 외부로부터 입력받은 원본영상의 복원을 위한 제1최적화 함수를 결정하고, 상기 원본영상에 상기 제1최적화 함수를 적용시켜 얻어진 제1중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후 상기 원본영상을 구성하는 각각의 화소의 화소값에서 상기 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제1영상을 생성하는 제1복원단계; 상기 제1영상을 입력받아 상기 제1영상의 복원을 위한 제2최적화 함수를 결정하고, 상기 제1영상에 상기 제2최적화 함수를 적용시켜 얻어진 제2중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후 상기 제1영상을 구성하는 각각의 화소의 화소값에서 상기 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제2영상을 생성하고 상기 제2영상을 프레임 메모리에 저장하는 제2복원단계; 상기 원본영상 및 상기 제1 영상을 구성하는 각 화소의 초점값을 산출하고 상기 원본영상 및 상기 제1영상에서 초점값이 사전에 설정된 기준 초점값 이상인 화소들로 이루어진 융합영역을 결정한 후 상기 융합영역들을 결합하여 융합영상을 생성하는 영상융합단계; 및 상기 프레임 메모리로부터 독출한 상기 제2영상과 상기 융합영상의 유클리드 차분값을 산출하고, 상기 차분값을 기초로 상기 융합영상의 출력 여부를 결정하는 종결결정단계;를 갖는다.In order to achieve the above technical problem, the automatic focus restoration method according to the present invention determines a first optimization function for reconstruction of an original image received from the outside, and applies the first optimization function to the original image. After calculating a gradient of pixel values for each pixel constituting the obtained first intermediate image, subtracting a value obtained by multiplying the gradient value by a preset proportional coefficient from a pixel value of each pixel constituting the original image to obtain a first value. A first restoring step of generating an image; A pixel for each pixel constituting a second intermediate image obtained by receiving the first image and determining a second optimization function for reconstruction of the first image, and applying the second optimization function to the first image After calculating the gradient of the value, the second value is generated by subtracting the gradient value from the pixel value of each pixel constituting the first image by multiplying a preset proportional coefficient and storing the second image in the frame memory. A second restoration step; After calculating a focus value of each pixel constituting the original image and the first image and determining a fusion region of pixels in which the focus value is greater than or equal to a preset reference focus value in the original image and the first image, the fusion region is determined. Image fusion step of combining them to generate a fusion image; And a final determination step of calculating a Euclidean difference value between the second image and the fusion image read out from the frame memory, and determining whether to output the fused image based on the difference value.

본 발명에 따른 자동초점복원장치 및 방법에 의하면, 반복된 복원 과정에 의한 단계적인 영상 복원을 수행함으로써 계산 과정을 간단하게 만들 수 있다. 그리고 복원 과정에서 얻어진 복수의 영상을 융합함으로써 영상에 복수의 초점이 존재하는 경우에도 재열화나 울림 현상 없이 모든 초점을 복원할 수 있다. 또한 한 개의 원본 영상만으로 복원된 영상을 생성하므로 융합된 영상에서 프레임 간의 오정렬(misalighnment) 현상을 방지할 수 있다. 나아가, 원본영상의 복원시 점 확산 함수의 추정이 필요하지 않으므로 복원된 영상에서 울림이나 노이즈 클러스터링과 같은 부적절한 현상이 발생하지 않으며, 에지의 방향에 대응하는 고역통과필터링을 수행함으로써, 영상의 에지를 보존하면서 초점을 복원할 수 있다According to the automatic focus restoring apparatus and method according to the present invention, it is possible to simplify the calculation process by performing a step-by-step image restoration by the repeated restoration process. In addition, by fusing a plurality of images obtained in the reconstruction process, even when there are a plurality of focal points in the image, all the focal points can be reconstructed without reheating or ringing. In addition, since a reconstructed image is generated using only one original image, misalignment between frames in the fused image can be prevented. Furthermore, since the estimation of the point spread function is not necessary when restoring the original image, an inappropriate phenomenon such as ringing or noise clustering does not occur in the restored image, and the edge of the image is performed by performing high pass filtering corresponding to the edge direction. We can restore focus while preserving

이하에서 첨부된 도면들을 참조하여 본 발명에 따른 자동초점복원장치 및 방법의 바람직한 실시예에 대해 상세하게 설명한다. 우선 각 도면의 구성요소들에 참조번호를 부여함에 있어서, 동일한 구성요소들에 있어서는 비록 다른 도면상에 표 시되더라도 동일한 번호를 가지도록 한다.Hereinafter, with reference to the accompanying drawings will be described in detail a preferred embodiment of the automatic focus restoration apparatus and method according to the present invention. First, in giving reference numerals to the components of each drawing, the same components have the same number even though they are shown in different drawings.

도 1은 본 발명에 따른 자동초점복원장치에 대한 바람직한 실시예의 구성을 도시한 블록도이다.1 is a block diagram showing the configuration of a preferred embodiment of the automatic focus restoring apparatus according to the present invention.

도 1을 참조하면, 본 발명에 따른 자동초점복원장치는 제1복원부(110), 제2복원부(120), 프레임 메모리(130), 영상융합부(140) 및 종결결정부(150)를 구비한다.Referring to FIG. 1, the automatic focus restoring apparatus according to the present invention includes a first restoring unit 110, a second restoring unit 120, a frame memory 130, an image fusion unit 140, and a termination determining unit 150. It is provided.

제1복원부(110)는 외부로부터 입력받은 원본영상의 복원을 위한 제1최적화 함수를 결정하고, 원본영상에 제1최적화 함수를 적용시켜 얻어진 제1중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후 원본영상을 구성하는 각각의 화소의 화소값에서 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제1영상을 생성한다.The first restorer 110 determines a first optimization function for reconstruction of the original image received from the outside, and applies a pixel to each pixel constituting the first intermediate image obtained by applying the first optimization function to the original image. After calculating the gradient of the value, the first image is generated by subtracting the gradient value from the pixel value of each pixel constituting the original image by multiplying a preset proportional coefficient.

초점이 맞추어져 있던 영상이 열화되는 과정은 다음의 수학식으로 나타낼 수 있다.The deterioration of the focused image may be represented by the following equation.

Figure 112008010966307-PAT00001
Figure 112008010966307-PAT00001

여기서, y는 열화된 영상을 구성하는 각 화소의 화소값으로 이루어진 매트릭스, H는 열화 시스템을 나타내는 매트릭스, 그리고 x는 초점이 맞추어져 있던 영상을 구성하는 각 화소의 화소값으로 이루어진 매트릭스이다.Here, y is a matrix composed of pixel values of each pixel constituting the deteriorated image, H is a matrix representing the deterioration system, and x is a matrix composed of pixel values of each pixel constituting the focused image.

H가 비특이적이며 우량조건(well-posed)인 경우에 열화된 영상으로부터 초점이 복원된 영상을 생성하는 과정은 H의 역연산자를 산출함으로써 수행된다. 그러나 대부분의 영상은 매트릭스로 표현하는 경우에 그 차원이 매우 커지게 되므로 역연산자를 산출하기 위해 매우 복잡한 계산 과정이 필요하다. 따라서 반복적인 복원 과정에 의하여 단계적으로 초점을 복원함으로써 계산 과정을 간소화하고 복원된 영상을 효율적으로 생성할 수 있다. 이러한 복원과정은 영상의 복원을 위한 최적화 함수를 결정하고 이를 반복적으로 최소화하는 방식에 의해 수행되며, 최적화 함수가 최소화되어 수렴된 해가 복원된 영상으로 얻어진다.When H is non-specific and well-posed, the process of generating the defocused image from the degraded image is performed by calculating the inverse operator of H. However, since most images have large dimensions when expressed as a matrix, a very complicated calculation process is required to calculate an inverse operator. Therefore, by reconstructing the focus step by step through an iterative reconstruction process it is possible to simplify the calculation process and to efficiently generate reconstructed image. This reconstruction process is performed by determining the optimization function for reconstruction of the image and minimizing it repeatedly, and the converged solution is obtained as the reconstructed image by minimizing the optimization function.

제1복원부(110)는 입력받은 원본영상의 초점을 복원하기 위하여 다음의 수학식에 의해 제1최적화 함수를 결정한다.The first restorer 110 determines the first optimization function by the following equation in order to restore the focus of the input original image.

Figure 112008010966307-PAT00002
Figure 112008010966307-PAT00002

여기서, f1(x)는 제1최적화 함수, x0는 원본영상, H는 열화 시스템을 나타내는 매트릭스, C는 평활도 제약조건으로서 고역통과 필터의 필터 계수로 이루어진 매트릭스, 그리고 λ는 평활도 제약조건의 양을 조절하는 정칙화 매개변수이다.Where f 1 (x) is the first optimization function, x 0 is the original image, H is the matrix representing the degradation system, C is the smoothness constraint matrix consisting of the filter coefficients of the highpass filter, and λ is the smoothness constraint Normalization parameter that controls the amount.

고역통과 필터는 복원 과정에서 증폭된 잡음에 의한 고주파 성분을 억제하고 에지를 명확하게 복원하기 위해 사용된다. 그러나 영상에 존재하는 에지는 특정한 방향성을 가질 수 있으므로 등방성의 고역통과 필터를 사용하는 경우에는 다양한 방향성을 가지는 에지를 효과적으로 복원하기 어렵다. 따라서 원본영상을 구성하는 화소들을 각각의 화소가 속하는 에지의 방향에 따라 등방성, 수직, 수평 및 사선 방향 중 어느 한 방향으로 각각 분류하고, 각각의 화소에 에지의 방향에 대응하는 고역통과 필터링을 수행하는 것이 바람직하다. 방향성의 고역통과 필터를 사용함으로써 해당 화소가 속하는 에지의 방향은 명확하게 복원되고, 다른 방향의 고주파 성분들은 억제되는 효과를 얻을 수 있다.The highpass filter is used to suppress high frequency components caused by amplified noise and to restore the edge clearly during the restoration process. However, since edges present in an image may have a specific direction, it is difficult to effectively restore edges having various directions when an isotropic high pass filter is used. Therefore, the pixels constituting the original image are classified into one of isotropic, vertical, horizontal, and oblique directions according to the direction of the edge to which each pixel belongs, and high-pass filtering corresponding to the direction of the edge is performed on each pixel. It is desirable to. By using the directional high-pass filter, the direction of the edge to which the pixel belongs is clearly restored, and high frequency components in other directions can be suppressed.

원본영상에 제1최적화 함수를 적용하면 제1중간영상이 얻어지고, 다음의 수학식에 의해 제1중간영상을 구성하는 각 화소에 대한 화소값의 그라디언트가 산출된다. 각각의 그라디언트는 제1최적화 함수의 최대 증가 방향을 나타낸다.When the first optimization function is applied to the original image, a first intermediate image is obtained, and a gradient of pixel values for each pixel constituting the first intermediate image is calculated by the following equation. Each gradient represents the direction of maximum increase of the first optimization function.

Figure 112008010966307-PAT00003
Figure 112008010966307-PAT00003

여기서, ▽f1(x)는 제1중간영상을 구성하는 각 화소에 대한 화소값의 그라디언트로 이루어진 매트릭스, x0는 원본영상, H는 열화 시스템을 나타내는 매트릭스, HT는 H의 전치 매트릭스, C는 평활도 제약조건으로서 고역통과 필터의 필터 계수로 이루어진 매트릭스, CT는 C의 전치 매트릭스, 그리고 λ는 평활도 제약조건의 양을 조절하는 정칙화 매개변수이다.Here, ▽ f 1 (x) is first made of a gradient of a pixel value for each pixel constituting the intermediate image matrix, x 0 is the original image, H is a matrix that represents the degradation system, H T is the H permutation matrix, C is a smoothness constraint, a matrix consisting of the filter coefficients of the highpass filter, C T is a transpose matrix of C, and λ is a normalization parameter that controls the amount of smoothness constraint.

원본영상으로부터 초점이 복원된 제1영상은 제1최적화 함수를 최소화시키는 해를 구함으로써 얻어지므로, 제1복원부(110)는 다음의 수학식에 의해 그라디언트 값에 비례계수를 곱한 값을 원본영상을 구성하는 각각의 화소의 화소값에서 감하여 제1최적화 함수를 최소화시킨다.Since the first image whose focus is restored from the original image is obtained by obtaining a solution for minimizing the first optimization function, the first restoring unit 110 multiplies the gradient value by the proportional coefficient and multiplies the original image by the following equation. The first optimization function is minimized by subtracting from the pixel value of each pixel constituting.

Figure 112008010966307-PAT00004
Figure 112008010966307-PAT00004

여기서, x1은 제1영상, x0는 원본영상, H는 열화 시스템을 나타내는 매트릭스, HT는 H의 전치 매트릭스, C는 평활도 제약조건으로서 고역통과 필터의 필터 계수로 이루어진 매트릭스, CT는 C의 전치 매트릭스, λ는 평활도 제약조건의 양을 조절하는 정칙화 매개변수, 그리고 β는 최적화 함수의 수렴속도를 조절하는 이완변수이다.Where x 1 is the first image, x 0 is the original image, H is the matrix representing the degradation system, H T is the prematrix of H, C is the smoothness constraint, and is a matrix consisting of filter coefficients of the high pass filter, C T is The transpose matrix of C, λ is a normalization parameter that controls the amount of smoothness constraints, and β is a relaxation variable that controls the convergence speed of the optimization function.

이완변수 β는 영상의 신호 대 잡음비(signal-to-noise ratio : SNR) 값에 따라서, 예를 들면 SNR 값이 10~30dB인 경우에는 0.1로, SNR 값이 40~60dB인 경우에는 0.05로 다르게 선택된다.The relaxation variable β varies according to the signal-to-noise ratio (SNR) value of the image, for example, 0.1 when the SNR value is 10 to 30 dB and 0.05 when the SNR value is 40 to 60 dB. Is selected.

제1복원부(110)에서 제1영상이 생성되면 제2복원부(120)는 제1영상을 입력받아 제1영상의 복원을 위한 제2최적화 함수를 결정하고, 제1영상에 제2최적화 함수를 적용시켜 얻어진 제2중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후 제1영상을 구성하는 각각의 화소의 화소값에서 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제2영상을 생성한다.When the first image is generated in the first restorer 110, the second restorer 120 receives the first image, determines a second optimization function for reconstruction of the first image, and optimizes the second image in the first image. After calculating the gradient of the pixel value for each pixel constituting the second intermediate image obtained by applying the function, the value obtained by multiplying the gradient value by a preset proportional coefficient from the pixel value of each pixel constituting the first image To generate a second image.

상술한 바와 같은 이유로 제2복원부(120)는 다음의 수학식에 의해 제2최적화 함수를 결정한다.For the above reason, the second restorer 120 determines the second optimization function by the following equation.

Figure 112008010966307-PAT00005
Figure 112008010966307-PAT00005

여기서, f2(x)는 제2최적화 함수, x0는 원본영상, x1은 제1영상, H는 열화 시스템을 나타내는 매트릭스, C는 평활도 제약조건으로서 고역통과 필터의 필터 계수로 이루어진 매트릭스, 그리고 λ는 평활도 제약조건의 양을 조절하는 정칙화 매개변수이다.Where f 2 (x) is the second optimization function, x 0 is the original image, x 1 is the first image, H is the matrix representing the degradation system, C is the smoothness constraint matrix consisting of the filter coefficients of the high pass filter, And λ is a normalization parameter that controls the amount of smoothness constraint.

제1복원부(110)와 마찬가지로 제2복원부(120)에서도 각각의 화소에 에지의 방향에 대응하는 고역통과 필터링이 수행됨으로써 해당 화소가 속하는 에지의 방향은 명확하게 복원되고 다른 방향의 고주파 성분들은 억제되는 효과를 얻을 수 있다.As in the first restorer 110, the second restorer 120 performs high pass filtering corresponding to the edge direction on each pixel, so that the direction of the edge to which the pixel belongs is clearly restored and the high frequency component of the other direction is restored. Can obtain a suppressed effect.

제1영상에 제2최적화함수를 적용하여 얻어진 제2중간영상을 구성하는 각 화소의 화소값의 그라디언트는 다음의 수학식에 의해 산출된다.The gradient of the pixel value of each pixel constituting the second intermediate image obtained by applying the second optimization function to the first image is calculated by the following equation.

Figure 112008010966307-PAT00006
Figure 112008010966307-PAT00006

여기서, ▽f2(x)는 제2중간영상을 구성하는 각 화소에 대한 화소값의 그라디언트로 이루어진 매트릭스, x0는 원본영상, x1은 제1영상, H는 열화 시스템을 나타내는 매트릭스, HT는 H의 전치 매트릭스, C는 평활도 제약조건으로서 고역통과 필터 의 필터 계수로 이루어진 매트릭스, CT는 C의 전치 매트릭스, 그리고 λ는 평활도 제약조건의 양을 조절하는 정칙화 매개변수이다.Where f 2 (x) is a matrix consisting of gradients of pixel values for each pixel constituting the second intermediate image, x 0 is the original image, x 1 is the first image, H is a matrix representing the degradation system, H T is the prematrix of H, C is the smoothness constraint, the matrix of filter coefficients of the high pass filter, C T is the prematrix of C, and λ is the normalization parameter that controls the amount of smoothness constraint.

제2복원부(120)는 제2영상을 얻기 위해 다음의 수학식에 의해 그라디언트 값에 비례계수를 곱한 값을 제1영상을 구성하는 각각의 화소의 화소값에서 감하여 제2최적화 함수를 최소화시킨다. 최소화된 제2최적화 함수의 해가 제1영상으로부터 초점이 복원된 제2영상으로 된다.The second restorer 120 minimizes the second optimization function by subtracting a value obtained by multiplying a gradient value by a proportional coefficient from the pixel values of each pixel constituting the first image by the following equation to obtain a second image. . The solution of the minimized second optimization function is a second image whose focus is restored from the first image.

Figure 112008010966307-PAT00007
Figure 112008010966307-PAT00007

여기서, x2는 제2영상, x1은 제1영상, x0는 원본영상, H는 열화 시스템을 나타내는 매트릭스, HT는 H의 전치 매트릭스, C는 평활도 제약조건으로서 고역통과 필터의 필터 계수로 이루어진 매트릭스, CT는 C의 전치 매트릭스, λ는 평활도 제약조건의 양을 조절하는 정칙화 매개변수, 그리고 β는 최적화 함수의 수렴속도를 조절하는 이완변수이다.Where x 2 is the second image, x 1 is the first image, x 0 is the original image, H is the matrix representing the degradation system, H T is the prematrix of H, C is the smoothness constraint, and the filter coefficient of the high pass filter. Where C T is the transpose matrix of C, λ is the normalization parameter that controls the amount of smoothness constraint, and β is the relaxation variable that controls the convergence speed of the optimization function.

프레임 메모리(130)는 추후 사용에 대비하여 제2영상을 입력받아 저장하고, 영상융합부(140)는 원본영상 및 제1영상을 구성하는 각 화소의 초점값을 산출하고 원본영상 및 제1영상에서 초점값이 사전에 설정된 기준 초점값 이상인 화소들로 이루어진 융합영역을 결정한 후 융합영역들을 결합하여 융합영상을 생성한다. 이를 위해 영상융합부(140)는 초점값 산출부(141) 및 화소결합부(142)를 구비한다.The frame memory 130 receives and stores a second image for future use, and the image fusion unit 140 calculates a focus value of each pixel constituting the original image and the first image, and stores the original image and the first image. Determines a fusion region composed of pixels whose focus value is greater than or equal to a preset reference focus value, and then combines the fusion regions to generate a fusion image. To this end, the image fusion unit 140 includes a focus value calculator 141 and a pixel combiner 142.

초점값 산출부(141)는 원본영상 및 제1영상을 구성하는 각 화소에 대하여 주변 화소와의 화소값의 차를 합산하여 돌출도 값을 구하고, 각각의 화소를 중심으로 하는 소정 크기의 윈도우 내에 위치하는 화소들의 돌출도 값을 합산하여 각각의 화소에 대한 초점값을 산출한다.The focus value calculating unit 141 obtains the protrusion value by summing the difference between pixel values of the original image and the first image by surrounding pixel values, and in a window having a predetermined size centering each pixel. A focus value for each pixel is calculated by summing protrusion values of pixels located.

화소의 돌출도 값은 영상에서 초점이 잘 맞는 경우에 증가하며, 다음과 같은 절대 라플라시안 연산자를 사용하여 계산될 수 있다.The protrusion value of the pixel increases when the image is well focused, and may be calculated using the following absolute Laplacian operator.

Figure 112008010966307-PAT00008
Figure 112008010966307-PAT00008

여기서, Lk는 라플라시안 값을 구하고자 하는 함수, x는 함수 Lk의 수평 방향 성분, 그리고 y는 함수 Lk의 수직 방향 성분을 나타낸다.Where, L k is a function, to obtain the value x is the horizontal component of the Laplacian function L k, and y denotes the vertical direction component of the function L k.

x와 y 방향의 2차 도함수는 반대의 부호를 가지고 서로를 상쇄하는 경우가 있으므로, 이를 막기 위해 절대 라플라시안 연산자를 사용한다. 돌출도 값은 돌출도 값을 구하고자 하는 화소와 해당 화소에 대하여 수평 및 수직 방향으로 위치하는 화소들과의 화소값(pixel intensity)의 차를 합산한 값으로 정의된다. 이러한 돌출도 값은 다음의 수학식에 의해 구해진다.Since the second derivatives in the x and y directions cancel each other with opposite signs, use the absolute Laplacian operator to prevent this. The protrusion value is defined as the sum of the pixel intensity between the pixel for which the protrusion value is to be obtained and the pixels positioned in the horizontal and vertical directions with respect to the pixel. This protrusion value is obtained by the following equation.

Figure 112008010966307-PAT00009
Figure 112008010966307-PAT00009

여기서, MLk(i,j)는 영상에서 (i,j)의 좌표를 갖는 화소의 돌출도 값을 나타 내는 변형된 라플라시안 값이고, I(i,j)는 (i,j)의 좌표를 갖는 화소의 화소 강도를 나타낸다.Here, ML k (i, j) is a modified Laplacian value representing the protrusion value of a pixel having coordinates of (i, j) in the image, and I (i, j) is a coordinate of (i, j). The pixel intensity of the pixel to have is shown.

초점값 산출부(141)는 수학식 9를 이용하여 영상을 구성하는 모든 화소에 대한 돌출도 값을 계산한 후 이를 기초로 다음의 수학식에 의해 각 화소의 초점값을 산출한다. 이때 화소의 초점값은 각각의 화소를 중심으로 하는 소정 크기의 윈도우 내에 위치하는 화소들의 돌출도 값을 합산하여 산출되며, 초점값이 지나치게 커져 발생할 수 있는 오차를 줄이기 위해 돌출도 값이 사전에 설정된 임계치 이상인 화소들의 돌출도 값을 합산할 수 있다. 돌출도 값의 임계치는 실험적으로 결정되며, 40~60의 범위에서 선택하는 경우에 대부분 수용 가능한 결과를 제공한다. 한편 초점값 산출을 위한 윈도우의 크기는 높은 정확도를 얻기 위해 3×3(픽셀) 크기로 설정되는 것이 바람직하다.The focus value calculator 141 calculates the projection values for all the pixels constituting the image by using Equation 9 and then calculates the focus values of each pixel by using the following equation. In this case, the focal value of the pixel is calculated by summing the protrusion values of pixels positioned in a window having a predetermined size centering each pixel, and the protrusion values are preset in order to reduce an error that may occur due to an excessively large focus value. The protrusion values of pixels that are greater than or equal to the threshold may be summed. The threshold of the protrusion value is determined experimentally and gives mostly acceptable results when selected in the range of 40 to 60. On the other hand, the size of the window for calculating the focus value is preferably set to 3 × 3 (pixel) size in order to obtain a high accuracy.

Figure 112008010966307-PAT00010
Figure 112008010966307-PAT00010

여기서, f(i,j)는 영상에서 (i,j)의 좌표를 갖는 화소의 초점값, N은 초점값을 구하고자 하는 화소를 중심으로 하는 윈도우의 크기, MLk(p,q)는 (p,q)의 좌표를 갖는 화소의 돌출도 값, 그리고 T1은 사전에 설정된 돌출도 값의 임계치를 나타낸다.Here, f (i, j) is a focus value of a pixel having coordinates of (i, j) in the image, N is a size of a window centered on a pixel for which the focus value is to be obtained, and ML k (p, q) is The protrusion value of the pixel having coordinates of (p, q), and T 1 represent a threshold value of a preset protrusion value.

화소결합부(142)는 산출한 초점값을 근거로 원본영상 및 제1영상에서 초점값 이 사전에 설정된 기준 초점값 이상인 화소들을 선택하여 융합영역을 결정하고, 융합영역을 구성하는 화소들을 결합하여 융합영상을 생성한다.The pixel combiner 142 determines a fusion region by selecting pixels whose focus value is greater than or equal to a preset reference focus value in the original image and the first image based on the calculated focus value, and combines pixels constituting the fusion region. Create a fusion image.

융합영역은 다음의 수학식에 의해 원본영상 및 제1영상을 구성하는 화소들 중에서 초점값이 사전에 설정된 기준 초점값 이상인 화소들이 선택됨으로써 결정된다. 각 영상에서 초점이 맞추어진 부분만을 선택하여 다초점 영상을 효과적으로 복원할 수 있으며, 최적의 결과를 얻기 위해 기준 초점값은 40~60의 범위에서 선택될 수 있다.The fusion region is determined by selecting pixels having a focus value equal to or greater than a preset reference focus value among pixels constituting the original image and the first image by the following equation. By selecting only the focused portion of each image, the multifocal image can be effectively restored, and the reference focus value can be selected in the range of 40 to 60 to obtain an optimal result.

Figure 112008010966307-PAT00011
Figure 112008010966307-PAT00011

여기서, Sk는 원본영상 또는 제1영상에서 결정되는 융합영역, Ck는 융합영역을 구성하는 화소의 선택 기준, 그리고 fk및 fk -1은 원본영상 또는 제1영상을 구성하는 각 화소의 초점값이다.Here, S k is a fusion region determined from the original image or the first image, C k is a selection criterion for pixels constituting the fusion region, and f k and f k -1 are each pixels constituting the original image or the first image. Is the focus value.

융합영역을 구성하는 화소들을 선택하는 과정에서 생기는 에러를 줄이기 위해 다음의 수학식에 의해 원본영상 및 제1영상에서 결정된 융합영역을 구성하는 화소들의 초점값에 소정의 가중치를 부여할 수 있다.In order to reduce an error in the process of selecting the pixels constituting the fusion region, a predetermined weight may be given to a focus value of the pixels constituting the fusion region determined in the original image and the first image by the following equation.

Figure 112008010966307-PAT00012
Figure 112008010966307-PAT00012

여기서, Sk는 원본영상 또는 제1영상에서 결정되는 융합영역, xk 및 xk -1은 원 본영상 또는 제1영상을 구성하는 각 화소, ωk(Θ) 및 ωk-1(Θ)은 화소의 초점값에 부여하는 가중치, 그리고 fk 및 fk -1은 원본영상 또는 제1영상을 구성하는 각 화소의 초점값이다.Here, S k is a fusion region determined from the original image or the first image, x k And x k -1 is each pixel constituting the original image or the first image, ω k (Θ) and ω k-1 (Θ) are weights given to the focus values of the pixels, and f k and f k -1 Is a focus value of each pixel constituting the original image or the first image.

화소의 초점값에 부여되는 가중치는 화소의 돌출도 값에 따라 결정되며, 화소의 화소값이 해당 화소에 대해 수평 및 수직 방향으로 위치하는 화소들의 화소값과 비교하여 큰 경우에는 해당 화소의 돌출도 값이 최대가 되므로 가중치 값이 1로 결정되고, 그 이외의 경우에는 가중치 값은 0으로 결정된다.The weight given to the focal point value of the pixel is determined according to the protrusion value of the pixel. If the pixel value of the pixel is larger than the pixel values of pixels positioned in the horizontal and vertical directions with respect to the pixel, the protrusion degree of the pixel is determined. Since the value is maximum, the weight value is determined as 1, and in other cases, the weight value is determined as 0.

다음으로 화소결합부(142)는 다음의 수학식에 의해 원본영상 및 제1영상의 융합영역을 결합하여 융합영상을 생성한다.Next, the pixel combiner 142 combines the fusion region of the original image and the first image to generate a fusion image by the following equation.

Figure 112008010966307-PAT00013
Figure 112008010966307-PAT00013

여기서, xck는 융합영상, Sk는 융합영역, 그리고 xak와 xbk는 융합을 위한 원본영상 및 제1영상이다.Here, x ck is a fusion image, S k is a fusion region, and x ak and x bk are original images and first images for fusion.

수학식 13은 영상 xak와 xbk를 융합하여 융합영상 xck를 생성하는 과정을 나타낸 식이다. 수학식 13에 따르면, xak의 융합영역과 xbk에서 xak의 융합영역에 해당하는 영역을 제외한 영역을 결합하여 융합영상이 생성된다. 영상융합에 의해 나타날 수 있는 융합영역 사이의 부자연스러운 경계를 제거하기 위하여 각각의 융합영역에 평활화(smoothing) 또는 저역통과필터링(low pass filtering)을 적용하는 것이 바 람직하다.Equation 13 shows a process of generating a fused image x ck by fusing the images x ak and x bk . According to equation (13), coupling the areas other than the area corresponding to the fusion region of the fusion region of ak x x x ak and bk to the fusion image is generated. It is preferable to apply smoothing or low pass filtering to each of the fusion regions in order to remove unnatural boundaries between the fusion regions that may be caused by image fusion.

융합영역의 결합 과정에서 누락된 화소가 발생하는 경우, 화소결합부(142)는 원본영상 및 제1영상에서 누락된 화소의 위치에 대응하는 위치의 화소의 화소값 중 어느 하나를 선택하여 누락된 화소의 위치에 삽입한다. 명확한 영상을 얻기 위해 원본영상 및 제1영상에서 누락된 화소의 위치에 대응하는 위치의 화소 중 더 높은 초점값을 가지는 화소가 선택된다.When a missing pixel is generated during the combining process of the fusion region, the pixel combiner 142 selects the missing pixel value of the pixel at the position corresponding to the position of the missing pixel in the original image and the first image. Insert at pixel position. In order to obtain a clear image, a pixel having a higher focus value is selected among pixels at positions corresponding to positions of pixels missing from the original image and the first image.

종결결정부(150)는 제2영상을 프레임 메모리(130)로부터 독출하여 제2영상과 융합영상의 유클리드 차분값을 산출하고, 산출된 차분값을 기초로 융합영상의 출력 여부를 결정한다. 유클리드 차분값은 다음의 수학식에 의해 산출된다.The termination determiner 150 reads the second image from the frame memory 130, calculates a Euclidean difference value between the second image and the fused image, and determines whether to output the fused image based on the calculated difference value. Euclidean difference value is calculated by the following equation.

Figure 112008010966307-PAT00014
Figure 112008010966307-PAT00014

여기서, xr은 제2영상, xf는 융합영상, E()는 유클리드 공간의 근사화된 차분 연산자, (i,j)는 영상에서 화소가 위치하는 좌표, 그리고 D는 융합영상을 구성하는 화소의 수이다.Where x r is the second image, x f is the fused image, E () is an approximate difference operator in Euclidean space, (i, j) is the coordinate where the pixel is located in the image, and D is the pixel constituting the fused image Is the number of.

차분 연산자 E()는 제2영상과 융합영상에서 같은 위치에 대응하는 화소를 비교하여 결정되는 값으로, 두 화소의 초점값이 같으면 0의 값을 가지며 두 화소의 초점값이 상이하면 1의 값을 가진다. 수학식 14에 따르면, 제2영상과 융합영상을 구성하는 모든 화소들에 대해 차분 연산자를 적용한 값을 모두 더한 후 그 값을 융 합영상을 구성하는 화소의 수로 나누면 제2영상과 융합영상의 유클리드 차분값이 산출된다.The difference operator E () is a value determined by comparing pixels corresponding to the same position in the second image and the fused image, and has a value of 0 when the two pixels have the same focus value, and a value of 1 when the two pixels have different focus values. Has According to Equation 14, after adding all the values of the difference operator applied to all the pixels constituting the second image and the fusion image, and dividing the value by the number of pixels constituting the fusion image, Euclid of the second image and the fusion image The difference value is calculated.

제2영상과 융합영상에서 초점값이 일치하는 화소의 수가 많을수록 유클리드 차분값이 감소하며, 차분값이 사전에 설정된 기준값 이하로 감소하면 원본영상의 전 영역에서 복원이 이루어진 것이므로 종결결정부(150)는 융합영상을 영상 복원의 결과로서 출력한다.In the second image and the fused image, as the number of pixels having the same focal value increases, the Euclidean difference value decreases. When the difference value decreases below a preset reference value, the final decision unit 150 restores the entire area of the original image. Outputs the fused image as a result of image reconstruction.

유클리드 차분값이 사전에 설정된 기준값을 초과하는 경우에는 원본영상의 복원이 제대로 이루어지지 않은 것이므로 종결결정부(150)는 융합영상을 원본영상으로 결정하여 영상융합부(140)에 입력시키고, 제2영상을 제1영상으로 결정하여 제2복원부(120) 및 영상융합부(140)에 입력시킨다. 따라서 제2복원부(120)에서 영상의 복원 과정이 한번 더 수행되고 복원된 영상은 영상융합부(140)에서 이전 단계의 융합영상과 결합되어 새로운 융합영상이 생성된다.If the Euclidean difference value exceeds a preset reference value, since the restoration of the original image is not properly performed, the termination decision unit 150 determines the fusion image as the original image and inputs it to the image fusion unit 140. The image is determined as the first image and input to the second restorer 120 and the image fusion unit 140. Therefore, the restoration process of the image is performed once more in the second restorer 120, and the restored image is combined with the fusion image of the previous step in the image fusion unit 140 to generate a new fusion image.

종결결정부(150)에서 융합영상을 출력하기 위해 필요한 기준값은 영상에 따라 다르게 결정되며, 이전 단계에서 산출하였던 유클리드 차분값과 비교하여 3~5배의 범위에서 급격하게 감소할 때의 값이 기준값으로 결정된다.The reference value required for outputting the fused image from the terminal decision unit 150 is determined differently according to the image, and the value when the value is sharply reduced in the range of 3 to 5 times compared to the Euclidean difference value calculated in the previous step is the reference value. Is determined.

도 2는 본 발명에 따른 자동초점복원방법에 대한 바람직한 실시예의 수행과정을 도시한 흐름도이다.2 is a flowchart illustrating a process of performing a preferred embodiment of the automatic focus restoration method according to the present invention.

도 2를 참조하면, 제1복원부(110)는 외부로부터 입력받은 원본영상의 복원을 위한 제1최적화 함수를 결정하고, 원본영상에 제1최적화 함수를 적용시켜 얻어진 제1중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후, 원 본영상을 구성하는 각각의 화소의 화소값에서 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제1영상을 생성한다(S210). 다음으로 제2복원부(120)는 제1영상을 입력받아 제1영상의 복원을 위한 제2최적화 함수를 결정하고, 제1영상에 제2최적화 함수를 적용시켜 얻어진 제2중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후, 제1영상을 구성하는 각각의 화소의 화소값에서 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제2영상을 생성한다(S220).Referring to FIG. 2, the first restorer 110 determines a first optimization function for reconstruction of the original image received from the outside, and configures the first intermediate image obtained by applying the first optimization function to the original image. After calculating the gradient of the pixel value for each pixel, the first image is generated by subtracting the gradient value from the pixel value of each pixel constituting the original image by multiplying a preset proportional coefficient (S210). Next, the second restorer 120 receives the first image, determines a second optimization function for reconstruction of the first image, and configures a second intermediate image obtained by applying the second optimization function to the first image. After calculating a gradient of pixel values for each pixel, a second image is generated by subtracting a gradient value from a pixel value of each pixel constituting the first image by multiplying a gradient factor previously set.

제2복원부(120)에서 생성된 제2영상은 프레임 메모리(130)에 저장되고, 초점값 산출부(141)는 원본영상 및 제1영상을 구성하는 각 화소에 대하여 주변 화소와의 화소값의 차를 합산하여 돌출도 값을 구하고, 각각의 화소를 중심으로 하는 소정 크기의 윈도우 내에 위치하는 화소들 중 돌출도 값이 사전에 설정된 임계치 이상인 화소들의 돌출도 값을 합산하여 각각의 화소에 대한 초점값을 산출한다(S230). 다음으로 화소결합부(142)는 산출한 초점값을 근거로 원본영상 및 제1영상에서 초점값이 사전에 설정된 기준 초점값 이상인 화소들을 선택하여 융합영역을 결정하고, 융합영역을 구성하는 화소들을 결합하여 융합영상을 생성한다(S240). 다음으로 융합영역의 결합 과정에서 누락된 화소에 대하여 화소결합부(142)는 원본영상 및 제1영상에서 누락된 화소의 위치에 대응하는 위치의 화소의 화소값 중 어느 하나를 선택하여 누락된 화소의 위치에 삽입한다(S250).The second image generated by the second restorer 120 is stored in the frame memory 130, and the focus value calculator 141 stores pixel values of neighboring pixels with respect to each pixel constituting the original image and the first image. The sum of the differences of the pixels is obtained, and the protrusion values of pixels whose protrusion value is greater than or equal to a preset threshold among pixels located in a window of a predetermined size centering on each pixel are summed for each pixel. The focus value is calculated (S230). Next, the pixel combiner 142 selects pixels whose focus value is greater than or equal to a preset reference focus value in the original image and the first image based on the calculated focus value, and determines the fusion region and selects pixels constituting the fusion region. By combining to generate a fusion image (S240). Next, the pixel combining unit 142 selects one of the pixel values of the pixel at the position corresponding to the position of the missing pixel in the first image and the missing pixel in the combining process of the fusion region. It is inserted at the position of (S250).

종결결정부(150)는 제2영상을 프레임 메모리(130)로부터 독출하여 제2영상과 융합영상의 유클리드 차분값을 산출한다(S260). 다음으로 종결결정부(150)는 산출 한 유클리드 차분값과 기준값을 비교한다(S270). 만약 유클리드 차분값이 기준값보다 작거나 같으면, 종결결정부(150)는 융합영상을 결과로서 출력하고(S280), 유클리드 차분값이 기준값보다 크면, 종결결정부(150)는 융합영상을 원본영상으로 결정하고 제2영상을 제1영상으로 결정한다(S290).The termination determiner 150 reads the second image from the frame memory 130 and calculates a Euclidean difference value between the second image and the fused image (S260). Next, the termination determination unit 150 compares the calculated Euclidean difference value and the reference value (S270). If the Euclidean difference value is less than or equal to the reference value, the termination determination unit 150 outputs the fusion image as a result (S280), and if the Euclidean difference value is larger than the reference value, the termination determination unit 150 converts the fusion image to the original image. In operation S290, the second image is determined as the first image.

도 3a 내지 도 3f에는 각각 열화된 원본영상, 2회, 4회, 5회, 7회의 반복적인 복원 과정에 의하여 생성된 영상 및 최종적으로 출력된 융합영상이 도시되어 있다. 원본영상은 복수의 피사체 중 가운데의 상자와 사람에 초점이 맞추어져 있다. 복원 횟수가 2회일 때에는 상자와 사람에 초점이 맞추어져 있으나, 복원의 횟수가 증가할 수록 카메라에 가까운 시계의 초점이 복원되고 원래 초점이 맞추어져 있었던 시계와 사람에는 영상이 분열되는 재열화 현상이 나타난다. 융합영상은 반복적인 복원으로 생성된 복수의 영상 중에서 원래 초점이 맞추어져 있던 상자와 사람 부분 및 반복적인 복원으로 초점이 복원된 시계 부분을 융합하여 생성된다. 이와 같이 원본영상에 복수의 초점이 존재하는 경우, 원본영상의 반복적인 복원에 의해 복수의 초점이 모두 명확하게 복원된 융합영상을 얻을 수 있다.3A to 3F show deteriorated original images, images generated by repetitive reconstruction processes twice, four times, five times, and seven times, and finally the fused images finally outputted. The original image is focused on the box and the person in the center of the plurality of subjects. When the number of restorations is 2, the box and the person are in focus.However, as the number of restorations increases, the focus of the clock close to the camera is restored, and the refocusing phenomenon that the image is split in the clock and the person originally focused. appear. The fusion image is generated by fusing a box, a human part originally focused, and a clock part whose focus is restored by repetitive reconstruction among a plurality of images generated by repetitive reconstruction. As described above, when a plurality of focal points exist in the original image, a fused image in which all the plurality of foci are clearly reconstructed by repetitive reconstruction of the original image can be obtained.

도 4는 다양한 SNR 값을 가지는 영상의 반복적인 복원에 따른 피크 신호 대 잡음비(peak signal-to-noise ratio : PSNR) 값을 그래프로 도시한 도면이다. 도 4를 참조하면, 반복적인 영상 복원에서 반복의 횟수가 8회 이하인 경우 영상이 열화된 정도가 클수록, 즉 SNR 값이 증가할수록 PSNR 값은 감소하는 형태를 보이며, 반복의 횟수가 10회 이상이 되면 SNR 값이 60dB인 경우를 제외하고 PSNR 값은 거의 동일하게 나타난다. 또한 모든 SNR 값에 대해 복원의 횟수가 증가할수록 PSNR 값이 증가하여 영상에서 열화된 부분의 초점이 더 잘 복원된다는 것을 보여준다.4 is a graph illustrating peak signal-to-noise ratio (PSNR) values according to repetitive reconstruction of an image having various SNR values. Referring to FIG. 4, when the number of repetitions in the repetitive image restoration is 8 or less, the PSNR value decreases as the degree of deterioration of the image increases, that is, as the SNR value increases, and the number of repetitions is 10 or more times. In this case, the PSNR values are almost the same except when the SNR value is 60 dB. It is also shown that as the number of reconstructions increases for all SNR values, the PSNR values increase to better reconstruct the defocused portion of the image.

도 5는 종래의 정칙화된 반복 복원(regularized iterative restoration : RIR) 방법 및 정칙화된 방향성 반복 복원(regularized directional iterative restoration : RDIR) 방법과 본 발명에 따른 자동초점복원의 결과로 생성된 영상의 PSNR 값을 그래프로 도시한 도면이다.5 shows a conventional regularized iterative restoration (RIR) method, a regularized directional iterative restoration (RDIR) method, and an PSNR of an image generated as a result of autofocus restoration according to the present invention. A graph showing values.

도 5를 참조하면, RIR과 RDIR에 의하여 복원된 영상의 경우는 영상 복원의 횟수가 8회 이상으로 증가하면 원래 초점이 맞춰져 있던 영역에서의 재열화 및 울림 현상에 의해 오히려 PSNR 값이 감소하는 형태를 보인다. 그러나 본 발명에 따른 자동초점복원의 결과로 생성된 영상의 경우는 종래 기술에 의하여 복원된 영상에 비해 높은 PSNR 값을 보이며, 복원의 횟수가 증가할수록 PSNR 값도 증가하는 형태를 보인다. 따라서 반복적인 복원 과정에 영상의 융합 과정이 결합됨으로써 최종적으로 복원된 영상에서 발생하는 재열화 및 울림 현상을 제거하고 모든 영역에서 초점이 복원된 영상을 얻을 수 있다.Referring to FIG. 5, in the case of an image reconstructed by RIR and RDIR, when the number of image reconstructions is increased to eight or more times, the PSNR value decreases due to re-deterioration and ringing in the originally focused area. Seems. However, the image generated as a result of the automatic focus restoration according to the present invention shows a higher PSNR value than the image reconstructed by the prior art, and the PSNR value also increases as the number of reconstructions increases. Therefore, by combining the image fusion process with the reconstructed reconstruction process, it is possible to remove the reheating and ringing phenomena occurring in the finally reconstructed image, and to obtain the reconstructed image in all regions.

도 6a 내지 도 6f에는 각각 열화된 원본영상, 종래의 CLS 필터를 사용하여 복원된 영상, 종래의 RIR 방법에 의하여 복원된 영상, 종래의 반복적인 복원 방법에 의하여 복원된 영상, 종래의 블러 매개변수를 사용하여 복원된 영상 및 본 발명에 따른 자동초점복원에 의하여 생성된 영상이 도시되어 있다. 열화된 원본영상은 제일 위쪽 부분에 열화된 영역을 포함한다. 종래의 CLS 필터를 사용하여 복원된 영상의 경우 원본영상에서 열화된 부분의 초점은 복원되었으나 원래 초점이 맞춰져 있던 영역에서 열화현상이 발생한다. 종래의 RIR 방법에 의하여 복원된 영상에는 원래 초점이 맞춰져 있던 영역뿐만 아니라 열화된 영역의 초점도 명확하게 복원되지 않아서 전체적으로 열화된 현상을 보인다. 그리고 종래의 반복적인 복원 방법에 의하여 복원된 영상의 경우는 원래 초점이 맞춰져 있던 영역에 재열화 현상이 나타나지는 않았으나 초점의 불명확한 복원으로 영상의 에지 부분이 보존되지 않았다. 또한 종래의 블러 매개변수를 사용하여 복원된 영상은 전체적으로 열화 현상이 거의 나타나지 않았으나 에지가 명확하지 않아 작은 글씨에서 영상이 흐려진 현상이 나타났다. 그러나 본 발명에 따른 자동초점복원에 의해 생성된 영상의 경우는 원래 초점이 맞춰져 있던 영역은 그대로 보존되고 열화된 부분의 초점만 명확하게 복원된 결과를 보인다.6A to 6F respectively show a deteriorated original image, an image reconstructed using a conventional CLS filter, an image reconstructed by a conventional RIR method, an image reconstructed by a conventional repetitive reconstruction method, and a conventional blur parameter. The image reconstructed using and the image generated by the autofocus restoration according to the present invention are shown. The deteriorated original image includes a deteriorated area at the top. In the case of the image reconstructed using the conventional CLS filter, the deterioration of the deteriorated portion of the original image is restored, but the deterioration phenomenon occurs in the region where the original focus was achieved. In the image reconstructed by the conventional RIR method, the focus of the deteriorated region as well as the originally focused region is not clearly reconstructed, thereby showing a deteriorated phenomenon as a whole. In the case of the image reconstructed by the conventional repetitive reconstruction method, the re-deterioration phenomenon does not appear in the area where the original focus was achieved, but the edge portion of the image was not preserved due to the indefinite reconstruction of the focus. In addition, the image reconstructed using the conventional blur parameter showed little deterioration as a whole, but the image was blurred in small letters because the edge was not clear. However, in the case of the image generated by the automatic focus restoration according to the present invention, the original focused area is preserved as it is and only the focus of the deteriorated part is clearly restored.

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The invention can also be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like, and may also be implemented in the form of a carrier wave (for example, transmission over the Internet). Include. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

이상에서 본 발명의 바람직한 실시예에 대해 도시하고 설명하였으나, 본 발명은 상술한 특정의 바람직한 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자라면 누구든지 다양한 변형 실시가 가능한 것은 물론이고, 그와 같은 변경은 청구범위 기재의 범위 내에 있게 된다.Although the preferred embodiments of the present invention have been shown and described above, the present invention is not limited to the specific preferred embodiments described above, and the present invention belongs to the present invention without departing from the gist of the present invention as claimed in the claims. Various modifications can be made by those skilled in the art, and such changes are within the scope of the claims.

도 1은 본 발명에 따른 자동초점복원장치에 대한 바람직한 실시예의 구성을 도시한 블록도,1 is a block diagram showing the configuration of a preferred embodiment for an autofocus restoring apparatus according to the present invention;

도 2는 본 발명에 따른 자동초점복원방법에 대한 바람직한 실시예의 수행과정을 도시한 흐름도,2 is a flowchart illustrating a process of performing a preferred embodiment of the autofocus restoration method according to the present invention;

도 3a 내지 도 3f는 각각 열화된 원본영상, 2회, 4회, 5회, 7회의 반복적인 복원 과정에 의하여 생성된 영상 및 최종적으로 출력된 융합영상을 도시한 도면,3A to 3F are views illustrating a deteriorated original image, an image generated by repeated reconstructing processes twice, four times, five times, and seven times, and a finally output fused image;

도 4는 다양한 SNR 값을 가지는 영상의 반복적인 복원에 따른 피크 신호 대 잡음비(peak signal-to-noise ratio : PSNR) 값을 그래프로 도시한 도면,4 is a graph illustrating peak signal-to-noise ratio (PSNR) values according to repetitive reconstruction of an image having various SNR values.

도 5는 종래의 정칙화된 반복 복원(regularized iterative restoration : RIR) 방법 및 정칙화된 방향성 반복 복원(regularized directional iterative restoration : RDIR) 방법과 본 발명에 따른 자동초점복원의 결과로 생성된 영상의 PSNR 값을 그래프로 도시한 도면, 그리고,5 shows a conventional regularized iterative restoration (RIR) method, a regularized directional iterative restoration (RDIR) method, and an PSNR of an image generated as a result of autofocus restoration according to the present invention. A plot of the values, and

도 6a 내지 도 6f는 각각 열화된 원본영상, 종래의 CLS 필터를 사용하여 복원된 영상, 종래의 RIR 방법에 의하여 복원된 영상, 종래의 반복적인 복원 방법에 의하여 복원된 영상, 종래의 블러 매개변수를 사용하여 복원된 영상 및 본 발명에 따른 자동초점복원에 의하여 생성된 영상을 도시한 도면이다.6A to 6F illustrate deteriorated original images, images reconstructed using a conventional CLS filter, images reconstructed by a conventional RIR method, images reconstructed by a conventional repetitive reconstruction method, and conventional blur parameters. Is a view showing a reconstructed image and an image generated by autofocus restoration according to the present invention.

Claims (19)

외부로부터 입력받은 원본영상의 복원을 위한 제1최적화 함수를 결정하고, 상기 원본영상에 상기 제1최적화 함수를 적용시켜 얻어진 제1중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후 상기 원본영상을 구성하는 각각의 화소의 화소값에서 상기 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제1영상을 생성하는 제1복원부;Determining a first optimization function for restoring the original image received from the outside, and calculating the gradient of the pixel value for each pixel constituting the first intermediate image obtained by applying the first optimization function to the original image A first restoring unit generating a first image by subtracting a value obtained by multiplying a gradient value by a preset proportional coefficient from a pixel value of each pixel constituting the original image; 상기 제1영상을 입력받아 상기 제1영상의 복원을 위한 제2최적화 함수를 결정하고, 상기 제1영상에 상기 제2최적화 함수를 적용시켜 얻어진 제2중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후 상기 제1영상을 구성하는 각각의 화소의 화소값에서 상기 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제2영상을 생성하는 제2복원부;A pixel for each pixel constituting a second intermediate image obtained by receiving the first image and determining a second optimization function for reconstruction of the first image, and applying the second optimization function to the first image A second restorer configured to generate a second image by calculating a gradient of a value and subtracting a value obtained by multiplying the gradient value by a preset proportional coefficient from a pixel value of each pixel constituting the first image; 상기 제2영상을 입력받아 저장하는 프레임 메모리;A frame memory configured to receive and store the second image; 상기 원본영상 및 상기 제1영상을 구성하는 각 화소의 초점값을 산출하고 상기 원본영상 및 상기 제1영상에서 초점값이 사전에 설정된 기준 초점값 이상인 화소들로 이루어진 융합영역을 결정한 후 상기 융합영역들을 결합하여 융합영상을 생성하는 영상융합부; 및After calculating a focus value of each pixel constituting the original image and the first image and determining a fusion region of pixels in which the focus value is greater than or equal to a preset reference focus value in the original image and the first image, the fusion region is determined. Image fusion unit for combining them to create a fusion image; And 상기 프레임 메모리로부터 독출한 상기 제2영상과 상기 융합영상의 유클리드 차분값을 산출하고, 상기 차분값을 기초로 상기 융합영상의 출력 여부를 결정하는 종결결정부;를 포함하는 것을 특징으로 하는 자동초점복원장치.An automatic focusing unit configured to calculate a Euclidean difference between the second image and the fused image read out from the frame memory, and determine whether to output the fused image based on the difference value. Restoration device. 제 1항에 있어서,The method of claim 1, 상기 제1최적화 함수는 다음의 수학식 A로 결정되는 것을 특징으로 하는 자동초점복원장치:The first focusing function is determined by Equation A below: [수학식 A]Equation A
Figure 112008010966307-PAT00015
Figure 112008010966307-PAT00015
여기서, f(x0)는 상기 제1최적화 함수, x0는 상기 원본영상, H는 열화 시스템을 나타내는 매트릭스, C는 평활도 제약조건으로서의 고역통과 필터, 그리고 λ는 상기 평활도 제약조건의 양을 조절하는 정칙화 매개변수이다.Where f (x 0 ) is the first optimization function, x 0 is the original image, H is a matrix representing the degradation system, C is a highpass filter as a smoothness constraint, and λ adjusts the amount of the smoothness constraint. Is the normalization parameter.
제 1항 또는 제 2항에 있어서,The method according to claim 1 or 2, 상기 제2최적화 함수는 다음의 수학식 B로 결정되는 것을 특징으로 하는 자동초점복원장치:The second focusing function is determined by the following equation B: Auto Focus Restoration apparatus: [수학식 B]Equation B
Figure 112008010966307-PAT00016
Figure 112008010966307-PAT00016
여기서, f(x)는 상기 제2최적화 함수, x0는 상기 원본영상, x1은 상기 제1영상, H는 열화 시스템을 나타내는 매트릭스, C는 평활도 제약조건으로서의 고역통과 필터, 그리고 λ는 상기 평활도 제약조건의 양을 조절하는 정칙화 매개변수이다.Where f (x) is the second optimization function, x 0 is the original image, x 1 is the first image, H is a matrix representing the degradation system, C is a highpass filter as a smoothness constraint, and λ is Normalization parameter that controls the amount of constraint constraints.
제 2항에 있어서,The method of claim 2, 상기 제1복원부는 상기 원본영상을 구성하는 화소들을 각각의 화소가 속하는 에지의 방향에 따라 등방성, 수직, 수평 및 사선 방향 중 어느 한 방향으로 각각 분류하고, 각각의 화소에 에지의 방향에 대응하는 고역통과 필터링을 수행하는 것을 특징으로 하는 자동초점복원장치.The first restoring unit classifies pixels constituting the original image into any one of isotropic, vertical, horizontal, and oblique directions according to the direction of the edge to which each pixel belongs, and corresponds to the direction of the edge of each pixel. An autofocus restoring device which performs high pass filtering. 제 3항에 있어서,The method of claim 3, wherein 상기 제2복원부는 상기 제1영상을 구성하는 화소들을 각각의 화소가 속하는 에지의 방향에 따라 등방성, 수직, 수평 및 사선 방향 중 어느 한 방향으로 각각 분류하고, 각각의 화소에 에지의 방향에 대응하는 고역통과 필터링을 수행하는 것을 특징으로 하는 자동초점복원장치.The second restorer classifies pixels constituting the first image into one of isotropic, vertical, horizontal, and oblique directions according to the direction of the edge to which each pixel belongs, and corresponds to the direction of the edge of each pixel. Auto focus restoration device characterized in that to perform high pass filtering. 제 1항에 있어서,The method of claim 1, 상기 영상융합부는,The image fusion unit, 상기 원본영상 및 상기 제1영상을 구성하는 각 화소에 대하여 주변 화소와의 화소값의 차를 합산하여 돌출도 값을 구하고, 각각의 화소를 중심으로 하는 소정 크기의 윈도우 내에 위치하는 화소들의 돌출도 값을 합산하여 각각의 화소에 대한 초점값을 산출하는 초점값 산출부; 및For each pixel constituting the original image and the first image, the difference between pixel values and neighboring pixels is summed to obtain a protrusion value, and the protrusion degree of pixels located in a window having a predetermined size centering each pixel. A focus value calculator configured to calculate a focus value for each pixel by summing the values; And 상기 산출한 초점값을 근거로 상기 원본영상 및 상기 제1영상에서 초점값이 사전에 설정된 기준 초점값 이상인 화소들을 선택하여 융합영역을 결정하고, 상기 융합영역을 구성하는 화소들을 결합하여 융합영상을 생성하는 화소결합부;를 포함하는 것을 특징으로 하는 자동초점복원장치.Based on the calculated focus value, a fusion region is determined by selecting pixels having a focus value greater than or equal to a preset reference focus value in the original image and the first image, and combining the pixels constituting the fusion region. Automatic focus restoring apparatus comprising a; pixel combining unit to generate. 제 6항에 있어서,The method of claim 6, 상기 초점값 산출부는 상기 화소를 중심으로 하는 소정 크기의 윈도우 내의 화소들 중에서 돌출도 값이 사전에 설정된 임계치 이상인 화소들의 돌출도 값을 합산하여 초점값을 산출하는 것을 특징으로 하는 자동초점복원장치.And the focus value calculator calculates a focus value by summing protrusion values of pixels having a protrusion value greater than or equal to a preset threshold value among pixels in a window having a predetermined size centering on the pixel. 제 6항에 있어서,The method of claim 6, 상기 화소결합부는 상기 융합영역들의 결합 과정에서 누락된 화소에 대해 상기 원본영상 및 상기 제1영상에서 누락된 화소의 위치에 대응하는 위치의 화소의 화소값 중 어느 하나를 선택하여 누락된 화소의 위치에 삽입하는 것을 특징으로 하는 자동초점복원장치.The pixel combining unit selects any one of pixel values of a pixel corresponding to a position of a pixel missing from the original image and the first image with respect to the pixel missing during the combining of the fusion regions. Auto focus restoring apparatus, characterized in that the insertion. 제 3항에 있어서,The method of claim 3, wherein 상기 종결결정부는 상기 유클리드 차분값을 다음의 수학식 C에 의해 산출하고, 상기 차분값이 사전에 설정된 기준값 이하이면 상기 융합영상을 출력하고, 상기 차분값이 사전에 설정된 기준값을 초과하면 상기 융합영상을 원본영상으로 결정하여 상기 영상융합부에 입력시키고 상기 제2영상을 제1영상으로 결정하여 상기 제 2복원부 및 영상융합부에 입력시키는 것을 특징으로 하는 자동초점복원장치:The termination determining unit calculates the Euclidean difference value by the following equation C, outputs the fusion image when the difference value is less than or equal to a preset reference value, and outputs the fusion image when the difference value exceeds a preset reference value. Determining the original image to the image fusion unit and the second image as the first image to determine the second focusing unit and the image fusion unit Auto focus restoring apparatus characterized in that: [수학식 C]Equation C
Figure 112008010966307-PAT00017
Figure 112008010966307-PAT00017
여기서, xr은 제2영상, xf는 융합영상, E()는 유클리드 공간의 근사화된 차분 연산자, (i,j)는 영상에서 화소가 위치하는 좌표, 그리고 D는 융합영상을 구성하는 화소의 수이다.Where x r is the second image, x f is the fused image, E () is an approximate difference operator in Euclidean space, (i, j) is the coordinate where the pixel is located in the image, and D is the pixel constituting the fused image Is the number of.
외부로부터 입력받은 원본영상의 복원을 위한 제1최적화 함수를 결정하고, 상기 원본영상에 상기 제1최적화 함수를 적용시켜 얻어진 제1중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후 상기 원본영상을 구성하는 각각의 화소의 화소값에서 상기 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제1영상을 생성하는 제1복원단계;Determining a first optimization function for restoring the original image received from the outside, and calculating the gradient of the pixel value for each pixel constituting the first intermediate image obtained by applying the first optimization function to the original image A first restoration step of generating a first image by subtracting a pixel value of each pixel constituting the original image by multiplying the gradient value by a preset proportional coefficient; 상기 제1영상을 입력받아 상기 제1영상의 복원을 위한 제2최적화 함수를 결정하고, 상기 제1영상에 상기 제2최적화 함수를 적용시켜 얻어진 제2중간영상을 구성하는 각각의 화소에 대한 화소값의 그라디언트를 산출한 후 상기 제1영상을 구성하는 각각의 화소의 화소값에서 상기 그라디언트 값에 사전에 설정된 비례계수를 곱한 값을 감하여 제2영상을 생성하는 제2복원단계;A pixel for each pixel constituting a second intermediate image obtained by receiving the first image and determining a second optimization function for reconstruction of the first image, and applying the second optimization function to the first image A second restoration step of generating a second image by calculating a gradient of a value and then subtracting a value obtained by multiplying the gradient value by a preset proportional coefficient from a pixel value of each pixel constituting the first image; 상기 원본영상 및 상기 제1영상을 구성하는 각 화소의 초점값을 산출하고 상 기 원본영상 및 상기 제1영상에서 초점값이 사전에 설정된 기준 초점값 이상인 화소들로 이루어진 융합영역을 결정한 후 상기 융합영역들을 결합하여 융합영상을 생성하는 영상융합단계; 및Computing a focus value of each pixel constituting the original image and the first image, and after determining a fusion region composed of pixels whose focus value is greater than or equal to a preset reference focus value in the original image and the first image, the fusion region is determined. An image fusion step of combining regions to generate a fusion image; And 상기 프레임 메모리로부터 독출한 상기 제2영상과 상기 융합영상의 유클리드 차분값을 산출하고, 상기 차분값을 기초로 상기 융합영상의 출력 여부를 결정하는 종결결정단계;를 포함하는 것을 특징으로 하는 자동초점복원방법.And a final determination step of calculating a Euclidean difference value of the second image and the fused image read out from the frame memory, and determining whether to output the fused image based on the difference value. How to restore. 제 10항에 있어서,The method of claim 10, 상기 제1최적화 함수는 다음의 수학식 A로 결정되는 것을 특징으로 하는 자동초점복원방법:The first focusing function is determined by the following equation (A): Auto focus restoring method characterized in that: [수학식 A]Equation A
Figure 112008010966307-PAT00018
Figure 112008010966307-PAT00018
여기서, f(x0)는 상기 제1최적화 함수, x0는 상기 원본영상, H는 열화 시스템을 나타내는 매트릭스, C는 평활도 제약조건으로서 고역통과 필터의 필터 계수로 이루어진 매트릭스, 그리고 λ는 상기 평활도 제약조건의 양을 조절하는 정칙화 매개변수이다.Where f (x 0 ) is the first optimization function, x 0 is the original image, H is a matrix representing a degradation system, C is a matrix consisting of filter coefficients of a high pass filter as a smoothness constraint, and λ is the smoothness. Normalization parameter that controls the amount of constraints.
제 10항 또는 제 11항에 있어서,The method according to claim 10 or 11, wherein 상기 제2최적화 함수는 다음의 수학식 B로 결정되는 것을 특징으로 하는 자 동초점복원방법:Wherein the second optimization function is determined by Equation B below: [수학식 B]Equation B
Figure 112008010966307-PAT00019
Figure 112008010966307-PAT00019
여기서, f(x)는 상기 제2최적화 함수, x0는 상기 원본영상, x1은 상기 제1영상, H는 열화 시스템을 나타내는 매트릭스, C는 평활도 제약조건으로서 고역통과 필터의 필터 계수로 이루어진 매트릭스, 그리고 λ는 상기 평활도 제약조건의 양을 조절하는 정칙화 매개변수이다.Where f (x) is the second optimization function, x 0 is the original image, x 1 is the first image, H is a matrix representing the deterioration system, and C is a smoothness constraint consisting of filter coefficients of the high pass filter. The matrix, and λ, are regularization parameters that control the amount of the smoothness constraint.
제 11항에 있어서,The method of claim 11, 상기 제1복원단계에서, 상기 원본영상을 구성하는 화소들을 각각의 화소가 속하는 에지의 방향에 따라 등방성, 수직, 수평 및 사선 방향 중 어느 한 방향으로 각각 분류하고, 각각의 화소에 에지의 방향에 대응하는 고역통과 필터링을 수행하는 것을 특징으로 하는 자동초점복원방법.In the first restoring step, the pixels constituting the original image are classified into one of isotropic, vertical, horizontal, and oblique directions according to the direction of the edge to which each pixel belongs, and each pixel is disposed in the direction of the edge. Autofocus restoration method, characterized in that to perform the corresponding high pass filtering. 제 12항에 있어서,The method of claim 12, 상기 제2복원단계에서, 상기 제1영상을 구성하는 화소들을 각각의 화소가 속하는 에지의 방향에 따라 등방성, 수직, 수평 및 사선 방향 중 어느 한 방향으로 각각 분류하고, 각각의 화소에 에지의 방향에 대응하는 고역통과 필터링을 수행하는 것을 특징으로 하는 자동초점복원방법.In the second restoring step, the pixels constituting the first image are classified into one of isotropic, vertical, horizontal and oblique directions according to the direction of the edge to which each pixel belongs, and the direction of the edge to each pixel. Autofocus restoration method characterized in that to perform a high-pass filtering corresponding to. 제 10항에 있어서,The method of claim 10, 상기 영상융합단계는,The image fusion step, 상기 원본영상 및 상기 제1영상을 구성하는 각 화소에 대하여 주변 화소와의 화소값의 차를 합산하여 돌출도 값을 구하고, 각각의 화소를 중심으로 하는 소정 크기의 윈도우 내에 위치하는 화소들의 돌출도 값을 합산하여 각각의 화소에 대한 초점값을 산출하는 초점값 산출단계; 및For each pixel constituting the original image and the first image, the difference between pixel values and neighboring pixels is summed to obtain a protrusion value, and the protrusion degree of pixels located in a window having a predetermined size centering each pixel. A focus value calculating step of calculating a focus value for each pixel by summing the values; And 상기 산출한 초점값을 근거로 상기 원본영상 및 상기 제1영상에서 초점값이 사전에 설정된 기준 초점값 이상인 화소들을 선택하여 융합영역을 결정하고, 상기 융합영역을 구성하는 화소들을 결합하여 융합영상을 생성하는 화소결합단계;를 포함하는 것을 특징으로 하는 자동초점복원방법.Based on the calculated focus value, a fusion region is determined by selecting pixels having a focus value greater than or equal to a preset reference focus value in the original image and the first image, and combining the pixels constituting the fusion region. Automatic focus restoring method comprising a; pixel combining step of generating. 제 15항에 있어서,The method of claim 15, 상기 초점값 산출단계에서, 상기 화소를 중심으로 하는 소정 크기의 윈도우 내의 화소들 중에서 돌출도 값이 사전에 설정된 임계치 이상인 화소들의 돌출도 값을 합산하여 초점값을 산출하는 것을 특징으로 하는 자동초점복원방법.In the focus value calculating step, the focus value is calculated by summing the protrusion values of pixels whose protrusion values are greater than or equal to a preset threshold value among pixels in a window having a predetermined size centering on the pixels. Way. 제 15항에 있어서,The method of claim 15, 상기 화소결합단계에서, 상기 융합영역들의 결합 과정에서 누락된 화소에 대해 상기 원본영상 및 상기 제1영상에서 누락된 화소의 위치에 대응하는 위치의 화 소의 화소값 중 어느 하나를 선택하여 누락된 화소의 위치에 삽입하는 것을 특징으로 하는 자동초점복원방법.In the pixel combining step, a pixel missing by selecting any one of pixel values of a pixel corresponding to a position of a pixel missing from the original image and the first image with respect to the pixel missing during the combining of the fusion regions. Auto focus restoration method characterized in that the insertion at the position of. 제 12항에 있어서,The method of claim 12, 상기 종결결정단계에서, 상기 유클리드 차분값을 다음의 수학식 C에 의해 산출하고, 상기 차분값이 사전에 설정된 기준값 이하이면 상기 융합영상을 출력하고, 상기 차분값이 사전에 설정된 기준값을 초과하면 상기 융합영상을 원본영상으로 결정하여 상기 영상융합부에 입력시키고 상기 제2영상을 제1영상으로 결정하여 상기 제2복원부 및 영상융합부에 입력시키는 것을 특징으로 하는 자동초점복원방법:In the terminating decision step, the Euclidean difference value is calculated by the following equation C, and when the difference value is less than or equal to a preset reference value, the fusion image is output, and when the difference value exceeds a preset reference value, An automatic focus restoring method comprising determining a fusion image as an original image and inputting it to the image fusion unit, and determining the second image as a first image and inputting the second image to the second restoration unit and the image fusion unit. [수학식 C]Equation C
Figure 112008010966307-PAT00020
Figure 112008010966307-PAT00020
여기서, xr은 제2영상, xf는 융합영상, E()는 유클리드 공간의 근사화된 차분 연산자, (i,j)는 영상에서 화소가 위치하는 좌표, 그리고 D는 융합영상을 구성하는 화소의 수이다.Where x r is the second image, x f is the fused image, E () is an approximate difference operator in Euclidean space, (i, j) is the coordinate where the pixel is located in the image, and D is the pixel constituting the fused image Is the number of.
제 18항에 기재된 자동초점복원방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for executing the automatic focus restoration method according to claim 18 on a computer.
KR1020080013314A 2008-02-14 2008-02-14 Apparatus and method for digital auto-focusing based on iterative restoration and fusion of image KR100935495B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080013314A KR100935495B1 (en) 2008-02-14 2008-02-14 Apparatus and method for digital auto-focusing based on iterative restoration and fusion of image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080013314A KR100935495B1 (en) 2008-02-14 2008-02-14 Apparatus and method for digital auto-focusing based on iterative restoration and fusion of image

Publications (2)

Publication Number Publication Date
KR20090088022A true KR20090088022A (en) 2009-08-19
KR100935495B1 KR100935495B1 (en) 2010-01-06

Family

ID=41206807

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080013314A KR100935495B1 (en) 2008-02-14 2008-02-14 Apparatus and method for digital auto-focusing based on iterative restoration and fusion of image

Country Status (1)

Country Link
KR (1) KR100935495B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9613403B2 (en) 2013-03-28 2017-04-04 Samsung Electronics Co., Ltd. Image processing apparatus and method
KR20200080966A (en) * 2018-12-27 2020-07-07 인천대학교 산학협력단 Multi focused image fusion method
CN111968034A (en) * 2020-07-30 2020-11-20 北京大米科技有限公司 Image restoration method, image restoration device, electronic equipment and computer-readable storage medium

Families Citing this family (42)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9674458B2 (en) 2009-06-03 2017-06-06 Flir Systems, Inc. Smart surveillance camera systems and methods
US10244190B2 (en) 2009-03-02 2019-03-26 Flir Systems, Inc. Compact multi-spectrum imaging with fusion
US9451183B2 (en) 2009-03-02 2016-09-20 Flir Systems, Inc. Time spaced infrared image enhancement
US9208542B2 (en) 2009-03-02 2015-12-08 Flir Systems, Inc. Pixel-wise noise reduction in thermal images
USD765081S1 (en) 2012-05-25 2016-08-30 Flir Systems, Inc. Mobile communications device attachment with camera
US9756264B2 (en) 2009-03-02 2017-09-05 Flir Systems, Inc. Anomalous pixel detection
US9473681B2 (en) 2011-06-10 2016-10-18 Flir Systems, Inc. Infrared camera system housing with metalized surface
US9235876B2 (en) 2009-03-02 2016-01-12 Flir Systems, Inc. Row and column noise reduction in thermal images
US9998697B2 (en) 2009-03-02 2018-06-12 Flir Systems, Inc. Systems and methods for monitoring vehicle occupants
US9517679B2 (en) 2009-03-02 2016-12-13 Flir Systems, Inc. Systems and methods for monitoring vehicle occupants
US10757308B2 (en) 2009-03-02 2020-08-25 Flir Systems, Inc. Techniques for device attachment with dual band imaging sensor
US9843742B2 (en) 2009-03-02 2017-12-12 Flir Systems, Inc. Thermal image frame capture using de-aligned sensor array
US9635285B2 (en) 2009-03-02 2017-04-25 Flir Systems, Inc. Infrared imaging enhancement with fusion
US9986175B2 (en) 2009-03-02 2018-05-29 Flir Systems, Inc. Device attachment with infrared imaging sensor
US9948872B2 (en) 2009-03-02 2018-04-17 Flir Systems, Inc. Monitor and control systems and methods for occupant safety and energy efficiency of structures
US9716843B2 (en) 2009-06-03 2017-07-25 Flir Systems, Inc. Measurement device for electrical installations and related methods
US9756262B2 (en) 2009-06-03 2017-09-05 Flir Systems, Inc. Systems and methods for monitoring power systems
US9292909B2 (en) 2009-06-03 2016-03-22 Flir Systems, Inc. Selective image correction for infrared imaging devices
US9843743B2 (en) 2009-06-03 2017-12-12 Flir Systems, Inc. Infant monitoring systems and methods using thermal imaging
US9819880B2 (en) 2009-06-03 2017-11-14 Flir Systems, Inc. Systems and methods of suppressing sky regions in images
US10091439B2 (en) 2009-06-03 2018-10-02 Flir Systems, Inc. Imager with array of multiple infrared imaging modules
US9706138B2 (en) 2010-04-23 2017-07-11 Flir Systems, Inc. Hybrid infrared sensor array having heterogeneous infrared sensors
US9848134B2 (en) 2010-04-23 2017-12-19 Flir Systems, Inc. Infrared imager with integrated metal layers
US9207708B2 (en) 2010-04-23 2015-12-08 Flir Systems, Inc. Abnormal clock rate detection in imaging sensor arrays
US9235023B2 (en) 2011-06-10 2016-01-12 Flir Systems, Inc. Variable lens sleeve spacer
CN103748867B (en) 2011-06-10 2019-01-18 菲力尔系统公司 Low-power consumption and small form factor infrared imaging
US10841508B2 (en) 2011-06-10 2020-11-17 Flir Systems, Inc. Electrical cabinet infrared monitor systems and methods
US9900526B2 (en) 2011-06-10 2018-02-20 Flir Systems, Inc. Techniques to compensate for calibration drifts in infrared imaging devices
EP2719166B1 (en) 2011-06-10 2018-03-28 Flir Systems, Inc. Line based image processing and flexible memory system
US10389953B2 (en) 2011-06-10 2019-08-20 Flir Systems, Inc. Infrared imaging device having a shutter
CA2838992C (en) 2011-06-10 2018-05-01 Flir Systems, Inc. Non-uniformity correction techniques for infrared imaging devices
US9058653B1 (en) 2011-06-10 2015-06-16 Flir Systems, Inc. Alignment of visible light sources based on thermal images
US9706137B2 (en) 2011-06-10 2017-07-11 Flir Systems, Inc. Electrical cabinet infrared monitor
US9143703B2 (en) 2011-06-10 2015-09-22 Flir Systems, Inc. Infrared camera calibration techniques
US10169666B2 (en) 2011-06-10 2019-01-01 Flir Systems, Inc. Image-assisted remote control vehicle systems and methods
US9509924B2 (en) 2011-06-10 2016-11-29 Flir Systems, Inc. Wearable apparatus with integrated infrared imaging module
US10051210B2 (en) 2011-06-10 2018-08-14 Flir Systems, Inc. Infrared detector array with selectable pixel binning systems and methods
US9961277B2 (en) 2011-06-10 2018-05-01 Flir Systems, Inc. Infrared focal plane array heat spreaders
US10079982B2 (en) 2011-06-10 2018-09-18 Flir Systems, Inc. Determination of an absolute radiometric value using blocked infrared sensors
US9811884B2 (en) 2012-07-16 2017-11-07 Flir Systems, Inc. Methods and systems for suppressing atmospheric turbulence in images
US9973692B2 (en) 2013-10-03 2018-05-15 Flir Systems, Inc. Situational awareness by compressed display of panoramic views
US11297264B2 (en) 2014-01-05 2022-04-05 Teledyne Fur, Llc Device attachment with dual band imaging sensor

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100808610B1 (en) * 2006-06-13 2008-02-28 중앙대학교 산학협력단 Digital Multi-focusing using Image Fusion

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9613403B2 (en) 2013-03-28 2017-04-04 Samsung Electronics Co., Ltd. Image processing apparatus and method
KR20200080966A (en) * 2018-12-27 2020-07-07 인천대학교 산학협력단 Multi focused image fusion method
CN111968034A (en) * 2020-07-30 2020-11-20 北京大米科技有限公司 Image restoration method, image restoration device, electronic equipment and computer-readable storage medium

Also Published As

Publication number Publication date
KR100935495B1 (en) 2010-01-06

Similar Documents

Publication Publication Date Title
KR100935495B1 (en) Apparatus and method for digital auto-focusing based on iterative restoration and fusion of image
CN111539879B (en) Video blind denoising method and device based on deep learning
KR100911890B1 (en) Method, system, program modules and computer program product for restoration of color components in an image model
US8358865B2 (en) Device and method for gradient domain image deconvolution
JP5188205B2 (en) Method for increasing the resolution of moving objects in an image acquired from a scene by a camera
US8514303B2 (en) Advanced imaging systems and methods utilizing nonlinear and/or spatially varying image processing
US7602989B2 (en) Realtime 2D deconvolution system and method
US7672528B2 (en) Method of processing an image to form an image pyramid
JP2001229377A (en) Method for adjusting contrast of digital image by adaptive recursive filter
US20080253678A1 (en) Denoise method on image pyramid
JP2007188493A (en) Method and apparatus for reducing motion blur in motion blur image, and method and apparatus for generating image with reduced motion blur by using a plurality of motion blur images each having its own blur parameter
US20090179999A1 (en) Image Processing Method and Apparatus
JP5615393B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
US7177481B2 (en) Multiresolution unsharp image processing apparatus
JP2008146643A (en) Method and device for reducing blur caused by movement in image blurred by movement, and computer-readable medium executing computer program for reducing blur caused by movement in image blurred by movement
JP2013192224A (en) Method and apparatus for deblurring non-uniform motion blur using multi-frame including blurred image and noise image
CN113781320A (en) Image processing method and device, terminal equipment and storage medium
KR101181161B1 (en) An apparatus and a method for deblurring image blur caused by camera ego motion
JP2012216888A (en) Image processing apparatus, method and program
JP4859516B2 (en) Image processing apparatus and image restoration method
FR2790852A1 (en) METHOD OF EVALUATING ENCODED IMAGES, DEVICE USING THE METHOD AND USE OF THE DEVICE AND METHOD
JP2023055848A (en) Image processing method, image processing apparatus, image processing system, and program
KR102418000B1 (en) Method for performing stereo matching by using color image and monochrome image and device using the same
Kim et al. Real-time bayer-domain image restoration for an extended depth of field (EDoF) camera
JP4030655B2 (en) Gradation conversion method and apparatus

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20121011

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20131129

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20151028

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20171011

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20190110

Year of fee payment: 10