KR101012481B1 - Apparatus and Method for Correcting Moving Image Wavering - Google Patents
Apparatus and Method for Correcting Moving Image Wavering Download PDFInfo
- Publication number
- KR101012481B1 KR101012481B1 KR1020090035224A KR20090035224A KR101012481B1 KR 101012481 B1 KR101012481 B1 KR 101012481B1 KR 1020090035224 A KR1020090035224 A KR 1020090035224A KR 20090035224 A KR20090035224 A KR 20090035224A KR 101012481 B1 KR101012481 B1 KR 101012481B1
- Authority
- KR
- South Korea
- Prior art keywords
- frame
- image
- reference macroblock
- value
- pixel
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/246—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
- G06T7/248—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments involving reference images or patches
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/14—Picture signal circuitry for video frequency region
- H04N5/144—Movement detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
Abstract
동영상 손떨림 보정 장치 및 방법이 개시되어 있다. 상기 동영상 손떨림 보정 장치는 제 1 프레임의 입력 영상에서 적어도 하나의 기준 매크로블록을 선택하고 제 2 프레임의 입력 영상에서 적어도 하나의 기준 매크로블록에 대응하는 적어도 하나의 탐색 영역을 선택하는 선택부와, 제 1 프레임의 기준 매크로블록을 제 2 프레임의 탐색 영역에 포함된 각각의 탐색 블록들에 대응시켜 통계적 연산을 수행하는 연산부 및 통계적 연산의 결과 값을 이용하여 제 2 프레임의 출력 영상을 보정하기 위한 움직임 벡터를 산출하는 벡터 산출부 등을 포함한다. 따라서 손떨림에 의한 영상의 왜곡은 효과적으로 보정하면서도 연산 량은 대폭 줄일 수 있다.
Disclosed is a video stabilization device and method. The video image stabilization apparatus may further include: a selector configured to select at least one reference macroblock from an input image of a first frame and to select at least one search region corresponding to at least one reference macroblock from an input image of a second frame; An operation unit that performs a statistical operation by mapping the reference macroblock of the first frame to each of the search blocks included in the search region of the second frame and using the result value of the statistical operation to correct the output image of the second frame. And a vector calculator for calculating a motion vector. Therefore, the amount of computation can be significantly reduced while effectively correcting image distortion due to camera shake.
Description
본 발명은 동영상 손떨림(Wavering) 보정 장치 및 방법에 관한 것으로서, 좀더 상세하게는, 손떨림에 의한 영상의 왜곡은 효과적으로 보정하면서도 연산 량은 대폭 줄일 수 있는 동영상 손떨림 보정 기술에 관한 것이다.The present invention relates to a video stabilization (Wavering) correction apparatus and method, and more particularly, to a video stabilization technology that can significantly reduce the amount of calculation while effectively correcting the distortion of the image due to hand shake.
일반적으로, 디지털 캠코더, 디지털 카메라 등과 같은 디지털 영상 촬영 장치는 초당 15~30프레임(frame)의 스틸 이미지(still image)를 연속적으로 촬영하고 이를 디스플레이 수단, 예컨대 LCD(Liquid Crystal Display) 등을 통하여 표시함으로써, 사용자에게 움직이는 영상을 보여준다.In general, a digital imaging apparatus such as a digital camcorder or a digital camera continuously captures a still image of 15 to 30 frames per second and displays the same through a display means such as a liquid crystal display (LCD). As a result, a moving image is shown to the user.
디지털 영상 촬영 장치를 사용한 동영상 촬영 시에는, 디지털 영상 촬영 장치와 접촉한 사용자의 신체의 예측 불가능한 움직임 또는 떨림(예컨대 Panning & Tilting 현상)이 필연적으로 수반되므로, 삼각대 등과 같은 고정 수단을 사용하지 않는 한 물리적으로 안정된 촬영 상태를 유지하기 어렵다. 따라서 이러한 물리적인 촬영 상태의 불안정성은 촬영되는 영상의 왜곡을 발생시키게 된다.When shooting video using a digital imaging device, unavoidable movement or tremor (e.g. panning and tilting) of the user's body in contact with the digital imaging device is inevitably involved, so unless a fixed means such as a tripod is used, It is difficult to maintain a physically stable shooting state. Therefore, such instability of the physical photographing state may cause distortion of the captured image.
또한, CMOS(Complementary Metaloxide Semiconductor module) 모듈을 사용하는 디지털 영상 촬영 장치, 예컨대 모바일 단말기 등의 경우, 롤링 셔터(Rolling Shutter) 시에 발생하는 미세한 떨림에 의해서 영상의 왜곡이 발생할 수도 있다.In addition, in the case of a digital image photographing apparatus using a complementary metal oxide semiconductor module (CMOS) module, such as a mobile terminal, distortion of an image may occur due to the slight shaking generated during the rolling shutter.
이러한 영상의 왜곡은 피사체의 동선에 따라 이동하는 사용자의 신체 및 디지털 영상 촬영 장치의 움직임과 떨림에 의한 불안정성이 더해져 더욱 심화될 수 있으며, 초당 촬영되는 프레임 수가 적을수록 프레임간 움직임 또는 떨림에 따른 보간 거리가 멀어지기 때문에 사용자가 체감하는 영상의 불안정성은 더욱 커지게 된다.The distortion of the image may be further intensified by instability due to the motion and shaking of the user's body and the digital imaging apparatus moving along the moving line of the subject, and as the number of frames taken per second decreases, interpolation due to interframe movement or vibration As the distance increases, the instability of the image experienced by the user becomes greater.
따라서, 최근에는 디지털 영상 촬영 장치의 동영상 손떨림 보정을 위한 다양한 기술들이 연구되고 있다. 예컨대, 동영상 손떨림 보정을 위한 종래의 기술로는 광학식 손떨림 보정 기술 및 비광학식 손떨림 보정 기술 등으로 구분될 수 있다.Therefore, recently, various techniques for image stabilization of a digital image photographing apparatus have been studied. For example, conventional techniques for image stabilization may be classified into an optical image stabilization technique and a non-optical image stabilization technique.
상기 광학식 손떨림 보정 기술은 동영상 손떨림 방지를 위하여 CMOS 모듈을 통하여 입력되는 영상에 대하여 원천적으로 흔들림 또는 떨림을 극복할 수 있는 장치를 디지털 영상 촬영 장치에 적용하는 기술이다. 예를 들면, 광학식 손떨림 보정은, 동영상 촬영 시에 디지털 영상 촬영 장치의 렌즈가 움직이는 경우 상기 디지털 영상 촬영 장치의 렌즈의 중심을 상기 움직임의 반대 방향으로 물리적으로 이동시킬 수 있는 자이로 센서 등을 적용하는 것이다.The optical image stabilization technique is a technique for applying a device capable of overcoming a shake or shake inherently with respect to an image input through a CMOS module in order to prevent a video shake. For example, the optical image stabilization may be performed by applying a gyro sensor or the like that can physically move the center of the lens of the digital imaging apparatus in the opposite direction to the movement when the lens of the digital imaging apparatus moves during the video recording. will be.
그러나, 이러한 광학식 손떨림 보정은 디지털 영상 촬영 장치에 해당 기능을 위한 추가적인 장치를 구비하여야 하므로, 제품 생산 비용 및 단가의 상승을 가져 오는 문제가 있으며, 제품의 크기 증대로 인하여 소형 및 경량을 추구하는 모바일 단말기에 효과적으로 적용하기에는 한계가 있다.However, since the optical image stabilization should be provided with an additional device for the corresponding function in the digital imaging apparatus, there is a problem that the product production cost and unit cost increase, and the mobile pursuing small size and light weight by increasing the size of the product There is a limit to the effective application to the terminal.
한편, 비광학식 손떨림 보정 기술은 칩 상태의 하드웨어 또는 소프트웨어 수준에서 촬영된 영상을 보정하는 방안이다. 예를 들면, 움직임이 발생된 촬영 영상의 움직임 벡터를 산출하고 이에 해당하는 만큼 촬영 영상의 오프셋 등을 조정하여 영상을 보정하는 것이다.On the other hand, non-optical image stabilization technology is a method for correcting the image taken at the hardware or software level of the chip state. For example, by calculating a motion vector of the photographed image in which the motion is generated and correcting the image by adjusting the offset of the photographed image as much as the motion vector.
종래의 비광학식 동영상 손떨림 보정 기술들은 고속화 측면과 하드웨어의 축소 측면을 부각시키기 위하여 연산량의 감소 및 움직임 추정 기법을 개발하여 왔다. 그러나 연산량을 감소시키는 방안 및 알고리즘 기반의 움직임 추정 기법은 움직임 추정 결과의 오차를 발생하거나 연산 시의 소요 시간을 증가시켜 그 성능이 떨어진다.Conventional non-optical moving image stabilization techniques have been developed to reduce the amount of computation and motion estimation in order to highlight the speed and the reduction of hardware. However, the method of reducing the amount of computation and the algorithm-based motion estimation technique cause errors in the motion estimation results or increase the time required for computation, thereby degrading its performance.
움직임 추정의 VLSI(Very Large Scale Integration)에 대한 종래 기술들은 시스템의 고속화 및 집적화에 의하여 다소 향상된 결과를 나타내고는 있으나, 탐색 영역의 범위가 증가함에 따라 점차 처리해야 할 탐색 영역의 데이터가 커지고, 이를 처리하기 위한 빠른 속도 및 작은 면적을 차지하는 하드웨어에 대한 요구가 더욱 증대되고 있다고 할 수 있다.Conventional techniques for VLSI (Very Large Scale Integration) of motion estimation have shown somewhat improved results due to the high speed and integration of the system. However, as the range of the search area increases, the data of the search area to be processed gradually increases. The demand for fast speed and small footprint hardware for processing is increasing.
한편, 하드웨어의 급속한 발달로 인하여 작은 면적에 대한 집적도가 향상되었을지라도, 움직임 추정에 따른 탐색 영역 저장과 연산을 위한 국부적인 메모리의 사용은 대용량의 데이터를 처리하는 멀티미디어 시스템에서는 피할 수 없는 문제이다. 게다가 움직임 추정 시 사용되는 메모리는 프레임 단위로써 그 면적이 크고, 방대한 데이터에 대한 연산 처리 속도를 증가시키기 위하여 버퍼를 사용하게 됨에 따라 필연적으로 하드웨어 면적이 증가하는 문제가 있다.On the other hand, although the degree of integration for a small area is improved due to the rapid development of hardware, the use of local memory for the search area storage and the calculation according to the motion estimation is an inevitable problem in a multimedia system that processes a large amount of data. In addition, the memory used for motion estimation has a large area as a unit of frame, and a hardware area is inevitably increased as a buffer is used to increase arithmetic processing speed for a large amount of data.
본 발명이 해결하고자 하는 기술적인 과제는 손떨림에 의한 영상의 왜곡은 효과적으로 보정하면서도 연산 량은 대폭 줄일 수 있는 동영상 손떨림 보정 장치 및 방법을 제공하는데 있다.The technical problem to be solved by the present invention is to provide a video image stabilization device and method that can significantly reduce the amount of calculation while effectively correcting the distortion of the image due to hand shake.
이러한 기술적 과제를 해결하기 위하여 본 발명은 일 측면(Aspect)에서 동영상 손떨림 보정 장치를 제공한다. 상기 동영상 손떨림 보정 장치는, 제 1 프레임의 입력 영상에서 적어도 하나의 기준 매크로블록을 선택하고, 제 2 프레임의 입력 영상에서 상기 적어도 하나의 기준 매크로블록에 대응하는 적어도 하나의 탐색 영역을 선택하는 선택부와; 상기 제 1 프레임의 기준 매크로블록을 상기 제 2 프레임의 탐색 영역에 포함된 각각의 탐색 블록들에 대응시켜 통계적 연산을 수행하는 연산부; 및 상기 통계적 연산의 결과 값을 이용하여 상기 제 2 프레임의 출력 영상을 보정하기 위한 움직임 벡터를 산출하는 벡터 산출부를 포함한다.In order to solve this technical problem, the present invention provides a video image stabilization apparatus in one aspect. The video image stabilizer selects at least one reference macroblock from an input image of a first frame and selects at least one search region corresponding to the at least one reference macroblock from an input image of a second frame. Wealth; An operation unit configured to perform a statistical operation by mapping the reference macroblock of the first frame to each of the search blocks included in the search region of the second frame; And a vector calculator configured to calculate a motion vector for correcting the output image of the second frame by using the result of the statistical operation.
상기 적어도 하나의 탐색 영역은 상기 제 2 프레임의 입력 영상의 중심에서 특정 거리만큼 떨어진 서로 이격된 다수 개의 영역일 수 있다. 상기 선택부는 각 프레임의 기준 매크로블록 및 탐색 영역의 정보들을 메모리에 저장할 수 있다. 예를 들면, 상기 선택부는 상기 제 1 프레임의 기준 매크로블록의 픽셀 데이터 및 상기 제 2 프레임의 탐색 영역의 픽셀 데이터 등을 메모리에 저장할 수 있다.The at least one search area may be a plurality of areas spaced apart from each other by a specific distance from the center of the input image of the second frame. The selector may store information of a reference macroblock and a search region of each frame in a memory. For example, the selector may store pixel data of a reference macroblock of the first frame and pixel data of a search area of the second frame in a memory.
상기 연산부는, 상기 메모리에 저장된 상기 제 1 프레임의 기준 매크로블록의 픽셀 데이터를 로딩하는 제 1 입력부와; 상기 메모리에 저장된 상기 제 2 프레임의 탐색 영역의 픽셀 데이터를 로딩하는 제 2 입력부; 및 상기 제 1 프레임의 기준 매크로블록을 상기 제 2 프레임의 탐색 영역 내에 포함된 각각의 탐색 블록에 대응되도록 수직 또는 수평 방향으로 이동시키면서 상기 통계적 연산을 수행하여 연산 매트릭스를 산출하고, 상기 산출되는 연산 매트릭스를 상기 메모리에 저장하는 통계 연산부를 포함할 수 있다.The operation unit may include a first input unit which loads pixel data of a reference macroblock of the first frame stored in the memory; A second input unit which loads pixel data of a search area of the second frame stored in the memory; And calculating the operation matrix by performing the statistical operation while moving the reference macroblock of the first frame in a vertical or horizontal direction so as to correspond to each search block included in the search region of the second frame. It may include a statistical operation unit for storing a matrix in the memory.
상기 동영상 손떨림 보정 장치는, 상기 제 1 프레임의 특정 매크로블록의 픽셀 데이터와, 상기 제 1 프레임의 특정 매크로블록과 동일한 좌표에 위치하는 상기 제 2 프레임의 매크로블록의 픽셀 데이터를 연산하고, 상기 연산된 정보를 근거로 하여 상기 연산부에 의한 상기 통계적 연산을 제어하는 제어부를 더 포함할 수도 있다.The video image stabilizer is configured to calculate pixel data of a specific macroblock of the first frame and pixel data of a macroblock of the second frame located at the same coordinates as a specific macroblock of the first frame and perform the operation. The controller may further include a controller configured to control the statistical operation by the calculator based on the received information.
상기 제어부는, 상기 제 1 프레임의 기준 매크로블록의 픽셀 데이터와 상기 제 2 프레임의 기준 매크로블록의 픽셀 데이터를 로딩하고, 상기 제 1 프레임의 기준 매크로블록과 상기 제 2 프레임의 기준 매크로블록 간에 픽셀 값의 차이 값을 각각의 픽셀 별로 산출하는 차연산부와; 상기 차이 값이 미리 설정된 기준 값 이상인 픽셀의 위치 정보를 산출하는 위치 정보 산출부; 및 상기 제 1 프레임의 기준 매크로블록의 픽셀들 중 상기 산출된 위치 정보에 해당하는 픽셀만을 대상으로 상기 통계적 연산이 수행되도록 상기 연산부를 제어하는 대상 제어부를 포함할 수 있다.The controller is configured to load pixel data of the reference macroblock of the first frame and pixel data of the reference macroblock of the second frame, and to convert the pixel between the reference macroblock of the first frame and the reference macroblock of the second frame. A difference calculation unit for calculating a difference value of each pixel for each pixel; A position information calculator for calculating position information of a pixel whose difference value is equal to or greater than a preset reference value; And a target controller configured to control the calculator to perform the statistical operation on only pixels corresponding to the calculated position information among pixels of the reference macroblock of the first frame.
한편, 상기 제어부는, 상기 제 1 프레임의 기준 매크로블록의 픽셀 데이터와 상기 제 2 프레임의 기준 매크로블록의 픽셀 데이터를 로딩하고, 상기 제 1 프레임의 기준 매크로블록과 상기 제 2 프레임의 기준 매크로블록 간에 픽셀 값의 차이 값을 각각의 픽셀 별로 산출하는 차연산부와; 상기 차이 값이 미리 설정된 제 1 기준 값 이상인 픽셀의 위치 정보를 산출하는 위치 정보 산출부와; 상기 차이 값이 미리 설정된 제 1 기준 값 이상인 픽셀이 기준 매크로블록에서 차지하는 비율을 산출하는 비율 산출부; 및 상기 산출된 비율이 미리 설정된 제 2 기준 값 미만일 경우, 상기 제 1 프레임의 기준 매크로블록의 픽셀들 중 상기 위치 정보에 해당하는 픽셀만을 대상으로 상기 통계적 연산이 수행되도록 상기 연산부를 제어하고, 상기 비율이 미리 설정된 제 2 기준 값 이상일 경우 상기 제 1 프레임의 기준 매크로블록의 모든 픽셀들을 대상으로 상기 통계적 연산이 수행되도록 상기 연산부를 제어하는 제어부를 포함할 수도 있다.The control unit may load pixel data of the reference macroblock of the first frame and pixel data of the reference macroblock of the second frame, and load the reference macroblock of the first frame and the reference macroblock of the second frame. A difference calculation unit that calculates a difference value of the pixel value for each pixel; A position information calculator for calculating position information of pixels whose difference value is equal to or greater than a first reference value; A ratio calculator configured to calculate a ratio of a pixel in which the difference value is equal to or greater than a first reference value preset in the reference macroblock; And when the calculated ratio is less than a second preset reference value, controlling the calculation unit to perform the statistical operation on only pixels corresponding to the position information among pixels of the reference macroblock of the first frame, The controller may include a controller configured to control the calculator to perform the statistical operation on all pixels of the reference macroblock of the first frame when the ratio is equal to or greater than a preset second reference value.
상기 동영상 손떨림 보정 장치는, 외부로부터 제 1 프레임 및 제 2 프레임의 영상을 각각 수신하여 다운사이징하고, 상기 다운사이징된 영상의 각 픽셀 값을 그레이 레벨 값으로 변환하여 상기 제 1 프레임의 입력 영상 및 상기 제 2 프레임의 입력 영상을 각각 생성하는 입력 처리부를 더 포함할 수도 있다.The video image stabilization apparatus receives downsized images of the first frame and the second frame from the outside, and converts each pixel value of the downsized image into a gray level value to input an image of the first frame and The apparatus may further include an input processor configured to generate input images of the second frame, respectively.
상기 입력 처리부는, 영상 촬영부로부터 상기 제 1 프레임 및 상기 제 2 프레임의 영상을 각각 수신하는 영상 수신부와; 상기 수신된 제 1 프레임 및 제 2 프레임의 영상의 해상도를 낮추는 입력 스케일러부와; 상기 입력 스케일러부에 의하여 처리된 영상의 각 픽셀 값을 그레이 레벨 값으로 변환하는 정보 변환부를 포 함할 수 있다.The input processor may include an image receiver configured to receive images of the first frame and the second frame from the image photographing unit, respectively; An input scaler for lowering the resolution of the received image of the first frame and the second frame; It may include an information converter for converting each pixel value of the image processed by the input scaler to a gray level value.
상기 동영상 손떨림 보정 장치는, 외부로부터 제 1 프레임 및 제 2 프레임의 영상을 각각 수신하고, 그 사이즈를 출력 영상의 사이즈로 다운 사이징하는 출력 스케일러부를 더 포함할 수도 있다. 또한 상기 동영상 손떨림 보정 장치는, 상기 산출되는 움직임 벡터를 이용하여 상기 출력 스케일러부에 의하여 다운 사이징되는 상기 제 2 프레임의 출력 영상을 보정하는 보정부를 더 포함할 수도 있다.The video image stabilization apparatus may further include an output scaler unit which receives images of the first frame and the second frame from the outside, and downsizes the size to the size of the output image. The video image stabilization apparatus may further include a correcting unit configured to correct an output image of the second frame downsized by the output scaler using the calculated motion vector.
상기 벡터 산출부는 상기 통계적 연산을 통하여 산출되는 연산 매트릭스에서 최소 값을 가지는 포인트를 검출하여 상기 제 2 프레임의 탐색 영역에 포함된 탐색 블록 중 정합 블록의 위치 정보를 산출하고, 상기 산출된 정합 블록의 위치 정보를 기초로 하여 상기 움직임 벡터를 산출할 수 있다.The vector calculating unit detects a point having a minimum value in the calculation matrix calculated through the statistical operation, calculates position information of the matching block among the search blocks included in the search region of the second frame, and calculates the position of the matched block. The motion vector may be calculated based on the location information.
상기 벡터 산출부는 상기 연산 매트릭스에서 상기 최소 값을 가지는 포인트를 검출하기 위하여 상기 연산 매트릭스의 중심 포인트로부터 나선형의 방향으로 포인트의 값을 탐색하는 나선형 탐색(Spiral Search) 방식을 사용할 수도 있다.The vector calculator may use a spiral search method for searching for a point value in a spiral direction from a center point of the arithmetic matrix to detect a point having the minimum value in the arithmetic matrix.
한편, 상술한 본 발명의 기술적 과제를 해결하기 위하여 본 발명은 다른 측면에서 동영상 손떨림 보정 방법을 제공한다. 상기 동영상 손떨림 보정 방법은, 제 1 프레임의 입력 영상에서 적어도 하나의 기준 매크로블록을 선택하는 단계와; 제 2 프레임의 입력 영상에서 상기 적어도 하나의 기준 매크로블록에 대응하는 적어도 하나의 탐색 영역을 선택하는 단계와; 상기 제 1 프레임의 기준 매크로블록을 상기 제 2 프레임의 탐색 영역에 포함된 각각의 탐색 블록들에 대응시켜 통계적 연산을 수행하는 단계; 및 상기 통계적 연산의 결과 값을 이용하여, 상기 제 2 프레임의 출력 영상을 보정하기 위한 움직임 벡터를 산출하는 단계를 포함할 수 있다.On the other hand, in order to solve the above technical problem of the present invention provides a video stabilization method in another aspect. The image stabilization method may further include selecting at least one reference macroblock from an input image of a first frame; Selecting at least one search region corresponding to the at least one reference macroblock from an input image of a second frame; Performing a statistical operation by mapping the reference macroblock of the first frame to each of the search blocks included in the search region of the second frame; And calculating a motion vector for correcting the output image of the second frame by using the result of the statistical operation.
상기 동영상 손떨림 보정 방법은, 상기 제 1 프레임의 기준 매크로블록의 픽셀 데이터를 로딩하는 단계와; 상기 제 1 프레임의 기준 매크로블록과 동일한 좌표에 위치하는 상기 제 2 프레임의 기준 매크로블록을 로딩하는 단계와; 상기 로딩된 제 1 프레임의 기준 매크로블록 및 상기 로딩된 제 2 프레임의 기준 매크로블록의 픽셀 데이터를 연산하는 단계; 및 상기 연산된 정보를 근거로 하여 상기 통계적 연산을 제어하는 단계를 더 포함할 수도 있다.The video stabilization method may further include loading pixel data of a reference macroblock of the first frame; Loading a reference macroblock of the second frame located at the same coordinates as the reference macroblock of the first frame; Computing pixel data of the reference macroblock of the loaded first frame and the reference macroblock of the loaded second frame; And controlling the statistical operation based on the calculated information.
상기 연산하는 단계는, 상기 제 1 프레임의 기준 매크로블록과 상기 제 2 프레임의 기준 매크로블록 간에 픽셀 값의 차이 값을 각각의 픽셀 별로 산출하는 단계와; 상기 산출된 차이 값을 제 1 기준 값과 비교하는 단계; 및 상기 산출된 차이 값이 제 1 기준 값 이상인 픽셀의 위치 정보를 산출하는 단계를 포함할 수 있다. 이 경우, 상기 통계적 연산을 제어하는 단계는, 상기 제 1 프레임의 기준 매크로블록의 픽셀들 중 상기 위치 정보에 해당하는 픽셀만을 대상으로 상기 통계적 연산이 수행되도록 제어하는 단계를 포함할 수도 있다.The calculating may include calculating a difference value of a pixel value for each pixel between the reference macroblock of the first frame and the reference macroblock of the second frame; Comparing the calculated difference value with a first reference value; And calculating position information of a pixel whose calculated difference value is greater than or equal to a first reference value. In this case, the controlling of the statistical operation may include controlling the statistical operation to be performed only on a pixel corresponding to the position information among pixels of the reference macroblock of the first frame.
한편, 상기 연산하는 단계는, 상기 산출된 차이 값이 제 1 기준 값 이상인 픽셀의 기준 매크로블록에서 차지하는 비율을 산출하는 단계와; 상기 산출된 비율을 제 2 기준 값과 비교하는 단계를 더 포함할 수도 있다. 이 경우, 상기 통계적 연산을 제어하는 단계는, 상기 산출된 비율을 상기 제 2 기준 값과 비교한 결과 정보 및 상기 산출된 위치 정보 중 적어도 어느 하나를 사용하여 상기 통계적 연산을 제어하는 단계를 포함할 수도 있다.The calculating may include calculating a ratio of the calculated difference value to a reference macroblock of a pixel having a first reference value or more; The method may further include comparing the calculated ratio with a second reference value. In this case, the controlling of the statistical operation may include controlling the statistical operation using at least one of the result information of comparing the calculated ratio with the second reference value and the calculated position information. It may be.
이상 설명한 바와 같이, 본 발명에 따른 동영상 손떨림 보정 기술에 따르면 손떨림에 의한 영상의 왜곡은 효과적으로 보정하면서도 연산 량은 대폭 줄일 수 있는 장점이 있다.As described above, according to the video stabilization technology according to the present invention has an advantage that the amount of calculation can be significantly reduced while effectively correcting the distortion of the image due to the hand shake.
이하, 본 발명이 속하는 분야에 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있도록 본 발명의 바람직한 실시예를 첨부된 도면을 참조하여 상세히 설명한다. 이하에 설명할 본 발명의 바람직한 실시예에서는 내용의 명료성을 위하여 특정한 기술 용어를 사용한다. 하지만 본 발명은 그 선택된 특정 용어에 한정되지는 않으며, 각각의 특정 용어가 유사한 목적을 달성하기 위하여 유사한 방식으로 동작하는 모든 기술 동의어를 포함함을 미리 밝혀둔다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art may easily implement the present invention. In the preferred embodiment of the present invention described below, specific technical terms are used for clarity of content. However, the invention is not limited to the particular term selected, and it is to be understood that each specific term includes all technical synonyms that operate in a similar manner to achieve a similar purpose.
<제 1 실시예><First Embodiment>
도 1은 본 발명의 바람직한 제 1 실시예에 따른 동영상 손떨림 보정 장치를 구비하는 디지털 영상 촬영 장치의 구성을 도시하는 블록도이다.1 is a block diagram showing the configuration of a digital image photographing apparatus including a video image stabilizer according to a first embodiment of the present invention.
도 1에 도시된 바와 같이, 본 발명의 바람직한 제 1 실시예에 따른 동영상 손떨림 보정 장치(100)는 디지털 영상 촬영 장치(1)에 구비될 수 있다. 상기 디지털 영상 촬영 장치(1)는 예컨대, 디지털 캠코더, 영상 촬영 기능을 구비하는 디지 털 카메라 또는 모바일 단말기 등일 수 있다.As illustrated in FIG. 1, the
동영상 손떨림 보정 장치(100)는 디지털 영상 촬영 장치(1)의 영상 촬영부(10), 메모리(20) 및 디스플레이부(30) 등과 연동할 수 있다. 상기 영상 촬영부(10)는 영상을 취득하여 전기적인 신호로 변환할 수 있는 장치로서, 예컨대 CMOS 모듈, 광학 촬상 센서 등일 수 있다. 상기 메모리(20)는 디지털 데이터를 저장할 수 있는 다양한 저장 수단을 의미할 수 있다. 또한 상기 디스플레이부(30)는 영상을 화면 상에 디스플레이할 수 있는 장치로서, 예컨대 LCD 패널 등을 의미할 수 있다.The
상기 동영상 손떨림 보정 장치(100)는 영상 촬영부(10)로부터 프레임 단위의 영상(Image), 즉 프레임 영상을 연속적으로 수신하고, 수신된 프레임 영상에서 손떨림 등에 의하여 발생하는 왜곡을 제거하기 위하여 상기 수신된 프레임 영상을 개선된 효율적인 프로세스를 사용하여 보정한 뒤 보정된 프레임 영상을 디스플레이부(30)로 전송할 수 있다.The video
도 2는 상기 언급된 손떨림 왜곡의 개념을 예시적으로 설명하기 위한 예시도이고, 도 3은 이러한 손떨림에 의한 왜곡을 보정할 수 있는 움직임 추정을 설명하기 위한 그래프이다.FIG. 2 is an exemplary diagram for exemplarily explaining the above-described concept of hand shake distortion, and FIG. 3 is a graph for explaining motion estimation capable of correcting the distortion caused by hand shake.
도 2에 도시된 바와 같이, 이동 객체의 실제 움직임은 영상 촬영부(10)를 구비하는 디지털 영상 촬영 장치(1)에 의하여 촬영된 후, 디스플레이부(30)를 통하여 사용자에게 보여지게 된다. 이때, 디스플레이부(30)를 통하여 디스플레이되는 영상은 실제 이동 객체의 움직임뿐만 아니라 촬영자의 손떨림 등에 의하여 야기되는 영 상 촬영부(10)의 흔들림이 반영되게 된다.As shown in FIG. 2, the actual movement of the moving object is captured by the digital
따라서 도 3에 도시된 바와 같이, 디지털 영상 촬영 장치(1)는 동영상 손떨림 보정 장치(100)를 사용하여 상기 실제 움직이는 이동 객체 등이 포함된 영상에 움직임 추정 등을 사용한 보정을 반영함으로써 양질의 영상을 디스플레이할 수 있다.Accordingly, as shown in FIG. 3, the digital
도 4는 도 1에 도시되어 있는 동영상 손떨림 보정 장치(100)의 상세 구성을 도시하는 블록도로서, 본 발명의 바람직한 제 1 실시예에 따른 동영상 손떨림 보정 장치(100)의 구성을 보여주고 있다.FIG. 4 is a block diagram showing the detailed configuration of the
도 4에 도시된 바와 같이, 동영상 손떨림 보정 장치(100)는 입력 처리부(110), 출력 스케일러부(120), 선택부(130), 연산부(140), 벡터 산출부(150) 및 보정부(160) 등을 포함할 수 있다. 상기 구성 요소들은 각각 고유한 기능을 수행할 수 있으며 해당 동작을 위하여 메모리(20)와 연동할 수 있다.As shown in FIG. 4, the
이하에서는, 상기 동영상 손떨림 보정 장치(100)의 구성 요소들을 각각 상세하게 설명하기로 한다.Hereinafter, the components of the
1. 입력 처리부(110)1.
입력 처리부(110)는 영상 촬영부(10)로부터 순차적으로 수신되는 프레임 영상을 처리하여 각 프레임의 입력 영상을 생성하고, 생성된 각 프레임의 입력 영상을 선택부(130)로 전송하는 기능을 수행할 수 있다. 예를 들면, 입력 처리부(110)는 수신되는 프레임 영상의 해상도를 낮추어 영상의 스케일을 축소하고, 또한 축소 영상의 각 픽셀 값을 그레이 레벨 값으로 변환함으로써 선택부(130)로 입력하기 위 한 입력 영상을 생성할 수 있다.The
도 5는 도 4에 도시되어 있는 입력 처리부(110)의 구성을 나타내는 블록도이다.FIG. 5 is a block diagram showing the configuration of the
도 5에 도시된 바와 같이, 입력 처리부(110)는 영상 수신부(112), 입력 스케일러부(114) 및 정보 변환부(116) 등을 포함할 수 있다.As illustrated in FIG. 5, the
상기 영상 수신부(112)는 영상 촬영부(10)로부터 프레임 영상을 수신할 수 있다. 예를 들면, 영상 수신부(112)는 영상 촬영부(10)로부터 촬영되는 동영상의 첫 번째 프레임의 영상부터 수신하기 시작하여 제 N-1(N은 정수)번째 프레임(예컨대, 이하에서는 이해의 편의를 위하여 이전 프레임이라 칭함)의 영상, 제 N번째 프레임(예컨대 이하에서는 이해의 편의를 위하여 현재 프레임이라 칭함)의 영상 등을 연속적으로 수신할 수 있다. 이때 상기 수신되는 프레임 영상은, 예컨대 1024 x 768 개의 픽셀로 구성되는 고 해상도의 영상일 수 있다. 각 픽셀의 픽셀 값은 YCbCr 데이터를 포함할 수 있다.The
상기 입력 스케일러부(114)는 영상 수신부(112)에 의하여 수신된 프레임 영상을 다운사이징할 수 있다. 예를 들면, 입력 스케일러부(114)는 영상 수신부(112)에 의하여 수신된 각 프레임의 영상들, 예컨대 이전 프레임의 영상, 현재 프레임의 영상 등의 해상도를 낮추어 512 x 384 개의 픽셀을 갖는 영상으로 다운사이징할 수 있다.The
상기 프레임 영상의 사이즈를 축소하는 비율은 실시 형태에 따라 다양한 응용 예가 가능하다. 바람직하기로는, 움직임 벡터의 산출 및 이를 통한 보정 효과의 저하는 방지하면서도 연산 효율은 높이기 위하여, 수신된 프레임 영상의 50% 내지 70% 정도로 사이즈를 축소하는 것이 바람직하다.The ratio of reducing the size of the frame image may be various application examples according to the embodiment. Preferably, it is preferable to reduce the size to about 50% to 70% of the received frame image in order to prevent the calculation of the motion vector and the reduction of the correction effect therefrom while increasing the computational efficiency.
정보 변환부(116)는 입력 스케일러부(114)에 의하여 다운사이징된 영상의 각 픽셀 값을 그레이 레벨 값으로 변환하는 기능을 수행할 수 있다. 상기 영상 수신부(112)에 의하여 수신되는 프레임 영상의 각 픽셀은 명도, 채도, 색상 등의 정보를 가지는데, 움직임 벡터의 산출 시에는 명도 정보만으로도 충분히 움직임 벡터를 산출할 수 있다. 따라서, 정보 변환부(112)는 각 픽셀의 값을 그레이 레벨 값으로 변환한다.The
영상 촬영부(10)에 의하여 촬영된 고 해상도의 프레임 영상을 연산할 경우 연산의 대상이 되는 픽셀의 수가 너무 많으며 및 각 픽셀의 정보량도 너무 크므로, 메모리(20)의 사용이 많아지며 연산효율도 낮아지게 된다. 그러나, 상기 입력 처리부(110)에 의해 처리된 입력 영상을 이용하여 연산을 수행할 경우 픽셀 수도 적어지며 각 픽셀의 정보량도 작아져서 메모리(20)의 사용을 줄일 수 있으며 연산효율도 높일 수 있게 된다. 실제로, 원 영상을 사용하여 산출한 움직임 벡터를 이용하여 출력 영상을 보정한 경우와, 상기 처리된 입력 영상을 사용하여 산출되는 움직임 벡터를 이용하여 출력 영상을 보정한 경우의 차이를 실험적으로 비교한 결과 인간이 인지할 수 없을 만큼 거의 차이가 나지 않았다.When calculating the high resolution frame image photographed by the
2. 출력 스케일러부(120)2.
출력 스케일러부(120)는 영상 촬영부(10)로부터 순차적으로 수신되는 프레임 영상을 정해진 출력 영상의 사이즈에 부합되도록 다운사이징하는 기능을 수행할 수 있다. 예를 들면, 출력 스케일러부(120)는 영상 촬영부(10)로부터 수신된 이전 프레임의 영상, 현재 프레임의 영상 등을 디스플레이부(30)에서 요구하는 사이즈로 다운사이징할 수 있다.The
바람직하기로는 상기 출력 영상의 사이즈는 상기 입력 영상의 사이즈보다 작을 수 있다. 예를 들면, 상기 입력 스케일러부(114)에 의해 다운 사이징된 입력 영상이 예컨대 512 x 384 영상이라면, 출력 스케일러부(120)에 의하여 다운사이징되는 출력 영상은 예컨대 320 x 240 사이즈를 가질 수 있다.Preferably, the size of the output image may be smaller than the size of the input image. For example, if the input image downsized by the
한편, 상기 출력 스케일러부(120)는 상기 출력 영상의 사이즈를 설정할 수 있는 사용자 인터페이스를 제공하고, 사용자에 의하여 설정되는 사이즈에 따라 출력 영상을 리사이징할 수도 있다.The
3. 선택부(130)3.
선택부(130)는 입력 처리부(110)로부터 수신되는 각 프레임의 입력 영상에서 적어도 하나의 기준 매크로블록 및 각 기준 매크로블록에 대응되는 탐색 영역을 선택하는 기능을 수행할 수 있다. 각 프레임의 기준 매크로블록은 해당 프레임의 탐색 영역 내의 특정 매크로블록일 수 있다.The
영상 보정 시 손떨림에 의한 영상의 움직임은 촬영되는 피사체가 이동하는 경우와 구분되어야 한다. 따라서 정밀하고 정확한 보정 영상을 생성하기 위해서는 피사체의 이동을 제외한 손떨림에 의한 왜곡만을 보정하여야 한다. 통상, 동영상 촬영 시에는 피사체를 영상의 중심부분에 포커싱하는 경우가 대부분이므로, 정확한 보정을 위해서는 피사체가 존재할 확률이 희박한 배경 부분을 위주로 움직임 벡터 를 산출하는 것이 바람직하다.The motion of the image due to camera shake during image correction should be distinguished from the case where the photographed subject moves. Therefore, in order to generate an accurate and accurate correction image, only distortion caused by hand movement is corrected without moving the subject. In general, when capturing a moving image, the subject is mostly focused on the center portion of the image. Therefore, for accurate correction, it is preferable to calculate a motion vector based on a background part where the subject is less likely to exist.
따라서, 상기 선택부(130)는 각 프레임의 입력 영상의 중심에서 특정 거리만큼 떨어진 서로 이격된 다수 개의 영역을 움직임 벡터를 산출하기 위한 탐색 영역으로 선택할 수 있다.Accordingly, the
상기 탐색 영역 및 기준 매크로블록의 위치는 사용자에 의하여 설정될 수도 있다. 예를 들면, 선택부(130)는 탐색 영역 또는 기준 매크로블록의 좌표를 설정할 수 있는 사용자 인터페이스를 제공하고, 설정된 좌표에 따라 탐색 영역 및 기준 매크로블록을 선택할 수 있다. 한편 상기 탐색 영역 및 기준 매크로블록의 위치는 동영상 손떨림 보정 장치(100)가 구비된 디지털 영상 촬영 장치(1)의 하드웨어 리소스 또는 연산 처리 능력 등에 따라 미리 결정될 수도 있다.The location of the search area and the reference macroblock may be set by the user. For example, the
도 6은 선택부(130)에 의하여 선택되는 탐색 영역 및 기준 매크로블록을 설명하기 위한 예시도이다.6 is an exemplary diagram for describing a search region and a reference macroblock selected by the
도 6에 도시된 바와 같이, 선택부(130)는 각 프레임의 입력 영상(IA)의 중심에서 특정 거리만큼 떨어진 서로 이격된 4개의 탐색 영역, 예컨대 탐색 영역 SE1, SE2, SE3, SE4을 선택할 수 있다. 각각의 탐색 영역은 예컨대 144 x 120 사이즈의 영역일 수 있다.As illustrated in FIG. 6, the
상기 선택부(130)는 상기 탐색 영역들이 각 프레임의 출력 영상(OA)의 사이즈 내에 포함되도록 선택할 수 있다. 예컨대 입력 영상(IA)이 512 x 384 사이즈의 영상이고 출력 영상(OA)이 360 x 240 사이즈일 경우, 상기 360 x 240 내에 탐색 영역들, 예컨대 탐색 영역 SE1, SE2, SE3, SE4이 포함되도록 선택하는 것이 바람직하 다.The
선택부(130)는 각각의 탐색 영역 내에서 특정 좌표의 매크로블록들, 예컨대 매크로블록 D1, D2, D3, D4을 기준 매크로블록으로서 선택할 수 있다. 도 6에 도시된 예의 경우 상기 기준 매크로블록을 예컨대 96 x 72 사이즈의 블록으로 설정하였다.The
이와 같이, 선택부(130)는 이전 프레임의 입력 영상이 수신되면 상기 이전 프레임의 입력 영상에서 탐색 영역과 기준 매크로블록을 선택하여 메모리(20)에 각각 저장하고, 이어서 현재 프레임의 입력 영상이 수신되면 상기 현재 프레임의 입력 영상에서 탐색 영역과 기준 매크로블록을 선택하여 메모리(20)에 각각 저장할 수 있다. 이때, 상기 메모리(20)는 다수 개의 라인 메모리를 포함할 수 있다. 예를 들면 상기 탐색 영역, 기준 매크로블록 등의 픽셀 데이터는 각각의 라인 메모리에 저장될 수 있다.As such, when the input image of the previous frame is received, the
한편, 본 발명에서는 현재 프레임의 움직임 벡터를 산출하기 위하여, 이전 프레임의 기준 매크로블록과 현재 프레임의 탐색 영역을 사용한다. 이는 이하에서 언급할 연산부(140) 및 벡터 산출부(150)의 구성을 통하여 설명된다.Meanwhile, in the present invention, the reference macroblock of the previous frame and the search region of the current frame are used to calculate the motion vector of the current frame. This is described through the configuration of the
4. 연산부(140)4. The calculating
연산부(140)는, 현재 프레임의 보정을 위한 움직임 벡터를 산출하는데 사용할 정보를 산출하기 위하여, 이전 프레임의 입력 영상에서 선택된 기준 매크로블록(즉 이전 프레임의 기준 매크로블록) 및 현재 프레임의 입력 영상에서 선택된 탐색 영역(즉 현재 프레임의 탐색 영역)을 이용하여 통계적 연산을 수행하고, 연산 매트릭스를 산출한다. 예를 들면, 연산부(140)는 이전 프레임의 기준 매크로블록을 현재 프레임의 탐색 영역에 포함된 각각의 탐색 블록에 대응시키면서 통계적 연산을 수행할 수 있다.In order to calculate information to be used to calculate a motion vector for correcting the current frame, the
상기 통계적 연산은 연산 매트릭스를 산출하기 위한 다양한 연산 기법들, 예컨대 SAD(sum of absolute difference), SSD(sum of squared difference), MSE(mean squared error), MAE(mean absolute error) 또는 MAD(mean absolute distortion) 등일 수 있다. 상기 통계적 연산은 동영상 손떨림 보정 장치(100)가 구비된 디지털 영상 촬영 장치(1)의 장치 사양을 고려하여 선택할 수 있으며, 바람직하기로는 합과 차의 연산만으로 구성되어 빠른 연산 처리가 가능한 SAD 연산을 사용할 수 있다.The statistical operation may be performed using a variety of calculation techniques, such as sum of absolute difference (SAD), sum of squared difference (SSD), mean squared error (MSE), mean absolute error (MAE) or mean absolute (MAD) distortion). The statistical calculation may be selected in consideration of the device specification of the digital
도 7은 도 4에 도시되어 있는 연산부(140)의 구성을 도시하는 블록도이다.FIG. 7 is a block diagram showing the configuration of the calculating
도 7에 도시된 바와 같이, 연산부(140)는 제 1 입력부(142), 제 2 입력부(144) 및 통계 연산부(146) 등을 포함할 수 있다.As illustrated in FIG. 7, the
현재 프레임의 보정을 위한 프로시저에서, 제 1 입력부(142)는 메모리(20)에 저장되어 있는 이전 프레임의 기준 매크로블록의 픽셀 데이터를 메모리(20)로부터 로딩한다. 또한 제 2 입력부(144)는 메모리(20)에 저장되어 있는 현재 프레임의 탐색 영역의 픽셀 데이터를 메모리(20)로부터 로딩한다.In the procedure for correcting the current frame, the
통계 연산부(146)는 상기 이전 프레임의 기준 매크로블록을 상기 현재 프레임의 탐색 영역에 포함된 각각의 탐색 블록에 대응되도록 수직 또는 수평 방향으로 이동시키면서 통계적 연산(예컨대, SAD 연산 등)을 수행하여 연산 매트릭스(예컨대 SAD 연산 매트릭스 등)를 산출할 수 있다.The
이하에서는 이러한 연산부(140)의 동작을 좀더 구체적으로 설명하기로 한다. 먼저 이해의 편의를 위하여 기준 매크로블록은 5 x 5 사이즈를 갖는 매크로블록으로 가정하고, 탐색 영역은 9 x 9 사이즈를 갖는 영역으로 가정한다. 그러나 이는 한정된 사항은 아니며 상기 매크로블록의 사이즈는 96 x 72 등과 같이 실시 형태에 따라 다양하게 선택할 수 있으며, 마찬가지로 탐색 영역의 사이즈도 144 x 120 등과 같이 실시 형태에 따라 다양하게 선택할 수 있음은 물론이다.Hereinafter, the operation of the
또한, 기준 매크로블록 및 탐색 영역이 다수 개 선택되더라도 각각의 통계적 연산은 동일하므로 하나의 기준 매크로블록 및 탐색 영역을 이용한 통계적 연산을 예를 들어 설명하기로 한다.In addition, even if a plurality of reference macroblocks and a search region are selected, since each statistical operation is the same, a statistical operation using one reference macroblock and a search region will be described as an example.
표 1은 이전 프레임의 기준 매크로블록으로서, 5 x 5 사이즈를 갖는 매크로블록을 나타내고 있다. m11, m12, …. m55은 기준 매크로블록 내의 픽셀들을 나타낸다.Table 1 shows a macroblock having a size of 5 × 5 as a reference macroblock of a previous frame. m11, m12,... . m55 represents pixels in a reference macroblock.
표 2는 현재 프레임의 탐색 영역으로서, 9 x 9 사이즈를 갖는 탐색 영역을 나타내고 있다. s11, s12, …, s99는 탐색 영역 내의 픽셀들을 나타낸다.Table 2 shows a search area having a size of 9 × 9 as a search area of the current frame. s11, s12,... s99 represents pixels in the search area.
표 3은 표 1에 도시된 이전 프레임의 기준 매크로블록과 표 2에 도시된 현재 프레임의 탐색 영역을 이용하여 통계적 연산을 수행하는 과정을 나타내고 있다.Table 3 shows a process of performing a statistical operation using the reference macroblock of the previous frame shown in Table 1 and the search region of the current frame shown in Table 2.
상기 표 3에 나타낸 바와 같이, 연산부(140)는 이전 프레임의 기준 매크로블록을 탐색 영역 내에서 수평 또는 수직으로 한 라인씩 이동시켜 상기 기준 매크로블록을 탐색 영역 내의 탐색 블록들에 각각 대응시켜 가면서 통계적 연산을 수행할 수 있다. 이때 상기 탐색 블록이란 탐색 영역 내에서 기준 매크로블록이 이동할 때 각각 대응되는 블록을 의미할 수 있다. 따라서 상기 탐색 블록은 기준 매크로블록과 동일한 크기를 갖는다.As shown in Table 3, the
상기 탐색 영역 내에서 상기 기준 매크로블록이 이동 가능한 범위는 수평 방향으로 5라인 수직방향으로 5 라인이므로, 상기 통계 연산부가 연산을 완료하면 아래의 표 4에 나타낸 바와 같은 25개의 연산 결과 값, 즉 5 x 5 개의 포인트를 갖는 연산 매트릭스를 산출할 수 있다. 이때 상기 연산 매트릭스의 각 포인트는 기준 매크로블록의 픽셀 데이터와 이에 대응되는 탐색 블록의 픽셀 데이터를 이용하여 통계적 연산, 예컨대 SAD 연산을 수행한 결과 값을 의미할 수 있다.The range in which the reference macroblock is movable within the search area is 5 lines in the horizontal direction and 5 lines in the vertical direction. Thus, when the statistical calculation unit completes the calculation, 25 calculation result values as shown in Table 4 below, namely 5 An arithmetic matrix with x 5 points can be calculated. In this case, each point of the operation matrix may mean a result of performing a statistical operation, for example, an SAD operation, using pixel data of a reference macroblock and pixel data of a search block corresponding thereto.
같은 개념으로, 만약 현재 프레임의 탐색 영역의 사이즈가 144 x 120이고, 이전 프레임의 기준 매크로블록의 크기가 96 x 72라고 가정하면, 상기 기준 매크로블록은 상기 탐색 영역 내에서 수평으로 49 라인, 수직으로 49 라인 이동할 수 있다. 따라서 연산부(140)에 의한 통계적 연산의 결과 값은 49 x 49 사이즈를 연산 매트릭스가 된다.Similarly, if the size of the search region of the current frame is 144 x 120 and the size of the reference macroblock of the previous frame is 96 x 72, the reference macroblock is 49 lines horizontally and vertically in the search region. Can move to 49 lines. Therefore, the result value of the statistical calculation by the
이러한 과정을 통하여 연산 매트릭스를 산출하면, 연산부(140)는 상기 연산 매트릭스를 메모리(20)에 저장할 수 있다. 예컨대 상기 연산 매트릭스는 라인 메모리에 저장될 수 있다.When the calculation matrix is calculated through this process, the
5. 벡터 산출부(150)5.
벡터 산출부(150)는 연산부(140)에 의하여 산출된 통계적 연산의 결과 값 즉, 연산 매트릭스를 이용하여 현재 프레임의 출력 영상을 보정하기 위한 움직임 벡터를 산출한다. 상기 움직임 벡터는 상기 탐색 영역에 포함된 탐색 블록들 중 상기 기준 매크로블록과 가장 유사한 정합 블록(Best Matched Block)과 상기 기준 매크로블록의 상대적인 벡터 값을 의미할 수 있다.The
상기 벡터 산출부(150)는 상기 연산부(140)에 의하여 메모리(20)에 저장된 연산 매트릭스를 상기 메모리(20)로부터 로딩하고, 상기 로딩된 연산 매트릭스에서 최소 값을 가지는 포인트를 검출할 수 있다. 그리고 상기 검출된 포인트에 대응하는 탐색 블록을 정합 블록으로 간주하고 그 정합 블록의 위치 정보를 산출한 뒤, 산출된 위치 정보를 기초로 하여 움직임 벡터를 산출할 수 있다.The
이러한 벡터 산출부(150)는 연산 매트릭스에서 최소 값을 가지는 포인트를 검출하기 위하여, 상기 연산 매트릭스의 중심 포인트로부터 나선형의 방향으로 포인트의 값을 탐색해가는 나선형 탐색(Spiral Search) 방식을 사용할 수 있다.The
도 8은 벡터 산출부(150)에 의해 수행되는 나선형 탐색의 수행 과정을 설명하기 위한 예시도이다.8 is an exemplary diagram for describing a process of performing a spiral search performed by the
도 8에 도시된 바와 같이, 벡터 산출부(150)는 연산 매트릭스에서 최소 값을 갖는 포인트를 찾기 위하여, 연산 매트릭스의 중심 포인트 C1으로부터 시계 방향(또는 반시계 방향)으로 회전하면서 그 회전 반경을 넓혀가는 경로를 통하여 탐색을 수행할 수 있다.As shown in FIG. 8, the
한편, 만약 최소 값을 갖는 포인트가 다수 개일 경우, 벡터 산출부(150)는 중심 포인트 C1로부터 가장 가까운 곳에 위치한 포인트를 검출하여 정합 블록의 위치 정보를 산출할 수 있다. 예를 들면, 도 8에 도시된 B1은 최소 값을 갖는 포인트를 나타내며, A1과 A2는 상기 B1과 동일한 값을 갖는 포인트를 나타낸다. 즉 B1, A1, A2가 동일한 최소 값을 갖는 것이다. 이 경우 벡터 산출부(150)는 중심 포인트인 C1에서 가장 가까운 B1을 검출할 수 있다.On the other hand, if there are a plurality of points having the minimum value, the
6. 보정부(160)6.
보정부(160)는 벡터 산출부(150)에 의하여 산출된 움직임 벡터를 사용하여 출력 스케일러부(120)에 의하여 다운 사이징된 현재 프레임의 출력 영상을 보정하는 기능을 수행할 수 있다.The
예를 들면, 상기 보정부(160)는 모션 벡터 적분법(MVI : Motion Vector Integration) 등을 사용하여 상기 움직임 벡터의 특성이 사용자의 의도된 움직임인지 아닌지를 판단하여 의도하지 않은 움직임, 즉 손떨림 등인 경우 출력 영상의 오프셋 등을 조정함으로써 상기 움직임 벡터를 출력 영상에 반영하여 보정을 수행할 수 있다.For example, the
이상 본 발명의 바람직한 제 1 실시예에 따른 동영상 손떨림 보정 장치(100)의 구성을 살펴보았다. 이하에서는 이러한 동영상 손떨림 보정 장치(100)를 이용하여 보정을 수행하는 과정을 방법론적으로 서술하기로 한다.The configuration of the
도 9는 본 발명의 바람직한 제 1 실시예에 따른 동영상 손떨림 보정 방법을 설명하기 위한 흐름도로서, 현재 프레임의 영상을 보정하기 위한 절차와 관련된 단계들을 중점적으로 보여주고 있다. 앞서도 언급했듯이 현재 프레임의 영상을 보정하기 위해서는 이전 프레임의 정보와 현재 프레임의 정보를 사용하게 된다.FIG. 9 is a flowchart illustrating a video stabilization method according to a first exemplary embodiment of the present invention, focusing on steps related to a procedure for correcting an image of a current frame. As mentioned above, to correct the image of the current frame, information of the previous frame and information of the current frame are used.
도 9에 도시된 바와 같이, 동영상 손떨림 보정 장치(100)는 먼저 영상 촬영부로부터 순차적으로 수신되는 프레임 영상을 처리하여 각 프레임의 입력 영상을 생성할 수 있다(단계:S1).As illustrated in FIG. 9, the video
예를 들면, 동영상 손떨림 보정 장치(100)는 영상 촬영부(10)로부터 이전 프레임의 영상이 수신되면, 수신되는 이전 프레임의 영상을 다운 사이징한 뒤 각 픽셀 값들을 그레이 레벨 정보로 변환할 수 있다. 이어서 영상 촬영부(10)로부터 현재 프레임의 영상이 수신되면, 동영상 손떨림 보정 장치(100)는 상기 수신되는 현재 프레임의 영상을 다운 사이징한 뒤 각 픽셀 값들을 그레이 레벨 정보로 변환할 수 있다. 즉 동영상 손떨림 보정 장치(100)는 상기 입력 처리 단계(단계:S1)를 통하여 고해상도의 칼라 영상을 다운사이징된 흑백 영상(즉, 각 프레임의 입력 영상)으로 변환시킬 수 있다.For example, when the
이어서, 동영상 손떨림 보정 장치(100)는 상기 처리된 각 프레임의 입력 영상에서 탐색 영역 및 기준 매크로블록을 선택한다(단계:S2).Subsequently, the
예를 들면, 동영상 손떨림 보정 장치(100)는 이전 프레임의 입력 영상에서 탐색 영역 및 기준 매크로블록을 선택하고 선택된 이전 프레임의 탐색 영역 및 기준 매크로블록의 픽셀 데이터를 각각 메모리(20)에 저장한다. 이어서 동영상 손떨림 보정 장치(100)는 현재 프레임의 입력 영상에서 탐색 영역 및 기준 매크로블록을 선택하고 선택된 현재 프레임의 탐색 영역 및 기준 매크로블록의 픽셀 데이터를 메모리(20)에 저장할 수 있다. 상기 저장되는 정보들 중 이전 프레임의 기준 매크로블록의 픽셀 데이터, 현재 프레임의 탐색 영역의 픽셀 데이터 등은 현재 프레임의 움직임 벡터를 산출하기 위한 정보로 사용되게 된다.For example, the
이어서, 동영상 손떨림 보정 장치(100)는 이전 프레임의 기준 매크로블록을 현재 프레임의 탐색 영역에 포함된 각 탐색 블록들에 대응시켜 통계적 연산을 수행할 수 있다(단계:S3).Subsequently, the video
예를 들면, 동영상 손떨림 보정 장치(100)는 메모리(20)로부터 이전 프레임의 기준 매크로블록의 픽셀 데이터를 로딩하고, 메모리로부터 현재 프레임의 탐색 블록의 픽셀 데이터를 로딩할 수 있다. 데이터가 로딩되면, 동영상 손떨림 보정 장치(100)는 상기 이전 프레임의 기준 매크로블록을 현재 프레임의 탐색 영역에 포함된 각각의 탐색 블록들에 대응시켜 가면서 통계적 연산을 수행하여 연산 매트릭스를 산출할 수 있다. 그리고, 상기 산출된 연산 매트릭스를 메모리에 저장할 수 있다.For example, the
다음으로, 동영상 손떨림 보정 장치(100)는 상기 통계적 연산의 결과 값을 이용하여 움직임 벡터를 산출할 수 있다(단계:S4). 예를 들면, 동영상 손떨림 보정 장치(100)는 메모리(20)에 저장되어 있는 상기 연산 매트릭스를 로딩하고, 상기 로딩된 연산 매트릭스에서 최소 값을 갖는 포인트를 검출할 수 있다. 그리고 상기 검출된 포인트에 대응하는 탐색 블록을 정합 블록으로 간주하고 그 정합 블록의 위치 정보를 산출한 뒤, 산출된 위치 정보를 이용하여 움직임 벡터를 산출할 수 있다.Next, the video
상기 동영상 손떨림 보정 장치(100)는, 앞서도 언급했듯이, 연산 매트릭스에서 최소 값을 가지는 포인트를 검출하기 위하여 나선형 탐색 방식을 사용할 수 있다. 또한 탐색 결과 최소 값을 가지는 포인트가 다수 개일 경우 그 다수 개의 포인트 중 중심 포인트로부터 가장 가까운 포인트를 검출할 수 있다.As described above, the
움직임 벡터가 산출되면, 동영상 손떨림 보정 장치(100)는 상기 산출된 움직임 벡터를 이용하여 출력 영상을 보정한다(단계:S5). 예를 들면, 동영상 손떨림 보정 장치는 상기 산출된 움직임 벡터의 특성이 사용자의 의도된 움직임인지 아닌지를 판단하고 의도하지 않은 움직임, 즉 손떨림 등일 경우 현재 프레임의 출력 영상의 오프셋 등을 조정하여 현재 프레임의 출력 영상을 보정할 수 있다. 이때, 상기 현재 프레임의 출력 영상은 동영상 손떨림 보정 장치(100)에 의하여 사전에 리사이징된 영상일 수도 있다.When the motion vector is calculated, the video
이상 본 발명의 바람직한 제 1 실시예에 따른 동영상 손떨림 보정 장치(100) 및 방법에 대하여 상세히 살펴보았다. 이하에서는 본 발명의 바람직한 다른 실시예로서 통계적 연산에서의 연산 량을 더욱 줄일 수 있는 제 2 실시예에 대하여 살펴보기로 한다.The
<제 2 실시예>≪ Embodiment 2 >
도 10은 본 발명의 바람직한 제 2 실시예에 따른 동영상 손떨림 보정 장치의 구성을 도시하는 블록도이다.10 is a block diagram showing the configuration of a video image stabilizer according to a second preferred embodiment of the present invention.
도 10에 도시된 바와 같이, 본 발명의 바람직한 제 2 실시예에 따른 손떨림 보정 장치(101)는 앞서 설명한 입력 처리부(110), 선택부(130), 연산부(140), 벡터 산출부(150), 출력 스케일러부(120), 보정부(160) 등과 함께, 제어부(180)를 더 구비할 수 있다.As shown in FIG. 10, the
상기 제어부(180)는 두 개의 프레임, 예컨대 이전 프레임과 현재 프레임 내에 각각 포함된 동일한 위치의 매크로블록 간에 픽셀 값의 차이 값을 픽셀 별로 산출하고, 산출된 결과를 근거로 하여 연산부에 의한 통계적 연산을 제어하는 기능을 수행할 수 있다.The
예를 들면, 제어부(180)는 이전 프레임의 탐색 영역 내의 특정 매크로블록과, 현재 프레임에서 상기 이전 프레임의 특정 매크로블록과 위치가 동일한 매크로블록 간에 픽셀 값의 차이 값을 픽셀 별로 산출하고, 상기 차이 값이 특정 기준 값 이상인 픽셀을 검출하고, 해당 검출된 픽셀에 대해서만 통계적 연산이 이루어지도록 연산부(140)를 제어하는 기능을 수행할 수 있다.For example, the
도 11은 이러한 제어부의 구성을 도시하는 블록도이고, 도 12는 도 11에 도시된 제어부(180)의 동작을 설명하기 위한 흐름도이다.FIG. 11 is a block diagram showing the configuration of such a controller, and FIG. 12 is a flowchart for explaining the operation of the
도 11에 도시된 바와 같이, 제어부(180)는 차연산부(182), 위치 정보 산출부(184) 및 대상 제어부(186)를 포함할 수 있다.As illustrated in FIG. 11, the
도 11 내지 도 12를 참조하면, 차연산부(182)는 이전 프레임의 탐색 영역 내의 특정 매크로블록의 픽셀 데이터와, 현재 프레임에서 상기 특정 매크로블록과 위치가 동일한 매크로블록의 픽셀 데이터를 각각 메모리로부터 로딩하여 각 픽셀 간에 픽셀 값의 차이 값을 산출할 수 있다(단계:S11).11 to 12, the
바람직하기로는, 상기 특정 매크로블록은 기준 매크로블록을 의미할 수 있다. 예컨대, 상기 차연산부(182)는 이전 프레임의 기준 매크로블록의 픽셀 데이터와 현재 프레임의 기준 매크로블록의 픽셀 데이터를 메모리로부터 로딩하고, 이전 프레임의 기준 매크로블록의 각 픽셀 값에서 해당 픽셀과 대응되는 현재 프레임의 픽셀 값을 차감한 뒤 절대값을 취한 값을 산출할 수 있다.Preferably, the specific macroblock may mean a reference macroblock. For example, the
본 제 2 실시예에서는 앞서 설명한 제 1 실시예에서와 같이 이전 프레임 및 현재 프레임의 입력 영상이 입력 처리부(110)에 의하여 흑백 영상으로 변환하였다고 가정하고, 각각의 픽셀 값은 그레이 레벨 값인 것으로 가정하기로 한다. 따라서 이 경우 상기 차이 값이란 그레이 레벨의 차이 값을 의미할 수 있다.In the second embodiment, it is assumed that the input image of the previous frame and the current frame is converted into a black and white image by the
위치 정보 산출부(184)는 상기 차연산부(182)에 의해 산출된 픽셀 별 픽셀 값의 차이 값을 미리 설정된 기준 값과 비교하여, 상기 차이 값이 설정된 기준 값 이상인 픽셀의 위치 정보를 산출한다(단계:S12).The position
대상 제어부(186)는 상기 산출된 위치 정보를 근거로 픽셀에 따라 통계적 연산이 선별적으로 수행되도록 연산부(140)를 제어할 수 있다(단계:S13). 예를 들면, 대상 제어부(186)는 상기 산출된 위치 정보를 메모리(20)에 저장하고, 통계적 연산을 수행할 때 이전 프레임의 기준 매크로블록의 픽셀들 중 상기 저장된 위치 정보에 해당하는 픽셀만을 대상으로 통계적 연산이 수행되도록 연산부(140)를 제어할 수 있다.The
이하에서는, 이러한 구성을 갖는 제어부(180)의 동작 예를 아래의 표 5 내지 표 8을 참조하여 상세히 설명하기로 한다.Hereinafter, an operation example of the
표 5는 이전 프레임의 기준 매크로블록의 예를 나타내고 있다. 표 5에 나타낸 바와 같이 기준 매크로블록은 5 x 5 사이즈의 매크로블록인 것으로 가정하며, 각 픽셀 값은 그레이 레벨 값을 나타내는 것으로 가정한다. 이때 그레이 레벨은 0 내지 255까지의 등급, 즉 8비트의 명도 정보를 나타내는 것으로 예시한다.Table 5 shows an example of the reference macroblock of the previous frame. As shown in Table 5, it is assumed that the reference macroblock is a 5 × 5 size macroblock, and each pixel value represents a gray level value. In this case, the gray level is exemplified as representing a level of 0 to 255, that is, 8 bits of brightness information.
표 6은 표 5에 나타낸 이전 프레임의 기준 매크로블록에 대응되는 현재 프레임의 기준 매크로블록을 나타내고 있다. 상기 이전 프레임의 기준 매크로블록과 현재 프레임의 기준 매크로블록은 해당 프레임의 입력 영상 내에서 동일한 좌표에 위치한다.Table 6 shows the reference macroblock of the current frame corresponding to the reference macroblock of the previous frame shown in Table 5. The reference macroblock of the previous frame and the reference macroblock of the current frame are located at the same coordinates in the input image of the frame.
제어부(180)는 표 5 내지 표 6에 각각 도시된 각각의 정보들을 메모리(20)로부터 로딩하고, 예컨대 표 5에 도시된 매크로블록의 각 픽셀 값에서 표 6에 도시된 매크로블록의 각 픽셀 값을 차감하고 여기에 절대값을 취하여 각 픽셀 별로 그레이 레벨의 차이 값을 산출할 수 있다. 그러면 아래의 표 7과 같은 매트릭스가 생성될 수 있다.The
표 7에 나타낸 바와 같이, 제어부(20)는 이전 프레임의 기준 매크로블록과 현재 프레임의 기준 매크로블록의 각 픽셀 별 그레이 레벨의 차이 값을 산출할 수 있다.As shown in Table 7, the
제어부(20)는 상기 산출된 픽셀 별 차이 값들을 미리 설정된 기준 값과 비교하여 차이 값이 상기 기준 값 이상인 픽셀들의 위치 정보를 검출한다. 즉, 제어부(20)는 차이 값이 기준 값보다 클 경우 해당 픽셀에서 영상의 변화가 존재한다는 것으로 간주하고, 차이 값이 기준 값보다 작을 경우 해당 픽셀에서 영상의 변화가 없다는 것으로 간주한다.The
예컨대 상기 기준 값이 10으로 정해진 다면, 제어부(20)는 표 7에 도시된 각 차이 값들과 기준 값인 10을 비교하고, 차이 값이 기준 값 이상인 픽셀들에는 '1' 차이 값이 기준 값 이상인 픽셀들에는 '0'을 부여할 수 있다. 그러면 아래의 표 8에 나타낸 바와 같은 매트릭스 형태의 결과 값을 산출할 수 있다.For example, if the reference value is set to 10, the
표 8에 나타낸 바와 같이, 기준 매크로블록에서 (2,3), (3,3), (4,2), (4,3), (4,4) 및 (5, 4)의 좌표에 해당하는 픽셀들은 영상의 변화가 존재한다고 판단된 픽셀에 해당한다.As shown in Table 8, correspond to the coordinates of (2,3), (3,3), (4,2), (4,3), (4,4) and (5, 4) in the reference macroblock. Pixels correspond to pixels determined to have a change in image.
제어부(180)는 이와 같은 표 8에 나타낸 형태의 위치 정보를 메모리(20), 예컨대 라인 메모리에 저장하고, 연산부(140)에 의해서 통계적인 연산이 수행될 때 상기 위치 정보에 해당하는 픽셀들만을 대상으로 통계적 연산이 수행되도록 제어할 수 있다.The
예를 들면, 연산부(140)는 이전 프레임의 기준 매크로블록을 탐색 영역 내에서 수평 또는 수직으로 한 라인씩 이동시켜 상기 기준 매크로블록을 탐색 영역 내의 탐색 블록들에 각각 대응시켜 가면서 통계적 연산을 수행할 수 있다.For example, the
이때 제어부(180)는 상기 위치 정보에 해당하는 픽셀에 대해서만, 기준 매크로블록의 픽셀 값 및 대응된 탐색 블록의 픽셀 값을 이용한 통계적 연산을 수행하도록 상기 연산부(140)를 제어할 수 있다. 이러한 제어부(180)의 제어에 따라 연산부(140)에 의하여 산출되는 연산 매트릭스는 상기 위치 정보에 해당하는 픽셀들만 통계적 연산 값이 존재할 것이며 나머지 픽셀들은 예컨대 '0'등으로 설정될 것이다.In this case, the
예컨대, 표 4에 도시된 연산 매트릭스를 산출하는 통계적 연산을 제어부(180)가 표 8에 도시된 위치 정보에 따라 제어하였다고 가정하면, 표 4에 도시된 연산 매트릭스에서 (2,3), (3,3), (4,2), (4,3), (4,4) 및 (5, 4)의 좌표에 해당하는 SAD23, SAD33, SAD42, SAD43, SAD44, SAD53 값만 산출될 것이며, 나머지 좌표의 값들은 0이 될 것이다.For example, assuming that the
이상 본 발명의 바람직한 제 2 실시예에 따른 동영상 손떨림 보정 장치(101) 및 그 관련 방법을 살펴보았다. 이하에서는 이러한 제 2 실시예에서 제어부의 동작을 변형한 또 다른 실시예를 살펴보기로 한다.In the above, the video
<제 3 실시예>Third Embodiment
먼저, 본 발명의 바람직한 제 3 실시예에 따른 동영상 손떨림 보정 장치는 도 10에 도시된 제 2 실시예에서의 구성과 동일하나 제어부의 기능이 변형된다. 본 제 3 실시예에서의 제어부는 이전 프레임의 기준 매크로블록과 현재 프레임의 매크로블록 간에 픽셀 값의 차이 값을 픽셀 별로 산출하고, 기준 매크로블록에서 상기 차이 값이 제 1 기준 값 이상인 픽셀의 비율을 산출할 수 있다. 그리고 그 산출된 비율이 제 2 기준 값 이상일 경우에만 실질적으로 연산부를 제어한다.First, the image stabilization apparatus according to the third exemplary embodiment of the present invention is the same as the configuration of the second exemplary embodiment shown in FIG. 10, but the function of the controller is modified. In the third embodiment, the control unit calculates, for each pixel, a difference value of a pixel value between the reference macroblock of the previous frame and the macroblock of the current frame, and calculates a ratio of pixels whose difference value is greater than or equal to the first reference value in the reference macroblock. Can be calculated. The operation unit is substantially controlled only when the calculated ratio is equal to or greater than the second reference value.
도 13은 본 발명의 바람직한 제 3 실시예에 따른 동영상 손떨림 보정 장치에 구비되는 제어부의 구성을 도시하는 블록도이고, 도 14는 도 13에 도시된 제어부의 동작을 설명하기 위한 흐름도이다.FIG. 13 is a block diagram illustrating a configuration of a controller included in the video image stabilizer according to the third exemplary embodiment of the present invention, and FIG. 14 is a flowchart for describing an operation of the controller illustrated in FIG. 13.
도 13에 도시된 바와 같이, 제어부(280)는 차연산부(282), 비율 산출부(286), 위치 정보 산출부(284) 및 대상 제어부(288) 등을 포함할 수 있다.As illustrated in FIG. 13, the
도 13 내지 도 14를 참조하면, 차연산부(282)는 이전 프레임의 기준 매크로블록의 픽셀 데이터와, 현재 프레임에서 기준 매크로블록의 픽셀 데이터를 각각 메모리(20)로부터 로딩하여 각 픽셀 간에 픽셀 값의 차이 값을 산출할 수 있다(단계:S21).13 to 14, the
예를 들어, 상기 차연산부(282)는 이전 프레임의 기준 매크로블록의 픽셀 데이터와 현재 프레임의 기준 매크로블록의 픽셀 데이터를 메모리(20)로부터 로딩하고, 이전 프레임의 기준 매크로블록의 각 픽셀 값에서 해당 픽셀과 대응되는 현재 프레임의 픽셀 값을 차감한 뒤 절대값을 취한 값을 산출할 수 있다. 이때 산출되는 차이 값은 예컨대 그레이 레벨 등의 차이 값일 수 있다.For example, the
위치 정보 산출부(284)는 상기 차연산부(282)에 의해 산출된 픽셀 별 픽셀 값의 차이 값을 미리 설정된 제 1 기준 값과 비교하여, 상기 차이 값이 제 1 기준 값 이상인 픽셀의 위치 정보를 산출한다(단계:S22).The
비율 산출부(286)는 기준 매크로블록에서 상기 차이 값이 제 1 기준 값 이상인 픽셀이 차지하는 비율을 산출할 수 있다(단계:S23). 예컨대 앞서 설명한 표 8에 도시된 예에서, 매크로블록의 전체 픽셀은 25 개이고 차이 값이 특정 기준 값 이상인 픽셀은 6 개이므로, 상기 비율 산출부(286)는 상기 차이 값이 제 1 기준 값 이상인 픽셀의 비율을 '24%'로 산출할 수 있다.The
대상 제어부(288)는 상기 산출된 비율을 미리 설정된 제 2 기준 값과 비교한다(단계:S24). 이때, 만약 상기 산출된 비율이 미리 설정된 제 2 기준 값 미만일 경우, 대상 제어부(288)는 상기 산출된 위치 정보를 근거로 통계적 연산이 수행되도록 연산부(140)를 제어할 수 있다(단계:S25). 예를 들면, 대상 제어부(288)는 상기 산출된 위치 정보를 메모리(20)에 저장하고, 통계적 연산을 수행할 때 이전 프레임의 기준 매크로블록의 픽셀들 중 상기 저장된 위치 정보에 해당하는 픽셀만을 대상으로 통계적 연산이 수행되도록 연산부(140)를 제어할 수 있다.The
반면, 상기 산출된 비율과 제 2 기준 값을 비교한 결과, 만약 상기 산출될 비율이 미리 설정된 제 2 기준 값 이상일 경우, 대상 제어부(288)는 통계적 연산의 수행 시에 이전 프레임의 기준 매트릭스에 포함되는 모든 픽셀에 대하여 통계적 연산이 수행되도록 제어할 수 있다(단계:S27).On the other hand, as a result of comparing the calculated ratio with the second reference value, if the ratio to be calculated is greater than or equal to the preset second reference value, the
이상, 제 2 실시예 및 제 3 실시예에서를 통하여 제어부가 이전 프레임의 매크로블록과, 이와 위치가 동일한 현재 프레임의 매크로블록의 픽셀 값을 연산하여 연산부를 제어하는 실시예를 설명하였다. 이러한 제어부의 동작에 따라, 연산 량은 획기적으로 줄이면서도 실제 흔들림이 있는 픽셀들을 정확하게 판별하여 통계적 연산에 반영할 수 있다.As described above, the embodiments in which the control unit calculates the pixel value of the macroblock of the previous frame and the macroblock of the current frame having the same position have been described in the second and third embodiments. According to the operation of the controller, the amount of calculation can be drastically reduced, but the pixels with actual shaking can be accurately identified and reflected in the statistical calculation.
한편, 현재 프레임의 보정을 위한 통계적 연산을 제어하기 위하여, 이전 프레임(즉 제 N-1 프레임) 및 이전 프레임의 선행 프레임(즉 N-2 프레임)의 매크로블록의 픽셀 값을 연산할 수도 있다. 예를 들면, 제어부는 상기 선행 프레임의 기준 매크로블록 및 이전 프레임의 기준 매크로블록 간에 픽셀 값의 차이 값을 픽셀 별로 산출하고, 상기 차이 값이 제 1 기준 값 이상인 픽셀들의 위치 정보를 검출한 뒤, 현재 프레임의 통계적 연산 시에 상기 위치 정보를 토대로 통계적 연산을 제어할 수도 있다. 이때, 상기 차이 값이 제 1 기준 값 이상인 픽셀들의 비율을 산출하고 이를 제 2 기준 값과 비교하여 제어 방식을 결정할 수도 있다.Meanwhile, in order to control a statistical operation for correction of the current frame, the pixel value of the macroblock of the previous frame (ie, the N-1 frame) and the preceding frame (ie, the N-2 frame) of the previous frame may be calculated. For example, the controller calculates the difference value of the pixel value between the reference macroblock of the preceding frame and the reference macroblock of the previous frame for each pixel, and detects the position information of the pixels whose difference value is greater than or equal to the first reference value. In the statistical operation of the current frame, the statistical operation may be controlled based on the position information. In this case, a control scheme may be determined by calculating a ratio of pixels having the difference value equal to or greater than a first reference value and comparing the result with a second reference value.
이상 본 발명에 대하여 그 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 기술적 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시켜 실시할 수 있음을 이해할 수 있을 것이다. 따라서, 본 발명의 앞으로의 실시예들의 변경은 본 발명의 기술을 벗어날 수 없을 것이다.Although the present invention has been described above with reference to its preferred embodiments, those skilled in the art will variously modify the present invention without departing from the spirit and scope of the invention as set forth in the claims below. And can be practiced with modification. Accordingly, modifications of the embodiments of the present invention will not depart from the scope of the present invention.
본 명세서에 첨부되는 다음의 도면들은 본 발명의 바람직한 실시예를 예시하는 것이며, 전술된 발명의 상세한 설명과 함께 본 발명의 기술사상을 더욱 이해시키는 역할을 하는 것이므로, 본 발명은 그러한 도면에 기재된 사항에만 한정되어 해석되어서는 안된다.The following drawings, which are attached to this specification, illustrate exemplary embodiments of the present invention, and together with the detailed description of the present invention serve to further understand the technical spirit of the present invention, the present invention includes matters described in such drawings. It should not be construed as limited to.
도 1은 본 발명의 바람직한 제 1 실시예에 따른 동영상 손떨림 보정 장치를 구비하는 디지털 영상 촬영 장치의 구성을 도시하는 블록도이다.1 is a block diagram showing the configuration of a digital image photographing apparatus including a video image stabilizer according to a first embodiment of the present invention.
도 2는 상기 언급된 손떨림 왜곡의 개념을 예시적으로 설명하기 위한 예시도이다.2 is an exemplary diagram for exemplarily explaining the concept of the shake distortion mentioned above.
도 3은 이러한 손떨림에 의한 왜곡을 보정할 수 있는 움직임 추정을 설명하기 위한 그래프이다.3 is a graph for explaining motion estimation capable of correcting such distortion due to camera shake.
도 4는 도 1에 도시되어 있는 동영상 손떨림 보정 장치의 상세 구성을 도시하는 블록도이다.FIG. 4 is a block diagram showing the detailed configuration of the video image stabilizer shown in FIG.
도 5는 도 4에 도시되어 있는 입력 처리부의 구성을 나타내는 블록도이다.FIG. 5 is a block diagram showing a configuration of an input processing unit shown in FIG. 4.
도 6은 선택부에 의하여 선택되는 탐색 영역 및 기준 매크로블록을 설명하기 위한 예시도이다.6 is an exemplary diagram for describing a search region and a reference macroblock selected by the selection unit.
도 7은 도 4에 도시되어 있는 연산부의 구성을 도시하는 블록도이다.FIG. 7 is a block diagram showing the configuration of the calculation unit shown in FIG. 4.
도 8은 벡터 산출부에 의해 수행되는 나선형 탐색의 수행 과정을 설명하기 위한 예시도이다.8 is an exemplary diagram for describing a process of performing a spiral search performed by a vector calculator.
도 9는 본 발명의 바람직한 제 1 실시예에 따른 동영상 손떨림 보정 방법을 설명하기 위한 흐름도이다.9 is a flowchart illustrating a video stabilization method according to a first embodiment of the present invention.
도 10은 본 발명의 바람직한 제 2 실시예에 따른 동영상 손떨림 보정 장치의 구성을 도시하는 블록도이다.10 is a block diagram showing the configuration of a video image stabilizer according to a second preferred embodiment of the present invention.
도 11은 본 발명의 바람직한 제 2 실시예에 따른 동영상 손떨림 보정 장치에 구비되는 제어부의 구성을 도시하는 블록도이다.11 is a block diagram showing the configuration of a control unit included in the video image stabilizer according to the second embodiment of the present invention.
도 12는 도 11에 도시된 제어부의 동작을 설명하기 위한 흐름도이다.FIG. 12 is a flowchart for describing an operation of the controller illustrated in FIG. 11.
도 13은 본 발명의 바람직한 제 3 실시예에 따른 동영상 손떨림 보정 장치에 구비되는 제어부의 구성을 도시하는 블록도이다.FIG. 13 is a block diagram showing a configuration of a control unit included in the video image stabilizer according to the third embodiment of the present invention.
도 14는 도 13에 도시된 제어부의 동작을 설명하기 위한 흐름도이다.FIG. 14 is a flowchart for describing an operation of the controller illustrated in FIG. 13.
<도면의 주요 부분에 대한 부호 설명><Description of the symbols for the main parts of the drawings>
10 : 영상 촬영부 20 : 메모리10: video recording unit 20: memory
30 : 디스플레이부 100 : 동영상 손떨림 보정 장치30: display unit 100: video stabilization device
110 : 입력 처리부 120 : 출력 스케일러부110: input processing unit 120: output scaler
130 : 선택부 140 : 연산부130: selection unit 140: arithmetic unit
150 : 벡터 산출부 160 : 보정부150: vector calculation unit 160: correction unit
180, 280 : 제어부180, 280: control unit
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020090035224A KR101012481B1 (en) | 2008-04-22 | 2009-04-22 | Apparatus and Method for Correcting Moving Image Wavering |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020080037172 | 2008-04-22 | ||
KR1020090035224A KR101012481B1 (en) | 2008-04-22 | 2009-04-22 | Apparatus and Method for Correcting Moving Image Wavering |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20090111789A KR20090111789A (en) | 2009-10-27 |
KR101012481B1 true KR101012481B1 (en) | 2011-02-08 |
Family
ID=41539526
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020090035224A KR101012481B1 (en) | 2008-04-22 | 2009-04-22 | Apparatus and Method for Correcting Moving Image Wavering |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101012481B1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101228328B1 (en) * | 2011-01-31 | 2013-01-31 | 삼성테크윈 주식회사 | Display apparatus and method of controlling thereof |
KR101502864B1 (en) * | 2013-07-01 | 2015-03-17 | 경희대학교 산학협력단 | Apparatus for compensating shaking of video camera angle using accelerometers and method thereof, and portable terminal comprising the same apparatus |
CN114666498A (en) * | 2022-02-28 | 2022-06-24 | 超级视线科技有限公司 | Video image acquisition jitter processing method and system |
CN116074533B (en) * | 2023-04-06 | 2023-08-22 | 湖南国科微电子股份有限公司 | Motion vector prediction method, system, electronic device and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004193981A (en) | 2002-12-11 | 2004-07-08 | Canon Inc | Image pickup device |
JP2005086499A (en) | 2003-09-09 | 2005-03-31 | Minolta Co Ltd | Imaging apparatus |
-
2009
- 2009-04-22 KR KR1020090035224A patent/KR101012481B1/en active IP Right Grant
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004193981A (en) | 2002-12-11 | 2004-07-08 | Canon Inc | Image pickup device |
JP2005086499A (en) | 2003-09-09 | 2005-03-31 | Minolta Co Ltd | Imaging apparatus |
Also Published As
Publication number | Publication date |
---|---|
KR20090111789A (en) | 2009-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5189678B2 (en) | Image stabilization apparatus and method for moving image | |
US8411172B2 (en) | Imaging device and image processing apparatus | |
JP4705664B2 (en) | Buffer management for adaptive buffer values using accumulation and averaging | |
US9055217B2 (en) | Image compositing apparatus, image compositing method and program recording device | |
US8542741B2 (en) | Image processing device and image processing method | |
JP5531194B2 (en) | Image processing apparatus, image processing method, and image processing program | |
US20080259175A1 (en) | Imaging Device | |
US20100208086A1 (en) | Reduced-memory video stabilization | |
US20080101710A1 (en) | Image processing device and imaging device | |
US20130076855A1 (en) | Image processing device capable of generating wide-range image | |
KR101012481B1 (en) | Apparatus and Method for Correcting Moving Image Wavering | |
US8269859B2 (en) | Photographing apparatus that performs distortion correction in association with digital and optical zoom, method of controlling the same, and recording medium having recorded thereon computer program to implement the method | |
EP1542454A2 (en) | Image processing apparatus | |
JP5424068B2 (en) | Image processing apparatus, image processing method, image processing program, and storage medium | |
CN114390188A (en) | Image processing method and electronic equipment | |
JP6231816B2 (en) | IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM | |
KR102429337B1 (en) | Image processing device stabilizing image and method of stabilizing image | |
JP6316030B2 (en) | Imaging apparatus and control method thereof | |
JP2015104030A (en) | Imaging apparatus and method of controlling the same | |
US7623184B2 (en) | Apparatus and method for digital image stabilization | |
JP2020188452A (en) | Imaging apparatus and control method of the same | |
KR101022984B1 (en) | Apparatus and Method for Real Time Motion Estimation | |
JP5401696B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2007259105A (en) | Camera shake correcting method and its apparatus, and imaging apparatus | |
KR20040004297A (en) | Image distortion compensation method and devices for CMOS Image Sensor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
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: 20140102 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20150108 Year of fee payment: 5 |
|
FPAY | Annual fee payment |
Payment date: 20151224 Year of fee payment: 6 |
|
FPAY | Annual fee payment |
Payment date: 20161223 Year of fee payment: 7 |
|
FPAY | Annual fee payment |
Payment date: 20171222 Year of fee payment: 8 |
|
FPAY | Annual fee payment |
Payment date: 20181224 Year of fee payment: 9 |
|
FPAY | Annual fee payment |
Payment date: 20191224 Year of fee payment: 10 |