KR100856474B1 - Stabilizing method for shaking video image - Google Patents

Stabilizing method for shaking video image Download PDF

Info

Publication number
KR100856474B1
KR100856474B1 KR1020070091559A KR20070091559A KR100856474B1 KR 100856474 B1 KR100856474 B1 KR 100856474B1 KR 1020070091559 A KR1020070091559 A KR 1020070091559A KR 20070091559 A KR20070091559 A KR 20070091559A KR 100856474 B1 KR100856474 B1 KR 100856474B1
Authority
KR
South Korea
Prior art keywords
phase correlation
image
frame
pixel
motion vector
Prior art date
Application number
KR1020070091559A
Other languages
Korean (ko)
Inventor
강현인
한학용
곽한섭
Original Assignee
(주) 지티비젼
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by (주) 지티비젼 filed Critical (주) 지티비젼
Application granted granted Critical
Publication of KR100856474B1 publication Critical patent/KR100856474B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction
    • H04N23/684Vibration or motion blur correction performed by controlling the image sensor readout, e.g. by controlling the integration time
    • H04N23/6842Vibration or motion blur correction performed by controlling the image sensor readout, e.g. by controlling the integration time by controlling the scanning position, e.g. windowing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681Motion detection
    • H04N23/6811Motion detection based on the image signal

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

A method for correcting a shaking video image is provided to correct a shaking video image by using a stabilized correction parameter which is obtained by a speedy estimation. A method for correcting a shaking vide image, includes the step of forming a phase correlation space by obtaining a phase correlation for a reference frame and a present frame of a reference vide image by using a phase correlation method. The phase correlation is based on a shift property of Fourier transform. The method further includes the steps of selecting a peculiar pixel from the reference video image(S2), calculating a motion vector for the selected peculiar pixel by using an optical flow method, obtaining an average direction and an average size of vectors from the calculated motion vector of the peculiar pixel(S4), establishing a search area in the phase correlation space which is processed for a single area from the obtained average direction information and the size information in relation to the motion vector(S5), obtaining a maximum peak value from the established search area and determining its location as a correction parameter(S7), and applying the determined correction parameter to the current frame and outputting a stabilized frame(S8).

Description

영상 흔들림 보정방법{Stabilizing method for shaking video image}Stabilizing method for shaking video image}

본 발명은 영상 흔들림 보정방법에 관한 것으로, 특히 외부적 환경으로 인한 영상의 흔들림 현상과 원거리 줌인 영상의 떨림 현상에 대한 영상 안정화 방법에 관련한다.The present invention relates to an image shake correction method, and more particularly, to an image stabilization method for an image shake phenomenon due to an external environment and a shake phenomenon of an image having a long zoom.

최근 디지털 영상처리 기술이 발전함에 따라 영상 안전화 시스템(DIS : Digital Image Stabilization) 시스템을 위한 다양한 방법들에 대한 연구가 진행되고 있다. 그 중에서 불안정한 카메라 고정 장치에 의한 진동 혹은 손떨림에 의한 영상의 흔들림 현상, 광학 혹은 디지털 줌에 의해 원거리 피사체를 확대할 경우 증폭되어 발생하는 떨림현상 그리고 차량의 내부와 같은 불안정한 환경에서 발생하는 흔들림 현상은 주관적, 객관적 양면에서 동영상의 품질을 떨어트리는 주요 요인으로 디지털 영상 안정화를 위한 중요한 연구 주제 중의 하나이다.Recently, with the development of digital image processing technology, various methods for the digital image stabilization (DIS) system have been studied. Among them, the vibration of the image caused by the unstable camera fixing device or the vibration of the hand shake, the amplification of amplification when the remote object is enlarged by optical or digital zoom, and the shaking phenomenon that occurs in an unstable environment such as the inside of a vehicle It is one of the important research topics for digital image stabilization as a major factor that degrades the quality of video in both subjective and objective aspects.

특히, 실외 감시 시스템 혹은 도로 교통 모니터링과 같이 실외에 설치된 비디오 감시 시스템의 경우, 카메라는 건물 외벽, 육교, 다리 혹은 전용 지지대에 고정된다. 그러나 이러한 카메라 고정 장치는 여러 가지 외부 상황에 의하여 흔들릴 수 있다. 카메라 고정 장치에 가해지는 외부적인 상황으로는 심한 바람에 의한 흔 들림이 가장 큰 원인이 되고, 특히 다리의 경우에는 많은 교통량이 주요 원인이 되는데, 이러한 외부 환경적 원인으로 인하여 고정 장치는 시간이 경과함에 따라 반드시 헐거워지는 특성을 가지게 된다.In particular, for outdoor video surveillance systems such as outdoor surveillance systems or road traffic monitoring, the cameras are secured to building walls, overpasses, bridges or dedicated supports. However, the camera fixing device may be shaken by various external situations. In the external situation applied to the camera fixing device, the shaking caused by severe wind is the main cause, and especially in the case of bridges, a large amount of traffic is the main cause. As a result, it will have a characteristic that is always loose.

또한, 고배율 줌인(zoom in) 렌즈가 부착된 카메라의 경우, 고배율로 원거리의 영상을 실시간으로 감시하는 환경의 경우에도 비주기적인 미세한 떨림 현상이 발생하게 된다. 이러한 원격 감시 환경에서 발생하는 떨림 현상은 감시자의 시각적인 피로감을 야기할 뿐만 아니라 대상 목표물에 대한 안정적인 감시에 방해요소로 작용하게 된다.In addition, in the case of a camera having a high magnification zoom in lens, aperiodic fine shaking may occur even in an environment in which a remote image is monitored in real time at a high magnification. Vibration in the remote monitoring environment not only causes visual fatigue of the monitor, but also interferes with stable monitoring of the target target.

종래의 보정기술은 각속도 센서에 의한 떨림 검출을 기계적인 촬상 광학계의 제어에 의해 실현되었다. 이 방법은 보정 메커니즘의 증가로 소형, 경량화를 요구하는 제품의 추세에는 부적합하다.Conventional correction techniques have realized shake detection by an angular velocity sensor by control of a mechanical imaging optical system. This method is unsuitable for the trend of products requiring small size and light weight due to the increase of correction mechanism.

반면, 영상 안정화 시스템은 단지 영상의 디지털 신호처리에 의해 떨림량을 검출하고 영상 특성을 식별하여 적응적으로 시스템을 제어하는 LSI에 의해 떨림 현상을 보정하게 된다. 현재 사용되고 있는 대표적인 떨림 보정 방법에는 위상상관법(phase correlation)과 광류법(optical flow)이 사용되고 있다.On the other hand, the image stabilization system detects the amount of vibration only by digital signal processing of the image, identifies the image characteristic, and compensates for the vibration phenomenon by the LSI that adaptively controls the system. Phase correlation and optical flow are used as representative shake correction methods currently used.

위상 상관법은 급격하게 변하는 불연속적인 흔들림과 프레임 전체의 천이량을 추정하는데 우수한 성능을 보이는 반면에, 광류법은 천천히 변하는 연속적인 흔들림과 픽셀단위 움직임에 우수한 성능을 보인다.The phase correlation method shows excellent performance in estimating the rapidly changing discontinuous shaking and the amount of transition of the whole frame, while the optical flow method shows excellent performance in the continuous changing slowly and pixel-by-pixel motion.

일반적으로 흔들림 보정 알고리즘은 흔들림 보정 파라미터를 연속적인 두 프레임간의 지역화소 움직임 벡터(LMV; Local Motion Vectors)로부터 프레임 움직임 벡터(FMV; Frame Moving Vectors)를 추정하는 방식으로 얻는다. 움직임 추정과 보상 기술은 동영상 압축의 기반 기술이기도 하며, 움직임 추정의 경우에는 블록 매칭(block matching) 알고리즘(BMA), 기울기 매칭(Gradient Matching) 알고리즘(GMA), 위상 상관 등이 사용되고 있다. 여기서, 위상 상관법은 FMV를 추정하기에 적합한 반면, 광류법은 LMV를 추정하기에 적합하다.In general, a shake correction algorithm obtains a shake correction parameter by estimating frame moving vectors (FMVs) from local motion vectors (LMVs) between two consecutive frames. Motion estimation and compensation techniques are also the basic techniques of video compression, and in the case of motion estimation, a block matching algorithm (BMA), a gradient matching algorithm (GMA), and phase correlation are used. Here, the phase correlation method is suitable for estimating FMV, while the optical flow method is suitable for estimating LMV.

위상 상관을 이용하여 안정화된 영상을 얻기 위해서는 고속 푸리에 변환 알고리즘을 이용한다. 이 알고리즘은 원 영상에서 2 N ×2 N 크기의 일정 영역을 취하여 고속 푸리에 변환한 스펙트럼과 기준 영상에 대한 스펙트럼의 상호전력스펙트럼을 구하고 이를 다시 고속 역푸리에 변환한 공간 영역 결과로부터 피크치의 최대값을 탐색하여 얻어진 위치가 천이 성분에 해당하는 보정 파라미터로 결정하는 절차를 거친다.A fast Fourier transform algorithm is used to obtain a stabilized image using phase correlation. This algorithm obtains the maximum power of peak value from the spatial domain result of fast inverse Fourier transform by taking a certain area of 2 N × 2 N in the original image and obtaining the fast Fourier transformed spectrum and the spectrum for the reference image. The searched position is determined by the correction parameter corresponding to the transition component.

그러나, 단일 영역만을 취하여 위상상관을 적용할 경우에는 간헐적으로 오추정이 발생하게 된다. 오추정이 발생하는 원인은 위상상관 이론과는 달리 실제 영상에서는 전후 프레임간의 영상이 잡음 등으로 인하여 위상상관의 결과 공간에서 단일한 스파이크성 피크를 얻기가 어렵기 때문이다. 이러한 오추정으로 인한 잘못된 영상보정은 영상의 흔들림에 대한 시각적인 피로감을 방지하고자 하는 흔들림 영상의 안정화 목적에 부합되지 않는 문제점으로 정밀한 추정 방법이 요구된다.However, when the phase correlation is applied by taking only a single region, misinterpretation occurs intermittently. The reason for the erroneous estimation is that, unlike the phase correlation theory, it is difficult to obtain a single spike peak in the resultant space of phase correlation due to noise, etc. in the real image. Incorrect image correction due to such a false estimation does not meet the purpose of stabilization of a shake image to prevent visual fatigue of the shake of the image and requires a precise estimation method.

이러한 문제를 해결하기 위하여 단일 영역을 취하지 않고 여러 개의 후보 영역을 취하여 각각의 위상상관 결과 공간으로부터 얻은 각 후보 피크에서 가장 큰 피크값의 위치를 보정 파라미터로 결정하는 방법을 일반적으로 사용하고 있다.In order to solve this problem, a method of determining a position of the largest peak value in each candidate peak obtained from each phase correlation space by taking a plurality of candidate regions instead of a single region is generally used.

그러나, 이 방법을 적용할 경우에는 단일 영상을 취하여 분석하는 경우보다는 안정된 추정이 실현되지만 오추정에 대한 완전한 대책이 될 수 없다. 더욱이 이 방법은 원 영상에서 취해진 다중 영역으로부터 푸리에와 역푸리에 변환을 행하여 형성된 공간 영역 전체에서 피크치의 최대값을 각각 탐색하여야 하므로 실시간 처리를 요구하는 시스템에서 지연요소로 작용하게 된다.However, when applying this method, stable estimation is realized, rather than taking a single image and analyzing it, but it is not a complete countermeasure against false estimation. Furthermore, this method has to search for the maximum value of the peak value in the entire spatial region formed by performing Fourier and Inverse Fourier transforms from multiple regions taken from the original image, which is a delay factor in a system requiring real time processing.

광류법을 이용할 경우에도 전체 영상 픽셀에 대한 광류를 계산할 경우에는 많은 처리 시간이 요구되므로 실시간 처리에 부적합하다. 광류법에 대한 기술적 과제로는 최대한 빠르게 광류를 추정하는 방법에 관한 문제이다.Even when the optical flow method is used, a large processing time is required when calculating the optical flow for all image pixels, which is not suitable for real time processing. The technical problem of the optical flow method is the problem of how to estimate the optical flow as quickly as possible.

따라서, 본 발명의 목적은 빠르게 추정하여 얻어진 안정된 보정 파라미터를 이용하여 영상 흔들림을 보정하는 방법을 제공하는 것이다.Accordingly, an object of the present invention is to provide a method for correcting image shake by using a stable correction parameter obtained by fast estimation.

상기한 목적은, 위상상관법에 의하여 기준 영상의 기준 프레임과 현재 프레임에 대한 위상 상관을 구하여 위상 상관 공간을 형성하는 단계, 여기서, 상기 위상 상관은 푸리에 변환의 천이 특성(shift property)에 기반하며; 상기 기준 영상에서 특이 픽셀을 선택하는 단계; 상기 선택된 특이 픽셀에 대한 움직임 벡터를 광류법을 이용하여 계산하는 단계; 상기 계산된 특이 픽셀의 움직임 벡터로부터 그 벡터들의 평균 방향과 벡터의 평균 크기를 구하는 단계; 상기 움직임 벡터에 관련하여 상기 구해진 평균 방향 정보와 크기 정보로부터 단일 영역에 대하여 처리된 상기 위상상관 공간에서 탐색 영역을 설정하는 단계; 상기 설정된 탐색 영역에서 최대 피크값을 구하고 그 위치를 보정 파라미터로 결정하는 단계; 및 상기 현재 프레임에 상기 결정된 보정 파라미터를 적용하여 안정화된 프레임으로 출력하는 단계를 포함하는 영상 흔들림 보정방법에 의해 달성된다.The above object is obtained by forming a phase correlation space by obtaining a phase correlation between a reference frame and a current frame of a reference image by a phase correlation method, wherein the phase correlation is based on a shift property of a Fourier transform. ; Selecting a singular pixel from the reference image; Calculating a motion vector for the selected singular pixel using optical flow method; Obtaining an average direction of the vectors and an average size of the vectors from the calculated motion vectors of the singular pixels; Setting a search region in the phase correlation space processed for a single region from the obtained average direction information and size information with respect to the motion vector; Determining a maximum peak value in the set search region and determining a position as a correction parameter; And outputting the stabilized frame by applying the determined correction parameter to the current frame.

바람직하게, 상기 특이 픽셀을 선택하는 단계 방법은, 상기 기준 영상의 에지 정보를 추출하여 그 값을 마스크로 설정하는 단계; 및 해당 마스크 영역에 대하여 현재 영상의 픽셀 광도의 변화량을 크기순으로 정렬하고 그 결과 중에서 동일한 광도변화를 이루는 픽셀중 가장 밝은 값을 가지는 픽셀을 모두 선택하는 단계를 포 함할 수 있다.Preferably, the method of selecting a singular pixel comprises: extracting edge information of the reference image and setting the value as a mask; And arranging the amount of change in pixel intensity of the current image with respect to the mask area in order of size, and selecting all pixels having the brightest value among pixels having the same intensity change among the results.

또한, 바람직하게, 상기 특이 픽셀의 선택은 최초 프레임에서만 선택되고, 상기 기준 프레임이 변경될 경우에만 수될 수 있다.Further, preferably, the selection of the singular pixel can be selected only in the first frame and only when the reference frame is changed.

이상에서 설명한 바와 같이, 본 발명에 따르면 여러 가지의 이점이 있다.As described above, according to the present invention, there are various advantages.

먼저, 영상의 흔들림 보정을 위하여 프레임 전체의 움직임 벡터(FMV)를 추정하기에 적합한 위상 상관법과 지역화소의 움직임 벡터(LMV)를 추정하기에 적합한 광류법을 혼합함으로써 계산량을 줄이면서 큰 흔들림의 보정에 잘 추종하면서, 작은 흔들림의 미세 보정의 정확한 추종에도 효과적이다. 따라서, 휴전선, 군, 경찰 시설의 울타리 경비용 영상 감시 시스템이나, 해안 경비 등의 원거리 확대 영상의 흔들림 보정에 사용될 수 있다.First, the large shake correction is achieved by reducing the computation amount by mixing the phase correlation method suitable for estimating the motion vector (FMV) of the entire frame and the optical flow method suitable for estimating the motion vector (LMV) of the local pixel for image stabilization. While following well, it is effective for accurate following of fine correction of small shake. Therefore, it can be used for image stabilization of fence guard video surveillance system of armistice lines, military, police facilities, and far magnified images such as coast guards.

종래의 위상 상관법 만을 이용한 흔들림 보정과 비교할 때 실용상 1/10의 계산량으로도 구현가능하다.Compared with the conventional stabilization using only the phase correlation method, it can be implemented with a calculation amount of 1/10 practically.

또한, 견고하게 고정된 카메라나 렌즈는 매우 강건하여 그 흔들림이 매우 미세하므로 어떤 물리적인 수단으로도 감지하기 어렵지만, 이 경우에도 1000배 이상 줌인한 영상물은 여전히 흔들림이 나타나는 것이 일반적이다. 본 발명에 따르면, 이런 영상물의 흔들림 보정은 디지털 신호처리에 의한 본 발명의 방법이 강력한 해결 수단이 된다.In addition, since the camera or lens that is firmly fixed is very robust and its shake is very fine, it is difficult to detect by any physical means, but even in this case, the image that is zoomed in over 1000 times is still shaken. According to the present invention, the image stabilization of the image is a powerful solution to the method of the present invention by digital signal processing.

이하, 첨부된 도면을 참조하여 본 발명의 실시예를 설명한다.Hereinafter, with reference to the accompanying drawings will be described an embodiment of the present invention.

일반적인 카메라 떨림 보정은 자리로 센서(gyro sensor)를 이용하는 하드웨어 종속적인 방법을 사용하고 있으나, 본 발명에서는 비디오 영상 안정화를 위하여 외부 원인으로 인한 카메라 흔들림으로 발생된 영상, 또는 원거리 줌인 영상의 떨림 현상을 영상 처리 기법을 통하여 소프트웨어적으로 처리한다. 구체적으로, 본 발명은 블록 매칭 알고리즘(BMA)와 기울기 매칭 알고리즘(GMA)을 포함하는 광류법을 이용하여 지역화소 움직임 벡터(LMV)를 추정하는 방법과 위상 상관을 이용하여 프레임 움직임 벡터(FMV)를 추정하는 방법을 혼용하는 하이브리드 방법으로 FMV를 빠르게 추정하고 얻어진 보정 파라미터로 영상을 보정한다.In general, camera shake correction uses a hardware-dependent method using a sensor as a seat. However, in the present invention, in order to stabilize a video image, an image caused by camera shake due to an external cause or a remote zoom image may be shaken. It is processed by software through image processing technique. Specifically, the present invention provides a method for estimating a local pixel motion vector (LMV) using an optical flow method including a block matching algorithm (BMA) and a gradient matching algorithm (GMA) and a frame motion vector (FMV) using phase correlation. Hybrid method using a method of estimating the fast FMV estimate and correct the image with the obtained correction parameters.

이에 따라, 출력 동영상에서 일정한 목표물에 카메라가 전혀 흔들리지 않는 것처럼 일정한 초점을 가지는 안정화된 출력 동영상을 얻게 된다.Accordingly, a stabilized output video having a constant focus is obtained as if the camera is not shaken at a certain target in the output video.

도 1은 본 발명에 따른 보정방법을 설명하는 플로차트이다.1 is a flowchart illustrating a correction method according to the present invention.

먼저, 위상상관법에 의하여 흔들림 보정을 위한 기준영상인 기준 프레임과 현재 프레임에 대한 위상 상관을 구하여 위상 상관 공간을 형성한다(단계 S1). 이 과정에서 기존의 위상상관법의 오추정 대책으로 마련되어 적용되고 있는 다중 영역 처리가 불필요하며 단일 영역 처리만을 수행한다.First, a phase correlation space is formed by obtaining a phase correlation between a reference frame, which is a reference image for image stabilization, and a current frame by a phase correlation method (step S1). In this process, the multi-domain processing that is prepared and applied as a countermeasure against the conventional phase correlation method is unnecessary, and only a single domain processing is performed.

위상 상관에 의한 보정 파라미터 추정은 푸리에 변환의 천이 특성(shift property)에 기반한 알고리즘이다. 푸리에 변환의 천이 특성은 좌표 상에서의 두 함수의 천이가 푸리에 영역에서 선형 위상차로 변환된다는 것이다.Correction parameter estimation by phase correlation is an algorithm based on the shift property of the Fourier transform. The transition characteristic of the Fourier transform is that the transition of the two functions on the coordinates is transformed into a linear phase difference in the Fourier region.

즉, f k f k +1이 2차원 평면상에서 t(t x , t y )만큼 천이된 2차원 영상이라면, f k (x, y)와 f k +1(x, y)은 식(1)과 같은 관계를 가진다.That is, if f k and f k +1 are two-dimensional images shifted by t ( t x , t y ) on the two-dimensional plane, f k ( x , y ) and f k +1 ( x , y ) are represented by equation (1). Has the same relationship as

Figure 112007065542328-pat00001
Figure 112007065542328-pat00001

푸리에 천이 특성에 의하여 이 두 함수의 푸리에 변환은 식(2)로 표현된다.By the Fourier transition characteristic, the Fourier transform of these two functions is represented by equation (2).

Figure 112007065542328-pat00002
Figure 112007065542328-pat00002

F k (uv)와 F k 1(u, v)는 복소수이므로, 상호전력스펙트럼(CPS: cross power spectrum) 을 구하여 영상의 천이 성분을 분리한다. Since F k ( u + v ) and F k + 1 ( u , v ) are complex numbers, we obtain a cross power spectrum (CPS) to separate the transition components of the image.

Figure 112007065542328-pat00003
Figure 112007065542328-pat00003

여기서, F * k 1(u, v)는 F k +1(u, v)의 공액복소수이다.Where F * k + 1 ( u , v ) is the conjugate complex number of F k +1 ( u , v ).

천이성분만을 얻기 위해서 식(3)을 역푸리에 변환하면, 식(4)과 같이 2차원 좌표축상 t(t x , t y )에서 임펄스를 이루는 천이값이 얻어진다.Inverse Fourier Transformation of Equation (3) to obtain only the transition components yields a transition value that makes an impulse on t ( t x , t y ) on the two-dimensional coordinate axis as in Equation (4).

Figure 112007065542328-pat00004
Figure 112007065542328-pat00004

이어, 기준 영상에서 특이 픽셀을 선택한다(단계 S2).Subsequently, a specific pixel is selected in the reference image (step S2).

특이 픽셀의 선택 방법은 기준 영상의 에지 정보를 추출하여 그 값을 마스크로 설정한다. 그리고 해당 마스크 영역에 대하여 현재 영상의 픽셀 광도의 변화량을 크기순으로 정렬하고, 그 결과 생성된 정렬값 중에서 동일한 광도 변화를 이루는 픽셀중 가장 밝은 값을 가지는 픽셀을 모두 선택하여 특이 픽셀로 구성한다. The method of selecting singular pixels extracts edge information of the reference image and sets the value as a mask. Then, the amount of change in pixel intensity of the current image is aligned with respect to the mask area, and all pixels having the brightest value among the pixels having the same intensity change among the resulting alignment values are selected to form a singular pixel.

이러한 특이 픽셀의 선택 절차는 매 프레임 수행되는 절차가 아니라, 최초 프레임에서만 선택되며, 기준 프레임이 변경될 경우에만 수행되는 과정이다. 또한 기존의 정해진 배치에 의한 대표점 매칭법(예를 들어, 국내 등록특허 제94465호)과는 달리 그 배치가 정해져 있지 않으며 기준 프레임의 영상 내용에 따라 다른 특이픽셀이 선택된다. 이 과정에서 에지정보는 특이 픽셀을 구성하기 위한 마스크를 구성하는데에만 이용된다. 이 방법은 기존의 에지정보로부터 움직임 벡터를 검출하는 방법보다 그 신뢰도 면에서 위치변화에 강인한 특성을 갖는 방법이다.This singular pixel selection procedure is not a procedure performed every frame, but is selected only in the first frame and is performed only when the reference frame is changed. In addition, unlike the representative point matching method (for example, Korean Patent No. 94465) based on the existing predetermined arrangement, the arrangement is not determined and different singular pixels are selected according to the image content of the reference frame. In this process, the edge information is used only to construct a mask for forming a singular pixel. This method is more robust to position change in terms of reliability than the motion vector detection method from the existing edge information.

다음, 도 2와 같이 선택된 특이 픽셀에 대한 움직임 벡터를 광류법을 이용하여 빠르게 구한다(단계 S3).Next, as shown in FIG. 2, the motion vector for the selected singular pixel is quickly obtained using the optical flow method (step S3).

동영상에서 광류법을 적용하여 움직임 벡터를 추정하는 방법은 움직임 객체에 의해 형성되는 광도패턴의 이동으로 표현가능하다. 광류는 현재 프레임과 이전 프레임 간에 고정된 크기의 윈도우내의 밝기의 자승합을 광도에 대한 매칭 기준으로 정의하고, 프레임 간의 변위는 구해진 자승합이 최소가 되는 방식으로 광도의 흐름을 추정하는 방법이다. 일반적으로 Lucas와 Kanade가 제안한 광류계산법을 많이 사용하고 있다.A method of estimating a motion vector by applying an optical flow method in a moving picture may be represented by movement of a luminance pattern formed by a moving object. The optical flow defines a square sum of brightness in a fixed size window between a current frame and a previous frame as a matching criterion for luminance, and the displacement between frames is a method of estimating the flow of luminance in such a manner that the square sum obtained is the minimum. In general, the optical flow calculation method proposed by Lucas and Kanade is used a lot.

구체적으로, 이 방법은 시간 t 에서, 영상의 한 점 (x, y)에 대한 광도를 I(x, y, t) 라고 하고, 시간 tδ t 에서 δx, δy, δt 만큼의 천이가 존재한다면 그 광도는 I(xδx, yδy, tδt) 로 표현되며 식(5)과 같은 관계를 가진다.Specifically, in this method, the luminance of a point ( x, y ) of an image at time t is called I ( x, y, t ), and there are as many transitions as δx , δy , δt at time t + δ t . If so, the luminance is represented by I ( x + δx , y + δy , t + δt ) and has the same relationship as in Equation (5).

Figure 112007065542328-pat00005
Figure 112007065542328-pat00005

연속 영상에 대하여 광도 I(x, y, t)의 변화가 아주 작다고 가정하면, 테일 러 급수를 가지는 다음 식(6)으로 표현될 수 있다.Assuming that the change in intensity I ( x, y, t ) is very small for continuous images, it can be expressed by the following equation (6) having a Taylor series.

Figure 112007065542328-pat00006
Figure 112007065542328-pat00006

여기서, H.O.T. 는 고차항의 아주 작은 값이므로 무시할 수 있으므로, 식(6)에서Where H.O.T. Since is a very small value of the higher order term and can be ignored,

Figure 112007065542328-pat00007
이 된다.
Figure 112007065542328-pat00007
Becomes

여기서, u =

Figure 112007065542328-pat00008
, v =
Figure 112007065542328-pat00009
, I x =
Figure 112007065542328-pat00010
, I y =
Figure 112007065542328-pat00011
, I t =
Figure 112007065542328-pat00012
이며 uv는 광류 벡터 구성성분들로 속도벡터(velocity vector)에 해당하며, 식(7)과 같이 표현된다.Where u =
Figure 112007065542328-pat00008
, v =
Figure 112007065542328-pat00009
, I x =
Figure 112007065542328-pat00010
, I y =
Figure 112007065542328-pat00011
, I t =
Figure 112007065542328-pat00012
U and v are the components of the light flow vector, corresponding to the velocity vector, and are represented by Eq. (7).

Figure 112007065542328-pat00013
Figure 112007065542328-pat00013

Lucas 와 Kanade는 작은 영역 B에 소속된 픽셀에 대한 움직임 벡터는 동일하다는 가정 하에 u, v을 계산하였다.Lucas and Kanade calculated u and v on the assumption that the motion vectors for the pixels in small region B were the same.

즉, 영역 B에 대한 광류 방정식의 자승오차 E는 식(8)과 같이 정의하면,That is, the square error E of the optical flow equation for the region B is defined as Equation (8),

Figure 112007065542328-pat00014
Figure 112007065542328-pat00014

식(8)의 x, y에 대한 편미분식은 식(9), (10)와 같이 된다.The partial differential equations for x and y in equation (8) are as shown in equations (9) and (10).

Figure 112007065542328-pat00015
Figure 112007065542328-pat00015

식(9)과 (10)를 식(11)과 같은 2x2 행렬식으로 계산하면 u, v를 얻을 수 있 다.Computing equations (9) and (10) with a 2x2 matrix like equation (11) yields u and v .

Figure 112007065542328-pat00016
Figure 112007065542328-pat00016

식(10)의 2x2 행렬식을 선형시스템으로 해석하면 2x2행렬식에 의해 움직여지는 픽셀에 대해서 속도 벡터 u, v을 x, y축에 나타냄으로서 광류의 흐름이 나타나게 된다.When the 2x2 determinant of Equation (10) is interpreted as a linear system, the flow of light flow appears by representing the velocity vectors u and v on the x and y axes for the pixels moved by the 2x2 matrix.

도 3은 Lucas와 Kanade이 광류를 얻기 위하여 제안한 광류모델 블록도이다.3 is a block diagram of an optical flow model proposed by Lucas and Kanade to obtain an optical flow.

이 모델에서는 입력 비디오 영상에 대한 차후 기울기(gradient) 계산 과정에서 발생할 수 있는 에러를 줄이기 위해 전 처리 과정으로 입력영상에 가우시안 필터를 사용하여 스무딩 전처리를 행한다. 이렇게 스무딩된 입력영상은 시간과 공간 축에 대하여 3차원으로 확장하여 기울기 연산을 실시한다.In this model, pre-processing is performed using a Gaussian filter for smoothing preprocessing to reduce errors that may occur during subsequent gradient calculation of the input video image. The smoothed input image is extended in three dimensions with respect to the time and space axes to perform a gradient operation.

도 4는 3차원으로 확장하여 I x 축과 I y 축과 I t 축에 관해서 기울기 연산 과정중 I x 축에 관하여 기울기 연산 과정의 예를 보여주고 있다. 또한, 도 5는 I y 축에 관하여 기울기 처리 과정의 예를 보여주고 있고, 도 6은 I t 축에 관하여 기울기 처리 과정의 예를 보여주고 있다.FIG. 4 illustrates an example of an operation of inclination with respect to the I x axis during the operation of inclination with respect to the I x axis, the I y axis, and the I t axis in three dimensions. In addition, FIG. 5 shows an example of an inclination process with respect to the I y axis, and FIG. 6 shows an example of an inclination process with respect to the I t axis.

기울기 처리시 1x5 크기의 다음과 같은 커널을 사용하게 된다.The gradient process uses a 1x5 kernel like this:

1x5 kernel ={ -1 8 0 -8 1 }1x5 kernel = {-1 8 0 -8 1}

입력 프레임의 중간 프레임을 설정하여 이전 프레임과 이후 프레임에 관하여 가중값으로 Lucas와 Kanade가 제안한 0.75를 사용한다. 이와 같은 방식으로 I x , I y , I t 의 3차원 기울기를 계산함으로써 I x , I y , I t , I 2 x , I 2 y , I x I y , tI y I t 를 구하게 된다.By setting the middle frame of the input frame, we use the 0.75 proposed by Lucas and Kanade as weights for the previous and subsequent frames. In this way I x , I y, is rescued by calculating a three-dimensional gradient of I t I x, I y, I t, I 2 x, I 2 y, I x I y, t and I t y I.

다음, 도 7을 참조하면, 단계 S3에서 계산된 특이 픽셀(도 7에서 빨간색 점으로 표시)의 움직임 벡터로부터 그 벡터들의 평균 방향과 벡터의 평균 크기를 구하여 탐색 영역을 결정한다(단계 S4와 S5).Next, referring to FIG. 7, the search area is determined by obtaining the average direction of the vectors and the average size of the vectors from the motion vectors of the singular pixels (indicated by the red dots in FIG. 7) calculated in step S3 (steps S4 and S5). ).

이어, 얻어진 평균 방향 정보와 크기 정보로부터 단계 1에서 단일 영역에 대하여 처리된 위상상관 공간의 중심으로부터 구해진 평균방향으로 구해진 크기만큼 탐색영역을 설정한다. 이때 탐색영역의 크기는 구해진 크기 정보에 비례하여 설정한다. 이 방법은 빠른 탐색을 위하여 탐색영역을 축소하는 방법으로 제안한 것이다(단계 S6).Then, the search area is set by the size obtained in the average direction obtained from the center of the phase-correlated space processed for the single area in step 1 from the obtained average direction information and size information. At this time, the size of the search area is set in proportion to the obtained size information. This method is proposed as a method of reducing the search area for quick searching (step S6).

이후, 설정된 탐색영역에서 최대 피크값을 구하고 그 위치를 보정 파라미터로 결정한다(단계 S7).Then, the maximum peak value is obtained in the set search area and the position is determined as the correction parameter (step S7).

탐색영역에서 최대 피크값은 기준 비디오 영상 대비 현재 비디오 영상 프레임의 흔들림 현상에 기인한 천이량을 나타낸다.The maximum peak value in the search region represents the amount of transition due to the shaking of the current video image frame compared to the reference video image.

이어 현재 프레임에 결정된 보정 파라미터를 적용하여 안정화된 프레임으로 출력한다(단계 S8).Subsequently, it is output as a stabilized frame by applying the correction parameter determined to the current frame (step S8).

즉, 모든 경우에서 카메라의 떨림에 의한 영상위치의 천이는 전체 픽셀에서 상하좌우 동일한 크기로 천이가 발생하므로 얻어진 보정 파라미터는 해당 영상 프레임 전체 픽셀에 동일한 값으로 적용되어 보상이 이루어지며 그 결과로 이전 프레 임과 동일한 위치에 놓인 흔들임 없는 영상이 재구성된다. That is, in all cases, the transition of the image position due to camera shake occurs in the same size up, down, left, and right in all pixels, and thus the correction parameter is applied to the entire pixel of the corresponding image frame to compensate. The shake-free image placed at the same position as the frame is reconstructed.

이상에서 설명한 바와 같이, 본 발명에서 제안하는 위상상관과 광류법을 혼용하는 하이브리드 방법에 의하면, 위상상관에 의하여 안정된 보정 파라미터를 얻기 위한 대책으로 여러 개의 영역을 취하여 분석할 필요가 없으며, 단일 영역만으로 안정된 위상상관 적용이 가능하다. 따라서 위상상관에 의한 영상 안정화의 단점으로 지적된 간헐적인 오추정이 완전히 해결될 수 있다. 또한 단일 영역만을 이용한다는 점과 광류법에 의한 기준 프레임에 대하여 최초에 선택된 특이 픽셀의 움직임 벡터만으로 탐색 영역을 한정한다는 점에서 빠르고 정확한 프레임 움직임 벡터 천이 성분 추정이 가능하다.As described above, according to the hybrid method using the phase correlation and the optical flow method proposed in the present invention, it is not necessary to take multiple regions and analyze them as a countermeasure for obtaining a stable correction parameter by the phase correlation. It is possible to apply stable phase correlation. Therefore, the intermittent false estimation pointed out as a disadvantage of image stabilization by phase correlation can be completely solved. In addition, fast and accurate frame motion vector transition component estimation is possible in that only the single region is used and the search region is limited only by the motion vector of the singular pixel initially selected for the reference frame by the optical flow method.

도 1은 본 발명에 따른 보정방법을 설명하는 플로차트이다.1 is a flowchart illustrating a correction method according to the present invention.

도 2는 광류 분석에 의한 움직임 벡터의 방향과 크기 의사추정을 설명하는 사진이다.Fig. 2 is a photograph illustrating the estimation of the direction and magnitude of the motion vector by optical flow analysis.

도 3은 Lucas와 Kanade이 광류를 얻기 위하여 제안한 광류모델 블록도이다.3 is a block diagram of an optical flow model proposed by Lucas and Kanade to obtain an optical flow.

도 4는 I x (2.2)에 관한 기울기 연상과정의 예를 보여준다.4 shows an example of the slope association process for I x (2.2).

도 5는 I y 축에 관하여 기울기 처리 과정의 예를 보여주고 있다.5 shows an example of a tilt process with respect to the I y axis.

도 6은 I t 축에 관하여 기울기 처리 과정의 예를 보여주고 있다.6 shows an example of a tilt process with respect to the I t axis.

도 7은 탐색 구간의 설정을 설명하고 있는 도면이다.7 is a diagram illustrating setting of a search section.

Claims (3)

위상상관법에 의하여 기준 영상의 기준 프레임과 현재 프레임에 대한 위상 상관을 구하여 위상 상관 공간을 형성하는 단계, 여기서, 상기 위상 상관은 푸리에 변환의 천이 특성(shift property)에 기반하며;Forming a phase correlation space by obtaining a phase correlation between a reference frame of the reference image and a current frame by a phase correlation method, wherein the phase correlation is based on a shift property of a Fourier transform; 상기 기준 영상에서 특이 픽셀을 선택하는 단계;Selecting a singular pixel from the reference image; 상기 선택된 특이 픽셀에 대한 움직임 벡터를 광류법을 이용하여 계산하는 단계;Calculating a motion vector for the selected singular pixel using optical flow method; 상기 계산된 특이 픽셀의 움직임 벡터로부터 그 벡터들의 평균 방향과 벡터의 평균 크기를 구하는 단계;Obtaining an average direction of the vectors and an average size of the vectors from the calculated motion vectors of the singular pixels; 상기 움직임 벡터에 관련하여 상기 구해진 평균 방향 정보와 크기 정보로부터 단일 영역에 대하여 처리된 상기 위상상관 공간에서 탐색 영역을 설정하는 단계;Setting a search region in the phase correlation space processed for a single region from the obtained average direction information and size information with respect to the motion vector; 상기 설정된 탐색 영역에서 최대 피크값을 구하고 그 위치를 보정 파라미터로 결정하는 단계; 및Determining a maximum peak value in the set search region and determining a position as a correction parameter; And 상기 현재 프레임에 상기 결정된 보정 파라미터를 적용하여 안정화된 프레임으로 출력하는 단계를 포함하는 것을 특징으로 하는 영상 흔들림 보정방법.And applying the determined correction parameter to the current frame and outputting the stabilized frame. 청구항 1에 있어서,The method according to claim 1, 상기 특이 픽셀을 선택하는 단계 방법은,The method of selecting the singular pixel may include: 상기 기준 영상의 에지 정보를 추출하여 그 값을 마스크로 설정하는 단계; 및Extracting edge information of the reference image and setting the value as a mask; And 해당 마스크 영역에 대하여 현재 영상의 픽셀 광도의 변화량을 크기순으로 정렬하고 그 결과 중에서 동일한 광도변화를 이루는 픽셀중 가장 밝은 값을 가지는 픽셀을 모두 선택하는 단계를 포함하는 것을 특징으로 하는 영상 흔들림 보정방법.And arranging the amount of change in pixel intensity of the current image with respect to the mask area in order of size, and selecting all pixels having the brightest value among the pixels having the same intensity change among the results. . 청구항 2에 있어서,The method according to claim 2, 상기 특이 픽셀의 선택은 최초 프레임에서만 선택되고, 상기 기준 프레임이 변경될 경우에만 수행되는 것을 특징으로 하는 영상 흔들림 보정방법.The selection of the singular pixel is selected only in the first frame and is performed only when the reference frame is changed.
KR1020070091559A 2007-04-05 2007-09-10 Stabilizing method for shaking video image KR100856474B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020070033796 2007-04-05
KR20070033796 2007-04-05

Publications (1)

Publication Number Publication Date
KR100856474B1 true KR100856474B1 (en) 2008-09-04

Family

ID=40022384

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070091559A KR100856474B1 (en) 2007-04-05 2007-09-10 Stabilizing method for shaking video image

Country Status (1)

Country Link
KR (1) KR100856474B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101200747B1 (en) 2011-10-27 2012-11-13 국방과학연구소 Moving target detecting apparatus and method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060070969A (en) * 2004-12-21 2006-06-26 삼성전자주식회사 Apparatus and method for distinction between camera movement and object movement and extracting object in video surveillance system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060070969A (en) * 2004-12-21 2006-06-26 삼성전자주식회사 Apparatus and method for distinction between camera movement and object movement and extracting object in video surveillance system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101200747B1 (en) 2011-10-27 2012-11-13 국방과학연구소 Moving target detecting apparatus and method thereof

Similar Documents

Publication Publication Date Title
US7221776B2 (en) Video stabilizer
EP1826721B1 (en) Calculating motion data from a sequence of multi-resolution images
US8520085B2 (en) Method of full frame video stabilization
US8290212B2 (en) Super-resolving moving vehicles in an unregistered set of video frames
EP2535864B1 (en) Image processing device and method
US6819778B2 (en) Method and system for tracking a fast moving object
KR101071352B1 (en) Apparatus and method for tracking object based on PTZ camera using coordinate map
CN113286194A (en) Video processing method and device, electronic equipment and readable storage medium
KR100985805B1 (en) Apparatus and method for image stabilization using adaptive Kalman filter
US20060061658A1 (en) Image stabilisation system and method
EP2023596A2 (en) Apparatus and program for producing as panoramic image
US20230116893A1 (en) Video depth estimation based on temporal attention
JP4210954B2 (en) Image processing method, image processing method program, recording medium storing image processing method program, and image processing apparatus
KR20080021646A (en) Continuous extended range image processing
US8675081B2 (en) Real time video stabilization
JP2011060282A (en) Method and system for motion detection using nonlinear smoothing of motion field
KR100965800B1 (en) method for vehicle image detection and speed calculation
JP2017220885A (en) Image processing system, control method, and control program
KR100856474B1 (en) Stabilizing method for shaking video image
US20150350669A1 (en) Method and apparatus for improving estimation of disparity in a stereo image pair using a hybrid recursive matching processing
KR102450466B1 (en) System and method for removing camera movement in video
JP2006215657A (en) Method, apparatus, program and program storage medium for detecting motion vector
CN107220935B (en) Video satellite on-orbit video image stabilization method
Tsoligkas et al. A guide to digital image stabilization procedure—An overview
KR101070448B1 (en) The method for tracking object and the apparatus thereof

Legal Events

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

Payment date: 20120829

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20130828

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20140828

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20150828

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20160808

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20170807

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20180807

Year of fee payment: 11