KR100669635B1 - Method of motion compensation based on correlation - Google Patents

Method of motion compensation based on correlation Download PDF

Info

Publication number
KR100669635B1
KR100669635B1 KR1020040101888A KR20040101888A KR100669635B1 KR 100669635 B1 KR100669635 B1 KR 100669635B1 KR 1020040101888 A KR1020040101888 A KR 1020040101888A KR 20040101888 A KR20040101888 A KR 20040101888A KR 100669635 B1 KR100669635 B1 KR 100669635B1
Authority
KR
South Korea
Prior art keywords
macroblock
correlation
vector
scaling factor
compared
Prior art date
Application number
KR1020040101888A
Other languages
Korean (ko)
Other versions
KR20060062891A (en
Inventor
김남호
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Priority to KR1020040101888A priority Critical patent/KR100669635B1/en
Publication of KR20060062891A publication Critical patent/KR20060062891A/en
Application granted granted Critical
Publication of KR100669635B1 publication Critical patent/KR100669635B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Abstract

본 발명은 MPEG 등에서 동영상 압축시의 움직임을 보상하는 방법에 관한 것이다. 본 발명의 상관성 기반 움직임 보상방법은, 현재 프레임의 매크로 블록 X와 비교 대상이 되는 참조 프레임 매크로 블록 Y(i,j)를 선택하는 단계; 현재 프레임의 매크로 블록 X와 비교 대상이 되는 참조 프레임의 매크로 블록 Y(i,j)의 움직임 벡터 비교를 위하여 비교 대상이 되는 매크로 블록 벡터의 크기에 적합한 스케일링 팩터(scaling factor)(λ)를 선정하는 단계; 상기 스케일링 팩터(λ)를 고려하여 현재 매크로 블록 X와 비교 대상인 매크로 블록 Y(i,j)의 상관성(d)이 최대인 매크로 블록을, [d = maxij{(λㆍX)oY(i,j)}ij (단, o는 상관관계 연산)] 로 표현되는 검색과정을 수행하여 검색하는 단계; 를 포함하여 이루어지는 것을 특징으로 하며, 기존의 MSE(Mean Square Error) 기법 대신, 상관관계(correlation)를 이용해서 움직임 보상이 이루어지도록 함으로써, 프레임 간의 중복성을 최대한 제거하여 보다 우수한 압축 성능을 가진다.The present invention relates to a method for compensating for motion during moving picture compression in MPEG and the like. The correlation-based motion compensation method of the present invention includes selecting a reference frame macro block Y (i, j) to be compared with the macro block X of the current frame; A scaling factor (λ) suitable for the size of the macroblock vector to be compared is selected for comparing the motion vector of the macroblock X (i, j) of the reference frame to be compared with the macroblock X of the current frame. Doing; In consideration of the scaling factor λ, a macroblock having a maximum correlation d between the current macroblock X and the macroblock Y (i, j) to be compared is selected as [d = max ij {(λ · X) oY (i , j)} ij (where o is a correlation operation)] to perform a search; It is characterized in that it comprises a, and instead of the conventional MSE (Mean Square Error) technique, by using the correlation (correlation) to compensate for the motion, by eliminating the redundancy between the frames to have a better compression performance.

동영상압축,MPEG,움직임보상Video Compression, MPEG, Motion Compensation

Description

상관성 기반 움직임 보상방법{METHOD OF MOTION COMPENSATION BASED ON CORRELATION}Correlation based motion compensation method {METHOD OF MOTION COMPENSATION BASED ON CORRELATION}

도1은 디지털 동영상 부호화기의 블록도1 is a block diagram of a digital video encoder

도2는 MSE(Mean Square Error)기반 블록매칭을 설명하기 위한 벡터 도면2 is a vector diagram for explaining a block matching based on MSE (Mean Square Error)

도3은 본 발명에 따른 상관성 기반 블록매칭을 설명하기 위한 벡터 도면3 is a vector diagram for explaining correlation-based block matching according to the present invention.

도4는 본 발명의 기법을 2차원,3차원 벡터에 적용한 경우의 벡터 도면Figure 4 is a vector diagram when the technique of the present invention is applied to a two-dimensional, three-dimensional vector

도5는 본 발명에 따른 상관성 기반 움직임 보상방법의 플로우차트5 is a flowchart of a correlation-based motion compensation method according to the present invention

본 발명은 동영상을 압축 부호화하는 방법에서 움직임 보상(motion compensation) 방법에 관한 것이다.The present invention relates to a motion compensation method in a method of compressing and encoding a video.

MPEG이나 H.26x 계열의 동영상 코덱(CODEC) 등 대부분의 동영상 압축 표준은 움직임 보상 기법(Motion Estimation & Compensation)과 변환(Transform)에 기반한 압축방식을 채택하고 있다. 이러한 움직임 보상 기반 부호화에서는 각 블록(block)의 움직임 벡터(Motion Vector) 정보를 부호화해서 전송해야 하며, 움직임 벡터를 어떻게 부호화하느냐에 따라 압축 효율이 크게 달라지기도 한다.Most video compression standards, such as MPEG or H.26x video codecs, adopt compression based on motion estimation and compensation and transformation. In such motion compensation based encoding, motion vector information of each block must be encoded and transmitted, and the compression efficiency may vary greatly depending on how the motion vector is encoded.

영상을 부호화하는 일반적인 과정은 디지털 영상신호를 DCT(이산 코사인 변환) 처리하고, 변환계수를 양자화하여 가변장 부호화(VLC)를 수행하는 한편, 양자화된 DCT 계수를 역양자화 및 역 DCT 변환하여 복원한 영상을 메모리에 저장하고, 메모리에 저장된 복원 영상과 다음 프레임 영상을 이용해서 움직임 벡터를 산출하며, 움직임 벡터를 가변장 부호화하여 상기 부호화된 영상정보와 함께 비트 스트림으로 구성하여 전송하는 수순을 따른다. 영상을 복호화하는 방법은 상기 부호화 과정의 역순으로 수행한다.In the general process of encoding an image, DCT (Discrete Cosine Transform) processing of a digital image signal, quantization of transform coefficients to perform variable length coding (VLC), and dequantization and inverse DCT conversion of quantized DCT coefficients The image is stored in a memory, a motion vector is calculated using the reconstructed image and the next frame image stored in the memory, and the motion vector is variably encoded to form a bit stream along with the encoded image information for transmission. The method of decoding an image is performed in the reverse order of the encoding process.

도1은 일반적인 디지털 동영상 부호화기의 구성을 나타낸 블록도이다.1 is a block diagram showing the configuration of a general digital video encoder.

도1에 나타낸 동영상 부호화기는 입력 디지털 영상신호를 DCT(Discrete Cosine Transform) 처리하는 DCT부(110)와, 상기 DCT 변환 계수를 양자화하는 양자화부(120)와, 상기 양자화부(120)에서 출력된 양자화 데이터를 역양자화하는 역양자화부(130)와, 상기 역 양자화부(130)의 출력 데이터를 역DCT 변환하는 역DCT부(140)와, 상기 역DCT부(140)에서 출력된 복원 영상을 저장하는 프레임 메모리(150)와, 입력되는 현재 프레임의 영상 데이터와 상기 프레임 메모리(150)에 저장된 이전 프레임의 영상 데이터를 이용해서 움직임 벡터(MV)를 산출하는 움직임 추정 및 보상부(160)와, 상기 양자화된 데이터와 움직임 벡터를 가변 길이 부호화하여 출력하는 VLC부(170)를 포함하여 구성된다.The video coder illustrated in FIG. 1 includes a DCT unit 110 for processing a DCT (Discrete Cosine Transform), a quantizer 120 for quantizing the DCT transform coefficients, and an output from the quantizer 120. Inverse quantization unit 130 for inverse quantization of the quantization data, inverse DCT unit 140 for inverse DCT transformation of the output data of the inverse quantization unit 130, and the reconstructed image output from the inverse DCT unit 140 A motion estimation and compensation unit 160 for calculating a motion vector (MV) by using the frame memory 150 to be stored, the image data of the input current frame and the image data of the previous frame stored in the frame memory 150; And a VLC unit 170 for variable length encoding the quantized data and the motion vector and outputting the same.

상기한 바와 같이 구성된 도1의 압축 부호화기의 부호화 과정을 살펴보면 다음과 같다.Looking at the encoding process of the compression encoder of Figure 1 configured as described above is as follows.

DCT(Discrete Cosine Transform)부(110)는 8*8 화소 블록 단위로 입력된 디 지털 영상신호에 대해 DCT변환을 수행하고, 양자화부(Quantization: Q)(120)는 상기 DCT부(110)에서 얻어진 DCT 계수에 대해 양자화를 수행하여 몇 개의 대표값으로 표현함으로써 고효율 압축을 수행한다.The DCT transform unit 110 performs a DCT transformation on the digital image signal input in units of 8 * 8 pixel blocks, and the quantization unit Q (120) performs the DCT unit 110 in the DCT unit 110. The high efficiency compression is performed by performing quantization on the obtained DCT coefficients and expressing them as some representative values.

역양자화부(Inverse Quantization: IQ)(130)는 상기 양자화부(120)에서 출력된 양자화 데이터를 역양자화하고, IDCT부(140)에서는 상기 역양자화부(130)에서 역양자화된 데이터에 대해 역 이산 코사인 변환(Inverse DCT)을 수행한다. 프레임 메모리(150)는 상기 IDCT부(140)에서 IDCT 변환된 영상 데이터를 프레임 단위로 저장한다.An inverse quantization unit (IQ) 130 inverse quantizes the quantized data output from the quantization unit 120, and inversely quantizes the inverse quantized data by the inverse quantization unit 130 in the IDCT unit 140. Perform a discrete cosine transform (Inverse DCT). The frame memory 150 stores IDCT-converted image data by the IDCT unit 140 in units of frames.

움직임 추정 및 보상부(Motion Estimation & Compensation)(160)는 입력되는 현재 프레임의 영상 데이터와 프레임 메모리(150)에 저장된 이전 프레임의 영상 데이터를 이용하여 매크로 블록당 움직임 벡터(MV)를 계산한다. VLC부(170)는 상기 양자화부(120)에서 양자화된 출력 데이터와 상기 움직임 벡터(MV)를 입력받아 이를 가변 길이 부호화(Variable Length Coding: VLC)하여 출력한다.The motion estimation and compensation unit 160 calculates a motion vector per macroblock (MV) using the input image data of the current frame and the image data of the previous frame stored in the frame memory 150. The VLC unit 170 receives the quantized output data and the motion vector MV from the quantization unit 120 and outputs them by variable length coding (VLC).

알려진 바와 같이 MPEG의 경우 시간 중복성을 이용해서 동영상을 압축하는 대표적인 알고리즘이다. MPEG의 B프레임이나 P레임에서는 이전 프레임과의 시간적 중복성을 매크로 블록의 움직임 벡터를 이용함으로써 효율적으로 제거할 수 있었다. As is known, MPEG is a representative algorithm for compressing a video using time redundancy. In the B frame or P frame of MPEG, the temporal redundancy with the previous frame can be efficiently removed by using the motion vector of the macro block.

즉, 현재 프레임(current frame)의 매크로 블록과 가장 유사한 매크로 블록을 이전(참조) 프레임(refference frame)에서 찾게 되는데, 현재 프레임의 매크로 블록과 이전 프레임의 매크로 블록간의 유사성의 기준으로 두 벡터 사이의 거리의 제곱이 최소가 되는 매크로 블록을 찾음으로써 프레임 간의 중복성을 효율적으로 제거하여 압축 효율을 높이는 것이다.That is, the macro block most similar to the macro block of the current frame is found in the previous (reference) frame, and the two vectors are determined based on the similarity between the macro block of the current frame and the macro block of the previous frame. By finding a macro block with the least square of distance, the redundancy between frames is efficiently removed to increase the compression efficiency.

그렇지만 두 벡터간의 거리 제곱이 최소가 되게 하는 움직임 벡터 검색방법에서는 여전히 프레임 간의 중복성(redundancy)이 남아있게 되어 압축 효율을 떨어뜨리는 요인이 되곤 한다. 이로 인하여 데이터의 크기가 증가하게 되고 데이터 저장과 전송에 따른 부담 또한 증가하게 된다.However, in the motion vector retrieval method which minimizes the square of distance between two vectors, redundancy between frames still remains, which is a factor of reducing compression efficiency. As a result, the size of the data increases and the burden of storing and transmitting the data also increases.

그러므로, 움직임 보상을 기반으로 하여 프레임 간의 중복성을 제거함에 있어, 그 중복성을 최대한 제거하고 이에 따라 압축 효율을 증대시킬 수 있는 기법이 요구된다.Therefore, in removing redundancy between frames based on motion compensation, a technique for removing the redundancy as much as possible and thus increasing the compression efficiency is required.

본 발명의 목적은 앞서 설명한 종래 기술의 문제점을 해결하여 영상 압축 부호화기의 압축 효율을 높일 수 있도록 한 움직임 보상방법을 제공하는데 있다.An object of the present invention is to provide a motion compensation method for solving the problems of the prior art described above to increase the compression efficiency of an image compression encoder.

본 발명의 또 다른 목적은 영상 압축 부호화시에 프레임간의 중복성을 최대한 줄이기 위하여 기존의 MSE(Mean Square Error) 기법 대신 상관성(correlation)을 기반으로 프레임 간 중복성을 제거함으로써 압축 효율을 높일 수 있도록 하고, 이에 따른 데이터 저장과 전송에 관련된 부담을 줄일 수 있도록 한 상관성 기반 움직임 보상방법을 제공하는데 있다.Another object of the present invention is to improve the compression efficiency by eliminating the inter-frame redundancy based on the correlation (correlation) instead of the conventional Mean Square Error (MSE) method in order to reduce the redundancy between the frames in the video compression encoding, Accordingly, the present invention provides a correlation-based motion compensation method to reduce the burden associated with data storage and transmission.

상기 목적을 달성하기 위한 본 발명의 상관성 기반 움직임 보상방법은, 현재 프레임의 매크로 블록 X와 비교 대상이 되는 참조 프레임 매크로 블록 Y(i,j)를 선 택하는 단계; 현재 프레임의 매크로 블록 X와 비교 대상이 되는 참조 프레임의 매크로 블록 Y(i,j)의 움직임 벡터 비교를 위하여 비교 대상이 되는 매크로 블록 벡터의 크기에 적합한 스케일링 팩터(scaling factor)(λ)를 선정하는 단계; 상기 스케일링 팩터(λ)를 고려하여 현재 매크로 블록 X와 비교 대상인 매크로 블록 Y(i,j)의 상관성(d)이 최대인 매크로 블록을,The correlation-based motion compensation method of the present invention for achieving the above object comprises the steps of selecting a reference frame macro block Y (i, j) to be compared with the macro block X of the current frame; A scaling factor (λ) suitable for the size of the macroblock vector to be compared is selected for comparing the motion vector of the macroblock X (i, j) of the reference frame to be compared with the macroblock X of the current frame. Making; In consideration of the scaling factor (λ), a macroblock having a maximum correlation (d) between the current macroblock X and the macroblock Y (i, j) to be compared is selected.

[d = maxij{(λㆍX)oY(i,j)}ij (단, o는 상관관계 연산)] 로 표현되는 검색과정을 수행하여 검색하는 단계; 를 포함하여 이루어지는 것을 특징으로 한다.performing a search process expressed by [d = max ij {(λ · X) oY (i, j)} ij (where o is a correlation operation)]; Characterized in that comprises a.

또한 상기 본 발명의 상관성 기반 움직임 보상방법에서, 상기 비교되는 두 벡터 간의 상관성이 높다는 것은 두 벡터 간의 각도가 작다는 것을 기반으로 매크로 블록 매칭이 이루어진다는 것임을 특징으로 한다.In the correlation-based motion compensation method of the present invention, the high correlation between the two vectors to be compared is characterized in that macro block matching is performed based on the small angle between the two vectors.

또한 상기 본 발명의 상관성 기반 움직임 보상방법에서, 상기 스케일링 팩터(λ)를 비교 대상 매크로 블록 Y(i,j)에 곱함으로써 매크로 블록의 근본적인 특성을 손상하지 않으면서 두 벡터 간의 각도가 최소가 되는 매크로 블록을 검색함을 특징으로 한다.In addition, in the correlation-based motion compensation method of the present invention, by multiplying the scaling factor λ by the comparison macro block Y (i, j), the angle between two vectors is minimized without compromising the fundamental characteristics of the macroblock. Search for macroblocks.

또한 상기 본 발명의 상관성 기반 움직임 보상방법에서, 상기 스케일링 팩터(λ)는 참조되는 매크로 블록과 동일한 크기를 가지는 것으로 간주함을 특징으로 한다.In addition, in the correlation-based motion compensation method of the present invention, the scaling factor λ is characterized as having the same size as the referenced macroblock.

또한 상기 본 발명의 상관성 기반 움직임 보상방법에서, 상기 스케일링 팩터(λ)는 참조되는 매크로 블록과 동일한 크기를 가지는 것으로 간주되어, 스케일링 팩터(λ) = ∥Y(i,j)∥/∥X∥로 선정되고, 이에 따라 상기In addition, in the correlation-based motion compensation method of the present invention, the scaling factor λ is considered to have the same size as the macro block to be referred to, and the scaling factor λ = ∥Y (i, j) || / ∥X∥ Is selected as

[d = maxij{[(∥Y(i,j)∥/∥X∥)ㆍX]oY(i,j)}ij (단, o는 상관관계 연산)] 로 표현되는 검색과정이 수행됨을 특징으로 한다.The search process is expressed as [d = max ij {[(∥Y (i, j) ∥ / ∥X∥) · X] oY (i, j)} ij (where o is a correlation operation)]. It features.

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

먼저, 본 발명에 따른 상관성 기반 움직임 보상방법은 MPEG계열이나 H.26x 계열의 동영상 압축부호화에 적용되므로 MPEG 계열이나 H.26x 등의 동영상 압축에서 사용하는 블록 매칭부터 설명한다.First, since the correlation-based motion compensation method according to the present invention is applied to video compression encoding of MPEG series or H.26x series, block matching used in video compression such as MPEG series or H.26x will be described.

MPEG 계열이나 H.26x 등의 동영상 압축에서 사용하는 블록 매칭방법은 인코딩(encoding)하려는 매크로 블록과 가장 유사한 매크로 블록을 이전 프레임에서 찾는다. 이 때 두 매크로 블록 간의 유사성은 매크로 블록을 나타내는 벡터들 간의 거리의 제곱(MSE)을 기준으로 해서 판단하며, 두 벡터 간의 거리의 제곱이 가장 작은 경우가 가장 유사한 경우로 간주된다.The block matching method used in video compression such as MPEG series or H.26x finds the macro block most similar to the macro block to be encoded in the previous frame. In this case, the similarity between the two macroblocks is determined based on the square of the distance (MSE) between the vectors representing the macroblocks, and the case where the square of the distance between the two vectors is the smallest is considered to be the most similar case.

이 과정을 수식으로 살펴보면 벡터 X와 벡터 Y 중에서 벡터 X가 벡터 Z와 더 유사한 벡터일 경우 두 벡터 간의 거리 제곱은 다음의 수학식1과 같은 관계에 놓이게 된다.Looking at this process as an equation, if the vector X of the vector X and the vector Y is a vector more similar to the vector Z, the square of the distance between the two vectors is in the relationship shown in Equation 1 below.

Figure 112004057388975-pat00001
Figure 112004057388975-pat00001

수학식1에 따르면 벡터 Z와 비교 대상인 벡터 X와의 거리의 차(Z-X)의 제곱값이, 벡터 Z와 비교 대상인 벡터 Y와의 거리의 차(Z-Y)의 제곱값 보다 작은 것을 표현하고 있다. 따라서 이 식은 벡터 X가 벡터 Z와 더 유사한 벡터임을 표현한다.According to Equation 1, the square value of the difference Z-X of the distance between the vector Z and the vector X to be compared is smaller than the square value of the difference Z-Y of the distance between the vector Z and the vector Y to be compared. Thus, this expression indicates that vector X is a vector more similar to vector Z.

상기 수학식1을 바탕으로 하여 각각의 벡터 요소에 대해서 식을 전개하면 다음의 수학식2와 같이 정리된다. 여기서 i,j는 영상 데이터를 매크로 블록 단위로 처리할 때 i번째 행과 j번째 열을 표현한다.Based on Equation 1, the equations are developed for each vector element, and the equations are arranged as in Equation 2 below. Here, i and j represent the i th row and the j th column when the image data is processed in macroblock units.

Figure 112004057388975-pat00002
Figure 112004057388975-pat00002

상기 수학식2의 좌변과 우변 각각에서 공통인 zij 2 를 고려하여 식을 정리하면 아래의 수학식3과 같이 정리될 수 있다.When the equations are arranged in consideration of z ij 2 common to each of the left and right sides of Equation 2, Equation 3 may be summarized as follows.

Figure 112004057388975-pat00003
Figure 112004057388975-pat00003

상기 수학식3에 대하여 상관 관계(correlation) 연산 'o'를 고려하여 다시 정리하면 다음의 수학식4와 같이 표현된다.When the equation 3 is rearranged in consideration of the correlation operation 'o', it is expressed as Equation 4 below.

Figure 112004057388975-pat00004
Figure 112004057388975-pat00004

수학식4를 살펴보면 벡터의 크기의 제곱을 상관 관계 계산에 의하여 구할 수 있음을 알 수 있다. 즉, 벡터 Z와 비교 대상인 벡터 X와 Y 중에서 어떤 벡터가 벡 터 Z와 더 유사한가를 벡터 Z와 벡터 X와의 상관 관계 계산, 벡터 Z와 벡터 Y와의 상관 관계의 계산으로부터 구할 수 있으며, 앞의 예제에서는 벡터 X가 벡터 Y 보다 벡터 Z와 더 유사한 경우이므로 수학식4에서 좌변의 값이 우변의 값 보다 더 큰 값(유사성이 더 높은 경우)으로 간주되고 있음을 표현하고 있다.Looking at Equation 4, it can be seen that the square of the magnitude of the vector can be obtained by correlation calculation. In other words, which of the vectors X and Y to be compared with the vector Z is similar to the vector Z can be obtained from the calculation of the correlation between the vector Z and the vector X and the calculation of the correlation between the vector Z and the vector Y. In Equation 4, since the vector X is more similar to the vector Z than the vector Y, Equation 4 indicates that the value on the left side is considered to be greater than the value on the right side (when the similarity is higher).

그러면, 이와 같이 상관 관계를 기반으로 하여 프레임 간 중복성이 제거된 움직임 보상 기법을 수행하는 과정을 구체적으로 벡터 간의 차를 최소화시키는 움직임 벡터 찾기 과정에 적용시켜 본다.Then, the process of performing the motion compensation technique in which the inter-frame redundancy is removed based on the correlation is specifically applied to the motion vector search process that minimizes the difference between the vectors.

먼저, 현재 프레임의 매크로 블록 X와 비교 대상인 참조 프레임의 i,j번째 매크로 블록 Y(i,j)에 대하여 거리의 제곱이 최소인 매크로 블록 min(i,j)의 쌍을 구하는 과정이 곧 유사성이 가장 높은 매크로 블록을 찾은 과정이 되며, 이를 수식으로 표현하면 아래의 수학식5와 같이 정리된다.First, the process of finding a pair of macro blocks min (i, j) having a least squared distance with respect to the i, j-th macro block Y (i, j) of the reference frame to be compared with the macroblock X of the current frame is similarity. This is the process of finding the highest macro block, which is expressed as an expression, as shown in Equation 5 below.

Figure 112004057388975-pat00005
Figure 112004057388975-pat00005

앞서 설명한 바와 같이 현재 프레임의 매크로 블록 X와 참조 프레임의 매크로 블록 Y(i,j)을 나타내는 움직임 벡터들 간의 거리의 제곱이 최소가 되는 것을 가장 유사성이 높다고 간주할 수 있고, 이는 바꾸어 말하면 현재 프레임의 매크로 블록 X와 참조 프레임의 매크로 블록 Y(i,j)의 상관 관계를 계산하였을 때 그 상관성이 가장 높은 경우를 유사성이 가장 높다고 간주할 수 있음을 의미한다.As described above, the smallest square of the distance between the motion vector representing the macroblock X of the current frame and the macroblock Y (i, j) of the reference frame may be regarded as having the highest similarity, that is, the current frame When the correlation between the macroblock X and the macroblock Y (i, j) of the reference frame is calculated, it means that the highest correlation can be regarded as the highest similarity.

그러므로 상기 수학식5에 의해서 표현되는 블록 매칭의 기법은 곧 상기 수학식3과 같은 형식으로 표현되는 상관 관계를 이용한 수식에 적용하였을 때 그 계산된 값이 최대인 max(i,j)를 구하는 것과 같은 의미가 된다. 즉, 현재 프레임의 매크로 블록 X와 참조 프레임의 매크로 블록 Y(i,j)의 상관 관계(correlation)를 이용한 수식으로 정리하면 다음의 수학식6과 같이 표현될 수 있다.Therefore, the block matching technique represented by Equation (5) is equivalent to finding max (i, j) having the maximum value when applied to an equation using a correlation expressed in the form of Equation (3). The same meaning. That is, if the expression is summarized using a correlation between the macroblock X of the current frame and the macroblock Y (i, j) of the reference frame, it may be expressed as Equation 6 below.

Figure 112004057388975-pat00006
Figure 112004057388975-pat00006

상기 수학식6에 따르면 MSE 방식은 상관 관계를 최대화시키는 방법과 차이가 있음을 알 수 있으며, 현재 프레임의 매크로 블록 X와, 비교 대상인 참조 프레임의 매크로 블록 Y(i,j) 간의 상관 관계를 계산하여 그 값이 최대인 max(i,j)을 구하면 이 매크로 블록이 인코딩하려는 매크로 블록과 가장 유사한 이전 프레임에서의 매크로 블록이라고 간주할 수 있다는 것이다.According to Equation 6, it can be seen that the MSE method is different from the method of maximizing correlation, and the correlation between the macroblock X of the current frame and the macroblock Y (i, j) of the reference frame to be compared is calculated. If we obtain max (i, j) with the maximum value, we can think of this macroblock as the macroblock in the previous frame most similar to the macroblock to be encoded.

그런데, 직관적인 관점에서 본다면 유사성이 높다는 것은 두 벡터 간의 거리가 아니라 두 벡터 간의 각도가 작은 경우라고 할 수 있다. 즉, 도2에 나타낸 바와 같이 벡터 da와 비교 대상인 벡터 db 간의 거리 dab의 제곱(MSE)과, 벡터 da와 비교 대상인 또 다른 벡터 dc 간의 거리 dac의 제곱(MSE)을 비교해 볼 때 d2 ac < d2 ab 의 관계가 성립한다면, 벡터da와 비교 대상인 벡터 db와의 각도 θab 보다 벡터 da와 비교 대상인 벡터 dc와의 각도 θac 가 더 작은 경우, 즉 θac < θab 라고 할 수 있는 것이다.However, from an intuitive point of view, high similarity is not a distance between two vectors but a small angle between two vectors. That is, as shown in FIG. 2, the square (MSE) of the distance d ab between the vector d a and the target vector d b is compared with the square of the distance d ac between the vector d a and another vector d c to be compared. If the relationship d 2 ac <d 2 ab is established, the angle θ ac with the vector d a and the comparison target vector d c is smaller than the angle θ ab between the vector d a and the comparison target vector d b , that is, θ ac.ab can be said.

시각적인 관점에서 볼 때에도 두 영상의 각도가 커진다는 것은 영상의 상관 관계가 줄어드는 경우이지만, 크기가 다른 것은 단지 영상의 밝기(brightness)가 다른 경우이기 때문에, 비교 대상인 두 매크로 블록 벡터 간의 각도가 작은 경우를 유사성이 높다는 것으로 간주하는 것은 블록 매칭의 의도에 더욱 부합된다고 할 수 있다.Even from a visual point of view, an increase in the angle of the two images is a case where the correlation between the images is reduced, but because the difference in size is only a case where the brightness of the image is different, the angle between the two macroblock vectors to be compared is small. Considering the case as having high similarity can be said to be more in accordance with the intention of block matching.

이와 같이 상관성을 기반으로 하여 움직임 보상을 수행하기 위하여 본 발명에서는 스케일링 팩터(scaling factor) λ를 고려한다. 즉, 비교 대상인 되는 매크로 블록 벡터의 크기에 적절한 스케일링 팩터를 곱함으로써 매크로 블록의 근본적인 특성을 손상하지 않으면서 최대한 유사하게 만들 수 있다. 도3에 스케일링 팩터 λ를 적용한 경우의 두 벡터 간의 관계에 대해서 예를 도시하였다. 도3에서 살펴보면 비교 대상인 벡터 dc에 스케일링 팩터 λ를 곱하여 d'c를 만들었고, 이 벡터와의 거리 d'ac가 표현되었다.As described above, in order to perform motion compensation based on correlation, the scaling factor λ is considered in the present invention. In other words, by multiplying the size of the macroblock vector to be compared with an appropriate scaling factor, it can be made as similar as possible without compromising the fundamental characteristics of the macroblock. 3 illustrates an example of a relationship between two vectors in the case where the scaling factor λ is applied. Referring to FIG. 3, the vector d c to be compared is multiplied by the scaling factor λ to make d ' c , and the distance d' ac from the vector is represented.

이와 같이 최소의 각을 가지는 매크로 블록 벡터를 이용한 움직임 보상이 효과가 있음을 알 수 있다. 그런데, 계산에 의해서 현재 프레임의 매크로 블록 벡터 da와 직교(orthogonal)하는 벡터 d'c를 만들기 위한 스케일링 팩터 λ를 찾는 것은 복잡도가 너무 높기 때문에 본 발명에서는 참조되는 매크로 블록과 동일한 크기를 가지는 것으로 간주하여 스케일링 팩터 λ를, λ= ∥Y(i,j)∥/∥X∥ 로 선정한다.As such, it can be seen that motion compensation using a macroblock vector having a minimum angle is effective. However, since it is too complicated to find the scaling factor λ for making the vector d' c orthogonal to the macroblock vector d a of the current frame by calculation, the present invention has the same size as the macroblock referred to in the present invention. Considering the scaling factor λ, λ = ∥Y (i, j) ∥ / ∥X∥.

즉, 현재 프레임 매크로 블록 X와 참조 프레임의 i,j 번째 매크로 블록 Y(i,j) 간의 유사성이 가장 높은 경우를 찾는데 있어서 스케일링 팩터 λ를 고려하여 다음의 수학식7로 표현되는 검색 과정을 수행하는 것이다.That is, in searching for the case where the similarity between the current frame macroblock X and the i, j-th macroblock Y (i, j) of the reference frame is the highest, the search process represented by Equation 7 is performed in consideration of the scaling factor λ. It is.

Figure 112004057388975-pat00007
Figure 112004057388975-pat00007

도4는 상기 수학식7로 표현된 결과를 2차원 또는 3차원 벡터에 적용한 예를 보여주고 있다. 즉, d'c = da로 간주하여 벡터 dc와 직교하는 관계를 만들어 주고, 두 벡터 간의 상관 관계를 계산하여 현재 프레임의 매크로 블록과 가장 유사한 매크로 블록을 참조 프레임에서 찾는 것이다.4 shows an example in which the result represented by Equation 7 is applied to a two-dimensional or three-dimensional vector. In other words, it considers d ' c = d a to make a relationship orthogonal to the vector d c , calculates correlation between the two vectors, and finds the macro block most similar to the macro block of the current frame in the reference frame.

도5는 지금까지 설명한 상관성 기반 움직임 보상 기법과 이를 적용한 인코딩 방법을 개략적으로 보여준다.5 schematically shows a correlation-based motion compensation technique and an encoding method using the same as described above.

제1 단계(S51)는 현재 프레임의 매크로 블록 X를 선택하는 단계이다. 제2 단계(S52)는 상기 현재 프레임의 매크로 블록 X와 비교 대상이 될 이전 프레임(참조 프레임)의 매크로 블록 Y(i,j)를 선택하는 단계이다. 제3 단계(S53)는 상기 수학식7로 표현되는 상관관계 계산을 통해서 현재 프레임의 매크로 블록 X와 이전의 참조 프레임 매크로 블록 Y(i,j) 간의 유사성을 검색하여 가장 유사성이 높은 경우를 찾는 매크로 블록 매칭 과정이다. 이러한 일련의 과정을 수행하여 구한 움직임 벡터를 기반으로 상기 도1에서 설명한 바와 같은 제4 단계(S54)의 인코딩(encoding)을 수행함으로써 프레임 간의 중복성이 최대한 제거된 상태로 압축된 동영상 데이터를 부호화하게 되는 것이다.The first step S51 is to select the macro block X of the current frame. The second step S52 is a step of selecting the macroblock Y (i, j) of the previous frame (reference frame) to be compared with the macroblock X of the current frame. The third step S53 searches for similarity between the macroblock X of the current frame and the previous reference frame macroblock Y (i, j) through the correlation calculation represented by Equation 7 to find a case where the highest similarity is found. Macro block matching process. Based on the motion vector obtained by performing such a series of processes, encoding of the compressed video data with the redundancy between frames as possible as possible is performed by performing the encoding of the fourth step S54 as described in FIG. Will be.

본 발명은 MPEG이나 H.26x 계열의 동영상 압축시에 프레임 간의 중복성을 최대한 제거하여 압축 효율을 높일 수 있는 기반을 제공한다. 특히 본 발명에서는 기존의 두 벡터 간의 거리의 제곱이 가장 작은 경우를 유사성이 가장 높은 것으로 간주하는 MSE(Mean Square Error) 기법 대신, 상관관계(correlation)를 이용해서 움직임 보상이 이루어지도록 함으로써, 보다 우수한 압축 성능을 가질 수 있고, 압축율 향상에 따른 데이터 저장이나 전송상의 부담 경감이 가능한 동영상 코덱(VIDEO CODEC)의 구현이 가능하게 한다.The present invention provides a basis for increasing compression efficiency by removing redundancy between frames as much as possible when compressing MPEG or H.26x video. In particular, in the present invention, instead of the mean square error (MSE) technique, which considers the smallest square of the distance between two vectors, the motion compensation is performed by using correlation, which is more excellent. It can have a compression performance, it is possible to implement a video codec (VIDEO CODEC) that can reduce the burden on data storage or transmission due to the improvement of the compression rate.

Claims (6)

현재 프레임의 매크로 블록 X와 비교 대상이 되는 참조 프레임 매크로 블록 Y(i,j)를 선택하는 단계;Selecting a reference frame macro block Y (i, j) to be compared with the macro block X of the current frame; 현재 프레임의 매크로 블록 X와 비교 대상이 되는 참조 프레임의 매크로 블록 Y(i,j)의 움직임 벡터 비교를 위하여 비교 대상이 되는 매크로 블록 벡터의 크기에 적합한 스케일링 팩터(scaling factor)(λ)를 선정하는 단계; 및A scaling factor (λ) suitable for the size of the macroblock vector to be compared is selected for comparing the motion vector of the macroblock X (i, j) of the reference frame to be compared with the macroblock X of the current frame. Doing; And 상기 스케일링 팩터(λ)를 고려하여 현재 매크로 블록 X와 비교 대상인 매크로 블록 Y(i,j)의 상관성(d)이 최대인 매크로 블록을 검색하는 단계;Searching for a macroblock having a maximum correlation (d) between the current macroblock X and the macroblock Y (i, j) to be compared with the current scaling factor in consideration of the scaling factor λ; 를 포함하여 이루어지는 것을 특징으로 하는 상관성 기반 움직임 보상방법.Correlation-based motion compensation method characterized in that it comprises a. 제 1 항에 있어서, 상기 비교되는 두 벡터 간의 상관성이 높다는 것은 두 벡터 간의 각도가 작다는 것을 기반으로 매크로 블록 매칭이 이루어진다는 것임을 특징으로 하는 상관성 기반 움직임 보상방법.The correlation-based motion compensation method of claim 1, wherein the correlation between the two vectors to be compared is that macro block matching is performed based on a small angle between the two vectors. 제 1 항에 있어서, 상기 스케일링 팩터(λ)를 비교 대상 매크로 블록 Y(i,j)에 곱함으로써 매크로 블록의 근본적인 특성을 손상하지 않으면서 두 벡터 간의 각 도가 최소가 되는 매크로 블록을 검색함을 특징으로 하는 상관성 기반 움직임 보상방법.2. The method of claim 1, wherein the scaling factor λ is multiplied by the comparison macro block Y (i, j) to search for a macroblock having a minimum angle between two vectors without impairing the fundamental characteristics of the macroblock. A correlation based motion compensation method characterized by the above. 제 1 항에 있어서, 상기 스케일링 팩터(λ)는 참조되는 매크로 블록과 동일한 크기를 가지는 것으로 간주함을 특징으로 하는 상관성 기반 움직임 보상방법.2. The method of claim 1, wherein the scaling factor (λ) is regarded as having the same size as the referenced macroblock. 제 1 항에 있어서,The method of claim 1, 상기 상관성이 최대인 매크로블록을 검색하는 단계는,The searching of the macroblock having the maximum correlation may include: [d = maxij{(λㆍX)oY(i,j)}ij (단, o는 상관관계 연산)] 로 표현되는 검색과정을 수행하는 단계를 포함하는 것을 특징으로 하는 상관성 기반 움직임 보상방법.A correlation-based motion compensation method comprising the step of performing a search process represented by [d = max ij {(λ · X) oY (i, j)} ij (where o is a correlation operation)]. . 제 5 항에 있어서, 상기 스케일링 팩터(λ)는 참조되는 매크로 블록과 동일한 크기를 가지는 것으로 간주되어, 스케일링 팩터(λ) = ∥Y(i,j)∥/∥X∥로 선정되고, 이에 따라 상기6. The scaling factor (λ) according to claim 5, wherein the scaling factor (λ) is considered to have the same size as the macro block to which it is referred, so that scaling factor (λ) = ∥Y (i, j) ∥ / ∥X∥ is selected accordingly. remind [d = maxij{[(∥Y(i,j)∥/∥X∥)ㆍX]oY(i,j)}ij 로 표현되는 검색과정이 수행됨을 특징으로 하는 상관성 기반 움직임 보상방법. [d = max ij {[( ∥Y (i, j) ∥ / ∥X∥) and X] oY (i, j) } correlation-based motion compensation method according to the search process, represented by the characteristic ij carried out.
KR1020040101888A 2004-12-06 2004-12-06 Method of motion compensation based on correlation KR100669635B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020040101888A KR100669635B1 (en) 2004-12-06 2004-12-06 Method of motion compensation based on correlation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020040101888A KR100669635B1 (en) 2004-12-06 2004-12-06 Method of motion compensation based on correlation

Publications (2)

Publication Number Publication Date
KR20060062891A KR20060062891A (en) 2006-06-12
KR100669635B1 true KR100669635B1 (en) 2007-01-15

Family

ID=37158968

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020040101888A KR100669635B1 (en) 2004-12-06 2004-12-06 Method of motion compensation based on correlation

Country Status (1)

Country Link
KR (1) KR100669635B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0155731B1 (en) * 1993-03-31 1998-11-16 김광호 Image-compressing method and apparatus thereof
KR20030064332A (en) * 2002-01-25 2003-07-31 마이크로소프트 코포레이션 Improved video coding methods and apparatuses

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0155731B1 (en) * 1993-03-31 1998-11-16 김광호 Image-compressing method and apparatus thereof
KR20030064332A (en) * 2002-01-25 2003-07-31 마이크로소프트 코포레이션 Improved video coding methods and apparatuses

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
1001557310000 *
1020030064332 *

Also Published As

Publication number Publication date
KR20060062891A (en) 2006-06-12

Similar Documents

Publication Publication Date Title
US8908765B2 (en) Method and apparatus for performing motion estimation
US6438168B2 (en) Bandwidth scaling of a compressed video stream
US8665960B2 (en) Real-time video coding/decoding
KR960010198B1 (en) Motion estimation apparatus and method for moving image encoder
US9008178B2 (en) Method for decoding a stream of coded data representative of a sequence of images and method for coding a sequence of images
US20040105586A1 (en) Method and apparatus for estimating and controlling the number of bits output from a video coder
US7751631B2 (en) Bypass using sum of absolute transformed differences value (SATD) in a video coding process
KR101482896B1 (en) Optimized deblocking filters
US8149918B2 (en) Method of estimating coded block pattern and method of determining block mode using the same for moving picture encoder
US20090257506A1 (en) Estimation of p frame average rate quantization parameter (qp) in a group of pictures (gop)
US20120008686A1 (en) Motion compensation using vector quantized interpolation filters
US8199823B2 (en) Estimation of B frame average rate quantization parameter (QP) in a group of pictures (GOP)
KR100961760B1 (en) Motion Estimation Method and Apparatus Which Refer to Discret Cosine Transform Coefficients
KR20050089838A (en) Video encoding with skipping motion estimation for selected macroblocks
US8199814B2 (en) Estimation of I frame average rate quantization parameter (QP) in a group of pictures (GOP)
US20120008687A1 (en) Video coding using vector quantized deblocking filters
US8194740B2 (en) Apparatus and method for compression-encoding moving picture
KR100727988B1 (en) Method and apparatus for predicting DC coefficient in transform domain
WO2006074043A2 (en) Method and apparatus for providing motion estimation with weight prediction
JP2004215275A (en) Motion compensation based improved noise prediction method and apparatus, and moving image encoding method and apparatus using the same
KR20060029540A (en) Method for selecting output motion vector based on motion vector refinement and transcoder using the same
WO2019189904A1 (en) Intra prediction device, image encoding device, image decoding device, and program
KR100669635B1 (en) Method of motion compensation based on correlation
WO2002073974A1 (en) Video encoder and recording apparatus
JP4642033B2 (en) A method for obtaining a reference block of an image by an encoding method in which the number of reference frames is fixed.

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
LAPS Lapse due to unpaid annual fee