JP6681078B2 - Image processing apparatus, image processing method, and image processing program - Google Patents

Image processing apparatus, image processing method, and image processing program Download PDF

Info

Publication number
JP6681078B2
JP6681078B2 JP2017197174A JP2017197174A JP6681078B2 JP 6681078 B2 JP6681078 B2 JP 6681078B2 JP 2017197174 A JP2017197174 A JP 2017197174A JP 2017197174 A JP2017197174 A JP 2017197174A JP 6681078 B2 JP6681078 B2 JP 6681078B2
Authority
JP
Japan
Prior art keywords
coefficient
block
region
approximation function
area
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
JP2017197174A
Other languages
Japanese (ja)
Other versions
JP2019070974A (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.)
Axell Corp
Original Assignee
Axell Corp
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 Axell Corp filed Critical Axell Corp
Priority to JP2017197174A priority Critical patent/JP6681078B2/en
Publication of JP2019070974A publication Critical patent/JP2019070974A/en
Application granted granted Critical
Publication of JP6681078B2 publication Critical patent/JP6681078B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Analysis (AREA)

Description

本発明は画像処理技術に関する。   The present invention relates to image processing technology.

動画像を圧縮する重要な技術の一つとしてフレーム間予測符号化がある。フレーム間予測符号化では、符号化するフレーム(以下「対象フレーム」という)とは異なる時刻の符号化処理済のフレーム(以下「参照フレーム」という)を基に対象フレームの画像を予測し、対象フレームの実際の画像と予測した画像の差分を符号化する。対象フレームの符号化処理済のフレームとの差分を符号化することによりフレームのデータ量を削減することができる。   Interframe predictive coding is one of the important techniques for compressing moving images. In inter-frame predictive coding, an image of a target frame is predicted based on a frame (hereinafter referred to as “reference frame”) that has been coded at a time different from that of the frame to be coded (hereinafter referred to as “target frame”). Encode the difference between the actual image of the frame and the predicted image. The data amount of the frame can be reduced by encoding the difference between the target frame and the encoded frame.

フレーム間予測符号化では、フレームを複数に分割したブロック単位で以下の(1)〜(3)の処理が行われる。   In inter-frame predictive coding, the following processes (1) to (3) are performed in block units obtained by dividing a frame into a plurality of blocks.

(1)対象フレーム内のブロック(以下「対象ブロック」という)に類似するブロック(以下「参照ブロック」という)を参照フレーム内から画像マッチング技術を用いて探索する。 (1) A block (hereinafter, referred to as “reference block”) similar to a block in the target frame (hereinafter, referred to as “target block”) is searched for in the reference frame using an image matching technique.

(2)対象ブロックと探索で得られた参照ブロックとの差分画像を求める。 (2) A difference image between the target block and the reference block obtained by the search is obtained.

(3)探索で得られた参照ブロックから対象ブロックへの動きを示す動きベクトルを求める。 (3) A motion vector indicating the motion from the reference block obtained by the search to the target block is obtained.

このようにして圧縮された動画像のフレームを復号するとき、参照ブロックと差分画像と動きベクトルから対象ブロックの画像を復元することができる。   When decoding a frame of a moving image compressed in this way, the image of the target block can be restored from the reference block, the difference image, and the motion vector.

上述したように上記(1)では、対象ブロックと類似する参照ブロックを探索する際に画像マッチング技術が用いられる。画像マッチング技術として特徴ベースマッチングや領域ベースマッチングといった様々な方式が知られている。動画像内での物体の動きには移動や伸縮(スケール変化)の他に回転が含まれる。上記(1)にて、動画像内で回転する物体が存在するブロック同士を互いに類似すると判断するために、対象ブロックと参照ブロックの相対角度を算出することが求められる。また、上述したように、上記(3)にて算出する参照ブロックから対象ブロックへの動きには、移動、伸縮、および回転が含まれる。そのため対象ブロックと参照ブロックの相対角度を算出する必要がある。   As described above, in the above (1), the image matching technique is used when searching for a reference block similar to the target block. Various methods such as feature-based matching and area-based matching are known as image matching techniques. The movement of an object in a moving image includes rotation as well as movement and expansion / contraction (scale change). In the above (1), it is required to calculate the relative angle between the target block and the reference block in order to determine that the blocks in which the rotating object exists in the moving image are similar to each other. Further, as described above, the movement from the reference block to the target block calculated in (3) above includes movement, expansion and contraction, and rotation. Therefore, it is necessary to calculate the relative angle between the target block and the reference block.

特許文献1には動画像圧縮における動きを算出する技術が開示されている。画像平面上の現フレ−ムの既知の領域の3点とこれらの3点について探索された3つの平行移動ベクトルを用いて前フレ−ムの領域の3点の座標を求める。さらに、現フレ−ムおよび前フレ−ムの領域の6点の位置座標より各々のベクトルの水平と垂直成分を算出し、それらのベクトルのx、y成分より、水平と垂直方向の回転角度、伸縮倍率、平行移動量の6個のアフィン変換パラメータを算出する。   Patent Document 1 discloses a technique for calculating a motion in moving image compression. The coordinates of the three points in the area of the previous frame are obtained using the three points in the known area of the current frame on the image plane and the three translation vectors searched for these three points. Further, the horizontal and vertical components of each vector are calculated from the position coordinates of the six points in the current frame region and the previous frame region, and the horizontal and vertical rotation angles are calculated from the x and y components of these vectors. Six affine transformation parameters including expansion / contraction ratio and translation amount are calculated.

また、非特許文献1には、画像のスケール変化や回転に関連する技術が開示されている。画像ブロックに含まれる画素の勾配に関するヒストグラムを作成し、ヒストグラムの最大値となるピークをキーポイントのオリエンテーションとして割り当てる。そして、キーポイントのオリエンテーション方向に画像を回転する。   Further, Non-Patent Document 1 discloses a technique related to image scale change and rotation. A histogram concerning the gradient of pixels included in the image block is created, and the peak having the maximum value of the histogram is assigned as the orientation of the key point. Then, the image is rotated in the orientation direction of the key point.

特開平9−98424号公報JP, 9-98424, A

Gradientベースの特徴抽出-SIFTとHOG- 藤吉弘亘 情報処理学会 研究報告CVIM 160, pp. 211-224, September, 2007.Gradient-based Feature Extraction-SIFT and HOG- Hiroyoshi Fujiyoshi IPSJ Research Report CVIM 160, pp. 211-224, September, 2007.

特許文献1に開示された技術および非特許文献1に開示された技術では、対象ブロックと参照ブロックとの相対角度を求める処理は複雑な演算を伴い、処理負荷が大きいという問題があった。   In the technique disclosed in Patent Document 1 and the technique disclosed in Non-Patent Document 1, there is a problem that the process of obtaining the relative angle between the target block and the reference block involves complicated calculation and a large processing load.

本発明の目的は、画像の領域同士の相対角度を少ない計算量で算出する技術を提供することである。   An object of the present invention is to provide a technique for calculating a relative angle between regions of an image with a small amount of calculation.

本発明の一つの態様による画像処理装置は、第1領域に含まれる画素の輝度値を所定の近似用関数による曲面で近似するように前記近似用関数の係数を算出して該係数を第1係数とし、第2領域に含まれる画素の輝度値を前記近似用関数で近似するように前記近似用関数の係数を算出して該係数を第2係数とする決定部と、前記第1係数を用いて前記近似用関数の方向を示す第1回転角度を求め、前記第2係数を用いて前記近似用関数の方向を示す第2回転角度を求め、前記第1回転角度と前記第2回転角度との相対角度を算出する算出部と、
を有する。
An image processing apparatus according to one aspect of the present invention calculates a coefficient of the approximation function such that the brightness value of a pixel included in the first area is approximated by a curved surface of a predetermined approximation function, and sets the coefficient to the first value. A determining unit that calculates a coefficient of the approximation function so that the brightness value of a pixel included in the second region is approximated by the approximation function, and that determines the coefficient as a second coefficient; and the first coefficient. A first rotation angle indicating the direction of the approximation function is obtained using the above, a second rotation angle indicating the direction of the approximation function is obtained using the second coefficient, and the first rotation angle and the second rotation angle are obtained. A calculation unit that calculates a relative angle with
Have.

本発明によれば、相対角度を算出する対象の領域をそれぞれ曲面で近似し、2つの近似曲面の方向(第1回転角度および第2回転角度)の相対角度を第1領域と第2領域の相対角度とするので、複雑な演算を必要とせず、少ない計算量で領域間の相対角度を算出することができる。   According to the present invention, each of the regions for which the relative angle is calculated is approximated by a curved surface, and the relative angles in the directions of the two approximate curved surfaces (the first rotation angle and the second rotation angle) are set to the first region and the second region. Since the relative angle is used, it is possible to calculate the relative angle between the regions with a small calculation amount without requiring complicated calculation.

実施例1による画像処理装置の機能構成を示すブロック図である。3 is a block diagram showing a functional configuration of the image processing apparatus according to the first embodiment. FIG. 画像処理装置のハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of an image processing apparatus. 探索処理の一実施例を説明するための図である。It is a figure for demonstrating one Example of a search process. 実施例1における対象領域の抽出処理について説明するための図である。FIG. 6 is a diagram for explaining a target area extraction process in the first embodiment. 回転処理の一実施例を説明する図である。It is a figure explaining one Example of rotation processing. 実施例1によるブロックマッチング処理を示すフローチャートである。6 is a flowchart showing a block matching process according to the first embodiment. 実施例1の変形例2における対象領域の抽出処理について説明するための図である。FIG. 8 is a diagram for explaining a target area extraction process in a second modification of the first embodiment. 実施例1の変形例3によるブロックマッチング処理を示すフローチャートである。9 is a flowchart showing a block matching process according to a modified example 3 of the first embodiment. 実施例2による画像処理装置の機能構成を示すブロック図である。9 is a block diagram showing a functional configuration of an image processing apparatus according to a second embodiment. FIG. 実施例2によるブロックマッチング処理を示すフローチャートである。9 is a flowchart showing a block matching process according to the second embodiment. 実施例2によるブロックマッチング処理を示すフローチャートである。9 is a flowchart showing a block matching process according to the second embodiment. 実施例3による符号化装置の機能構成を示すブロック図である。FIG. 11 is a block diagram showing a functional configuration of an encoding device according to a third embodiment.

以下、本発明の実施形態について図面を参照して説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

実施例1の画像処理装置1はブロックマッチングを行うブロックマッチング装置である。ブロックマッチングは、2つのフレームのそれぞれに存在する互いに類似するブロックを探索する処理である。ここで類似するとは、例えば、画像の類似度が所定値以上であることをいう。   The image processing apparatus 1 according to the first embodiment is a block matching device that performs block matching. Block matching is a process of searching for blocks that are similar to each other in each of two frames. Here, “similar” means that the similarity of images is equal to or more than a predetermined value.

ブロックマッチング装置は、例えば、動画像のフレーム間予測符号化に利用可能である。符号化の対象フレームと符号化済の参照フレームとに存在しうる互いに類似するブロックを探索するのに利用することができる。また、ブロックマッチング装置は、ある静止画フレーム(対象フレーム)に映り込んでいる物体を他の静止画フレーム(参照フレーム)の画像から見つけ出すのに利用することができる。   The block matching device can be used for, for example, interframe predictive coding of a moving image. It can be used to search for similar blocks that may exist in the target frame to be encoded and the encoded reference frame. Further, the block matching device can be used to find an object reflected in a certain still image frame (target frame) from an image of another still image frame (reference frame).

図1は、実施例1による画像処理装置の機能構成を示すブロック図である。図2は、画像処理装置のハードウェア構成を示すブロック図である。   FIG. 1 is a block diagram showing the functional arrangement of the image processing apparatus according to the first embodiment. FIG. 2 is a block diagram showing the hardware configuration of the image processing apparatus.

図1を参照すると、画像処理装置1は、制御部10と、記憶部20とを備える。記憶部20には、フレーム情報21と、類似度情報22とが格納される。フレーム情報21は、動画を構成する各フレームの画像データである。類似度情報22は、後述するブロックマッチングの処理で算出された、領域間の類似度を示す情報である。制御部10は、記憶部20に格納されたフレーム情報21を用いてブロックマッチングを行い、その処理で算出した類似度を類似度情報22として記憶部20に記録する。   Referring to FIG. 1, the image processing device 1 includes a control unit 10 and a storage unit 20. The storage unit 20 stores frame information 21 and similarity information 22. The frame information 21 is image data of each frame forming a moving image. The similarity information 22 is information indicating the similarity between regions, which is calculated by the block matching process described later. The control unit 10 performs block matching using the frame information 21 stored in the storage unit 20, and records the similarity calculated in the process as the similarity information 22 in the storage unit 20.

図2を参照すると、画像処理装置1のハードウェアは一例としてコンピュータ装置400である。コンピュータ装置400は、制御回路401と、記憶装置402と、読書装置403と、記録媒体404と、通信インターフェイス405と、入出力インターフェイス406と、入力装置407と、表示装置408とを有している。制御回路401、記憶装置402、読書装置403、通信インターフェイス405、入出力インターフェイス406、および表示装置408はバス410により互いに接続される。記録媒体404は読書装置403に接続される。入力装置407は入出力インターフェイス406に接続される。また通信インターフェイス405はネットワーク409と接続される。   Referring to FIG. 2, the hardware of the image processing device 1 is a computer device 400 as an example. The computer device 400 includes a control circuit 401, a storage device 402, a reading device 403, a recording medium 404, a communication interface 405, an input / output interface 406, an input device 407, and a display device 408. . The control circuit 401, the storage device 402, the reading device 403, the communication interface 405, the input / output interface 406, and the display device 408 are connected to each other by a bus 410. The recording medium 404 is connected to the reading device 403. The input device 407 is connected to the input / output interface 406. Further, the communication interface 405 is connected to the network 409.

制御回路401は、コンピュータ装置400全体を制御する。制御回路401は一例としてプロセッサである。制御回路401は、記憶装置402に記録された不図示の画像処理プログラムを実行することにより、図1に示した制御部10として動作する。   The control circuit 401 controls the entire computer device 400. The control circuit 401 is a processor as an example. The control circuit 401 operates as the control unit 10 illustrated in FIG. 1 by executing an image processing program (not shown) recorded in the storage device 402.

記憶装置402は、制御回路401を制御部10として機能させる画像処理プログラムを記憶する。また、記憶装置402は、制御回路401が動作するための各種データを記憶する。また、記憶装置402は、図1における記憶部20として機能する。   The storage device 402 stores an image processing program that causes the control circuit 401 to function as the control unit 10. The storage device 402 also stores various data for operating the control circuit 401. The storage device 402 also functions as the storage unit 20 in FIG.

読書装置403は、着脱可能な記録媒体404からデータを読み出し、また記録媒体404へデータを書き込む。   The reading device 403 reads data from the removable recording medium 404 and writes data to the recording medium 404.

記録媒体404は、SD(Secure Digital)メモリーカード、FD(Floppy Disk)、CDCompact Disc)、DVD(Digital Versatile Disk)、BD(Blu−ray Disk:登録商標)、およびフラッシュメモリなどの非一時的記録媒体である。記録媒体404は、例えば、コンピュータ装置400に与えるデータ、コンピュータ装置400で生成されたデータ、およびコンピュータ装置400で取得されたデータを格納する。また、記録媒体404は、図1に示した記憶部20内の情報を記憶してもよい。   The recording medium 404 is a non-temporary recording such as an SD (Secure Digital) memory card, an FD (Floppy Disk), a CDCompact Disk (DVD), a DVD (Digital Versatile Disk), a BD (Blu-ray Disk: registered trademark), and a flash memory. It is a medium. The recording medium 404 stores, for example, data to be given to the computer device 400, data generated by the computer device 400, and data obtained by the computer device 400. Further, the recording medium 404 may store the information in the storage unit 20 shown in FIG.

通信インターフェイス405は、ネットワーク409を介してコンピュータ装置400と不図示の他の装置とを通信可能に接続する。   The communication interface 405 communicatively connects the computer device 400 and another device (not shown) via the network 409.

入出力インターフェイス406は、入力装置407等の各種入出力装置と接続するインターフェイスである。入出力インターフェイス406は、入力装置407から入力された信号を、バス410を介して制御回路401に出力する。また、入出力インターフェイス406は、制御回路401から出力された信号を、バス410を介して入出力装置に出力する。入力装置407は入出力装置の例である。   The input / output interface 406 is an interface connected to various input / output devices such as the input device 407. The input / output interface 406 outputs the signal input from the input device 407 to the control circuit 401 via the bus 410. The input / output interface 406 also outputs the signal output from the control circuit 401 to the input / output device via the bus 410. The input device 407 is an example of an input / output device.

入力装置407は、キーボード、マウス等の入力装置である。入力装置407は、ユーザによる情報の入力操作を受け付け、入力された情報に対応する信号を入出力インターフェイス406に出力する。例えば、ユーザが入力装置407にブロックマッチングの開始の指示を入力すると、入力装置407は指示を示す信号を入出力インターフェイス406に出力する。   The input device 407 is an input device such as a keyboard and a mouse. The input device 407 receives an input operation of information by the user, and outputs a signal corresponding to the input information to the input / output interface 406. For example, when the user inputs an instruction to start block matching to the input device 407, the input device 407 outputs a signal indicating the instruction to the input / output interface 406.

表示装置408は、制御回路401からの制御により各種情報を画面に表示する。   The display device 408 displays various information on the screen under the control of the control circuit 401.

ネットワーク409は、コンピュータ装置400と他の装置を通信可能に接続する。   The network 409 connects the computer device 400 and other devices so that they can communicate with each other.

以下、図1の制御部10の詳細について説明する。   Hereinafter, the details of the control unit 10 in FIG. 1 will be described.

図1を参照すると、制御部10は、探索部11と、抽出部12と、決定部13と、算出部14と、回転部15とを含む。   Referring to FIG. 1, the control unit 10 includes a search unit 11, an extraction unit 12, a determination unit 13, a calculation unit 14, and a rotation unit 15.

探索部11は、探索処理を行う。探索処理は、対象フレーム内の対象ブロックと類似度を判定する参照ブロックを、参照フレーム内で所定量ずつスライドさせながら切り替えていき、対象ブロックと類似する参照ブロックを探索する処理である。   The search unit 11 performs a search process. The search process is a process in which a reference block whose similarity to the target block in the target frame is determined is switched while sliding by a predetermined amount in the reference frame, and a reference block similar to the target block is searched.

図3は、探索処理の一実施例を説明するための図である。探索部11は、フレーム情報21を参照し、対象フレーム100(第1画像)に含まれる1つの矩形のブロックを類似度判定の対象ブロック101(第1ブロック)として選択する。例えば、探索部11は、対象ブロック101として、対象フレーム100内を左から右へ上から下へ順次選択していくことにしてもよい。   FIG. 3 is a diagram for explaining an example of the search process. The search unit 11 refers to the frame information 21 and selects one rectangular block included in the target frame 100 (first image) as the target block 101 (first block) for similarity determination. For example, the search unit 11 may sequentially select the target block 100 from left to right from top to bottom as the target block 101.

次に、探索部11は、対象ブロック101との類似度を判定する参照ブロック201を参照フレーム200(第2画像)の探索領域202内で設定する。探索部11は、探索領域202上で矢印204の方向にスライドさせながら参照ブロック201を順次切り替えていく。本実施例では、探索領域202、すなわち参照ブロック201を設定する領域を、対象ブロック101の周辺の所定範囲にある探索領域102に相当する範囲に限定している。これにより、移動量が過度となるブロックを対象ブロック101との類似度を算出する候補から除外し、探索処理の処理量を抑制することができる。本実施例では対象ブロック101の周囲の所定範囲を探索領域102とする。参照フレーム200には、探索領域102と同じ大きさでかつ対応する座標に位置する探索領域202が設定される。探索領域102、202は、ブロックマッチング処理の対象となる領域であり、任意の大きさに設定することができる。   Next, the search unit 11 sets the reference block 201 that determines the degree of similarity with the target block 101 in the search area 202 of the reference frame 200 (second image). The search unit 11 sequentially switches the reference blocks 201 while sliding the search area 202 in the direction of the arrow 204. In this embodiment, the search area 202, that is, the area in which the reference block 201 is set is limited to a range corresponding to the search area 102 in a predetermined range around the target block 101. This makes it possible to exclude a block having an excessive movement amount from candidates for calculating the degree of similarity with the target block 101, and suppress the processing amount of the search process. In this embodiment, a predetermined area around the target block 101 is set as the search area 102. A search area 202 having the same size as the search area 102 and located at the corresponding coordinates is set in the reference frame 200. The search areas 102 and 202 are areas to be subjected to block matching processing and can be set to any size.

次に、探索部11は、後述する回転部15が対象領域103(第1領域)と参照領域203(第2領域)とを相対的に回転させる回転処理の結果を用いて、後述する算出部14により算出される対象領域103と参照領域203との類似度に基づき、対象領域103と類似する参照領域203に対応する参照ブロック201を決定する。例えば、探索部11は、探索領域202の全体にわたる参照ブロック201が順次選択されていき、探索領域202に含まれる全ての参照ブロック201について対象ブロック101との類似度が類似度情報22に保存されると、保存された類似度の中から最も高い類似度と、その最も高い類似度に対応する参照領域203とを抽出すればよい。抽出された参照領域203に対応する参照ブロック201が探索部11による探索結果である。なお、探索部11は、算出部14により1以上の類似度が算出され、求められた類似度の中で所定値以上の類似度があるとき、その類似度に対応する参照領域203を抽出してもよい。また、探索部11は、所定値以上の類似度が複数あるとき、その中で最も高い類似度に対応する参照領域203を抽出してもよい。   Next, the search unit 11 uses the result of the rotation process in which the rotation unit 15 described later relatively rotates the target region 103 (first region) and the reference region 203 (second region), and the calculation unit described later. Based on the similarity between the target area 103 and the reference area 203 calculated by 14, the reference block 201 corresponding to the reference area 203 similar to the target area 103 is determined. For example, the search unit 11 sequentially selects the reference blocks 201 over the entire search area 202, and the similarity with the target block 101 for all the reference blocks 201 included in the search area 202 is stored in the similarity information 22. Then, the highest similarity and the reference area 203 corresponding to the highest similarity may be extracted from the stored similarities. The reference block 201 corresponding to the extracted reference area 203 is the search result by the search unit 11. It should be noted that the search unit 11 extracts the reference region 203 corresponding to the similarity when the calculation unit 14 calculates the similarity of 1 or more and the calculated similarity has a similarity of a predetermined value or more. May be. Further, when there are a plurality of similarities equal to or higher than a predetermined value, the search unit 11 may extract the reference area 203 corresponding to the highest similarity among them.

抽出部12は、探索部11が対象ブロック101との類似度を判定する参照ブロック201を参照フレーム200の探索領域202内で設定すると、矩形である対象ブロック101の重心を中心とし、対象ブロック101に内包される最大の円を画素で表現する領域を対象領域103として抽出し、対象ブロック101と同じサイズの矩形である参照ブロック201の重心を中心とし、参照ブロック201に内包される最大の円を画素で表現する領域を参照領域203として抽出する。対象領域103と参照領域203とは同じ略円形状である。   When the search unit 11 sets the reference block 201 for determining the similarity with the target block 101 in the search area 202 of the reference frame 200, the extraction unit 12 sets the target block 101 centered on the center of gravity of the rectangular target block 101. Is extracted as a target area 103, and the largest circle included in the reference block 201 is centered on the center of gravity of the reference block 201 that is a rectangle of the same size as the target block 101. An area in which is expressed by pixels is extracted as a reference area 203. The target area 103 and the reference area 203 have substantially the same circular shape.

図4は、実施例1における対象領域の抽出処理について説明するための図である。ここでは、対象ブロック101から対象領域103を抽出する例について説明するが、それと同様の方法で、参照ブロック201から参照領域203を抽出することもできる。   FIG. 4 is a diagram for explaining the extraction processing of the target area in the first embodiment. Here, an example of extracting the target area 103 from the target block 101 will be described, but the reference area 203 can be extracted from the reference block 201 by the same method.

図4を参照すると、本実施例では、対象ブロック101は8×8の画素を含んでいる。抽出部12は、対象ブロック101の重心を中心とし、対象ブロック101に内包される最大の円を画素で表現する領域を対象領域103として抽出する。図4において、対象領域103に含まれる画素はハッチングされている。   Referring to FIG. 4, in the present embodiment, the target block 101 includes 8 × 8 pixels. The extraction unit 12 extracts, as a target area 103, an area centered on the center of gravity of the target block 101 and representing the largest circle included in the target block 101 with pixels. In FIG. 4, pixels included in the target area 103 are hatched.

本実施例では、対象領域103と参照領域203が同じ大きさの円形状としているため、後述する決定部13により近似用関数の係数を決定する決定処理において、対象領域103と参照領域203とを相対的に回転したときの矩形の各領域の角部分の影響を低減することができる。後述する決定部13は、近似用関数の係数を決定する処理において、回転角の影響が少ない円形に近い形状の近似曲面を得ることができ、精度よく係数を決定することができる。   In the present embodiment, since the target area 103 and the reference area 203 have the same circular shape, the target area 103 and the reference area 203 are determined in the determination process of determining the coefficient of the approximation function by the determining unit 13 described later. It is possible to reduce the influence of the corners of each rectangular region when relatively rotated. In the process of determining the coefficient of the approximation function, the determination unit 13 described below can obtain an approximate curved surface having a shape close to a circle that is less affected by the rotation angle, and can determine the coefficient with high accuracy.

決定部13は、近似用関数として所定の関数の情報を予め保持している。ここでは近似用関数は係数を含み、画像内の画素の輝度値で表される画像曲面を近似するように係数の値を決めることができる。決定部13は、対象領域103に含まれる複数の画素の輝度値を近似用関数により近似するように、近似用関数の係数値(以下「第1係数」という)を決定する。このとき近似には例えば最小二乗法を用いればよい。第1係数が設定された近似用関数は、円形の閉平面上の対象領域103の各画素の輝度値を近似する近似曲面(平面である場合を含む。以下同様)を示す。   The determination unit 13 holds in advance information on a predetermined function as an approximation function. Here, the approximation function includes a coefficient, and the coefficient value can be determined so as to approximate the image curved surface represented by the brightness value of the pixel in the image. The determination unit 13 determines the coefficient value of the approximation function (hereinafter referred to as “first coefficient”) so that the brightness values of the plurality of pixels included in the target area 103 are approximated by the approximation function. At this time, for example, the least squares method may be used for the approximation. The approximation function in which the first coefficient is set indicates an approximated curved surface (including a case of a plane; the same applies hereinafter) that approximates the luminance value of each pixel of the target region 103 on the circular closed plane.

また、決定部13は、参照領域203の各画素の輝度値を近似用関数により近似するように、近似用関数の係数値(以下「第2係数」という)を決定する。このとき近似には例えば最小二乗法を用いればよい。第2係数が設定された近似用関数は、円形の閉平面上の参照領域203の各画素の輝度値を近似する近似曲面を示す。   Further, the determining unit 13 determines the coefficient value of the approximation function (hereinafter referred to as “second coefficient”) so that the brightness value of each pixel in the reference area 203 is approximated by the approximation function. At this time, for example, the least squares method may be used for the approximation. The approximation function in which the second coefficient is set indicates an approximate curved surface that approximates the brightness value of each pixel in the reference area 203 on the circular closed plane.

同じ円形の閉平面(閉円盤)上の対象領域103と参照領域203の近似曲面が得られる。   An approximate curved surface of the target area 103 and the reference area 203 on the same circular closed plane (closed disk) is obtained.

算出部14は、第1係数を用いて近似用関数の方向(以下「第1回転角度」という)を求め、第2係数を用いて近似用関数の方向(以下「第2回転角度」という)を求め、第1回転角度と第2回転角度との相対角度を算出する。   The calculating unit 14 obtains the direction of the approximation function (hereinafter referred to as “first rotation angle”) using the first coefficient, and uses the second coefficient to determine the direction of the approximation function (hereinafter referred to as “second rotation angle”). Is calculated and the relative angle between the first rotation angle and the second rotation angle is calculated.

式(1)は、近似用関数の一例である2変数二次関数を示している。式(1)の2変数二次関数には、a、b、cという変更可能な係数が含まれている。式(1)の2変数二次関数は、式(2)に示す座標変換により、回転角θを含まない式(3)に示すような標準形の2変数二次関数に変換することができる。対象領域103および参照領域203は後述する回転部15による回転処理を行っても、回転角θを含まない式(3)の係数α、βが変化しない。   Expression (1) shows a two-variable quadratic function that is an example of an approximation function. The two-variable quadratic function of Expression (1) includes changeable coefficients a, b, and c. The two-variable quadratic function of the equation (1) should be converted into the standard two-variable quadratic function as shown in the equation (3) not including the rotation angle θ by the coordinate transformation shown in the equation (2). You can The target region 103 and the reference region 203 do not change the coefficients α and β of the equation (3) that does not include the rotation angle θ even when the rotation processing by the rotation unit 15 described below is performed.

Figure 0006681078
仮に、閉円盤D上の2つの画像曲面が合同であり、ある相対角度Δθをもっている場合、各々の画像曲面を式(1)で最小二乗近似し、式(3)の標準形に変換すると、各々の画像曲面についての回転角を求めることができる。それらの回転角をθ、θ´とすると、回転角θ、θ´は各画像曲面の方向を示す特徴量といえる。そして、2つの画像曲面の相対角度Δθは式(4)により表すことができる。
Figure 0006681078
If the two image curved surfaces on the closed disk D are congruent and have a certain relative angle Δθ, each image curved surface is subjected to least square approximation by the equation (1) and converted into the standard form of the equation (3), The rotation angle for each image curved surface can be obtained. When the rotation angles are θ and θ ′, it can be said that the rotation angles θ and θ ′ are feature amounts indicating the directions of the image curved surfaces. Then, the relative angle Δθ between the two image curved surfaces can be expressed by Expression (4).

Figure 0006681078
算出部14は、これを利用することにより、対象領域103と参照領域203のそれぞれの方向を示す回転角θ、θ´を算出し、さらに相対角度Δθを算出することができる。
Figure 0006681078
By using this, the calculation unit 14 can calculate the rotation angles θ and θ ′ indicating the respective directions of the target region 103 and the reference region 203, and further can calculate the relative angle Δθ.

更に、算出部14は、後述する回転部15による回転処理後の対象領域103と参照領域203の類似度を算出し、類似度情報22に記録する。   Further, the calculation unit 14 calculates the similarity between the target region 103 and the reference region 203 after the rotation processing by the rotation unit 15 described later, and records it in the similarity information 22.

図5は、回転処理の一実施例を説明する図である。   FIG. 5 is a diagram illustrating an example of the rotation process.

以下の説明では、回転処理において、参照領域のみを回転するものとして説明するが、対象領域を回転してもよいし、対象領域および参照領域を回転してもよい。   In the following description, it is assumed that only the reference area is rotated in the rotation processing, but the target area may be rotated, or the target area and the reference area may be rotated.

回転部15は、相対角度Δθが小さくなるように参照領域203を回転させる。好ましくは、回転部15は、相対角度Δθがゼロとなるように参照領域203を回転させる。対象領域103と参照領域203とが同じ円形状であるため、回転部15が参照領域203を回転させたとき、対象領域103に含まれる複数の画素に対応する位置の参照領域203における輝度値は、参照領域203に含まれる複数の画素の輝度値から算出することができる。例えば、輝度値を算出したい位置の周辺の画素の輝度値の加重平均値を当該位置の輝度値としてもよい。   The rotating unit 15 rotates the reference area 203 so that the relative angle Δθ becomes smaller. Preferably, the rotating unit 15 rotates the reference area 203 so that the relative angle Δθ becomes zero. Since the target area 103 and the reference area 203 have the same circular shape, when the rotating unit 15 rotates the reference area 203, the luminance value in the reference area 203 at the position corresponding to the plurality of pixels included in the target area 103 is It can be calculated from the brightness values of a plurality of pixels included in the reference area 203. For example, a weighted average value of the brightness values of pixels around the position where the brightness value is desired to be calculated may be used as the brightness value of the position.

図6は、実施例1によるブロックマッチング処理を示すフローチャートである。   FIG. 6 is a flowchart showing the block matching process according to the first embodiment.

探索部11は、フレーム情報21から対象フレーム100と参照フレーム200とを取得し、対象フレーム100内に対象ブロック101を決定する(ステップS101)。   The search unit 11 acquires the target frame 100 and the reference frame 200 from the frame information 21, and determines the target block 101 in the target frame 100 (step S101).

探索部11は、探索領域202内で1つの参照ブロック201を決定する(ステップS102)。一例として、対象ブロック101の位置と同じ位置を基準位置とし、基準位置の所定範囲内にて参照ブロック201を順次所定幅ずつスライドさせるものとする。前回の参照ブロック201から所定幅だけスライドした位置に今回の参照ブロック201を決定する。   The search unit 11 determines one reference block 201 in the search area 202 (step S102). As an example, it is assumed that the same position as the position of the target block 101 is set as a reference position and the reference block 201 is sequentially slid by a predetermined width within a predetermined range of the standard position. The reference block 201 of this time is determined at a position slid by a predetermined width from the reference block 201 of the previous time.

抽出部12は、対象ブロック101に対応する円形の対象領域103と、参照ブロック201に対応する円形の参照領域203とを抽出する(ステップS103)。本実施例において対象ブロック101に対応する対象領域103は、矩形の対象ブロック101の重心を中心とし、対象ブロック101に内包される最大の円に相当する領域である。同様に、参照ブロック201に対応する参照領域203は、矩形の参照ブロック201の重心を中心とし、参照ブロック201に内包される最大の円に相当する領域である。対象ブロック101と参照ブロック201は同じサイズであり、対象領域103と参照領域203は同じサイズである。   The extraction unit 12 extracts a circular target area 103 corresponding to the target block 101 and a circular reference area 203 corresponding to the reference block 201 (step S103). In the present embodiment, the target area 103 corresponding to the target block 101 is an area centered on the center of gravity of the rectangular target block 101 and corresponding to the largest circle included in the target block 101. Similarly, the reference area 203 corresponding to the reference block 201 is an area corresponding to the largest circle included in the reference block 201 with the center of gravity of the rectangular reference block 201 as the center. The target block 101 and the reference block 201 have the same size, and the target area 103 and the reference area 203 have the same size.

決定部13は、2変数二次関数で表される二次曲面により対象領域103の輝度値を近似するように2変数二次関数の係数を決定し、その係数を第1係数とし、2変数二次関数で表される二次曲面により参照領域203の輝度値を近似するように2変数二次変数の係数を決定し、その係数を第2係数とする(ステップS104)。   The determining unit 13 determines the coefficient of the bivariate quadratic function so as to approximate the luminance value of the target region 103 by the quadratic surface represented by the bivariate quadratic function, and sets the coefficient as the first coefficient, The coefficient of the bivariate quadratic variable is determined so that the luminance value of the reference area 203 is approximated by the quadratic surface represented by the bivariate quadratic function, and the coefficient is set as the second coefficient (step S104).

算出部14は、2変数二次関数に対して第1係数および第2係数を用い、対象領域103を近似する二次曲面と、参照領域203を近似する二次曲面との相対角度Δθを算出する(ステップS105)。   The calculation unit 14 uses the first coefficient and the second coefficient for the two-variable quadratic function to calculate the relative angle Δθ between the quadratic surface that approximates the target area 103 and the quadratic surface that approximates the reference area 203. Calculate (step S105).

回転部15は、相対角度Δθを用いて、対象領域103を近似する二次曲面と参照領域203を近似する二次曲面との相対角度が小さくなるように参照領域203を回転する(ステップS106)。好ましくは、対象領域103を近似する二次曲面と参照領域203を近似する二次曲面との相対角度がゼロとなるように参照領域203を回転する。   The rotating unit 15 rotates the reference area 203 by using the relative angle Δθ so that the relative angle between the quadric surface that approximates the target area 103 and the quadric surface that approximates the reference area 203 becomes smaller (step S106). . Preferably, the reference area 203 is rotated so that the relative angle between the quadric surface that approximates the target area 103 and the quadric surface that approximates the reference area 203 becomes zero.

算出部14は、ステップS106の回転処理後の対象領域103と参照領域203との類似度を算出し、類似度情報22に保存する(ステップS107)。   The calculation unit 14 calculates the degree of similarity between the target area 103 and the reference area 203 after the rotation processing in step S106, and stores the similarity in the similarity information 22 (step S107).

探索部11は、探索領域202の全域に参照ブロック201をスライドさせて探索を行ったか否かを判定する(ステップS108)。   The search unit 11 determines whether the search is performed by sliding the reference block 201 over the entire search area 202 (step S108).

探索部11は、探索領域202の全体を探索していないとき(ステップS108にてNo)、ステップS102に戻る。一方、探索部11は、探索領域202の全体を探索し終えたときには(ステップS108にてYes)、類似度情報22を参照して、最も類似度の高い参照ブロック201を、対象ブロック101にマッチした参照ブロック201とする(ステップS109)。これで画像処理装置1はブロックマッチング処理を終了する。   The search part 11 returns to step S102, when not searching the whole search area 202 (No in step S108). On the other hand, when the search unit 11 finishes searching the entire search area 202 (Yes in step S108), the search unit 11 refers to the similarity information 22 and matches the reference block 201 having the highest similarity with the target block 101. The reference block 201 is set (step S109). Then, the image processing device 1 ends the block matching process.

以上説明したように、本実施例によれば、決定部13は、第1領域に含まれる画素の輝度値を所定の近似用関数による曲面で近似するように近似用関数の係数を算出してその係数を第1係数とし、第2領域に含まれる画素の輝度値を近似用関数で近似するように近似用関数の係数を算出してその係数を第2係数とする。算出部14は、第1係数を用いて近似用関数の方向を示す第1回転角度を求め、第2係数を用いて近似用関数の方向を示す第2回転角度を求め、第1回転角度と第2回転角度との相対角度を算出する。相対角度を算出する対象の領域をそれぞれ曲面で近似し、2つの近似曲面の方向(第1回転角度および第2回転角度)の相対角度を第1領域と第2領域の相対角度とするので、複雑な演算を必要とせず、少ない計算量で領域間の相対角度を算出することができる。   As described above, according to the present embodiment, the determining unit 13 calculates the coefficient of the approximation function so that the brightness value of the pixel included in the first area is approximated by the curved surface of the predetermined approximation function. The coefficient is used as the first coefficient, the coefficient of the approximation function is calculated so that the brightness value of the pixel included in the second region is approximated by the approximation function, and the coefficient is set as the second coefficient. The calculating unit 14 obtains a first rotation angle indicating the direction of the approximation function using the first coefficient, obtains a second rotation angle indicating the direction of the approximation function using the second coefficient, and calculates the first rotation angle as the first rotation angle. The relative angle with the second rotation angle is calculated. Since each of the regions for which the relative angle is calculated is approximated by a curved surface, and the relative angles of the two approximate curved surface directions (the first rotation angle and the second rotation angle) are the relative angles of the first region and the second region, The relative angle between regions can be calculated with a small amount of calculation without requiring complicated calculation.

また、本実施例によれば、抽出部12は、矩形の第1ブロックの少なくとも一部の画素を含む円形の第1領域と、矩形の第2ブロックの少なくとも一部の画素を含む円形の第2領域とを抽出する。回転部15は、相対角度が小さくなるように、第1領域と第2領域の少なくとも一方を回転させる回転処理を実行する。算出部14は、回転処理後の第1領域と第2領域の類似度を更に算出する。各矩形のブロックに対応する円形を抽出し、その円形の領域を回転させて類似度を算出するので、回転前後の画像同士の類似度を良好に算出することができる。   Further, according to the present embodiment, the extraction unit 12 includes the circular first area including at least a part of pixels of the rectangular first block and the circular first area including at least a part of pixels of the rectangular second block. 2 areas and are extracted. The rotating unit 15 executes a rotating process of rotating at least one of the first region and the second region so that the relative angle becomes small. The calculation unit 14 further calculates the similarity between the first area and the second area after the rotation processing. Since the circle corresponding to each rectangular block is extracted and the circular area is rotated to calculate the similarity, it is possible to favorably calculate the similarity between the images before and after the rotation.

また、本実施例によれば、抽出部12は、第1領域の中心点を第1ブロックの重心点と一致させ、第2領域の中心点を第2ブロックの重心点と一致させる。矩形のブロックの重心点を中心点とする円形の領域により回転処理を行い、類似度を算出するので、領域同士の類似度により、ブロック間の良好な類似度を得ることができる。   Further, according to the present embodiment, the extraction unit 12 matches the center point of the first area with the center of gravity of the first block, and matches the center point of the second area with the center of gravity of the second block. Since the rotation processing is performed by the circular area having the center of gravity of the rectangular block as the center point and the similarity is calculated, a good similarity between the blocks can be obtained by the similarity between the areas.

また、本実施例によれば、抽出部12は、第1ブロックに内包される円を画素で表現する領域を第1領域とし、第2ブロックに内包される円を画素で表現する領域を第2領域とする。ブロックに包含される円形の領域により類似度を算出するので、ブロックの外部の画素値の影響を受けない類似度を得ることができる。   In addition, according to the present embodiment, the extraction unit 12 defines the area in which the circle included in the first block is expressed in pixels as the first area and the area in which the circle included in the second block is expressed in pixels as the first area. There are two areas. Since the similarity is calculated from the circular area included in the block, the similarity not affected by the pixel value outside the block can be obtained.

また、本実施例によれば、探索部11は、画像のフレーム上で第2ブロックを移動させながら、回転部15による回転処理後に算出部14で算出される第1領域と第2領域の類似度に基づいて、第1領域に最も類似する第2領域に対応する第2ブロックを探索する。これにより、少ない計算量で領域間の相対角度を算出することが可能な回転処理を用いることにより、少ない計算量でブロックマッチングを行うことができる。   Further, according to the present embodiment, the search unit 11 moves the second block on the frame of the image, and while the second block moves, the similarity between the first region and the second region calculated by the calculation unit 14 after the rotation processing by the rotation unit 15 is performed. Based on the degree, the second block corresponding to the second area most similar to the first area is searched. As a result, the block matching can be performed with a small amount of calculation by using the rotation process that can calculate the relative angle between the regions with a small amount of calculation.

(変形例1)
なお、本実施例では、近似用関数の例として、式(1)のような2変数二次関数を用いたが、実施形態がこれに限定されることはない。変形例として2変数一次関数を用いることも可能である。
(Modification 1)
In this example, a two-variable quadratic function as shown in Expression (1) was used as an example of the approximation function, but the embodiment is not limited to this. It is also possible to use a two-variable linear function as a modification.

式(5)は、近似用関数の他の例である2変数一次関数を示している。式(5)の2変数一次関数には、a、bという変更可能な係数が含まれている。式(5)の2変数一次関数は、座標変換により、回転角を含まない式(6)に示すような標準形の2変数一次関数に変換することができる。対象領域103および参照領域203は回転部15による回転処理を行っても、回転角φを含まない式(6)の係数γが変化しない。 Expression (5) shows a two-variable linear function which is another example of the approximation function. The two-variable linear function of the equation (5) includes changeable coefficients a 0 and b 0 . The two-variable linear function of the equation (5) can be converted into a standard two-variable linear function as shown in the equation (6) not including the rotation angle by coordinate transformation. The target region 103 and the reference region 203 do not change in the coefficient γ of the equation (6) that does not include the rotation angle φ even when the rotation process is performed by the rotation unit 15.

Figure 0006681078
仮に、閉円盤D上の2つの画像曲面が合同であり、ある相対角度Δφをもっている場合、各々の画像曲面を式(5)で最小二乗近似し、式(6)の標準形に変換すると、各々の画像曲面についての回転角を求めることができる。それらの回転角をφ、φ´とすると、回転角φ、φ´は各画像曲面の方向を示す特徴量といえる。そして、2つの画像曲面の相対角度Δφは式(7)により表すことができる。
Figure 0006681078
If the two image curved surfaces on the closed disk D are congruent and have a certain relative angle Δφ, each image curved surface is least squares approximated by the equation (5) and converted into the standard form of the equation (6), The rotation angle for each image curved surface can be obtained. If the rotation angles are φ and φ ′, then the rotation angles φ and φ ′ can be said to be feature quantities indicating the directions of the respective image curved surfaces. Then, the relative angle Δφ between the two image curved surfaces can be expressed by Expression (7).

Figure 0006681078
算出部14は、これを利用することにより、対象領域103と参照領域203のそれぞれの方向を示す回転角φ、φ´を算出し、さらに相対角度Δφを算出することができる。
Figure 0006681078
By using this, the calculation unit 14 can calculate the rotation angles φ and φ ′ indicating the respective directions of the target region 103 and the reference region 203, and further can calculate the relative angle Δφ.

(変形例2)
また、本実施例では、矩形の対象ブロック101の重心を中心とし、対象ブロック101に内包される最大の円に相当する領域を対象領域103とし、対象ブロック101と同じサイズの矩形である参照ブロック201の重心を中心とし、参照ブロック201に内包される最大の円に相当する領域を参照領域203とする例を示した。しかしながら、本発明の実施形態がこれに限定されることはない。変形例として、対象ブロック101の全ての画素を含む領域を対象領域103とし、参照ブロック201の全ての画素を含む領域を参照領域203とすることも可能である。
(Modification 2)
Further, in the present embodiment, a reference block which is a rectangle having the same size as the target block 101 is defined as a target region 103, which is an area corresponding to the largest circle included in the target block 101, centered on the center of gravity of the rectangular target block 101. An example has been shown in which the area corresponding to the largest circle included in the reference block 201 is set as the reference area 203 with the center of gravity of 201 as the center. However, the embodiment of the present invention is not limited to this. As a modification, it is possible to set the area including all the pixels of the target block 101 as the target area 103 and the area including all the pixels of the reference block 201 as the reference area 203.

図7は、実施例1の変形例2における対象領域の抽出処理について説明するための図である。図7の変形例では、対象ブロック101の全ての画素を含む画素で最小の円を表現する領域を対象領域103とし、参照ブロック201の全ての画素を含む画素で最小の円を表現する領域を参照領域203とする。   FIG. 7 is a diagram for explaining the extraction processing of the target area in the second modification of the first embodiment. In the modification of FIG. 7, a region in which the pixels including all the pixels of the target block 101 represent the smallest circle is set as the target region 103, and a region in which the pixels including all the pixels of the reference block 201 represent the smallest circle is set as the target region 103. The reference area 203 is used.

以上説明したように、本変形例によれば、抽出部12は、第1ブロックの全ての画素を含む円を画素で表現する領域を第1領域とし、第2ブロックの全ての画素を含む円を画素で表現する領域を第2領域とする。ブロックを包含する円形の領域により類似度を算出するので、ブロックの全画素を考慮した類似度を得ることができる。   As described above, according to the present modification, the extraction unit 12 sets the area, which represents a circle including all the pixels of the first block by pixels, as the first area, and the circle including all the pixels of the second block. The area in which the pixel is expressed is the second area. Since the similarity is calculated by the circular area including the block, it is possible to obtain the similarity considering all the pixels of the block.

(変形例3)
本実施例では、参照ブロック201をスライドさせながら、対象領域103と参照領域203の相対角度を算出して回転処理を行い、回転処理後の対象領域103と参照領域203の類似度を算出し、最も高い類似度が得られる参照ブロック201を見つけるという手順でブロックマッチングを行った。しかしながら、本発明の実施形態がこれに限定されることはない。他の例として、まず対象ブロックとのマッチング候補となる参照ブロックを絞り込み、絞り込まれた参照ブロックについて回転処理と回転処理後の類似度算出を行い、回転処理後の類似度に基づいて対象ブロックとマッチングする参照ブロックを見つけることにしてもよい。回転処理の実行回数を削減し、計算量を低減することができる。
(Modification 3)
In the present embodiment, while rotating the reference block 201, the relative angle between the target area 103 and the reference area 203 is calculated and the rotation processing is performed, and the similarity between the target area 103 and the reference area 203 after the rotation processing is calculated. Block matching was performed by the procedure of finding the reference block 201 that gives the highest similarity. However, the embodiment of the present invention is not limited to this. As another example, first, a reference block that is a candidate for matching with the target block is narrowed down, a rotation process and a similarity calculation after the rotation process are performed on the narrowed down reference block, and the target block is calculated based on the similarity after the rotation process. You may decide to find a matching reference block. It is possible to reduce the number of executions of the rotation processing and reduce the amount of calculation.

図8は、実施例1の変形例3によるブロックマッチング処理を示すフローチャートである。図8を参照すると、ステップS101は図6に示した実施例1の処理と同じである。   FIG. 8 is a flowchart showing the block matching process according to the third modification of the first embodiment. Referring to FIG. 8, step S101 is the same as the processing of the first embodiment shown in FIG.

ステップS101の後、ステップS301では、算出部14が、対象ブロック101と探索領域202上の全ての参照ブロック201との類似度を算出し、探索部11が、算出された類似度に基づいてマッチング候補となる1つ以上の参照ブロック201を選択する。マッチング候補は、対象ブロック101との回転処理を伴うブロックマッチング処理の対象となる参照ブロック201である。例えば、対象ブロック101との類似度が所定値以上の参照ブロック201をマッチング候補としてもよい。あるいは、対象ブロック101との類似度が上位所定個の参照ブロック201をマッチング候補としてもよい。なお、探索部11は、算出部14が、対象ブロック101と探索領域202上の一部、または全ての参照ブロック201との類似度を算出し、類似度が所定値以上である所定数の参照ブロック201が見つかったとき、所定数の参照ブロック201をマッチング候補としてもよい。   After step S101, in step S301, the calculation unit 14 calculates the degree of similarity between the target block 101 and all the reference blocks 201 in the search area 202, and the search unit 11 performs matching based on the calculated degree of similarity. One or more reference blocks 201 that are candidates are selected. The matching candidate is the reference block 201 that is the target of the block matching process involving the rotation process with the target block 101. For example, the reference block 201 whose similarity to the target block 101 is a predetermined value or more may be used as the matching candidate. Alternatively, a predetermined number of reference blocks 201 having a higher degree of similarity to the target block 101 may be used as a matching candidate. In the search unit 11, the calculation unit 14 calculates the degree of similarity between the target block 101 and some or all of the reference blocks 201 on the search area 202, and the reference number is equal to or greater than a predetermined value. When the block 201 is found, a predetermined number of reference blocks 201 may be used as matching candidates.

探索部11は、マッチング候補の中から1つの参照ブロック201を決定する(ステップS302)。更に図6に示したステップS103〜ステップS107を行った後、探索部11は、マッチング候補の全ての参照ブロック201の探索を行ったか否かを判定する(ステップS303)。全てのマッチング候補の探索を終えていないとき(ステップS303にてNo)、探索部11は、ステップS302に戻る。一方、全てのマッチング候補を探索し終えたときには(ステップS303にてYes)、探索部11は、類似度情報22を参照して、最も類似度の高い参照ブロック201を、対象ブロック101にマッチした参照ブロック201とする(ステップS109)。これで画像処理装置1はブロックマッチング処理を終了する。   The search unit 11 determines one reference block 201 from the matching candidates (step S302). Further, after performing steps S103 to S107 shown in FIG. 6, the search unit 11 determines whether or not all reference blocks 201 of matching candidates have been searched (step S303). When the search for all matching candidates has not been completed (No in step S303), the search unit 11 returns to step S302. On the other hand, when all the matching candidates have been searched (Yes in step S303), the search unit 11 refers to the similarity information 22 and matches the reference block 201 having the highest similarity with the target block 101. The reference block 201 is set (step S109). Then, the image processing device 1 ends the block matching process.

以上説明したように、本変形例によれば、予め、算出部14が第1ブロックとフレーム全体にわたる第2ブロックのそれぞれとの類似度を算出し、探索部11が、第1ブロックとの類似度に基づいて、フレーム全体にわたる第2ブロックの中からマッチング候補を選択しておく。そして、探索部11は、マッチング候補の第2ブロックを順次選択しながら、第1領域に最も類似する第2領域に対応する第2ブロックを探索する。回転処理をせずに予めマッチング候補の第2ブロックを絞り込み、そのマッチング候補について回転処理を行うので、回転処理の実行回数を削減し、ブロックマッチングの処理量を低減することができる。   As described above, according to the present modification, the calculation unit 14 calculates the similarity between the first block and each of the second blocks over the entire frame in advance, and the search unit 11 determines the similarity between the first block and the first block. Based on the degree, a matching candidate is selected from the second blocks over the entire frame. Then, the search unit 11 searches for the second block corresponding to the second area most similar to the first area while sequentially selecting the second blocks of the matching candidates. Since the second block of the matching candidates is narrowed down in advance without performing the rotation processing and the rotation processing is performed on the matching candidates, the number of executions of the rotation processing can be reduced and the processing amount of the block matching can be reduced.

実施例1では、1つの近似用関数による近似曲面を用いて対象領域103と参照領域203の相対角度を算出する例を示した。しかしながら、本発明の実施形態がこれに限定されることはない。実施例2では、複数の近似用関数による近似曲面を用いて対象領域103と参照領域203の相対角度を算出する例について説明する。   In the first embodiment, an example in which the relative angle between the target region 103 and the reference region 203 is calculated using the approximated curved surface by one approximation function has been shown. However, the embodiment of the present invention is not limited to this. In the second embodiment, an example will be described in which the relative angle between the target region 103 and the reference region 203 is calculated using an approximate curved surface formed by a plurality of approximation functions.

実施例2では、実施例1と同様のブロックマッチングを行う画像処理装置を例示する。   The second embodiment exemplifies an image processing apparatus that performs the same block matching as in the first embodiment.

図9は、実施例2による画像処理装置の機能構成を示すブロック図である。実施例2による画像処理装置1のハードウェア構成も図2に示した実施例1のものと同様である。   FIG. 9 is a block diagram showing the functional arrangement of the image processing apparatus according to the second embodiment. The hardware configuration of the image processing apparatus 1 according to the second embodiment is the same as that of the first embodiment shown in FIG.

図9を参照すると、実施例2による画像処理装置1は基本的な構成として選択部16を更に有する点で図1に示した実施例1のものと異なる。また、実施例2の画像処理装置1は実行するブロックマッチング処理が実施例1のものとは異なる。実施例2のブロックマッチング処理は、2つの近似用関数を用いる点で実施例1のものと異なる。画像処理装置1は、2つの近似用関数を用いてそれぞれ回転処理を行い、それぞれについて類似度を算出した後、より高い類似度が得られた方の相対角度を選択する。   Referring to FIG. 9, the image processing apparatus 1 according to the second embodiment differs from that of the first embodiment shown in FIG. 1 in that the image processing apparatus 1 according to the second embodiment further includes a selection unit 16 as a basic configuration. Further, the block matching processing executed by the image processing apparatus 1 of the second embodiment is different from that of the first embodiment. The block matching process of the second embodiment differs from that of the first embodiment in that two approximation functions are used. The image processing apparatus 1 performs rotation processing using each of the two approximation functions, calculates the degree of similarity for each, and then selects the relative angle for which a higher degree of similarity is obtained.

以下、実施例2の各部の動作および処理フローについて実施例1との差異を中心に説明する。   Hereinafter, the operation and processing flow of each unit of the second embodiment will be described focusing on the differences from the first embodiment.

実施例2の決定部13は、2つの近似用関数の情報を予め保持している。ここでは、2つの近似用関数はいずれも2つの変数を有する関数である。また2つの近似用関数は互いに次数の異なる関数である。具体的には、一方が二次関数であり、他方が一次関数である。以下、2つの近似用関数をそれぞれ第1の近似用関数と第2の近似用関数と称することにする。第1の近似用関数として、実施例1で用いた2変数二次関数(式(1))を用い、第2の近似用関数として、実施例1の変形例で用いた2変数一次関数(式(5))を用いるものとする。   The determination unit 13 of the second embodiment holds in advance information about two approximation functions. Here, each of the two approximation functions is a function having two variables. The two approximation functions have different orders. Specifically, one is a quadratic function and the other is a linear function. Hereinafter, the two approximation functions will be referred to as a first approximation function and a second approximation function, respectively. The two-variable quadratic function (Equation (1)) used in the first embodiment is used as the first approximation function, and the two-variable linear function used in the modification of the first embodiment is used as the second approximation function. (Formula (5)) is used.

そして、決定部13は、対象領域103に含まれる複数の画素の輝度値を第1の近似用関数によって近似するように、第1の近似用関数の第1係数を決定する。第1係数が設定された第1の近似用関数は、円形の閉平面上の対象領域103の各画素の輝度値を近似する近似曲面を示す。また、決定部13は、参照領域203に含まれる複数の画素の輝度値を第1の近似用関数によって近似するように、第1の近似用関数の第2係数を決定する。第2係数が設定された第2の近似用関数も、円形の閉平面上の参照領域203の各画素の輝度値を近似する近似曲面を示す。   Then, the determining unit 13 determines the first coefficient of the first approximation function so that the brightness values of the plurality of pixels included in the target area 103 are approximated by the first approximation function. The first approximation function in which the first coefficient is set indicates an approximate curved surface that approximates the brightness value of each pixel of the target area 103 on the circular closed plane. Further, the determining unit 13 determines the second coefficient of the first approximation function so that the brightness values of the plurality of pixels included in the reference area 203 are approximated by the first approximation function. The second approximation function in which the second coefficient is set also indicates an approximate curved surface that approximates the brightness value of each pixel in the reference area 203 on the circular closed plane.

また、決定部13は、第2の近似用関数を用いて上記と同様の処理を行う。すなわち、決定部13は、対象領域103に含まれる複数の画素の輝度値を第2の近似用関数によって近似するように、第2の近似用関数の第1係数を決定する。第1係数が設定された第2の近似用関数は、円形の閉平面上の対象領域103の各画素の輝度値を近似する近似曲面を示す。また、決定部13は、参照領域203に含まれる複数の画素の輝度値を第2の近似用関数によって近似するように、第2の近似用関数の第2係数を決定する。第2係数が設定された第2の近似用関数も、円形の閉平面上の参照領域203の各画素の輝度値を近似する近似曲面を示す。   Further, the determining unit 13 performs the same processing as above using the second approximation function. That is, the determination unit 13 determines the first coefficient of the second approximation function so that the brightness values of the plurality of pixels included in the target area 103 are approximated by the second approximation function. The second approximation function for which the first coefficient is set indicates an approximate curved surface that approximates the brightness value of each pixel of the target area 103 on the circular closed plane. Further, the determining unit 13 determines the second coefficient of the second approximation function so that the brightness values of the plurality of pixels included in the reference area 203 are approximated by the second approximation function. The second approximation function in which the second coefficient is set also indicates an approximate curved surface that approximates the brightness value of each pixel in the reference area 203 on the circular closed plane.

実施例2の算出部14は、第1の近似用関数を用いた場合と第2の近似用関数を用いた場合のそれぞれについて、第1係数を用いて近似用関数の方向(第1回転角度)を求め、第2係数を用いて近似用関数の方向(第2回転角度)を求め、第1回転角度と第2回転角度との相対角度を算出する。その結果、対象領域103と参照領域203について2つの相対角度が算出される。   The calculation unit 14 of the second embodiment uses the first coefficient to determine the direction of the approximation function (first rotation angle) for each of the case where the first approximation function is used and the case where the second approximation function is used. ) Is obtained, the direction of the approximation function (second rotation angle) is obtained using the second coefficient, and the relative angle between the first rotation angle and the second rotation angle is calculated. As a result, two relative angles are calculated for the target area 103 and the reference area 203.

第1の近似用関数を用いた場合には、上述したように、式(1)に示した第1の近似用関数(二次関数)には、a、b、cという変更可能な係数が含まれている。式(1)の第1の近似用関数は、式(2)に示す座標変換により、回転角θを含まない式(3)に示すような標準形の2変数二次関数に変換することができる。対象領域103の画像を近似した近似曲面の回転角をθとし、参照領域203の画像を近似した近似曲面の回転角をθ´とすることができる。対象領域103の近似曲面と参照領域203の近似曲面の相対角度Δθは式(4)により表すことができる。   When the first approximation function is used, as described above, the first approximation function (quadratic function) shown in the equation (1) has changeable coefficients a, b, and c. include. The first approximation function of Expression (1) should be converted into a standard two-variable quadratic function as shown in Expression (3) that does not include the rotation angle θ by the coordinate conversion shown in Expression (2). You can The rotation angle of the approximate curved surface that approximates the image of the target area 103 can be set to θ, and the rotation angle of the approximate curved surface that approximates the image of the reference area 203 can be set to θ ′. The relative angle Δθ between the approximated curved surface of the target area 103 and the approximated curved surface of the reference area 203 can be expressed by Expression (4).

第2の近似用関数を用いた場合には、上述したように、式(5)に示した第2の近似用関数(一次関数)には、a、bという変更可能な係数が含まれている。式(5)の第2の近似用関数は、式(2)に示す座標変換により、回転角φを含まない式(6)に示すような標準形の2変数一次関数に変換することができる。対象領域103の画像を近似した近似曲面の回転角をφとし、参照領域203の画像を近似した近似曲面の回転角をφ´とすることができる。対象領域103の近似曲面と参照領域203の近似曲面の相対角度Δφは式(7)により表すことができる。 When the second approximation function is used, as described above, the second approximation function (linear function) shown in the equation (5) includes changeable coefficients a 0 and b 0. Has been. The second approximation function of Expression (5) can be converted into the standard two-variable linear function as shown in Expression (6) not including the rotation angle φ by the coordinate conversion shown in Expression (2). . The rotation angle of the approximate curved surface approximating the image of the target region 103 can be set to φ, and the rotation angle of the approximate curved surface approximating the image of the reference region 203 can be set to φ ′. The relative angle Δφ between the approximated curved surface of the target area 103 and the approximated curved surface of the reference area 203 can be expressed by Expression (7).

図4に示したように、対象領域103に相当する円Dの中心を原点とする直交座標系を設定し、中心が円の内部にある画素は対象領域103に含むものとする。式(1)および式(5)に定数項dを加えた多項式(式(8)に示す)を目的関数とし、その最小二乗解(式(9)に示す)を求めることで、第1の近似用関数および第2の近似用関数の係数を算出することができる。   As shown in FIG. 4, an orthogonal coordinate system whose origin is the center of a circle D corresponding to the target area 103 is set, and pixels whose center is inside the circle are included in the target area 103. By using a polynomial (shown in Expression (8)) obtained by adding a constant term d to Expressions (1) and (5) as an objective function and finding a least squares solution thereof (shown in Expression (9)), the first The coefficients of the approximation function and the second approximation function can be calculated.

Figure 0006681078
式(3)の係数α、βは、算出された係数a、b、cから、式(10)を用いて算出される。式(6)の係数γは、算出された係数a、bにより、式(11)で算出される。更に、回転角θは式(12)で算出され、回転角φは式(13)で算出される。なお、θおよびφはx軸を基準に反時計回りの角度とする。
Figure 0006681078
The coefficients α and β of the equation (3) are calculated from the calculated coefficients a, b and c using the equation (10). The coefficient γ of Expression (6) is calculated by Expression (11) using the calculated coefficients a 0 and b 0 . Further, the rotation angle θ is calculated by the equation (12), and the rotation angle φ is calculated by the equation (13). Note that θ and φ are counterclockwise angles with respect to the x axis.

Figure 0006681078
算出部14は、参照領域203についても、上記対象領域103と同様に計算することで、回転角θ´、φ´を算出する。更に、算出部14は、式(4)により相対角度Δθを算出し、式(7)により相対角度Δφを算出する。
Figure 0006681078
The calculation unit 14 also calculates the rotation angles θ ′ and φ ′ for the reference area 203 as in the case of the target area 103. Further, the calculation unit 14 calculates the relative angle Δθ by the equation (4) and the relative angle Δφ by the equation (7).

更に、算出部14は、第1の近似用関数および第2の近似用関数について回転部15による回転処理後の対象領域103と参照領域203の類似度(第1類似度および第2類似度)を算出し、第1類似度および第2類似度のうち、より高い値を示した方(より類似している方)の類似度を類似度情報22に記録する。   Furthermore, the calculation unit 14 calculates the similarity between the target region 103 and the reference region 203 after the rotation processing by the rotation unit 15 for the first approximation function and the second approximation function (first similarity and second similarity). Of the first similarity and the second similarity, and the similarity showing the higher value (more similar) is recorded in the similarity information 22.

回転部15は、相対角度Δθが小さくなるように、好ましくは相対角度Δθがゼロとなるように、参照領域203を回転させる。また、回転部15は、相対角度Δφが小さくなるように、好ましくは相対角度Δφがゼロとなるように、参照領域203を回転させる。ここでは、回転処理において、参照領域のみを回転するものとして説明するが、対象領域を回転してもよいし、対象領域および参照領域を回転してもよい。   The rotating unit 15 rotates the reference region 203 so that the relative angle Δθ becomes small, preferably the relative angle Δθ becomes zero. Further, the rotating unit 15 rotates the reference region 203 so that the relative angle Δφ becomes small, preferably the relative angle Δφ becomes zero. Here, in the rotation process, only the reference area is described as being rotated, but the target area may be rotated, or the target area and the reference area may be rotated.

選択部16は、相対角度Δθと相対角度Δφのいずれを用いた方が回転処理後の類似度が高いかを判定し、類似度が高い方を対象領域103と参照領域203の相対角度と決定し、類似度情報22に記録する。   The selection unit 16 determines which of the relative angle Δθ and the relative angle Δφ is higher in similarity after the rotation processing, and determines the higher similarity as the relative angle between the target region 103 and the reference region 203. Then, it is recorded in the similarity information 22.

図10、図11は、実施例2によるブロックマッチング処理を示すフローチャートである。   10 and 11 are flowcharts showing the block matching processing according to the second embodiment.

図10を参照すると、ステップS101〜ステップS103は図6に示した実施例1の処理と同じである。ステップS103の後、決定部13は、第1の近似用関数および第2の近似用関数のそれぞれについて、当該近似用関数で表される曲面および平面により対象領域103の輝度値を近似するように近似用関数の係数を決定し、その係数を第1係数とする。さらに、決定部13は、第1の近似用関数および第2の近似用関数のそれぞれについて、当該近似用関数で表される曲面および平面により参照領域203の輝度値を近似するように近似用関数の係数を決定し、その係数を第2係数とする(ステップS201)。   Referring to FIG. 10, steps S101 to S103 are the same as the processing of the first embodiment shown in FIG. After step S103, the determination unit 13 approximates the brightness value of the target area 103 by the curved surface and the plane represented by the approximation function for each of the first approximation function and the second approximation function. The coefficient of the approximation function is determined, and the coefficient is set as the first coefficient. Further, the determining unit 13 approximates each of the first approximation function and the second approximation function so that the brightness value of the reference region 203 is approximated by the curved surface and the plane represented by the approximation function. Is determined and the coefficient is set as the second coefficient (step S201).

算出部14は、第1の近似用関数および第2の近似用関数のそれぞれについて、それぞれの第1係数および第2係数を用い、対象領域103を近似する曲面と、参照領域203を近似する曲面との相対角度Δθおよび相対角度Δφを算出する(ステップS202)。第1の近似用関数は二次関数であるので、第1の近似用関数を用いた場合、対象領域103および参照領域203の各画像曲面は二次曲面で近似される。第2の近似用関数は一次関数であるので、第2の近似用関数を用いた場合、対象領域103および参照領域203の各画像曲面は一次平面で近似される。第1の近似用関数を用いて算出される相対角度がΔθであり、第2の近似用関数を用いて算出される相対角度がΔφである。   The calculating unit 14 uses the first coefficient and the second coefficient for each of the first approximation function and the second approximation function, and uses the respective first and second coefficients to approximate the target area 103 and the reference area 203. And the relative angle Δθ and the relative angle Δφ are calculated (step S202). Since the first approximation function is a quadratic function, when the first approximation function is used, each image curved surface of the target region 103 and the reference region 203 is approximated by a quadric surface. Since the second approximation function is a linear function, when the second approximation function is used, each image curved surface of the target region 103 and the reference region 203 is approximated by a linear plane. The relative angle calculated using the first approximation function is Δθ, and the relative angle calculated using the second approximation function is Δφ.

ステップS106にて回転部15が、実施例1と同様に、相対角度Δθを用いて対象領域103を近似する二次曲面と参照領域203を近似する二次曲面との相対角度が小さくなるように参照領域203を回転すると、算出部14は、ステップS106の回転処理後の対象領域103と参照領域203との類似度を第1類似度として算出する(ステップS203)。ここで算出される第1類似度はまだ類似度情報22に記録されない点で実施例2のステップS203は実施例1のステップS107と異なる。   In step S106, the rotation unit 15 reduces the relative angle between the quadric surface that approximates the target region 103 and the quadric surface that approximates the reference region 203 by using the relative angle Δθ, as in the first embodiment. When the reference area 203 is rotated, the calculation unit 14 calculates the similarity between the target area 103 and the reference area 203 after the rotation processing in step S106 as the first similarity (step S203). Step S203 of the second embodiment differs from step S107 of the first embodiment in that the first similarity calculated here is not yet recorded in the similarity information 22.

続いて、ステップS106〜S203にて相対角度Δθを用いて実行された処理と同様の処理が相対角度Δφを用いて実行される。   Subsequently, the same processing as the processing executed using the relative angle Δθ in steps S106 to S203 is executed using the relative angle Δφ.

すなわち、ステップS204にて、回転部15が、相対角度Δφを用いて対象領域103を近似する一次平面と参照領域203を近似する一次平面との相対角度が小さくなるように参照領域203を回転する。ステップS205では、算出部14は、ステップS204の回転処理後の対象領域103と参照領域203との類似度を第2類似度として算出する(ステップS205)。ここで算出される第2類似度もまだ類似度情報22に記録されない。   That is, in step S204, the rotation unit 15 rotates the reference area 203 so that the relative angle between the primary plane that approximates the target area 103 and the primary plane that approximates the reference area 203 becomes smaller using the relative angle Δφ. . In step S205, the calculation unit 14 calculates the similarity between the target area 103 and the reference area 203 after the rotation processing of step S204 as the second similarity (step S205). The second similarity calculated here is not yet recorded in the similarity information 22.

図11を参照すると、選択部16は、第1類似度が第2類似度以上であるか否か判定する(ステップS206)。すなわち、選択部16は、対象領域103と参照領域203を相対的に回転させる回転処理の結果を用いて、対象領域103と参照領域203とがより類似する相対角度は、ΔθであるかΔφであるかを判定する。   Referring to FIG. 11, the selection unit 16 determines whether the first similarity is equal to or higher than the second similarity (step S206). That is, the selection unit 16 uses the result of the rotation process that relatively rotates the target region 103 and the reference region 203, and the relative angle at which the target region 103 and the reference region 203 are more similar is Δθ or Δφ. Determine if there is.

第1類似度が第2類似度以上であれば、選択部16は、第1類似度を類似度情報22に記録する(ステップS207)。第1類似度が第2類似度以上でなければ、選択部16は、第2類似度を類似度情報22に記録する(ステップS208)。すなわち、選択部16は、類似度が高くなる方の相対角度で参照領域203を回転して求めた、対象領域103と参照領域203との類似度を類似度情報22に保存する。   If the first similarity is equal to or higher than the second similarity, the selection unit 16 records the first similarity in the similarity information 22 (step S207). If the first similarity is not equal to or higher than the second similarity, the selection unit 16 records the second similarity in the similarity information 22 (step S208). That is, the selection unit 16 stores the similarity between the target area 103 and the reference area 203, which is obtained by rotating the reference area 203 at the relative angle with which the similarity becomes higher, in the similarity information 22.

ステップS108〜ステップS109は図6に示した実施例1の処理と同じである。これで画像処理装置1はブロックマッチング処理を終了する。   Steps S108 to S109 are the same as the processing of the first embodiment shown in FIG. Then, the image processing device 1 ends the block matching process.

以上説明したように、本実施例によれば、決定部13は、次数の異なる複数の2変数関数を用いて、各2変数関数の第1係数および第2係数を決定する。算出部14は、2変数関数のそれぞれに対して第1係数および第2係数を用いて各相対角度を算出する。回転部15は、各相対角度のそれぞれに対して回転処理を行う。選択部16は、各相対角度のうち、回転処理後に第1領域と第2領域とがより類似する相対角度を選択する。次数の異なる複数の関数を用いた近似で求めた相対角度から、より類似する相対角度を選択するので、相対角度の精度を向上させることができる。   As described above, according to the present embodiment, the determining unit 13 determines the first coefficient and the second coefficient of each two-variable function using a plurality of two-variable functions having different orders. The calculation unit 14 calculates each relative angle using the first coefficient and the second coefficient for each of the two variable functions. The rotating unit 15 performs a rotating process on each of the relative angles. The selection unit 16 selects a relative angle among the relative angles in which the first region and the second region are more similar after the rotation process. Since a more similar relative angle is selected from the relative angles obtained by approximation using a plurality of functions having different orders, the accuracy of the relative angle can be improved.

上述したように実施例1に例示した画像処理はフレーム間予測符号化による動画像圧縮に利用することができる。本実施例は映像をフレーム間予測符号化する符号化装置を例示する。以下、実施例3の符号化装置について、主に実施例1による画像処理装置1との差異について説明する。   As described above, the image processing illustrated in the first embodiment can be used for moving image compression by interframe predictive coding. This embodiment exemplifies an encoding device for performing interframe predictive encoding of video. The differences between the encoding apparatus according to the third embodiment and the image processing apparatus 1 according to the first embodiment will be mainly described below.

図12は、実施例3による符号化装置の機能構成を示すブロック図である。   FIG. 12 is a block diagram showing the functional arrangement of the encoding device according to the third embodiment.

符号化装置2は、フレーム情報21に格納された動画をフレーム間予測符号化方式で符号化し、符号化後のフレームを符号化フレーム情報23に記録する。動画像は時系列のフレームで構成されている。フレーム間予測では、符号化の対象フレームの画像を、それと異なる時刻の符号化処理済の参照フレームを基に予測し、対象フレームの実際の画像と予測した画像の差分を符号化することにより動画像のデータを圧縮するものである。   The encoding device 2 encodes the moving image stored in the frame information 21 by the inter-frame predictive encoding method, and records the encoded frame in the encoded frame information 23. The moving image is composed of time-series frames. In inter-frame prediction, the image of the target frame to be encoded is predicted based on the reference frame that has been encoded at a different time, and the difference between the actual image of the target frame and the predicted image is encoded to create a moving image. It is for compressing image data.

符号化装置2は、フレームを複数に分割したブロック単位で処理する。ブロック単位の処理にて、符号化装置2は、対象フレーム内の対象ブロックに類似する参照ブロックを参照フレームから探し出し、探索された参照ブロックと対象ブロックとの差分画像を求める。符号化装置2は、さらに、対象ブロックと参照ブロックとの相対位置を示す動きベクトルを求める。そして、符号化装置2は、これら差分画像と動きベクトルとを符号化フレーム情報23に記録する。   The encoding device 2 processes in units of blocks obtained by dividing a frame into a plurality of parts. In the processing on a block-by-block basis, the encoding device 2 searches the reference frame for a reference block similar to the target block in the target frame, and obtains a difference image between the searched reference block and the target block. The encoding device 2 further obtains a motion vector indicating the relative position between the target block and the reference block. Then, the encoding device 2 records the difference image and the motion vector in the encoded frame information 23.

図12に示すように、実施例3の符号化装置2は、符号化部17を更に有する点で、実施例1による画像処理装置1と異なる。   As shown in FIG. 12, the encoding device 2 according to the third embodiment differs from the image processing device 1 according to the first embodiment in that the encoding device 2 further includes an encoding unit 17.

本符号化装置2における探索部11の処理について図3を参照して説明する。動画をフレーム間符号化するため、探索部11は、動画の符号化処理済の参照フレーム200上で、より具体的には探索領域202内で、参照ブロック201をスライドさせながら、回転部15による回転処理後に算出される対象領域103と参照領域203の類似度に基づいて、対象領域103に類似する参照領域203が抽出される参照ブロック201を探索する。   The processing of the search unit 11 in the encoding device 2 will be described with reference to FIG. In order to perform the inter-frame encoding of the moving image, the search unit 11 uses the rotating unit 15 while sliding the reference block 201 on the reference frame 200 on which the moving image has been encoded, more specifically, in the search area 202. The reference block 201 from which the reference area 203 similar to the target area 103 is extracted is searched based on the similarity between the target area 103 and the reference area 203 calculated after the rotation processing.

また、本符号化装置2における算出部14は、対象ブロック101と参照ブロック201の類似度とともに、その類似度を算出したときの対象領域103と参照領域203の相対角度Δθの情報も記憶部20に記録する。   Further, the calculation unit 14 in the present encoding device 2 stores the information on the degree of similarity between the target block 101 and the reference block 201 and the relative angle Δθ between the target region 103 and the reference region 203 when the similarity is calculated. To record.

符号化部17は、フレーム情報21の各フレームに対してフレーム間予測符号化処理を行い、各フレーム内のブロックに対して差分画像と動きベクトルを生成し、符号化フレーム情報23に記録する。生成される差分画像は、対象ブロック101と、対象領域103に類似する参照領域203に対応する参照ブロック201との差分画像である。生成される動きベクトルは、対象ブロック101と参照ブロック201の相対位置を示すベクトル情報である。対象ブロック101と参照ブロック201との相対位置には回転角度と平行移動量が含まれる。符号化部17は、算出部14により算出され、記憶部20に記録された相対角度Δθを、対象ブロック101と参照ブロック201の回転角度とする。   The encoding unit 17 performs interframe predictive encoding processing on each frame of the frame information 21, generates a difference image and a motion vector for a block in each frame, and records the difference image and the motion vector in the encoded frame information 23. The generated difference image is a difference image between the target block 101 and the reference block 201 corresponding to the reference area 203 similar to the target area 103. The generated motion vector is vector information indicating the relative position of the target block 101 and the reference block 201. The relative position between the target block 101 and the reference block 201 includes the rotation angle and the translation amount. The encoding unit 17 sets the relative angle Δθ calculated by the calculation unit 14 and recorded in the storage unit 20 as the rotation angle of the target block 101 and the reference block 201.

以上説明したように、本実施例によれば、探索部11は、動画の符号化処理済の参照フレーム上で第2ブロックを移動させながら、回転処理後に算出される第1領域と第2領域の類似度に基づいて、第1領域に類似する第2領域が抽出される第2ブロックを探索する。符号化部17は、第1ブロックと第1領域に類似する第2領域に対応する第2ブロックとの差分画像、および第1ブロックと第2ブロックの相対的な位置関係を示す相対位置情報(動きベクトル)を生成する。少ない計算量で領域間の相対角度を算出することが可能な回転処理を用いることにより、少ない計算量で動画像をフレーム間予測符号化方式で符号化することができる。   As described above, according to the present embodiment, the search unit 11 moves the second block on the reference frame that has been subjected to the encoding process of the moving image, and the first region and the second region calculated after the rotation process. The second block in which the second region similar to the first region is extracted is searched for based on the similarity degree of. The encoding unit 17 determines the difference image between the first block and the second block corresponding to the second region similar to the first region, and the relative position information indicating the relative positional relationship between the first block and the second block ( Motion vector) is generated. By using the rotation process that can calculate the relative angle between regions with a small amount of calculation, a moving image can be encoded by the inter-frame predictive encoding method with a small amount of calculation.

また、本実施例によれば、相対位置情報(動きベクトル)には第2ブロックと第1ブロックの相対角度が含まれ、符号化部17は、第1領域と第1領域に類似する第2領域との相対角度を、第1ブロックと第2ブロックの相対角度とする。フレーム間予測符号化において、ブロックマッチングにて少ない計算量で算出した相対角度を符号化結果に含まれるブロック間の相対角度として利用するので、少ない計算量でフレーム間符号化を行うことができる。   Further, according to the present embodiment, the relative position information (motion vector) includes the relative angle between the second block and the first block, and the encoding unit 17 determines that the first area and the second area similar to the first area. The relative angle with the area is the relative angle between the first block and the second block. In the inter-frame predictive coding, the relative angle calculated with a small amount of calculation by block matching is used as the relative angle between the blocks included in the coding result, so that the inter-frame coding can be performed with a small amount of calculation.

上述した本発明の実施形態は、本発明の説明のための例示であり、本発明の範囲をそれらの実施形態にのみ限定する趣旨ではない。当業者は、本発明の範囲を逸脱することなしに、他の様々な態様で本発明を実施することができる。上記各実施例の装置は、ソフトウェアプログラムをプロセッサで実行することにより実現されるものとして例示したが、これに限定されることはない。制御部10の一部または全部の機能をハードウェアで実現するものであってもよい。また、制御部10の一部または全部の機能を専用プロセッサで実現するものであってもよい。   The above-described embodiments of the present invention are examples for explaining the present invention, and are not intended to limit the scope of the present invention only to those embodiments. Those skilled in the art can implement the present invention in various other modes without departing from the scope of the present invention. The apparatus of each of the above embodiments has been illustrated as being realized by executing a software program on a processor, but the present invention is not limited to this. A part or all of the functions of the control unit 10 may be realized by hardware. Further, a part or all of the functions of the control unit 10 may be realized by a dedicated processor.

1…画像処理装置、2…符号化装置、10…制御部、11…探索部、12…抽出部、13…決定部、14…算出部、15…回転部、16…選択部、17…符号化部、20…記憶部、21…フレーム情報、22…類似度情報、23…符号化フレーム情報、100…対象フレーム、101…対象ブロック、102…探索領域、103…対象領域、200…参照フレーム、201…参照ブロック、202…探索領域、203…参照領域、204…矢印、400…コンピュータ装置、401…制御回路、402…記憶装置、403…読書装置、404…記録媒体、405…通信インターフェイス、406…入出力インターフェイス、407…入力装置、408…表示装置、409…ネットワーク、410…バス DESCRIPTION OF SYMBOLS 1 ... Image processing device, 2 ... Encoding device, 10 ... Control part, 11 ... Search part, 12 ... Extraction part, 13 ... Determination part, 14 ... Calculation part, 15 ... Rotation part, 16 ... Selection part, 17 ... Code Coding unit, 20 ... storage unit, 21 ... frame information, 22 ... similarity information, 23 ... coding frame information, 100 ... target frame, 101 ... target block, 102 ... search area, 103 ... target area, 200 ... reference frame , 201 ... Reference block, 202 ... Search area, 203 ... Reference area, 204 ... Arrow, 400 ... Computer device, 401 ... Control circuit, 402 ... Storage device, 403 ... Reading device, 404 ... Recording medium, 405 ... Communication interface, 406 ... Input / output interface, 407 ... Input device, 408 ... Display device, 409 ... Network, 410 ... Bus

Claims (8)

第1領域に含まれる画素の輝度値を所定の近似用関数による曲面で近似するように前記近似用関数の係数を算出して該係数を第1係数とし、第2領域に含まれる画素の輝度値を前記近似用関数で近似するように前記近似用関数の係数を算出して該係数を第2係数とする決定部と、
前記第1係数を用いて前記近似用関数の方向を示す第1回転角度を求め、前記第2係数を用いて前記近似用関数の方向を示す第2回転角度を求め、前記第1回転角度と前記第2回転角度との相対角度を算出する算出部と、
を有する画像処理装置。
The brightness of the pixels included in the second region is calculated by calculating the coefficient of the approximation function so that the brightness value of the pixels included in the first region is approximated by a curved surface using a predetermined approximation function. A determining unit that calculates a coefficient of the approximation function so that the value is approximated by the approximation function, and sets the coefficient as a second coefficient;
A first rotation angle indicating the direction of the approximation function is obtained using the first coefficient, a second rotation angle indicating the direction of the approximation function is obtained using the second coefficient, and the first rotation angle A calculation unit that calculates a relative angle with the second rotation angle;
An image processing apparatus having.
矩形の第1ブロックの少なくとも一部の画素を含む円形の前記第1領域と、矩形の第2ブロックの少なくとも一部の画素を含む円形の前記第2領域とを抽出する抽出部と、
前記相対角度が小さくなるように、前記第1領域と前記第2領域の少なくとも一方を回転させる回転処理を実行する回転部と、を更に有し、
前記算出部は、前記回転処理後の前記第1領域と前記第2領域の類似度を更に算出する、
請求項1に記載の画像処理装置。
An extraction unit that extracts the circular first region including at least a portion of pixels of the rectangular first block and the circular second region including at least a portion of pixels of the rectangular second block;
A rotation unit that performs a rotation process of rotating at least one of the first region and the second region so that the relative angle becomes smaller,
The calculator further calculates the degree of similarity between the first area and the second area after the rotation processing,
The image processing apparatus according to claim 1.
前記決定部は、次数の異なる複数の2変数関数を用いて、前記各2変数関数の前記第1係数および前記第2係数を決定し、
前記算出部は、前記2変数関数のそれぞれに対して前記第1係数および前記第2係数を用いて前記各相対角度を算出し、
前記回転部は、前記各相対角度のそれぞれに対して前記回転処理を行い、
前記画像処理装置は、前記各相対角度のうち、前記回転処理後に前記第1領域と前記第2領域とがより類似する相対角度を選択する選択部、を更に有する、
請求項2に記載の画像処理装置。
The determining unit determines the first coefficient and the second coefficient of each of the two-variable functions using a plurality of two-variable functions of different orders,
The calculation unit calculates the relative angles using the first coefficient and the second coefficient for each of the two-variable functions,
The rotation unit performs the rotation process for each of the relative angles,
The image processing apparatus further includes a selection unit that selects, from the relative angles, a relative angle at which the first region and the second region are more similar to each other after the rotation process.
The image processing device according to claim 2.
画像のフレーム上で前記第2ブロックを移動させながら、前記回転部による前記回転処理後に前記算出部で算出される前記第1領域と前記第2領域の類似度に基づいて、前記第1領域に最も類似する前記第2領域に対応する第2ブロックを探索する探索部、を更に有する、
請求項2または3に記載の画像処理装置。
While moving the second block on the frame of the image, based on the similarity between the first region and the second region calculated by the calculation unit after the rotation processing by the rotation unit, A search unit that searches for a second block corresponding to the most similar second region;
The image processing apparatus according to claim 2.
予め、前記算出部が前記第1ブロックと、該第1ブロックの前記フレーム上の位置に基づいて定まる前記フレーム上の探索領域にわたる前記第2ブロックのそれぞれとの類似度を算出し、前記探索部が、前記第1ブロックとの類似度に基づいて、前記フレーム全体にわたる前記第2ブロックの中からマッチング候補を選択しておき、
前記探索部は、前記マッチング候補の第2ブロックを順次選択しながら、前記第1領域に最も類似する前記第2領域に対応する第2ブロックを探索する、
請求項4に記載の画像処理装置。
The calculation unit calculates in advance the degree of similarity between the first block and each of the second blocks over the search region on the frame determined based on the position of the first block on the frame, and the search unit However, a matching candidate is selected from the second blocks over the entire frame based on the similarity with the first block,
The search unit searches for a second block corresponding to the second area that is most similar to the first area while sequentially selecting the second blocks of the matching candidates.
The image processing apparatus according to claim 4.
前記画像処理装置は、フレーム間予測符号化で動画を符号化する符号化装置であり、
前記探索部は、前記動画の符号化処理済の参照フレーム上で前記第2ブロックを移動させながら、前記回転処理後に算出される前記第1領域と前記第2領域の類似度に基づいて、前記第1領域に類似する前記第2領域が抽出される第2ブロックを探索し、
前記画像処理装置は、
前記第1ブロックと前記第1領域に類似する前記第2領域に対応する第2ブロックとの差分画像、および前記第1ブロックと前記第2ブロックの相対的な位置関係を示す相対位置情報を生成する符号化部、
を更に有する、請求項4または5に記載の画像処理装置。
The image processing device is an encoding device that encodes a moving image by interframe predictive encoding,
The search unit moves the second block on a reference frame that has been subjected to encoding processing of the moving image, and based on the similarity between the first area and the second area calculated after the rotation processing, Searching for a second block from which the second region similar to the first region is extracted,
The image processing device,
Generating a difference image between the first block and a second block corresponding to the second region similar to the first region, and relative position information indicating a relative positional relationship between the first block and the second block An encoding unit that
The image processing apparatus according to claim 4, further comprising:
決定部が、第1領域に含まれる画素の輝度値を所定の近似用関数による曲面で近似するように前記近似用関数の係数を算出して該係数を第1係数とし、第2領域に含まれる画素の輝度値を前記近似用関数で近似するように前記近似用関数の係数を算出して該係数を第2係数とし、
算出部が、前記第1係数を用いて前記近似用関数の方向を示す第1回転角度を求め、前記第2係数を用いて前記近似用関数の方向を示す第2回転角度を求め、前記第1回転角度と前記第2回転角度との相対角度を算出する、
画像処理方法。
The determining unit calculates a coefficient of the approximation function so that the brightness value of a pixel included in the first area is approximated by a curved surface by a predetermined approximation function, sets the coefficient as a first coefficient, and includes the coefficient in the second area. The coefficient of the approximation function is calculated so as to approximate the brightness value of the pixel to be approximated by the approximation function, and the coefficient is set as the second coefficient,
The calculation unit obtains a first rotation angle indicating the direction of the approximation function using the first coefficient, obtains a second rotation angle indicating the direction of the approximation function using the second coefficient, and calculates the first rotation angle. Calculating a relative angle between one rotation angle and the second rotation angle,
Image processing method.
コンピュータが備えるプロセッサに実行させるためのソフトウェアプログラムであって、
前記プロセッサが実行することにより、前記コンピュータを、
第1領域に含まれる画素の輝度値を所定の近似用関数による曲面で近似するように前記近似用関数の係数を算出して該係数を第1係数とし、第2領域に含まれる画素の輝度値を前記近似用関数で近似するように前記近似用関数の係数を算出して該係数を第2係数とする決定部と、
前記第1係数を用いて前記近似用関数の方向を示す第1回転角度を求め、前記第2係数を用いて前記近似用関数の方向を示す第2回転角度を求め、前記第1回転角度と前記第2回転角度との相対角度を算出する算出部と、
として動作させるための画像処理プログラム。
A software program for causing a processor included in a computer to execute,
The computer is executed by the processor,
The brightness of the pixels included in the second region is calculated by calculating the coefficient of the approximation function so that the brightness value of the pixels included in the first region is approximated by a curved surface using a predetermined approximation function. A determining unit that calculates a coefficient of the approximation function so that the value is approximated by the approximation function, and sets the coefficient as a second coefficient;
A first rotation angle indicating the direction of the approximation function is obtained using the first coefficient, a second rotation angle indicating the direction of the approximation function is obtained using the second coefficient, and the first rotation angle A calculation unit that calculates a relative angle with the second rotation angle;
Image processing program to operate as.
JP2017197174A 2017-10-10 2017-10-10 Image processing apparatus, image processing method, and image processing program Active JP6681078B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017197174A JP6681078B2 (en) 2017-10-10 2017-10-10 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017197174A JP6681078B2 (en) 2017-10-10 2017-10-10 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2019070974A JP2019070974A (en) 2019-05-09
JP6681078B2 true JP6681078B2 (en) 2020-04-15

Family

ID=66441162

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017197174A Active JP6681078B2 (en) 2017-10-10 2017-10-10 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP6681078B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7270999B2 (en) * 2021-06-01 2023-05-11 株式会社アクセル Image processing device, image processing method and image processing program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3598651B2 (en) * 1995-06-08 2004-12-08 オムロン株式会社 Apparatus and method for calculating similarity and position detecting apparatus using the same
JP4015532B2 (en) * 2002-11-07 2007-11-28 日本電信電話株式会社 Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, image decoding program, and recording medium recording the program
KR101493325B1 (en) * 2008-09-03 2015-02-16 삼성전자주식회사 Frame interpolation apparatus based on precise motion prediction and its method
JP5477518B1 (en) * 2012-06-26 2014-04-23 コニカミノルタ株式会社 Image processing apparatus, image processing method, and image processing program
JP6482130B2 (en) * 2016-02-25 2019-03-13 Kddi株式会社 Geometric verification apparatus, program and method

Also Published As

Publication number Publication date
JP2019070974A (en) 2019-05-09

Similar Documents

Publication Publication Date Title
US8903177B2 (en) Method, computer program and device for hybrid tracking of real-time representations of objects in a sequence
CN112203095B (en) Video motion estimation method, device, equipment and computer readable storage medium
Gu et al. Removing the bias of integral pose regression
JP6726060B2 (en) Image processing apparatus, control method thereof, and program
US9055293B2 (en) Prediction of an image by compensation during forward movement
WO2018230294A1 (en) Video processing device, display device, video processing method, and control program
JP6681078B2 (en) Image processing apparatus, image processing method, and image processing program
JPWO2013089261A1 (en) Image processing system and image processing method
US11908144B2 (en) Image processing apparatus, method, and medium using degrees of reliability and similarity in motion vectors
JP2010072700A (en) Image processor, image processing method, and image pickup system
JP4898415B2 (en) Moving picture coding apparatus and moving picture coding method
JP6814484B2 (en) Image processing equipment, image processing method and image processing program
JP6341708B2 (en) Information processing apparatus, control method therefor, and program
CN112085842A (en) Depth value determination method and device, electronic equipment and storage medium
KR20130057584A (en) Apparatus and method for setting feature point, tracking object apparatus and method usig that
JP6740549B2 (en) Moving picture coding apparatus, method, program, and moving picture coding system
JP6635751B2 (en) Image encoding apparatus and control method thereof, program and storage medium
JP7388737B2 (en) Image processing device, image processing method, and image processing program
JP3734488B2 (en) Image encoding device
JP2002051342A (en) Coding apparatus, method of coding and storage medium
JP6468703B2 (en) Motion detection device, motion detection method, and program
KR101670987B1 (en) Method for endcoding image data and method for and decoding image data based on scale and angle variation information and apparatus for encoding image data and apparatus for decoding image data based on scale and angle variation information
CN106331720B (en) Video decoding related information storage method and device
JP7348549B2 (en) Encoding method, encoding device and program
JP2018186456A (en) Image encoding apparatus, image encoding method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190402

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200306

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: 20200310

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200313

R150 Certificate of patent or registration of utility model

Ref document number: 6681078

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250