JP5171675B2 - Image processing apparatus and imaging apparatus equipped with the same - Google Patents

Image processing apparatus and imaging apparatus equipped with the same Download PDF

Info

Publication number
JP5171675B2
JP5171675B2 JP2009022842A JP2009022842A JP5171675B2 JP 5171675 B2 JP5171675 B2 JP 5171675B2 JP 2009022842 A JP2009022842 A JP 2009022842A JP 2009022842 A JP2009022842 A JP 2009022842A JP 5171675 B2 JP5171675 B2 JP 5171675B2
Authority
JP
Japan
Prior art keywords
motion vector
search range
unit
target
global motion
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2009022842A
Other languages
Japanese (ja)
Other versions
JP2010183180A (en
Inventor
裕夫 石井
伸郎 中井
茂之 岡田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2009022842A priority Critical patent/JP5171675B2/en
Publication of JP2010183180A publication Critical patent/JP2010183180A/en
Application granted granted Critical
Publication of JP5171675B2 publication Critical patent/JP5171675B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、動画像を符号化するための画像処理装置およびそれを用いた撮像装置に関する。   The present invention relates to an image processing apparatus for encoding a moving image and an imaging apparatus using the same.

近年、動画を撮影することができるデジタルムービーカメラが普及してきている。デジタルムービーカメラは、年々、高画質化しており、フルHD(High Definiton)画質に対応したものも実用化されている。それに伴い画像圧縮効率の高いH.264/AVC規格で動画像を圧縮符号化するデジタルムービーカメラも実用化されている。   In recent years, digital movie cameras capable of shooting moving images have become widespread. Digital movie cameras have improved image quality year by year, and those compatible with full HD (High Definiton) image quality have also been put into practical use. Accordingly, H.H. has high image compression efficiency. Digital movie cameras that compress and code moving images according to the H.264 / AVC standard have also been put into practical use.

動画像の圧縮符号化および復号では、フレームメモリに動画像のフレームを蓄積し、フレームメモリを参照して、動き補償を行うので、フレームメモリからのデータ転送が頻繁に行われる。特により高画質の動画を生成するために、動き探索を小数画素単位で行うことがあり、動き補償で扱うデータ量が増加する。このため、メモリ帯域幅が処理のボトルネックとなりやすい。   In compression encoding and decoding of a moving image, moving image frames are stored in a frame memory, and motion compensation is performed with reference to the frame memory. Therefore, data transfer from the frame memory is frequently performed. In particular, in order to generate a higher-quality moving image, motion search may be performed in units of decimal pixels, and the amount of data handled by motion compensation increases. For this reason, memory bandwidth tends to be a bottleneck for processing.

特許文献1には、フレームメモリのバンド幅の使用効率を改善することのできるディジタル画像復号装置が開示されている。   Patent Document 1 discloses a digital image decoding apparatus that can improve the bandwidth use efficiency of a frame memory.

特開平11−298903号公報JP 11-298903 A

動画像の圧縮符号化の際、符号化対象画像フレームの対象マクロブロックの動き検出をするために、参照画像の所定の探索範囲内の画素領域をフレームメモリから読み出し、その画素領域内で対象マクロブロックとマッチングするマクロブロックを探索する。このとき、対象マクロブロックの動きをあらかじめ予測し、参照画像において、対象マクロブロックが存在するだろうと予測された位置を含めるように探索範囲を設定すると、効率良く動き検出を行うことができる。しかしながら、予測した動きが大きい場合は、大きな探索範囲を設定しなければならず、フレームメモリからの読み出し回数が多くなり、データ転送量も増え、フレームメモリの転送帯域幅を圧迫する。このため、フレームメモリへのアクセスがボトルネックとなって、圧縮符号化の処理速度が低下するという問題が生じる。   When performing compression encoding of a moving image, in order to detect motion of the target macroblock of the encoding target image frame, a pixel area within a predetermined search range of the reference image is read from the frame memory, and the target macro is read within the pixel area. Search for a macroblock that matches the block. At this time, if the motion of the target macroblock is predicted in advance and the search range is set so as to include the position where the target macroblock is predicted to exist in the reference image, motion detection can be performed efficiently. However, when the predicted motion is large, a large search range must be set, the number of times of reading from the frame memory increases, the amount of data transfer increases, and the transfer bandwidth of the frame memory is reduced. For this reason, access to the frame memory becomes a bottleneck, which causes a problem that the processing speed of compression encoding decreases.

本発明はこのような状況に鑑みてなされたものであり、フレームメモリへのアクセスを減らして、符号化の処理効率を高めることのできる画像処理装置およびそれを搭載した撮像装置を提供することを目的とする。   The present invention has been made in view of such circumstances, and provides an image processing apparatus capable of reducing the access to the frame memory and increasing the processing efficiency of the encoding, and an imaging apparatus equipped with the image processing apparatus. Objective.

本発明のある態様は、画像処理装置である。この画像処理装置は、対象ピクチャの単位領域ごとの動きベクトルを検出する第1の検出部と、前記動きベクトルから前記対象ピクチャ内または前記対象ピクチャ内に定義される領域内での大域動きベクトルを検出する第2の検出部と、前記大域動きベクトルの大きさが所定のしきい値より大きい場合、前記動きベクトルを検出する際に参照する参照ピクチャにおいて、前記動きベクトルを検出する対象単位領域の位置と同じ位置の周辺に第1の探索範囲を設定するとともに、前記大域動きベクトルから予測した前記対象単位領域の移動先の位置の周辺に第2の探索範囲を設定するように前記第1の検出部を制御する制御部と、を備えることを特徴とする画像処理装置である。   One embodiment of the present invention is an image processing apparatus. The image processing apparatus includes: a first detection unit that detects a motion vector for each unit region of a target picture; and a global motion vector in the target picture or a region defined in the target picture from the motion vector. A second detection unit to detect, and when the size of the global motion vector is larger than a predetermined threshold, in a reference picture to be referred to when detecting the motion vector, a target unit region for detecting the motion vector The first search range is set around the same position as the position, and the first search range is set around the destination position of the target unit region predicted from the global motion vector. An image processing apparatus comprising: a control unit that controls the detection unit.

また、前記制御部は、前記動きベクトルの大きさが所定のしきい値より小さい場合、前記参照ピクチャにおいて、前記対象単位領域の位置と同じ位置の周辺に第3の探索範囲を設定するように前記第1の検出部を制御することが好ましい。   In addition, when the magnitude of the motion vector is smaller than a predetermined threshold, the control unit sets a third search range around the same position as the position of the target unit region in the reference picture. It is preferable to control the first detection unit.

また、前記制御部は、前記第3の探索範囲に大きさに基づいて前記しきい値を規定することが好ましい。   Moreover, it is preferable that the said control part prescribes | regulates the said threshold value based on a magnitude | size to the said 3rd search range.

本発明よれば、動画像の動き検出の処理効率を向上することができる。   According to the present invention, it is possible to improve the processing efficiency of motion detection of moving images.

本発明の実施の形態における撮像装置1の構成を示す概念図1 is a conceptual diagram illustrating a configuration of an imaging device 1 according to an embodiment of the present invention. 大域動きベクトルがしきい値より小さい場合に設定された探索範囲の一例Example of search range set when global motion vector is smaller than threshold 大域動きベクトルがしきい値より大きい場合に設定された探索範囲の一例Example of search range set when global motion vector is greater than threshold 大域動きベクトルにより探索範囲を決定するフローチャートFlow chart for determining a search range by a global motion vector

本発明を具体的に説明する前に概要について述べる。本発明の実施の形態に係る画像処理装置は、H.264/AVC規格に準拠した圧縮符号化を行う。   The outline will be described before the present invention is specifically described. An image processing apparatus according to an embodiment of the present invention is described in H.264. Compressive encoding conforming to the H.264 / AVC standard is performed.

H.264/AVC規格では、画面内予測符号化を行う画像フレームをI(Intra)フレーム、過去のフレームを参照画像として順方向の画面間予測符号化を行う画像フレームをP(Predictive)フレーム、時間の前後を問わず、また参照画像として利用できるフレームの枚数も問わず画面間予測符号化を行う画像フレームをB(Bi−predictive)フレームという。   H. In the H.264 / AVC standard, an image frame to be subjected to intra-frame predictive coding is an I (Intra) frame, an image frame to be subjected to forward inter-frame predictive coding with a past frame as a reference image, a P (Predictive) frame, An image frame for which inter-frame predictive coding is performed regardless of before and after and regardless of the number of frames that can be used as a reference image is referred to as a B (Bi-predictive) frame.

ここで、本願明細書では、フレームとピクチャとは同じ意味で用いており、Iフレーム、Pフレーム、Bフレームは、それぞれIピクチャ、Pピクチャ、Bピクチャともいう。また、本願明細書では、フレームを例に挙げて説明するが、符号化の単位はフィールドであってもよい。   Here, in this specification, a frame and a picture are used in the same meaning, and an I frame, a P frame, and a B frame are also referred to as an I picture, a P picture, and a B picture, respectively. In the present specification, a frame is taken as an example, but the unit of encoding may be a field.

画面間予測符号化する場合、符号化対象画像フレームの対象マクロブロックの動きを検出するために参照する参照画像に所定の探索範囲を設定し、その探索範囲内で対象マクロブロックとマッチングするマクロブロックを探索する。探索範囲は、参照画像における対象マクロブロックの位置と同じ位置の周辺に設定するのが一般的である。対象マクロブロックの動きをある程度予測できる場合は、参照画像において対象マクロブロックの予測移動先の位置の周辺でマッチングが取れる確率が高いので、対象マクロブロックの予測移動先の位置まで含まれるように探索範囲を設定すると効率良く動き検出を行える。   In the case of inter-screen predictive coding, a predetermined search range is set in a reference image that is referred to in order to detect the motion of the target macroblock in the encoding target image frame, and the macroblock that matches the target macroblock within the search range Explore. The search range is generally set around the same position as the position of the target macroblock in the reference image. If the motion of the target macroblock can be predicted to some extent, there is a high probability of matching around the predicted movement destination position of the target macroblock in the reference image. Setting the range enables efficient motion detection.

このとき、対象マクロブロックが激しく動くと予測される場合は、探索範囲を大きくする必要があるが、大きな探索範囲を設定すると、フレームメモリへのアクセスがボトルネックとなって、圧縮符号化の処理速度が低下する。   At this time, if the target macroblock is predicted to move violently, it is necessary to increase the search range. However, if a large search range is set, access to the frame memory becomes a bottleneck, and compression encoding processing is performed. The speed is reduced.

そこで、本発明の実施の形態に係る画像処理装置は、対象マクロブロックごとの動きベクトルを検出し、対象マクロブロックが含まれる大域領域全体の動きを表す大域動きベクトルを算出し、大域動きベクトルが所定のしきい値より大きい場合、参照画像における対象マクロブロックの位置と同じ位置の周辺に探索範囲(以下適宜、第1の探索範囲という)を設定するとともに、第1の探索範囲とは別に、参照画像において、大域動きベクトルから予測した対象マクロブロックの移動先の位置の周辺に探索範囲(以下適宜、第2の探索範囲という)を設定する。   Therefore, the image processing apparatus according to the embodiment of the present invention detects a motion vector for each target macroblock, calculates a global motion vector that represents the motion of the entire global region including the target macroblock, and the global motion vector is When larger than the predetermined threshold, a search range (hereinafter referred to as a first search range as appropriate) is set around the same position as the target macroblock in the reference image, and separately from the first search range, In the reference image, a search range (hereinafter, appropriately referred to as a second search range) is set around the position of the movement destination of the target macroblock predicted from the global motion vector.

これにより、大きな探索範囲を設定しなくても、参照画像における対象マクロブロックの位置と同じ位置の周辺と、対象マクロブロックの予測移動先の位置の周辺とを探索範囲に含めることができるので、高速かつ高精度に動きベクトルを検出することができる。   Thus, even without setting a large search range, the search range can include the periphery of the same position as the position of the target macroblock in the reference image and the vicinity of the predicted movement destination position of the target macroblock. A motion vector can be detected at high speed and with high accuracy.

図1は、本発明の実施の形態における撮像装置1の構成を示す概念図である。撮像装置1は撮像部10および画像処理装置20を含む。   FIG. 1 is a conceptual diagram illustrating a configuration of an imaging apparatus 1 according to an embodiment of the present invention. The imaging device 1 includes an imaging unit 10 and an image processing device 20.

撮像部10は、動画像を取得し画像処理装置20に供給する。撮像部10は、CCD(Charge Coupled Devices)センサやCMOS(Complementary Metal Oxide Semiconductor)イメージセンサなどの固体撮像素子、固体撮像素子からアナログの三原色信号をデジタルの輝度信号および色差信号に変更する信号処理部を含む。   The imaging unit 10 acquires a moving image and supplies it to the image processing device 20. The imaging unit 10 is a solid-state imaging device such as a CCD (Charge Coupled Devices) sensor or a CMOS (Complementary Metal Oxide Semiconductor) image sensor, or a signal processing unit that changes an analog three primary color signal from the solid-state imaging device to a digital luminance signal and a color difference signal. including.

画像処理装置20は、撮像部10から取得した動画像を、例えば、H.264/AVC規格に従い圧縮符号化して符号化ストリームを生成し、図示しない記録部(例えば、HDD(Hard Disk Drive)、光ディスク、フラッシュメモリなど)に出力する。   The image processing apparatus 20 uses a moving image acquired from the imaging unit 10 as, for example, H.264. An encoded stream is generated by compression encoding according to the H.264 / AVC standard, and output to a recording unit (not shown) (for example, HDD (Hard Disk Drive), optical disk, flash memory, etc.).

画像処理装置20は、差分部201、直交変換部202、量子化部203、可変長符号化部204、出力バッファ205、逆量子化部206、逆直交変換部207、加算部208、局所動きベクトル検出部209、動き補償部210、フレームメモリ211、大域動きベクトル算出部212および制御部213を含む。   The image processing apparatus 20 includes a difference unit 201, an orthogonal transformation unit 202, a quantization unit 203, a variable length coding unit 204, an output buffer 205, an inverse quantization unit 206, an inverse orthogonal transformation unit 207, an addition unit 208, a local motion vector. A detection unit 209, a motion compensation unit 210, a frame memory 211, a global motion vector calculation unit 212, and a control unit 213 are included.

差分部201は、撮像部201から入力された画像フレームがIフレームであれば、そのまま直交変換部202に出力する。PフレームまたはBフレームであれば、動き補償部210から入力された予測画像との差分を計算して直交変換部202に出力する。   If the image frame input from the imaging unit 201 is an I frame, the difference unit 201 outputs it to the orthogonal transformation unit 202 as it is. If the frame is a P frame or a B frame, the difference from the predicted image input from the motion compensation unit 210 is calculated and output to the orthogonal transform unit 202.

直交変換部202は、差分部201から入力された差分画像を離散コサイン変換(DCT)し、DCT係数を量子化部203に出力する。   The orthogonal transform unit 202 performs discrete cosine transform (DCT) on the difference image input from the difference unit 201 and outputs DCT coefficients to the quantization unit 203.

量子化部203は、直交変換部202から入力されたDCT係数を、所定の量子化テーブルを参照して量子化し、可変長符号化部204に出力する。量子化テーブルは、各DCT係数を除算すべき量子化スケールを規定したものである。量子化テーブルは、DCT係数のうち低周波成分に対応する量子化スケールを小さく、高周波成分に対応する量子化スケールを大きく設定する。これにより、高周波成分ほど省略を大きくする。また、量子化部203は、量子化DCT係数を逆量子化部206にも出力する。   The quantization unit 203 quantizes the DCT coefficient input from the orthogonal transform unit 202 with reference to a predetermined quantization table, and outputs it to the variable length coding unit 204. The quantization table defines a quantization scale on which each DCT coefficient is to be divided. In the quantization table, the quantization scale corresponding to the low frequency component of the DCT coefficient is set small, and the quantization scale corresponding to the high frequency component is set large. Thereby, omission is enlarged as the high frequency component. The quantization unit 203 also outputs the quantized DCT coefficient to the inverse quantization unit 206.

可変長符号化部204は、量子化部203から入力された量子化DCT係数、動きベクトル検出部209で検出された動きベクトル、およびその他のパラメータなどをエントロピー符号化して出力バッファ205に出力する。   The variable length encoding unit 204 entropy encodes the quantized DCT coefficient input from the quantization unit 203, the motion vector detected by the motion vector detection unit 209, and other parameters, and outputs the result to the output buffer 205.

出力バッファ205は、可変長符号化部204から入力された符号化ストリームを一時記憶し、所定のタイミングで図示しない記録部に出力するか、あるいは、ネットワークに送出する。   The output buffer 205 temporarily stores the encoded stream input from the variable length encoding unit 204, and outputs the encoded stream to a recording unit (not shown) at a predetermined timing or sends it to a network.

逆量子化部206は、量子化部203から入力された量子化DCT係数を逆量子化して逆直交変換部207に出力する。   The inverse quantization unit 206 performs inverse quantization on the quantized DCT coefficient input from the quantization unit 203 and outputs the quantized DCT coefficient to the inverse orthogonal transform unit 207.

逆直交変換部207は、逆量子化部206から入力された逆量子化DCT係数を逆離散コサイン変換して画像フレームを復元する。   The inverse orthogonal transform unit 207 restores the image frame by performing inverse discrete cosine transform on the inverse quantized DCT coefficient input from the inverse quantization unit 206.

加算部208は、逆直交変換部207から入力された画像フレームがIフレームであれば、そのままフレームメモリ211に格納する。PフレームまたはBフレームであれば、それは差分画像であるため、逆直交変換部207から入力された差分画像と動き補償部210から入力された予測画像とを加算して、元の画像フレームを再構成し、フレームメモリ211に格納する。   If the image frame input from the inverse orthogonal transform unit 207 is an I frame, the adding unit 208 stores the image frame in the frame memory 211 as it is. If it is a P frame or a B frame, it is a difference image, so the difference image input from the inverse orthogonal transform unit 207 and the prediction image input from the motion compensation unit 210 are added to re-create the original image frame. Configured and stored in the frame memory 211.

局所動きベクトル検出部209は、ブロックマッチングによりマクロブロック単位の動きベクトル(以下適宜、局所動きベクトルという)を検出する。このため、局所動きベクトル検出部209は、対象マクロブロックに対して誤差の最も小さい参照画像のマクロブロック(以下適宜、予測マクロブロックという)を探索する。このとき、局所動きベクトル検出部209は、フレームメモリ211に保持された参照画像の所定の探索範囲内の画素データを、図示しないキャッシュメモリに格納し、キャッシュメモリに格納した画像データを参照にしながら、ブロックマッチングを行う。   The local motion vector detection unit 209 detects a motion vector in units of macroblocks (hereinafter, referred to as a local motion vector as appropriate) by block matching. For this reason, the local motion vector detection unit 209 searches for a macroblock of a reference image having the smallest error with respect to the target macroblock (hereinafter, appropriately referred to as a prediction macroblock). At this time, the local motion vector detection unit 209 stores pixel data within a predetermined search range of the reference image held in the frame memory 211 in a cache memory (not shown) while referring to the image data stored in the cache memory. Perform block matching.

局所動きベクトル検出部209は、ブロックマッチングの一例として、対象マクロブロックと、予測マクロブロックの候補となるマクロブロックとの間で、画素データの差分絶対値の総和を算出し、その値が最小となるマクロブロックを予測マクロブロックとする。対象マクロブロックの位置から、検出された予測マクロブロックの位置への動きを示すベクトルが、その対象マクロブロックの局所動きベクトルである。局所動きベクトル検出部209は、検出した局所動きベクトルを可変長符号化部204、動き補償部210および大域動きベクトル算出部212に出力する。   As an example of block matching, the local motion vector detection unit 209 calculates the sum of absolute differences of pixel data between a target macroblock and a macroblock that is a candidate for a predicted macroblock, and the value is the minimum. This macroblock is a predicted macroblock. A vector indicating the motion from the position of the target macroblock to the position of the detected predicted macroblock is the local motion vector of the target macroblock. The local motion vector detection unit 209 outputs the detected local motion vector to the variable length coding unit 204, the motion compensation unit 210, and the global motion vector calculation unit 212.

動き補償部210は、局所動きベクトル検出部209から入力された局所動きベクトルを用いてPフレームまたはBフレームのマクロブロック毎に動き補償を行い、予測画像を生成し、差分部201と加算部208に出力する。   The motion compensation unit 210 performs motion compensation for each macroblock of the P frame or the B frame using the local motion vector input from the local motion vector detection unit 209, generates a prediction image, and the difference unit 201 and the addition unit 208 Output to.

大域動きベクトル算出部212は、符号化対象画像フレームの画面全体または符号化対象画像フレームの特定領域を大域領域とし、大域領域内の大域的な動きを示すベクトル(以下適宜、大域動きベクトルという)を求める。大域動きベクトルは、大域領域全体の動きを表すベクトルである。   The global motion vector calculation unit 212 sets the entire screen of the encoding target image frame or the specific region of the encoding target image frame as a global region, and indicates a global motion in the global region (hereinafter referred to as a global motion vector as appropriate). Ask for. The global motion vector is a vector that represents the motion of the entire global region.

特定領域は、例えば、符号化対象画像フレームの中央付近などあらかじめ定められた領域であってもよく、ユーザが設定した符号化対象画像フレームの任意の領域であってもよい。符号化対象画像フレームに人物等のオブジェクトが写っている場合は、そのオブジェクトが写っている領域であってもよく、動きがある程度共通するマクロブロックが占める領域であってもよい。   The specific area may be a predetermined area such as the vicinity of the center of the encoding target image frame, or may be an arbitrary area of the encoding target image frame set by the user. When an object such as a person is shown in the encoding target image frame, it may be a region where the object is shown, or a region occupied by macroblocks that share some motion.

大域動きベクトル算出部212は、局所動きベクトル検出部209から入力される局所動きベクトルに基づき、大域領域の大域動きベクトルを算出する。例えば、大域動きベクトル算出部212は、大域領域内の局所動きベクトルの平均を求め、大域動きベクトルとする。また、前回算出した大域動きベクトルに対して、大域領域内のマクロブロックごとに局所動きベクトルとの差分を求め、その差分値に応じて前回算出した大域動きベクトルを補正するようにしてもよい。大域動きベクトル算出部212は、算出した大域動きベクトルを制御部213に出力する。   The global motion vector calculation unit 212 calculates a global motion vector for the global region based on the local motion vector input from the local motion vector detection unit 209. For example, the global motion vector calculation unit 212 obtains an average of local motion vectors in the global region and sets it as the global motion vector. In addition, a difference between the global motion vector calculated last time and a local motion vector for each macroblock in the global region may be obtained, and the previously calculated global motion vector may be corrected according to the difference value. The global motion vector calculation unit 212 outputs the calculated global motion vector to the control unit 213.

制御部213は、画像処理装置全体の制御を行う。また、制御部213は、大域動きベクトル算出部212から入力された大域動きベクトルに基づき、局所動きベクトルを検出するための探索範囲を参照画像に設定する。   The control unit 213 controls the entire image processing apparatus. Further, the control unit 213 sets a search range for detecting a local motion vector in the reference image based on the global motion vector input from the global motion vector calculation unit 212.

大域動きベクトルは、大域領域全体の動きを表す動きベクトルであることから、大域動きベクトルの大きさが小さい場合は、大域領域に含まれるマクロブロックの動きもあまり激しくないと予測される。マクロブロックの動きがあまり激しくなければ、対象マクロブロックを中心とする狭い範囲でマッチングが取れる確率も高くなる。そこで、制御部213は、大域動きベクトルの大きさが所定のしきい値より小さい場合、参照画像における対象マクロブロックの位置と同じ位置の周辺に探索範囲(以下適宜、第3の探索範囲という)を設定する。   Since the global motion vector is a motion vector representing the motion of the entire global region, when the size of the global motion vector is small, it is predicted that the motion of the macroblock included in the global region is not so intense. If the movement of the macroblock is not so intense, the probability that matching can be achieved within a narrow range centering on the target macroblock is also increased. Therefore, when the magnitude of the global motion vector is smaller than a predetermined threshold, the control unit 213 searches for a search range around the same position as the target macroblock in the reference image (hereinafter, referred to as a third search range as appropriate). Set.

図2に、大域動きベクトルが所定のしきい値より小さい場合に参照画像に設定された探索範囲の一例を示す。参照画像において、符号化対象画像フレームの対象マクロブロックの位置と同じ位置のマクロブロックを、図中、斜線模様を付したマクロブロック30で示す。また、第3の探索範囲32をマクロブロック30を取り囲む一点鎖線の正方形の領域で示す。ここでは、一例として第3の探索範囲32を縦6マクロブロック×横6マクロブロックの正方形としている。   FIG. 2 shows an example of the search range set in the reference image when the global motion vector is smaller than a predetermined threshold value. In the reference image, a macroblock at the same position as the position of the target macroblock of the encoding target image frame is indicated by a hatched macroblock 30 in the drawing. The third search range 32 is indicated by a dashed-dotted square area surrounding the macroblock 30. Here, as an example, the third search range 32 is a square of 6 vertical macroblocks × 6 horizontal macroblocks.

大域動きベクトルの大きさが大きく場合は、大域領域に含まれるマクロブロックは大きく動きと予想される。対象マクロブロックの動きベクトルと大域動きベクトルとの相関性が強い場合は、参照画像における対象マクロブロックの位置と同じ位置から、大域動きベクトルだけ離れた位置を中心とする範囲でマッチングが取れる確率が高くなる。   When the size of the global motion vector is large, the macroblock included in the global region is predicted to be largely moving. When the correlation between the motion vector of the target macroblock and the global motion vector is strong, there is a probability that matching can be achieved in a range centered on a position separated from the position of the target macroblock in the reference image by the global motion vector. Get higher.

このとき、大域動きベクトルの大きさに応じて、対象マクロブロックを中心として大きな探索範囲を設定すれば、探索範囲内でのマッチングの確率を高めることができるが、フレームメモリ211から局所動きベクトル検出部209への画像データを転送する際の転送負荷が重くなる。   At this time, if a large search range is set around the target macroblock according to the size of the global motion vector, the probability of matching within the search range can be increased. However, local motion vector detection from the frame memory 211 is possible. The transfer load when transferring image data to the unit 209 increases.

そこで制御部213は、参照画像における対象マクロブロックの位置と同じ位置の周辺に探索範囲(第1の探索範囲)を設定するとともに、第1の探索範囲とは別に、参照画像において大域動きベクトルから予測した対象マクロブロックの移動先の位置の周辺に探索範囲(第2の探索範囲)を設定する。   Therefore, the control unit 213 sets a search range (first search range) around the same position as the position of the target macroblock in the reference image, and from the global motion vector in the reference image separately from the first search range. A search range (second search range) is set around the predicted position of the target macroblock.

図3に、大域動きベクトルが所定のしきい値より大きい場合に参照画像に設定された探索範囲の一例を示す。参照画像において、符号化対象画像フレームの対象マクロブロックの位置と同じ位置のマクロブロックを、図中、斜線模様を付したマクロブロック34で示す。また、参照画像において、大域動きベクトルから予測した対象マクロブロックの移動先の位置のマクロブロックを、格子模様を付したマクロブロック38で示す。   FIG. 3 shows an example of the search range set in the reference image when the global motion vector is larger than a predetermined threshold value. In the reference image, a macroblock at the same position as the position of the target macroblock of the encoding target image frame is indicated by a macroblock 34 with a hatched pattern in the drawing. In the reference image, the macro block at the position of the movement destination of the target macro block predicted from the global motion vector is indicated by a macro block 38 with a lattice pattern.

図3では、大域動きベクトルの大きさを10マクロブロック分相当、向きを左水平方向としており、マクロブロック38は、マクロブロック34の座標位置に、大域動きベクトルをベクトル的に加算したところに位置している。すなわち、参照画像における対象マクロブロックの移動先の位置は、参照画像における対象マクロブロックの位置と同じ位置を起点として、大域動きベクトルをベクトル的に加算することで予測する。   In FIG. 3, the size of the global motion vector is equivalent to 10 macroblocks, and the direction is the left horizontal direction. The macroblock 38 is positioned at the position where the global motion vector is added to the coordinate position of the macroblock 34 as a vector. doing. That is, the position of the movement destination of the target macroblock in the reference image is predicted by adding the global motion vector as a vector starting from the same position as the position of the target macroblock in the reference image.

また、図3において、第1の探索範囲36をマクロブロック34を取り囲む一点鎖線の長方形の領域で示し、第2の探索範囲40をマクロブロック38を取り囲む一点鎖線の長方形の領域で示す。   In FIG. 3, the first search range 36 is indicated by a dashed-dotted rectangular region surrounding the macroblock 34, and the second search range 40 is indicated by a dashed-dotted rectangular region surrounding the macroblock 38.

図3では、第1および2の探索範囲を、縦3マクロブロック×横6マクロブロックの長方形としている。つまり、図3では、図2における第3の探索範囲を上下に2分割して、一方を第1の探索範囲とし、他方を第2の探索範囲として設定している。このため、第1および2の探索範囲内の画像データを転送する際の転送負荷は、第3の探索範囲内の画像データを転送する際の転送負荷と同等になる。ゆえに、大域動きベクトルの大きさが大きい場合に、大域動きベクトルから予測した対象マクロブロックの移動先の位置の周辺を探索範囲に含めても、画像データ転送量の増加を抑制できる。   In FIG. 3, the first and second search ranges are rectangles of 3 vertical macroblocks × 6 horizontal macroblocks. That is, in FIG. 3, the third search range in FIG. 2 is divided into two vertically, and one is set as the first search range and the other is set as the second search range. For this reason, the transfer load when transferring image data within the first and second search ranges is equal to the transfer load when transferring image data within the third search range. Therefore, when the size of the global motion vector is large, an increase in the amount of image data transfer can be suppressed even if the search range includes the vicinity of the position of the movement destination of the target macroblock predicted from the global motion vector.

また、第2の探索範囲は、参照画像において大域動きベクトルから予測した対象マクロブロックの移動先の位置の周辺に設定されるため、大域動きベクトルとの相関性が強い場合、第2の探索範囲内でマッチングする確率が高く、局所動きベクトルの検索効率が向上する。   In addition, since the second search range is set around the position of the movement destination of the target macroblock predicted from the global motion vector in the reference image, when the correlation with the global motion vector is strong, the second search range The probability of matching is high, and the search efficiency of local motion vectors is improved.

さらに、予測精度が悪く第2の探索範囲内でのミスマッチングした場合であっても、第1の探索範囲は、参照画像における対象マクロブロックの位置と同じ位置の周辺に設定されるため、第1の探索範囲内でマッチングできる可能性があり、大域動きベクトルとの相関性が弱い場合であっても、局所動きベクトルの検出精度の劣化を防止できる。   Furthermore, even if the prediction accuracy is poor and mismatching occurs in the second search range, the first search range is set around the same position as the target macroblock position in the reference image. Even if there is a possibility that matching can be performed within one search range and the correlation with the global motion vector is weak, it is possible to prevent deterioration in the detection accuracy of the local motion vector.

以上の説明では、第3の探索範囲を上下に2分割して、一方を第1の探索範囲とし、他方を第2の探索範囲としたが、第1の探索範囲の大きさと第2の探索範囲の大きさが異なるように第3の探索範囲を分割してよい。また、第1の探索範囲の大きさと第2の探索範囲の大きさを合計した値が、第3の探索範囲の大きさより小さくなるようにしてもよい。   In the above description, the third search range is divided into upper and lower parts, and one is set as the first search range and the other is set as the second search range. However, the size of the first search range and the second search range are used. The third search range may be divided so that the size of the range is different. In addition, a value obtained by adding the sizes of the first search range and the second search range may be smaller than the size of the third search range.

図4は、大域動きベクトルの大きさに基づいた探索範囲の設定方法の手順を示すフローチャートである。大域動きベクトル算出部212は、時点Tnで符号化対象とされた画像フレームFnについて、検出された局所動きベクトルLMnを局所動きベクトル検出部209から受け取る。大域動きベクトル算出部212は、受け取った局所動きベクトルLMnに基づき、時点Tn+1で符号化対象となる画像フレームFn+1の参照画像に探索範囲を設定するために、大域動きベクトルGMn+1を算出し、制御部213に供給する(S10)。   FIG. 4 is a flowchart showing a procedure of a search range setting method based on the magnitude of the global motion vector. The global motion vector calculation unit 212 receives the detected local motion vector LMn from the local motion vector detection unit 209 for the image frame Fn to be encoded at the time Tn. Based on the received local motion vector LMn, the global motion vector calculation unit 212 sets the search range for the reference image of the image frame Fn + 1 to be encoded at the time Tn + 1, in order to set the global motion vector GMn + 1. Is calculated and supplied to the controller 213 (S10).

時点Tn+1で画像フレームFn+1が符号化対象の画像フレームとなると、制御部213は大域動きベクトルGMn+1を大域動きベクトルのしきい値と比較する(S12)。ここで、大域動きベクトルのしきい値は、シミュレーションや実験によりあらかじめ所定の値を規定しておくことができる。大域動きベクトルのしきい値を、第3の探索範囲の大きさに基づいて規定した場合は、大域動きベクトルから予測した対象マクロブロックの移動先の位置が、第3の探索範囲から外れた場合に、後述する探索範囲の適応設定を実行でき、画像データ転送量の増加を抑制できる。   When the image frame Fn + 1 becomes the encoding target image frame at the time point Tn + 1, the control unit 213 compares the global motion vector GMn + 1 with the threshold value of the global motion vector (S12). Here, the threshold value of the global motion vector can be defined in advance by a simulation or experiment. When the threshold value of the global motion vector is defined based on the size of the third search range, the movement destination position of the target macroblock predicted from the global motion vector is out of the third search range. Moreover, adaptive setting of the search range, which will be described later, can be executed, and an increase in the amount of image data transfer can be suppressed.

制御部213は、大域動きベクトルGMn+1の大きさが、しきい値より小さい場合(S12のN)、参照画像に第3の探索範囲を設定する(S14)。大域動きベクトルGMn+1の大きさが、しきい値より大きい場合(S12のN)、参照画像に第1の探索範囲と第2の探索範囲を設定する(S16)。   When the magnitude of the global motion vector GMn + 1 is smaller than the threshold value (N in S12), the control unit 213 sets the third search range in the reference image (S14). When the magnitude of the global motion vector GMn + 1 is larger than the threshold value (N in S12), the first search range and the second search range are set in the reference image (S16).

局所動きベクトル検出部209は、制御部213により設定された探索範囲内の画像データをキャッシュメモリに転送し、画像フレームFn+1について、局所動きベクトルLMn+1を検出する。局所動きベクトル検出部209は、検出した局所動きベクトルLMn+1を大域動きベクトル算出部212に供給する。大域動きベクトル算出部212は、受け取った局所動きベクトルLMn+1に基づき、時点Tn+2で参照する大域動きベクトルGMn+2を算出する。以下、これまで説明した処理を繰り返しながら、探索範囲の適応設定を行う。   The local motion vector detection unit 209 transfers the image data within the search range set by the control unit 213 to the cache memory, and detects the local motion vector LMn + 1 for the image frame Fn + 1. The local motion vector detection unit 209 supplies the detected local motion vector LMn + 1 to the global motion vector calculation unit 212. Based on the received local motion vector LMn + 1, the global motion vector calculation unit 212 calculates a global motion vector GMn + 2 to be referred to at time Tn + 2. Hereinafter, the search range is adaptively set while repeating the processing described so far.

このような本発明の実施の形態によれば、局所動きベクトルに基づき大域動きベクトルを算出し、大域動きベクトルの大きさがしきい値より大きい場合、参照画像に第1の探索範囲と第2の探索範囲を設定するので、動きベクトルを検出する際に参照する画像データの転送量の増加を抑制できる。また、第2の探索範囲を設定するので、動きベクトルを効率良く検出することができる。さらに、第1の探索範囲を設定するので、動きベクトルを精度良く検出することができる。よって、符号化効率を高めることができる。   According to the embodiment of the present invention, when the global motion vector is calculated based on the local motion vector and the magnitude of the global motion vector is larger than the threshold, the first search range and the second search are included in the reference image. Since the range is set, it is possible to suppress an increase in the transfer amount of image data referred to when detecting a motion vector. Further, since the second search range is set, the motion vector can be detected efficiently. Furthermore, since the first search range is set, the motion vector can be detected with high accuracy. Therefore, encoding efficiency can be improved.

以上、本発明を実施するための形態について説明をしてきたが、本発明は、この実施の形態の構成に限定されるものではなく、特許請求の範囲に規定された本発明の適用範囲にあり、上述した実施の形態の構成が備える機能を達成可能であれば、いろいろな変形が可能である。   As mentioned above, although the form for implementing this invention has been demonstrated, this invention is not limited to the structure of this embodiment, It exists in the application range of this invention prescribed | regulated by the claim. Various modifications are possible as long as the functions of the configuration of the above-described embodiment can be achieved.

例えば、本発明の実施の形態において画像処理装置20は、H.264/AVC規格に従い圧縮符号化するとしたが、 MPEG−2、またはMPEG−4などの規格にしたがい圧縮符号化してもよい。   For example, in the embodiment of the present invention, the image processing apparatus 20 is the H.264 standard. The compression encoding is performed according to the H.264 / AVC standard, but the compression encoding may be performed according to a standard such as MPEG-2 or MPEG-4.

201 差分部、202 直交変換部、203 量子化部、204 可変長符号化部、205 出力バッファ、206 逆量子化部、207 逆直交変換部、208 加算部、209 局所動きベクトル検出部、210 動き補償部、211 フレームバッファ、212 大域動きベクトル算出部、213 制御部。
201 Difference unit, 202 Orthogonal transformation unit, 203 Quantization unit, 204 Variable length coding unit, 205 Output buffer, 206 Inverse quantization unit, 207 Inverse orthogonal transformation unit, 208 Adder, 209 Local motion vector detection unit, 210 Motion Compensator, 211 frame buffer, 212 global motion vector calculator, 213 controller.

Claims (4)

対象ピクチャの単位領域ごとの動きベクトルを検出する第1の検出部と、前記動きベクトルから前記対象ピクチャ内または前記対象ピクチャ内に定義される領域内での大域動きベクトルを検出する第2の検出部と、前記大域動きベクトルの大きさが所定のしきい値より大きい場合、前記動きベクトルを検出する際に参照する参照ピクチャにおいて、前記動きベクトルを検出する対象単位領域の位置と同じ位置の周辺に第1の探索範囲を設定するとともに、前記大域動きベクトルから予測した前記対象単位領域の移動先の位置の周辺に第2の探索範囲を設定するように前記第1の検出部を制御し、前記大域動きベクトルの大きさが所定のしきい値より小さい場合、前記参照ピクチャにおいて、前記対象単位領域の位置と同じ位置の周辺に第3の探索範囲を設定するように前記第1の検出部を制御する制御部と、を備え、前記制御部は、前記第1の探索範囲の大きさと第2の探索範囲の大きさを合計した値が、第3の探索範囲の大きさ以下になるように設定することを特徴とする画像処理装置。 A first detection unit for detecting a motion vector for each unit area of the target picture; and a second detection for detecting a global motion vector in the target picture or an area defined in the target picture from the motion vector And a reference picture that is referred to when detecting the motion vector, when the magnitude of the global motion vector is larger than a predetermined threshold, the periphery of the same position as the position of the target unit region for detecting the motion vector And setting the first search range, and controlling the first detection unit to set the second search range around the position of the movement destination of the target unit region predicted from the global motion vector , If the size of the global motion vector is smaller than a predetermined threshold value, a third image is located around the same position as the target unit area in the reference picture. And a control unit for controlling the first detector to set the search range, wherein the control unit, the size and value of the sum of the size of the second search range of said first search range An image processing apparatus that is set to be equal to or smaller than the size of the third search range . 対象ピクチャの単位領域ごとの動きベクトルを検出する第1の検出部と、前記動きベクトルから前記対象ピクチャ内または前記対象ピクチャ内に定義される領域内での大域動きベクトルを検出する第2の検出部と、前記大域動きベクトルの大きさが所定のしきい値より大きい場合、前記動きベクトルを検出する際に参照する参照ピクチャにおいて、前記動きベクトルを検出する対象単位領域の位置と同じ位置の周辺に第1の探索範囲を設定するとともに、前記大域動きベクトルから予測した前記対象単位領域の移動先の位置の周辺に第2の探索範囲を設定するように前記第1の検出部を制御し、前記大域動きベクトルの大きさが所定のしきい値より小さい場合、前記参照ピクチャにおいて、前記対象単位領域の位置と同じ位置の周辺に第3の探索範囲を設定するように前記第1の検出部を制御する制御部と、を備え、前記制御部は、前記第3の探索範囲の大きさに基づいて前記しきい値を規定することを特徴とする画像処理装置。 A first detection unit for detecting a motion vector for each unit area of the target picture; and a second detection for detecting a global motion vector in the target picture or an area defined in the target picture from the motion vector And a reference picture that is referred to when detecting the motion vector, when the magnitude of the global motion vector is larger than a predetermined threshold, the periphery of the same position as the position of the target unit region for detecting the motion vector And setting the first search range, and controlling the first detection unit to set the second search range around the position of the movement destination of the target unit region predicted from the global motion vector, If the size of the global motion vector is smaller than a predetermined threshold value, a third image is located around the same position as the target unit area in the reference picture. And a control unit for controlling the first detector to set the search range, wherein the control unit, characterized in that defining the threshold value based on the magnitude of the third search range An image processing apparatus. 前記制御部は、前記第3の探索範囲大きさに基づいて前記しきい値を規定することを特徴とする請求項に記載の画像処理装置。 Wherein the control unit, an image processing apparatus according to claim 1, characterized in that defining the threshold value based on the magnitude of the third search range. 動画像を取得する撮像部と、
前記撮像部により取得される動画像を処理する請求項1から3のいずれかに記載の画像処理装置と、
を備えることを特徴とする撮像装置。
An imaging unit for acquiring a moving image;
The image processing apparatus according to any one of claims 1 to 3, which processes a moving image acquired by the imaging unit;
An imaging apparatus comprising:
JP2009022842A 2009-02-03 2009-02-03 Image processing apparatus and imaging apparatus equipped with the same Active JP5171675B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009022842A JP5171675B2 (en) 2009-02-03 2009-02-03 Image processing apparatus and imaging apparatus equipped with the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009022842A JP5171675B2 (en) 2009-02-03 2009-02-03 Image processing apparatus and imaging apparatus equipped with the same

Publications (2)

Publication Number Publication Date
JP2010183180A JP2010183180A (en) 2010-08-19
JP5171675B2 true JP5171675B2 (en) 2013-03-27

Family

ID=42764406

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009022842A Active JP5171675B2 (en) 2009-02-03 2009-02-03 Image processing apparatus and imaging apparatus equipped with the same

Country Status (1)

Country Link
JP (1) JP5171675B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9769494B2 (en) * 2014-08-01 2017-09-19 Ati Technologies Ulc Adaptive search window positioning for video encoding
EP3833028B1 (en) * 2019-12-03 2022-02-09 Axis AB Method and system for calculating a cost of encoding a motion vector

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05236455A (en) * 1992-02-25 1993-09-10 Nec Corp Motion vector detector for moving image
JP4003149B2 (en) * 1998-03-31 2007-11-07 ソニー株式会社 Image encoding apparatus and method
JP4606311B2 (en) * 2005-11-21 2011-01-05 シャープ株式会社 Image coding apparatus and image coding method
JP2007174202A (en) * 2005-12-21 2007-07-05 Canon Inc Motion vector detecting device and method therefor
JP4178481B2 (en) * 2006-06-21 2008-11-12 ソニー株式会社 Image processing apparatus, image processing method, imaging apparatus, and imaging method

Also Published As

Publication number Publication date
JP2010183180A (en) 2010-08-19

Similar Documents

Publication Publication Date Title
KR102121558B1 (en) Method of stabilizing video image, post-processing device and video encoder including the same
JP5426655B2 (en) Compressed video encoding device, compressed video decoding device, compressed video encoding method, and compressed video decoding method
JP2009182623A (en) Image encoding method
JP6149707B2 (en) Moving picture coding apparatus, moving picture coding method, moving picture coding program, and moving picture photographing apparatus
WO2009139123A1 (en) Image processor and imaging device using the same
JP5613319B2 (en) Video encoding apparatus, video encoding method, and video encoding program
US20140233645A1 (en) Moving image encoding apparatus, method of controlling the same, and program
JP2007013298A (en) Image coding apparatus
US20080212719A1 (en) Motion vector detection apparatus, and image coding apparatus and image pickup apparatus using the same
JP2010183181A (en) Image processing apparatus and imaging apparatus equipped with the same
JP5171675B2 (en) Image processing apparatus and imaging apparatus equipped with the same
JP4911625B2 (en) Image processing apparatus and imaging apparatus equipped with the same
JP6313614B2 (en) Video encoding apparatus and control method thereof
JP5171658B2 (en) Image encoding device
JP2007228101A (en) Dynamic-image coding equipment
JP4561701B2 (en) Video encoding device
JP2007129335A (en) Screen motion detector
JP5718438B2 (en) Compressed video encoding device, compressed video decoding device, compressed video encoding method, and compressed video decoding method
JP5268666B2 (en) Image encoding device
JP6016484B2 (en) Encoder
JP2012222460A (en) Moving image encoding apparatus, moving image encoding method, and program
JP4067954B2 (en) Moving picture coding method and moving picture coding apparatus
JP5274181B2 (en) Moving picture coding apparatus and moving picture coding method
JP2008028882A (en) Moving image encoding apparatus
JP2006191185A (en) Image pickup apparatus

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20111117

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20111130

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120127

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120723

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120821

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121018

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20121018

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20121018

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20121127

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121225

R151 Written notification of patent or utility model registration

Ref document number: 5171675

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160111

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160111

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160111

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250