JP2010016580A - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP2010016580A
JP2010016580A JP2008174127A JP2008174127A JP2010016580A JP 2010016580 A JP2010016580 A JP 2010016580A JP 2008174127 A JP2008174127 A JP 2008174127A JP 2008174127 A JP2008174127 A JP 2008174127A JP 2010016580 A JP2010016580 A JP 2010016580A
Authority
JP
Japan
Prior art keywords
image
motion vector
block
value
target
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.)
Pending
Application number
JP2008174127A
Other languages
Japanese (ja)
Inventor
Koji Mitsuya
晃二 三屋
Toru Kurata
徹 倉田
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2008174127A priority Critical patent/JP2010016580A/en
Publication of JP2010016580A publication Critical patent/JP2010016580A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus that makes block boundaries inconspicuous in a processed image even in the case of dividing one screen into a plurality of blocks and performing processing in each block unit. <P>SOLUTION: The image processing apparatus is provided with: an image processing means 1000 for performing predetermined image processing of an image in a block unit obtained by dividing the image for one screen into a plurality of blocks and outputting processed image information in a unit for one screen; and a block dividing means 1005 for dividing the image for one screen into a plurality of blocks, generating an image of a block unit, transferring the generated image information of a block unit to the image processing means 1000, and also changing the division position of blocks on one screen to a different position in each screen. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

この発明は、例えば、撮像素子からの撮像画像などの画像を処理する際に、1画面分の画像を複数個に分割したブロック単位で処理する画像処理装置および方法に関する。   The present invention relates to an image processing apparatus and method for processing, for example, an image such as a captured image from an image sensor in units of blocks obtained by dividing an image for one screen into a plurality of blocks.

2つの画面間の動きベクトルを、画像情報自身から求めるブロックマッチング手法は、歴史の古い技術である。   A block matching method for obtaining a motion vector between two screens from image information itself is an old technology.

このブロックマッチング手法は、注目画面である参照画面と、当該参照画面の動きの元となる元画面(ターゲット画面と称する)との間の2画面間の動きベクトルを算出する方法である。ブロックマッチング手法においては、所定の大きさの矩形領域のブロック(ターゲットブロックと参照ブロック)について、参照画面とターゲット画面との間での相関を算出することにより算出する。   This block matching method is a method of calculating a motion vector between two screens between a reference screen that is a screen of interest and an original screen (referred to as a target screen) that is a source of motion of the reference screen. In the block matching method, for a block (target block and reference block) of a rectangular area having a predetermined size, the correlation between the reference screen and the target screen is calculated.

ターゲット画面が時間的に参照画面よりも前の画面とされる場合と、参照画面が時間的にターゲット画面よりも前の画面とされる場合の両方がある。前者の例としては、例えば、MPEG(Moving Picture Experts Group)における動き検出の場合がある。また、後者の例としては、例えば、後述する画像フレームの重ね合わせによるノイズ低減の場合がある。   There are both a case where the target screen is temporally preceding the reference screen and a case where the reference screen is temporally prior to the target screen. As an example of the former, for example, there is a case of motion detection in MPEG (Moving Picture Experts Group). Further, as the latter example, for example, there is a case of noise reduction by overlapping image frames described later.

なお、この明細書で、画面とは、1フレームまたは1フィールドの画像データからなる画像を意味しているが、この明細書における以下の説明の便宜上、画面は1フレームからなるものとして、画面をフレームと称することとする。したがって、参照画面は参照フレーム、ターゲット画面はターゲットフレームと称することがある。   In this specification, the screen means an image composed of image data of one frame or one field. However, for the convenience of the following description in this specification, the screen is assumed to be composed of one frame. It will be called a frame. Therefore, the reference screen may be referred to as a reference frame, and the target screen may be referred to as a target frame.

このブロックマッチングによる動きベクトル検出手法は、テレビジョンカメラのパン・チルト検出や被写体追尾、MPEG方式の動画符号化などを中心に開発が進んでいる。90年代に入ってからは、画像の重ね合わせによるセンサレス手ブレ補正や低照度撮影時のノイズ除去(Noise Reduction:以降、NRと表記する)などに応用されている(特許文献1(特開2007−336121号公報)参照)。   The motion vector detection method based on block matching has been developed mainly for pan / tilt detection of a television camera, subject tracking, and MPEG video coding. Since the beginning of the 90's, it has been applied to sensorless camera shake correction by superimposing images and noise removal during low-illuminance photography (Noise Reduction: hereinafter referred to as NR). -336121)).

画像重ね合わせによるNR処理装置は、例えば、図85に示すようなものとなり、ブロック分割処理部1001と、画像処理部1000とからなる。画像処理部1000は、この例はNR処理であるので、動きベクトル検出部1002と、動き補償画生成部1003と、画像加算部1004とからなる。   An NR processing apparatus using image superposition is, for example, as shown in FIG. 85, and includes a block division processing unit 1001 and an image processing unit 1000. Since this example is NR processing, the image processing unit 1000 includes a motion vector detection unit 1002, a motion compensation image generation unit 1003, and an image addition unit 1004.

ターゲットフレームの画像情報TGおよび参照フレームの画像情報REFは、ブロック分割処理部1001に供給されて、例えば図86に示すように、それぞれ1画面分が、水平方向にはn画素毎、垂直方向にはmライン毎に分割される。その結果、1画面分の画像は、それぞれ、水平方向×垂直方向=n画素×mラインからなるブロックBKの複数個に分割される。   The image information TG of the target frame and the image information REF of the reference frame are supplied to the block division processing unit 1001, and for example, as shown in FIG. 86, each screen is divided into n pixels in the horizontal direction and in the vertical direction. Is divided every m lines. As a result, the image for one screen is divided into a plurality of blocks BK each consisting of horizontal direction × vertical direction = n pixels × m lines.

そして、ブロック分割処理部1001からは、ターゲットフレームのブロック(以下、ターゲットブロックという)と、参照フレームのブロック(以下、参照ブロックという)とが、ブロック単位で、動きベクトル検出部1002に順次供給される。   Then, the block division processing unit 1001 sequentially supplies a block of the target frame (hereinafter referred to as target block) and a block of the reference frame (hereinafter referred to as reference block) to the motion vector detection unit 1002 in units of blocks. The

動きベクトル検出部1002では、ターゲットブロックと参照ブロックとの間で、ブロックマッチングを行なって、ブロック単位の動きベクトルMVを検出する。   The motion vector detection unit 1002 performs block matching between the target block and the reference block, and detects a motion vector MV for each block.

動きベクトル検出部1002で検出されたブロック単位の動きベクトルMVは、動き補償画生成部1003に供給される。また、参照ブロックも動きベクトル検出部1002から動き補償画生成部1003に供給される。   The block-based motion vector MV detected by the motion vector detection unit 1002 is supplied to the motion compensation image generation unit 1003. The reference block is also supplied from the motion vector detection unit 1002 to the motion compensation image generation unit 1003.

動き補償画生成部1003では、動きベクトルを用いて参照ブロックを動き補償した動き補償画ブロックを生成する。動き補償画は、動きベクトルを用いて、動きを除去した画像としたものである。   The motion compensated image generation unit 1003 generates a motion compensated image block in which the reference block is motion compensated using the motion vector. The motion compensation image is an image from which motion is removed using a motion vector.

そして、ブロック分割処理部1001からのターゲットブロックの画像情報と、動き補償画生成部1003からの動き補償画ブロックの画像情報MVVとが画像加算部1004に供給される。画像加算部1004では、ターゲットブロックの画像情報と、動き補償画生成部1003からの動き補償画ブロックとを重ね合わせる。重ね合わされた結果の加算画像は、画像加算部1004から出力され、例えば画像メモリに格納されたり、記録媒体に記録されたりされる。   Then, the image information of the target block from the block division processing unit 1001 and the image information MVV of the motion compensation image block from the motion compensation image generation unit 1003 are supplied to the image addition unit 1004. The image adding unit 1004 superimposes the image information of the target block and the motion compensated image block from the motion compensated image generating unit 1003. The added image as a result of superposition is output from the image adding unit 1004 and stored in, for example, an image memory or recorded on a recording medium.

以上の処理が、1画面の全てのブロックについて繰り返し実行される。そして、1画面のすべてのブロックについての処理が終了すると、ブロック分割処理部1001には、新たなターゲットフレームの画像情報TGと、参照フレームの画像情報REFとが供給されて、上述の処理が繰り返される。   The above processing is repeatedly executed for all blocks of one screen. When the processing for all the blocks of one screen is completed, the block division processing unit 1001 is supplied with the new target frame image information TG and the reference frame image information REF, and the above-described processing is repeated. It is.

重ね合わせた画像は、画像そのものは、動き補償により同じ画像となるはずであるので、より強調される。一方、ノイズはランダムであるので、重ね合わせにより相殺される。これにより、重ね合わせた画像は、ノイズ低減されたものとなる。   The superimposed image is more emphasized because the image itself should be the same image by motion compensation. On the other hand, since noise is random, it is canceled out by superposition. As a result, the superimposed image is reduced in noise.

上記の特許文献は、次の通りである。
特開2007−336121号公報
The above-mentioned patent documents are as follows.
JP 2007-336121 A

しかしながら、1画面を分割したブロック単位で画像の重ね合わせを行なうために、ブロック単位の画像の境界が目立つことがある。特に、3枚以上の複数枚のフレームの画像を重ね合わせてNR処理して出力画を得る場合において、2枚のフレームの画像を重ね合わせた加算結果の画像をターゲットフレームとし、次のフレームを参照画像として画像を重ね合わせる場合が問題である。   However, since the images are overlapped in units of blocks obtained by dividing one screen, the boundaries between the blocks may be noticeable. In particular, in a case where an output image is obtained by superimposing images of a plurality of frames of three or more and performing NR processing, an image obtained as a result of superimposing images of two frames is used as a target frame, and the next frame is There is a problem when images are superimposed as a reference image.

すなわち、最初の2枚を重ね合わせる処理を処理1、その後、重ね合わせた画像をターゲット画像とし、3フレーム目以降を参照画像として重ね合わせる処理を処理2としたとき、処理2を繰り返す毎に、ブロックの境界が目立つことがある。   That is, when the process of superimposing the first two images is process 1, and then the superimposed image is the target image and the process of superimposing the third and subsequent frames as the reference image is process 2, each time process 2 is repeated, Block boundaries may be noticeable.

例えば、処理1での重ね合わせ結果の画像において、図87(A)に示すように、ブロック境界Bdが薄く残ってしまった場合、処理2を実行すると、同一位置にブロック境界Bdが重なることにより、図87(B)に示すように、徐々に濃く残るものとなってしまう。   For example, if the block boundary Bd remains thin as shown in FIG. 87A in the image obtained as a result of superposition in the process 1, when the process 2 is executed, the block boundary Bd overlaps at the same position. As shown in FIG. 87 (B), it gradually remains dark.

このようなブロック境界は、画像の重ね合わせに限らず、画像処理部1000において、1画面を複数個のブロックに分割して、ブロック単位に処理する場合に、生じるおそれがある。   Such a block boundary is not limited to superimposition of images, but may occur when the image processing unit 1000 divides one screen into a plurality of blocks and processes the blocks.

この発明は、以上の点にかんがみ、1画面を複数個のブロックに分割して、ブロック単位に処理する場合においても、処理後の画像において、ブロック境界が目立たないようににした画像処理装置および方法を提供することを目的とする。   In view of the above points, the present invention provides an image processing apparatus and a block which makes block boundaries inconspicuous in a processed image even when one screen is divided into a plurality of blocks and processed in units of blocks. It aims to provide a method.

上記の課題を解決するために、請求項1の発明においては、
1画面分の画像を複数個に分割したブロック単位で、前記画像について所定の画像処理を行ない、1画面分単位の処理後画像情報を出力する画像処理手段と、
前記1画面分の画像を複数個に分割して、前記ブロック単位の画像を生成し、生成したブロック単位の画像情報を前記画像処理手段に渡すものであって、前記1画面上での前記ブロックの分割位置を、1画面毎に、異なる位置に変更するブロック分割手段と
を備える画像処理装置を提供する。
In order to solve the above problems, in the invention of claim 1,
Image processing means for performing predetermined image processing on the image in units of blocks obtained by dividing an image for one screen into a plurality of images, and outputting post-processing image information for one screen;
The image for one screen is divided into a plurality of blocks, the block unit image is generated, and the generated block unit image information is passed to the image processing means, and the block on the one screen is generated. There is provided an image processing apparatus comprising: a block dividing unit that changes the divided position to a different position for each screen.

この請求項1の発明においては、1画面上での前記ブロックの分割位置を、1画面毎に、異なる位置に変更するので、ブロック分割位置が目立たなくなる。   In the first aspect of the present invention, the block division position on one screen is changed to a different position for each screen, so that the block division position becomes inconspicuous.

この発明によれば、1画面上での前記ブロックの分割位置を、1画面毎に、異なる位置に変更するので、ブロック分割位置が目立たなくなる。   According to the present invention, since the block division position on one screen is changed to a different position for each screen, the block division position becomes inconspicuous.

以下、この発明による画像処理装置および画像処理方法の実施形態を、図を参照しながら説明する。   Embodiments of an image processing apparatus and an image processing method according to the present invention will be described below with reference to the drawings.

[第1の実施形態]
図1は、前述の背景技術で説明したNR処理に、この発明による画像処理装置を適用した場合の実施形態の、概略的な構成例を示すブロック図である。この図1においては、上述した図85と同一部分には、同一符号を付してある。
[First Embodiment]
FIG. 1 is a block diagram showing a schematic configuration example of an embodiment when an image processing apparatus according to the present invention is applied to the NR processing described in the background art. In FIG. 1, the same parts as those in FIG. 85 described above are denoted by the same reference numerals.

この実施形態においては、ブロック分割処理部1001に対して分割位置シフト制御部1005が接続される。この分割位置シフト制御部1005には、タイミング信号発生部1006からのフレーム周期のタイミング信号FLvが供給される。このフレーム周期のタイミング信号FLvは、ターゲットフレームおよび参照フレームに同期していることは勿論である。   In this embodiment, a division position shift control unit 1005 is connected to the block division processing unit 1001. The division position shift control unit 1005 is supplied with a timing signal FLv having a frame period from the timing signal generation unit 1006. Of course, the timing signal FLv of this frame period is synchronized with the target frame and the reference frame.

なお、画像処理部1000の動きベクトル検出部1002、動き補償画生成部1003、画像加算部1004の動作を制御する制御部(図示を省略)にも、タイミング信号発生部1006からのタイミング信号FLvに同期したタイミング信号が供給される。画像処理部1000の各部は、制御部からの、タイミング信号に同期した制御信号より、制御されて処理を実行する。   Note that the control unit (not shown) that controls the operations of the motion vector detection unit 1002, the motion compensation image generation unit 1003, and the image addition unit 1004 of the image processing unit 1000 also uses the timing signal FLv from the timing signal generation unit 1006. A synchronized timing signal is provided. Each unit of the image processing unit 1000 is controlled by a control signal synchronized with the timing signal from the control unit to execute processing.

分割位置シフト制御部1005は、タイミング信号発生部1006からのフレーム周期のタイミング信号FLvを受けて、分割ブロック位置を1フレーム毎に変更するように、ブロック分割処理部1001における分割処理を制御する。   The division position shift control unit 1005 receives the timing signal FLv of the frame period from the timing signal generation unit 1006, and controls the division processing in the block division processing unit 1001 so as to change the division block position for each frame.

ブロック分割処理部1001では、受け取ったターゲットフレームおよび参照フレームの画像情報について、最初は、図2(A)に示すように、例えば左上隅を分割始点Poとして、水平方向には、n画素毎に分割し、垂直方向には、mライン毎に分割する。   In the block division processing unit 1001, for the received target frame and reference frame image information, first, as shown in FIG. 2A, for example, the upper left corner is set as the division start point Po, and every n pixels in the horizontal direction. Divide and divide every m lines in the vertical direction.

そして、このブロック分割処理部1001での分割処理により生成された各ブロックBk単位の画像情報は、順次に画像処理部1000に供給される。画像処理部1000においては、この例では、図85の場合と同様にして、ブロックBkの単位で、動きベクトル検出処理、動き補償画生成処理および画像加算処理が順次になされる。   The image information for each block Bk generated by the division processing in the block division processing unit 1001 is sequentially supplied to the image processing unit 1000. In this example, the image processing unit 1000 sequentially performs motion vector detection processing, motion compensation image generation processing, and image addition processing in units of block Bk, as in the case of FIG.

1フレーム分の全てのブロックBkについての上記の画像処理が、画像処理部1000で終了すると、ブロック分割処理部1001では、分割位置シフト制御部1005の制御指示に基づき、画像分割を行なう始点を、始点Poから、始点Paに変更する。そして、ブロック分割処理部1001では、受け取った2枚目のターゲットフレームおよび参照フレームの画像情報について、図2(B)に示すように、分割始点Paを起点として、水平方向には、n画素毎に分割し、垂直方向には、mライン毎に分割する。すなわち、この実施形態では、ブロックBkのサイズは、変更はしない。   When the above-described image processing for all the blocks Bk for one frame is completed in the image processing unit 1000, the block division processing unit 1001 sets the starting point for image division based on the control instruction of the division position shift control unit 1005. The start point Po is changed to the start point Pa. Then, in the block division processing unit 1001, for the received image information of the second target frame and reference frame, as shown in FIG. 2B, starting from the division start point Pa, every n pixels in the horizontal direction. And is divided every m lines in the vertical direction. That is, in this embodiment, the size of the block Bk is not changed.

このとき、図2(B)において、影線を付して示すように、元の1フレームの画像領域の画枠をはみ出す領域を含むブロックについては、当該画枠をはみ出す領域部分を除く画像領域のみを画像処理の対象として、ブロックの大きさを変えるようにする。   At this time, as shown with a shadow line in FIG. 2B, for a block including a region that protrudes from the image frame of the original one-frame image region, an image region excluding a region portion that protrudes from the image frame. Only the image processing target is changed, and the block size is changed.

あるいは、元の1フレームの画像領域の画枠をはみ出す領域の画素データを補間して生成して、元の1フレームの画像領域の画枠をはみ出す領域を含むブロックも、画像処理の際のブロックの大きさは変えないようにしても良い。   Alternatively, a block including a region that is generated by interpolating pixel data of a region that protrudes from the image frame of the original one-frame image region and that protrudes from the image frame of the original one-frame image region is also a block for image processing. The size of may not be changed.

さらには、元の1フレームの画像領域の画枠をはみ出す領域を含むブロックについては、画像処理の対象外とするようにしても良い。   Furthermore, a block including an area that protrudes from the image frame of the original image area of one frame may be excluded from the image processing target.

こうして、2枚目のターゲットフレームおよび参照フレームの画像情報については、最初の分割始点Poとは異なる分割始点Paを起点として、ブロック分割され、その分割されたブロックについて、画像処理部1000で、上述した画像処理がなされる。   Thus, the image information of the second target frame and reference frame is divided into blocks starting from a division start point Pa different from the first division start point Po, and the image processing unit 1000 performs the above-described division on the divided blocks. Image processing is performed.

3枚目以降のターゲットフレームおよび参照フレームの画像情報についても、さらに、異なる分割始点を基点として、ブロックサイズを変えることなく、ブロック分割される。そして、その分割されたブロックについて、画像処理部1000で、上述した画像処理がなされる。   The image information of the third and subsequent target frames and reference frames is also divided into blocks without changing the block size, starting from different division start points. Then, the image processing unit 1000 performs the above-described image processing on the divided blocks.

なお、ブロック分割の分割始点の位置の変更は、1つのブロック内で行うようにするものである。   In addition, the change of the position of the division start point of block division is performed within one block.

以上のようにして、この実施形態では、1フレーム毎に、画面のブロック分割位置が変更されるので、重ね合わせた画像においては、ブロックの境界を目立たなくすることができる。   As described above, in this embodiment, since the block division position of the screen is changed for each frame, the boundary between the blocks can be made inconspicuous in the superimposed image.

特に、最初の2枚を重ね合わせる処理を処理1、その後、重ね合わせた画像をターゲット画像とし、3フレーム目以降を参照画像として重ね合わせる処理を処理2としたとき、処理2を繰り返したとしても、ブロックの境界が目立つのを防止できる。   In particular, if the process of superimposing the first two images is process 1, then the superimposed image is the target image, and the process of superimposing the third and subsequent frames as the reference image is process 2, the process 2 may be repeated. , Block boundaries can be prevented from being noticeable.

すなわち、従来の場合には、ブロック分割位置が固定であったため、処理1での重ね合わせ結果の画像において、ブロック境界Bdが薄く残ってしまった場合図87(B)のように、ブロックの境界が目立つことになる。   That is, in the conventional case, since the block division position is fixed, when the block boundary Bd remains thin in the image obtained as a result of the superimposition in the processing 1, the block boundary as shown in FIG. Will stand out.

これに対して、この実施形態によれば、処理1の結果の画像に、図3(A)に示すように、ブロック境界Bdoが薄く残ってしまった場合でも、処理2を実行したときには、薄く残るブロック境界Bdoとは異なる位置に薄く残るブロック境界Bdaが表れる。このため、ブロック境界Bdoと、ブロック境界Bdaとが重なることがなく、ブロック境界は、目立たなくなる。   On the other hand, according to this embodiment, even when the block boundary Bdo remains thin as shown in FIG. 3A in the image obtained as a result of the process 1, when the process 2 is executed, the image becomes thin. A block boundary Bda that remains lightly appears at a position different from the remaining block boundary Bdo. For this reason, the block boundary Bdo and the block boundary Bda do not overlap, and the block boundary becomes inconspicuous.

[ブロック分割位置の変更制御の例]
次に、ブロック分割位置の変更制御の幾つかの例について説明する。以下に説明する例は、いずれも、ブロック分割の分割始点(分割起点)の位置を変更することにより、ブロック分割位置を変更制御する例である。
[Example of block division position change control]
Next, some examples of block division position change control will be described. The examples described below are examples in which the block division position is changed and controlled by changing the position of the division start point (division start point) of block division.

<第1の例>
第1の例は、図4(A)において、矢印ARで示すように、ブロック分割の分割始点を、フレーム画像の左上隅の最初の分割始点Poから、ブロックBkの対角線方向に移動させるようにする。そして、この第1の例においては、ブロックBkは、水平方向×垂直方向=8画素×8ラインの大きさとし、1画面分の画像処理が終了する毎に、水平方向に1画素および垂直方向に1ラインだけ、分割始点を移動するようにする。
<First example>
In the first example, as shown by an arrow AR in FIG. 4A, the division start point of block division is moved from the first division start point Po at the upper left corner of the frame image in the diagonal direction of the block Bk. To do. In this first example, the block Bk has a size of horizontal direction × vertical direction = 8 pixels × 8 lines, and every time image processing for one screen is completed, one block in the horizontal direction and one in the vertical direction. The division start point is moved by one line.

すなわち、最初のターゲットフレームについては、分割始点Poから水平方向8画素、垂直方向8ラインで、ブロック分割をするようにする。そして、ブロック単位での1フレーム分の画像処理が終了したら、次のターゲットフレームについては、図4(B)に示すように、分割始点Poを水平方向に1画素、垂直方向に1ラインだけずらした分割始点P1に設定する。そして、この分割始点P1を起点として水平方向8画素、垂直方向8ラインで、ブロック分割をするようにする。   That is, for the first target frame, block division is performed with 8 pixels in the horizontal direction and 8 lines in the vertical direction from the division start point Po. When the image processing for one frame in the block unit is completed, for the next target frame, as shown in FIG. 4B, the division start point Po is shifted by one pixel in the horizontal direction and one line in the vertical direction. The division start point P1 is set. Then, block division is performed with 8 pixels in the horizontal direction and 8 lines in the vertical direction starting from the division start point P1.

次のターゲットフレームについては、図4(C)に示すように、分割始点P1をさらに、水平方向に1画素、垂直方向に1ライン、したがって、分割始点Poに対しては、水平方向に2画素、垂直方向に2ラインだけずらした分割始点P2に設定する。   For the next target frame, as shown in FIG. 4C, the division start point P1 is further set to one pixel in the horizontal direction and one line in the vertical direction. Therefore, two pixels in the horizontal direction from the division start point Po. The division start point P2 that is shifted by two lines in the vertical direction is set.

以降、1画面分の画像処理が終了する毎に、水平方向に1画素および垂直方向に1ラインだけ、分割始点を移動するようにする。すなわち、ブロック分割の分割始点を、フレーム画像の左隅位置の画素座標を(0,0)とすると、画素単位の分割始点の遷移は、Po→P1→P2→P3・・・→P7=(0,0)→(1,1)→(2,2)→(3,3)・・・・→(7,7)となる。   Thereafter, every time image processing for one screen is completed, the division start point is moved by one pixel in the horizontal direction and one line in the vertical direction. That is, assuming that the division start point of block division is the pixel coordinate of the left corner position of the frame image (0, 0), the transition of the division start point in pixel units is Po → P1 → P2 → P3... → P7 = (0 , 0) → (1,1) → (2,2) → (3,3)... → (7,7).

そして、7フレーム目の分割始点P7の座標始点は、図4(D)に示すように、分割始点は、ブロックBkの対角線位置の頂点位置に相当する。そこで、その次のフレームでは、図4(A)で点線矢印で示すように、最初の分割始点Poに戻る。以下、図4(A)〜(D)を繰り返すようにする。   As shown in FIG. 4D, the coordinate start point of the division start point P7 of the seventh frame corresponds to the vertex position of the diagonal position of the block Bk. Therefore, in the next frame, as shown by a dotted arrow in FIG. 4A, the first division start point Po is returned. Hereinafter, FIGS. 4A to 4D are repeated.

なお、1フレーム毎に、1画素および1ライン分だけずらすのではなく、1フレーム毎に、複数画素および複数ラインずつ、ずらすようにしても勿論よい。例えば、2画素×2画素ずつずらす場合には、分割始点の遷移は、Po→P2→P4→P6→P1→P3→P5→P7=(0,0)→(2,2)→(4,4)→(6,6)→(1,1)→(3,3)→(5,5)→→(7,7)となる。   Of course, instead of shifting one pixel and one line for each frame, it is possible to shift a plurality of pixels and a plurality of lines for each frame. For example, when shifting by 2 pixels × 2 pixels, the transition of the division start point is Po → P2 → P4 → P6 → P1 → P3 → P5 → P7 = (0, 0) → (2, 2) → (4 4) → (6,6) → (1,1) → (3,3) → (5,5) →→ (7,7).

<第2の例>
この例は、第1の例の変形である。第1の例では、水平方向の1画素、垂直方向の1ラインずつ、1フレーム分の画像情報の処理が終了して、次のフレームの処理を行なうときに、分割始点をずらすようにした。第2の例では、水平方向の1画素、垂直方向の1ラインずつではなく黄金比を考慮した分割始点のずらし方をするようにする。
<Second example>
This example is a modification of the first example. In the first example, the processing of image information for one frame is completed for each pixel in the horizontal direction and one line in the vertical direction, and the division start point is shifted when processing the next frame. In the second example, the division start point is shifted in consideration of the golden ratio instead of one pixel in the horizontal direction and one line in the vertical direction.

ここで、黄金比とは、数学的に最も美しいとされる比率のことであり、(51/2±1)/2≒1.618または0.618という数値である。この比率(1:1.618または1:0.618)は、自然界(花びらのつき方や、ひまわりの種の個数など)や古代物(パルテノン神殿や凱旋門)にも多く見られることは良く知られている。 Here, the golden ratio is a ratio that is mathematically most beautiful, and is a numerical value of (5 1/2 ± 1) /2≈1.618 or 0.618. It is well known that this ratio (1: 1.618 or 1: 0.618) is often found in the natural world (how to attach petals, the number of sunflower seeds, etc.) and ancient objects (Parthenon and Arc de Triomphe). It has been.

黄金比で表された数値が数学的に美しいとされる理由の一つに、「0」から「1」までの区間を、黄金比率0.618ずつ加算していった場合、位相がきれいに分散されるという特徴がある。これは、ある一定の長さを黄金比率で連続的に印をつけた場合、全体的に偏りが無く印をつけることが可能であるということからも理解できる。   One of the reasons why the numerical value expressed by the golden ratio is mathematically beautiful is that the phase from “0” to “1” is added in increments of 0.618 by the golden ratio. There is a feature that is. This can also be understood from the fact that when a certain length is continuously marked with the golden ratio, it can be marked without any bias.

この黄金比の特徴を用いて、分割始点を順次にずらす方法が第2の例である。図5にその一例を示す。この図5の例では、1ブロックBkは、8画素×8ラインの矩形としている。   A second example is a method of sequentially shifting the division start point using the feature of the golden ratio. An example is shown in FIG. In the example of FIG. 5, one block Bk is a rectangle of 8 pixels × 8 lines.

図5の例では、第1の例と同様に、矢印ARで示す1ブロックの対角線方向に、分割始点を1フレーム毎にずらす。この場合において、この第2の例においては、図5(A),(B),(C),(D)に示すように、対角線上の座標(0,0)から座標(7,7)までの間で、最初の分割始点Po(座標は(0,0))から、黄金比率ずつ、分割始点を順次に変化させるようにする。   In the example of FIG. 5, as in the first example, the division start point is shifted frame by frame in the diagonal direction of one block indicated by the arrow AR. In this case, in this second example, as shown in FIGS. 5 (A), (B), (C), (D), coordinates (7, 7) from coordinates (0, 0) on the diagonal are shown. Until the first division start point Po (coordinate is (0, 0)), the division start point is sequentially changed by the golden ratio.

この場合、矩形の1ブロックの対角線の長さは三平方の定理より、8√2となる。この対角線の長さの黄金比倍は、(8√2×(√5−1)/2)≒7となる。そして、三平方の定理と相似形より、座標に置き換えると、(4.9,4,9)≒(5,5)となり、対角線上の座標(0,0)から(7,7)までの間で、水平方向に5画素ずつ、垂直方向に5ラインずつ、それぞれずらしてゆくことになる。   In this case, the length of the diagonal line of one rectangular block is 8√2 from the three-square theorem. The golden ratio times the length of the diagonal line is (8√2 × (√5-1) / 2) ≈7. And, by replacing it with coordinates from the three-square theorem and similar forms, (4.9, 4, 9) ≒ (5, 5), and the diagonal coordinates (0, 0) to (7, 7) In the meantime, it is shifted by 5 pixels in the horizontal direction and 5 lines in the vertical direction.

ブロック分割の分割始点Poを前述したように、フレーム画像の左隅位置として、その画素座標を(0,0)とすると、画素単位の分割始点の遷移は、例えば、Po→P1→P2→P3→P4→P5→P6→P7→P0→・・・=(0,0)→(5,5)→(2,2)→(7,7)→(4,4)→(1,1)→(6,6)→(3,3)→(0,0)・・・となる。   As described above, when the division start point Po of the block division is the left corner position of the frame image and the pixel coordinates are (0, 0), the transition of the division start point in pixel units is, for example, Po → P1 → P2 → P3 → P4 → P5 → P6 → P7 → P0 →... = (0,0) → (5,5) → (2,2) → (7,7) → (4,4) → (1,1) → (6, 6) → (3, 3) → (0, 0).

こうして、図5の例では、画素単位で分割始点をずらすので、分割始点は、上述のような異なる8点位置に繰り返し、位置するように変更されることになる。   Thus, in the example of FIG. 5, since the division start point is shifted in units of pixels, the division start point is repeatedly changed to be located at the different eight point positions as described above.

<第3の例>
第1の例および第2の例は、矩形のブロックBkの対角線方向に、分割始点を徐々にずらすようにした例であるが、分割始点をずらす方向は、これに限られるものではない。
<Third example>
The first example and the second example are examples in which the division start point is gradually shifted in the diagonal direction of the rectangular block Bk, but the direction in which the division start point is shifted is not limited to this.

第3の例は、分割始点のずらす方向の他の例を示すもので、この例では、図6(A)および(B)に示すように、分割始点を、1ブロックBk内において、左上隅の起点Poから、矩形の渦巻状に変更する。そして、渦巻状に変更する分割始点の終点をPeとしたとき、この終点の分割始点Peの次には、分割始点Poに戻るようにする。   The third example shows another example of the direction in which the division start point is shifted. In this example, as shown in FIGS. 6A and 6B, the division start point is set in the upper left corner in one block Bk. From the starting point Po, the rectangular spiral shape is changed. When the end point of the division start point to be changed into a spiral shape is Pe, the division start point Pe is returned to the division start point Po after the end point of the division start point Pe.

この第3の例においても、分割始点の1フレーム毎の変更は、1画素毎および1ライン毎や複数画素毎および複数ライン毎でもよいし、黄金比率により、分割始点の位置を変更するようにしてもよい。   Also in the third example, the division start point for each frame may be changed for each pixel, for each line, for each of a plurality of pixels, and for each of a plurality of lines, and the position of the division start point is changed according to the golden ratio. May be.

<第4の例>
この第4の例も、ずらす方向の他の例である。この例は、図7(A)および(B)に示すように、分割始点を、1ブロックBk内において、左上隅の起点Poから、ジグザグ状に変更するようにするものである。そして、この第4の例においても、ジグザグ状に変更する分割始点の終点をPeとしたとき、この終点の分割始点Peの次には、分割始点Poに戻るようにする。
<Fourth example>
This fourth example is another example of the shifting direction. In this example, as shown in FIGS. 7A and 7B, the division start point is changed from the starting point Po at the upper left corner to a zigzag shape within one block Bk. Also in this fourth example, when the end point of the division start point to be changed to the zigzag shape is Pe, the division start point Pe is returned to the division start point Po after the end point of the division start point Pe.

この第4の例においても、分割始点の1フレーム毎の変更は、1画素毎および1ライン毎や複数画素毎および複数ライン毎でもよいし、黄金比率により、分割始点の位置を変更するようにしてもよい。   Also in the fourth example, the division start point for each frame may be changed for each pixel and for each line, for each of a plurality of pixels and for each of a plurality of lines, and the position of the division start point is changed according to the golden ratio. May be.

<第5の例>
この第4の例も、ずらす方向の他の例である。この例は、図8(A)および(B)に示すように、分割始点を、1ブロックBk内において、左上隅の起点Poからライン方向にずらすが、1ライン分のずらしを終了した次は、複数ライン置きのラインにおいて、そのライン方向にずらすようにする。そして、分割始点について、ライン方向の1ライン分のずらしを終了した次は、複数ライン置きのラインにおいて、そのライン方向にずらすようにする変更処理を繰り返す。
<Fifth example>
This fourth example is another example of the shifting direction. In this example, as shown in FIGS. 8A and 8B, the division start point is shifted in the line direction from the starting point Po at the upper left corner in one block Bk. In a plurality of lines, the lines are shifted in the line direction. Then, after the division start point has been shifted by one line in the line direction, the changing process of shifting the line in the line direction is repeated for every other line.

そして、この第5の例においても、変更する分割始点の終点をPeとしたとき、この終点の分割始点Peの次には、分割始点Poに戻るようにする。   Also in this fifth example, when the end point of the division start point to be changed is Pe, the division start point Po is returned to the division start point Po next to the end point of the division start point Pe.

この第5の例においても、分割始点の1フレーム毎の変更は、1画素毎や複数画素でもよいし、黄金比率により、分割始点の位置を変更するようにしてもよい。   Also in the fifth example, the division start point for each frame may be changed for each pixel or a plurality of pixels, or the position of the division start point may be changed based on the golden ratio.

[第2の実施形態]
次に、この発明による画像処理装置および画像処理方法を、撮像装置に適用した場合の、より具体的に実施形態を、第2の実施形態として、図を参照しながら説明する。
[Second Embodiment]
Next, a more specific embodiment when the image processing apparatus and the image processing method according to the present invention are applied to an imaging apparatus will be described as a second embodiment with reference to the drawings.

この第2の実施形態の撮像装置は、撮像素子(イメージャ)によって撮像された複数枚の静止画像を、位置合わせしながら重ね合わせて、画像のノイズ低減を行うようにするものである。   The image pickup apparatus according to the second embodiment performs noise reduction of an image by superimposing a plurality of still images picked up by an image pickup element (imager) while aligning them.

撮像装置を手で保持して撮影する環境は、手ぶれが生じ易い環境である。このような撮像装置の手持ち撮影時において、静止画を連写撮影した場合の、例えば1枚目をターゲットフレーム、2枚目以降を参照フレームとする。   The environment in which the imaging apparatus is held by hand for shooting is an environment in which camera shake is likely to occur. At the time of handheld shooting of such an imaging apparatus, for example, when the still image is continuously shot, the first frame is set as the target frame, and the second frame and thereafter are set as reference frames.

参照フレーム全体に、平行移動、回転、拡大縮小を伴う変形処理を施すことにより、ターゲットフレームの位置に、参照フレームを位置合わせすることができる場合、この参照フレーム全体に加わっている変形処理がグローバルモーションである。グローバルモーションは、通常は、画像の背景静止画(以下、背景と略す)の動きおよび動き量を示すものとなる。   If the reference frame can be aligned with the target frame by performing deformation processing with translation, rotation, and scaling on the entire reference frame, the deformation processing applied to the entire reference frame is global. It is motion. The global motion usually indicates the movement and amount of movement of a background still image (hereinafter abbreviated as background) of the image.

手ぶれは、参照フレームがターゲットフレームに対して、平行移動、回転、拡大縮小を伴う画像変形をした分だけ、ターゲットフレームに対して、グローバルモーションが生じたことを意味している。   Camera shake means that a global motion has occurred with respect to the target frame by the amount that the reference frame has undergone image deformation accompanied by translation, rotation, and enlargement / reduction with respect to the target frame.

この実施形態では、説明の簡単のため、撮影した静止画の1枚目を基準(ターゲットフレーム)とする。しかし、これは本質ではない。任意のn枚目をターゲットフレームとし、任意のm(n≠m)枚目を参照フレームとして、グローバルモーションを定義し直しても良い。また、動画中の時間的に異なる2枚のフレーム画像間を対象にして、グローバルモーションを定義してもよい。また、撮像画像の1フレームのうちの有効画枠全てを対象とせず、1フレームの画像の一部分のみに関して、グローバルモーションの処理を適用しても良い。   In this embodiment, for the sake of simplicity of explanation, the first photographed still image is used as a reference (target frame). But this is not essential. The global motion may be redefined with an arbitrary nth frame as a target frame and an arbitrary m (n ≠ m) th frame as a reference frame. Further, global motion may be defined between two frame images that are temporally different in a moving image. Further, the global motion processing may be applied to only a part of the image of one frame without targeting all the effective image frames in one frame of the captured image.

グローバルモーションが求められると、当該求められたグローバルモーションから、画面上の座標位置毎のターゲットフレームと参照フレームとの間の、画面全体に加わっている動きに応じた動きベクトルを算出することができる。当該画面全体に加わっている動きに応じた動きベクトルを、以下、グローバル動きベクトルという。このグローバル動きベクトルは、画面に設定される多数個のターゲットブロックのそれぞれについて求めることができる。また、グローバル動きベクトルは、画素毎に求めることもできる。   When global motion is obtained, a motion vector corresponding to the motion applied to the entire screen between the target frame and the reference frame for each coordinate position on the screen can be calculated from the obtained global motion. . A motion vector corresponding to the motion applied to the entire screen is hereinafter referred to as a global motion vector. This global motion vector can be obtained for each of a large number of target blocks set on the screen. A global motion vector can also be obtained for each pixel.

そして、グローバルモーションに基づいて、グローバル動きベクトルを正確に求めることができれば、手ぶれを良好に補正することができる。あるいは、グローバル動きベクトルを手ぶれ分を補正しながら、フレーム画像を重ね合わせることができる。   And if a global motion vector can be calculated | required correctly based on global motion, camera shake can be correct | amended favorably. Alternatively, the frame images can be overlaid while correcting the amount of camera shake in the global motion vector.

以下の説明において、動きベクトル検出および動き補償(動きベクトルにより、2フレームの画像を位置合わせすること)を用いて複数枚の画像を重ね合わせて、ノイズを低減することをNR(Noise Reduction)と呼ぶ。そして、NRによりノイズ低減された画像をNR画像と称する。   In the following description, NR (Noise Reduction) is to reduce noise by superimposing a plurality of images using motion vector detection and motion compensation (aligning two frames of images with motion vectors). Call. An image whose noise is reduced by NR is referred to as an NR image.

この実施形態では、1画面を多数個のブロック(後述のターゲットブロック)に分割して、そのブロック単位の動きベクトルを、上述したブロックマッチング手法により検出する。ブロックマッチング手法によりブロック毎に検出した動きベクトルを、この明細書ではローカル動きベクトルという。   In this embodiment, one screen is divided into a large number of blocks (target blocks to be described later), and the motion vector for each block is detected by the block matching method described above. The motion vector detected for each block by the block matching method is referred to as a local motion vector in this specification.

また、この実施形態では、ローカル動きベクトルの信頼性の指標を、ブロックマッチング手法における相関値を用いて、後述するようにして検出する。そして、この実施形態では、検出したローカル動きベクトルのうちの、信頼性の高いもののみから、グローバルモーションを算出し、算出したグローバルモーションからブロック毎のグローバル動きベクトルを検出するようにする。   In this embodiment, the reliability index of the local motion vector is detected as described later using the correlation value in the block matching method. In this embodiment, the global motion is calculated from only the highly reliable local motion vectors detected, and the global motion vector for each block is detected from the calculated global motion.

[ブロックマッチングの概要]
図9〜図14は、ブロックマッチング手法の概要を説明するための図である。ここで説明するブロックマッチング手法においては、例えば、図9(A)に示すように、ターゲットフレーム100に、それぞれ水平方向の複数画素および垂直方向の複数ライン分からなる所定の大きさの矩形領域のブロック(ターゲットブロック)102を想定する。また、参照フレーム101にも、ターゲットブロックと同じ大きさのブロック(参照ブロック)を設定する。
[Outline of block matching]
9 to 14 are diagrams for explaining the outline of the block matching method. In the block matching method described here, for example, as shown in FIG. 9A, a block of a rectangular area of a predetermined size, which includes a plurality of pixels in the horizontal direction and a plurality of lines in the vertical direction, on the target frame 100, respectively. (Target block) 102 is assumed. Also, a block (reference block) having the same size as the target block is set in the reference frame 101.

ブロックマッチングにおいては、ターゲットブロック102と相関性の高い参照ブロックを、参照フレーム101の中から検索する。この検索の結果、相関性が最も高いとして参照フレーム101内に検出された参照ブロック103(図9(B)参照)を、動き補償ブロックと呼ぶ。また、ターゲットブロック102と動き補償ブロック103(相関性が最も高い参照ブロック)との間の位置ずれ量を、動きベクトル(図9(B)の符号104参照)と称する。   In block matching, a reference block having a high correlation with the target block 102 is searched from the reference frame 101. As a result of this search, the reference block 103 (see FIG. 9B) detected in the reference frame 101 as having the highest correlation is referred to as a motion compensation block. Further, the amount of displacement between the target block 102 and the motion compensation block 103 (reference block having the highest correlation) is referred to as a motion vector (see reference numeral 104 in FIG. 9B).

ターゲットブロック102と動き補償ブロック103との間の位置ずれ(位置ずれ量と位置ずれ方向を含む)に対応する動きベクトル104は、参照フレーム101におけるターゲットブロックの射影イメージブロック109の位置と、動き補償ブロック103の位置との間の位置ずれに相当する。ここで、射影イメージブロック109の位置と、動き補償ブロック103の位置は、例えばブロックの中心位置を用いる。   The motion vector 104 corresponding to the positional deviation (including the positional deviation amount and the positional deviation direction) between the target block 102 and the motion compensation block 103 is the position of the projected image block 109 of the target block in the reference frame 101 and the motion compensation. This corresponds to a positional deviation from the position of the block 103. Here, as the position of the projection image block 109 and the position of the motion compensation block 103, for example, the center position of the block is used.

ターゲットブロック102の射影イメージブロック109は、参照フレーム101において、ターゲットフレーム100の各ターゲットブロック102の位置と同じ位置に想定される。   The projected image block 109 of the target block 102 is assumed at the same position as the position of each target block 102 of the target frame 100 in the reference frame 101.

ブロックマッチング処理の概要を説明する。   An outline of the block matching process will be described.

先ず、図10において点線で示すように、参照フレーム101において、ターゲットフレーム100のターゲットブロック102の位置と同じ位置にターゲットブロック102の射影イメージブロック109を想定する。そして、このターゲットブロック102の射影イメージブロック109の中心の座標を、動き検出の原点105とする。そして、動きベクトル104が、動き検出の原点105から或る範囲内に存在すると仮定し、この動き検出の原点105を中心した所定の範囲をサーチ範囲106(図10の一点鎖線参照)と設定する。   First, as shown by a dotted line in FIG. 10, a projected image block 109 of the target block 102 is assumed in the reference frame 101 at the same position as the target block 102 of the target frame 100. The coordinates of the center of the projected image block 109 of the target block 102 are set as the motion detection origin 105. Then, assuming that the motion vector 104 exists within a certain range from the motion detection origin 105, a predetermined range centered on the motion detection origin 105 is set as the search range 106 (see the one-dot chain line in FIG. 10). .

次に、ターゲットブロック102と同じ大きさのブロック(参照ブロックという)108を参照画面において設定する。そして、この参照ブロック108の位置を、設定されたサーチ範囲106内において、例えば水平方向および垂直方向に、1画素または複数画素単位で移動させるようにする。したがって、サーチ範囲106においては、複数個の参照ブロック108が設定されることになる。   Next, a block (referred to as a reference block) 108 having the same size as the target block 102 is set on the reference screen. Then, the position of the reference block 108 is moved in the set search range 106 in units of one pixel or a plurality of pixels, for example, in the horizontal direction and the vertical direction. Accordingly, a plurality of reference blocks 108 are set in the search range 106.

ここで、参照ブロック108を、サーチ範囲106内を移動させるというのは、この例では、動き検出原点105がターゲットブロックの中心位置であるので、参照ブロック108の中心位置を、サーチ範囲106内を移動させることを意味する。したがって、参照ブロック108を構成する画素は、サーチ範囲106よりもはみ出すことがある。   Here, the reference block 108 is moved within the search range 106. In this example, since the motion detection origin 105 is the center position of the target block, the center position of the reference block 108 is moved within the search range 106. It means to move. Therefore, the pixels constituting the reference block 108 may protrude beyond the search range 106.

そして、サーチ範囲において、設定される各参照ブロック108に対して、当該各参照ブロック108とターゲットブロック102との位置ずれ量および位置ずれ方向を表すベクトル(参照ベクトルという)107(図10参照)を設定する。そして、それぞれの参照ベクトル107が指し示す位置にある参照ブロック108の画像内容と、ターゲットブロック102の画像内容との相関性を評価する。   Then, for each reference block 108 to be set in the search range, a vector (referred to as a reference vector) 107 (refer to FIG. 10) representing the positional deviation amount and the positional deviation direction between each reference block 108 and the target block 102. Set. Then, the correlation between the image content of the reference block 108 at the position indicated by each reference vector 107 and the image content of the target block 102 is evaluated.

参照ベクトル107は、図11に示すように、参照ブロック108の水平方向(X方向)の位置ずれ量Vxとし、垂直方向(Y方向)の位置ずれ量をVyとしたとき、ベクトル(Vx,Vy)と表すことができる。参照ブロック108の位置座標(例えば中心位置座標)とターゲットブロック102の位置座標(例えば中心位置座標)とが同じときには、参照ベクトル107は、ベクトル(0,0)と表す。   As shown in FIG. 11, the reference vector 107 is a vector (Vx, Vy) where the horizontal displacement (X direction) of the reference block 108 is Vx and the vertical displacement (Y direction) is Vy. )It can be expressed as. When the position coordinates (for example, center position coordinates) of the reference block 108 and the position coordinates (for example, center position coordinates) of the target block 102 are the same, the reference vector 107 is represented as a vector (0, 0).

例えば、参照ブロック108が、ターゲットブロック102の位置から、X方向に1画素ずれた位置にある場合、参照ベクトル107はベクトル(1,0)となる。また、図12に示すように、参照ブロック108が、ターゲットブロック102の位置から、X方向に3画素、Y方向に2画素ずれた位置にある場合には、参照ベクトル107はベクトル(3,2)となる。   For example, when the reference block 108 is at a position shifted by one pixel in the X direction from the position of the target block 102, the reference vector 107 is a vector (1, 0). As shown in FIG. 12, when the reference block 108 is located at a position shifted by 3 pixels in the X direction and 2 pixels in the Y direction from the position of the target block 102, the reference vector 107 is a vector (3, 2 )

つまり、参照ベクトル107は、図12の例に示すように、対応する各参照ブロック108とターゲットブロック102との間での位置ずれ(位置ずれ量と位置ずれの方向を含むベクトルとなる)を意味する。なお、図12では、ターゲットブロック102および参照ブロック108の位置を、それぞれのブロックの中心位置としている。   That is, as shown in the example of FIG. 12, the reference vector 107 means a positional deviation (a vector including a positional deviation amount and a positional deviation direction) between each corresponding reference block 108 and the target block 102. To do. In FIG. 12, the positions of the target block 102 and the reference block 108 are the center positions of the respective blocks.

参照ブロック108は、サーチ範囲106において移動するものとなるが、その場合に、参照ブロック108の中心位置がサーチ範囲106内を移動する。参照ブロック108は、水平方向および垂直方向の複数画素からなる。したがって、ターゲットブロック102とブロックマッチング処理される対象となる参照ブロック108が移動する最大範囲は、図12に示すように、サーチ範囲106よりも広いマッチング処理範囲110となる。   The reference block 108 moves within the search range 106. In this case, the center position of the reference block 108 moves within the search range 106. The reference block 108 includes a plurality of pixels in the horizontal direction and the vertical direction. Accordingly, the maximum range in which the target block 102 and the reference block 108 to be subjected to block matching processing move is a matching processing range 110 wider than the search range 106, as shown in FIG.

そして、ターゲットブロック102の画像内容との相関が最も強いとして検出された参照ブロック108の位置を、ターゲットフレーム100のターゲットブロック102の、参照フレーム101における位置(動いた後の位置)として検出する。検出した参照ブロックを、前述した動き補償ブロック103とする。そして、その検出した動き補償ブロック103の位置と、ターゲットブロック102の位置との間の位置ずれ量を、方向成分を含む量としての動きベクトル104として検出するようにする(図9(B)参照)。   Then, the position of the reference block 108 detected as having the strongest correlation with the image content of the target block 102 is detected as the position of the target block 102 of the target frame 100 in the reference frame 101 (position after moving). The detected reference block is set as the motion compensation block 103 described above. Then, the displacement amount between the detected position of the motion compensation block 103 and the position of the target block 102 is detected as a motion vector 104 as an amount including a direction component (see FIG. 9B). ).

ここで、ターゲットブロック102と、サーチ範囲106において移動する参照ブロック108との相関の強さを表す相関値は、基本的にはターゲットブロック102と参照ブロック108との対応する画素値を用いて算出される。その算出方法としては、自乗平均を用いる方法やその他種々の方法が提案されている。   Here, the correlation value indicating the strength of correlation between the target block 102 and the reference block 108 moving in the search range 106 is basically calculated using the pixel values corresponding to the target block 102 and the reference block 108. Is done. As the calculation method, a method using a root mean square and various other methods have been proposed.

そのうち、動きベクトルを算出する際に一般的に用いられる相関値としては、例えば、ターゲットブロック102内の各画素の輝度値と、参照ブロック106内の対応する各画素の輝度値との差分の絶対値の、ブロック内の全画素についての総和が用いられる(図13参照)。この差分の絶対値の総和を差分絶対値和と呼ぶ。以下、この差分絶対値和をSAD(Sum of Absolute Difference)値と記載することとする。   Among them, as a correlation value generally used when calculating a motion vector, for example, the absolute value of the difference between the luminance value of each pixel in the target block 102 and the luminance value of each corresponding pixel in the reference block 106 is used. The sum of values for all pixels in the block is used (see FIG. 13). The sum of the absolute values of the differences is called the difference absolute value sum. Hereinafter, this sum of absolute differences is referred to as a SAD (Sum of Absolute Difference) value.

相関演算結果としてSAD値が用いられる場合には、SAD値が小さいほど相関が強いものとされる。したがって、サーチ範囲106において移動する参照ブロック108のうち、SAD値が最小となる位置の参照ブロック108が最も相関が強い最強相関参照ブロックとなる。この最強相関参照ブロックが、動き補償ブロック103として検出され、その検出された動き補償ブロック103のターゲットブロック102の位置に対する位置ずれ量が動きベクトルとして検出される。   When the SAD value is used as the correlation calculation result, the smaller the SAD value, the stronger the correlation. Therefore, among the reference blocks 108 that move in the search range 106, the reference block 108 at the position where the SAD value is the smallest is the strongest correlation reference block with the strongest correlation. This strongest correlation reference block is detected as the motion compensation block 103, and the amount of displacement of the detected motion compensation block 103 relative to the position of the target block 102 is detected as a motion vector.

なお、一般的には、相関値が大きい方が相関が強いとされる。相関演算結果としてSAD値が用いられる場合には、当該SAD値が小さいほど相関値が大きく、相関が強いと言うことができる。   In general, the correlation is stronger when the correlation value is larger. When the SAD value is used as the correlation calculation result, it can be said that the smaller the SAD value, the larger the correlation value and the stronger the correlation.

前述したように、ブロックマッチングでは、サーチ範囲106において設定される複数個の参照ブロック108のそれぞれの、ターゲットブロック102の位置に対する位置ずれ量は、方向成分を含む量としての参照ベクトル107で表現される。各参照ブロック108の参照ベクトル107は、参照ブロック108の参照フレーム102上の位置に応じた値となる。前述したように、ブロックマッチングでは、相関値であるSAD値が最小値となる参照ブロック108の参照ベクトルを、動きベクトル104として検出する。   As described above, in block matching, the amount of positional deviation of each of the plurality of reference blocks 108 set in the search range 106 with respect to the position of the target block 102 is expressed by the reference vector 107 as an amount including a direction component. The The reference vector 107 of each reference block 108 has a value corresponding to the position of the reference block 108 on the reference frame 102. As described above, in block matching, the reference vector of the reference block 108 in which the SAD value that is the correlation value has the minimum value is detected as the motion vector 104.

そこで、ブロックマッチングでは、サーチ範囲106において設定される複数個の参照ブロック108のそれぞれとターゲットブロック102との間におけるSAD値(以下、説明の簡単のため参照ブロック108についてのSAD値という)を、先ず求める。   Therefore, in block matching, the SAD value between each of the plurality of reference blocks 108 set in the search range 106 and the target block 102 (hereinafter referred to as the SAD value for the reference block 108 for the sake of simplicity) First ask.

次に、求めたSAD値を、図14に示すように、それぞれの参照ブロック108の位置に応じた参照ベクトル107のそれぞれに対応させて、メモリに記憶しておく。そして、そのメモリに記憶された全ての参照ブロック108についてのSAD値の中から、最小のSAD値の参照ブロック108を検出することで、動きベクトル104を検出するようにしている。なお、以下、説明の簡単のため、参照ブロック106の位置に応じた参照ベクトル107を参照ブロック108の参照ベクトル107という。   Next, as shown in FIG. 14, the obtained SAD value is stored in the memory in correspondence with each reference vector 107 corresponding to the position of each reference block 108. The motion vector 104 is detected by detecting the reference block 108 having the smallest SAD value from the SAD values for all the reference blocks 108 stored in the memory. For the sake of simplicity, the reference vector 107 corresponding to the position of the reference block 106 is hereinafter referred to as the reference vector 107 of the reference block 108.

サーチ範囲106において設定された複数個の参照ブロック108の位置に応じた参照ベクトル107のそれぞれに対応させて、それぞれの参照ブロック108についての相関値(この例では、SAD値)を記憶したものを相関値テーブルと呼ぶ。この例では、相関値として差分絶対値和であるSAD値を用いるので、この相関値テーブルを、差分絶対値和テーブル(以下SADテーブルという)と呼ぶことにする。   Corresponding to each of the reference vectors 107 corresponding to the positions of the plurality of reference blocks 108 set in the search range 106, a correlation value (in this example, SAD value) for each reference block 108 is stored. This is called a correlation value table. In this example, since the SAD value which is the sum of absolute differences is used as the correlation value, this correlation value table will be referred to as a difference absolute value sum table (hereinafter referred to as SAD table).

図14のSADテーブルTBLが、これを示しており、このSADテーブルTBLにおいて、それぞれの参照ブロック108についての相関値(この例ではSAD値)を相関値テーブル要素という。図14の例では、符号111で指し示すSAD値は、参照ベクトルがベクトル(0,0)のときのSAD値である。そして、図14の例では、SAD値の最小値は、参照ベクトルがベクトル(3,2)のときの「7」であるので、求める動きベクトル104は、当該(3,2)となる。   This is shown in the SAD table TBL of FIG. 14, and the correlation value (SAD value in this example) for each reference block 108 in this SAD table TBL is referred to as a correlation value table element. In the example of FIG. 14, the SAD value indicated by reference numeral 111 is the SAD value when the reference vector is the vector (0, 0). In the example of FIG. 14, since the minimum value of the SAD value is “7” when the reference vector is the vector (3, 2), the motion vector 104 to be obtained is (3, 2).

なお、上述の説明において、ターゲットブロック102および参照ブロック108の位置とは、それらのブロックの任意の特定の位置、例えば中心位置を意味するものである。参照ベクトル107は、参照フレーム102におけるターゲットブロック102の射影イメージブロック109の位置と、参照ブロック108の位置との間のずれ量(方向を含む)を示すものである。   In the above description, the positions of the target block 102 and the reference block 108 mean arbitrary specific positions of these blocks, for example, the center position. The reference vector 107 indicates a shift amount (including direction) between the position of the projection image block 109 of the target block 102 and the position of the reference block 108 in the reference frame 102.

そして、各参照ブロック108に対応する参照ベクトル107は、参照フレーム101上において、ターゲットブロック102に対応する射影イメージブロック109の位置からの、各参照ブロック108の位置ずれとなっている。したがって、参照ブロック108の位置が特定されると、その位置に対応して参照ベクトルの値も特定される。これにより、SADテーブル110のメモリにおける参照ブロックの相関値テーブル要素のアドレスが特定されると、対応する参照ベクトルは特定されることになる。   The reference vector 107 corresponding to each reference block 108 is a positional shift of each reference block 108 from the position of the projection image block 109 corresponding to the target block 102 on the reference frame 101. Therefore, when the position of the reference block 108 is specified, the value of the reference vector is also specified corresponding to the position. Thus, when the address of the correlation value table element of the reference block in the memory of the SAD table 110 is specified, the corresponding reference vector is specified.

なお、SAD値は、同時に、2つ以上のターゲットブロックについて並列に計算するようにしてもよい。同時に処理するターゲットブロックが増加すると、処理は高速化する。しかし、SAD値を計算するハードウエアの規模が増大するので、処理の高速化と、回路規模の増大のトレードオフになる。   The SAD value may be calculated in parallel for two or more target blocks at the same time. As the number of target blocks to be processed simultaneously increases, the processing speed increases. However, since the hardware scale for calculating the SAD value increases, there is a trade-off between speeding up the processing and increasing the circuit scale.

[実施形態のブロックマッチング]
以上のブロックマッチングの説明は、1つのターゲットブロックについての動きベクトルの算出についての説明である。このターゲットブロックのターゲットフレームの全体に占める割合は、通常、小さいので、この1つのターゲットブロックに基づいてターゲットフレームについての動き(グローバルモーション)を求めるようにすることは一般的には困難である。
[Block Matching of Embodiment]
The above description of block matching is a description of motion vector calculation for one target block. Since the ratio of the target block to the entire target frame is usually small, it is generally difficult to obtain a motion (global motion) for the target frame based on the one target block.

この実施形態では、図15に示すように、ターゲットフレーム100を、例えば8画素×8ラインのような、比較的小さい大きさのターゲットブロック102の複数個に分割する。このターゲットブロック102の分割位置は、この実施形態では、1フレーム分の画像についてのブロックマッチング処理が終了する毎に、上述の第1の実施形態で説明したようにして、変更される。   In this embodiment, as shown in FIG. 15, the target frame 100 is divided into a plurality of target blocks 102 having a relatively small size, for example, 8 pixels × 8 lines. In this embodiment, the division position of the target block 102 is changed every time the block matching process for the image for one frame is completed as described in the first embodiment.

1フレーム内での処理においては、ブロック分割されて得られる複数個のターゲットブロック102のそれぞれについての動きベクトル(ローカル動きベクトル)104Bが先ず求められる。このとき、この実施形態では、求めたそれぞれのローカル動きベクトルの信頼性を示す指標を、併せて算出するようにする。   In processing within one frame, first, a motion vector (local motion vector) 104B for each of a plurality of target blocks 102 obtained by block division is obtained. At this time, in this embodiment, an index indicating the reliability of each obtained local motion vector is calculated together.

そして、ローカル動きベクトルの信頼性の指標から、ターゲットフレームについて求めた複数個のローカル動きベクトルの中から、信頼性の高いローカル動きベクトルのみを抽出する。   Then, from the local motion vector reliability index, only a highly reliable local motion vector is extracted from a plurality of local motion vectors obtained for the target frame.

次に、抽出した信頼性の高いローカル動きベクトルのみから、グローバルモーションを算出する。そして、算出したグローバルモーションを用いて、各ターゲットブロック単位のグローバル動きベクトルを算出する。   Next, global motion is calculated only from the extracted local motion vector with high reliability. Then, a global motion vector for each target block is calculated using the calculated global motion.

そして、算出したグローバル動きベクトルと、ターゲットブロック毎のローカル動きベクトルとを比較して、その比較結果に基づいて、各ターゲットブロックが背景部分か、動被写体部分かを評価判定するようにする。この実施形態では、算出したグローバル動きベクトルと、ターゲットブロック毎のローカル動きベクトルとを比較して、両者の一致度合いを判定する。そして、その判定結果として、ターゲットブロック毎のローカル動きベクトルとグローバル動きベクトルとの一致度合いを示す指標値を算出する。この指標値を、この明細書ではヒット率と称する。   Then, the calculated global motion vector and the local motion vector for each target block are compared, and based on the comparison result, it is evaluated whether each target block is a background portion or a moving subject portion. In this embodiment, the calculated global motion vector and the local motion vector for each target block are compared to determine the degree of coincidence between them. Then, as the determination result, an index value indicating the degree of coincidence between the local motion vector and the global motion vector for each target block is calculated. This index value is referred to as a hit rate in this specification.

このような評価判定を行うのは、画像に含まれるノイズの、ブロックマッチングで算出される相関値に与える影響を考慮したものである。   Such evaluation determination is performed in consideration of the influence of noise included in an image on a correlation value calculated by block matching.

ターゲットブロックについてのグローバル動きベクトルとローカル動きベクトルとが一致したときには、そのターゲットブロックは背景画像部分であると判断できる。したがって、この一致度合いの指標値は、ターゲットブロックの画像が、背景画像部分と一致しているかどうかの度合い(背景一致度合い)を示すものとなる。   When the global motion vector and the local motion vector for the target block match, it can be determined that the target block is the background image portion. Accordingly, the index value of the degree of coincidence indicates the degree (background coincidence degree) of whether or not the target block image coincides with the background image portion.

ターゲットブロックが背景画像部分であれば、静止画像部分であるので、ターゲットブロックの画像に対して、動き補償画像は、100%の割合(1:1の割合)で加算することができ、NR(ノイズ低減)効果を最大限にすることができる。   If the target block is a background image portion, it is a still image portion, so the motion compensated image can be added to the target block image at a rate of 100% (ratio of 1: 1), and NR ( Noise reduction effect can be maximized.

そして、背景一致度合いが低ければ、ターゲットブロックは動被写体部分であると予想されるので、その画像に対する、動き補償画像の加算割合を、背景一致度合いに応じて低くすることで、多重露光のような状態を軽減することができる。   If the degree of background matching is low, the target block is expected to be a moving subject part. Therefore, by reducing the addition ratio of the motion compensated image to the image according to the degree of background matching, multiple exposure is achieved. Can be reduced.

ここで、グローバル動きベクトルとローカル動きベクトルとが一致しない場合には、画像ノイズを考慮しなければ、そのターゲットブロックは、全て動被写体部分であると判断しても良い。この場合、ローカル動きベクトルに対応する参照ブロックについての相関値が最大(SAD値が最小)となっており、グローバル動きベクトルに対応する参照ブロックについての相関値よりも大きい(SAD値は小さい)。   Here, if the global motion vector and the local motion vector do not match, it may be determined that all of the target blocks are moving subject portions without considering image noise. In this case, the correlation value for the reference block corresponding to the local motion vector is maximum (the SAD value is minimum), and is larger than the correlation value for the reference block corresponding to the global motion vector (the SAD value is small).

しかし、一般に撮像画像などの画像中にはノイズが含まれる。この画像ノイズを考慮すると、グローバル動きベクトルとローカル動きベクトルとが一致しない場合であっても、ターゲットブロックが背景部分である場合がある。そして、そのようなターゲットブロックでは、ローカル動きベクトルに対応する参照ブロックについての相関値と、グローバル動きベクトルに対応する参照ブロックについての相関値との差は、前記画像ノイズ分よりも小さいものとなると考えられる。   However, noise is generally included in an image such as a captured image. Considering this image noise, the target block may be the background portion even when the global motion vector and the local motion vector do not match. In such a target block, the difference between the correlation value for the reference block corresponding to the local motion vector and the correlation value for the reference block corresponding to the global motion vector is smaller than the image noise. Conceivable.

そこで、この実施形態では、グローバル動きベクトルに対応する参照ブロックについての相関値を、前記画像のノイズ分を反映した値に補正し、その補正後の相関値と、ローカル動きベクトルに対応する参照ブロックについての相関値とを比較する。そして、補正後の相関値の方が大きい(SAD値は小さい)ときには、当該ターゲットブロックは、背景画像部分であると評価するようにする。すなわち、この実施形態では、補正した相関値に基づいて、前記背景一致度合いを評価するようにする。このとき、グローバル動きベクトルは、当該ターゲットブロックについての本来のローカル動きベクトルに一致したと考えられる。   Therefore, in this embodiment, the correlation value for the reference block corresponding to the global motion vector is corrected to a value reflecting the noise of the image, and the corrected correlation value and the reference block corresponding to the local motion vector are corrected. Compare with the correlation value for. When the corrected correlation value is larger (the SAD value is smaller), the target block is evaluated as a background image portion. That is, in this embodiment, the background matching degree is evaluated based on the corrected correlation value. At this time, it is considered that the global motion vector matches the original local motion vector for the target block.

そして、この実施形態では、背景一致度合いの評価の結果、ターゲットブロックが背景画像部分であると判定されたときには、当該ターゲットブロックについては、グローバル動きベクトルを、出力動きベクトルとして出力する。また、背景一致度合いの評価の結果、ターゲットブロックが背景画像部分と一致していないと判定されたときには、当該ターゲットブロックについては、ローカル動きベクトルを、出力動きベクトルとして出力する。この実施形態では、出力動きベクトルは、後段の処理用動きベクトル、この実施形態では、NR処理用動きベクトルである。   In this embodiment, when it is determined that the target block is a background image portion as a result of evaluating the degree of background matching, a global motion vector is output as an output motion vector for the target block. If it is determined that the target block does not match the background image portion as a result of the background matching degree evaluation, a local motion vector is output as an output motion vector for the target block. In this embodiment, the output motion vector is a subsequent processing motion vector, and in this embodiment, an NR processing motion vector.

なお、グローバル動きベクトルとローカル動きベクトルとが全く一致したときには、グローバル動きベクトルとローカル動きベクトルのいずれを出力動きベクトルとしてもよいことは言うまでもない。   Needless to say, when the global motion vector and the local motion vector completely match, either the global motion vector or the local motion vector may be used as the output motion vector.

そして、この実施形態では、上述のようにして得たターゲットブロック単位の出力動きベクトルを用いて、ターゲットフレームに対して、参照フレームをブロック単位で位置合わせを行い、動き補償画像(動き補償フレーム)を生成する。そして、ターゲットフレームと、動き補償フレームとを重ね合わせてNR画像を生成するようにする。   In this embodiment, using the output motion vector in units of target blocks obtained as described above, the reference frame is aligned in units of blocks with respect to the target frame, and a motion compensated image (motion compensation frame) is obtained. Is generated. Then, the NR image is generated by superimposing the target frame and the motion compensation frame.

そして、この実施の形態の撮像装置において、静止画撮影においては、図16に示すように、高速で複数枚の静止画像の撮影を行い、1枚目の静止画撮影画像をターゲットフレーム100とする。そして、2枚目以降、所定枚数の静止画撮影画像を参照フレーム101として、重ね合わせを行い、その重ね合わせたものを静止画撮影画像として記録するようにする。   In the imaging apparatus of this embodiment, in still image shooting, as shown in FIG. 16, a plurality of still images are captured at high speed, and the first still image captured image is used as the target frame 100. . Then, for the second and subsequent sheets, a predetermined number of still image captured images are used as a reference frame 101, and the superimposed images are recorded as still image captured images.

すなわち、撮影者が撮像装置のシャッターボタンを押下操作すると、高速で前記所定枚数の静止画像が撮影される。そして、その1枚目に撮影した静止画像(フレーム)に対して、時間的に後で撮影された複数枚の静止画像(フレーム)が、重ね合わされて、記録されることになる。   That is, when the photographer depresses the shutter button of the image pickup apparatus, the predetermined number of still images are taken at high speed. Then, a plurality of still images (frames) taken later in time are superimposed and recorded on the first still image (frame) taken.

なお、この実施形態では対象としないが、動画撮影時は、図17のように、撮像素子から出力されている現フレームの画像をターゲットフレーム100の画像とし、その前フレームの過去の画像を参照フレーム101の画像とする。つまり、動画撮影時には、現フレームの画像のノイズ低減を行うために、現フレームの前フレームの画像を現フレームに重ね合わせるということになる。   Although not targeted in this embodiment, at the time of moving image shooting, as shown in FIG. 17, the current frame image output from the image sensor is set as the target frame 100 image, and the past image of the previous frame is referred to. The image of the frame 101 is assumed. That is, at the time of moving image shooting, the image of the previous frame of the current frame is superimposed on the current frame in order to reduce noise of the image of the current frame.

[撮像装置のハードウエア構成例]
図18は、この発明の画像処理装置の実施形態としての撮像装置の一例のブロック図を示すものである。
[Example of hardware configuration of imaging device]
FIG. 18 shows a block diagram of an example of an imaging apparatus as an embodiment of the image processing apparatus of the present invention.

この図18に示すように、この実施形態の撮像装置は、システムバス2にCPU(Central Processing Unit)1が接続される。また、システムバス2に、撮像信号処理系10や、ユーザ操作入力部3、画像メモリ部4、記録再生装置部5などが接続されて構成されている。なお、この明細書においては、CPU1は、図示は省略するが、種々のソフトウエア処理を行なうプログラムを記憶するROM(Read Only Memory)やワークエリア用RAM(Random Access Memory)などを含むものとしている。   As shown in FIG. 18, in the imaging apparatus of this embodiment, a CPU (Central Processing Unit) 1 is connected to a system bus 2. Further, the system bus 2 is configured by connecting an imaging signal processing system 10, a user operation input unit 3, an image memory unit 4, a recording / reproducing device unit 5, and the like. In this specification, the CPU 1 includes a ROM (Read Only Memory) and a work area RAM (Random Access Memory) that store programs for performing various software processes, although not shown. .

そして、CPU1は、システムバス2を通じて、各処理部の動作を制御するように構成されている。   The CPU 1 is configured to control the operation of each processing unit through the system bus 2.

ユーザ操作入力部3を通じた撮像記録開始操作を受けて、図18の撮像装置の撮像信号処理系は、後述するような撮像画像データの記録処理を行なう。また、ユーザ操作入力部3を通じた撮像記録画像の再生開始操作を受けて、図18の撮像装置の撮像信号処理系10は、記録再生装置部5の記録媒体に記録された撮像画像データの再生処理を行なう。   Upon receiving an imaging recording start operation through the user operation input unit 3, the imaging signal processing system of the imaging apparatus in FIG. 18 performs recording processing of captured image data as described later. Further, in response to an operation for starting reproduction of the captured image through the user operation input unit 3, the imaging signal processing system 10 of the imaging apparatus in FIG. 18 reproduces the captured image data recorded on the recording medium of the recording / reproducing apparatus 5. Perform processing.

図18に示すように、撮像信号処理系10においては、撮像レンズ10Lを備えるカメラ光学系(図示は省略)を通じた被写体からの入射光は、撮像素子11に照射されて撮像される。この例では、撮像素子11は、CCD(Charge Coupled Device)イメージャで構成されている。なお、撮像素子11は、CMOS(Complementary Metal Oxide Semiconductor)イメージャで構成してもよい。   As shown in FIG. 18, in the imaging signal processing system 10, incident light from a subject through a camera optical system (not shown) including an imaging lens 10 </ b> L is applied to the imaging element 11 and imaged. In this example, the imaging device 11 is configured by a CCD (Charge Coupled Device) imager. Note that the image sensor 11 may be a CMOS (Complementary Metal Oxide Semiconductor) imager.

この例の撮像装置においては、撮像記録開始操作がなされると、レンズ10Lを通じて入力された映像が、撮像素子11により撮像画像信号に変換される。そして、タイミング信号発生部12からのタイミング信号に同期した信号として、赤(R)、緑(G)、青(B)の3原色から構成されるベイヤー配列のRAW信号(生の信号)であるアナログ撮像信号が、撮像素子11から出力される。出力されたアナログ撮像信号は、前処理部13に供給され、欠陥補正やγ補正等の前処理が施され、データ変換部14に供給される。   In the imaging apparatus of this example, when an imaging recording start operation is performed, an image input through the lens 10L is converted into a captured image signal by the imaging element 11. The signal synchronized with the timing signal from the timing signal generator 12 is a RAW signal (raw signal) in a Bayer array composed of three primary colors of red (R), green (G), and blue (B). An analog image signal is output from the image sensor 11. The output analog imaging signal is supplied to the preprocessing unit 13, subjected to preprocessing such as defect correction and γ correction, and supplied to the data conversion unit 14.

データ変換部14は、これに入力されたRAW信号であるアナログ撮像信号を、輝度信号成分Yと、色差信号成分Cb/Crとにより構成されるデジタル撮像信号(YCデータ)に変換する。データ変換部14からのデジタル撮像信号は、ユーザ操作入力部3を通じた撮影指示に基づいて、画像メモリ部4に、書き込まれる。   The data converter 14 converts the analog imaging signal, which is a RAW signal input thereto, into a digital imaging signal (YC data) composed of a luminance signal component Y and a color difference signal component Cb / Cr. A digital imaging signal from the data conversion unit 14 is written in the image memory unit 4 based on a shooting instruction through the user operation input unit 3.

すなわち、ユーザ操作入力部3を通じた撮影指示として、シャッターボタンの押下による静止画撮影指示であると、データ変換部14からのデジタル撮像信号は、フレームメモリ41〜4Nに書き込まれる。この場合に、データ変換部14からのデジタル撮像信号は、重ね合わせるべき前述した複数フレーム分が画像メモリ部4の第1〜第N(Nは、重ね合わせる静止画の枚数)のフレームメモリ41〜4Nに書き込まれる。   In other words, if the shooting instruction through the user operation input unit 3 is a still image shooting instruction by pressing the shutter button, the digital imaging signal from the data conversion unit 14 is written in the frame memories 41 to 4N. In this case, the digital image pickup signal from the data conversion unit 14 includes the first to Nth (N is the number of still images to be superimposed) frame memories 41 to 41 in the image memory unit 4 for the plurality of frames to be superimposed. Written to 4N.

この例においては、シャッターボタンの押下の1枚目のフレームの画像データは、ターゲットフレームの画像データとして第1のフレームメモリ41に書き込まれる。そして、2枚目以降のフレーム画像のデータは、参照フレームの画像データとして、それぞれ第2〜第Nのフレームメモリ42〜4Nに順次に書き込まれる。   In this example, the image data of the first frame when the shutter button is pressed is written in the first frame memory 41 as the image data of the target frame. Then, the data of the second and subsequent frame images are sequentially written in the second to Nth frame memories 42 to 4N as reference frame image data, respectively.

そして、複数フレーム分の画像が画像メモリ部4に書き込まれた後、ターゲットフレームの画像データと参照フレームの画像データが、動きベクトル算出部15によって読み込まれる。   After images for a plurality of frames are written in the image memory unit 4, the image data of the target frame and the image data of the reference frame are read by the motion vector calculation unit 15.

動きベクトル算出部15は、この画像メモリ部4からの画像データの読み込みに際して、機能的にブロック分割処理部を備える。すなわち、動きベクトル算出部15は、画像メモリ部4からターゲットフレームの画像データと参照フレームの画像データとを読み込むが、その読み込み単位は、ブロック分割されたブロック単位とする。   The motion vector calculation unit 15 functionally includes a block division processing unit when reading image data from the image memory unit 4. That is, the motion vector calculation unit 15 reads the image data of the target frame and the image data of the reference frame from the image memory unit 4, and the reading unit is a block unit divided into blocks.

そして、動きベクトル算出部15は、起点となる分割始点を定め、それに相当する画像メモリ部4のアドレスから、前述のブロックBkに対応するターゲットブロックおよび参照ブロックの読み込みをする。つまり、ターゲットブロックおよび参照ブロック単位で、動きベクトル算出部15は、画像メモリ部4から画像データの読み込みを行なう。   Then, the motion vector calculation unit 15 determines a division start point as a starting point, and reads the target block and reference block corresponding to the block Bk from the corresponding address of the image memory unit 4. That is, the motion vector calculation unit 15 reads image data from the image memory unit 4 in units of target blocks and reference blocks.

ターゲットフレームと参照フレームとのブロックマッチングによる動きベクトル検出が終了した後、次のターゲットフレームと参照フレームとのブロックマッチングをする際には、ブロック分割の分割始点を、上述の第1の実施形態のようにずらすようにする。   After the motion vector detection by block matching between the target frame and the reference frame is completed, when performing block matching between the next target frame and the reference frame, the division start point of the block division is set as described in the first embodiment. So as to shift.

そして、動きベクトル算出部15では、そのブロック単位で、後述するようなローカル動きベクトルLMVの検出、ローカル動きベクトルLMVの信頼性の算出、グローバルモーションの算出およびグローバル動きベクトルGMVの算出処理がなされる。さらに、動きベクトル算出部15では、ターゲットブロックについての背景一致度合いの評価も行なって、ヒット率βを生成する。   Then, the motion vector calculation unit 15 performs detection processing of the local motion vector LMV, calculation of the reliability of the local motion vector LMV, calculation of the global motion, and calculation of the global motion vector GMV as described later for each block. . Further, the motion vector calculation unit 15 also evaluates the degree of background matching for the target block, and generates a hit rate β.

この実施形態では、動きベクトル算出部15からは、ターゲットフレームの画像データTGvと、参照フレームの画像データREFvと、ヒット率βとが出力される。また、動きベクトル算出部15からは、グローバル動きベクトルGMVまたはローカル動きベクトルLMVからなるNR処理用動きベクトルMVnrの情報が出力される。   In this embodiment, the motion vector calculation unit 15 outputs target frame image data TGv, reference frame image data REFv, and a hit rate β. Further, the motion vector calculation unit 15 outputs information on the NR processing motion vector MVnr composed of the global motion vector GMV or the local motion vector LMV.

そして、動きベクトル算出部15からのNR処理用動きベクトルMVnrの情報と、参照フレームの画像データREFvとは動き補償画生成部16に供給される。動き補償画生成部16では、参照フレームの画像データREFvに対して、NR処理用動きベクトルMVnrによりグローバルモーションに対応する処理、つまり、平行移動、回転、拡大縮小を伴う変形処理を施して、動き補償画像を生成する。   The information on the NR processing motion vector MVnr from the motion vector calculation unit 15 and the image data REFv of the reference frame are supplied to the motion compensation image generation unit 16. The motion compensated image generation unit 16 performs a process corresponding to the global motion on the image data REFv of the reference frame using the NR processing motion vector MVnr, that is, a deformation process with translation, rotation, and enlargement / reduction, A compensation image is generated.

そして、動きベクトル算出部15からのターゲットフレームの画像データTGvが加算部17に供給されると共に、動き補償画生成部16からの動き補償画像の画像データMCvが加算部17に供給される。   Then, the image data TGv of the target frame from the motion vector calculation unit 15 is supplied to the addition unit 17, and the image data MCv of the motion compensation image from the motion compensation image generation unit 16 is supplied to the addition unit 17.

また、動きベクトル算出部15からのターゲットフレームの画像データTGvとヒット率βとが、加算率計算部21に供給される。加算率計算部21は、ターゲットフレームの各ターゲットブロック毎の加算率αを、背景一致度合いであるヒット率βに応じて計算する。そして、加算率計算部21は、算出したターゲットブロック毎の加算率αを、加算部17に供給する。   Further, the target frame image data TGv and the hit rate β from the motion vector calculation unit 15 are supplied to the addition rate calculation unit 21. The addition rate calculation unit 21 calculates the addition rate α for each target block of the target frame according to the hit rate β that is the degree of background matching. Then, the addition rate calculation unit 21 supplies the calculated addition rate α for each target block to the addition unit 17.

加算部17では、両画像データTGvおよびMCvの対応する位置の画素が加算されることにより、画像の重ね合わせ処理がなされ、その加算画像(NR画像である)の画像データMIXvが出力される。この画像重ね合わせは、ターゲットブロック単位に行なわれ、ターゲットブロックの画像データに対して、加算率αで、動き補償画像の画像データMCvの対応するブロックの画像データが加算される。   The adder 17 adds the pixels at the corresponding positions of both the image data TGv and MCv to perform an image superimposition process, and outputs the image data MIXv of the added image (which is an NR image). This image superposition is performed for each target block, and the image data of the corresponding block of the image data MCv of the motion compensated image is added to the image data of the target block at the addition rate α.

加算部17からの加算画像の画像データMIXvは、画像メモリ部4の第1のフレームメモリ41に、ターゲットフレームの画像データとして、その前のターゲットフレームの画像データに重ね書き(上書き)される。   The image data MIXv of the added image from the adding unit 17 is overwritten (overwritten) on the first frame memory 41 of the image memory unit 4 as the image data of the target frame over the image data of the previous target frame.

すなわち、第1のフレームメモリ41のターゲットフレームの画像データは、最初は、シャッターボタンが押下された直後の1枚目のフレームの画像データとなる。第1のフレームメモリ41のターゲットフレームの画像データは、2枚目の参照フレームの動き補償画の画像データMCvとターゲットフレームとが加算されると、その加算結果の加算画像の画像データMIXvに書き換えられる。   That is, the image data of the target frame in the first frame memory 41 is initially image data of the first frame immediately after the shutter button is pressed. When the image data MCv of the motion compensation image of the second reference frame and the target frame are added, the image data of the target frame in the first frame memory 41 is rewritten to the image data MIXv of the added image as a result of the addition. It is done.

そして、その加算画像の画像データMIXvが、3枚目の参照フレームの画像データに対するターゲットフレームの画像データとなる。そして、動きベクトル算出部15による画像メモリ部4からの画像データの読み込みに際しての、ブロック分割位置が、その1フレーム分前とは、上述の第1の実施形態に示したようにして変更される。つまり、ブロック分割の分割始点が、その前のフレームでの処理の際とは異なるオフセット位置に変更される。そして、そのブロック分割位置が変更されたブロック単位の画像データについて、上述と同様にして、動きベクトル算出部15でNR処理用動きベクトルMVnrが算出され、加算部17で画像の重ね合わせ処理がなされる。   Then, the image data MIXv of the added image becomes the image data of the target frame with respect to the image data of the third reference frame. Then, when the image data is read from the image memory unit 4 by the motion vector calculation unit 15, the block division position is changed from the one frame before as described in the first embodiment. . That is, the division start point of the block division is changed to an offset position different from that at the time of processing in the previous frame. Then, with respect to the image data in units of blocks whose block division positions have been changed, the motion vector calculation unit 15 calculates the NR processing motion vector MVnr in the same manner as described above, and the addition unit 17 performs the image superimposition processing. The

そして、その加算結果の加算画像の画像データMIXvが画像メモリ部4の第1のフレームメモリ41に、ターゲットフレームの画像データとして、その前のターゲットフレームの画像データに重ね書き(上書き)される。以下、4枚目以降の参照フレームに対しても、さらに分割始点が変更された後、同様の処理動作がなされる。   Then, the image data MIXv of the addition image as a result of the addition is overwritten (overwritten) in the first frame memory 41 of the image memory unit 4 as the image data of the target frame on the image data of the previous target frame. Thereafter, the same processing operation is performed for the fourth and subsequent reference frames after the division start point is further changed.

したがって、N枚目の参照フレームまでについての画像の重ね合わせ処理がなされた後には、画像メモリ部4の第1のフレームメモリ41には、重ね合わせるべきN枚の全てのフレームが重ね合わされたNR画像が書き込まれていることになる。   Therefore, after the image superimposition processing for the Nth reference frame is performed, the first frame memory 41 of the image memory unit 4 has the NR in which all the N frames to be superimposed are superimposed. An image is written.

そして、この画像メモリ部4の第1フレームメモリ41に格納された重ね合わせ結果のNR画像である加算画像の画像データMIXvは、システムバス2を通じて静止画コーデック部18に供給されてコーデック変換される。静止画コーデック部18からの出力データは、記録再生装置部5の例えばDVD(Digital Versatile Disc)やハードディスクなどの記録媒体に記録される。この実施形態では、静止画コーデック部18では、JPEG(Joint Photographic Experts Group)方式の静止画についての画像圧縮符号化処理が行われる。   Then, the image data MIXv of the added image, which is the NR image resulting from the superposition, stored in the first frame memory 41 of the image memory unit 4 is supplied to the still image codec unit 18 through the system bus 2 and subjected to codec conversion. . Output data from the still image codec unit 18 is recorded on a recording medium such as a DVD (Digital Versatile Disc) or a hard disk of the recording / reproducing device unit 5. In this embodiment, the still image codec unit 18 performs image compression encoding processing on a still image of JPEG (Joint Photographic Experts Group) system.

また、この静止画撮影モード時、シャッターボタンが押下操作される前においては、データ変換部14からの画像データは、画像メモリ部4の第1のフレームメモリ41を通じて、解像度変換部19に供給される。そして、画像データは、この解像度変換部19にて、所定の解像度に変換された後、NTSC(National Television System Committee)エンコーダ20に供給される。このNTSCエンコーダ20では、画像データは、NTSC方式の標準カラー映像信号に変換され、例えばLCD(Liquid Crystal Display;液晶ディスプレイ)からなるモニターディスプレイ6に供給される。モニターディスプレイ6の表示画面には、静止画撮影モード時のモニター画像がモニター表示される。   In this still image shooting mode, before the shutter button is pressed, the image data from the data conversion unit 14 is supplied to the resolution conversion unit 19 through the first frame memory 41 of the image memory unit 4. The The image data is converted into a predetermined resolution by the resolution conversion unit 19 and then supplied to an NTSC (National Television System Committee) encoder 20. In the NTSC encoder 20, the image data is converted into an NTSC standard color video signal and supplied to a monitor display 6 made up of, for example, an LCD (Liquid Crystal Display). On the display screen of the monitor display 6, a monitor image in the still image shooting mode is displayed on the monitor.

この記録再生装置部5の記録媒体に記録された静止画の画像データは、ユーザ操作入力部3を通じた再生開始操作に応じて読み出され、静止画コーデック部18に供給されて、再生デコードされる。そして、再生デコードされた静止画の画像データは、画像メモリ部4のバッファメモリ(図示は省略)を通じてNTSCエンコーダ20に供給される。NTSCエンコーダ20でNTSC方式の標準カラー映像信号に変換された画像データは、モニターディスプレイ6に供給され、再生画像がその表示画面に表示される。   The image data of the still image recorded on the recording medium of the recording / reproducing apparatus unit 5 is read in response to the reproduction start operation through the user operation input unit 3, supplied to the still image codec unit 18, and reproduced and decoded. The The reproduced and decoded still image data is supplied to the NTSC encoder 20 through a buffer memory (not shown) of the image memory unit 4. The image data converted into the NTSC standard color video signal by the NTSC encoder 20 is supplied to the monitor display 6 and a reproduced image is displayed on the display screen.

なお、図18では、図示を省略したが、NTSCエンコーダ20からの出力映像信号は、映像出力端子を通じて外部に導出することが可能とされている。   Although not shown in FIG. 18, the output video signal from the NTSC encoder 20 can be derived to the outside through a video output terminal.

なお、この実施形態では、静止画コーデック部18により画像データを圧縮して記録するようにしたが、静止画コーデック部18を省略して、画像データを圧縮せずに記録するようにしても良い。   In this embodiment, the still image codec unit 18 compresses and records the image data. However, the still image codec unit 18 may be omitted and the image data may be recorded without being compressed. .

また、上述した動きベクトル算出部15および動き補償画生成部16は、ハードウエアにより構成することできる。また、動きベクトル算出部15および動き補償画生成部16は、DSP(Digital Signal Processor)を用いて構成することもできる。さらには、動きベクトル算出部15および動き補償画生成部16は、CPU1によりソフトウエア処理とすることもできる。   The motion vector calculation unit 15 and the motion compensation image generation unit 16 described above can be configured by hardware. The motion vector calculation unit 15 and the motion compensation image generation unit 16 can also be configured using a DSP (Digital Signal Processor). Furthermore, the motion vector calculation unit 15 and the motion compensation image generation unit 16 can be software processed by the CPU 1.

同様に、加算部17も、ハードウエアにより構成することできるし、また、DSPを用いて構成することもできる。さらには、加算部17も、CPU1によりソフトウエア処理とすることもできる。また、静止画コーデック部18も、同様である。   Similarly, the adding unit 17 can also be configured by hardware or can be configured by using a DSP. Furthermore, the addition unit 17 can also be software processed by the CPU 1. The same applies to the still image codec unit 18.

[動きベクトル算出部15の説明]
動きベクトル算出部15では、この実施の形態では、先ず、図9〜図14を用いて説明した、SAD値を用いてブロックマッチング処理を行うことで、ローカル動きベクトルLMVの検出を行うようにする。ただし、この実施の形態では、動きベクトル算出部15は、後述するようなハードウエアで構成され、ローカル動きベクトルLMVは、階層化ブロックマッチング処理により算出することができる。
[Description of Motion Vector Calculation Unit 15]
In this embodiment, the motion vector calculation unit 15 first detects the local motion vector LMV by performing the block matching process using the SAD value described with reference to FIGS. . However, in this embodiment, the motion vector calculation unit 15 is configured by hardware as will be described later, and the local motion vector LMV can be calculated by hierarchical block matching processing.

また、前述したように、この実施形態の動きベクトル算出部15では、ローカル動きベクトルLMVのそれぞれの信頼性の指標も算出するようにする。   Further, as described above, the motion vector calculation unit 15 of this embodiment also calculates the reliability index of each of the local motion vectors LMV.

さらに、動きベクトル算出部15では、信頼性の高いローカル動きベクトルのみを用いてグローバルモーションを算出する。そして、算出したグローバルモーションから、ブロック単位のグローバル動きベクトルを算出する。さらに、各ターゲットブロックについて、背景部分か、動被写体部分かの判定を行い、背景一致度合いを示すヒット率βを算出する。   Furthermore, the motion vector calculation unit 15 calculates global motion using only highly reliable local motion vectors. Then, a global motion vector for each block is calculated from the calculated global motion. Further, for each target block, it is determined whether it is a background portion or a moving subject portion, and a hit rate β indicating the degree of background matching is calculated.

<階層化ブロックマッチング処理>
一般的な従来のブロックマッチングにおける動きベクトル検出処理では、サーチ範囲内を、ピクセル単位(1ピクセル単位または複数ピクセル単位)で参照ブロックを移動させて、各移動位置における参照ブロックについてのSAD値を算出する。そして、その算出したSAD値の中から最小値を示すSAD値を検出し、当該最小SAD値を呈する参照ブロック位置に基づいて動きベクトルを検出するようにする。
<Layered block matching processing>
In motion vector detection processing in general conventional block matching, the reference block is moved in the search range in units of pixels (one pixel unit or a plurality of pixels), and the SAD value for the reference block at each moving position is calculated. To do. Then, the SAD value indicating the minimum value is detected from the calculated SAD values, and the motion vector is detected based on the reference block position exhibiting the minimum SAD value.

そして、この実施形態では、1フレームが多数のブロックに分割されるので、以上のブロックマッチング処理をターゲットブロックおよび参照ブロックを順次切り替えながら、全画面において処理を行う。これにより、ターゲットフレーム内の全てのターゲットブロックについてのローカル動きベクトルLMVの算出を行う。   In this embodiment, since one frame is divided into a large number of blocks, the above block matching process is performed on the entire screen while sequentially switching the target block and the reference block. Thereby, the local motion vector LMV is calculated for all the target blocks in the target frame.

しかし、このような従来の動きベクトル検出処理では、サーチ範囲内をピクセル単位で参照ブロックを移動させるようにするので、検索するサーチ範囲に比例して、SAD値を算出するマッチング処理回数が多くなって、マッチング処理時間が大きくなる。また、SADテーブルの容量も大きくなるという問題があった。   However, in such a conventional motion vector detection process, the reference block is moved in units of pixels within the search range, so that the number of matching processes for calculating the SAD value increases in proportion to the search range to be searched. This increases the matching processing time. There is also a problem that the capacity of the SAD table increases.

特に、静止画像の高画素化、並びに動画像のHD(High Definition)化が進み、1枚の画像サイズが非常に大きくなってきていることを考慮すると、この問題は大きい。また、システムバス2を介して画像メモリをアクセスする回数も多くなり、バス帯域を大きくしなければならなくなるという問題もある。   In particular, this problem is significant considering that the number of pixels in a still image and the high definition (HD) of a moving image are increasing, and the size of one image is becoming very large. In addition, the number of times the image memory is accessed via the system bus 2 increases, and there is a problem that the bus bandwidth must be increased.

以上のことを考慮して、この実施の形態では、先ず、ターゲット画像(ターゲットフレーム)および参照画像(参照フレーム)を縮小した縮小画像と中間画像を用意する。そして、縮小画像、中間画像、原画画像の順に、ブロックマッチングによる動きベクトルサーチを、前段階でのブロックマッチングの結果を次段階におけるサーチに反映させて行うという階層化ブロックマッチングを行う。   In consideration of the above, in this embodiment, first, a reduced image and an intermediate image obtained by reducing a target image (target frame) and a reference image (reference frame) are prepared. Then, hierarchical block matching is performed in which the motion vector search by block matching is performed in the order of the reduced image, the intermediate image, and the original image by reflecting the result of block matching in the previous stage in the search in the next stage.

この階層化ブロックマッチングを行うことで、演算量や処理時間を少なく、効率の良いローカル動きベクトルの算出を行うようにする。ここで、縮小画像のことを縮小面、中間画像のことを中間面、縮小化をしていない元の画像のことを基底面と呼ぶことにする。   By performing this hierarchical block matching, the calculation amount and processing time are reduced, and the local motion vector is calculated efficiently. Here, the reduced image is referred to as a reduced surface, the intermediate image is referred to as an intermediate surface, and the original image that has not been reduced is referred to as a base surface.

図19は、この階層化ブロックマッチングを説明するための図である。図19の例においては、基底面ターゲットフレーム201および基底面参照フレーム301を、1/a・1/b(1/a、1/bは、縮小倍率であって、a>1、b>1である)に縮小して、縮小面ターゲットフレーム211および縮小面参照フレーム311を生成する。   FIG. 19 is a diagram for explaining this hierarchical block matching. In the example of FIG. 19, the basal plane target frame 201 and the basal plane reference frame 301 are represented by 1 / a · 1 / b (1 / a and 1 / b are reduction magnifications, and a> 1, b> 1 To a reduced plane target frame 211 and a reduced plane reference frame 311.

また、基底面ターゲットフレーム201および基底面参照フレーム301を、1/bに縮小して、中間面ターゲットフレーム221および中間面参照フレーム321を生成しておく。   In addition, the base plane target frame 201 and the base plane reference frame 301 are reduced to 1 / b to generate the intermediate plane target frame 221 and the intermediate plane reference frame 321.

縮小面や中間面の基底面に対する倍率は任意であるが、1/2〜1/8倍(画素数換算で1/4〜1/64倍)の範囲が適当である。なお、図19の例では、中間面に対する縮小面の縮小倍率は1/4(すなわち、a=4)、また、基底面に対する中間面の縮小倍率は1/4(すなわち、b=4)の場合として示している。   The magnification of the reduction surface and the intermediate surface with respect to the base surface is arbitrary, but a range of 1/2 to 1/8 times (1/4 to 1/64 times in terms of the number of pixels) is appropriate. In the example of FIG. 19, the reduction ratio of the reduction surface with respect to the intermediate surface is 1/4 (that is, a = 4), and the reduction magnification of the intermediate surface with respect to the base surface is 1/4 (that is, b = 4). Shown as a case.

縮小面や中間面の作成にあたっても、その方法は任意である。しかし、単に、原画像の画素を、縮小倍率に応じて間引くだけで縮小面や中間面を作成する方法では、折り返し成分が発生し、1階層目(縮小面)で検出される動きベクトルが、正しいものから外れやすくなる。このため、通常、縮小倍率に応じたカットオフ周波数帯域を持つローパスフィルタを原画に対して施したのち、縮小倍率に応じたサブサンプリングを行う。   The method for creating the reduced surface and the intermediate surface is arbitrary. However, in the method of creating a reduced surface and an intermediate surface by simply thinning out the pixels of the original image according to the reduction magnification, a aliasing component occurs, and the motion vector detected in the first layer (reduced surface) is It becomes easy to come off from the right thing. For this reason, normally, a low-pass filter having a cutoff frequency band corresponding to the reduction magnification is applied to the original image, and then subsampling corresponding to the reduction magnification is performed.

この実施形態では、倍率に応じたサブサンプリングにより消失する画素を含んだ、輝度平均値を生成し、それを縮小面画素や中間面画素としている。つまり、1/a縮小なら、a×a画素の正方領域の輝度平均値を算出し、これを縮小面画素や中間面画素の輝度値とする。この手法の場合、まず中間面を生成しておいてから、中間面から縮小面を生成しても、原画から直接縮小面を生成する場合と同じ結果が得られるため、より効率的である。   In this embodiment, a luminance average value including pixels that disappear due to sub-sampling according to the magnification is generated, and is used as a reduction plane pixel or an intermediate plane pixel. That is, for 1 / a reduction, the average luminance value of the square area of a × a pixels is calculated and used as the luminance value of the reduction plane pixels and intermediate plane pixels. In the case of this method, even if an intermediate surface is first generated and then a reduced surface is generated from the intermediate surface, the same result as that when the reduced surface is directly generated from the original image is obtained, which is more efficient.

なお、縮小画像を得るに当たっては、水平方向の縮小率と垂直方向の縮小率は、上記のように同じであってよいし、また、異ならせても良い。   In obtaining a reduced image, the horizontal reduction ratio and the vertical reduction ratio may be the same as described above, or may be different.

以上のようにして、縮小面および中間面を作成したら、先ず、縮小面ターゲットフレーム211に縮小面ターゲットブロック212を設定すると共に、縮小面参照フレーム311に縮小面サーチ範囲313を設定する。   When the reduction plane and the intermediate plane are created as described above, first, the reduction plane target block 212 is set in the reduction plane target frame 211, and the reduction plane search range 313 is set in the reduction plane reference frame 311.

そして、当該縮小面サーチ範囲313内の複数個の縮小面参照ブロック312について、縮小面の動きベクトル検出装置401で、上述したブロックマッチング処理を行い、最小SAD値を呈する縮小面参照ブロック位置を検出する。この縮小面参照ブロック位置の検出に基づき、縮小面動きベクトルMVsを検出する。   Then, with respect to a plurality of reduced surface reference blocks 312 in the reduced surface search range 313, the reduced surface motion vector detection device 401 performs the above-described block matching processing to detect a reduced surface reference block position exhibiting the minimum SAD value. To do. Based on the detection of the reduced plane reference block position, the reduced plane motion vector MVs is detected.

この例では、動きベクトル検出装置401は、縮小面ターゲットブロック212の大きさ(水平方向の画素数×垂直方向のライン数)のブロックをブロックマッチング処理単位として処理を実行する。   In this example, the motion vector detection apparatus 401 executes processing using a block having the size of the reduction plane target block 212 (the number of pixels in the horizontal direction × the number of lines in the vertical direction) as a block matching processing unit.

縮小面動きベクトルMVsの算出が終了したら、次に、縮小面ターゲットフレーム211をa倍したものに等しい中間面ターゲットフレーム221において、中間面ターゲットブロック222を設定する。   When the calculation of the reduced surface motion vector MVs is completed, the intermediate surface target block 222 is set in the intermediate surface target frame 221 that is equal to the reduced surface target frame 211 multiplied by a.

図19の例では、中間面の動きベクトル検出装置402は、縮小面の動きベクトル検出装置401におけるブロックマッチング処理単位と同じ大きさのブロックを中間面ターゲットブロックとしてブロックマッチング処理を行うようにしている。ここで、同じ大きさのブロックとは、同じピクセル数であって、同じ水平方向の画素数×同じ垂直方向のライン数からなるものである。   In the example of FIG. 19, the intermediate plane motion vector detection device 402 performs block matching processing using a block having the same size as the block matching processing unit in the reduced plane motion vector detection device 401 as an intermediate plane target block. . Here, the blocks of the same size have the same number of pixels and are composed of the same number of pixels in the horizontal direction × the same number of lines in the vertical direction.

この例の場合、縮小面は中間面の1/aであるので、縮小面ターゲットブロック212に対応する中間面ターゲットフレームにおける領域には、中間面ターゲットブロック222が、a個含まれることなる。したがって、その中間面ターゲットブロック222のa個の全てが中間面の動きベクトル検出装置402におけるブロックマッチング処理対象として設定される。   In this example, since the reduction plane is 1 / a of the intermediate plane, a region of the intermediate plane target frame corresponding to the reduction plane target block 212 includes a intermediate plane target blocks 222. Accordingly, all a of the intermediate plane target blocks 222 are set as block matching processing targets in the intermediate plane motion vector detection device 402.

そして、縮小面参照フレーム311をa倍したものに等しい中間面参照フレーム321において、縮小面動きベクトルMVsを中心とした中間面サーチ範囲323を設定する。この中間面サーチ範囲323内の複数個の中間面参照ブロック322について、動きベクトル検出装置402で、上述したブロックマッチング処理を行い、最小SAD値を呈する中間面参照ブロック位置を検出することにより、中間面動きベクトルMVmを検出する。   Then, in the intermediate plane reference frame 321 that is equal to the reduced plane reference frame 311 multiplied by a, an intermediate plane search range 323 centered on the reduced plane motion vector MVs is set. For the plurality of intermediate plane reference blocks 322 in the intermediate plane search range 323, the motion vector detection device 402 performs the above-described block matching process to detect the intermediate plane reference block position exhibiting the minimum SAD value. A surface motion vector MVm is detected.

中間面の動きベクトル検出装置402では、a個の中間面ターゲットブロックのそれぞれについて、中間面サーチ範囲323内に設定したそれぞれの当該中間面ターゲットブロック用のサーチ範囲において、ブロックマッチング処理を実行する。これにより、それぞれの中間面ターゲットブロックについての動きベクトルの検出を行う。そして、それら複数個の動きベクトルのうち、最小のSAD値を呈する動きベクトルを、中間面における動きベクトル(中間面動きベクトル)MVmとして検出する。   The intermediate plane motion vector detection device 402 executes block matching processing for each of the a intermediate plane target blocks in the search range for each intermediate plane target block set in the intermediate plane search range 323. Thereby, the motion vector for each intermediate plane target block is detected. A motion vector exhibiting the minimum SAD value among the plurality of motion vectors is detected as a motion vector (intermediate surface motion vector) MVm on the intermediate surface.

縮小面動きベクトルMVsの算出が終了したら、次に、中間面ターゲットフレーム221をb倍したものに等しい基底面ターゲットフレーム201において、基底面ターゲットブロック202を設定する。   When the calculation of the reduced plane motion vector MVs is completed, the base plane target block 202 is set in the base plane target frame 201 that is equal to the intermediate plane target frame 221 multiplied by b.

図19の例では、基底面の動きベクトル検出装置403も、動きベクトル検出装置401および402と同じ大きさ(同じピクセル数=同じ水平方向の画素数×同じ垂直方向のライン数)のブロックを処理単位ブロックとしてブロックマッチング処理を行うようにしている。   In the example of FIG. 19, the motion vector detection device 403 on the base plane also processes blocks having the same size as the motion vector detection devices 401 and 402 (the same number of pixels = the same number of pixels in the horizontal direction × the same number of lines in the vertical direction). Block matching processing is performed as a unit block.

そして、前述したように、中間面動きベクトルMVmは、処理単位ブロックの単位で得られる。したがって、動きベクトル検出装置403で対象となる基底面ターゲットフレーム201における基底面ターゲットブロック202は、図19において、斜線を付して示すように、縮小面ターゲットブロックと同じ大きさのブロック(処理単位ブロック)のb倍の個数からなるものとして設定される。   As described above, the intermediate plane motion vector MVm is obtained in units of processing unit blocks. Therefore, the basal plane target block 202 in the basal plane target frame 201 that is the target of the motion vector detection device 403 is a block (processing unit) having the same size as the reduced plane target block, as shown by hatching in FIG. B) times the number of blocks).

一方、中間面参照フレーム321をb倍したものに等しい基底面参照フレーム301において、縮小面動きベクトルMVsと中間面動きベクトルMVmとの合成ベクトルを中心とした基底面サーチ範囲303を設定する。当該基底面サーチ範囲303内の複数個の基底面参照ブロック302について、動きベクトル検出装置403で、上述したブロックマッチング処理を行い、最小SAD値を呈する基底面参照ブロック位置を検出することにより、基底面動きベクトルMVbを検出する。   On the other hand, in the base plane reference frame 301 that is equal to the intermediate plane reference frame 321 multiplied by b, a base plane search range 303 centered on the combined vector of the reduced plane motion vector MVs and the intermediate plane motion vector MVm is set. The base vector reference block 302 in the base surface search range 303 is subjected to the above-described block matching processing by the motion vector detection device 403, and the base surface reference block position exhibiting the minimum SAD value is detected, whereby the base A surface motion vector MVb is detected.

縮小面動きベクトルMVsおよび中間面動きベクトルMVmは、同じ大きさの処理単位ブロックの単位で得られる。このため、縮小面動きベクトルMVsと中間面動きベクトルMVmとの合成ベクトルを中心とした設定された基底面サーチ範囲303は、b個の基底面ターゲットブロック202を含む領域よりも若干広い領域とされる。   The reduced surface motion vector MVs and the intermediate surface motion vector MVm are obtained in units of processing unit blocks having the same size. Therefore, the set basal plane search range 303 centered on the combined vector of the reduced plane motion vector MVs and the intermediate plane motion vector MVm is a slightly wider area than the area including the b base plane target blocks 202. The

動きベクトル検出装置403では、b個の基底面ターゲットブロック202について、基底面サーチ範囲303内に設定したそれぞれの基底面ターゲットブロックについてのサーチ範囲において、ブロックマッチング処理を実行する。これにより、それぞれの基底面ターゲットブロックについての動きベクトルの検出を行う。そして、それら複数個の動きベクトルのうち、最小のSAD値を呈する動きベクトルを、基底面における動きベクトル(基底面動きベクトル)MVbとして検出する。   The motion vector detection device 403 executes block matching processing in the search range for each base plane target block set in the base plane search range 303 for the b base plane target blocks 202. Thereby, the motion vector is detected for each basal plane target block. Then, a motion vector exhibiting the minimum SAD value among the plurality of motion vectors is detected as a motion vector (base motion vector) MVb on the base surface.

そして、以上のようにして求められた縮小面動きベクトルMVsと、中間面動きベクトルVMmと、基底面動きベクトルVMbとの合成ベクトルとして、基底面ターゲットフレーム201と基底面参照フレーム301との間における基底面ターゲットブロックについてのローカル動きベクトルLMVが検出される。   Then, as a combined vector of the reduced plane motion vector MVs, the intermediate plane motion vector VMm, and the base plane motion vector VMb obtained as described above, between the base plane target frame 201 and the base plane reference frame 301, A local motion vector LMV for the basal plane target block is detected.

以上のような階層化ブロックマッチング処理を、ターゲットブロックおよび参照ブロックを順次切り替えながら、ターゲットフレームおよび参照フレームの全領域において、実行する。これにより、ターゲットフレーム内に設定した複数個のターゲットブロック単位の複数個のローカル動きベクトルLMVの全てが算出される。   The hierarchical block matching process as described above is executed in the entire region of the target frame and the reference frame while sequentially switching the target block and the reference block. As a result, all of the plurality of local motion vectors LMV of the plurality of target blocks set in the target frame are calculated.

図19の例で、動きベクトル検出装置401,402および403は、実際的には、1つの装置であって、画像メモリ部4から読み出されて入力されるターゲットブロックと、サーチ範囲から読み出される参照ブロックとが異なるのみである。   In the example of FIG. 19, the motion vector detection devices 401, 402 and 403 are actually one device, and are read from the target block read from the image memory unit 4 and the search range. Only the reference block is different.

なお、ターゲットブロックの切り替えは、基底面ターゲットフレーム201において、全ての基底面ターゲットブロック202についてのローカル動きベクトルLMVを得るようにする場合には、次のようにする。すなわち、縮小面において、縮小面ターゲットブロックを、水平方向には、縮小倍率1/aおよび1/bに応じた水平方向の画素数分ずつ、ずらして設定する。また、垂直方向には、縮小倍率1/aおよび1/bに応じた垂直方向のライン数分ずつ、ずらして設定するようにすれば良い。   Note that the target block is switched as follows when local motion vectors LMV for all base plane target blocks 202 are obtained in the base plane target frame 201. That is, on the reduction plane, the reduction plane target block is set to be shifted in the horizontal direction by the number of pixels in the horizontal direction according to the reduction magnifications 1 / a and 1 / b. The vertical direction may be set so as to be shifted by the number of lines in the vertical direction corresponding to the reduction ratios 1 / a and 1 / b.

しかし、グローバルモーションを複数個のローカル動きベクトルLMVから求めるという目的からすると、次のようにしても良い。すなわち、基底面ターゲットフレーム201における飛び飛びの位置の基底面ターゲットブロックについてのローカル動きベクトルLMVを得るように、縮小面ターゲットブロックを、水平方向および垂直方向に、順次にずらして設定するようにしてもよい。   However, for the purpose of obtaining the global motion from a plurality of local motion vectors LMV, the following may be performed. That is, the reduction plane target block may be set to be sequentially shifted in the horizontal direction and the vertical direction so as to obtain the local motion vector LMV for the base plane target block at the jump position in the base plane target frame 201. Good.

なお、上述した階層化ブロックマッチングは、中間面を省略し、縮小面と基底面のみの2階層で行っても良いし、逆に、中間面の階層が複数存在しても構わない。ただし、縮小倍率が大き過ぎて、動被写体と背景が同じ単位ブロックに含まれてしまう場合には、注意が必要である。すなわち、本来は異なる動きベクトルとして検出されるべきものが、1つの動きベクトルとして扱われてしまい、以降の階層ではリカバリが効かないため、縮小倍率の選定は慎重に行われる必要がある。   Note that the above-described hierarchical block matching may be performed in two layers including only the reduced surface and the base surface, omitting the intermediate surface, and conversely, a plurality of intermediate surface layers may exist. However, care should be taken when the reduction ratio is too large and the moving subject and the background are included in the same unit block. That is, what should be detected as a different motion vector is handled as one motion vector, and recovery is not effective in the subsequent layers. Therefore, it is necessary to carefully select a reduction ratio.

[ローカル動きベクトルLMVの信頼性の算出]
比較的ノイズの多い画像がターゲット画像の場合、SAD値がノイズの影響を受け、正しいベクトルが得られないケースが多い。図20は、夜景を撮影したもので、比較的ノイズの多い画像である。この図20の画像に対して、僅かに回転を伴いながら左方向に手ぶれして撮影された画像を参照画像として、両画像間の動きベクトルを図示すると、図21に示すような結果が得られる。この図21は、原画を1/8に縮小した縮小画像における縮小面動きベクトルを描画したものである。
[Calculation of reliability of local motion vector LMV]
When a relatively noisy image is a target image, the SAD value is affected by noise and a correct vector cannot be obtained in many cases. FIG. 20 is a photograph of a night view and is a relatively noisy image. When the motion vector between the two images is illustrated with reference to an image captured by shaking leftward with slight rotation with respect to the image of FIG. 20, the result shown in FIG. 21 is obtained. . FIG. 21 is a drawing of a reduced surface motion vector in a reduced image obtained by reducing the original image to 1/8.

この図21を見て分かるように、特にテクスチャのはっきりしない、夜空の動きベクトルが、全くバラバラの動きとして得られている。階層化ブロックマッチングにおいては、前述の通り、縮小画像の生成の際にはローパスフィルタが施されるため、比較的ノイズ耐性が高いが、この図21に示すように、ノイズの影響を受ける。   As can be seen from FIG. 21, the motion vector of the night sky, in which the texture is not particularly clear, is obtained as a disjoint motion. In the hierarchical block matching, as described above, since a low-pass filter is applied when generating a reduced image, the noise resistance is relatively high, but it is affected by noise as shown in FIG.

基底面のローカル動きベクトルLMVは、縮小面動きベクトルの周辺をサーチして得られるため、縮小面動きベクトルが、正しいものから外れている場合には、リカバリが効かず、ノイズの影響をまともに受け、さらに乱れることになる。   Since the local motion vector LMV of the basal plane is obtained by searching around the reduced plane motion vector, if the reduced plane motion vector deviates from the correct one, the recovery is not effective and the influence of noise is decent. It will be further disturbed.

仮に、ノイズが全く無い撮像画像が対象であった場合でも、テクスチャがはっきりしない画像の場合は、連写撮影時の僅かな外光の変化や露光時間の差違によるグラデーョンの変化の方が大きく、検出された動きベクトルが、正しいものから外れるケースが多い。また、多数の木やビル等の人口建築物には、テクスチャの繰り返しパターンが多いが、そのようなテクスチャの繰り返しパターンの場合でも、検出された動きベクトルが、正しいものから外れ易くなる。   Even if the target is a captured image with no noise, if the image is not clear, the change in the gradation due to the slight change in external light and the difference in exposure time during continuous shooting is larger. In many cases, the detected motion vector deviates from the correct one. In addition, many artificial buildings such as trees and buildings have many texture repeating patterns, but even in the case of such texture repeating patterns, the detected motion vectors are likely to deviate from the correct ones.

こうしたケースを想定して、前述したように、従来から、信頼性の高い動きベクトルのみを用いて、グローバルモーションを算出する試みが行われて来た。例えば、ターゲット画像において、エッジ検出を行い、エッジのはっきりしたブロックの動きベクトルは、信頼性が高いものとする提案がある。また、ターゲット画像のIDCT(Inverse Discreet Cosine Transform)結果のDC成分、AC成分を使って信頼性を算出する提案もなされている。   Assuming such a case, as described above, conventionally, attempts have been made to calculate global motion using only highly reliable motion vectors. For example, there is a proposal that edge detection is performed on a target image and a motion vector of a block with a clear edge is highly reliable. There has also been a proposal for calculating the reliability using the DC component and AC component of the IDCT (Inverse Discreet Cosine Transform) result of the target image.

また、予め、フィルタの一種であるコーナーディテクタを用いて、ターゲット画像上の特徴点を検出し、それらの動きベクトルは信頼性が高いものとする提案もある。さらに、複数の特徴点の位置関係が、参照画像上でも維持されるという前提から、複数点の動きベクトルの組み合わせから信頼性の高い動きベクトルを抽出する手法も、提案されている。   There is also a proposal that feature points on a target image are detected in advance using a corner detector, which is a kind of filter, and their motion vectors are highly reliable. Furthermore, a method for extracting a highly reliable motion vector from a combination of motion vectors at a plurality of points has been proposed on the premise that the positional relationship between a plurality of feature points is maintained even on a reference image.

しかしながら、これらの従来の手法は、いずれも高ノイズの画像を前提としておらず、ノイズが非常に大きいレベルの画像においては、どの手法も破綻してしまうことが明らかである。   However, none of these conventional techniques are premised on high-noise images, and it is clear that any technique fails for images with a very high noise level.

この実施形態では、上記の実情に鑑み、高ノイズ環境の画像においても有効に、動きベクトルの信頼性を評価できる信頼性指標値を得るようにしている。   In this embodiment, in view of the above situation, a reliability index value that can effectively evaluate the reliability of a motion vector is obtained even in an image in a high noise environment.

この実施形態では、ターゲットブロックと参照ブロックとの間の相関値の第1極大値と、第2極大値との差または比を、動きベクトルの信頼性の指標値とする。この実施形態では、ターゲットブロックと参照ブロックとの間の相関値は、SAD値として検出するので、相関値の第1極大値および第2極大値は、SAD値の第1極小値および第2極小値となる。   In this embodiment, the difference or ratio between the first maximum value and the second maximum value of the correlation value between the target block and the reference block is used as an index value for the reliability of the motion vector. In this embodiment, since the correlation value between the target block and the reference block is detected as the SAD value, the first maximum value and the second maximum value of the correlation value are the first minimum value and the second minimum value of the SAD value. Value.

図22は、1つのターゲットブロックについてのSADテーブルにおける各SAD値を、模式的に示した図である。この図22では、サーチ範囲を、画像の水平方向(x方向)と垂直方向(y方向)との2次元で表わし、高さ方向(x方向およびy方向に直交する方向)にSAD値を取って、SADテーブルを3次曲面で表わしている。   FIG. 22 is a diagram schematically showing each SAD value in the SAD table for one target block. In FIG. 22, the search range is represented in two dimensions in the horizontal direction (x direction) and the vertical direction (y direction) of the image, and SAD values are taken in the height direction (directions orthogonal to the x direction and the y direction). The SAD table is represented by a cubic surface.

通常のブロックマッチング処理の場合、動きベクトルを検出するためにはSADテーブルにおけるSAD値の最小値のみが検出対象とされる。このSAD値の最小値は、SADテーブルにおけるSAD値の第1極小値であり、図22においては、点501で示す位置となっている。図22では、動き原点(x=0、y=0)から、この点501で示すSAD値の最小値位置との間のベクトルとして、動きベクトルMVが検出される。   In the case of normal block matching processing, in order to detect a motion vector, only the minimum value of the SAD value in the SAD table is detected. The minimum value of the SAD value is the first minimum value of the SAD value in the SAD table, and is the position indicated by a point 501 in FIG. In FIG. 22, the motion vector MV is detected as a vector between the motion origin (x = 0, y = 0) and the minimum position of the SAD value indicated by this point 501.

ノイズが存在しない理想的な状態を考えれば、サーチ範囲内の複数の参照ブロックとターゲットブロックとの相関値を求めたとき、3次曲面で表わされるSADテーブルは、一様に下に凸となり、SAD値の極小値は、1つのみ存在する状態となる。しかし、実際の撮影状況においては、光量変化や、動き物体の動きなどの影響のほか、種々のノイズのため、3次曲面で表わされるSADテーブルは、一様に下に凸となることは殆どなく、複数個のSAD値の極小値が存在するのが一般的である。   Considering an ideal state where no noise exists, when the correlation value between a plurality of reference blocks and a target block within the search range is obtained, the SAD table represented by the cubic surface is uniformly convex downward, Only one minimum value of the SAD value exists. However, in an actual shooting situation, the SAD table represented by the cubic surface is almost uniformly convex downward due to various noises in addition to the influence of the change in the light amount and the movement of the moving object. In general, there are a plurality of minimum values of the SAD values.

そこで、この実施形態では、SAD値の最小値に等しい第1極小値を呈する参照ブロックの位置に基づいて動きベクトルMVを検出するが、このSAD値の第1極小値を除くSAD値のうちの極小値、すなわち、SAD値の第2極小値を、信頼性の指標を生成するために検出する。図22においては、点501で示す位置が第1極小値を示し、点502で示す位置が第2極小値を示している。   Therefore, in this embodiment, the motion vector MV is detected based on the position of the reference block that exhibits the first minimum value equal to the minimum value of the SAD value. Of the SAD values excluding the first minimum value of the SAD value, The minimum value, i.e., the second minimum value of the SAD value, is detected to generate a reliability index. In FIG. 22, the position indicated by the point 501 indicates the first minimum value, and the position indicated by the point 502 indicates the second minimum value.

ノイズ等の影響が少なければ、SAD値の第1極小値と、SAD値の第2極小値との差は大きく、SAD値の第1極小値、すなわち、SAD値の最小値から検出される動きベクトルMVの信頼性は高くなる。一方、ノイズ等が多い環境においては、SAD値の第1極小値と、SAD値の第2極小値との差が小さく、いずれが動きベクトルMVに正しく対応しているか分からない状況になるので、信頼性が低いことになる。   If the influence of noise or the like is small, the difference between the first minimum value of the SAD value and the second minimum value of the SAD value is large, and the movement detected from the first minimum value of the SAD value, that is, the minimum value of the SAD value. The reliability of the vector MV is increased. On the other hand, in a noisy environment, the difference between the first minimum value of the SAD value and the second minimum value of the SAD value is small, and it is not known which corresponds to the motion vector MV correctly. Reliability will be low.

以上のことから、この実施形態では、SAD値の第1極小値(SAD値の最小値)と、SAD値の第2極小値との差を、検出した動きベクトルの信頼性の指標とする。図22のサーチ範囲を1次元軸上で表わし直したSADテーブルを、図23に示す。この実施形態では、この図23において、第2極小値と第1極小値(SAD値の最小値)との差の値を、動きベクトルMVの指標値Ftとする。   From the above, in this embodiment, the difference between the first minimum value of the SAD value (minimum value of the SAD value) and the second minimum value of the SAD value is used as an index of the reliability of the detected motion vector. FIG. 23 shows a SAD table in which the search range of FIG. 22 is represented on the one-dimensional axis. In this embodiment, in FIG. 23, the difference value between the second minimum value and the first minimum value (minimum value of the SAD value) is set as an index value Ft of the motion vector MV.

なお、SAD値の第1極小値しか得られず、第2極小値が得られない場合には、この実施形態では、SAD値の理論上の最大値またはSADテーブル内のSAD値の最大値を、その動きベクトルMVの信頼性指標値とするようにする。したがって、そのようなブロックの動きベクトルは信頼性の高いものとされるが、このようなブロックは殆ど存在しないので、SAD値の第1極小値しか得られず、第2極小値が得られないようなブロックの動きベクトルは、信頼性の評価から外すようにしても良い。   If only the first minimum value of the SAD value is obtained and the second minimum value is not obtained, in this embodiment, the theoretical maximum value of the SAD value or the maximum value of the SAD value in the SAD table is calculated. The reliability index value of the motion vector MV is set. Therefore, although the motion vector of such a block is considered to be highly reliable, since there are almost no such blocks, only the first minimum value of the SAD value can be obtained, and the second minimum value cannot be obtained. Such block motion vectors may be excluded from the reliability evaluation.

なお、SAD値の第1極小値(SAD値の最小値)と、SAD値の第2極小値との差の代わりに、SAD値の第1極小値(SAD値の最小値)と、SAD値の第2極小値との比を、動きベクトルMVの信頼性の指標値Ftとすることもできる。しかし、以下の説明においては、動きベクトルの信頼性の指標値Ftとしては、SAD値の第1極小値(SAD値の最小値)と、SAD値の第2極小値との差を用いるものとする。   Instead of the difference between the first minimum value of the SAD value (minimum value of the SAD value) and the second minimum value of the SAD value, the first minimum value of the SAD value (minimum value of the SAD value) and the SAD value The ratio with the second minimum value can be used as the reliability index value Ft of the motion vector MV. However, in the following description, the difference between the first minimum value of the SAD value (minimum value of the SAD value) and the second minimum value of the SAD value is used as the motion vector reliability index value Ft. To do.

この実施形態の動きベクトルの信頼性指標によれば、従来のような画像のエッジや特徴などの画像成分を用いるものではなく、ターゲットフレームと参照フレームとの間の相関値のみを用いているので、ノイズに対してロバスト性が高い。すなわち、画像のノイズに影響されること無く、精度の高い動きベクトルの信頼性指標が得られる。   According to the reliability index of the motion vector of this embodiment, since the image component such as the edge and the feature of the image as in the conventional case is not used, only the correlation value between the target frame and the reference frame is used. Robustness against noise. That is, a highly accurate motion vector reliability index can be obtained without being affected by image noise.

また、この実施形態では、相関値の第1極大値(SAD値の第1極小値)と、相関値の第2極大値(SAD値の第2極小値)との差、または、比を用いていることも、この実施形態の動きベクトルの信頼性指標が、ノイズに対してロバスト性が高い理由となっている。   In this embodiment, the difference or ratio between the first maximum value of the correlation value (the first minimum value of the SAD value) and the second maximum value of the correlation value (the second minimum value of the SAD value) is used. This is also why the motion vector reliability index of this embodiment is highly robust to noise.

すなわち、一般に、ノイズレベルが高くなって来ると、正しい動きベクトルであったとしても、そのSAD値は値が上昇してしまう。このため、信頼性の高い動きベクトルを抽出する目的で、動きベクトルの信頼性指標値Ftに対して閾値を設定し、当該閾値との比較処理を行う場合には、その閾値自体もノイズレベルに応じて変化させる必要がある。   That is, generally, when the noise level increases, even if the motion vector is correct, the value of the SAD value increases. For this reason, when a threshold value is set for the motion vector reliability index value Ft for the purpose of extracting a highly reliable motion vector and the comparison process is performed with the threshold value, the threshold value itself is also set to the noise level. It needs to be changed accordingly.

これに対して、この実施形態による動きベクトルの信頼性指標値Ftの場合、ノイズレベルが高くなると、相関値の第1極大値(SAD値の第1極小値)と、相関値の第2極大値(SAD値の第2極小値)の両方が、ノイズレベルに応じて、値が上昇する。このため、相関値の第1極大値(SAD値の第1極小値)と、相関値の第2極大値の差に関しては、ノイズの影響が相殺されることになる。   On the other hand, in the case of the reliability index value Ft of the motion vector according to this embodiment, when the noise level increases, the first maximum value of the correlation value (the first minimum value of the SAD value) and the second maximum value of the correlation value. Both of the values (second minimum values of the SAD values) increase according to the noise level. For this reason, the influence of noise is offset with respect to the difference between the first maximum value of the correlation value (the first minimum value of the SAD value) and the second maximum value of the correlation value.

つまり、ノイズレベルに依らない一定値の閾値処理が可能となる。相関値の第1極大値(SAD値の第1極小値)と、相関値の第2極大値(SAD値の第2極小値)との比を、動きベクトルの信頼性指標値Ftとして用いる場合も同様のことが言える。   That is, it is possible to perform threshold processing of a constant value that does not depend on the noise level. When the ratio between the first maximum value of the correlation value (the first minimum value of the SAD value) and the second maximum value of the correlation value (the second minimum value of the SAD value) is used as the reliability index value Ft of the motion vector The same can be said for.

ところで、ブロックマッチングを行う対象ブロックの画像のコントラストが低い場合、SAD値の第2極小値と、SAD値の最小値の差は縮まる傾向にある。このため、同一フレーム内にコントラストの高い領域と低い領域があるとき、同一の閾値でベクトル信頼性の評価値Ixを評価すると、コントラストの高い領域が優先的に抽出され易い。   By the way, when the contrast of the image of the target block to be subjected to block matching is low, the difference between the second minimum value of the SAD value and the minimum value of the SAD value tends to be reduced. For this reason, when there are a region with high contrast and a region with low contrast in the same frame, if the evaluation value Ix of the vector reliability is evaluated with the same threshold, a region with high contrast is likely to be preferentially extracted.

これは、動きベクトルの信頼性という観点では正しい結果ではあるが、コントラストの低い領域をある程度救済する目的で、この実施形態では、動きベクトルの信頼性の指標値を求める演算式に、コントラストの影響を軽減する項を追加する。すなわち、ターゲットフレームの画像の最大輝度の値と最小輝度の値との差を求め、当該輝度の差を動きベクトルの信頼性の指標値に反映させるようにする。なお、ノイズによる悪影響を避けるため、ターゲットフレームの画像データに対してローパスフィルタを施してから、最大輝度と最小輝度の抽出を行う。   This is a correct result from the viewpoint of motion vector reliability, but for the purpose of relieving a low-contrast region to some extent, in this embodiment, the arithmetic expression for calculating the motion vector reliability index value has an influence of contrast. Add a term to reduce That is, the difference between the maximum luminance value and the minimum luminance value of the image of the target frame is obtained, and the luminance difference is reflected in the motion vector reliability index value. In order to avoid adverse effects due to noise, the maximum luminance and the minimum luminance are extracted after a low-pass filter is applied to the image data of the target frame.

以上のことを踏まえたこの実施形態における動きベクトルの信頼性指標値Ftの算出式は、
Ft=(Btm2SAD−MinSAD)−(MaxTAR−MinTAR)×Co
・・・(式a)
ただし、
Ft;動きベクトルの信頼性指標値
Btm2SAD;SAD値の第2極小値
MinSAD;SAD値の最小値(第1極小値)
MaxTAR;ターゲットブロックの最大輝度値
MinTAR;ターゲットブロックの最小輝度値
Co;重み係数(≦1)
となる。
Based on the above, the calculation formula of the motion vector reliability index value Ft in this embodiment is:
Ft = (Btm2SAD−MinSAD) − (MaxTAR−MinTAR) × Co
... (Formula a)
However,
Ft; motion vector reliability index value Btm2SAD; second minimum value of SAD value MinSAD; minimum value of SAD value (first minimum value)
MaxTAR; maximum luminance value of target block MinTAR; minimum luminance value of target block Co; weight coefficient (≦ 1)
It becomes.

なお、動きベクトル信頼性指標値として、相関値の第1極大値と相関値の第2極大値との比を用いる場合にも、信頼性指標値算出式において、上述の(式a)と全く同様に、コントラストの影響を軽減する項を追加するようにすれば良い。もっとも、動きベクトルの信頼性指標値Ftの算出に当たって、コントラストの影響を軽減する項を追加することは必須ではなく、この項を省略してもよい。   Even when the ratio between the first maximum value of the correlation value and the second maximum value of the correlation value is used as the motion vector reliability index value, the reliability index value calculation formula is completely different from the above (formula a). Similarly, a term that reduces the influence of contrast may be added. However, when calculating the reliability index value Ft of the motion vector, it is not essential to add a term that reduces the influence of contrast, and this term may be omitted.

上述の説明では、基底面動きベクトルMVbについての動きベクトル信頼性指標値のみを求めるようにしたが、縮小面動きベクトルMVsや中間面動きベクトルMVmについても、同様にして、動きベクトル信頼性指標値を求めることができることは、言うまでもない。   In the above description, only the motion vector reliability index value for the basal plane motion vector MVb is obtained, but the motion vector reliability index value is similarly applied to the reduced plane motion vector MVs and the intermediate plane motion vector MVm. Needless to say, you can ask.

[グローバルモーションおよびグローバル動きベクトルGMVの算出]
従来は、上述のような動きベクトルの信頼性指標値はなかったので、ターゲットフレームについて求められた複数個のローカル動きベクトルLMVのすべてを、同じ重みで用いてグローバルモーションを算出するようにしている。これに対して、この実施形態では、上述のようにして、ターゲットフレームについての複数個のローカル動きベクトルLMVのそれぞれの信頼性指標値Ftを得ることができる。
[Calculation of global motion and global motion vector GMV]
Conventionally, since there was no motion vector reliability index value as described above, global motion is calculated using all of the plurality of local motion vectors LMV obtained for the target frame with the same weight. . On the other hand, in this embodiment, the reliability index value Ft of each of the plurality of local motion vectors LMV for the target frame can be obtained as described above.

そこで、求められた複数個のローカル動きベクトルLMVの信頼性指標値Ftを正規化して、例えば0以上、1以下の重み係数を、それぞれのローカル動きベクトルLMVに対して設定することができる。そして、各ローカル動きベクトルLMVは同じ重みではなく、それぞれの重み係数に応じた重みで用いて、グローバルモーションを算出するようにすることができる。すなわち、求められた複数個のローカル動きベクトルLMVの全てを用いてグローバルモーションを算出する収束演算を開始するようにするが、その際に、各ローカル動きベクトルLMVは、信頼性指標値Ftに応じた重み係数に応じた重みを用いるようにする。   Accordingly, the reliability index values Ft of the plurality of obtained local motion vectors LMV are normalized, and for example, a weight coefficient of 0 or more and 1 or less can be set for each local motion vector LMV. Each local motion vector LMV is not used with the same weight, but with a weight corresponding to each weight coefficient, so that the global motion can be calculated. That is, a convergence operation for calculating a global motion is started using all of the obtained plurality of local motion vectors LMV. At this time, each local motion vector LMV is determined according to the reliability index value Ft. The weight corresponding to the weight coefficient is used.

しかし、グローバルモーションの算出演算処理を簡単にして、演算負荷を軽くするため、この実施形態では、ローカル動きベクトルLMVについての重み係数Wを、0と、1に2値化するようにする。   However, in this embodiment, the weight coefficient W for the local motion vector LMV is binarized to 0 and 1 in order to simplify the calculation processing of global motion and reduce the calculation load.

このため、この実施形態では、動きベクトルの信頼性指標値Ftに対する閾値thを設定し、
Ft>thであるときには、W=1
Ft≦thであるときには、W=0
・・・(式b)
なる演算式により、各ローカル動きベクトルLMVについての重み係数Wを、それぞれの動きベクトルの信頼性指標値Ftを用いて算出するようにする。
For this reason, in this embodiment, a threshold th is set for the reliability index value Ft of the motion vector,
When Ft> th, W = 1
W = 0 when Ft ≦ th.
... (Formula b)
The weighting coefficient W for each local motion vector LMV is calculated by using the following formula, using the reliability index value Ft of each motion vector.

すなわち、この実施形態では、動きベクトル信頼性指標値Ftを用いて、複数個のローカル動きベクトルLMVのそれぞれの信頼性を判定し、複数個のローカル動きベクトルLMVから、信頼性の高いローカル動きベクトルLMVのみを抽出する。そして、当該抽出した信頼性の高いローカル動きベクトルLMVのみを用いてグローバルモーションを算出する。   That is, in this embodiment, the reliability of each of the plurality of local motion vectors LMV is determined using the motion vector reliability index value Ft, and the highly reliable local motion vector is determined from the plurality of local motion vectors LMV. Extract only LMV. Then, global motion is calculated using only the extracted local motion vector LMV with high reliability.

この実施形態では、ターゲットフレームにおけるターゲットブロック数が比較的多いことから、この例のように、信頼性の高いローカル動きベクトルLMVのみを抽出する方法であっても精度の良いグローバルモーションの算出が可能である。   In this embodiment, since the number of target blocks in the target frame is relatively large, accurate global motion calculation is possible even with a method that extracts only the reliable local motion vector LMV as in this example. It is.

なお、複数個のローカル動きベクトルLMVから、グローバルモーションを算出する具体的な処理例は、後述する。   A specific processing example for calculating global motion from a plurality of local motion vectors LMV will be described later.

前述の図20のノイズの多い画像については、図21に示したようなローカル動きベクトルが得られることを説明した。この図21の画像上に示したローカル動きベクトルに対して、この実施形態による動きベクトルの信頼性指標値を用いて信頼性の判定をした上で、閾値以上の信頼性が得られたもののみを抽出し、そのブロックと動きベクトルを描画すると、図23のようになる。この図23に示した、これらのブロックについては、ノイズの影響を受けず、ほぼ正しいローカル動きベクトルが得られていると言える。   It has been described that the local motion vector as shown in FIG. 21 is obtained for the noisy image shown in FIG. For the local motion vectors shown on the image of FIG. 21, only those whose reliability equal to or higher than the threshold is obtained after determining the reliability using the reliability index value of the motion vector according to this embodiment. Is extracted, and the block and motion vector are drawn as shown in FIG. It can be said that these blocks shown in FIG. 23 are not affected by noise, and almost correct local motion vectors are obtained.

[動きベクトル算出部15のハードウエア構成例]
動きベクトル算出部15は、上述したように、ターゲットブロック毎のローカル動きベクトルLMVの検出、検出したローカル動きベクトルLMVの信頼性指標値の算出、グローバルモーションGMおよびグローバル動きベクトルGMVの算出、などの処理を行う。
[Hardware Configuration Example of Motion Vector Calculation Unit 15]
As described above, the motion vector calculation unit 15 detects the local motion vector LMV for each target block, calculates the reliability index value of the detected local motion vector LMV, calculates the global motion GM and the global motion vector GMV, etc. Process.

この動きベクトル算出部15のハードウエア構成例を図25に示す。この例では、動きベクトル算出部15は、ターゲットブロック102の画素データを保持するターゲットブロックバッファ部151と、参照ブロック108の画素データを保持する参照ブロックバッファ部152とを備える。   A hardware configuration example of the motion vector calculation unit 15 is shown in FIG. In this example, the motion vector calculation unit 15 includes a target block buffer unit 151 that holds pixel data of the target block 102 and a reference block buffer unit 152 that holds pixel data of the reference block 108.

また、動きベクトル算出部15は、ターゲットブロック102と参照ブロック108とで対応する画素についてのSAD値を計算するマッチング処理部153を備える。また、動きベクトル算出部15は、マッチング処理部153から出力されるSAD値情報からローカル動きベクトルを算出するローカル動きベクトル算出部154を備える。動きベクトル算出部15は、さらに、コントロール部155と、動きベクトル信頼性指標値算出部156と、グローバルモーション算出部157と、グローバル動きベクトル算出部158と、コントラスト算出部159と、背景/動被写体判定部150と、を備える。   In addition, the motion vector calculation unit 15 includes a matching processing unit 153 that calculates SAD values for pixels corresponding to the target block 102 and the reference block 108. In addition, the motion vector calculation unit 15 includes a local motion vector calculation unit 154 that calculates a local motion vector from the SAD value information output from the matching processing unit 153. The motion vector calculation unit 15 further includes a control unit 155, a motion vector reliability index value calculation unit 156, a global motion calculation unit 157, a global motion vector calculation unit 158, a contrast calculation unit 159, and a background / moving subject. A determination unit 150.

コントラスト算出部159は、ローパスフィルタ1591と、最大輝度値検出部1592と、最小輝度値検出部1593とからなる。   The contrast calculation unit 159 includes a low-pass filter 1591, a maximum luminance value detection unit 1592, and a minimum luminance value detection unit 1593.

この例では、図示は省略するが、画像メモリ部4には、原画のターゲットフレームや参照フレームの画像データから生成された、ターゲットフレームおよび参照フレームについての縮小面の画像データおよび中間面の画像データが、記憶保持されている。   In this example, although not shown, the image memory unit 4 stores the reduced plane image data and the intermediate plane image data for the target frame and the reference frame, which are generated from the target frame and reference frame image data of the original picture. Is retained.

コントロール部155は、この動きベクトル算出部15における処理シーケンスを制御するもので、図示のように各部に制御信号を供給するようにする。   The control unit 155 controls the processing sequence in the motion vector calculation unit 15, and supplies a control signal to each unit as shown in the figure.

ターゲットブロックバッファ部151は、このコントロール部155の制御を受けて、画像メモリ部4の縮小面、中間面あるいは基底面のターゲットフレームの画像データから、指示されたターゲットブロックの画像データを読み込んで、マッチング処理部153に供給する。   Under the control of the control unit 155, the target block buffer unit 151 reads the image data of the instructed target block from the image data of the target frame on the reduced surface, intermediate surface, or base surface of the image memory unit 4, This is supplied to the matching processing unit 153.

参照ブロックバッファ部152は、コントロール部155の制御を受けて、画像メモリ部4の縮小面、中間面あるいは基底面の参照フレームの画像データから、指示されたマッチング処理範囲の画像データを読み込む。そして、参照ブロックバッファ部152は、そのマッチング処理範囲の画像データの中から、参照ブロックの画像データを順次にマッチング処理部153に供給するようにする。   Under the control of the control unit 155, the reference block buffer unit 152 reads image data in the designated matching processing range from the image data of the reference frame on the reduced surface, intermediate surface, or base surface of the image memory unit 4. Then, the reference block buffer unit 152 sequentially supplies the image data of the reference block to the matching processing unit 153 from the image data in the matching processing range.

コントロール部155は、1組のターゲットフレームおよび参照フレームについての全てのブロック単位の処理が終了すると、ブロック分割の分割始点を上述のようにずらすように、ターゲットブロックバッファ部151および参照ブロックバッファ部152を制御する。ターゲットブロックバッファ部151および参照ブロックバッファ部152は、コントロール部155の制御に基づいて、ターゲットブロックおよび参照ブロックを、1フレーム前とはずらされた分割始点に基づいて、画像メモリ部4から読み出す。   When the control unit 155 finishes the processing in units of blocks for one set of target frames and reference frames, the target block buffer unit 151 and the reference block buffer unit 152 are configured to shift the division start point of block division as described above. To control. Based on the control of the control unit 155, the target block buffer unit 151 and the reference block buffer unit 152 read the target block and the reference block from the image memory unit 4 based on the division start point shifted from the previous frame.

マッチング処理部153は、ターゲットブロックバッファ部151からのターゲットブロックの画像データと、参照ブロックバッファ部152からの参照ブロックの画像データを受ける。そして、マッチング処理部153は、縮小面、中間面および基底面におけるブロックマッチング処理を、コントロール部155の制御にしたがって行う。そして、マッチング処理部153は、参照ベクトル(参照ブロックの位置情報)と、ブロックマッチング処理結果のSAD値とを、ローカル動きベクトル算出部154に供給する。   The matching processing unit 153 receives the target block image data from the target block buffer unit 151 and the reference block image data from the reference block buffer unit 152. Then, the matching processing unit 153 performs block matching processing on the reduced surface, the intermediate surface, and the base surface according to the control of the control unit 155. Then, the matching processing unit 153 supplies the reference vector (reference block position information) and the SAD value of the block matching processing result to the local motion vector calculation unit 154.

ローカル動きベクトル算出部154は、SAD値の第1極小値保持部1541と、SAD値の第2極小値保持部1542とを備え、マッチング処理部153からのSAD値から、SAD値の第1極小値と、SAD値の第2極小値とを検出する処理を行う。   The local motion vector calculation unit 154 includes a first minimum value holding unit 1541 of the SAD value and a second minimum value holding unit 1542 of the SAD value, and the first minimum of the SAD value is obtained from the SAD value from the matching processing unit 153. A process of detecting the value and the second minimum value of the SAD value is performed.

ローカル動きベクトル算出部154は、SAD値の第1極小値保持部1541のSAD値の第1極小値およびその位置情報(参照ベクトル)と、SAD値の第2極小値保持部1542のSAD値の第2極小値およびその位置情報(参照ベクトル)とを更新してゆく。ローカル動きベクトル算出部154は、この更新処理をマッチング処理範囲の全ての参照ブロックについてのブロックマッチング処理が終了するまで行なう。   The local motion vector calculation unit 154 includes the first minimum value of the SAD value and the position information (reference vector) of the first minimum value holding unit 1541 of the SAD value, and the SAD value of the second minimum value holding unit 1542 of the SAD value. The second minimum value and its position information (reference vector) are updated. The local motion vector calculation unit 154 performs this update processing until the block matching processing for all reference blocks in the matching processing range is completed.

ブロックマッチング処理が終了したときには、SAD値の第1極小値保持部1541には、そのときのターゲットブロックについてのSAD値の第1極小値およびその位置情報(参照ベクトル)が記憶保持される。また、SAD値の第2極小値保持部1542には、SAD値の第2極小値およびその位置情報(参照ベクトル)が、記憶保持される。   When the block matching process is completed, the first minimum value holding unit 1541 of the SAD value stores and holds the first minimum value of the SAD value and the position information (reference vector) for the target block at that time. Further, the second minimum value holding unit 1542 of the SAD value stores and holds the second minimum value of the SAD value and its position information (reference vector).

ローカル動きベクトル算出部154は、マッチング処理範囲の全ての参照ブロックについてのブロックマッチング処理が終了したときに、SAD値の第1極小値保持部1541に保持されている参照ベクトルの情報(位置情報)を、縮小面、中間面および基底面のそれぞれにおける動きベクトルとして検出する。このローカル動きベクトル算出部154の処理動作については、後で詳述する。   The local motion vector calculation unit 154, when the block matching process for all the reference blocks in the matching processing range is completed, information on the reference vector (position information) held in the first minimum value holding unit 1541 of the SAD value Are detected as motion vectors on each of the reduced surface, the intermediate surface, and the base surface. The processing operation of the local motion vector calculation unit 154 will be described in detail later.

このローカル動きベクトル算出部154からは、この実施形態では、縮小面マッチング処理時には、縮小面動きベクトルMVsが、ローカル動きベクトルLMVとしてコントロール部155に供給される。   In this embodiment, the local motion vector calculation unit 154 supplies the reduced surface motion vector MVs to the control unit 155 as the local motion vector LMV during the reduced surface matching process.

階層化ブロックマッチング処理を行なうときには、コントロール部155は、この縮小面動きベクトルMVsの情報から、中間面におけるサーチ範囲を決定する。そして、コントロール部は、ターゲットブロックバッファ部151、参照ブロックバッファ部152およびマッチング処理部153に制御信号を供給して、中間面におけるブロックマッチングを行なうように制御する。   When performing the hierarchical block matching process, the control unit 155 determines the search range on the intermediate plane from the information of the reduced plane motion vector MVs. Then, the control unit supplies control signals to the target block buffer unit 151, the reference block buffer unit 152, and the matching processing unit 153, and controls to perform block matching on the intermediate plane.

中間面のマッチング処理が終了したときには、ローカル動きベクトル算出部154からは、縮小面動きベクトルMVsと中間面動きベクトルMVmとの合成ベクトルの情報が、ローカル動きベクトルLMVとしてコントロール部155に供給される。   When the matching process of the intermediate plane is completed, the local motion vector calculation unit 154 supplies information on the combined vector of the reduced plane motion vector MVs and the intermediate plane motion vector MVm to the control unit 155 as the local motion vector LMV. .

コントロール部155は、この縮小面動きベクトルMVsと中間面動きベクトルMVmとの合成ベクトルの情報から、基底面におけるサーチ範囲を決定する。そして、コントロール部155は、基底面におけるブロックマッチングを行なうように、ターゲットブロックバッファ部151、参照ブロックバッファ部152およびマッチング処理部153に制御信号を供給する。   The control unit 155 determines a search range in the base plane from information on a combined vector of the reduced plane motion vector MVs and the intermediate plane motion vector MVm. Then, the control unit 155 supplies a control signal to the target block buffer unit 151, the reference block buffer unit 152, and the matching processing unit 153 so as to perform block matching on the base surface.

前述もしたように、階層化ブロックマッチングのいずれの階層までを行なって、当該階層での動きベクトルを、ローカル動きベクトルLMVとして出力するかは、コントローラ部155により制御可能である。   As described above, the controller unit 155 can control up to which layer of the hierarchical block matching is performed and the motion vector in the layer is output as the local motion vector LMV.

例えば、精度は犠牲にしても、短時間でローカル動きベクトルLMVを得たい場合には、ローカル動きベクトル算出部154は、縮小面ブロックマッチング処理のみをするようにすればよい。また、高精度のローカル動きベクトルLMVを必要とする場合には、ローカル動きベクトル算出部154は、基底面ブロックマッチング処理までの階層化ブロックマッチング処理をするのがよい。さらに、精度と、時間とを考慮した場合には、ローカル動きベクトル算出部154は、中間面ブロックマッチング処理までの階層化ブロックマッチング処理をした方が良い場合もある。   For example, when it is desired to obtain the local motion vector LMV in a short time without sacrificing accuracy, the local motion vector calculation unit 154 may perform only the reduced surface block matching processing. When a highly accurate local motion vector LMV is required, the local motion vector calculation unit 154 may perform a hierarchical block matching process up to a basal plane block matching process. Furthermore, in consideration of accuracy and time, the local motion vector calculation unit 154 may be better to perform a hierarchical block matching process up to an intermediate plane block matching process.

基底面までの階層化マッチング処理が終了したときには、ローカル動きベクトル算出部154からは、縮小面動きベクトルMVsと中間面動きベクトルMVmと基底面動きベクトルMVbとの合成ベクトルの情報が、ローカル動きベクトルLMVとして得られる。このローカル動きベクトルLMVは、グローバル動きベクトル演算部157に供給される。   When the layered matching processing up to the base plane is completed, the local motion vector calculation unit 154 receives information on the combined vector of the reduced plane motion vector MVs, the intermediate plane motion vector MVm, and the base plane motion vector MVb. Obtained as LMV. The local motion vector LMV is supplied to the global motion vector calculation unit 157.

グローバルモーション算出部157では、受け取ったローカル動きベクトルLMVを、一時保持する。   The global motion calculation unit 157 temporarily stores the received local motion vector LMV.

ローカル動きベクトル算出部154のローカル動きベクトルLMVの算出処理が終了したときには、動きベクトル信頼性指標値算出部156がコントロール部155によりイネーブルとされる。また、ローカル動きベクトル算出部154からは、第1極小値保持部1541のSAD値の最小値MinSADと、第2極小値保持部1542のSAD値の第2極小値Btm2SADとが、動きベクトル信頼性指標値算出部156に供給される。   When the local motion vector calculation unit 154 completes the local motion vector LMV calculation process, the motion vector reliability index value calculation unit 156 is enabled by the control unit 155. Further, from the local motion vector calculation unit 154, the minimum Sin value MinSAD of the first minimum value holding unit 1541 and the second minimum value Btm2SAD of the SAD value of the second minimum value holding unit 1542 are motion vector reliability. The index value calculation unit 156 is supplied.

また、このとき、ターゲットブロックバッファ部151からのターゲットブロックの画像データがローパスフィルタ1591を通じて最大輝度値検出部1592および最小輝度値検出部1593に供給される。そして、最大輝度値検出部1592および最小輝度値検出部1593のそれぞれで検出された最大輝度値MaxTARおよび最小輝度値MinTARが、動きベクトル信頼性指標値算出部156に供給される。   At this time, the image data of the target block from the target block buffer unit 151 is supplied to the maximum luminance value detection unit 1592 and the minimum luminance value detection unit 1593 through the low pass filter 1591. Then, the maximum brightness value MaxTAR and the minimum brightness value MinTAR detected by the maximum brightness value detection unit 1592 and the minimum brightness value detection unit 1593 are supplied to the motion vector reliability index value calculation unit 156.

動きベクトル信頼性指標値算出部156では、これに供給される情報を用いて、前述した(式a)にしたがって、動きベクトルの信頼性指標値Ftを算出する。そして、動きベクトル信頼性指標値算出部156は、算出した動きベクトルの信頼性指標値Ftを、グローバルモーション算出部157に供給する。グローバルモーション算出部157では、そのときに供給されているローカル動きベクトルLMVに対応付けて、入力されてきた動きベクトルの信頼性指標値Ftを、一時保持する。   The motion vector reliability index value calculation unit 156 calculates the reliability index value Ft of the motion vector according to the above-described (formula a) using the information supplied thereto. Then, the motion vector reliability index value calculation unit 156 supplies the calculated motion vector reliability index value Ft to the global motion calculation unit 157. The global motion calculation unit 157 temporarily holds the reliability index value Ft of the input motion vector in association with the local motion vector LMV supplied at that time.

以上の処理が、ターゲットフレームの全てのターゲットブロックについて終了すると、コントロール部155は、グローバルモーション算出部157に、グローバルモーションの算出処理を開始するようにする制御指示信号を供給する。   When the above processing is completed for all target blocks of the target frame, the control unit 155 supplies the global motion calculation unit 157 with a control instruction signal for starting the global motion calculation processing.

この実施形態では、グローバルモーション算出部157は、この制御指示信号を受けて、先ず、保持している複数個のローカル動きベクトルLMVについて、対応して保持されている動きベクトル信頼性指標値Ftを用いて、信頼性の判定を行う。この実施形態では、前述した(式b)により、各ローカル動きベクトルLMVについての重み係数Wを算出する。グローバルモーション算出部157は、重み係数W=1である、信頼性の高いローカル動きベクトルLMVのみを抽出する。   In this embodiment, the global motion calculation unit 157 receives the control instruction signal, and first, for the plurality of local motion vectors LMV held, the corresponding motion vector reliability index value Ft is stored. To determine reliability. In this embodiment, the weight coefficient W for each local motion vector LMV is calculated by the above-described (formula b). The global motion calculation unit 157 extracts only the reliable local motion vector LMV with the weight coefficient W = 1.

そして、抽出した信頼性の高いローカル動きベクトルLMVのみを用いてグローバルモーションGMを算出する演算処理を実行する。そして、グローバルモーション算出部157は、算出したグローバルモーションGMをグローバル動きベクトル算出部158に供給する。   Then, a calculation process for calculating the global motion GM is executed using only the extracted local motion vector LMV with high reliability. Then, the global motion calculation unit 157 supplies the calculated global motion GM to the global motion vector calculation unit 158.

グローバル動きベクトル算出部158は、グローバルモーションGMを、ターゲットブロックの座標位置(例えば中心位置)に適用することにより、そのターゲットブロックのグローバル動きベクトルGMVを算出する。   The global motion vector calculation unit 158 calculates the global motion vector GMV of the target block by applying the global motion GM to the coordinate position (for example, the center position) of the target block.

グローバル動きベクトル算出部158は、算出したグローバル動きベクトルGMVを背景/動被写体判定部150に供給する。背景/動被写体判定部150には、ローカル動きベクトル算出部154からのローカル動きベクトルLMVも供給される。   The global motion vector calculation unit 158 supplies the calculated global motion vector GMV to the background / moving subject determination unit 150. The background / moving subject determination unit 150 is also supplied with the local motion vector LMV from the local motion vector calculation unit 154.

背景/動被写体判定部150では、前述もしたように、ターゲットブロック毎のローカル動きベクトルLMVと、グローバル動きベクトルGMVとを比較して、ターゲットブロックについての両者の一致度、つまり、背景一致度合いを判定する。この場合に、背景/動被写体判定部150では、ローカル動きベクトルLMVおよびグローバル動きベクトルGMVのそれぞれが対応する参照ブロックについての相関値(SAD値)を比較して、背景と動被写体との判定を行う。   As described above, the background / moving subject determination unit 150 compares the local motion vector LMV for each target block with the global motion vector GMV, and determines the degree of coincidence between the target blocks, that is, the degree of background coincidence. judge. In this case, the background / moving subject determination unit 150 compares the correlation values (SAD values) for the reference blocks corresponding to the local motion vector LMV and the global motion vector GMV, and determines the background and the moving subject. Do.

ところで、ローカル動きベクトル算出部154でグローバルモーションを算出するために求めたローカル動きベクトルLMVおよび相関値(SAD値)を、背景/動被写体判定部150における前記の比較用として使用することもできる。   By the way, the local motion vector LMV and the correlation value (SAD value) obtained in order to calculate the global motion by the local motion vector calculation unit 154 can be used for the comparison in the background / moving subject determination unit 150.

しかし、その場合には、ローカル動きベクトル算出部154では、グローバルモーション算出部157やグローバル動きベクトル算出部158での処理時間分だけ、当該ローカル動きベクトルやSAD値を保持しておく必要がある。この場合、特に、保持しておくSAD値は、グローバル動きベクトルGMVが、どの参照ベクトルに対応するものであるかは判っていないので、各ターゲットブロックのそれぞれについてSAD値テーブルの全てを保持しておく必要がある。そのため、これらローカル動きベクトルLMVやSAD値を保持しておくメモリとして、容量が膨大なものが必要となってしまう。   However, in that case, the local motion vector calculation unit 154 needs to hold the local motion vector and the SAD value for the processing time in the global motion calculation unit 157 and the global motion vector calculation unit 158. In this case, in particular, since the SAD value to be held does not know to which reference vector the global motion vector GMV corresponds, the entire SAD value table is held for each target block. It is necessary to keep. For this reason, a memory having a huge capacity is required as a memory for holding these local motion vectors LMV and SAD values.

このことにかんがみ、この実施形態では、ローカル動きベクトル算出部154では、背景/動被写体判定部150における前記比較用のローカル動きベクトルLMVやSAD値は、再計算するようにする。これにより、ローカル動きベクトル算出部154には、ローカル動きベクトルLMVやSAD値を保持しておくメモリは設ける必要はなく、前記メモリの容量の問題は回避できる。   In view of this, in this embodiment, the local motion vector calculation unit 154 recalculates the comparison local motion vector LMV and SAD value in the background / moving subject determination unit 150. Thereby, the local motion vector calculation unit 154 does not need to be provided with a memory for holding the local motion vector LMV and the SAD value, and the problem of the capacity of the memory can be avoided.

したがって、背景/動被写体判定部150は、再算出されたローカル動きベクトルLMVおよびSAD値を用いて、ターゲットブロックについての背景一致度合いを示すヒット率βを求める。グローバル動きベクトルGMVに一致する参照ベクトル(参照ブロック位置)についてのSAD値も、当該再算出時に取得する。そして、背景/動被写体判定部150は、当該再算出されたローカル動きベクトルLMVやSAD値を用いて、ターゲットブロックが、背景部分か、動被写体部分かを判定するようにする。   Therefore, the background / moving subject determination unit 150 uses the recalculated local motion vector LMV and SAD value to obtain a hit rate β indicating the degree of background matching for the target block. The SAD value for the reference vector (reference block position) that matches the global motion vector GMV is also acquired at the time of the recalculation. Then, the background / moving subject determination unit 150 determines whether the target block is a background portion or a moving subject portion using the recalculated local motion vector LMV and SAD value.

背景/動被写体判定部150は、前述したように、ローカル動きベクトルLMVに対応する参照ブロックについてのSAD値と比較すべき、グローバル動きベクトルGMVに対応する参照ブロックについてのSAD値は、画像のノイズ分を反映した値に補正する。   As described above, the background / moving subject determination unit 150 compares the SAD value for the reference block corresponding to the global motion vector GMV with the SAD value for the reference block corresponding to the local motion vector LMV. Correct the value to reflect the minutes.

画像のノイズは、一般に、画像の輝度値に応じたものとなる。そこで、この実施形態では、コントラスト算出部159の最大値輝度値検出部1592からの最大輝度値MaxTARと、最小輝度値系部1593からの最小輝度値MinTARが、背景/動被写体判定部150に供給される。   Image noise generally depends on the luminance value of the image. Therefore, in this embodiment, the maximum luminance value MaxTAR from the maximum value luminance value detection unit 1592 of the contrast calculation unit 159 and the minimum luminance value MinTAR from the minimum luminance value system unit 1593 are supplied to the background / moving subject determination unit 150. Is done.

背景/動被写体判定部150は、最大輝度値MaxTARと、最小輝度値MinTARとの差分として、画像の輝度値を検出し、検出した輝度値に応じて、グローバル動きベクトルGMVに対応する参照ブロックについてのSAD値の補正値を決定する。   The background / moving subject determination unit 150 detects the luminance value of the image as a difference between the maximum luminance value MaxTAR and the minimum luminance value MinTAR, and the reference block corresponding to the global motion vector GMV according to the detected luminance value. The correction value of the SAD value is determined.

そして、背景/動被写体判定部150は、その補正後の相関値と、ローカル動きベクトルに対応する参照ブロックについての相関値とを比較する。そして、グローバル動きベクトルGMVに対応する参照ブロックについてのSAD値の補正値の方が、ローカル動きベクトルに対応する参照ブロックについての相関値よりも小さい(相関値は大きい)かどうか判定する。小さいときには、当該ターゲットブロックは、背景部分と評価判定する。   Then, the background / moving subject determination unit 150 compares the corrected correlation value with the correlation value for the reference block corresponding to the local motion vector. Then, it is determined whether the correction value of the SAD value for the reference block corresponding to the global motion vector GMV is smaller than the correlation value for the reference block corresponding to the local motion vector (the correlation value is large). When the target block is small, the target block is evaluated as a background portion.

背景/動被写体判定部150は、ターゲットブロックが背景部分であると見なせるようなヒット率βのときには、NR処理用動きベクトルMVnrとして、グローバル動きベクトルGMVを出力する。それ以外のときには、背景/動被写体判定部150は、ターゲットブロックに対して、NR処理用動きベクトルMVnrとして、ローカル動きベクトルLMVを出力する。   The background / moving subject determination unit 150 outputs the global motion vector GMV as the NR processing motion vector MVnr when the hit rate β is such that the target block can be regarded as the background portion. In other cases, the background / moving subject determination unit 150 outputs the local motion vector LMV as the NR processing motion vector MVnr to the target block.

前述したように、背景/動被写体判定部150からのNR処理用動きベクトルMVnrは、動き補償画生成部16に供給される。   As described above, the NR processing motion vector MVnr from the background / moving subject determination unit 150 is supplied to the motion compensation image generation unit 16.

動き補償画生成部16では、動きベクトル算出部15を通じて送られてくる参照フレームの画像データREFvに対して、NR処理用動きベクトルMVnrに対応する変形処理が施されて、動き補償画像のデータMCvが生成される。そして、生成された動き補償画像のデータMCvが加算部17に供給される。   In the motion compensation image generation unit 16, the deformation processing corresponding to the motion vector MVnr for NR processing is performed on the image data REFv of the reference frame sent through the motion vector calculation unit 15, and the motion compensation image data MCv. Is generated. Then, the generated motion compensation image data MCv is supplied to the adding unit 17.

また、背景/動被写体判定部150は、求めたヒット率βは、加算率計算部21に供給する。加算率計算部21は、ヒット率βに基づいて、ターゲット画像に対する動き補償画像の加算率αを算出する。   The background / moving subject determination unit 150 supplies the obtained hit rate β to the addition rate calculation unit 21. The addition rate calculation unit 21 calculates the addition rate α of the motion compensated image with respect to the target image based on the hit rate β.

この場合、加算率αは、ブロック単位あるいは画素単位で計算をすることができる。画素単位で計算をする場合であっても、ヒット率βは、ブロック単位であるので、当該ヒット率βが加算率の計算に関与するのは、ブロック単位であるのは言うまでもない。   In this case, the addition rate α can be calculated in units of blocks or pixels. Even when the calculation is performed in units of pixels, the hit rate β is in units of blocks, so it goes without saying that the hit rate β is involved in the calculation of the addition rate in units of blocks.

加算率αをブロック単位に計算する場合には、ヒット率βのみに応じた加算率αを計算することもできる。勿論、ヒット率β以外の他の加算率計算要素を加味して、加算率αを計算することもできる。この実施形態では、ヒット率βのみではなく、後述もするように、ターゲット画像と動き補償画像との画素単位の違い、ターゲット画像のノイズなどの要因を加味して加算率αを計算する。   When the addition rate α is calculated in units of blocks, the addition rate α corresponding to only the hit rate β can be calculated. Of course, the addition rate α can also be calculated by adding other addition rate calculation elements other than the hit rate β. In this embodiment, the addition rate α is calculated not only by the hit rate β but also by taking into account factors such as a difference in pixel units between the target image and the motion compensated image and noise of the target image, as will be described later.

加算率計算部21で求められた加算率αは、加算部17に供給される。加算部17は、これに送られてくるターゲット画像の画像データTGvに対して、動き補償画像の画像データMCvを、加算率αで加算する。   The addition rate α obtained by the addition rate calculation unit 21 is supplied to the addition unit 17. The adding unit 17 adds the image data MCv of the motion compensated image with the addition rate α to the image data TGv of the target image sent thereto.

この実施形態においては、加算部17では、ターゲットブロックの背景一致度合い(ヒット率β)に応じた加算率で、ターゲット画像と動き補償画像とが重ね合わされる。つまり、静止画部分では、ターゲット画像に対する動き補償画像の加算率が高くなり、動被写体部分では、ターゲット画像に対する動き補償画像の加算率が低くなる。   In this embodiment, the adder 17 superimposes the target image and the motion compensated image at an addition rate according to the background matching degree (hit rate β) of the target block. That is, the addition rate of the motion compensation image to the target image is high in the still image portion, and the addition rate of the motion compensation image to the target image is low in the moving subject portion.

こうして、この実施形態では、背景部分と動被写体部分とでは、それぞれに適切な加算率で画像の重ね合わせをすることができる。したがって、画像重ね合わせにより得られたNR画像は、良好なものとなる。   Thus, in this embodiment, the background portion and the moving subject portion can be overlapped with each other at an appropriate addition rate. Therefore, the NR image obtained by image superposition is good.

しかも、この実施形態におけるグローバルモーションおよびグローバル動きベクトルGMVは、信頼性の高いローカル動きベクトルLMVから生成されたものであるので、確度の高い動きベクトルであり、その点でも良好なNR画像を得ることができる。   In addition, since the global motion and the global motion vector GMV in this embodiment are generated from the highly reliable local motion vector LMV, they are highly accurate motion vectors, and a good NR image can also be obtained in that respect. Can do.

[NR画像生成のための全体の処理の流れ]
図26は、画像メモリ4に取り込んだ撮像画像について、NR画像を生成する処理の流れを示すフローチャートである。なお、この図26は、1組のターゲットフレームと参照フレームについての処理について示したものである。
[Flow of overall processing for NR image generation]
FIG. 26 is a flowchart showing a flow of processing for generating an NR image for a captured image taken into the image memory 4. Note that FIG. 26 shows processing for a set of target frames and reference frames.

先ず、動きベクトル算出部15のコントロール部155は、処理をしようとするフレーム画像についての分割始点を、上述した第1の実施形態で説明したようにして、ブロック分割位置が前のフレームでのブロック分割位置と重ならないように決定する(ステップS1)。   First, the control unit 155 of the motion vector calculation unit 15 sets the division start point for the frame image to be processed as described in the first embodiment, and the block division position is the block in the previous frame. It decides so that it may not overlap with a division position (Step S1).

次に、動きベクトル算出部15では、ローカル動きベクトル算出部154でブロックマッチングによるローカル動きベクトルLMVの検出を行なう(ステップS2)。次に、動きベクトル信頼性指標値算出部156は、検出されたローカル動きベクトルLMVについての信頼性の指標値Ftを、ローカル動きベクトル算出部154で算出されたSAD値の第1極小値MinSADと、第2極小値Btm2SADとを用いて算出する(ステップS3)。   Next, in the motion vector calculation unit 15, the local motion vector calculation unit 154 detects the local motion vector LMV by block matching (step S2). Next, the motion vector reliability index value calculation unit 156 uses the reliability index value Ft for the detected local motion vector LMV as the first minimum value MinSAD of the SAD value calculated by the local motion vector calculation unit 154. The second minimum value Btm2SAD is used for calculation (step S3).

次に、グローバルモーション算出部157は、算出された信頼性の指標値Ftに基づいて、信頼性の高いローカル動きベクトルLMVを抽出する。そして、グローバルモーション算出部157は、当該抽出した信頼性の高いローカル動きベクトルLMVのみを用いてグローバルモーションGMを算出する(ステップS4)。   Next, the global motion calculation unit 157 extracts a highly reliable local motion vector LMV based on the calculated reliability index value Ft. Then, the global motion calculation unit 157 calculates the global motion GM using only the extracted local motion vector LMV with high reliability (Step S4).

次に、ステップS3で算出されたグローバルモーションGMを用いて、ターゲットブロック毎のグローバル動きベクトルGMVを算出する(ステップS5)。   Next, a global motion vector GMV for each target block is calculated using the global motion GM calculated in step S3 (step S5).

また、ローカル動きベクトル算出部154で、再ブロックマッチング処理を行なって、ローカル動きベクトルLMVを再検出する(ステップS6)。そして、ローカル動きベクトルLMVが検出された参照ブロック位置(参照ベクトル)におけるSAD値(MinSAD)を保持すると共に、ステップS4で算出されたグローバル動きベクトルGMVに対応する参照ブロックについてのSAD値も保持しておく。なお、このときには、ローカル動きベクトルLMVの信頼性の指標値Ftの算出の必要はない。   Further, the local motion vector calculation unit 154 performs re-block matching processing to re-detect the local motion vector LMV (step S6). The SAD value (MinSAD) at the reference block position (reference vector) where the local motion vector LMV is detected is held, and the SAD value for the reference block corresponding to the global motion vector GMV calculated in step S4 is also held. Keep it. At this time, there is no need to calculate the reliability index value Ft of the local motion vector LMV.

次に、背景/動被写体判定部150は、ステップS6で算出されたローカル動きベクトルLMVと、ステップS5で求められたグローバル動きベクトルGMVとを比較することで、各ターゲットブロックについての背景一致度合いを評価し、ヒット率βを求める。そして、さらに、各ターゲットブロックについてのNR処理用動きベクトルMVnrを定め、動き補償画生成部16に出力する(ステップS7)。   Next, the background / moving subject determination unit 150 compares the local motion vector LMV calculated in step S6 with the global motion vector GMV calculated in step S5, thereby determining the background matching degree for each target block. Evaluate and obtain the hit rate β. Further, an NR processing motion vector MVnr for each target block is determined and output to the motion compensated image generating unit 16 (step S7).

このステップS7でのローカル動きベクトルLMVとグローバル動きベクトルGMVとの比較においては、ローカル動きベクトルLMVに対応する参照ブロックについてのSAD値と、グローバル動きベクトルGMVに対応する参照ブロックのついてのSAD値とを比較する。さらに、グローバル動きベクトルGMVに対応する参照ブロックのついてのSAD値については、上述したように、画像のノイズに応じた補正を加えるようにする。   In the comparison between the local motion vector LMV and the global motion vector GMV in step S7, the SAD value for the reference block corresponding to the local motion vector LMV, the SAD value for the reference block corresponding to the global motion vector GMV, Compare Further, as described above, the SAD value for the reference block corresponding to the global motion vector GMV is corrected according to image noise.

次に、動き補償画生成部16では、ステップS6で定められたNR処理用動きベクトルMVnrを用いて、参照ブロック毎に動き補償画を生成し、加算部17に出力する(ステップS8)。   Next, the motion compensation image generation unit 16 generates a motion compensation image for each reference block using the NR processing motion vector MVnr determined in step S6, and outputs the motion compensation image to the addition unit 17 (step S8).

次に、加算率計算部21は、ステップS7で求められたヒット率βを用いて、上述したようにして、この例では、画素毎の加算率αを算出し、加算部17に供給する(ステップS9)。   Next, as described above, the addition rate calculation unit 21 calculates the addition rate α for each pixel and supplies it to the addition unit 17 as described above using the hit rate β obtained in step S7 ( Step S9).

次に、加算部17は、ターゲット画像に、ステップS7で生成された動き補償画を、ステップS9で算出された加算率αで画素毎に重ね合わせてNR画像を生成する(ステップS10)。以上で、NR画像の処理は終了となる。   Next, the adding unit 17 generates an NR image by superimposing the motion compensation image generated in step S7 on the target image for each pixel at the addition rate α calculated in step S9 (step S10). This completes the processing of the NR image.

なお、この図26は、あるターゲットフレームの1枚についての処理動作を示したものである。3枚以上の複数枚の画像を重ね合わせる場合には、生成したNR画像をターゲットフレームとすると共に、新たに重ね合わせる画像を参照フレームとして、図26の処理を繰り返す。   FIG. 26 shows a processing operation for one target frame. When superposing three or more images, the process of FIG. 26 is repeated with the generated NR image as a target frame and the newly superposed image as a reference frame.

次に、動きベクトル算出部15の主要な各部の詳細な処理動作について、さらに説明する。   Next, detailed processing operations of each main part of the motion vector calculation unit 15 will be further described.

[ローカル動きベクトル算出部154での処理動作]
この実施形態のローカル動きベクトル算出部154では、SAD値についての極小値を検出するため、注目画素(自画素)についての差分値と、当該注目画素の周囲の画素の差分値とを比較するようにする。すなわち、図27において、点線で囲んで示すように、位置Poを判定対象点(画素)として、当該判定対象点位置PoのSAD値と、当該判定対象点位置Poの周囲近傍の8個の画素のSAD値とを比較する。そして、判定対象点の画素のSAD値が、点線で囲んで示す領域の9個のSAD値の中で最小値(ローカルミニマムという)であるか否か判断する。
[Processing Operation in Local Motion Vector Calculation Unit 154]
In the local motion vector calculation unit 154 of this embodiment, in order to detect the minimum value for the SAD value, the difference value for the target pixel (own pixel) is compared with the difference values of the pixels around the target pixel. To. That is, in FIG. 27, as indicated by the dotted line, the position Po is a determination target point (pixel), the SAD value of the determination target point position Po, and the eight pixels near the determination target point position Po. Are compared with the SAD value. Then, it is determined whether or not the SAD value of the pixel of the determination target point is the minimum value (referred to as a local minimum) among the nine SAD values in the area surrounded by the dotted line.

そして、判定対象点のSAD値が、ローカルミニマムであると判断されたときには、それまで保持されていたSAD値の極小値と比較して、保持されていたSAD値の極小値よりも小さいか否か判断する。そして、判定対象点のSAD値が、保持されていたSAD値の極小値よりも小さいと判断されると、保持するSAD値の極小値を、新たに検出されたローカルミニマムのSAD値に更新してゆく。   When it is determined that the SAD value of the determination target point is a local minimum, whether or not it is smaller than the minimum value of the held SAD value compared to the minimum value of the held SAD value. Judge. When it is determined that the SAD value of the determination target point is smaller than the minimum value of the held SAD value, the minimum value of the held SAD value is updated to the newly detected local minimum SAD value. Go.

上述したようなローカルミニマムのSAD値を検出するための構成として、この実施形態では、ローカル動きベクトル算出部154は、SAD値を保持しておくSADテーブルのバッファメモリとして、その規模を小さくするように工夫している。すなわち、参照ブロックを、1ピクセル単位でサーチする場合には、SAD値を保持しておくSADテーブルのバッファメモリとして、図27に示すように、ターゲットブロックの水平方向のサイズの2ライン分+3個分のSAD値の保持が可能なものを用意する。   As a configuration for detecting the SAD value of the local minimum as described above, in this embodiment, the local motion vector calculation unit 154 reduces the scale as a buffer memory of the SAD table that holds the SAD value. It is devised to. That is, when searching the reference block in units of one pixel, as a buffer memory of the SAD table that holds the SAD value, as shown in FIG. Prepare one that can hold the minute SAD value.

図27から分かるように、ターゲットブロックの水平方向のサイズの2ライン分+3個分のSAD値が、バッファメモリに書き込まれると、判定対象点位置Poでのローカルミニマムの判定が可能となる。   As can be seen from FIG. 27, when the SAD values for 2 lines + 3 in the horizontal size of the target block are written in the buffer memory, the local minimum at the determination target point position Po can be determined.

バッファメモリのサイズを最小にするために、ここでは、図27に示すように、極小値評価(ローカルミニマム検出)で使われなくなったSAD値が記憶されていたメモリ位置Paには、新規に入力されるSAD値が上書きされる。すなわち、新規に入力されるSAD値は、順番として図27のメモリ位置Pbに書き込まれるのであるが、このメモリ位置Pbではなく、使われなくなったメモリ位置Paを再利用することで、メモリのハードウエア規模の増大を抑えるようにしている。   In order to minimize the size of the buffer memory, here, as shown in FIG. 27, a new input is made to the memory location Pa where the SAD value that is no longer used in the local minimum evaluation (local minimum detection) is stored. The SAD value is overwritten. That is, the newly input SAD value is written in the memory location Pb in FIG. 27 as an order, but by reusing the memory location Pa that is no longer used instead of this memory location Pb, The increase in the size of the wear is suppressed.

なお、この実施形態では、ローカル動きベクトル算出部154は、ローカルミニマムを検出するためのバッファの他に、前述した第1極小値保持部1541と、第2極小値保持部1542とを備えるものである。   In this embodiment, the local motion vector calculation unit 154 includes the first minimum value holding unit 1541 and the second minimum value holding unit 1542 described above in addition to the buffer for detecting the local minimum. is there.

以上の処理が基本的な処理であり、この基本的な処理を、第1極小値と第2極小値とに適用することにより、SAD値の最小値およびSAD値の第2極小値を検出するようにする。   The above process is a basic process, and the minimum value of the SAD value and the second minimum value of the SAD value are detected by applying this basic process to the first minimum value and the second minimum value. Like that.

この実施形態では、ローカル動きベクトル算出部154では、縮小面と、中間面と、基底面とで、同じ動作をするものであるが、この実施形態では、基底面で、ローカル動きベクトルLMVを検出するようにすると共に、その信頼性指標値を算出するようにする。したがって、SAD値の第2極小値が必要になるのは、この例では、基底面のみでよく、縮小面および中間面では、SAD値の第2極小値の算出保持は、省略するようにしてもよい。   In this embodiment, the local motion vector calculation unit 154 performs the same operation on the reduced surface, the intermediate surface, and the base surface. However, in this embodiment, the local motion vector LMV is detected on the base surface. And the reliability index value is calculated. Accordingly, in this example, the second minimum value of the SAD value is required only in the base surface, and the calculation and holding of the second minimum value of the SAD value is omitted on the reduction surface and the intermediate surface. Also good.

図28は、このローカル動きベクトル算出部154における第1極小値および第2極小値の検出処理動作の流れを示すフローチャートである。   FIG. 28 is a flowchart showing the flow of processing for detecting the first minimum value and the second minimum value in the local motion vector calculation unit 154.

先ず、マッチング処理部153からのSAD値を取り込む(ステップS101)。そして、判定対象点位置PoのSAD値と、その周囲8個のSAD値との比較をする(ステップS102)。その比較の結果、判定対象点位置PoのSAD値は、ローカルミニマムであるか否か判別する(ステップS103)。   First, the SAD value from the matching processing unit 153 is fetched (step S101). Then, the SAD value at the determination target point position Po is compared with the surrounding eight SAD values (step S102). As a result of the comparison, it is determined whether or not the SAD value of the determination target point position Po is a local minimum (step S103).

ステップS103で、判定対象点位置PoのSAD値は、ローカルミニマムではないと判別したときには、ステップS101に戻り、次のSAD値の取り込みを行う。   If it is determined in step S103 that the SAD value at the determination target point position Po is not a local minimum, the process returns to step S101, and the next SAD value is captured.

ステップS103で、判定対象点位置PoのSAD値は、ローカルミニマムであると判別したときには、保持しているSAD値の第1極小値および第2極小値と、判定対象点位置PoのSAD値とを比較する(ステップS104)。   If it is determined in step S103 that the SAD value at the determination target point position Po is a local minimum, the first minimum value and the second minimum value of the held SAD value, the SAD value at the determination target point position Po, and Are compared (step S104).

そして、判定対象点位置PoのSAD値が、保持しているSAD値の第1極小値よりも小さいか否か判別する(ステップS105)。小さいと判別したときには、第1極小値保持部1541に保持しているSAD値を、第2極小値保持部1542に保持するように更新すると共に、判定対象点位置PoのSAD値を第1極小値保持部1541に保持するようにする(ステップS106)。   Then, it is determined whether or not the SAD value at the determination target point position Po is smaller than the first minimum value of the held SAD value (step S105). When it is determined that the SAD value is small, the SAD value held in the first minimum value holding unit 1541 is updated to be held in the second minimum value holding unit 1542, and the SAD value at the determination target point position Po is changed to the first minimum value. The value is held in the value holding unit 1541 (step S106).

そして、ターゲットブロックに対して、全ての参照ブロックとの間のSAD値についての算出処理が完了したか否か判別し(ステップS109)、完了してはいないと判別したときには、ステップS101に戻って、次のSAD値を取り込む。また、ステップS109で、ターゲットブロックに対して、全ての参照ブロックとの間のSAD値についての算出処理が完了したと判別したときには、この処理ルーチンを終了する。   Then, it is determined whether or not the calculation processing for the SAD values for all the reference blocks with respect to the target block has been completed (step S109). When it is determined that the calculation has not been completed, the process returns to step S101. The next SAD value is taken in. If it is determined in step S109 that the calculation processing for the SAD values between all the reference blocks is completed for the target block, this processing routine is terminated.

また、ステップS105で、判定対象点位置PoのSAD値が、保持しているSAD値の第1極小値より大きいと判別したときには、判定対象点位置PoのSAD値が、保持しているSAD値の第2極小値より小さいか否か判別する(ステップS107)。小さいと判別したときには、第2極小値保持部1542に保持するSAD値を、判定対象点位置PoのSAD値に更新するようにする(ステップS108)。   When it is determined in step S105 that the SAD value at the determination target point position Po is larger than the first minimum value of the held SAD value, the SAD value at the determination target point position Po is held at the held SAD value. It is determined whether it is smaller than the second minimum value (step S107). When it is determined that the SAD value is small, the SAD value held in the second minimum value holding unit 1542 is updated to the SAD value of the determination target point position Po (step S108).

そして、ステップS108の次には、ステップS109に進み、ターゲットブロックに対して、全ての参照ブロックとの間のSAD値についての算出処理が完了したか否か判別する。完了してはいないと判別したときには、ステップS101に戻って、次のSAD値を取り込む。また、ステップS109で、ターゲットブロックに対して、全ての参照ブロックとの間のSAD値についての算出処理が完了したと判別したときには、この処理ルーチンを終了する。   Then, after step S108, the process proceeds to step S109, where it is determined whether or not the calculation process for the SAD values between all the reference blocks is completed for the target block. When it is determined that the process has not been completed, the process returns to step S101 to capture the next SAD value. If it is determined in step S109 that the calculation processing for the SAD values between all the reference blocks is completed for the target block, this processing routine is terminated.

また、ステップS107で、判定対象点位置PoのSAD値が、保持しているSAD値の第2極小値より小さくはないと判別したときにもステップS109に進む。そして、このステップS109で、ターゲットブロックに対して、全ての参照ブロックとの間のSAD値についての算出処理が完了したか否か判別する。   The process also proceeds to step S109 when it is determined in step S107 that the SAD value at the determination target point position Po is not smaller than the second minimum value of the held SAD value. In step S109, it is determined whether or not the calculation process for the SAD values between all the reference blocks for the target block has been completed.

ステップS109で、ターゲットブロックに対して、全ての参照ブロックとの間のSAD値についての算出処理が完了してはいないと判別したときには、ステップS101に戻って、次のSAD値を取り込む。また、ステップS109で、ターゲットブロックに対して、全ての参照ブロックとの間のSAD値についての算出処理が完了したと判別したときには、この処理ルーチンを終了する。   In step S109, when it is determined that the calculation processing for the SAD values between all the reference blocks is not completed for the target block, the process returns to step S101 to capture the next SAD value. If it is determined in step S109 that the calculation processing for the SAD values between all the reference blocks is completed for the target block, this processing routine is terminated.

この図28の処理フローチャートは、縮小面、中間面および基底面で同様とすることができる。この場合に、縮小面および中間面では、第1極小値保持部1541に最終的に保持されたSAD値を、SAD値の最小値MinSADとして検出し、それに対応する参照ベクトルを、縮小面動きベクトルMVsおよび中間面動きベクトルMVmとして検出して、出力することができる。   The processing flowchart of FIG. 28 can be the same for the reduction surface, the intermediate surface, and the base surface. In this case, on the reduced surface and the intermediate surface, the SAD value finally held in the first minimum value holding unit 1541 is detected as the minimum value MinSAD of the SAD value, and the corresponding reference vector is used as the reduced surface motion vector. MVs and intermediate plane motion vectors MVm can be detected and output.

また、基底面では、第1極小値保持部1541に最終的に保持されたSAD値を、SAD値の最小値MinSADとして検出し、それに対応する参照ベクトルを、基底面動きベクトルMVbとして検出して出力することができる。また、基底面では、第1極小値保持部1541に最終的に保持されたSAD値(最小値MinSAD)と、第2極小値保持部1542に最終的に保持されたSAD値(SAD値の第2極小値)とを、動きベクトル信頼性指標値算出部156に供給するようにする。   Further, on the base surface, the SAD value finally held in the first minimum value holding unit 1541 is detected as the minimum value MinSAD of the SAD value, and the corresponding reference vector is detected as the base surface motion vector MVb. Can be output. In addition, on the basal plane, the SAD value (minimum value MinSAD) finally held in the first minimum value holding unit 1541 and the SAD value (the first SAD value of the SAD value) finally held in the second minimum value holding unit 1542 2 minimum value) is supplied to the motion vector reliability index value calculation unit 156.

[グローバルモーション算出部157での処理動作]
<拡張したアフィン変換について>
この実施形態では、多数個のローカル動きベクトルLMVから、グローバルモーションを算出(推定)する。そして、算出したグローバルモーションから、グローバル動きベクトルGMVを算出(グローバルモーションを推定)する。この場合において、グローバルモーションをアフィン変換で表現する方法を用いる。
[Processing in Global Motion Calculation Unit 157]
<About expanded affine transformation>
In this embodiment, global motion is calculated (estimated) from a large number of local motion vectors LMV. Then, a global motion vector GMV is calculated (estimated global motion) from the calculated global motion. In this case, a method of expressing global motion by affine transformation is used.

図29に、アフィン変換の一般式を、(式1)として示す。この(式1)において、vは、ターゲットブロックの動きベクトルの水平成分、wはターゲットブロックの動きベクトルの垂直成分を示し、a,b,c,d,e,fは、アフィンパラメータを示している。ここで、通常のアフィン変換では、アフィンパラメータa,b,c,d,e,fは、固定値である。そして、x,yは、ターゲットブロックの中心座標の水平成分、垂直成分を示している。   FIG. 29 shows a general formula of affine transformation as (Formula 1). In this (Formula 1), v represents the horizontal component of the motion vector of the target block, w represents the vertical component of the motion vector of the target block, and a, b, c, d, e, and f represent affine parameters. Yes. Here, in normal affine transformation, the affine parameters a, b, c, d, e, and f are fixed values. X and y indicate the horizontal and vertical components of the center coordinates of the target block.

グローバルモーションの収束演算過程において求められたアフィンパラメータと、各ターゲットブロックの中心の座標から、グローバルモーションに応じた動きベクトル(このベクトルを理想的な動きベクトルと呼ぶ)が得られる。この理想的なベクトルと、観測(ブロックマッチングにより検出)された動きベクトルとの間のエラーの総和εは、図30の(式2)のように表される。   A motion vector corresponding to the global motion (this vector is called an ideal motion vector) is obtained from the affine parameters obtained in the global motion convergence calculation process and the coordinates of the center of each target block. The total error ε between this ideal vector and the observed motion vector (detected by block matching) is expressed as (Equation 2) in FIG.

グローバルモーションを導出するという命題は、上記のエラーの総和εを最小化するアフィンパラメータa〜fの推定であり、これは、例えば、最小自乗法によって解くことが可能である。図31、図32、図33の(式3)、(式4)、(式5)には、アフィンパラメータa〜fの導出過程と、その結果を示す。   The proposition of deriving the global motion is the estimation of the affine parameters a to f that minimize the total error ε described above, and this can be solved by, for example, the least square method. 31, 32, and 33, (Equation 3), (Equation 4), and (Equation 5) show the derivation process of the affine parameters a to f and the results thereof.

このように、アフィン変換のパラメータは比較的容易に算出されるが、その効果は大きい。アフィン変換は、画像の平行移動、回転、拡大縮小の他、ある程度の変形にも対応できるため、大抵の手ブレ即ちカメラワークの微少な補正をカバーする。   Thus, although the affine transformation parameters are relatively easily calculated, the effect is great. Affine transformation can cope with a certain amount of deformation in addition to parallel movement, rotation, and enlargement / reduction of an image, and thus covers most camera shake, that is, slight correction of camera work.

上記のアフィン変換についての先行技術文献としては、特許文献2(特開2005−321902号公報)などがある。   As a prior art document on the above affine transformation, there is Patent Document 2 (Japanese Patent Laid-Open No. 2005-321902).

しかしながら、通常のアフィン変換は、“あおり”に対応できない欠点がある。“あおり”とは、手ブレのピッチ軸(鉛直方向軸)またはヨー軸(鉛直方向に直交する水平方向軸)の回転成分によってもたらされる現象で、正対した矩形平面が、図34に示すように、台形に変形してしまうことから、台形歪みやキーストーンとも呼ばれる。   However, the normal affine transformation has a drawback that it cannot cope with “aori”. The “tilting” is a phenomenon caused by the rotational component of the pitch axis (vertical axis) or the yaw axis (horizontal axis perpendicular to the vertical direction) of camera shake. In addition, it is also called trapezoidal distortion or keystone because it deforms into a trapezoid.

すなわち、図34(A)の下側に示すように、カメラCAMの光軸Lzが、被写体OBJの矩形平面に直交するように、カメラCAMが被写体OBJに正対しているときには、被写体OBJの矩形平面の撮像画像は、図34(A)の上側に示すように、そのまま矩形平面となる。   That is, as shown on the lower side of FIG. 34A, when the camera CAM faces the subject OBJ so that the optical axis Lz of the camera CAM is orthogonal to the rectangular plane of the subject OBJ, the rectangle of the subject OBJ The captured image of the plane is a rectangular plane as it is as shown in the upper side of FIG.

これに対して、例えば図34(B)の下側に示すように、カメラCAMの光軸Lzが、被写体OBJに正対せずに、角度θだけピッチ軸回転(鉛直な面内で回転)した場合には、被写体OBJの矩形平面の撮像画像は、図34(B)の上側に示すように、左右方向(画像の水平方向)の長さが、角度θに応じて線形に変化する台形となる。   On the other hand, for example, as shown on the lower side of FIG. 34B, the optical axis Lz of the camera CAM does not face the object OBJ, but rotates by the pitch axis by the angle θ (rotates in a vertical plane). In this case, the captured image of the rectangular plane of the subject OBJ is a trapezoid whose length in the left-right direction (the horizontal direction of the image) changes linearly according to the angle θ, as shown in the upper side of FIG. It becomes.

なお、図示は省略するが、カメラCAMの光軸Lzが、被写体OBJに正対せずに、角度θだけヨー軸回転(水平面内で回転)した場合には、被写体OBJの矩形平面の撮像画像は、上下方向(画像の垂直方向)の長さが、角度θに応じて線形に変化する台形となる。   Although illustration is omitted, when the optical axis Lz of the camera CAM does not face the subject OBJ and rotates the yaw axis by the angle θ (rotates in the horizontal plane), the captured image of the rectangular plane of the subject OBJ Is a trapezoid whose length in the vertical direction (vertical direction of the image) changes linearly according to the angle θ.

手ブレによって、上述のように撮像されてしまった画像を、元通り正対した形に戻す処理が、“あおり”補正または台形補正であるが、アフィン変換のパラメータではこれを表現できない。すなわち、例えば、図34(B)に示されるような“あおり”台形画像を、長方形に戻す“あおり”補正を考えた場合、鉛直軸(y軸)に沿って上方を水平縮小し、下方を水平拡大すれば良い。ところが、アフィン変換のパラメータのうち、水平拡大縮小に関するパラメータはaであり、このパラメータaが一定値のため、アフィン変換ではこの補正に対応できないのである。   The process of returning the image captured as described above to the original shape by camera shake is “tilting” correction or trapezoidal correction, but this cannot be expressed by affine transformation parameters. That is, for example, when considering the “tilt” correction for returning the “tilt” trapezoidal image as shown in FIG. 34B to the rectangle, the top is horizontally reduced along the vertical axis (y-axis), and the bottom is Just zoom in horizontally. However, of the parameters for affine transformation, the parameter for horizontal enlargement / reduction is a, and since this parameter a is a constant value, affine transformation cannot cope with this correction.

このような問題を回避するため、アフィン変換の代わりに正射影変換を用いることが考えられている。正射影変換は、図35の(式6)で表され、3次元空間における、任意の平面から平面への射影変換を表すことが可能である。   In order to avoid such a problem, it is considered to use orthogonal projection transformation instead of affine transformation. The orthographic transformation is expressed by (Equation 6) in FIG. 35, and can represent a projection transformation from an arbitrary plane to a plane in a three-dimensional space.

しかし、ここで想定するような、多数のベクトルに対して1つのグローバルモーションを特定するようなケースにおいて、正射影変換を適用するのは極めて難しい。図35の(式6)の形状から最小自乗法を用いるのは難しく、他の手法を用いた場合でも、膨大な演算が必要となるからである。   However, it is extremely difficult to apply the orthographic transformation in a case where one global motion is specified for a large number of vectors as assumed here. This is because it is difficult to use the method of least squares from the shape of (Equation 6) in FIG.

現実的な問題として、実際の撮像対象は立体物であるため、観測されたローカル動きベクトルには、互いに距離の異なる被写体が多数含まれる。そうした場合、正射影変換の当てはめは、単なる近似に過ぎないことになる。したがって、正射影変換の一般解を解くために要する膨大なコストを勘案すると、コスト対効果として釣り合わない、とする判断が妥当と言える。   As a practical problem, since the actual imaging target is a three-dimensional object, the observed local motion vector includes a large number of subjects having different distances. In that case, the orthographic transformation fit is just an approximation. Therefore, considering the enormous cost required to solve the general solution of orthographic transformation, it can be said that it is reasonable to judge that the cost effectiveness is not balanced.

より簡易的に正射影変換を適用する場合には、6つのベクトルに対して解を求める方法が採用可能である。求めるべきパラメータが12個あるため、6つのベクトルの座標を代入すれば、6元1次方程式が6本×2組でき、これは、6×6行列の逆行列計算により、比較的容易に解が導き出せるからである。したがって、多数のローカルベクトルから6つのベクトルを、適切に選択できさえすれば良いことになる。   In the case where orthographic projection transformation is applied more simply, a method for obtaining a solution for six vectors can be employed. Since there are 12 parameters to be obtained, if 6 vector coordinates are substituted, 6 × 2 sets of 6-ary linear equations can be obtained, which can be solved relatively easily by inverse matrix calculation of 6 × 6 matrix. It is because it can be derived. Therefore, it is only necessary to appropriately select six vectors from a large number of local vectors.

しかしながら、撮像画像に動被写体が含まれている場合を考慮すると、ローカルベクトルの精度のそれぞれは、それほど期待できないので、多くのローカル動きベクトルの中から、精度の高いベクトルのみを抽出することは困難である。このため、多数のローカル動きベクトルから6つのベクトルを、適切に選択することは非常に困難である。   However, considering the case where the captured image includes a moving subject, each of the local vector accuracy cannot be expected so much, so it is difficult to extract only a highly accurate vector from among many local motion vectors. It is. For this reason, it is very difficult to appropriately select six vectors from a large number of local motion vectors.

この実施形態では、以上の点にかんがみ、画像に“あおり”変形があっても、良好にグローバルモーションを検出することができるようにする手法を用いる。   In this embodiment, in view of the above points, a technique is used that allows a global motion to be detected satisfactorily even if the image has an “aori” deformation.

すなわち、この実施形態では、前述の図29に示した従来の通常のアフィン変換を変形した拡張したアフィン変換(以下、拡張アフィン変換という)を用いる。   That is, in this embodiment, an extended affine transformation (hereinafter referred to as an extended affine transformation) obtained by modifying the conventional normal affine transformation shown in FIG. 29 is used.

図36で実線に示すような“あおり”台形画像を、図36で点線で示す矩形(長方形)に戻す“あおり”補正を考えた場合、図36において、矢印により示すように、鉛直軸(y軸)に沿って、台形画像の上方半分を水平縮小し、下方半分を水平拡大すれば良い。   Considering the “tilt” correction in which the “tilt” trapezoidal image as shown by the solid line in FIG. 36 is returned to the rectangle (rectangle) shown by the dotted line in FIG. 36, the vertical axis (y Along the axis, the upper half of the trapezoidal image may be horizontally reduced and the lower half may be horizontally enlarged.

通常のアフィン変換では、アフィン変換のパラメータa,b,c,d,e,fのうち、水平拡大縮小に関するパラメータはaであり、このパラメータaが一定値のため、通常のアフィン変換では、この“あおり”補正に対応できない。   In the normal affine transformation, among the parameters a, b, c, d, e, and f of the affine transformation, the parameter relating to horizontal enlargement / reduction is a, and since the parameter a is a constant value, in the normal affine transformation, Cannot handle “Aori” correction.

そこで、図36の下側に示すように、パラメータaをy軸に沿って値が変化するように、q0・y+r0と置き換えれば、水平方向の拡大縮小率が、鉛直軸に応じて線形に変化する変換となる。すなわち、パラメータaを、“あおり”補正のために、y軸の変数yの関数に置き換える。ここでは、図36の“あおり”補正のためには、線形な関数、つまり、パラメータaは、一次関数q0・y+r0とすればよいことになる。   Therefore, as shown in the lower side of FIG. 36, if the parameter a is replaced with q0 · y + r0 so that the value changes along the y-axis, the horizontal enlargement / reduction ratio changes linearly according to the vertical axis. Will be converted. That is, the parameter a is replaced with a function of the y-axis variable y for “tilting” correction. Here, in order to correct the “tilt” in FIG. 36, the linear function, that is, the parameter “a” may be a linear function q0 · y + r0.

図36は、前述したピッチ軸の回転に伴う“あおり”の補正を考慮したものであるが、ヨー軸の回転に伴う“あおり”の補正や、ピッチ軸およびヨー軸の両者の回転が合成された“あおり”の補正を考慮する必要がある。   FIG. 36 considers the correction of the “tilt” accompanying the rotation of the pitch axis described above, but the correction of the “tilt” accompanying the rotation of the yaw axis and the rotation of both the pitch axis and the yaw axis are combined. It is necessary to consider the correction of “Aori”.

そこで、この実施形態では、図36を用いて説明した考え方を拡張する。すなわち、アフィン変換を、任意の軸に沿って、その軸と垂直な方向に拡大縮小する形にするには、パラメータa,b,d,eを、図37の(式7)に示すように、それぞれpn・x+qn・y+rn(n=0,1,2,3)と置き換えるようにする。   Therefore, in this embodiment, the idea described with reference to FIG. 36 is extended. That is, in order to expand and reduce the affine transformation along an arbitrary axis in a direction perpendicular to the axis, parameters a, b, d, and e are set as shown in (Expression 7) in FIG. Pn · x + qn · y + rn (n = 0, 1, 2, 3).

ここで、アフィンパラメータa,b,d,eは、画像の変形に関与するパラメータであるのに対して、アフィンパラメータc,fは、画像の左右、上下方向のシフトに関与するパラメータである。よって、アフィンパラメータc,fについては、関数への置き換えはしない。   Here, the affine parameters a, b, d, and e are parameters related to the deformation of the image, whereas the affine parameters c and f are parameters related to the horizontal and vertical shifts of the image. Therefore, the affine parameters c and f are not replaced with functions.

この(式7)のように表すと、計14個のパラメータとなり、拡張アフィン変換は、煩雑性が高いように見えるが、(式7)を展開して整理すれば、結局12個のパラメータを使って、図38の(式8)の形となる。   Expressing this as (Equation 7), there are a total of 14 parameters, and the extended affine transformation seems to be complicated, but if (Equation 7) is expanded and rearranged, 12 parameters are eventually obtained. By using this, the shape of (Equation 8) in FIG. 38 is obtained.

この拡張アフィン変換の式形状であれば、複雑な式にはなるものの、最小自乗法によって、複数のローカル動きベクトルに対する解を、一意に導き出すことが可能である。手法はアフィン変換と同じであるため、最終結果のみを、図39〜図43に、それぞれ(式9〜(式13)として示す。   Although this extended affine transformation formula shape is complex, it is possible to uniquely derive solutions for a plurality of local motion vectors by the method of least squares. Since the method is the same as the affine transformation, only the final result is shown as (Equation 9 to (Equation 13)) in FIGS.

なお、この実施形態では、図37に示したように、画像の変形に関与するアフィンパラメータa,b,d,eの全てを関数に置き換えるようにしたが、画像の変形が特定の方向のみである場合には、その方向に関するパラメータのみを関数に置き換えるようにすればよい。例えば、図36の上方に示した変形のみを考慮する場合には、図36の下側に示すように、パラメータaのみを、関数に置き換えればよい。   In this embodiment, as shown in FIG. 37, all of the affine parameters a, b, d, e involved in the deformation of the image are replaced with functions. However, the deformation of the image is performed only in a specific direction. In some cases, only the parameters related to the direction need to be replaced with a function. For example, when only the deformation shown in the upper part of FIG. 36 is considered, only the parameter a may be replaced with a function as shown in the lower part of FIG.

また、上述の例では、置き換える関数は、線形変位を想定したため、一次関数としたが、曲線的な変位を想定する場合には、2次以上の関数とするようにしてもよい。   In the above example, the replacement function is assumed to be a linear function because a linear displacement is assumed. However, when a curved displacement is assumed, it may be a quadratic or higher function.

<拡張したアフィン変換を用いたグローバルモーションの算出>
不特定多数のベクトルから、最も好適なグローバルモーションを導出する手法として、この実施形態では、図44および図45のフローチャートに示す方法を用いる。この方法は、信頼性の高いブロックの中から、動被写体等の、グローバルモーションに適合しにくいブロックのローカル動きベクトルを徐々に排除しながら、最小自乗法を用いて、グローバルモーションのパラメータの収束を図る方法である。
<Calculation of global motion using expanded affine transformation>
In this embodiment, the method shown in the flowcharts of FIGS. 44 and 45 is used as a method for deriving the most suitable global motion from an unspecified number of vectors. This method uses the least-squares method to converge global motion parameters while gradually eliminating local motion vectors of blocks that are difficult to adapt to global motion, such as moving subjects, from among highly reliable blocks. It is a method to plan.

この図44、図45のフローチャートの処理においては、拡張アフィン変換を導入することにより、ベクトル精度の低い多くのローカル動きベクトルから、動被写体等のエラーベクトルを排除しながら、“あおり”も含めた、最適なグローバルモーションを、現実的な演算コストで導出することが可能となる。   In the processing of the flowcharts of FIGS. 44 and 45, by introducing extended affine transformation, error vectors such as moving subjects are excluded from many local motion vectors with low vector accuracy, and “origin” is also included. Thus, it is possible to derive the optimum global motion at a realistic calculation cost.

ところで、この実施形態の拡張アフィン変換は、変形パラメータが多く、柔軟であるが故に、グローバルモーションの収束演算において、動被写体やノイズ等の誤った動きベクトルにも対応してしまい、これら誤った動きベクトルを排除できない可能性がある。   By the way, since the extended affine transformation of this embodiment has many deformation parameters and is flexible, it corresponds to an erroneous motion vector such as a moving subject or noise in the global motion convergence calculation. The vector may not be excluded.

そのため、この実施形態では、図44,図45に示すように、収束演算ループの初期においては、通常のアフィン変換を用いて誤った動きベクトル(エラーベクトルという)の排除を行い、その後、拡張アフィン変換を用いた収束演算を行なうようにする。これは、通常のアフィン変換を用いることで、あおり成分のベクトルを排除しない程度に、ベクトルエラーが小さくなってから、拡張アフィン変換を用いて、あおり成分にも対応した高精度の収束を試みる手法を用いるようにするためである。   Therefore, in this embodiment, as shown in FIGS. 44 and 45, in the initial stage of the convergence calculation loop, an erroneous motion vector (referred to as an error vector) is eliminated using a normal affine transformation, and then an extended affine is performed. A convergence operation using transformation is performed. This is a method of trying to achieve high-precision convergence using the extended affine transformation after the vector error has been reduced to the extent that the normal affine transformation is not used to eliminate the vector of the tilt component. This is because of using.

また、この実施形態では、収束演算の各回で求められたグローバルモーションGMから求められる動きベクトル(グローバル動きベクトル)と、検出された動きベクトル(上述のローカル動きベクトルLMV)との差としてのベクトルエラーの最大値を検出する。   In this embodiment, a vector error as a difference between a motion vector (global motion vector) obtained from the global motion GM obtained at each round of the convergence calculation and a detected motion vector (the above-described local motion vector LMV). The maximum value of is detected.

そして、検出したベクトルエラーの最大値が、予め定めた閾値よりも大きい場合には、通常のアフィン変換を継続し、検出したベクトルエラーの最大値が、予め定めた閾値以下になったら、拡張アフィン変換を用いる収束演算を行なうようにする。   Then, when the detected maximum value of the vector error is larger than a predetermined threshold value, normal affine transformation is continued, and when the detected maximum value of the vector error becomes equal to or smaller than the predetermined threshold value, the extended affine transformation is performed. A convergence operation using transformation is performed.

図44および図45のフローチャートに沿って説明する。   Description will be made along the flowcharts of FIGS. 44 and 45.

先ず、動きベクトル算出部157は、保持している複数個のローカル動きベクトルLMVについて、それぞれの動きベクトル信頼性指標値Ftと、予め定めた閾値とを比較する。そして、その比較結果から、動きベクトル信頼性指標値Ftが、予め定めた閾値よりも大きい信頼性の高いローカル動きベクトルLMVのターゲットブロック(以下、説明の簡単のためブロックと記載)のみを選定する(ステップS201)。この処理は、前述の(式b)を用いて説明したように、重み係数Wとして、1と0との2値を用いる場合に相当する。   First, the motion vector calculation unit 157 compares each motion vector reliability index value Ft with a predetermined threshold value for a plurality of local motion vectors LMV held. Then, from the comparison result, only the target block of the local motion vector LMV with a high reliability whose motion vector reliability index value Ft is larger than a predetermined threshold (hereinafter referred to as a block for the sake of simplicity) is selected. (Step S201). This process corresponds to the case where binary values 1 and 0 are used as the weighting coefficient W as described above using (Equation b).

次に、動きベクトル算出部157は、収束演算の収束ループが最初の1回目であるか否か判別する(ステップS202)。最初の1回目であると判別したときには、動きベクトル算出部157は、選定した複数のブロックのローカル動きベクトルLMVのみを用いると共に、通常のアフィン変換を用いて、グローバルモーションGMを導出(推定)する(ステップS203)。つまり、グローバルモーションGMについてのアフィンパラメータa〜fを算出する。   Next, the motion vector calculation unit 157 determines whether or not the convergence loop of the convergence calculation is the first time (step S202). When it is determined that this is the first time, the motion vector calculation unit 157 uses only the local motion vectors LMV of the plurality of selected blocks and derives (estimates) the global motion GM using normal affine transformation. (Step S203). That is, the affine parameters a to f for the global motion GM are calculated.

次に、導出したグローバルモーションGMに基づいて、演算に用いた、選定したブロックのそれぞれの理論上のローカル動きベクトルLMVsを計算する(ステップS206)。   Next, based on the derived global motion GM, the theoretical local motion vector LMVs of each of the selected blocks used in the calculation is calculated (step S206).

次に、選定した複数のブロックのそれぞれにおいて、ブロックマッチング処理により求めたローカル動きベクトルLMVと、ステップS206で求めた理論上のローカル動きベクトルLMVsとの誤差Enを計算する(ステップS207)。   Next, in each of the selected plurality of blocks, an error En between the local motion vector LMV obtained by the block matching process and the theoretical local motion vector LMVs obtained in step S206 is calculated (step S207).

このブロックマッチングで求めた動きベクトルと理論上の動きベクトルとの誤差計算は、演算の精度を重視するなら、三平方の定理から正しく距離計算を行えば良い。しかし、演算の精度よりも軽さを重要視するなら、水平及び垂直の両者の距離をそれぞれ求め、それらの和を、近似的な距離として用いても良い。   The error calculation between the motion vector obtained by the block matching and the theoretical motion vector may be performed by correctly calculating the distance from the three-square theorem if the calculation accuracy is important. However, if lightness is more important than calculation accuracy, both horizontal and vertical distances may be obtained and their sum may be used as an approximate distance.

次に、選定した複数のブロックのそれぞれについて求めた誤差Enの全てを用いて、それら全ての誤差の平均値Eaveと、最大値Emaxとを算出する(ステップS208)。そして、平均値Eaveが、それに対して予め定められた閾値θaよりも小さく、且つ、最大値Emaxが、それに対して予め定められた閾値θbよりも小さいか否か判別する(ステップS209)。   Next, using all of the errors En obtained for each of the selected blocks, an average value Eave and a maximum value Emax of all the errors are calculated (step S208). Then, it is determined whether or not the average value Eave is smaller than a predetermined threshold value θa and the maximum value Emax is smaller than a predetermined threshold value θb (step S209).

ステップS209での判別の結果、条件を満足してはいないと判別したときには、ステップS207で求めた各ブロックの誤差Enの中から、誤差En=Emaxとなるブロックを、グローバルモーションを導出する複数のブロックから排除する。または、誤差En≧θbとなるブロックを検出し、検出したブロックの全てを、グローバルモーションGMを導出する複数のブロックから排除する(図45のステップS211)。   As a result of the determination in step S209, when it is determined that the condition is not satisfied, a plurality of blocks for deriving the global motion are determined for the block having the error En = Emax from the error En of each block obtained in step S207. Exclude from the block. Alternatively, a block having an error En ≧ θb is detected, and all of the detected blocks are excluded from a plurality of blocks from which the global motion GM is derived (step S211 in FIG. 45).

次に、ステップS211でのブロック排除の結果、残存するブロックの数が予め定めた数の閾値θcよりも少ないか否か判別する(ステップS212)。ステップS212で、残存するブロックの数が閾値θcよりも少なくはないと判別したときには、ステップS202に戻り、残存するブロックを選定したブロックとして、ステップS202以降の処理を繰り返す。   Next, as a result of block exclusion in step S211, it is determined whether or not the number of remaining blocks is smaller than a predetermined number of threshold values θc (step S212). When it is determined in step S212 that the number of remaining blocks is not less than the threshold value θc, the process returns to step S202, and the processes after step S202 are repeated with the remaining blocks selected.

残存するブロックの数が閾値θcよりも少ないときには、適切なグローバルモーションGMが得られないので、対象となっている参照フレームの画像は、この実施形態の画像の重ね合わせには使用できない。そこで、ステップS212で、残存するブロックの数が閾値θcよりも少ないと判別したときには、当該参照フレームについてのその後の処理を全て行わないようにスキップする(ステップS213)。   When the number of remaining blocks is smaller than the threshold value θc, an appropriate global motion GM cannot be obtained, so that the target reference frame image cannot be used for image superimposition in this embodiment. Therefore, when it is determined in step S212 that the number of remaining blocks is smaller than the threshold value θc, the process skips not to perform all subsequent processing for the reference frame (step S213).

次に、ステップS202で、収束演算の収束ループが最初の1回目ではないと判別したときには、動きベクトル算出部157は、ステップS207で求めた各ブロックの誤差Enの最大値Emaxが、予め定めた閾値θdより大きいか否か判別する(ステップS204)。   Next, when it is determined in step S202 that the convergence loop of the convergence calculation is not the first time, the motion vector calculation unit 157 determines the maximum value Emax of each block error En determined in step S207 in advance. It is determined whether or not it is larger than the threshold value θd (step S204).

ここで、閾値θdは、通常のアフィン変換を用いてグローバルモーションGMの演算を行い、上述のステップS211のようにして、エラーベクトルの排除を行うときに、あおり成分のベクトルを排除しない程度の値に選定される。   Here, the threshold value θd is a value that does not exclude the tilt component vector when the global motion GM is calculated using normal affine transformation and error vectors are eliminated as in step S211 described above. Selected.

ステップS204で、誤差Enの最大値Emaxが、予め定めた閾値θdより大きいと判別したときには、動きベクトル算出部157は、ステップS203に進み、通常のアフィン変換を用いて、グローバルモーションGMを導出するようにする。つまり、拡張アフィン変換のパラメータを算出する。そして、前述したステップS203以降の処理を繰り返す。   When it is determined in step S204 that the maximum value Emax of the error En is larger than the predetermined threshold value θd, the motion vector calculation unit 157 proceeds to step S203 and derives the global motion GM using normal affine transformation. Like that. That is, a parameter for extended affine transformation is calculated. Then, the processes after step S203 described above are repeated.

また、ステップS204で、誤差Enの最大値Emaxが、予め定めた閾値θd以下になった判別したときには、動きベクトル算出部157は、選定した複数のブロックのローカル動きベクトルLMVのみを用いると共に、拡張アフィン変換を用いて、グローバルモーションを導出する(ステップS205)。そして、ステップS205の後は、上述したステップS206以降の処理を繰り返す。   In step S204, when it is determined that the maximum value Emax of the error En is equal to or less than the predetermined threshold θd, the motion vector calculation unit 157 uses only the local motion vectors LMV of the selected plurality of blocks and expands them. Global motion is derived using affine transformation (step S205). Then, after step S205, the processing after step S206 described above is repeated.

そして、図44のステップS206で、誤差Enの平均値Eaveが閾値θaよりも小さく、且つ、誤差Enの最大値Emaxが閾値θbよりも小さいと判別したときには、演算は収束したとして、グローバルモーションGMをそのときのもので確定する(ステップS210)。そして、この処理ルーチンを終了する。   Then, when it is determined in step S206 in FIG. 44 that the average value Eave of the error En is smaller than the threshold value θa and the maximum value Emax of the error En is smaller than the threshold value θb, it is assumed that the calculation has converged and the global motion GM Are determined at that time (step S210). Then, this processing routine ends.

なお、ステップS211で、誤差Enが最大エラーEmaxのブロックのみを排除するか、誤差Enが閾値θb以上のブロックをまとめて排除するかは、グローバル動きベクトルGMVを求める際の収束の早さと精度のバランスで決めれば良い。精度を優先するなら前者の方式を採用し、エラーブロックを1つずつ排除して行けば良く、収束の早さを優先するなら後者を選択しても構わない。   In step S211, whether only blocks with an error En of the maximum error Emax are excluded or blocks with an error En equal to or greater than the threshold value θb are collectively determined according to the speed of convergence and accuracy in obtaining the global motion vector GMV. You can decide by balance. If priority is given to accuracy, the former method may be adopted, and error blocks may be eliminated one by one. If priority is given to the speed of convergence, the latter method may be selected.

なお、上述の例では、ステップS204においては、通常のアフィン変換を用いた演算と、拡張アフィン変換を用いた演算の切り替え判断に、誤差Enの最大値Emaxを用いるようにした。しかし、上記のステップS204での切り替え判断は、誤差Enの最大値Emaxだけでなく、誤差Enの平均値Eaveを考慮しても良い。   In the above-described example, in step S204, the maximum value Emax of the error En is used for determination of switching between the calculation using the normal affine transformation and the calculation using the extended affine transformation. However, the switching determination in step S204 described above may consider not only the maximum value Emax of the error En but also the average value Eave of the error En.

すなわち、ステップS204で、誤差Enの平均値Eaveが予め定められた閾値よりも大きいか否か判別し、平均値Eaveが閾値よりも大きいときには、通常アフィン変換を用いた演算を行う。そして、平均値Eaveが閾値以下になったときには、拡張アフィン変換を用いた演算を開始するようにする。   That is, in step S204, it is determined whether or not the average value Eave of the error En is larger than a predetermined threshold value. When the average value Eave is larger than the threshold value, a calculation using normal affine transformation is performed. Then, when the average value Eave becomes equal to or less than the threshold value, the calculation using the extended affine transformation is started.

また、ステップS204で、誤差Enの最大値Emaxと、平均値Eaveとの両方が、予め定められた閾値よりも大きいか否か判別する。そして、閾値よりも大きいと判別したときには、通常アフィン変換を用いた演算を行い、閾値よりも小さくなったと判別したときには、拡張アフィン変換を用いた演算を開始するようにしてもよい。   In step S204, it is determined whether or not both the maximum value Emax of the error En and the average value Eave are larger than a predetermined threshold value. When it is determined that the value is larger than the threshold value, an operation using normal affine transformation may be performed, and when it is determined that the value is smaller than the threshold value, calculation using extended affine transformation may be started.

なお、手ブレ補正の範囲が、光学ズーム倍率やセット形状から同定できることと同様に、最大手ブレ量からあおり成分の最大値が得られるため、上記の閾値の同定は、比較的容易である。   In addition, since the range of camera shake correction can be identified from the optical zoom magnification and the set shape, the maximum value of the tilt component can be obtained from the maximum amount of camera shake, and therefore the above-described threshold value identification is relatively easy.

グローバル動きベクトル演算部157は、以上のようにして算出したグローバルモーションGMに基づいて、各ターゲットブロック毎のグローバル動きベクトルGMVを算出する。すなわち、算出したグローバルモーションGMについての拡張アフィン変換のパラメータa〜l(図38参照)を用いて、図38の(式8)により、各ターゲットブロック毎の動きベクトル(理論上のローカル動きベクトルLMVsに相当)を求める。図38の(式8)において、x、yは、各ターゲットブロックの中心位置座標が用いられる。この求めた動きベクトルが、各ターゲットブロック毎のグローバル動きベクトルGMVとなる。   The global motion vector calculation unit 157 calculates a global motion vector GMV for each target block based on the global motion GM calculated as described above. That is, using the calculated affine transformation parameters a to l for the global motion GM (see FIG. 38), the motion vector (theoretical local motion vector LMVs) for each target block is obtained by (Equation 8) in FIG. Equivalent). In (Equation 8) in FIG. 38, the center position coordinates of each target block are used for x and y. The obtained motion vector becomes the global motion vector GMV for each target block.

そして、動き補償画生成部16には、上述のようにして求められた、各ターゲットブロック毎のグローバル動きベクトルGMVが供給される。そして、動き補償画生成部16では、その各ターゲットブロック毎のグローバル動きベクトルGMVを用いて、ターゲットブロック毎の動き補償画を生成し、生成したブロック毎の動き補償画を加算部17に供給する。   Then, the global motion vector GMV for each target block obtained as described above is supplied to the motion compensation image generation unit 16. Then, the motion compensation image generation unit 16 generates a motion compensation image for each target block using the global motion vector GMV for each target block, and supplies the generated motion compensation image for each block to the addition unit 17. .

この実施形態において、前述の図20のノイズの多い画像について求めた各ターゲットブロック毎のグローバル動きベクトルを、図46に示す。図46では、各ターゲットブロック毎のグローバル動きベクトルを、白線の矢印で示している。   In this embodiment, the global motion vector for each target block obtained for the noisy image of FIG. 20 is shown in FIG. In FIG. 46, the global motion vector for each target block is indicated by a white line arrow.

[背景/動被写体判定部150の構成例および処理動作]
背景/動被写体判定部150では、上述したように、グローバル動きベクトル算出部158で算出されたグローバル動きベクトルGMVに対応する参照ブロックについてのSAD値を、ローカル動きベクトル算出部154での再ブロックマッチングの際に取得する。
[Configuration Example and Processing Operation of Background / Moving Subject Determination Unit 150]
In the background / moving subject determination unit 150, as described above, the SAD value for the reference block corresponding to the global motion vector GMV calculated by the global motion vector calculation unit 158 is re-block matched by the local motion vector calculation unit 154. Get at the time of.

なお、この再ブロックマッチングにおいては、ブロック分割位置の変更処理は行なわない。   In this re-block matching, the block division position changing process is not performed.

そして、取得したSAD値を、前述したように画像のノイズに応じて補正値により補正するようにする。その補正値による補正の方法としては、この実施形態では、2通りの方法を提供する。   Then, the acquired SAD value is corrected with the correction value according to the noise of the image as described above. In this embodiment, two methods are provided as correction methods using the correction values.

<第1の例;オフセット付加によるSAD値の補正>
図47は、この第1の例の考え方を説明するための図である。図47は、横軸にサーチ範囲を取り、縦軸にSAD値を取ったときの、1個のターゲットブロックについてのSADテーブルの内容(SAD値)を示す図である。横軸の各値は、参照ブロック位置(参照ベクトル)となり、実線がSADテーブルの内容を示すものとなる。これは、図23に示したものと全く同様である。
<First Example: Correction of SAD Value by Adding Offset>
FIG. 47 is a diagram for explaining the idea of the first example. FIG. 47 is a diagram showing the contents (SAD values) of the SAD table for one target block when the horizontal axis represents the search range and the vertical axis represents the SAD value. Each value on the horizontal axis is a reference block position (reference vector), and a solid line indicates the contents of the SAD table. This is exactly the same as that shown in FIG.

この図47において、最小SAD値となる参照ブロックの位置(つまり参照ベクトル)501は、図23と同様に、ブロックマッチングによりローカル動きベクトルLMVとして検出される。一方、グローバル動きベクトルGMVとなる参照ブロックの位置が、図47において、位置503であるとする。   In FIG. 47, the position (that is, the reference vector) 501 of the reference block having the minimum SAD value is detected as a local motion vector LMV by block matching, as in FIG. On the other hand, it is assumed that the position of the reference block serving as the global motion vector GMV is a position 503 in FIG.

このとき、ローカル動きベクトルLMVにおけるSAD値と、グローバル動きベクトルGMVにおけるSAD値とが、画像のノイズ分に応じた差の範囲にあれば、グローバル動きベクトルGMVが、最小SAD値を取る参照ベクトルとなっている可能性がある。   At this time, if the SAD value in the local motion vector LMV and the SAD value in the global motion vector GMV are within a difference range corresponding to the noise amount of the image, the global motion vector GMV is a reference vector that takes the minimum SAD value. It may have become.

つまり、本来はグローバル動きベクトルGMV(参照ブロックの位置)でのSAD値が最小となるべきであったのに、ノイズのために、異なる参照ブロックの位置(これがローカル動きベクトルLMV)を最小として検出されてしまったとすることができる。   In other words, the SAD value in the global motion vector GMV (reference block position) should be minimized, but the position of a different reference block (this is the local motion vector LMV) is detected as the minimum due to noise. It can be said that it has been done.

そこで、この例では、画像のノイズ分に応じたオフセット値OFSを、グローバル動きベクトルGMVでのSAD値に付加して補正する。この例の場合には、オフセット値OFSを、グローバル動きベクトルGMVでのSAD値(SAD_GMVとする)から減算して補正する。すなわち、補正後のSAD値は、MinSAD_Gとすると、
MinSAD_G=SAD_GMV−OFS ・・・ (式c)
となる。
Therefore, in this example, the offset value OFS corresponding to the noise of the image is added to the SAD value in the global motion vector GMV for correction. In this example, the offset value OFS is corrected by subtracting it from the SAD value (referred to as SAD_GMV) in the global motion vector GMV. That is, if the corrected SAD value is MinSAD_G,
MinSAD_G = SAD_GMV-OFS (Formula c)
It becomes.

ここで、このオフセット値OFSは、あまり大きな値を設定すると、動被写体の動きベクトルまで、最小SAD値として判定されるようになってしまう。そこで、この実施形態では、オフセット値OFSは、ローカル動きベクトルの信頼性の指標値Ftについての閾値th(式b参照)よりも小さい値に設定される。   Here, if the offset value OFS is set too large, even the motion vector of the moving subject is determined as the minimum SAD value. Therefore, in this embodiment, the offset value OFS is set to a value smaller than the threshold th (see formula b) for the reliability index value Ft of the local motion vector.

そして、背景/動被写体判定部150では、その補正後SAD値MinSAD_Gと、ローカル動きベクトルLMVでのSAD値(MinSAD)とを比較する。その比較の結果、MinSAD_G<MinSADであれば、当該ターゲットブロックについてのSAD値の最小値は、グローバル動きベクトルGMVに対応する参照ブロックについてのSAD値の補正値であるMinSAD_Gであると評価する。図47は、MinSAD_G<MinSADである場合を示している。   The background / moving subject determination unit 150 compares the corrected SAD value MinSAD_G with the SAD value (MinSAD) in the local motion vector LMV. As a result of the comparison, if MinSAD_G <MinSAD, the minimum value of the SAD value for the target block is evaluated as MinSAD_G, which is a correction value of the SAD value for the reference block corresponding to the global motion vector GMV. FIG. 47 shows a case where MinSAD_G <MinSAD.

すなわち、図47のように、MinSAD_G<MinSADとなる場合は、当該ターゲットブロックについての真のローカル動きベクトルは、グローバル動きベクトルGMVに一致すると判定する。そして、その場合は、当該ターゲットブロックに対する背景一致度合いは高いと評価し、当該ターゲットブロックについてのヒット率βは大きな値とする。そして、当該ターゲットブロックについてのNR処理用動きベクトルは、グローバル動きベクトルGMVとする。   That is, as shown in FIG. 47, when MinSAD_G <MinSAD, it is determined that the true local motion vector for the target block matches the global motion vector GMV. In that case, the background matching degree for the target block is evaluated to be high, and the hit rate β for the target block is set to a large value. The NR processing motion vector for the target block is a global motion vector GMV.

ここで、この実施形態では、ヒット率βは、0≦β≦1の範囲の値とされる。ローカル動きベクトルLMVと、グローバル動きベクトルGMVとが全く一致したときには、ヒット率βは、β=1とすることができる。しかし、この例では、ローカル動きベクトルLMVと、グローバル動きベクトルGMVとが全く一致しているかどうかの評価は行なわず、補正後SAD値MinSAD_Gと、ローカル動きベクトルLMVでのSAD値(MinSAD)との比較で評価する。したがって、評価結果には、ローカル動きベクトルLMVと、グローバル動きベクトルGMVとが全く一致する場合も含まれるが、不一致の場合も含まれる。   Here, in this embodiment, the hit rate β is set to a value in the range of 0 ≦ β ≦ 1. When the local motion vector LMV completely matches the global motion vector GMV, the hit rate β can be set to β = 1. However, in this example, it is not evaluated whether the local motion vector LMV and the global motion vector GMV coincide with each other, and the corrected SAD value MinSAD_G and the SAD value (MinSAD) in the local motion vector LMV are Evaluate by comparison. Therefore, the evaluation result includes a case where the local motion vector LMV and the global motion vector GMV completely match, but also includes a case where they do not match.

そして、後述もするように、この実施形態では、MinSAD_G<MinSADであれば、ヒット率βは、例えばβ=0.75とする。ここで、β=1としなかったのは、上述のように、前記比較結果には、ローカル動きベクトルLMVとグローバル動きベクトルGMVとが不一致の場合が含まれるからである。   As will be described later, in this embodiment, if MinSAD_G <MinSAD, the hit rate β is set to β = 0.75, for example. Here, β is not set to 1 because, as described above, the comparison result includes a case where the local motion vector LMV and the global motion vector GMV do not match.

図48に、この第1の例の場合の背景/動被写体判定部150の構成例(機能ブロック図)を、その周辺部と共に示す。   FIG. 48 shows a configuration example (functional block diagram) of the background / moving subject determination unit 150 in the case of the first example, along with its peripheral parts.

図48の例においては、背景/動被写体判定部150は、SAD_GMV検出部1501と、オフセット減算部1502と、オフセット生成部1503と、比較判定部1504とを備えて構成される。   In the example of FIG. 48, the background / moving subject determination unit 150 includes a SAD_GMV detection unit 1501, an offset subtraction unit 1502, an offset generation unit 1503, and a comparison determination unit 1504.

この例の場合、マッチング処理部153からの再ブロックマッチング時に算出されたSAD値および各参照ブロックの位置情報(参照ベクトルの情報)が、ローカル動きベクトル算出部154に供給される。ローカル動きベクトル算出部154は、再ブロックマッチング時の最小SAD値MinSADを検出し、ローカル動きベクトルLMV(参照ブロックの位置情報(参照ベクトルの情報))を算出する。そして、ローカル動きベクトル算出部154は、再ブロックマッチング処理の結果、得られたローカル動きベクトルLMVと、最小SAD値MinSADとを比較判定部1504に供給する。   In this example, the SAD value calculated at the time of re-block matching from the matching processing unit 153 and the position information (reference vector information) of each reference block are supplied to the local motion vector calculation unit 154. The local motion vector calculation unit 154 detects the minimum SAD value MinSAD at the time of re-block matching, and calculates a local motion vector LMV (reference block position information (reference vector information)). Then, the local motion vector calculation unit 154 supplies the local motion vector LMV obtained as a result of the re-block matching process and the minimum SAD value MinSAD to the comparison determination unit 1504.

マッチング処理部153からの再ブロックマッチング時に算出されたSAD値および各参照ブロックの位置情報(参照ベクトルの情報)は、SAD_GMV検出部1501にも供給される。SAD_GMV検出部1501は、グローバル動きベクトルGMVに一致する参照ベクトルの参照ブロックについてのSAD値SAD_GMVを検出し、検出したSAD値SAD_GMVをオフセット減算部1502に供給する。   The SAD value and the position information (reference vector information) of each reference block calculated at the time of re-block matching from the matching processing unit 153 are also supplied to the SAD_GMV detection unit 1501. The SAD_GMV detection unit 1501 detects the SAD value SAD_GMV for the reference block of the reference vector that matches the global motion vector GMV, and supplies the detected SAD value SAD_GMV to the offset subtraction unit 1502.

オフセット減算部1502では、オフセット生成部1503からのオフセット値OFSを、SAD_GMV検出部1501からのSAD値SAD_GMVから減算して、補正後SAD値MinSAD_Gを生成する。そして、オフセット減算部1502は、生成した補正後SAD値MinSAD_Gを比較判定部1504に供給する。   The offset subtraction unit 1502 subtracts the offset value OFS from the offset generation unit 1503 from the SAD value SAD_GMV from the SAD_GMV detection unit 1501 to generate a corrected SAD value MinSAD_G. Then, the offset subtraction unit 1502 supplies the generated corrected SAD value MinSAD_G to the comparison determination unit 1504.

オフセット生成部1503は、画像のノイズに応じたオフセット値OFSを生成して、オフセット減算部1502に供給する。画像のノイズは、画像の輝度値に応じたものとなることにかんがみ、この例では、種々の輝度値とオフセット値OFSとの対応テーブルの情報がオフセット生成部1503に記憶されている。   The offset generation unit 1503 generates an offset value OFS according to the image noise and supplies the offset value OFS to the offset subtraction unit 1502. In view of the fact that the image noise depends on the luminance value of the image, in this example, information of the correspondence table between various luminance values and the offset value OFS is stored in the offset generation unit 1503.

オフセット生成部1503は、最大輝度値検出部1592からの最大輝度値MaxTARと最小輝度値検出部1593からの最小輝度値MinTARとの差としてターゲットブロックの輝度値を算出する。そして、オフセット生成部1503は、算出したターゲットブロックの輝度値を引数として、前記対応テーブルを検索し、前記引数の輝度値に対応するオフセット値OFSを取得するようにする。   The offset generation unit 1503 calculates the luminance value of the target block as a difference between the maximum luminance value MaxTAR from the maximum luminance value detection unit 1592 and the minimum luminance value MinTAR from the minimum luminance value detection unit 1593. Then, the offset generation unit 1503 searches the correspondence table using the calculated luminance value of the target block as an argument, and acquires an offset value OFS corresponding to the luminance value of the argument.

比較判定部1504は、前述したように、ローカル動きベクトルLMVに対応する最小SAD値MinSADと、オフセット減算部1502からの補正後SAD値MinSAD_Gとを比較し、その比較結果に応じて、ヒット率βを生成して、出力する。   As described above, the comparison determination unit 1504 compares the minimum SAD value MinSAD corresponding to the local motion vector LMV with the corrected SAD value MinSAD_G from the offset subtraction unit 1502, and according to the comparison result, the hit rate β Is generated and output.

また、比較判定部1504には、ローカル動きベクトル算出部154からの再算出されたローカル動きベクトルLMVと、グローバル動きベクトル算出部158からのグローバル動きベクトルGMVも供給される。   The comparison determination unit 1504 is also supplied with the recalculated local motion vector LMV from the local motion vector calculation unit 154 and the global motion vector GMV from the global motion vector calculation unit 158.

そして、比較判定部1504は、MinSAD_G<MinSADである場合には、背景一致度合いが高いので、グローバル動きベクトルGMVをNR処理用ベクトルMVnrとして、動き補償画生成部16に出力する。また、比較判定部1504は、MinSAD_G<MinSADでないときには、背景一致度合いが低いので、ローカル動きベクトルLMVをNR処理用ベクトルMVnrとして、動き補償画生成部16に出力する。   When MinSAD_G <MinSAD, the comparison determination unit 1504 outputs the global motion vector GMV as the NR processing vector MVnr to the motion compensation image generation unit 16 because the degree of background matching is high. When MinSAD_G <MinSAD is not satisfied, the comparison determination unit 1504 outputs the local motion vector LMV as the NR processing vector MVnr to the motion compensation image generation unit 16 because the degree of background matching is low.

なお、グローバル動きベクトルGMVのSAD値検出部1501およびオフセット減算部1502は、ローカル動きベクトル算出部154に含まれるように構成しても良い。その場合には、ローカル動きベクトル算出部154は、再ブロックマッチングを行いながら、グローバル動きベクトルGMVに対応する参照ブロックについてのSAD値SAD_GMVを検出し、オフセットOFSの減算演算を行なうようにする。   Note that the SAD value detection unit 1501 and the offset subtraction unit 1502 of the global motion vector GMV may be configured to be included in the local motion vector calculation unit 154. In that case, the local motion vector calculation unit 154 detects the SAD value SAD_GMV for the reference block corresponding to the global motion vector GMV while performing re-block matching, and performs the subtraction operation of the offset OFS.

<背景/動被写体判定処理の流れ>
図48の構成によるローカル動きベクトル算出部154での再ブロックマッチング処理および背景/動被写体判定部150での背景一致度合い評価処理の流れを、図49および図50のフローチャートを参照して更に説明する。この図49および図50の処理は、コントロール部155の制御に基づいて、各部が実行する。なお、この図49および図50の例は、SAD_GMV検出部1501およびオフセット減算部1502は、ローカル動きベクトル算出部154に含まれるように構成されている場合である。
<Flow of background / moving subject determination processing>
The re-block matching process in the local motion vector calculation unit 154 and the background matching degree evaluation process in the background / moving subject determination unit 150 configured as shown in FIG. 48 will be further described with reference to the flowcharts in FIGS. 49 and 50. . 49 and 50 are executed by each unit based on the control of the control unit 155. 49 and FIG. 50 is a case where the SAD_GMV detection unit 1501 and the offset subtraction unit 1502 are configured to be included in the local motion vector calculation unit 154.

先ず、コントロール部155の制御により、再ブロックマッチングが開始され、ターゲットブロックバッファ部151に最初のターゲットブロックが設定される(ステップS301)。次に、コントロール部155の制御により、参照ブロックバッファ152にバッファリングされているマッチング処理範囲の参照フレームの画像データのうちから、ブロックマッチング処理する参照ブロックが設定される(ステップS302)。   First, re-block matching is started under the control of the control unit 155, and the first target block is set in the target block buffer unit 151 (step S301). Next, under the control of the control unit 155, a reference block for block matching processing is set from the image data of the reference frame in the matching processing range buffered in the reference block buffer 152 (step S302).

マッチング処理部153は、設定されたターゲットブロックと、設定された参照ブロックとについてブロックマッチング処理を行い、SAD値を計算する。そして、マッチング処理部153は、求めたSAD値を、参照ブロックの位置情報(参照ベクトル)と共に、ローカル動きベクトル算出部154に供給する(ステップS303)。   The matching processing unit 153 performs block matching processing on the set target block and the set reference block, and calculates an SAD value. Then, the matching processing unit 153 supplies the obtained SAD value to the local motion vector calculation unit 154 together with the position information (reference vector) of the reference block (step S303).

ローカル動きベクトル算出部154は、参照ベクトルがグローバル動きベクトルGMVと一致しているか否か判別する(ステップS304)。これは、SAD_GMV検出部1501の処理動作に相当する。   The local motion vector calculation unit 154 determines whether or not the reference vector matches the global motion vector GMV (step S304). This corresponds to the processing operation of the SAD_GMV detection unit 1501.

ステップS304で、参照ベクトルがグローバル動きベクトルGMVとは一致していないと判別したときには、ローカル動きベクトル算出部154では、最小SAD値MinSADと、その参照ブロック位置(参照ベクトル)との更新処理を行なう(ステップS305)。つまり、それまでに保持されている最小SAD値MinSADと、新たに算出したSAD値とを比較して、小さい方のSAD値を最小SAD値MinSADとして保持すると共に、参照ブロック位置(参照ベクトル)も最小SAD値を呈するものに更新する。   If it is determined in step S304 that the reference vector does not match the global motion vector GMV, the local motion vector calculation unit 154 performs an update process on the minimum SAD value MinSAD and its reference block position (reference vector). (Step S305). That is, the minimum SAD value MinSAD held so far is compared with the newly calculated SAD value, the smaller SAD value is held as the minimum SAD value MinSAD, and the reference block position (reference vector) is also set. Update to the one that exhibits the minimum SAD value.

次に、コントロール部155は、サーチ範囲内の全ての参照ブロックついてのターゲットブロックとのブロックマッチングが終了したか否か判別する(ステップS308)。   Next, the control unit 155 determines whether or not block matching with the target block for all reference blocks within the search range has been completed (step S308).

そして、ステップS308で、サーチ範囲内の全ての参照ブロックついての処理が終了してはいないと判別したときには、コントロール部155は、次の参照ブロックを設定する(ステップS309)。そして、ステップS302に戻り、上述したこのステップS302以降の処理を繰り返す。   If it is determined in step S308 that the processing for all reference blocks in the search range has not been completed, the control unit 155 sets the next reference block (step S309). And it returns to step S302 and repeats the process after this step S302 mentioned above.

また、ステップS304で、参照ベクトルがグローバル動きベクトルGMVと一致したと判別したときには、ローカル動きベクトル算出部154では、そのSAD値SAD_GMVからオフセット値OFSを減算する(ステップS306)。そして、その減算結果を補正後SAD値MinSAD_Gとして、その参照ブロック位置(参照ベクトル=グローバル動きベクトルGMV)とを保持する(ステップS307)。   When it is determined in step S304 that the reference vector matches the global motion vector GMV, the local motion vector calculation unit 154 subtracts the offset value OFS from the SAD value SAD_GMV (step S306). Then, the subtraction result is used as the corrected SAD value MinSAD_G and the reference block position (reference vector = global motion vector GMV) is held (step S307).

そして、ステップS308に進み、サーチ範囲内の全ての参照ブロックついての処理が終了したか否か判別する。   Then, the process proceeds to step S308, where it is determined whether or not the processing for all reference blocks within the search range has been completed.

そして、ステップS308で、サーチ範囲内の全ての参照ブロックついての処理が終了したと判別したときには、ローカル動きベクトル算出部154は、ローカル動きベクトルLMVと、最小SAD値MinSADを検出し、比較判定部1504に供給する。また、ローカル動きベクトル算出部154は、補正後SAD値MinSAD_Gも、比較判定部1504に供給する(図50のステップS311)。   If it is determined in step S308 that the processing for all reference blocks within the search range has been completed, the local motion vector calculation unit 154 detects the local motion vector LMV and the minimum SAD value MinSAD, and compares and determines 1504 is supplied. The local motion vector calculation unit 154 also supplies the corrected SAD value MinSAD_G to the comparison determination unit 1504 (step S311 in FIG. 50).

そして、背景/動被写体判定部150の比較判定部1504は、最小SAD値MinSADが、予め定められている閾値TH1より小さいか否か判別する(ステップS312)。このステップS312の処理は、次のような問題に対処するために設けられている。   Then, the comparison / determination unit 1504 of the background / moving subject determination unit 150 determines whether or not the minimum SAD value MinSAD is smaller than a predetermined threshold value TH1 (step S312). The processing in step S312 is provided to cope with the following problem.

すなわち、例えばターゲット画像上の動被写体部分に相当するブロックが、参照画像上では動きにより消失したり、大きな変形を伴ったりした場合に、サーチ範囲内のどの参照ブロックともターゲットブロックについてのマッチングが取れない状況が生じる。   That is, for example, when a block corresponding to a moving subject portion on the target image disappears due to movement on the reference image or is accompanied by a large deformation, any reference block in the search range can be matched with the target block. No situation arises.

このような場合、SADテーブルのSAD値は、大きな値で、同様の値となって、最小SAD値MinSADと他の値が近い値となってしまう。このような状況では、グローバル動きベクトルGMVに一致する参照ベクトルでのSAD値からオフセット値OFSを減算した補正後SAD値MinSAD_Gは、必ず、最小SAD値MinSADよりも小さくなり、背景部分と誤検出されることになるおそれがある。   In such a case, the SAD value in the SAD table is a large value and the same value, and the minimum SAD value MinSAD and other values are close to each other. In such a situation, the corrected SAD value MinSAD_G obtained by subtracting the offset value OFS from the SAD value at the reference vector that matches the global motion vector GMV is always smaller than the minimum SAD value MinSAD, and is erroneously detected as a background portion. There is a risk that

そこで、この問題を回避するため、この実施形態では、グローバル動きベクトルGMVに一致する参照ベクトルでのSAD値を補正して、背景一致度合いを判定する処理は、最小SAD値MinSADが、前記閾値TH1より大きい場合には、行わないようにする。   Therefore, in order to avoid this problem, in the present embodiment, the process of determining the background matching degree by correcting the SAD value in the reference vector that matches the global motion vector GMV is the minimum SAD value MinSAD is the threshold TH1. If it is larger, do not do it.

したがって、ステップS312で、最小SAD値MinSADが、前記閾値TH1より大きいと判別したときには、比較判定部1504は、グローバル動きベクトルGMVを用いた背景一致度合いの判定を行わず、ヒット率β=0.25とする(ステップS313)。β=0としないのは、閾値TH1より大きいSAD値を呈するターゲットブロックの中にも、背景と一致しているブロックも存在するかもしれないことを考慮したものである。   Accordingly, when it is determined in step S312 that the minimum SAD value MinSAD is larger than the threshold value TH1, the comparison determination unit 1504 does not determine the background matching degree using the global motion vector GMV, and the hit rate β = 0. 25 (step S313). The reason why β = 0 is not considered is that there may be a block that matches the background among target blocks that exhibit an SAD value greater than the threshold TH1.

そして、比較判定部1504は、再算出されたローカル動きベクトルLMVを、当該ターゲットブロックのNR処理用動きベクトルとして動き補償画生成部16に出力する(ステップS314)。   Then, the comparison determination unit 1504 outputs the recalculated local motion vector LMV to the motion compensation image generation unit 16 as the NR processing motion vector of the target block (step S314).

次に、コントロール部155は、ターゲットフレーム内の全てのターゲットブロックについての処理が終了したか否か判別し(ステップS320)、終了していなければ、次のターゲットブロックを設定する(ステップS321)。そして、ステップS302に戻り、コントロール部155の制御の下に、上述したステップS302以降の処理を繰り返す。   Next, the control unit 155 determines whether or not processing has been completed for all target blocks in the target frame (step S320), and if not, sets the next target block (step S321). And it returns to step S302 and repeats the process after step S302 mentioned above under control of the control part 155. FIG.

また、ステップS312で、最小SAD値MinSADが、前記閾値TH1より小さいと判別したときには、比較判定部1504は、最小SAD値MinSADと、補正後SAD値MinSAD_Gとを比較する(ステップS315)。そして、比較判定部1504は、MinSAD>MinSAD_Gであるか否か判別し(ステップS316)、そうではないと判別したときには、ターゲットブロックは背景には一致していないとして、ヒット率βは、β=0とする(ステップS317)。   If it is determined in step S312 that the minimum SAD value MinSAD is smaller than the threshold value TH1, the comparison determination unit 1504 compares the minimum SAD value MinSAD with the corrected SAD value MinSAD_G (step S315). Then, the comparison determination unit 1504 determines whether or not MinSAD> MinSAD_G (step S316). If it is determined that this is not the case, the target block does not match the background, and the hit rate β is β = It is set to 0 (step S317).

このステップS317の次には、ステップS314に進み、比較判定部1504は、再算出されたローカル動きベクトルLMVを、当該ターゲットブロックのNR処理用動きベクトルとして動き補償画生成部16に出力する。そして、ステップS320に進み、前述したステップS320以降の処理を繰り返す。   After step S317, the process proceeds to step S314, and the comparison determination unit 1504 outputs the recalculated local motion vector LMV to the motion compensation image generation unit 16 as the NR processing motion vector of the target block. And it progresses to step S320 and repeats the process after step S320 mentioned above.

また、ステップS316で、MinSAD>MinSAD_Gであると判別したときには、ターゲットブロックは背景に一致している度合いが高いとして、ヒット率βは、β=0.75とする(ステップS318)。そして、比較判定部1504は、グローバル動きベクトルGMVを、当該ターゲットブロックのNR処理用動きベクトルとして動き補償画生成部16に出力する(ステップS319)。   If it is determined in step S316 that MinSAD> MinSAD_G, the hit rate β is set to β = 0.75, assuming that the target block is highly consistent with the background (step S318). Then, the comparison determination unit 1504 outputs the global motion vector GMV to the motion compensation image generation unit 16 as the NR processing motion vector of the target block (step S319).

そして、このステップS319の次には、ステップS320に進み、コントロール部155は、ターゲットフレーム内の全てのターゲットブロックについての処理が終了したか否か判別する。このステップS320で、ターゲットフレーム内の全てのターゲットブロックについての処理が終了していないと判別したときには、コントロール部155は、次のターゲットブロックを設定し(ステップS321)、その後、ステップS302に戻る。   After step S319, the process proceeds to step S320, and the control unit 155 determines whether or not the processing for all target blocks in the target frame has been completed. If it is determined in step S320 that the processing has not been completed for all target blocks in the target frame, the control unit 155 sets the next target block (step S321), and then returns to step S302.

また、ステップS320で、ターゲットフレーム内の全てのターゲットブロックについての処理が終了したと判別したときには、コントロール部155は、この背景/動被写体判定処理動作を終了する。   If it is determined in step S320 that the processing for all target blocks in the target frame has been completed, the control unit 155 ends the background / moving subject determination processing operation.

なお、上述の実施形態では、グローバル動きベクトルGMVのSAD値SAD_GMVに対してオフセット値OFSを減算して、補正SAD値MinSAD_Gを得て、それと最小SAD値MinSADとを比較するようにした。しかし、ローカル動きベクトルLMVの最小SAD値MinSADにオフセット値OFSを加算した値(MinSAD+OFS)と、グローバル動きベクトルGMVのSAD値SAD_GMVとを比較しても全く等価である。   In the above-described embodiment, the offset value OFS is subtracted from the SAD value SAD_GMV of the global motion vector GMV to obtain the corrected SAD value MinSAD_G, which is compared with the minimum SAD value MinSAD. However, even if the value (MinSAD + OFS) obtained by adding the offset value OFS to the minimum SAD value MinSAD of the local motion vector LMV is compared with the SAD value SAD_GMV of the global motion vector GMV, they are completely equivalent.

<第2の例;ゲイン乗算によるSAD値の補正>
上述した第1の例では、オフセット値OFSの付加によりグローバル動きベクトルGMVと一致する参照ベクトル位置の参照ブロックについてのSAD値SAD_GMVを補正するようにした。同様の考え方により、オフセット付加の代わりに、画像のノイズ分を考慮したゲインgを乗算することにより、SAD値SAD_GMVを補正することもできる。この例の場合には、SAD値SAD_GMVを、より小さい方向にゲイン倍するようにするので、ゲインgは、g<1となる。なお、相関値が相関の強さに応じて大きくなるものであるときには、g>1であることは勿論である。
<Second Example: Correction of SAD Value by Gain Multiplication>
In the first example described above, the SAD value SAD_GMV for the reference block at the reference vector position matching the global motion vector GMV is corrected by adding the offset value OFS. Based on the same concept, the SAD value SAD_GMV can be corrected by multiplying the gain g considering the noise of the image instead of adding the offset. In this example, since the SAD value SAD_GMV is multiplied by a gain in a smaller direction, the gain g is g <1. Of course, g> 1 when the correlation value increases in accordance with the strength of the correlation.

この第2の例における、グローバル動きベクトルGMVでのSAD値SAD_GMVの補正後SAD値MinSAD_Gは、
MinSAD_G=SAD_GMV×g ・・・ (式d)
となる。
In this second example, the corrected SAD value MinSAD_G of the SAD value SAD_GMV in the global motion vector GMV is:
MinSAD_G = SAD_GMV × g (formula d)
It becomes.

図51に、この第2の例の場合の背景/動被写体判定部150の構成例(機能ブロック図)を、その周辺部と共に示す。   FIG. 51 shows a configuration example (functional block diagram) of the background / moving subject determination unit 150 in the case of the second example, along with its peripheral parts.

この図51の例は、前述した図48の例の構成において、オフセット減算部1502の代わりに、ゲイン乗算部1505を設け、また、オフセット生成部1503の代わりにゲイン生成部1506を設けた構成となる。   In the example of FIG. 51, in the configuration of the example of FIG. 48 described above, a gain multiplication unit 1505 is provided instead of the offset subtraction unit 1502, and a gain generation unit 1506 is provided instead of the offset generation unit 1503. Become.

ゲイン生成部1506は、画像のノイズが画像の輝度値に応じたものとなることから、種々の輝度値とゲインg(g<1)との対応テーブルの情報を記憶し、ターゲットブロックの輝度値を引数として、対応するゲインgを出力する。   The gain generation unit 1506 stores the information of the correspondence table between various luminance values and gain g (g <1) since the noise of the image corresponds to the luminance value of the image, and the luminance value of the target block And the corresponding gain g is output.

ゲイン乗算部1505は、ゲイン生成部1506からのゲインgを、SAD_GMV検出部1501からのSAD値SAD_GMVに乗算して、補正後SAD値MinSAD_Gを生成する。そして、ゲイン乗算部1505は、生成した補正後SAD値MinSAD_Gを比較判定部1504に供給する。その他の構成および処理動作は、上述した第1の例と同様である。   The gain multiplication unit 1505 multiplies the gain g from the gain generation unit 1506 by the SAD value SAD_GMV from the SAD_GMV detection unit 1501 to generate a corrected SAD value MinSAD_G. Then, the gain multiplication unit 1505 supplies the generated corrected SAD value MinSAD_G to the comparison determination unit 1504. Other configurations and processing operations are the same as those in the first example described above.

この第2の例における背景/動被写体判定処理においては、図49のフローチャートにおけるステップS306におけるSAD値SAD_GMVの補正処理が、上述した(式d)の演算処理に変わる。そして、その他のステップの処理は、第1の例と全く同様にすることができる。   In the background / moving subject determination process in the second example, the correction process of the SAD value SAD_GMV in step S306 in the flowchart of FIG. 49 is changed to the above-described calculation process of (formula d). The processing of the other steps can be made exactly the same as in the first example.

なお、上述の実施形態では、グローバル動きベクトルGMVのSAD値SAD_GMVに対してゲインg(g<1)を乗算して、補正SAD値MinSAD_Gを得て、それと最小SAD値MinSADとを比較するようにした。しかし、ローカル動きベクトルLMVの最小SAD値MinSADに、ゲインgの逆数を乗算した値(MinSAD×1/g)と、グローバル動きベクトルGMVのSAD値SAD_GMVとを比較しても全く等価である。   In the above-described embodiment, the SAD value SAD_GMV of the global motion vector GMV is multiplied by the gain g (g <1) to obtain the corrected SAD value MinSAD_G and compared with the minimum SAD value MinSAD. did. However, even if a value obtained by multiplying the minimum SAD value MinSAD of the local motion vector LMV by the reciprocal of the gain g (MinSAD × 1 / g) and the SAD value SAD_GMV of the global motion vector GMV are completely equivalent.

なお、この第2の例におけるゲインgも、第1の例のオフセットOFSと同様に、動被写体の動きベクトルまで、最小SAD値として判定されるようになってしまうのを避ける値とされる。すなわち、この実施形態では、ゲインgも、オフセット値OFSと同様に、ローカル動きベクトルの信頼性の指標値Ftについての閾値th(式b参照)を考慮した値に設定される。   Note that the gain g in the second example is also a value that avoids being determined as the minimum SAD value up to the motion vector of the moving subject, like the offset OFS in the first example. That is, in this embodiment, similarly to the offset value OFS, the gain g is also set to a value that takes into consideration the threshold value th (see formula b) for the local motion vector reliability index value Ft.

[背景/動被写体判定部150の他の構成例および処理動作]
ところで、グローバルモーションGMに基づいて算出されたグローバル動きベクトルGMVは、本来、画素ピッチよりも精細な精度で表わすことができるのに対して、上述の実施形態では、ブロックマッチングは画素ピッチの精度で行なわれる。このため、グローバル動きベクトルGMVと一致する参照ベクトルの参照ブロック位置に、誤差が生じる場合がある。
[Other Configuration Examples and Processing Operation of Background / Moving Subject Determination Unit 150]
By the way, the global motion vector GMV calculated based on the global motion GM can be originally expressed with a finer accuracy than the pixel pitch, whereas in the above-described embodiment, the block matching is performed with the accuracy of the pixel pitch. Done. For this reason, an error may occur in the reference block position of the reference vector that matches the global motion vector GMV.

また、たとえ、上述の実施形態のように拡張したアフィン変換を用いたとしても、求められたグローバルモーションGMと、真のグローバルモーションとの間には誤差が存在し得る。また、この実施形態における階層化ブロックマッチングにおいて、浅い階層のブロックマッチングにおいてミスを生じると、以降の階層で、そのミスをリカバリーすることができない。以上のことを考慮すると、グローバル動きベクトルGMVの位置に関して、あるマージンを設ける方が良いと言える。   Moreover, even if the affine transformation expanded as in the above-described embodiment is used, there may be an error between the obtained global motion GM and the true global motion. In addition, in the hierarchical block matching in this embodiment, if a mistake occurs in shallow layer block matching, the mistake cannot be recovered in the subsequent layers. Considering the above, it can be said that it is better to provide a certain margin with respect to the position of the global motion vector GMV.

以下に説明する例は、以上のことを考慮した場合の例である。この例においては、グローバル動きベクトルGMVの位置PgmvのSAD値のみではなく、その周辺近傍位置のSAD値についても、前記のような補正をして、MinSADと比較するようにする。   The example described below is an example in consideration of the above. In this example, not only the SAD value at the position Pgmv of the global motion vector GMV but also the SAD value at the vicinity of the position is corrected as described above and compared with MinSAD.

例えば、図52に示すように、ターゲットブロックについてのSADテーブルTBLにおいて、グローバル動きベクトルGMVの位置が、位置Pgmvであると判定されたとする。このときに、その位置PgmvのSAD値のみではなく、当該位置Pgmvに対して1画素隣接の周囲近傍位置P1〜P8の8個のSAD値をも、前記のような補正をして、背景一致度合いを判定する対象とする。   For example, as shown in FIG. 52, it is assumed that the position of the global motion vector GMV is determined to be the position Pgmv in the SAD table TBL for the target block. At this time, not only the SAD value of the position Pgmv but also the eight SAD values of the neighboring neighboring positions P1 to P8 adjacent to the position Pgmv by one pixel are corrected as described above to match the background. It is a target for determining the degree.

そして、この例の場合には、位置Pgmvおよび位置P1〜P8の9個のSAD値の補正後SAD値MinSAD_G_0〜MinSAD_G_8と、再算出された最小SAD値MinSADとを比較する。そして、9個の補正後SAD値の中に、最小SAD値MinSADよりも小さいものがあれば、当該ターゲットブロックの動きベクトルは、グローバル動きベクトルGMVに一致度合いが高いと評価し、背景一途度合いが高いと評価する。   In this example, the corrected SAD values MinSAD_G_0 to MinSAD_G_8 of the nine SAD values at the position Pgmv and the positions P1 to P8 are compared with the recalculated minimum SAD value MinSAD. If any of the nine corrected SAD values is smaller than the minimum SAD value MinSAD, the motion vector of the target block is evaluated as having a high degree of coincidence with the global motion vector GMV, and the degree of background is somewhat high. Evaluate as high.

この例において、SAD値の補正方法として、前述した第1の例を用いる場合の背景/動被写体判定部150周辺の構成図を、図53に示す。   In this example, FIG. 53 shows a configuration diagram around the background / moving subject determination unit 150 when the first example described above is used as a method of correcting the SAD value.

図53に示すように、この例は、図48におけるSAD_GMV検出部1501に代えて、GMV近傍SAD値検出部1507を設けると共に、オフセット減算部1502と、比較判定部1504との間に、最小値検出部1508を設けた構成である。   As shown in FIG. 53, in this example, instead of the SAD_GMV detection unit 1501 in FIG. 48, a GMV neighborhood SAD value detection unit 1507 is provided, and a minimum value is provided between the offset subtraction unit 1502 and the comparison determination unit 1504. In this configuration, a detection unit 1508 is provided.

GMV近傍SAD値検出部1507は、マッチング処理部153からの位置情報およびSAD値のうちから、グローバル動きベクトルGMVの位置PgmvおよびそのSAD値と、その位置の周囲近傍8個の位置P1〜P8およびそのSAD値を検出する。   The GMV vicinity SAD value detection unit 1507 includes the position Pgmv of the global motion vector GMV and its SAD value, and the eight positions P1 to P8 around the position, from the position information and SAD value from the matching processing unit 153. The SAD value is detected.

そして、GMV近傍SAD値検出部1507は、検出したSAD値は、オフセット減算部1502に供給する。オフセット減算部1502は、位置PgmvおよびP1〜P8の9個のSAD値のそれぞれについて、オフセット生成部1503からのオフセット値OFSを減算して、補正後SAD値MinSAD_G_0〜MinSAD_G_8を生成する。そして、オフセット減算部1502は、それらの補正後SAD値MinSAD_G_0〜MinSAD_G_8を最小値検出部1508に供給する。   Then, the GMV vicinity SAD value detection unit 1507 supplies the detected SAD value to the offset subtraction unit 1502. The offset subtraction unit 1502 subtracts the offset value OFS from the offset generation unit 1503 for each of the nine SAD values at the positions Pgmv and P1 to P8, and generates corrected SAD values MinSAD_G_0 to MinSAD_G_8. Then, the offset subtraction unit 1502 supplies the corrected SAD values MinSAD_G_0 to MinSAD_G_8 to the minimum value detection unit 1508.

また、GMV近傍SAD値検出部1507は、検出した位置PgmvおよびP1〜P8の情報も、それぞれの位置におけるSAD値に対応するように最小値検出部1508に供給する。   Further, the GMV vicinity SAD value detection unit 1507 supplies information on the detected positions Pgmv and P1 to P8 to the minimum value detection unit 1508 so as to correspond to the SAD values at the respective positions.

最小値検出部1508は、位置PgmvおよびP1〜P8の9個の補正後SAD値MinSAD_G_0〜MinSAD_G_8の中の最小値を検出し、その検出結果の最小値を前記MinSAD_Gとして、その位置情報と共に比較判定部1504に供給する。   The minimum value detection unit 1508 detects the minimum value among the nine corrected SAD values MinSAD_G_0 to MinSAD_G_8 of the positions Pgmv and P1 to P8, and compares and determines the minimum value of the detection result as the MinSAD_G with the position information. Part 1504.

比較判定部1504では、前述と同様にして、ローカル動きベクトル154から再ブロックマッチングの結果として得たMinSADと、最小値検出部1508からのMinSAD_Gとを比較して、前述と同様にして、背景一致度合いの評価判定を行う。   In the comparison determination unit 1504, MinSAD obtained as a result of re-block matching from the local motion vector 154 is compared with MinSAD_G from the minimum value detection unit 1508 in the same manner as described above, and background matching is performed as described above. Determining the degree of evaluation.

比較判定部1504は、MinSAD>MinSAD_Gではないときには、ヒット率βは、β=0.0とする共に、NR処理用動きベクトルとして、ローカル動きベクトルLMVを出力する。このことは前記の例と同様である。   When MinSAD> MinSAD_G is not satisfied, the comparison determination unit 1504 sets the hit rate β to β = 0.0 and outputs the local motion vector LMV as the motion vector for NR processing. This is similar to the above example.

MinSAD>MinSAD_Gであるときには、比較判定部1504は、当該MinSAD_Gに対応する位置情報が、グローバル動きベクトルGMVと一致しているか否かを判断し、その結果に応じたヒット率βを変える。例えば、MinSAD_Gに対応する位置情報が、グローバル動きベクトルGMVと一致している場合には、ヒット率βは、β=0.75とする。また、MinSAD_Gに対応する位置情報が、グローバル動きベクトルGMVと一致していない場合には、ヒット率βは、β=0.5とする。   When MinSAD> MinSAD_G, the comparison / determination unit 1504 determines whether or not the position information corresponding to the MinSAD_G matches the global motion vector GMV, and changes the hit rate β according to the result. For example, when the position information corresponding to MinSAD_G matches the global motion vector GMV, the hit rate β is set to β = 0.75. When the position information corresponding to MinSAD_G does not match the global motion vector GMV, the hit rate β is set to β = 0.5.

そして、この例の場合においても、MinSAD>MinSAD_Gであるときには、、NR処理用動きベクトルとして、グローバル動きベクトルGMVを出力する。   Even in this example, when MinSAD> MinSAD_G, the global motion vector GMV is output as the motion vector for NR processing.

しかし、この例においては、比較判定部1504は、MinSAD>MinSAD_Gであるときには、最小値検出部1508からの位置情報に対応するローカル動きベクトルLMVを、NR処理用動きベクトルとして出力するようにしてもよい。   However, in this example, when MinSAD> MinSAD_G, the comparison determination unit 1504 outputs the local motion vector LMV corresponding to the position information from the minimum value detection unit 1508 as a motion vector for NR processing. Good.

なお、最小値検出部1508は、比較判定部1504に含めるように構成しても良い。その場合には、9個の補正後SAD値から最小値を検出してから最小SAD値MinSADと比較するようにしてもよいし、9個の補正後SAD値と最小SAD値MinSADとを逐次比較するようにしても勿論良い。   The minimum value detection unit 1508 may be configured to be included in the comparison determination unit 1504. In that case, the minimum value is detected from the nine corrected SAD values and then compared with the minimum SAD value MinSAD, or the nine corrected SAD values and the minimum SAD value MinSAD are sequentially compared. Of course, it is good.

<背景/動被写体判定処理の流れ>
図53の構成によるローカル動きベクトル算出部154での再ブロックマッチング処理および背景/動被写体判定部150での背景一致度合い評価処理の流れを、図54および図55のフローチャートを参照して更に説明する。この図54および図55の処理は、コントロール部155の制御に基づいて、各部が実行する。なお、この図54および図55の例では、SAD_GMV検出部1501、オフセット減算部1502は、ローカル動きベクトル算出部154に含まれるように構成されている場合である。また、最小値検出部1508は、比較判定部1504に含まれている場合としている。
<Flow of background / moving subject determination processing>
The flow of the re-block matching process in the local motion vector calculation unit 154 and the background matching degree evaluation process in the background / moving subject determination unit 150 having the configuration of FIG. 53 will be further described with reference to the flowcharts of FIGS. . The processes in FIGS. 54 and 55 are executed by each unit based on the control of the control unit 155. 54 and 55, the SAD_GMV detection unit 1501 and the offset subtraction unit 1502 are configured to be included in the local motion vector calculation unit 154. In addition, the minimum value detection unit 1508 is included in the comparison determination unit 1504.

先ず、コントロール部155の制御により、再ブロックマッチングが開始され、ターゲットブロックバッファ部151に最初のターゲットブロックが設定される(ステップS401)。次に、コントロール部155の制御により、参照ブロックバッファ152にバッファリングされているマッチング処理範囲の参照フレームの画像データのうちから、ブロックマッチング処理する参照ブロックが設定される(ステップS402)。   First, re-block matching is started under the control of the control unit 155, and the first target block is set in the target block buffer unit 151 (step S401). Next, under the control of the control unit 155, a reference block for block matching processing is set from the image data of the reference frame in the matching processing range buffered in the reference block buffer 152 (step S402).

マッチング処理部153は、設定されたターゲットブロックと、設定された参照ブロックとについてブロックマッチング処理を行い、SAD値を計算する。マッチング処理部153は算出したSAD値を、参照ブロックの位置情報(参照ベクトル)と共に、ローカル動きベクトル算出部154に供給する(ステップS403)。   The matching processing unit 153 performs block matching processing on the set target block and the set reference block, and calculates an SAD value. The matching processing unit 153 supplies the calculated SAD value to the local motion vector calculation unit 154 together with the position information (reference vector) of the reference block (step S403).

ローカル動きベクトル算出部154は、参照ベクトルがグローバル動きベクトルGMVと一致しているか、また、その周囲近傍の8位置P1〜P8と一致しているか否か判別する(ステップS404)。   The local motion vector calculation unit 154 determines whether the reference vector matches the global motion vector GMV and whether it matches the eight positions P1 to P8 in the vicinity thereof (step S404).

ステップS404で、参照ベクトルがグローバル動きベクトルGMVおよびその周囲近傍の8位置P1〜P8とは一致していないと判別したときには、ローカル動きベクトル算出部154では、最小SAD値MinSADと、その参照ブロック位置(参照ベクトル)との更新処理を行なう(ステップS405)。   If it is determined in step S404 that the reference vector does not match the global motion vector GMV and the eight neighboring positions P1 to P8, the local motion vector calculation unit 154 determines the minimum SAD value MinSAD and its reference block position. Update processing with (reference vector) is performed (step S405).

次に、コントロール部155は、サーチ範囲内の全ての参照ブロックついてのターゲットブロックとのブロックマッチングが終了したか否か判別する(ステップS408)。   Next, the control unit 155 determines whether or not block matching with the target block for all the reference blocks within the search range has been completed (step S408).

そして、ステップS408で、サーチ範囲内の全ての参照ブロックついての処理が終了してはいないと判別したときには、コントロール部155は、次の参照ブロックを設定する(ステップS409)。そして、ステップS402に戻り、上述したこのステップS402以降の処理を繰り返す。   If it is determined in step S408 that the processing has not been completed for all reference blocks in the search range, the control unit 155 sets the next reference block (step S409). And it returns to step S402 and repeats the process after this step S402 mentioned above.

また、ステップS404で、参照ベクトルがグローバル動きベクトルGMV、あるいはその周辺近傍位置P1〜P8のいずれかと一致したと判別したときには、ローカル動きベクトル算出部154では、そのSAD値からオフセット値OFSを減算する(ステップS406)。そして、その減算結果を補正後SAD値MinSAD_G_0〜MinSAD_G_8のいずれかとして、その参照ブロック位置(参照ベクトル)とを保持する(ステップS407)。   If it is determined in step S404 that the reference vector matches the global motion vector GMV or any one of the neighboring positions P1 to P8, the local motion vector calculation unit 154 subtracts the offset value OFS from the SAD value. (Step S406). Then, the subtraction result is held as one of the corrected SAD values MinSAD_G_0 to MinSAD_G_8 and the reference block position (reference vector) is held (step S407).

そして、ステップS408に進み、サーチ範囲内の全ての参照ブロックついての処理が終了したか否か判別する。   Then, the process proceeds to step S408, and it is determined whether or not the processing for all reference blocks within the search range has been completed.

そして、ステップS408で、サーチ範囲内の全ての参照ブロックついての処理が終了したと判別したときには、ローカル動きベクトル算出部154は、ローカル動きベクトルLMVと、最小SAD値MinSADを検出し、比較判定部1504に供給する。また、ローカル動きベクトル算出部154は、9個の補正後SAD値MinSAD_G_0〜MinSAD_G_8の中の最小値として、補正後SAD値MinSAD_Gを検出し、比較判定部1504に供給する(図55のステップS411)。   When it is determined in step S408 that the processing for all reference blocks within the search range has been completed, the local motion vector calculation unit 154 detects the local motion vector LMV and the minimum SAD value MinSAD, and compares and determines 1504 is supplied. Further, the local motion vector calculation unit 154 detects the corrected SAD value MinSAD_G as the minimum value among the nine corrected SAD values MinSAD_G_0 to MinSAD_G_8 and supplies the detected value to the comparison determination unit 1504 (step S411 in FIG. 55). .

そして、背景/動被写体判定部150の比較判定部1504は、最小SAD値MinSADが、予め定められている前記閾値TH1より小さいか否か判別する(ステップS412)。   Then, the comparison / determination unit 1504 of the background / moving subject determination unit 150 determines whether or not the minimum SAD value MinSAD is smaller than the predetermined threshold TH1 (step S412).

ステップS412で、最小SAD値MinSADが、前記閾値TH1より大きいと判別したときには、比較判定部1504は、グローバル動きベクトルGMVを用いた背景一致度合いの判定を行わず、ヒット率β=0.25とする(ステップS413)。そして、比較判定部1504は、再算出されたローカル動きベクトルLMVを、当該ターゲットブロックのNR処理用動きベクトルとして動き補償画生成部16に出力する(ステップS414)。   If it is determined in step S412 that the minimum SAD value MinSAD is larger than the threshold TH1, the comparison determination unit 1504 does not determine the background matching degree using the global motion vector GMV, and the hit rate β = 0.25. (Step S413). Then, the comparison determination unit 1504 outputs the recalculated local motion vector LMV to the motion compensation image generation unit 16 as the NR processing motion vector of the target block (step S414).

そして、ステップS414の次に、コントロール部155は、ターゲットフレーム内の全てのターゲットブロックについての処理が終了したか否か判別し(ステップS422)、終了していなければ、次のターゲットブロックを設定する(ステップS423)。そして、ステップS402に戻り、コントロール部155の制御の下に、上述したステップS402以降の処理を繰り返す。   Then, after step S414, the control unit 155 determines whether or not processing for all target blocks in the target frame has been completed (step S422), and if not, sets the next target block. (Step S423). Then, the process returns to step S402, and the processes after step S402 described above are repeated under the control of the control unit 155.

また、ステップS412で、最小SAD値MinSADが、前記閾値TH1より小さいと判別したときには、比較判定部1504は、最小SAD値MinSADと、補正後SAD値MinSAD_Gとを比較する(ステップS415)。そして、比較判定部1504は、MinSAD>MinSAD_Gであるか否か判別し(ステップS416)、そうではないと判別したときには、ターゲットブロックは背景には一致していないとして、ヒット率βは、β=0とする(ステップS417)。   If it is determined in step S412 that the minimum SAD value MinSAD is smaller than the threshold TH1, the comparison determination unit 1504 compares the minimum SAD value MinSAD with the corrected SAD value MinSAD_G (step S415). Then, the comparison determination unit 1504 determines whether or not MinSAD> MinSAD_G (step S416). If it is determined that the target block does not match the background, the hit rate β is determined as β = It is set to 0 (step S417).

このステップS417の次には、ステップS414に進み、比較判定部1504は、再算出されたローカル動きベクトルLMVを、当該ターゲットブロックのNR処理用動きベクトルとして動き補償画生成部16に出力する。そして、ステップS422に進み、前述したステップS422以降の処理を繰り返す。   After step S417, the process proceeds to step S414, and the comparison determination unit 1504 outputs the recalculated local motion vector LMV to the motion compensation image generation unit 16 as the NR processing motion vector of the target block. And it progresses to step S422 and the process after step S422 mentioned above is repeated.

また、ステップS416で、MinSAD>MinSAD_Gであると判別したときには、MinSADの位置(参照ベクトル)は、グローバル動きベクトルGMVと一致しているか否か判別する(ステップS418)。このステップS418で、MinSADの位置(参照ベクトル)は、グローバル動きベクトルGMVと一致してはいないと判別したときには、比較判定部1504は、ヒット率βを、β=0.5に設定する(ステップS419)。   If it is determined in step S416 that MinSAD> MinSAD_G, it is determined whether the position (reference vector) of MinSAD matches the global motion vector GMV (step S418). If it is determined in step S418 that the MinSAD position (reference vector) does not match the global motion vector GMV, the comparison determination unit 1504 sets the hit rate β to β = 0.5 (step S418). S419).

また、ステップS418で、MinSADの位置(参照ベクトル)は、グローバル動きベクトルGMVと一致していると判別したときには、比較判定部1504は、ヒット率βを、β=0.75に設定する(ステップS420)。   If it is determined in step S418 that the MinSAD position (reference vector) matches the global motion vector GMV, the comparison determination unit 1504 sets the hit rate β to β = 0.75 (step S418). S420).

そして、比較判定部1504は、ステップS419または420の次には、グローバル動きベクトルGMVを、当該ターゲットブロックのNR処理用動きベクトルとして動き補償画生成部16に出力する(ステップS421)。   Then, after step S419 or 420, the comparison determination unit 1504 outputs the global motion vector GMV to the motion compensated image generation unit 16 as the NR processing motion vector of the target block (step S421).

このステップS421の次には、ステップS422に進み、コントロール部155は、ターゲットフレーム内の全てのターゲットブロックについての処理が終了したか否か判別する。このステップS422で、ターゲットフレーム内の全てのターゲットブロックについての処理が終了していないと判別したときには、コントロール部155は、次のターゲットブロックを設定し(ステップS423)、その後、ステップS402に戻る。   After step S421, the process proceeds to step S422, and the control unit 155 determines whether or not the processing for all target blocks in the target frame has been completed. If it is determined in step S422 that the processing has not been completed for all target blocks in the target frame, the control unit 155 sets the next target block (step S423), and then returns to step S402.

また、ステップS422で、ターゲットフレーム内の全てのターゲットブロックについての処理が終了したと判別したときには、コントロール部155は、この背景/動被写体判定処理動作を終了する。   If it is determined in step S422 that the processing for all target blocks in the target frame has been completed, the control unit 155 ends the background / moving subject determination processing operation.

このグローバル動きベクトルGMV位置のみならず、その周囲近傍の位置のSAD値をも考慮して、背景/動被写体判定をする方法は、前述したSAD値の補正方法の第2の例にも適用できる。   The method of determining the background / moving subject in consideration of not only the global motion vector GMV position but also the SAD value in the vicinity of the surrounding area can be applied to the second example of the SAD value correction method described above. .

図56に、第2の例を適用した場合の背景/動被写体判定部およびその周辺部の構成例を示す。この図56の例は、図52におけるSAD_GMV検出部1501に代えて、GMV近傍SAD値検出部1507を設けると共に、ゲイン乗算部1505と、比較判定部1504との間に、最小値検出部1508を設けた構成である。   FIG. 56 shows a configuration example of the background / moving subject determination unit and its peripheral part when the second example is applied. In the example of FIG. 56, instead of the SAD_GMV detection unit 1501 in FIG. 52, a GMV neighborhood SAD value detection unit 1507 is provided, and a minimum value detection unit 1508 is provided between the gain multiplication unit 1505 and the comparison determination unit 1504. This is a configuration provided.

この図56の例の処理動作は、SAD値の補正方法が第2の例に変わるだけで、前述した図38の例と全く同様であるので、ここでは、その詳細な説明は省略する。   The processing operation of the example of FIG. 56 is exactly the same as the example of FIG. 38 described above, except that the SAD value correction method is changed to the second example, and detailed description thereof is omitted here.

<加算率計算部21の構成例>
この実施形態においては、加算率計算部21では、画素単位に加算率α(0≦α≦1)を求める。そして、前述したように、基本的には、ターゲット画像と動き補償画像との画素単位の違いと、ヒット率βとに応じて加算率αを計算する。このため、加算率計算部21には、ヒット率βと、ターゲット画像のデータTGvおよび動き補償画像のデータMCvが供給される。
<Configuration Example of Addition Rate Calculation Unit 21>
In this embodiment, the addition rate calculator 21 calculates the addition rate α (0 ≦ α ≦ 1) for each pixel. As described above, basically, the addition rate α is calculated according to the difference in pixel units between the target image and the motion compensated image and the hit rate β. For this reason, the hit rate β, the target image data TGv, and the motion compensation image data MCv are supplied to the addition rate calculation unit 21.

ここで、ターゲット画像と動き補償画像との画素単位の違いが大きければ、動き部分と考えられるので、加算率αは低くすべきであるが、前記画素単位の違いがない、あるいは小さければ加算率αは高くしても良い。しかし、ターゲットブロックが背景静止画部分であるか、動被写体部分であるかが不明である場合には、前述したように、動き部分における2重露光が目立たないようにするために、加算率αは比較的低く抑える必要がある。   Here, if the difference in pixel unit between the target image and the motion compensated image is large, it is considered as a moving part. Therefore, the addition rate α should be low, but if there is no difference in the pixel unit or is small, the addition rate α may be high. However, when it is unclear whether the target block is the background still image portion or the moving subject portion, as described above, the addition rate α is set so as to make the double exposure in the moving portion inconspicuous. Must be kept relatively low.

しかし、この実施形態では、ヒット率βにより、背景静止画部分としての一致度合いが求められているので、ヒット率βが大きく、背景一致度合いが高いほど、加算率αは高くするようにする。   However, in this embodiment, since the degree of coincidence as a background still image portion is obtained from the hit rate β, the addition rate α is made higher as the hit rate β is larger and the background coincidence degree is higher.

また、この実施形態では、さらに画像のノイズは、画像の明るさに応じたものとなるので、加算率計算部21では、ターゲット画像と動き補償画像との画素単位の違いに関しては、当該画像の明るさに応じたノイズを考慮するようにしている。すなわち、ターゲット画像と動き補償画像との画素単位の違いがノイズの範囲内であれば、両者の実際の差分は小さいと判断する。また、前記画素単位の違いがノイズの範囲よりも大きいときには、両者の差分は、実際に大きいと判断するようにする。   Further, in this embodiment, since the noise of the image further depends on the brightness of the image, the addition rate calculation unit 21 determines the difference in pixel units between the target image and the motion compensated image. The noise according to the brightness is taken into consideration. That is, if the pixel unit difference between the target image and the motion compensated image is within the noise range, it is determined that the actual difference between the two is small. When the difference in pixel unit is larger than the noise range, it is determined that the difference between the two is actually large.

このノイズを考慮するため、加算率計算部21には、動きベクトル算出部15から、最大輝度値MaxTARおよび最小輝度値MinTARが供給される。そして、加算率計算部21では、この最大輝度値MaxTARおよび最小輝度値MinTARから、ターゲットブロック毎の明るさ、つまり、照度Lxを算出するようにする。   In order to consider this noise, the maximum luminance value MaxTAR and the minimum luminance value MinTAR are supplied from the motion vector calculation unit 15 to the addition rate calculation unit 21. Then, the addition rate calculation unit 21 calculates the brightness for each target block, that is, the illuminance Lx, from the maximum luminance value MaxTAR and the minimum luminance value MinTAR.

また、この実施形態の加算率計算部21には、加算度合いを、加算率計算部21の外部から制御することができるようにするため、加算調整用ゲインGAが供給される。この加算調整用ゲインGAの値は、予め用意されているゲイン値の中から、ユーザが選択したものとするように構成することができる。あるいは、撮像画像のISO感度に応じて、加算調整用ゲインGAの値を定めるように構成しても良い。後者の場合には、例えば撮像時の露出値やシャッター速度などに応じて、画像の明るさを判断して、加算調整用ゲインGAの値を定めるように構成することができる。つまり、明るい画像の場合には、ノイズが目立つので、加算率が小さくなるようにゲインを小さくし、逆に、暗い画像の場合には、加算率を大きくするようにゲインを大きく設定する。   The addition rate calculation unit 21 of this embodiment is supplied with an addition adjustment gain GA so that the addition degree can be controlled from outside the addition rate calculation unit 21. The value of the addition adjustment gain GA can be configured to be selected by a user from gain values prepared in advance. Or you may comprise so that the value of the gain GA for addition adjustment may be defined according to the ISO sensitivity of a captured image. In the latter case, for example, the brightness of the image can be determined according to the exposure value at the time of imaging, the shutter speed, and the like, and the value of the addition adjustment gain GA can be determined. That is, since noise is conspicuous in the case of a bright image, the gain is set to be small so that the addition rate is small. Conversely, in the case of a dark image, the gain is set to be large so as to increase the addition rate.

この実施形態の加算率計算部21のハードウエア構成例を図57および図58に示す。この図57および図58の例においては、ターゲット画像のデータTGvおよび動き補償画像のデータMCvは、輝度成分と、色差成分とのそれぞれについて、別個に処理がなされる。   A hardware configuration example of the addition rate calculation unit 21 of this embodiment is shown in FIGS. In the example of FIGS. 57 and 58, the target image data TGv and the motion compensation image data MCv are processed separately for each of the luminance component and the color difference component.

図57は、加算率計算部21における、輝度成分についての処理部分である。図57を参照して、先ず、輝度成分についての加算率計算処理についての説明する。   FIG. 57 is a processing portion for the luminance component in the addition rate calculation unit 21. With reference to FIG. 57, first, the addition rate calculation processing for the luminance component will be described.

すなわち、ターゲット画像のデータTGvのうちの輝度データYtgは、ローパスフィルタ601を通じて差分絶対値計算部603に供給される。また、動き補償画像のデータMCvのうちの輝度データYmcが、ローパスフィルタ602を通じて差分絶対値計算部603に供給される。差分絶対値計算部603は、画素毎に、輝度データYtgと輝度データYmcとの画素差分絶対値ΔPxYを算出し、算出した画素差分絶対値ΔPxYを、加算率変換出力部608に供給する。   That is, the luminance data Ytg in the target image data TGv is supplied to the difference absolute value calculation unit 603 through the low-pass filter 601. Also, the luminance data Ymc of the motion compensation image data MCv is supplied to the difference absolute value calculation unit 603 through the low-pass filter 602. The difference absolute value calculation unit 603 calculates the pixel difference absolute value ΔPxY between the luminance data Ytg and the luminance data Ymc for each pixel, and supplies the calculated pixel difference absolute value ΔPxY to the addition rate conversion output unit 608.

ローパスフィルタ601を通じた輝度データYtgは、また、空間平均フィルタ604に供給される。そして、ローパスフィルタ602を通じた輝度データYmcは、また、空間平均フィルタ605に供給される。   The luminance data Ytg that has passed through the low-pass filter 601 is also supplied to the spatial average filter 604. The luminance data Ymc that has passed through the low-pass filter 602 is also supplied to the spatial average filter 605.

空間平均フィルタ604および605のそれぞれは、差分絶対値計算部603で画素差分を求める画素(注目画素という)の周囲の8個の画素と、自画素との9個の画素の平均値MtgおよびMmcを求める。そして、空間平均フィルタ604および605は、求めた平均値MtgおよびMmcは、差分絶対値計算部606に供給する。   Each of the spatial average filters 604 and 605 is an average value Mtg and Mmc of nine pixels of the eight pixels around the pixel (referred to as a target pixel) for which a pixel difference is calculated by the difference absolute value calculation unit 603 and the own pixel. Ask for. Then, the spatial average filters 604 and 605 supply the obtained average values Mtg and Mmc to the difference absolute value calculation unit 606.

差分絶対値計算部606では、平均値Mtgと平均値Mmcとの平均差分絶対値ΔMeYを算出し、算出した平均差分絶対値ΔMeYを、加算率変換出力部609に供給する。   The difference absolute value calculation unit 606 calculates an average difference absolute value ΔMeY between the average value Mtg and the average value Mmc, and supplies the calculated average difference absolute value ΔMeY to the addition rate conversion output unit 609.

そして、この例においては、輝度成分についてのノイズモデルメモリ607が設けられる。このノイズモデルメモリ607には、画素値の輝度値に対するノイズ標準偏差σが、予め算出されて記憶されている。すなわち、横軸に画素値の輝度値を取り、縦軸にノイズ標準偏差σを取ったとき、ノイズ標準偏差σは、例えば図59に示すようなものとなる。この図59に示すように、明るい画素に対しては、ノイズの標準偏差σは小さく、暗い画素に対しては、ノイズの標準偏差σは大きい。   In this example, a noise model memory 607 for luminance components is provided. In the noise model memory 607, the noise standard deviation σ with respect to the luminance value of the pixel value is calculated and stored in advance. That is, when the luminance value of the pixel value is taken on the horizontal axis and the noise standard deviation σ is taken on the vertical axis, the noise standard deviation σ is as shown in FIG. 59, for example. As shown in FIG. 59, the standard deviation σ of noise is small for bright pixels, and the standard deviation σ of noise is large for dark pixels.

ノイズモデルは、ノイズが画像の明るさにより異なるものであるので、ノイズモデルメモリ607には、画像の照度Lxに応じた複数個のノイズモデルが記憶されている。   Since the noise model differs depending on the brightness of the image, the noise model memory 607 stores a plurality of noise models corresponding to the illuminance Lx of the image.

そして、前述したようにして、最大輝度値MaxTARおよび最小輝度値MinTARから求められたターゲットブロック毎の照度Lxが、ノイズモデルメモリ607に、照度に応じたノイズモデルを選択用として供給される。これにより、どのノイズモデルを使用するかが、照度Lxにより定められる。   Then, as described above, the illuminance Lx for each target block obtained from the maximum luminance value MaxTAR and the minimum luminance value MinTAR is supplied to the noise model memory 607 for selection of a noise model corresponding to the illuminance. Thereby, which noise model is used is determined by the illuminance Lx.

また、ローパスフィルタ601を通じたターゲット画像データTGvの輝度データYtgが、ノイズモデルメモリ607に供給され、照度Lxおよび輝度データYtgにより定まるノイズ標準偏差σYが、ノイズモデルメモリ607から得られる。このノイズ標準偏差σYは、加算率変換出力部608および609に供給される。   Also, the luminance data Ytg of the target image data TGv that has passed through the low-pass filter 601 is supplied to the noise model memory 607, and a noise standard deviation σY determined by the illuminance Lx and the luminance data Ytg is obtained from the noise model memory 607. This noise standard deviation σY is supplied to addition rate conversion output units 608 and 609.

さらに、これら加算率変換出力部608および609には、動きベクトル算出部15からのヒット率βと、外部からのゲインGAが供給される。   Further, the addition rate conversion output units 608 and 609 are supplied with a hit rate β from the motion vector calculation unit 15 and an external gain GA.

加算率変換出力部608は、画素差分絶対値ΔPxYと、ノイズ標準偏差σYと、ヒット率βと、ゲインGAとを変換パラメータとする変換関数を用いて、画素差分絶対値ΔPxYに基づく加算率αYAを出力する。   The addition rate conversion output unit 608 uses the conversion function with the pixel difference absolute value ΔPxY, the noise standard deviation σY, the hit rate β, and the gain GA as conversion parameters, and the addition rate αYA based on the pixel difference absolute value ΔPxY. Is output.

また、加算率変換出力部609は、平均差分絶対値ΔMeYと、ノイズ標準偏差σYと、ヒット率βと、ゲインGAとを変換パラメータとする変換関数を用いて、平均差分絶対値ΔMeYに基づく加算率αYBを出力する。   Also, the addition rate conversion output unit 609 performs addition based on the average difference absolute value ΔMeY using a conversion function having the average difference absolute value ΔMeY, the noise standard deviation σY, the hit rate β, and the gain GA as conversion parameters. The rate αYB is output.

加算率変換出力部608および609は、基本的には、図60に示すように、ノイズ標準偏差σと、差分値とから加算率αを定める。なお、加算率変換出力部608および609では、ノイズ標準偏差σは、ノイズモデルメモリ607からのノイズ標準偏差σYであり、差分値は、画素差分絶対値ΔPxYおよび平均差分絶対値ΔMeYである。そして、出力加算率αは、加算率αYAおよびαYBである。   The addition rate conversion output units 608 and 609 basically determine the addition rate α from the noise standard deviation σ and the difference value as shown in FIG. In addition rate conversion output units 608 and 609, noise standard deviation σ is noise standard deviation σY from noise model memory 607, and difference values are pixel difference absolute value ΔPxY and average difference absolute value ΔMeY. The output addition rate α is the addition rates αYA and αYB.

この実施形態では、図60に示すように、差分値が、ノイズ標準偏差σの倍数として設定できる所定の第1の閾値以下のときには、背景画像部分であるとして、加算率αは、最大値であるα=1とする。   In this embodiment, as shown in FIG. 60, when the difference value is equal to or smaller than a predetermined first threshold value that can be set as a multiple of the noise standard deviation σ, the addition rate α is the maximum value as a background image portion. It is assumed that α = 1.

そして、差分値が、(第1の閾値<差分値<第2の閾値)の範囲では、背景部分と動被写体部分とのいずれとの判断ができない部分として、図60に示すように、加算率αは差分値が大きくなるに従って直線的に小さくなるようにされる。そして、(差分値≧第2の閾値)の範囲では、動被写体部分であると判断して、加算率αは、最小値であるα=0とする。   Then, as shown in FIG. 60, the addition rate is determined as a portion where the difference value cannot be determined as either the background portion or the moving subject portion within the range of (first threshold value <difference value <second threshold value). α is linearly decreased as the difference value increases. In the range of (difference value ≧ second threshold), it is determined that the subject is a moving subject, and the addition rate α is set to α = 0, which is the minimum value.

ターゲットブロックの背景一致度合いが不明であるときには、上述したように、動被写体部分での二重露光のような状態を軽減するために、第1の閾値は安全を見越した値とされて、加算率αは全体的に抑制される。つまり、背景画像部分であることが分かっていれば、第1の閾値および第2の閾値を大きな値として設定して、できるだけ大きな加算率での画像加算を行なうことができる。   When the background matching degree of the target block is unknown, as described above, in order to reduce a state such as double exposure in the moving subject portion, the first threshold is set to a value that allows for safety and is added. The rate α is suppressed as a whole. That is, if it is known that it is a background image portion, the first threshold value and the second threshold value can be set as large values, and image addition can be performed at as high an addition rate as possible.

しかし、背景一致度合いが不明であるであるときには、全てのターゲットブロックについて、動被写体部分での二重露光のような状態を軽減するようにすることを考慮する必要がある。そのため、通常は、図60の例に示すように、第1の閾値は、標準偏差σの1倍(1σ)程度とされ、第2の閾値は、標準偏差の3倍(3σ)程度とされる。   However, when the degree of background coincidence is unknown, it is necessary to consider reducing the state of double exposure in the moving subject portion for all target blocks. Therefore, normally, as shown in the example of FIG. 60, the first threshold value is set to about 1 time (1σ) of the standard deviation σ, and the second threshold value is set to about 3 times (3σ) of the standard deviation. The

これに対して、この実施形態では、上述したように、ターゲットブロック毎に、背景一致度合いが、その指標値であるヒット率βとして算出される。したがって、この背景一致度合いの指標値βを用いることにより、背景静止画像部分では、より大きな加算率で加算を行うことが可能となる。   On the other hand, in this embodiment, as described above, the background matching degree is calculated as the hit rate β that is the index value for each target block. Therefore, by using the index value β of the degree of background coincidence, it is possible to perform addition at a larger addition rate in the background still image portion.

ヒット率βを考慮した場合における加算率変換出力部608および609での加算率変換出力特性を図61に示す。   61 shows the addition rate conversion output characteristics of the addition rate conversion output units 608 and 609 when the hit rate β is considered.

すなわち、図61の例においては、ヒット率βに応じて、差分値に対する第1の閾値を変更するようにする。すなわち、ヒット率βが最低で、β=0であるとき(動被写体部分)では、図60の例の場合と同様に、第1の閾値は、標準偏差σの1倍(1σ)とする。そして、ヒット率βが、β>0であるときには、ヒット率βの値に応じて第1の閾値を、より大きなものに変更する。   That is, in the example of FIG. 61, the first threshold value for the difference value is changed according to the hit rate β. That is, when the hit rate β is the lowest and β = 0 (moving subject portion), the first threshold value is set to 1 times the standard deviation σ (1σ) as in the example of FIG. When the hit rate β is β> 0, the first threshold is changed to a larger value according to the value of the hit rate β.

そして、図61の例においては、差分値が第1の閾値よりも大きくなったときからの加算率αの漸減直線の傾きは常に一定とされる。したがって、図61の例では、第2の閾値は、第1の閾値の変更に応じて自動的に変更される。   In the example of FIG. 61, the slope of the gradually decreasing straight line of the addition rate α from when the difference value becomes larger than the first threshold value is always constant. Therefore, in the example of FIG. 61, the second threshold value is automatically changed according to the change of the first threshold value.

例えば、図62に示すように、ヒット率βを考慮しない図60の例の場合(β=0)においては、差分値が2σであるときには、加算率αは常に0.5となる。これに対して、ヒット率を考慮する場合においては、図62に示すように、ヒット率β=1.0である背景静止画像部分では、加算率αはα=1となり、最大の加算率で加算されるようになる。   For example, as shown in FIG. 62, in the example of FIG. 60 in which the hit rate β is not considered (β = 0), the addition rate α is always 0.5 when the difference value is 2σ. On the other hand, when the hit rate is considered, as shown in FIG. 62, in the background still image portion where the hit rate β = 1.0, the addition rate α is α = 1, and the maximum addition rate is It will be added.

このように、背景静止画像部分では、ヒット率βに応じて、より大きな加算率αが設定されるので、所期の通りのノイズ低減効果が得られる。また、動被写体部分では、ヒット率βに応じて加算率αは低く抑えられるので、二重露光の状態を軽減するという効果を維持することができる。   In this way, in the background still image portion, a larger addition rate α is set according to the hit rate β, so that the expected noise reduction effect can be obtained. In addition, in the moving subject portion, the addition rate α can be kept low according to the hit rate β, so that the effect of reducing the double exposure state can be maintained.

なお、上述の例では、第1の閾値のみをヒット率βに応じて変更し、差分値が第1の閾値よりも大きくなったときからの加算率αの漸減直線の傾きは常に一定としたが、第2の閾値をもヒット率に応じて変更して、前記漸減直線の傾きも変更するようにしても良い。   In the above example, only the first threshold value is changed according to the hit rate β, and the slope of the gradual decrease line of the addition rate α when the difference value becomes larger than the first threshold value is always constant. However, the second threshold value may also be changed according to the hit rate to change the slope of the gradual decrease line.

次に、加算率変換出力部608および609におけるゲインGAの寄与について説明する。   Next, the contribution of the gain GA in the addition rate conversion output units 608 and 609 will be described.

ゲインGAは、以上のようにして算出される加算率αを、さらに、変更制御するパラメータである。前述したように、このゲインGAは、ユーザにより設定されたり、撮影条件に応じて画像の明るさに応じて設定されたりするものである。例えばユーザにより設定する場合には、NR加算により、より大きなノイズ低減効果を得ようとする場合には、ゲインGAは大きくする。すると、上述のようにして算出された加算率αが、ゲインGAに応じた値に変更制御される。   The gain GA is a parameter for further changing and controlling the addition rate α calculated as described above. As described above, the gain GA is set by the user or set according to the brightness of the image according to the shooting conditions. For example, when setting is performed by the user, the gain GA is increased in order to obtain a larger noise reduction effect by NR addition. Then, the addition rate α calculated as described above is controlled to be changed to a value corresponding to the gain GA.

図63に、加算率変換出力部608および609における、ゲインGAと、ヒット率βと、加算率αとの関係を示す。図63では、加算率αは、ヒット率β=0の場合の加算率を基準加算率αoとして、その基準加算率αoを基にした値として示している。   FIG. 63 shows the relationship among the gain GA, the hit rate β, and the addition rate α in the addition rate conversion output units 608 and 609. In FIG. 63, the addition rate α is shown as a value based on the reference addition rate αo with the addition rate when the hit rate β = 0 as the reference addition rate αo.

この図63の例においては、ゲインGAは、ユーザにより、あるいは、撮影条件などにより、GA=0、GA=1、GA=2、GA=3の4段階に、変更設定可能とされる。そして、ヒット率βも、β=0、β=0.25、β=0.5、β=1.0の4段階に設定されるようにされる。   In the example of FIG. 63, the gain GA can be changed and set in four stages of GA = 0, GA = 1, GA = 2, and GA = 3, depending on the user or shooting conditions. The hit rate β is also set in four stages: β = 0, β = 0.25, β = 0.5, and β = 1.0.

そして、加算率αは、図63に示すように、基準加算率αoを係数K倍(K≧1)したものとされるが、その係数Kが、ゲインGAとヒット率βとの組み合わせに応じた倍数とされるものである。   As shown in FIG. 63, the addition rate α is obtained by multiplying the reference addition rate αo by a coefficient K (K ≧ 1), and the coefficient K depends on the combination of the gain GA and the hit rate β. It is a multiple.

以上のようにして、加算率変換出力部608では、画素差分絶対値ΔPxYと、ノイズ標準偏差σYと、ヒット率βと、ゲインGAとから、輝度成分の画素差分に基づく出力加算率αYAを出力する。また、加算率変換出力部608では、平均差分絶対値ΔMeYと、ノイズ標準偏差σYと、ヒット率βと、ゲインGAとから、輝度成分の平均差分に基づく出力加算率αYBを出力する。   As described above, the addition rate conversion output unit 608 outputs the output addition rate αYA based on the pixel difference of the luminance component from the pixel difference absolute value ΔPxY, the noise standard deviation σY, the hit rate β, and the gain GA. To do. Also, the addition rate conversion output unit 608 outputs an output addition rate αYB based on the average difference of luminance components from the average difference absolute value ΔMeY, the noise standard deviation σY, the hit rate β, and the gain GA.

色差信号成分については、平均差分は計算されず、画素差分絶対値のみが計算されて、上述した輝度成分と同様にして、色差成分に基づく加算率が算出される。   For the color difference signal component, the average difference is not calculated, only the pixel difference absolute value is calculated, and the addition rate based on the color difference component is calculated in the same manner as the luminance component described above.

図58は、加算率計算部21における、色差成分についての処理部分である。図58を参照して、色差成分についての加算率計算処理についての説明する。   FIG. 58 is a processing portion for the color difference component in the addition rate calculation unit 21. With reference to FIG. 58, the addition rate calculation process for the color difference component will be described.

すなわち、ターゲット画像のデータTGvのうちの青の色差データCbtgは、ローパスフィルタ621を通じて差分絶対値計算部623に供給される。また、動き補償画像のデータMCvのうちの青の色差データCbmcが、ローパスフィルタ622を通じて差分絶対値計算部623に供給される。差分絶対値計算部623は、画素毎に、色差データCbtgと色差データCbmcとの画素差分絶対値ΔPxCbを算出し、算出した画素差分絶対値ΔPxCbを、加算率変換出力部625に供給する。   That is, blue color difference data Cbtg in the target image data TGv is supplied to the difference absolute value calculation unit 623 through the low-pass filter 621. Also, the blue color difference data Cbmc in the motion compensation image data MCv is supplied to the difference absolute value calculation unit 623 through the low-pass filter 622. The difference absolute value calculation unit 623 calculates the pixel difference absolute value ΔPxCb between the color difference data Cbtg and the color difference data Cbmc for each pixel, and supplies the calculated pixel difference absolute value ΔPxCb to the addition rate conversion output unit 625.

そして、輝度成分の場合と同様に、画素値の青の色差成分についてのノイズモデルメモリ624が設けられ、このノイズモデルメモリ624には、画素値の青の色差成分値に対するノイズ標準偏差σが、予め算出されて記憶されている。輝度成分の場合と同様に、ノイズモデルメモリ624には、画像の照度Lxに応じた複数個のノイズモデルが記憶されている。   Similarly to the case of the luminance component, a noise model memory 624 for the blue color difference component of the pixel value is provided. In the noise model memory 624, the noise standard deviation σ with respect to the blue color difference component value of the pixel value is It is calculated and stored in advance. As in the case of the luminance component, the noise model memory 624 stores a plurality of noise models corresponding to the illuminance Lx of the image.

そして、ターゲットブロック毎の照度Lxと、ローパスフィルタ621を通じたターゲット画像データTGvの色差データCbtgが、ノイズモデルメモリ624に供給される。これにより、ノイズモデルメモリ624から、照度Lxおよび色差データCbtgにより定まるノイズ標準偏差σCbが得られ、加算率変換出力部625に供給される。   Then, the illuminance Lx for each target block and the color difference data Cbtg of the target image data TGv through the low-pass filter 621 are supplied to the noise model memory 624. Thus, the noise standard deviation σCb determined by the illuminance Lx and the color difference data Cbtg is obtained from the noise model memory 624 and supplied to the addition rate conversion output unit 625.

さらに、この加算率変換出力部625には、動きベクトル算出部15からのヒット率βと、外部からのゲインGAが供給される。   Further, the addition rate conversion output unit 625 is supplied with a hit rate β from the motion vector calculation unit 15 and an external gain GA.

加算率変換出力部625は、上述した加算率変換出力部608や609と同様の構成を有するもので、これよりは、画素差分絶対値ΔPxCbと、ノイズ標準偏差σCbと、ヒット率βと、ゲインGAとの組み合わせにより定まる加算率αCbが得られる。   The addition rate conversion output unit 625 has the same configuration as the addition rate conversion output units 608 and 609 described above. From this, the pixel difference absolute value ΔPxCb, the noise standard deviation σCb, the hit rate β, and the gain An addition rate αCb determined by the combination with GA is obtained.

同様にして、ターゲット画像のデータTGvのうちの赤の色差データCrtgは、ローパスフィルタ631を通じて差分絶対値計算部633に供給される。また、動き補償画像のデータMCvのうちの赤の色差データCrmcが、ローパスフィルタ632を通じて差分絶対値計算部633に供給される。差分絶対値計算部633は、画素毎に、色差データCrtgと色差データCrmcとの画素差分絶対値ΔPxCrを算出し、算出した画素差分絶対値ΔPxCrを、加算率変換出力部635に供給する。   Similarly, red color difference data Crtg in the target image data TGv is supplied to the difference absolute value calculation unit 633 through the low-pass filter 631. The red color difference data Crmc in the motion compensation image data MCv is supplied to the difference absolute value calculation unit 633 through the low-pass filter 632. The difference absolute value calculation unit 633 calculates the pixel difference absolute value ΔPxCr between the color difference data Crtg and the color difference data Crmc for each pixel, and supplies the calculated pixel difference absolute value ΔPxCr to the addition rate conversion output unit 635.

そして、輝度成分の場合と同様に、画素値の赤の色差成分についてのノイズモデルメモリ634が設けられ、このノイズモデルメモリ634には、画素値の赤の色差成分値に対するノイズ標準偏差σが、予め算出されて記憶されている。輝度成分の場合と同様に、ノイズモデルメモリ634には、画像の照度Lxに応じた複数個のノイズモデルが記憶されている。   Similarly to the case of the luminance component, a noise model memory 634 for the red color difference component of the pixel value is provided, and the noise standard deviation σ with respect to the red color difference component value of the pixel value is stored in the noise model memory 634. It is calculated and stored in advance. As in the case of the luminance component, the noise model memory 634 stores a plurality of noise models corresponding to the illuminance Lx of the image.

そして、ターゲットブロック毎の照度Lxと、ローパスフィルタ631を通じたターゲット画像データTGvの色差データCrtgが、ノイズモデルメモリ634に供給される。これにより、ノイズモデルメモリ634から、照度Lxおよび色差データCrtgにより定まるノイズ標準偏差σCrが得られ、加算率変換出力部635に供給される。   The illuminance Lx for each target block and the color difference data Crtg of the target image data TGv through the low-pass filter 631 are supplied to the noise model memory 634. As a result, the noise standard deviation σCr determined by the illuminance Lx and the color difference data Crtg is obtained from the noise model memory 634 and supplied to the addition rate conversion output unit 635.

さらに、この加算率変換出力部635には、動きベクトル算出部15からのヒット率βと、外部からのゲインGAが供給される。   Further, the addition rate conversion output unit 635 is supplied with a hit rate β from the motion vector calculation unit 15 and an external gain GA.

加算率変換出力部635は、上述した加算率変換出力部608や609と同様の構成を有するもので、これよりは、画素差分絶対値ΔPxCrと、ノイズ標準偏差σCrと、ヒット率βと、ゲインGAとの組み合わせにより定まる加算率αCrが得られる。   The addition rate conversion output unit 635 has the same configuration as the addition rate conversion output units 608 and 609 described above. From this, the pixel difference absolute value ΔPxCr, the noise standard deviation σCr, the hit rate β, and the gain An addition rate αCr determined by the combination with GA is obtained.

また、この実施形態では、ターゲット画像の画素分散値に基づいても、加算率を求めるようにする。分散値は、注目画素(自画素)と、その周囲近傍の例えば8画素とについて求める。この分散値は、輝度成分および色差成分のそれぞれについて求める。そして、求めた分散値のすべてから、加算率を算出する。   In this embodiment, the addition rate is also obtained based on the pixel dispersion value of the target image. The variance value is obtained for the target pixel (own pixel) and, for example, eight pixels in the vicinity thereof. This variance value is obtained for each of the luminance component and the color difference component. Then, an addition rate is calculated from all of the obtained dispersion values.

すなわち、図57に示すように、ターゲットブロックの画像データTGvの輝度データYtgは、ローパスフィルタ601を通じて空間分散フィルタ610に供給される。そして、この空間分散フィルタ610から、注目画素(自画素)と、その周囲近傍の例えば8画素との合計9個の画素についての分散値VaYが得られる。   That is, as shown in FIG. 57, the luminance data Ytg of the image data TGv of the target block is supplied to the spatial dispersion filter 610 through the low-pass filter 601. Then, from this spatial dispersion filter 610, a dispersion value VaY is obtained for a total of nine pixels, that is, the target pixel (self pixel) and, for example, eight pixels in the vicinity thereof.

また、図58に示すように、ターゲットブロックの画像データTGvの青の色差データCbtgは、ローパスフィルタ621を通じて空間分散フィルタ626に供給される。そして、この空間分散フィルタ626から、注目画素(自画素)と、その周囲近傍の例えば8画素との合計9個の画素についての分散値VaCbが得られる。   As shown in FIG. 58, the blue color difference data Cbtg of the image data TGv of the target block is supplied to the spatial dispersion filter 626 through the low-pass filter 621. Then, from this spatial dispersion filter 626, a dispersion value VaCb is obtained for a total of nine pixels, for example, the pixel of interest (own pixel) and, for example, eight pixels in the vicinity thereof.

さらに、ターゲットブロックの画像データTGvの赤の色差データCrtgは、ローパスフィルタ631を通じて空間分散フィルタ636に供給される。そして、この空間分散フィルタ636から、注目画素(自画素)と、その周囲近傍の例えば8画素との合計9個の画素についての分散値VaCrが得られる。   Further, the red color difference data Crtg of the target block image data TGv is supplied to the spatial dispersion filter 636 through the low-pass filter 631. Then, from this spatial dispersion filter 636, a dispersion value VaCr is obtained for a total of nine pixels, for example, the pixel of interest (own pixel) and, for example, eight pixels in the vicinity thereof.

そして、分散値VaY、VaCbおよびVaCrは、図57に示すように、加算部611で加算された後、加算率変換出力部612に供給される。さらに、加算率変換出力部612には、動きベクトル算出部15からのヒット率βと、外部からのゲインGAが供給される。   Then, the variance values VaY, VaCb, and VaCr are added by the adding unit 611 and then supplied to the addition rate conversion output unit 612, as shown in FIG. Further, the addition rate conversion output unit 612 is supplied with the hit rate β from the motion vector calculation unit 15 and the gain GA from the outside.

この加算率変換出力部612で求める加算率αCは、ターゲットブロックの画像が、テクスチャー成分が少なく、輝度レベル変化がなだらかな場合(グラデーションの場合)に、その加算率を抑えることを目的としている。この実施形態のようにブロック分割した画像処理においては、人間の視覚効果により、ブロック境界が非常に目立ち易くなり、特に、輝度レベル変化がなだらかな場合には殊更であることを考慮している。   The addition rate αC obtained by the addition rate conversion output unit 612 is intended to suppress the addition rate when the image of the target block has few texture components and the luminance level changes gently (in the case of gradation). In the image processing divided into blocks as in this embodiment, it is considered that the block boundary becomes very conspicuous due to human visual effects, especially when the luminance level change is gentle.

上記の目的を実現させるために、基本的には、ブロック内の分散値が低いほど加算率を低くすれば良い。この実施形態の加算率変換出力部612では、図64(A)に示すように、分散値を横軸に取ると共に、分散値を所定の段階幅毎に幾つかの段階に分け、出力加算率を各段階の分散値に応じて決定するようにする。   In order to realize the above object, basically, the lower the dispersion value in the block, the lower the addition rate. In the addition rate conversion output unit 612 of this embodiment, as shown in FIG. 64 (A), the horizontal axis represents the variance value, and the variance value is divided into several steps for each predetermined step width, and the output addition rate. Is determined according to the variance value of each stage.

図64(A)の例では、分散値を段階幅8毎に、5段階に分け、分散値0−7に対する加算率を0.0、分散値8−15に対する加算率を0.25、分散値16−23に対する加算率を0.5、分散値24−31に対する加算率を0.75、分散値32以上に対する加算率を1.0とする。   In the example of FIG. 64 (A), the variance value is divided into five steps for each step width 8, the addition rate for the variance value 0-7 is 0.0, the addition rate for the variance value 8-15 is 0.25, and the variance is The addition rate for the value 16-23 is 0.5, the addition rate for the variance value 24-31 is 0.75, and the addition rate for the variance value 32 or more is 1.0.

ところで、画像を重ね合わせる場合に、上述のようなブロック毎の境界が目立つのは、重ね合わせる画像に差異があるからである。換言すれば、背景静止画像部分については、重ね合わせる画像に差異はないので、分散値に応じた加算率の抑制をする必要はない。   By the way, when images are overlapped, the boundary for each block as described above is conspicuous because there is a difference in the images to be overlapped. In other words, with respect to the background still image portion, there is no difference in the superimposed images, so there is no need to suppress the addition rate according to the variance value.

そこで、この実施形態では、加算率変換出力部612では、ヒット率βに応じて、分散値の段階幅を制御し、ヒット率βが大きいほど、分散値の段階幅を小さくするようにする。これにより、背景静止画像部分については、分散値に応じた加算率の低減を抑制し、できるだけ、高い加算率で加算ができるようにしている。   Therefore, in this embodiment, the addition rate conversion output unit 612 controls the step width of the variance value according to the hit rate β, and the step width of the variance value is reduced as the hit rate β is increased. As a result, for the background still image portion, the reduction of the addition rate according to the variance value is suppressed, and the addition can be performed at the highest possible addition rate.

すなわち、図64の例では、ヒット率βが、例えばβ=0というように低い値のときには、分散値の段階幅は、図64(A)に示すように、「8」とする。そして、ヒット率βが、例えばβ=0.5というような値のときには、分散値の段階幅は、図64(B)に示すように、「4」とする。   That is, in the example of FIG. 64, when the hit rate β is a low value such as β = 0, for example, the step width of the variance value is “8” as shown in FIG. When the hit rate β is a value such as β = 0.5, for example, the step width of the variance value is “4” as shown in FIG.

さらに、ヒット率βが、背景静止画部分であることを示すβ=1であるときには、分散値の段階幅は、図64(C)に示すように、「0」とする。つまり、このときには、分散値による加算率の低減は行なわない。   Furthermore, when the hit rate β is β = 1 indicating that it is a background still image portion, the step width of the variance value is set to “0” as shown in FIG. That is, at this time, the addition rate is not reduced by the variance value.

上述したように、加算率変換出力部612にも、ゲインGAが供給されており、このゲインGAによる出力加算率の制御が行なえるようにしている。この例の場合、ゲインGAにより、ヒット率βとの組み合わせにより、前述した分散値の段階幅を変更制御するようにする。   As described above, the gain GA is also supplied to the addition rate conversion output unit 612, and the output addition rate can be controlled by the gain GA. In the case of this example, the step width of the variance value is changed and controlled by the gain GA in combination with the hit rate β.

図65に、加算率変換出力部612における、ゲインGAと、ヒット率βと、段階幅との関係を示す。この図65の例においても、ゲインGAは、ユーザにより、あるいは、撮影条件などにより、GA=0、GA=1、GA=2、GA=3の4段階に、変更設定可能とされる。そして、ヒット率βも、β=0、β=0.25、β=0.5、β=1.0の4段階に設定されるようにされる。   FIG. 65 shows the relationship among the gain GA, the hit rate β, and the step width in the addition rate conversion output unit 612. In the example of FIG. 65 as well, the gain GA can be changed and set in four stages of GA = 0, GA = 1, GA = 2, and GA = 3 by the user or the shooting conditions. The hit rate β is also set in four stages: β = 0, β = 0.25, β = 0.5, and β = 1.0.

なお、図65の例においては、段階幅については、ビットシフト演算により実現可能なように構成している。   In the example of FIG. 65, the step width is configured to be realized by a bit shift operation.

なお、図64に示したように、この実施形態では、分散値を用いた加算率の算出に際しては、分散値について、段階幅を用いた複数段階を設定する構成としたが、複数段階とするのではなく、当該複数段階の間を線形補間するようにする構成としても良い。また、線形補間ではなく、2次曲線補間や3次曲線補間をするようにしても良い。   As shown in FIG. 64, in this embodiment, when calculating the addition rate using the variance value, a plurality of steps using a step width is set for the variance value. Instead of this, a configuration may be adopted in which linear interpolation is performed between the plurality of stages. Further, instead of linear interpolation, quadratic curve interpolation or cubic curve interpolation may be performed.

以上のようにして、各加算率変換出力部608、609、612、625および635では、輝度差分値や色差差分値、輝度平均差分値、分散値などに応じると共に、ヒット率βに応じた値として加算率αYA、αYB、αC、αCb、αCrが算出される。   As described above, each of the addition rate conversion output units 608, 609, 612, 625, and 635 responds to the luminance difference value, the color difference difference value, the luminance average difference value, the variance value, and the like, and the value corresponding to the hit rate β. As a result, addition rates αYA, αYB, αC, αCb, and αCr are calculated.

そして、この実施形態では、これらの加算率αYA、αYB、αC、αCb、αCrが合成されて、加算率計算部21の出力加算率αが得られる。すなわち、図57に示すように、加算率変換出力部608および609からの加算率αYAおよびαYBは、乗算器613で乗算され、その乗算結果が乗算器614に供給される。この乗算器614には、加算率変換出力部625からの加算率αCbが供給されて、乗算器613の乗算結果と乗算される。   In this embodiment, the addition rates αYA, αYB, αC, αCb, and αCr are combined to obtain the output addition rate α of the addition rate calculation unit 21. That is, as shown in FIG. 57, the addition rates αYA and αYB from the addition rate conversion output units 608 and 609 are multiplied by the multiplier 613, and the multiplication result is supplied to the multiplier 614. The multiplier 614 is supplied with the addition rate αCb from the addition rate conversion output unit 625 and is multiplied by the multiplication result of the multiplier 613.

そして、この乗算器614の乗算結果は、乗算器615に供給される。この乗算器615には、加算率変換出力部635からの加算率αCrが供給されて、乗算器614の乗算結果と乗算される。また、この乗算器615の乗算結果は、乗算器616に供給される。この乗算器616には、加算率変換出力部612からの加算率αCが供給されて、乗算器615の乗算結果と乗算される。   Then, the multiplication result of the multiplier 614 is supplied to the multiplier 615. The multiplier 615 is supplied with the addition rate αCr from the addition rate conversion output unit 635 and is multiplied by the multiplication result of the multiplier 614. The multiplication result of the multiplier 615 is supplied to the multiplier 616. The multiplier 616 is supplied with the addition rate αC from the addition rate conversion output unit 612 and is multiplied by the multiplication result of the multiplier 615.

以上により、乗算器616からは、算出された全ての加算率αYA、αYB、αC、αCb、αCrが乗算された乗算結果が得られ、これが加算率計算部21の出力加算率αとして出力される。   As described above, the multiplier 616 obtains a multiplication result obtained by multiplying all the calculated addition rates αYA, αYB, αC, αCb, αCr, and outputs the result as the output addition rate α of the addition rate calculation unit 21. .

こうして、加算率計算部21からは、画素単位で、ヒット率βに応じた値として加算率αが算出され、加算部17に供給される。   In this way, the addition rate calculation unit 21 calculates the addition rate α as a value corresponding to the hit rate β in units of pixels and supplies it to the addition unit 17.

加算部17では、この加算率計算部21からの画素毎の加算率αに応じて、ターゲットブロックの画像データTGvと、動き補償ブロックの画像データMCvとが画素単位で加算される。そして、加算部17からの加算画像データは、画像メモリ部4、静止画コーデック部18を介して、記録再生装置部5に記録される。   In the addition unit 17, the image data TGv of the target block and the image data MCv of the motion compensation block are added in units of pixels according to the addition rate α for each pixel from the addition rate calculation unit 21. The added image data from the adding unit 17 is recorded in the recording / reproducing device unit 5 via the image memory unit 4 and the still image codec unit 18.

上述した実施形態によれば、ターゲットブロック毎に背景一致度合いの指標値であるヒット率βを用いて、静止画像部分では、加算率αを大きくすることができるので、NR画像として、ノイズ低減効果が大きい画像が得られるという顕著な効果を奏する。   According to the embodiment described above, the addition rate α can be increased in the still image portion by using the hit rate β that is the index value of the degree of background matching for each target block. Produces a remarkable effect that a large image can be obtained.

例えば、図66に示すようなノイズがあるターゲット画像(図66(A))と、参照画像(図66(B))とについてのNR画像を考える。なお、図66において、丸印で示す部分は、ターゲット画像と参照画像との間における動被写体部分である。この例の2枚の画像では、この動被写体部分以外は、全て背景静止画部分となっている。   For example, consider an NR image for a target image with noise as shown in FIG. 66 (FIG. 66A) and a reference image (FIG. 66B). In FIG. 66, a portion indicated by a circle is a moving subject portion between the target image and the reference image. The two images in this example are all background still image portions except for the moving subject portion.

図66の例の2枚の画像についてブロックマッチングを行なって、各ターゲットブロックについてローカル動きベクトルLMVを求め、そのローカル動きベクトルLMVを図示すると、図67に示すようなものとなる。   66. Block matching is performed on the two images in the example of FIG. 66, the local motion vector LMV is obtained for each target block, and the local motion vector LMV is illustrated as shown in FIG.

そして、上述のようなヒット率βによる考慮を行なわずに、このローカル動きベクトルLMVを用いて、参照画像から動き補償画像を行い、加算率判定を行った結果の加算率分布画像を、白黒画像として図68に示す。図68では、加算率が大きくなるにつれ、より白で表わし、加算率がちいさくなるにつれ、より黒で表わしている。   Then, without considering the hit rate β as described above, using this local motion vector LMV, the motion compensation image is performed from the reference image, and the addition rate distribution image as the result of the addition rate determination is obtained as a monochrome image. As shown in FIG. In FIG. 68, as the addition rate increases, it is expressed in white, and as the addition rate decreases, it is expressed in black.

図67において丸印をして示した部分は背景静止画部分であって、ローカル動きベクトルLMVも正しいものが得られているが、ヒット率βを考慮していないので、図68における対応部分においては、加算率が低くなっていることがわかる。つまり、期待通りのノイズ低減効果を得ることができないことが分かる。   In FIG. 67, the circled portion is the background still image portion, and the correct local motion vector LMV is obtained. However, since the hit rate β is not considered, the corresponding portion in FIG. Indicates that the addition rate is low. That is, it can be seen that the expected noise reduction effect cannot be obtained.

次に、上述した実施形態で説明したように、図66に示した2枚の画像について、グローバルモーションGMを求め、当該グローバルモーションGMから生成したグローバル動きベクトルGMVを図示すると、図69(A)に示すようなものとなる。   Next, as described in the above-described embodiment, the global motion GM is obtained for the two images shown in FIG. 66, and the global motion vector GMV generated from the global motion GM is illustrated in FIG. 69 (A). It will be as shown in

そして、生成したグローバル動きベクトルGMVと、ローカル動きベクトルLMVとの一致度合いをチェックし、その結果、動き補償画生成部16に出力するものとされた動きベクトルを図示すると、図69(B)に示すようなものとなる。図69(B)の右下の画像部分についての大きな動きベクトルは、図66で示した動被写体画像部分である。この図69から分かるように、この実施形態によれば、背景静止画像部分と、動被写体部分とが、正しく区別されて判定される。   Then, the degree of coincidence between the generated global motion vector GMV and the local motion vector LMV is checked. As a result, the motion vector to be output to the motion compensation image generation unit 16 is illustrated in FIG. 69 (B). As shown. The large motion vector for the lower right image portion in FIG. 69B is the moving subject image portion shown in FIG. As can be seen from FIG. 69, according to this embodiment, the background still image portion and the moving subject portion are correctly distinguished and determined.

そして、図69(B)の動きベクトルを生成する際に算出されたヒット率βを画像と対応させて図示すると、図70に示すようなものとなる。ただし、この図70では、ローカル動きベクトルLMVと、グローバル動きベクトルGMVとの一致度合いは、一致、不一致の2値で判定して、ヒット率βがβ=0と、β=1との2値で得られる場合として示している。白色部分がβ=1、黒色部分がβ=0の部分である。   Then, when the hit rate β calculated when generating the motion vector of FIG. 69B is shown in correspondence with the image, it becomes as shown in FIG. However, in FIG. 70, the degree of coincidence between the local motion vector LMV and the global motion vector GMV is determined by binary values of coincidence and non-coincidence, and the hit rate β is a binary value of β = 0 and β = 1. It shows as the case obtained by. The white portion is a portion where β = 1, and the black portion is a portion where β = 0.

そして、図71は、この実施形態により求められた加算率αを、画像に対応して示したものである。図71では、加算率αについて、0.0〜1.0を128階調に分解し、白から黒になるほど加算率が下がる(α=0.0に近づく)ように表示している。   FIG. 71 shows the addition rate α obtained by this embodiment corresponding to the image. In FIG. 71, with respect to the addition rate α, 0.0 to 1.0 is divided into 128 gradations, and the addition rate is displayed so as to decrease from white to black (closer to α = 0.0).

図67と図71を比較すれば、この実施形態によれば、背景静止画部分では加算率αが上昇していることが分かる。これにより、この実施形態によれば、所期のノイズ低減効果が得られるものである。   Comparing FIG. 67 and FIG. 71, according to this embodiment, it can be seen that the addition rate α is increased in the background still image portion. Thereby, according to this embodiment, the expected noise reduction effect is acquired.

なお、加算率変換出力部608、609、612、625、635は、上述したそれぞれの4個のパラメータ入力に対して、出力加算率αYA、αYB、αC、αCb、αCrを出力する変換テーブルを備えるROMの構成とすることができる。   The addition rate conversion output units 608, 609, 612, 625, and 635 include conversion tables that output the output addition rates αYA, αYB, αC, αCb, and αCr for each of the four parameter inputs described above. A ROM configuration can be adopted.

[第3の実施形態]
上述した第2の実施形態では、ヒット率βは、ターゲットブロック単位で算出するようにした。そして、そのターゲットブロック単位のヒット率βを用いて、加算率αを制御するようにした。このため、加算率αは、画素単位で算出しているにも拘わらず、NR画像のブロック単位の境界が目立ち易いという問題がある。
[Third Embodiment]
In the second embodiment described above, the hit rate β is calculated in units of target blocks. Then, the addition rate α is controlled using the hit rate β of the target block unit. For this reason, although the addition rate α is calculated in units of pixels, there is a problem that the boundary of the block unit of the NR image is easily noticeable.

そこで、この第3の実施形態では、ターゲットブロック単位に算出したヒット率βを、自ブロックに隣接するターゲットブロックのヒット率を参照して、ヒット率βが空間的に滑らかに変化するように補間処理をするようにする。   Therefore, in the third embodiment, the hit rate β calculated for each target block is interpolated with reference to the hit rate of the target block adjacent to the own block so that the hit rate β changes spatially and smoothly. To be processed.

この第3の実施形態によれば、前述した処理1におけるブロック境界Bdも目立たなくなり、このため、処理2以降におけるブロック境界も、さらに目立たなくなるという効果がある。   According to the third embodiment, the block boundary Bd in the above-described process 1 is also inconspicuous, and therefore, the block boundary in the process 2 and later is further inconspicuous.

<ヒット率βの補間処理の第1の例>
第1の例においては、ターゲットブロック単位でヒット率βの補間を行なう。図72および図73に、この第1の例の場合における補間処理例を示す。なお、図72および図73において、Bkはターゲットブロックのそれぞれを示し、ターゲットブロックBk内に記載されている数値は、ヒット率βの値を示している。ここでは、説明の簡単のため、算出されたヒット率βは、β=1.0と、β=0.5の2値としている。
<First Example of Hit Rate β Interpolation Processing>
In the first example, the hit rate β is interpolated in units of target blocks. 72 and 73 show an example of interpolation processing in the case of the first example. 72 and 73, Bk indicates each of the target blocks, and the numerical value described in the target block Bk indicates the value of the hit rate β. Here, for simplicity of explanation, the calculated hit rate β is a binary value of β = 1.0 and β = 0.5.

図72の例は、自ターゲットブロックBkに隣接する他のターゲットブロックBkのヒット率βを参照して、空間的に滑らかに変化するように、自ターゲットブロックBkのヒット率を小さくする方向に補間する例である。すなわち、ターゲットブロックBk単位に算出されたヒット率βが、図72(A)に示すような場合において、補間処理により、図72(B)に示すように、所定のターゲットブロックBkのヒット率βが変更される。   The example in FIG. 72 refers to the hit rate β of another target block Bk adjacent to the own target block Bk, and interpolates in a direction to reduce the hit rate of the own target block Bk so as to change spatially smoothly. This is an example. That is, when the hit rate β calculated for each target block Bk is as shown in FIG. 72A, the hit rate β of a predetermined target block Bk is obtained by interpolation as shown in FIG. 72B. Is changed.

図72の例では、自ターゲットブロックBkのヒット率βがβ=1.0であるときであって、隣接する他のターゲットブロックBkのヒット率βがβ=0.0であるときに、当該自ターゲットブロックBkを補間対象のターゲットブロックとする。そして、その補間対象のターゲットブロックのヒット率βを、この例では、β=1.0からβ=0.5に変更する。これにより、ターゲットブロックBk単位のヒット率βが、図72(B)に示すように、空間的に滑らかに変化するようにされる。   In the example of FIG. 72, when the hit rate β of its own target block Bk is β = 1.0 and the hit rate β of another adjacent target block Bk is β = 0.0, The target block Bk is set as a target block to be interpolated. Then, the hit rate β of the target block to be interpolated is changed from β = 1.0 to β = 0.5 in this example. As a result, the hit rate β of the target block Bk unit is spatially smoothly changed as shown in FIG. 72 (B).

図73の例は、自ターゲットブロックBkに隣接する他のターゲットブロックBkのヒット率βを参照して、空間的に滑らかに変化するように、自ターゲットブロックBkのヒット率を大きくする方向に補間する例である。すなわち、ターゲットブロックBk単位に算出されたヒット率βが、図73(A)に示すような場合において、補間処理により、図73(B)に示すように、所定のターゲットブロックBkのヒット率βが変更される。   The example in FIG. 73 refers to the hit rate β of another target block Bk adjacent to the own target block Bk, and interpolates in a direction to increase the hit rate of the own target block Bk so as to change spatially smoothly. This is an example. That is, when the hit rate β calculated for each target block Bk is as shown in FIG. 73A, the hit rate β of a predetermined target block Bk is obtained by interpolation as shown in FIG. 73B. Is changed.

図73の例では、自ターゲットブロックのヒット率βがβ=0.0であるときであって、隣接する他のターゲットブロックのヒット率βがβ=1.0であるときに、当該自ターゲットブロックBkを補間対象のターゲットブロックとする。そして、その補間対象の自ターゲットブロックのヒット率βを、β=0.0からβ=0.5に変更する。これにより、ターゲットブロックBk単位のヒット率βが、図73(B)に示すように、空間的に滑らかに変化するようにされる。   In the example of FIG. 73, when the hit rate β of the target block is β = 0.0 and the hit rate β of another adjacent target block is β = 1.0, the target The block Bk is set as a target block to be interpolated. Then, the hit rate β of the target block to be interpolated is changed from β = 0.0 to β = 0.5. As a result, the hit rate β of the target block Bk unit is spatially smoothly changed as shown in FIG. 73 (B).

これにより、ヒット率βは、ターゲットブロック単位に算出されたとしても、ブロック単位の境界を目立たないようにすることができる。   Thereby, even if the hit rate β is calculated for each target block, it is possible to make the boundary of the block unit inconspicuous.

<ヒット率βの補間処理の第2の例>
第2の例においては、ターゲットブロックBkをさらに分割した細ブロック単位で、ヒット率βの補間を行なう。図74および図75に、この第2の例の場合の補間処理例を示す。図74および図75において、Bkはターゲットブロックのそれぞれを示し、SBkは、当該ターゲットブロックBkを4分割した細ブロック、SSBkは、当該ターゲットブロックBkを8分割した細ブロックを示している。そして、ターゲットブロックBkや細ブロック内などに記載されている数値は、ヒット率βの値を示している。この第2の例においても、説明の簡単のため、算出されたヒット率(補間処理前のヒット率)βは、β=1.0と、β=0.5の2値としている。
<Second example of interpolation processing of hit rate β>
In the second example, the hit rate β is interpolated in units of fine blocks obtained by further dividing the target block Bk. 74 and 75 show an example of interpolation processing in the case of this second example. 74 and 75, Bk represents each of the target blocks, SBk represents a fine block obtained by dividing the target block Bk into four, and SSBk represents a fine block obtained by dividing the target block Bk into eight. The numerical values described in the target block Bk and the fine block indicate the value of the hit rate β. Also in this second example, for simplicity of explanation, the calculated hit rate (hit rate before interpolation processing) β is a binary value of β = 1.0 and β = 0.5.

図74の例は、自ターゲットブロックBkに隣接する他のターゲットブロックBkのヒット率βを参照して、空間的に滑らかに変化するように、自ターゲットブロックBkのヒット率を小さくする方向に補間する例である。   The example of FIG. 74 refers to the hit rate β of another target block Bk adjacent to its own target block Bk, and interpolates in a direction to reduce the hit rate of its own target block Bk so as to change smoothly spatially. This is an example.

そして、図74(A)および(B)に示す例は、ターゲットブロックBkを4分割した細ブロックSBk単位で補間を行なう場合である。すなわち、ターゲットブロックBk単位に算出されたヒット率βが、図74(A)に示すような場合において、補間処理により、図74(B)に示すように、所定のターゲットブロックBk内の細ブロックSBkのヒット率βが変更される。   In the example shown in FIGS. 74A and 74B, interpolation is performed in units of fine blocks SBk obtained by dividing the target block Bk into four. That is, when the hit rate β calculated for each target block Bk is as shown in FIG. 74 (A), the fine block in the predetermined target block Bk is obtained by interpolation processing as shown in FIG. 74 (B). The hit rate β of SBk is changed.

図74(B)の例では、自ターゲットブロックBkのヒット率βがβ=1.0であるときであって、隣接する他のターゲットブロックBkのヒット率βがβ=0.0であるときに、当該自ターゲットブロックBkを補間対象のターゲットブロックとする。そして、その補間対象の自ターゲットブロックのヒット率βを、β=1.0以下の値に、細ブロックSBk単位に変更する。   In the example of FIG. 74 (B), when the hit rate β of its own target block Bk is β = 1.0 and the hit rate β of another adjacent target block Bk is β = 0.0. In addition, the target block Bk is set as a target block to be interpolated. Then, the hit rate β of the target block to be interpolated is changed to a value of β = 1.0 or less in units of fine blocks SBk.

この場合に、自ターゲットブロックBk内の全ての細ブロックSBkのヒット率βをβ=0.5に変更するのではなく、ヒット率βがβ=0.0である他のターゲットブロックBkに隣接する細ブロックSBkのみのヒット率βをβ=0.5に変更する。そして、自ターゲットブロックBk内の他の細ブロックのヒット率はβ=1.0のまま保持するようにする。この第2の例の場合、隣接するターゲットブロックBkには、斜め方向に隣接するものも含むものとする。したがって、斜め方向に隣接するターゲットブロックBkのヒット率βがβ=0.0である細ブロックSBkのヒット率βも、β=0.5に変更する。   In this case, instead of changing the hit rate β of all the fine blocks SBk in the own target block Bk to β = 0.5, it is adjacent to another target block Bk whose hit rate β is β = 0.0. The hit rate β of only the fine block SBk to be changed is changed to β = 0.5. Then, the hit rate of other fine blocks in the own target block Bk is held as β = 1.0. In the case of this second example, the adjacent target blocks Bk include those adjacent in the oblique direction. Therefore, the hit rate β of the fine block SBk in which the hit rate β of the target block Bk adjacent in the oblique direction is β = 0.0 is also changed to β = 0.5.

そして、図74(A)および(C)に示す例は、ターゲットブロックBkを8分割した細ブロックSSBk単位で補間を行なう場合である。この例では、自ターゲットブロックBkのヒット率βがβ=1.0であるのを、補間対象となるターゲットブロックBkでは、細ブロックSSBk単位で、ヒット率βを、0.25,0.5,0,75、1.0というように、変化幅0.25で変更する。   In the example shown in FIGS. 74A and 74C, interpolation is performed in units of fine blocks SSBk obtained by dividing the target block Bk into eight. In this example, the hit rate β of the own target block Bk is β = 1.0, but the target block Bk to be interpolated is set to a hit rate β of 0.25, 0.5 for each fine block SSBk. , 0, 75, 1.0, etc., with a change width of 0.25.

すなわち、ターゲットブロックBk単位に算出されたヒット率βが、図74(A)に示すような場合において、補間処理により、図74(C)に示すように、所定のターゲットブロックBk内の細ブロックSSBkのヒット率βが変更される。   That is, when the hit rate β calculated for each target block Bk is as shown in FIG. 74 (A), the fine block in the predetermined target block Bk is obtained by interpolation processing as shown in FIG. 74 (C). The hit rate β of SSBk is changed.

図74(C)の例では、自ターゲットブロックBkのヒット率βがβ=1.0であるときであって、隣接する他のターゲットブロックBkのヒット率βがβ=0.0であるときに、当該自ターゲットブロックBkを補間対象のターゲットブロックとする。そして、その補間対象の自ターゲットブロックBkのヒット率βを、細ブロックSSBk単位で変更する。   In the example of FIG. 74C, when the hit rate β of its own target block Bk is β = 1.0, and the hit rate β of another adjacent target block Bk is β = 0.0. In addition, the target block Bk is set as a target block to be interpolated. Then, the hit rate β of the target block Bk to be interpolated is changed in units of fine blocks SSBk.

この場合に、ヒット率βがβ=0.0である他のターゲットブロックBkに隣接する細ブロックSSBkのヒット率βはβ=0.25に変更する。そして、自ターゲットブロックBk内のβ=0.25に変更した細ブロックSSBkに隣接する細ブロックのヒット率はβ=0.5とする。   In this case, the hit rate β of the fine block SSBk adjacent to another target block Bk whose hit rate β is β = 0.0 is changed to β = 0.25. Then, the hit rate of the fine block adjacent to the fine block SSBk changed to β = 0.25 in the own target block Bk is assumed to be β = 0.5.

そして、補間対象のターゲットブロックBkにおいて、ヒット率βがβ=1.0である他のターゲットブロックBkに隣接する細ブロックSSBkのヒット率βはβ=1.0のままとする。そして、自ターゲットブロックBk内のβ=1.0のままとした細ブロックSSBkに隣接する細ブロックのヒット率はβ=0.75とする。そして、自ターゲットブロックBk内のβ=0.75に変更した細ブロックSSBkに隣接する細ブロックのヒット率はβ=0.5とする。   Then, in the target block Bk to be interpolated, the hit rate β of the fine block SSBk adjacent to another target block Bk whose hit rate β is β = 1.0 remains β = 1.0. Then, the hit rate of the fine block adjacent to the fine block SSBk in which β = 1.0 in the target block Bk remains β = 0.75. Then, the hit rate of the fine block adjacent to the fine block SSBk changed to β = 0.75 in the own target block Bk is assumed to be β = 0.5.

この例の場合も、隣接するターゲットブロックBkには、斜め方向に隣接するものも含むものとする。   Also in this example, the adjacent target blocks Bk include those adjacent in the oblique direction.

これにより、ターゲットブロックBk単位のヒット率βが、図74(B)または(C)に示すように、空間的に滑らかに変化するようにされる。   As a result, the hit rate β for each target block Bk is spatially and smoothly changed as shown in FIG. 74 (B) or (C).

次に、図75の例は、自ターゲットブロックBkに隣接する他のターゲットブロックBkのヒット率βを参照して、空間的に滑らかに変化するように、自ターゲットブロックBkのヒット率を大きくする方向に補間する例である。   Next, in the example of FIG. 75, the hit rate β of the target block Bk is increased so as to spatially smoothly change with reference to the hit rate β of another target block Bk adjacent to the target block Bk. This is an example of interpolation in the direction.

そして、図75(A)および(B)に示す例は、ターゲットブロックBkを4分割した細ブロックSBk単位で補間を行なう場合である。すなわち、ターゲットブロックBk単位に算出されたヒット率βが、図75(A)に示すような場合において、補間処理により、図75(B)に示すように、所定のターゲットブロックBk内の細ブロックSBkのヒット率βが変更される。   The example shown in FIGS. 75A and 75B is a case where interpolation is performed in units of fine blocks SBk obtained by dividing the target block Bk into four. That is, when the hit rate β calculated for each target block Bk is as shown in FIG. 75 (A), by the interpolation process, as shown in FIG. 75 (B), the fine block in the predetermined target block Bk. The SBk hit rate β is changed.

図75(B)の例では、自ターゲットブロックBkのヒット率βがβ=0.0であるときであって、隣接する他のターゲットブロックBkのヒット率βがβ=1.0であるときに、当該自ターゲットブロックBkを補間対象のターゲットブロックとする。そして、その補間対象の自ターゲットブロックのヒット率βを、β=0.0以上の値に、細ブロックSBk単位に変更する。   In the example of FIG. 75 (B), when the hit rate β of its own target block Bk is β = 0.0 and the hit rate β of another adjacent target block Bk is β = 1.0. In addition, the target block Bk is set as a target block to be interpolated. Then, the hit rate β of the target block to be interpolated is changed to a value of β = 0.0 or more for each fine block SBk.

この場合に、自ターゲットブロックBk内の全ての細ブロックSBkのヒット率βをβ=0.5に変更するのではなく、ヒット率βがβ=1.0である他のターゲットブロックBkに隣接する細ブロックSBkのみのヒット率βをβ=0.5に変更する。そして、自ターゲットブロックBk内の他の細ブロックのヒット率はβ=0.0のまま保持するようにする。この第2の例の場合、隣接するターゲットブロックBkには、斜め方向に隣接するものも含むものとする。したがって、斜め方向に隣接するターゲットブロックBkのヒット率βがβ=0.0である細ブロックSBkのヒット率βも、β=0.5に変更する。   In this case, instead of changing the hit rate β of all the fine blocks SBk in the target block Bk to β = 0.5, the hit rate β is adjacent to another target block Bk with β = 1.0. The hit rate β of only the fine block SBk to be changed is changed to β = 0.5. Then, the hit rate of other fine blocks in the own target block Bk is held as β = 0.0. In the case of this second example, the adjacent target blocks Bk include those adjacent in the oblique direction. Therefore, the hit rate β of the fine block SBk in which the hit rate β of the target block Bk adjacent in the oblique direction is β = 0.0 is also changed to β = 0.5.

そして、図75(A)および(C)に示す例は、ターゲットブロックBkを8分割した細ブロックSSBk単位で補間を行なう場合である。この例では、自ターゲットブロックBkのヒット率βがβ=0.0であるのを、補間対象となるターゲットブロックBkでは、細ブロックSSBk単位で、ヒット率βを、0.25,0.5,0,75、1.0というように、変化幅0.25で変更する。   In the example shown in FIGS. 75A and 75C, interpolation is performed in units of fine blocks SSBk obtained by dividing the target block Bk into eight. In this example, the hit rate β of the own target block Bk is β = 0.0. In the target block Bk to be interpolated, the hit rate β is set to 0.25, 0.5 for each fine block SSBk. , 0, 75, 1.0, etc., with a change width of 0.25.

すなわち、ターゲットブロックBk単位に算出されたヒット率βが、図75(A)に示すような場合において、補間処理により、図75(C)に示すように、所定のターゲットブロックBk内の細ブロックSSBkのヒット率βが変更される。   That is, when the hit rate β calculated for each target block Bk is as shown in FIG. 75A, the fine block in the predetermined target block Bk is obtained by interpolation processing as shown in FIG. 75C. The hit rate β of SSBk is changed.

図75(C)の例では、自ターゲットブロックBkのヒット率βがβ=0.0であるときであって、隣接する他のターゲットブロックBkのヒット率βがβ=1.0であるときに、当該自ターゲットブロックBkを補間対象のターゲットブロックとする。そして、その補間対象の自ターゲットブロックBkのヒット率βを、細ブロックSSBk単位で変更する。   In the example of FIG. 75C, when the hit rate β of its own target block Bk is β = 0.0, and the hit rate β of another adjacent target block Bk is β = 1.0. In addition, the target block Bk is set as a target block to be interpolated. Then, the hit rate β of the target block Bk to be interpolated is changed in units of fine blocks SSBk.

この場合に、ヒット率βがβ=1.0である他のターゲットブロックBkに隣接する細ブロックSSBkのヒット率βはβ=0.75に変更する。そして、自ターゲットブロックBk内のβ=0.75に変更した細ブロックSSBkに隣接する細ブロックのヒット率はβ=0.5とする。   In this case, the hit rate β of the fine block SSBk adjacent to another target block Bk whose hit rate β is β = 1.0 is changed to β = 0.75. Then, the hit rate of the fine block adjacent to the fine block SSBk changed to β = 0.75 in the own target block Bk is assumed to be β = 0.5.

そして、補間対象のターゲットブロックBkにおいて、ヒット率βがβ=0.0である他のターゲットブロックBkに隣接する細ブロックSSBkのヒット率βはβ=0.0のままとする。そして、自ターゲットブロックBk内のβ=0.0のままとした細ブロックSSBkに隣接する細ブロックのヒット率はβ=0.25とする。そして、自ターゲットブロックBk内のβ=0.25に変更した細ブロックSSBkに隣接する細ブロックのヒット率はβ=0.5とする。   Then, in the target block Bk to be interpolated, the hit rate β of the fine block SSBk adjacent to another target block Bk whose hit rate β is β = 0.0 remains β = 0.0. Then, the hit rate of the fine block adjacent to the fine block SSBk in which β = 0.0 in the own target block Bk is set to β = 0.25. Then, the hit rate of the fine block adjacent to the fine block SSBk changed to β = 0.25 in the own target block Bk is assumed to be β = 0.5.

この例の場合も、隣接するターゲットブロックBkには、斜め方向に隣接するものも含むものとする。   Also in this example, the adjacent target blocks Bk include those adjacent in the oblique direction.

これにより、ターゲットブロックBk単位のヒット率βが、図75(B)または(C)に示すように、空間的に滑らかに変化するようにされる。   As a result, the hit rate β of the target block Bk unit is spatially smoothly changed as shown in FIG. 75 (B) or (C).

[第4の実施形態]
上述の実施形態では、ローカル動きベクトル算出部154では、階層化ブロックマッチングを行って、基底面におけるローカル動きベクトルLMVを算出した。そして、動きベクトル信頼性指標値算出部156では、当該基底面のローカル動きベクトルLMVの信頼性指標Ftを算出した。
[Fourth Embodiment]
In the above-described embodiment, the local motion vector calculation unit 154 performs hierarchical block matching to calculate the local motion vector LMV on the base surface. Then, the motion vector reliability index value calculation unit 156 calculates the reliability index Ft of the local motion vector LMV on the base surface.

また、動きベクトル算出部157では、この基底面のローカル動きベクトルLMVについて、その信頼性指標値Ftを生成し、当該信頼性指標値Ftを用いて信頼性の高いローカル動きベクトルLMVを抽出するようにした。そして、当該信頼性の高いローカル動きベクトルLMVを用いてグローバルモーションGMを算出し、そのグローバルモーションGMからグローバル動きベクトルGMVを算出するようにした。   Further, the motion vector calculation unit 157 generates a reliability index value Ft for the basal plane local motion vector LMV, and extracts a highly reliable local motion vector LMV using the reliability index value Ft. I made it. Then, the global motion GM is calculated using the highly reliable local motion vector LMV, and the global motion vector GMV is calculated from the global motion GM.

ところで、縮小面動きベクトルMVsや中間面動きベクトルMVmを、基底面に対する画像縮小倍率の逆数倍することで、基底面基底面動きベクトルMVbを得ることができる。そこで、グローバルモーションGMを算出するためには、基底面動きベクトルMVbを求めなくても、縮小面動きベクトルMVsや中間面動きベクトルMVmから、グローバルモーションGMを求めるようにすることもできる。   By the way, the basal plane basal plane motion vector MVb can be obtained by multiplying the reduced plane motion vector MVs and the intermediate plane motion vector MVm by the inverse of the image reduction magnification with respect to the basal plane. Therefore, in order to calculate the global motion GM, the global motion GM can be obtained from the reduced surface motion vector MVs and the intermediate surface motion vector MVm without obtaining the base surface motion vector MVb.

例えば、縮小面動きベクトルMVsからグローバルモーションGMを求める場合には、先ず、ローカル動きベクトル算出部154で、縮小面におけるローカル動きベクトルLMV(縮小面動きベクトルMVs)を算出する。   For example, when the global motion GM is obtained from the reduced plane motion vector MVs, first, the local motion vector calculation unit 154 calculates the local motion vector LMV (reduced plane motion vector MVs) on the reduced plane.

そして、動きベクトル信頼性指標値算出部156で、算出した縮小面動きベクトルMVsについての信頼性指標Ftを算出する。また、動きベクトル算出部157で、この縮小面のローカル動きベクトルLMVについての信頼性指標値Ftを用いて、信頼性の高いローカル動きベクトルLMVを抽出する。そして、動きベクトル算出部157で、当該信頼性の高いローカル動きベクトルLMVを用いて、グローバルモーションGMおよびグローバル動きベクトルGMVを算出するようにするようにする。   Then, the motion vector reliability index value calculation unit 156 calculates a reliability index Ft for the calculated reduced plane motion vector MVs. Also, the motion vector calculation unit 157 extracts a highly reliable local motion vector LMV using the reliability index value Ft for the local motion vector LMV of the reduced surface. Then, the motion vector calculation unit 157 calculates the global motion GM and the global motion vector GMV using the highly reliable local motion vector LMV.

中間面までの階層でブロックマッチングを行なって得た中間面動きベクトルMVmから、グローバルモーションGMを用いる場合も同様にして算出することができる。ただし、グローバル動きベクトルGMVの位置のSAD値についての補正を行う場合のオフセット値OFSやゲインgは、それぞれの階層に応じて適切に設定するようにする。   It can be calculated in the same manner when using the global motion GM from the intermediate plane motion vector MVm obtained by performing block matching in the hierarchy up to the intermediate plane. However, the offset value OFS and the gain g when correcting the SAD value at the position of the global motion vector GMV are appropriately set according to each layer.

このようにして縮小面や中間面のローカル動きベクトルを用いて、グローバルモーションGMおよびグローバル動きベクトルGMVを求めるメリットは、次の通りある。   The merit of obtaining the global motion GM and the global motion vector GMV using the local motion vectors of the reduced surface and the intermediate surface in this way is as follows.

1つは、先に述べたように縮小面や中間面は、その生成にあたってローパスフィルタが施されるため、ノイズが除去され、結果として、得られたローカル動きベクトルがノイズの影響を受けにくい点である。   First, as described above, since the low-pass filter is applied to the reduction surface and the intermediate surface, noise is removed, and as a result, the obtained local motion vector is not easily affected by noise. It is.

他の1つは、縮小面や中間面では、ターゲットブロックの数が少なくなるので、ローカル動きベクトルの数は少なくなり、演算コストが小さくなると共に、処理に要する時間や小さいので、処理の高速化が可能であることである。   The other is that the number of target blocks is reduced on the reduction plane and the intermediate plane, so the number of local motion vectors is reduced, the calculation cost is reduced, and the processing time and time are reduced, resulting in faster processing. Is possible.

上述の例のように、通常は、ハードウェアの制約から、縮小面、中間面、基底面のマッチング処理ブロック単位は同じサイズとなる。このため、画サイズの小さい縮小面のターゲットブロックの数(=ローカル動きベクトルの数)は、基底面のみでブロックマッチングを行う場合に較べて相対的に少なくなる。   As in the example described above, the matching processing block units for the reduced surface, the intermediate surface, and the base surface are usually the same size due to hardware limitations. For this reason, the number of target blocks (= the number of local motion vectors) on the reduced surface with a small image size is relatively smaller than when block matching is performed only on the base surface.

そして、縮小面動きベクトルからグローバルモーションおよびグローバル動きベクトルGMVを求める場合には、中間面および基底面での動きベクトル検出処理は省略することができる。また、中間面動きベクトルからグローバルモーションおよびグローバル動きベクトルGMVを求める場合には、基底面での動きベクトル検出処理は省略することができる。したがって、処理の高速化が図れる。   When the global motion and the global motion vector GMV are obtained from the reduced plane motion vector, the motion vector detection process on the intermediate plane and the base plane can be omitted. Further, when the global motion and the global motion vector GMV are obtained from the intermediate plane motion vector, the motion vector detection process on the base plane can be omitted. Therefore, the processing speed can be increased.

特に、縮小面動きベクトルMVsを用いてグローバルモーションGMおよびグローバル動きベクトルGMVを求めるようにした場合には、そのメリットは、大きい。   In particular, when the global motion GM and the global motion vector GMV are obtained using the reduced plane motion vector MVs, the merit is great.

図76に、縮小面動きベクトルMVsを用いてグローバルモーションおよびグローバル動きベクトルGMVを求め、基底面でのローカル動きベクトルLMVと比較する場合の処理の全体フローを示す。なお、この図76は、1組のターゲットフレームと参照フレームについての処理について示したものである。   FIG. 76 shows an overall flow of processing when the global motion and the global motion vector GMV are obtained using the reduced surface motion vector MVs and compared with the local motion vector LMV on the base surface. FIG. 76 shows the processing for one set of target frame and reference frame.

先ず、動きベクトル算出部15のコントロール部155は、処理をしようとする縮小面のフレーム画像についての分割始点を、上述した第1の実施形態で説明したようにして、ブロック分割位置が前のフレームでのブロック分割位置と重ならないように決定する(ステップS501)。   First, the control unit 155 of the motion vector calculation unit 15 determines the division start point for the frame image of the reduced surface to be processed as described in the first embodiment, and the block division position is the previous frame. It is determined so as not to overlap with the block division position at (step S501).

次に、動きベクトル算出部15では、縮小面ブロックマッチングを行なって、縮小面における各ターゲットブロック毎のローカル動きベクトルLMVsを求める。そして、各ターゲットブロック毎の縮小面ローカル動きベクトルLMVsの信頼性を評価して、信頼性の高い縮小面ローカル動きベクトルLMVsのみを用いてグローバルモーションGMを算出する。そして、算出したグローバルモーションからグローバル動きベクトルGMVを算出しておく(ステップS502)。   Next, the motion vector calculation unit 15 performs reduction plane block matching to obtain local motion vectors LMVs for each target block on the reduction plane. Then, the reliability of the reduced plane local motion vector LMVs for each target block is evaluated, and the global motion GM is calculated using only the reduced plane local motion vector LMVs with high reliability. Then, a global motion vector GMV is calculated from the calculated global motion (step S502).

次に、階層化ブロックマッチングのため、縮小面再ブロックマッチングを行い、縮小面ローカル動きベクトルLMVsを再算出する(ステップS503)。   Next, for the hierarchized block matching, reduced surface re-block matching is performed, and the reduced surface local motion vector LMVs is recalculated (step S503).

次に、縮小面ローカル動きベクトルLMVsから中間面におけるターゲットブロックに対する参照ブロックについてのサーチ範囲を求め、中間面ブロックマッチングを行う。そして、中間面ローカル動きベクトルLMVmを算出する(ステップS504)。   Next, a search range for a reference block with respect to the target block on the intermediate plane is obtained from the reduced plane local motion vector LMVs, and intermediate plane block matching is performed. Then, the intermediate plane local motion vector LMVm is calculated (step S504).

次に、中間面ローカル動きベクトルLMVmから基底面におけるターゲットブロックに対する参照ブロックについてのサーチ範囲を求め、基底面ブロックマッチングを行う。そして、基底面ローカル動きベクトルLMVbを算出する。そして、基底面ローカル動きベクトルLMVbと、ステップS501で算出されたグローバル動きベクトルGMVとを用いて、前述した背景一致度合いの評価判定を、ターゲットブロック毎に行う。そして、その評価判定に基づいて、ヒット率βを求めると共に、NR処理用動きベクトルMVnrを検出する(ステップS505)。   Next, a search range for a reference block with respect to the target block on the base plane is obtained from the intermediate plane local motion vector LMVm, and base plane block matching is performed. Then, a basal plane local motion vector LMVb is calculated. Then, using the basal plane local motion vector LMVb and the global motion vector GMV calculated in step S501, the above-described background matching degree evaluation determination is performed for each target block. Based on the evaluation determination, the hit rate β is obtained, and the NR processing motion vector MVnr is detected (step S505).

次に、動き補償画生成部16が、NR処理用動きベクトルMVnrを用いて、参照フレームの画像データから、ブロック単位で、動き補償画を生成する(ステップS506)。   Next, the motion compensation image generation unit 16 generates a motion compensation image in block units from the image data of the reference frame using the NR processing motion vector MVnr (step S506).

また、加算率計算部21は、ステップS505で算出されたヒット率βに基づいて、上述したようにして、画素単位で加算率αを計算する(ステップS507)。そして、加算部17では、ステップS506で生成された動き補償画とターゲット画像とを、ブロック単位で、ステップS507で計算された加算率αで加算し、NR画像を生成する(ステップS508)。   Further, the addition rate calculation unit 21 calculates the addition rate α in units of pixels as described above based on the hit rate β calculated in step S505 (step S507). Then, the adding unit 17 adds the motion compensation image generated in step S506 and the target image in units of blocks at the addition rate α calculated in step S507 to generate an NR image (step S508).

なお、上述の図76の処理フローの説明では、1回目のブロックマッチングによる動きベクトル検出時に求められたグローバルモーションGMおよびグローバル動きベクトルGMVは、階層化の再ブロックマッチングの基底面動きベクトルに対してのみ適用した。   In the description of the processing flow of FIG. 76 described above, the global motion GM and the global motion vector GMV obtained at the time of motion vector detection by the first block matching are based on the base motion vector of the hierarchical re-block matching. Only applied.

しかし、階層化の再ブロックマッチングの縮小面、中間面でも、グローバル動きベクトルGMVと、縮小面ローカル動きベクトルLMVs、中間面ローカル動きベクトルLMVmとを用いたターゲットブロックの背景一致度合い評価を行なってもよい。そして、その場合には、その結果としての動きベクトルMVnrを、縮小面、中間面における各ターゲットブロックについての動きベクトル出力とするようにする。   However, even in the reduced and intermediate planes of the hierarchical re-block matching, the target block background matching degree evaluation using the global motion vector GMV, the reduced plane local motion vector LMVs, and the intermediate plane local motion vector LMVm may be performed. Good. In this case, the resulting motion vector MVnr is used as a motion vector output for each target block on the reduced plane and the intermediate plane.

そのようにした場合、縮小面、中間面における各ターゲットブロックについての動きベクトル(ローカル動きベクトル)を、通常よりも精度良く取得することが可能となる。基底面においても同様である。その際に、前述もしたように、オフセット値OFSやゲインgは、各階層に応じて適切に設定するものである。   In such a case, it is possible to acquire the motion vector (local motion vector) for each target block on the reduced surface and the intermediate surface with higher accuracy than usual. The same applies to the basal plane. At that time, as described above, the offset value OFS and the gain g are appropriately set according to each layer.

図76の処理フローに従って処理がなされたときのブロックマッチング結果および検出された動きベクトルの様子の例を、図77(A)〜(D)に示す。この図77の例は、前述した図78(A)のターゲット画像と、図78(B)の参照画像に対して、上述の処理を適用したときの処理結果を示している。   FIGS. 77A to 77D show examples of block matching results and detected motion vectors when processing is performed according to the processing flow of FIG. The example of FIG. 77 shows a processing result when the above-described processing is applied to the above-described target image of FIG. 78A and the reference image of FIG. 78B.

図77(A)は、図78(A)のターゲット画像と、図78(B)の参照画像に対して、縮小面ブロックマッチングを行なったときの、縮小面ローカル動きベクトルLMVsの検出結果を示している。   FIG. 77A shows the detection result of the reduced surface local motion vector LMVs when reduced surface block matching is performed on the target image of FIG. 78A and the reference image of FIG. 78B. ing.

また、図77(B)は、当該縮小面ローカル動きベクトルLMVsについての信頼性評価を行い、高い信頼性を有するとされた縮小面ローカル動きベクトルLMVsおよびそのターゲットブロックを示している。なお、図77(B)で、右下隅の部分のブロックは、動被写体部分であり、縮小面ローカル動きベクトルLMVsが大きなものとなっている。   FIG. 77 (B) shows the reduced-plane local motion vector LMVs and its target block, which are evaluated to be reliable for the reduced-plane local motion vector LMVs, and have high reliability. In FIG. 77 (B), the block in the lower right corner is a moving subject portion, and has a reduced reduction plane local motion vector LMVs.

そして、図77(C)は、基底面ローカル動きベクトルLMVbから算出されたグローバルモーションGMに基づいて算出された、各ターゲットブロック毎のグローバル動きベクトルGMVである。更に、図77(D)は、再度、動きベクトル検出し、上述のようにして、背景部分と動被写体部分とを評価して、NR処理用動きベクトルMVnrを検出したものを示している。   FIG. 77C shows the global motion vector GMV for each target block calculated based on the global motion GM calculated from the base surface local motion vector LMVb. Further, FIG. 77 (D) shows a case where the motion vector is detected again and the background portion and the moving subject portion are evaluated as described above to detect the NR processing motion vector MVnr.

図77(D)から、背景部分の動きベクトルは、グローバル動きベクトルGMVとして綺麗に揃っている状態が見て取れる。   From FIG. 77 (D), it can be seen that the motion vectors of the background portion are neatly arranged as the global motion vector GMV.

なお、図77(D)において、右下の大きな動きベクトルは、ローカル動きベクトルLMVとグローバル動きベクトルGMVとを用いた評価判定において、NR処理用動きベクトルとしてグローバル動きベクトルGMVを出力しないとされた動被写体ブロックである。また、白抜きのベクトルは、サーチ範囲内の有効画素領域にグローバル動きベクトルGMVと一致する参照ベクトルが存在しなかったブロックである。   In FIG. 77 (D), the large lower right motion vector is assumed not to output the global motion vector GMV as the NR processing motion vector in the evaluation determination using the local motion vector LMV and the global motion vector GMV. This is a moving subject block. A white vector is a block in which there is no reference vector that matches the global motion vector GMV in the effective pixel region within the search range.

図77は、効果を判り易く示すために作成したものであり、実際には、よりブロックサイズの小さいターゲットブロックサイズとなる。小さいブロック単位でヒット率βの生成を行なう方が効果的であることは、上述の通りである。   FIG. 77 is created to show the effect in an easy-to-understand manner, and actually has a smaller target block size. As described above, it is more effective to generate the hit rate β in units of small blocks.

ただし、画像内の動被写体領域とベクトルを、粗い単位で検出し、追跡するようなアプリケーションの場合、図77(D)のような粗い単位で、グローバル動きベクトルGMVを用いた評価に基づく、動きベクトルMVnrを出力する方が好適である。その際、画面内全てのブロックの情報が必要なのではなく、動被写体検出の信頼性を重視するならば、図77(B)のように、1回目の動きベクトル検出時の、信頼性の高いベクトルのみから動被写体ブロックの分離をおこなって良い。   However, in the case of an application that detects and tracks a moving subject region and a vector in an image in a coarse unit, a motion based on an evaluation using the global motion vector GMV in a coarse unit as shown in FIG. 77 (D). It is preferable to output the vector MVnr. At that time, if information on all blocks in the screen is not necessary, and if reliability of moving subject detection is emphasized, the reliability at the time of the first motion vector detection is high as shown in FIG. 77 (B). The moving subject block may be separated only from the vector.

[補間処理による高精度化について]
ところで、縮小面動きベクトルや中間面動きベクトルの精度は、縮小面および中間面は基底面の画像が縮小されたものであるので、低精度となっている点を考慮する必要がある。
[High accuracy by interpolation processing]
Incidentally, it is necessary to consider that the accuracy of the reduced surface motion vector and the intermediate surface motion vector is low because the image of the base surface is reduced on the reduced surface and the intermediate surface.

そこで、この低精度の問題を改善する場合には、縮小面動きベクトルあるいは中間面動きベクトルを用いる場合には、補間処理を行う。すなわち、算出された縮小面動きベクトルあるいは中間面動きベクトルで指し示される縮小面参照ブロック位置あるいは中間面参照ブロック位置の近傍の縮小面参照ブロックあるいは中間面参照ブロックのSAD値およびその位置情報を用いて、補間処理を行う。この補間処理により、ピクセル精度の縮小面動きベクトルあるいは中間面動きベクトルの検出を行うことができる。縮小面の場合を例に、以下にこの補間処理を説明する。   Therefore, in order to improve this low-accuracy problem, interpolation processing is performed when a reduced plane motion vector or an intermediate plane motion vector is used. That is, the SAD value of the reduced surface reference block or the intermediate surface reference block in the vicinity of the reduced surface reference block position indicated by the calculated reduced surface motion vector or the intermediate surface motion vector or the intermediate surface reference block position and the position information thereof are used. To perform interpolation processing. By this interpolation processing, it is possible to detect a reduced plane motion vector or an intermediate plane motion vector with pixel accuracy. This interpolation process will be described below by taking the case of a reduction plane as an example.

例えば、縦および横、ともに1/4に縮小された縮小面でブロックマッチングを行った場合、縮小面動きベクトルは、4ピクセル精度の動きベクトルである。しかし、基底面参照フレームにおいては、縮小面動きベクトルMVsをn倍した動きベクトルの近傍に、1ピクセル精度の基底面動きベクトルMVbが存在することは明らかである。   For example, when block matching is performed on a reduced surface that has been reduced to ¼ both vertically and horizontally, the reduced surface motion vector is a 4-pixel precision motion vector. However, in the base plane reference frame, it is clear that the base plane motion vector MVb with 1 pixel accuracy exists in the vicinity of the motion vector obtained by multiplying the reduced plane motion vector MVs by n.

したがって、図79に示すように、縮小面での最小SAD値601が求まった場合、その近傍の複数個、例えば上下左右に隣接する4個のSAD値602,603,604,605を用いて補間処理を行い、ピクセル精度の動きベクトルの検出をすることを考えることができる。この場合、補間倍率は4倍必要ということになる。   Therefore, as shown in FIG. 79, when the minimum SAD value 601 on the reduction plane is obtained, interpolation is performed using a plurality of neighboring SAD values 602, 603, 604, 605, for example, four adjacent in the vertical and horizontal directions. It can be considered to perform processing and detect a motion vector with pixel accuracy. In this case, the interpolation magnification is 4 times.

例えば、二次曲線を用いて、SADテーブルを補間することで、例えばnピクセル単位でマッチング処理を行った縮小面SADテーブルから、ピクセル精度の動きベクトルを算出することを考える。この場合において、二次曲線近似補間ではなく、線形補間や、3次以上の高次の近似曲線補間を用いても良いが、精度とハードウエア化との兼ね合いから、この例では、二次曲線近似補間を用いている。   For example, it is considered to calculate a pixel-precision motion vector from a reduced surface SAD table that has been subjected to matching processing in units of n pixels, for example, by interpolating the SAD table using a quadratic curve. In this case, instead of quadratic curve approximation interpolation, linear interpolation or higher-order approximation curve interpolation of cubic or higher may be used. However, in this example, a quadratic curve is used in consideration of the balance between accuracy and hardware implementation. Approximate interpolation is used.

この二次曲線近似補間においては、図79に示すように、nピクセル精度の縮小面動きベクトルが指し示す縮小面SADテーブルのSAD値の最小値Sminと、当該最小値Sminの位置の近傍位置の複数個のSAD値(近傍縮小面SAD値という)とを使用する。この例では、近傍縮小面SAD値としては、縮小面において、最小値Sminの位置のX方向(水平方向)およびY方向(垂直方向)に隣接する4個の近傍SAD値Sx1、Sx2およびSy1、Sy2を使用する。   In this quadratic curve approximate interpolation, as shown in FIG. 79, the minimum value Smin of the SAD value of the reduced surface SAD table indicated by the reduced surface motion vector of n pixel accuracy and a plurality of positions near the position of the minimum value Smin. SAD values (referred to as neighborhood reduced surface SAD values) are used. In this example, as the neighboring reduced surface SAD values, four neighboring SAD values Sx1, Sx2, and Sy1, which are adjacent in the X direction (horizontal direction) and the Y direction (vertical direction) at the position of the minimum value Smin on the reduced surface, Use Sy2.

先ず、X方向(水平方向)の補間においては、図80に示すように、縮小面SAD値の最小値Sminと、X方向(水平方向)の近傍2点の近傍縮小面SAD値Sx1、Sx2に対して二次の近似曲線700を当てはめる。すなわち、最小値Sminと、X方向(水平方向)の近傍2点の近傍縮小面SAD値Sx1、Sx2を通る二次の近似曲線700を求める。すると、図80に示すように、この二次曲線700の極小を取る座標が、ピクセル精度のSAD値の最小値SXminとなる縮小面動きベクトル(高精度縮小面動きベクトル)のX座標Vxとなる。このときの二次曲線近似補間の式を、次式の(式e)に示す。   First, in the X direction (horizontal direction) interpolation, as shown in FIG. 80, the minimum value Smin of the reduced surface SAD value and the adjacent reduced surface SAD values Sx1 and Sx2 of the two neighboring points in the X direction (horizontal direction). On the other hand, a quadratic approximate curve 700 is applied. That is, a quadratic approximate curve 700 is obtained that passes through the minimum value Smin and two adjacent reduced surface SAD values Sx1 and Sx2 in the vicinity of the X direction (horizontal direction). Then, as shown in FIG. 80, the coordinate at which the quadratic curve 700 takes the minimum is the X coordinate Vx of the reduced surface motion vector (high-precision reduced surface motion vector) that becomes the minimum value SXmin of the SAD value with pixel accuracy. . The equation of quadratic curve approximate interpolation at this time is shown in the following equation (Equation e).

SXmin=1/2×(Sx2−Sx1)/(Sx2−2Smin+Sx1)…(式e)
この計算式(式e)で求めたピクセル精度のSAD値の最小値SXminがSADテーブル上で取るX座標が、ピクセル精度の縮小面SAD値の最小値となるX座標Vxとなる。
SXmin = 1/2 * (Sx2-Sx1) / (Sx2-2Smin + Sx1) (Expression e)
The X coordinate Vx which the minimum value SXmin of the SAD value with the pixel accuracy obtained by this calculation formula (formula e) takes on the SAD table becomes the X coordinate Vx which becomes the minimum value of the reduced surface SAD value with the pixel accuracy.

この計算式(式e)の割り算は、複数回の引き算で実現可能である。求めたいピクセル精度が、例えば、縮小面における画素ピッチの1/4の画素ピッチの精度であれば、僅か2回の引き算で求められるため、回路規模、演算時間、共に小さく、二次の近似曲線補間よりもかなり複雑な三次曲線補間と殆ど変わらない性能が実現できる。   The division of this calculation formula (formula e) can be realized by a plurality of subtractions. If the pixel accuracy to be obtained is, for example, an accuracy of 1/4 of the pixel pitch on the reduction plane, it can be obtained by subtraction twice, so both the circuit scale and the computation time are small, and a quadratic approximate curve Performance that is almost the same as cubic curve interpolation, which is considerably more complicated than interpolation, can be realized.

同様に、Y方向(垂直方向)の補間においては、縮小面SAD値の最小値Sminと、Y方向(垂直方向)の近傍2点の近傍縮小面SAD値Sy1、Sy2に対して、二次の近似曲線を当て嵌める。すると、この二次近似曲線の極小値SYminを取るY座標が、ピクセル精度のSAD値の最小値となるY座標Vyとなる。このときの二次曲線近似補間の式を、次式の(式f)に示す。   Similarly, in the interpolation in the Y direction (vertical direction), a quadratic order is obtained with respect to the minimum value Smin of the reduction surface SAD value and the two adjacent reduction surface SAD values Sy1 and Sy2 in the vicinity of the Y direction (vertical direction). Fit an approximate curve. Then, the Y coordinate that takes the minimum value SYmin of this quadratic approximate curve becomes the Y coordinate Vy that is the minimum value of the SAD value with pixel accuracy. The equation of quadratic curve approximate interpolation at this time is shown in the following equation (expression f).

SYmin=1/2×(Sy2−Sy1)/(Sy2−2Smin+Sy1)…(式f)
以上のようにして、二次曲線の近似を、X方向およびY方向の2回、行うことで、ピクセル精度の高精度の縮小面動きベクトル(Vx、Vy)が求まる。
SYmin = 1/2 × (Sy2−Sy1) / (Sy2-2Smin + Sy1) (Formula f)
As described above, by performing approximation of the quadratic curve twice in the X direction and the Y direction, a highly accurate reduced surface motion vector (Vx, Vy) with pixel accuracy can be obtained.

以上の説明では、縮小面SAD値の最小値と、そのX方向(水平方向)およびY方向(垂直方向)の近傍2点の縮小面SAD値を使用したが、各方向の近傍の縮小面SAD値は2点以上であってもよい。また、二次曲線をX方向、Y方向に代えて、例えば、斜め方向に近似曲線を当て嵌めてもかまわない。さらに、X方向、Y方向に、斜め方向を加えて近似曲線を当て嵌めてもかまわない。   In the above description, the minimum value of the reduction surface SAD value and the two reduction surface SAD values in the vicinity in the X direction (horizontal direction) and the Y direction (vertical direction) are used, but the reduction surface SAD in the vicinity in each direction. The value may be two or more points. Further, instead of the quadratic curve in the X direction and the Y direction, for example, an approximate curve may be fitted in an oblique direction. Furthermore, an approximate curve may be applied by adding an oblique direction to the X direction and the Y direction.

以上のような手段、手順を用いることにより、nピクセル単位の精度のSADテーブルの値から、ピクセル精度のベクトル検出結果が得られることを図81に示す。図81の横軸は、補間倍率であり、1次元方向に分解能を何倍にするかを表している。SADテーブルは2次元のため、テーブル面積は、この2乗の割合で削減されるのに対し、補間による誤差は、線形程度にしか増加しないことから、上述の補間手法の有用性が分かる。   FIG. 81 shows that a vector detection result with pixel accuracy can be obtained from the value of the SAD table with accuracy of n pixels by using the above means and procedure. The horizontal axis in FIG. 81 is the interpolation magnification and represents how many times the resolution is increased in the one-dimensional direction. Since the SAD table is two-dimensional, the table area is reduced at a ratio of the square, whereas the error due to interpolation increases only to a linear level, so that the usefulness of the above-described interpolation method can be seen.

なお、図79〜図81を用いて説明した補間手法は、縮小面に限らず、中間面および基底面においても適用可能であることは言うまでもない。上記の補間手法を基底面に適用した場合には、画素ピッチよりも小さい精度(サブピクセル精度)のローカル動きベクトルLMVが得られる。   Needless to say, the interpolation method described with reference to FIGS. 79 to 81 is applicable not only to the reduction plane but also to the intermediate plane and the base plane. When the above interpolation method is applied to the base plane, a local motion vector LMV with an accuracy (subpixel accuracy) smaller than the pixel pitch is obtained.

基底面でサブピクセル精度のローカル動きベクトルLMVを求めた場合には、NR処理用動きベクトルMVnrとして出力するグローバル動きベクトルGMVは、これと一致する基底面のサブピクセル精度のローカル動きベクトルLMVを出力するとよい。つまり、背景と判定されるブロックについては、グローバルモーションGMから算出されたグローバル動きベクトルGMVを出力してもよいし、当該グローバル動きベクトルGMVと一致するローカル動きベクトルLMVを出力しても良い。どちらでも良いのであるが、この場合には、高精度のローカル動きベクトルLMVを、グローバル動きベクトルGMVとして出力する方がよい。   When the local motion vector LMV with sub-pixel accuracy is obtained on the base plane, the global motion vector GMV output as the motion vector MVnr for NR processing outputs the local motion vector LMV with sub-pixel accuracy on the base plane that matches this. Good. That is, for the block determined to be the background, the global motion vector GMV calculated from the global motion GM may be output, or a local motion vector LMV that matches the global motion vector GMV may be output. In either case, it is better to output a highly accurate local motion vector LMV as the global motion vector GMV.

また、基底面でサブピクセル精度のローカル動きベクトルLMVを算出した場合には、動き補償画生成部16においても、サブピクセル精度で補間画像を、動き補償画として生成することできるというメリットもある。   In addition, when the local motion vector LMV with sub-pixel accuracy is calculated on the base plane, there is also an advantage that the motion compensation image generation unit 16 can also generate an interpolation image with sub-pixel accuracy as a motion compensation image.

[上述の実施形態の効果]
上述したように、上記の実施形態によれば、画像内の全てのターゲットブロックについての動きベクトルを、高い精度で検出することができる。更に、背景画像部分であるか、動被写体部分であるかを判定することができ、その指標値であるヒット率を得ることができる。そして、そのヒット率に応じて、画像の加算率を大きくすることが可能である。
[Effect of the above-described embodiment]
As described above, according to the above embodiment, motion vectors for all target blocks in an image can be detected with high accuracy. Furthermore, it is possible to determine whether the image is a background image portion or a moving subject portion, and a hit rate that is an index value can be obtained. The image addition rate can be increased according to the hit rate.

したがって、従来は困難であった、高ノイズレベルの画像からの、精度の高いローカル動きベクトルの検出や、画像全体における背景静止画領域および動被写体領域の抽出が可能になると共に、背景静止画領域においては、高い加算率で画像の重ね合わせができる。このため、所期のノイズ低減効果が得られるNR画像が得られる。   Therefore, it is possible to detect a local motion vector with high accuracy from an image with a high noise level, which has been difficult in the past, and to extract a background still image region and a moving subject region in the entire image. In, images can be superimposed at a high addition rate. For this reason, an NR image that can achieve the desired noise reduction effect can be obtained.

そして、ブロック分割位置を上述のようにフレーム毎にオフセット変更するようにしたので、加算後の重ね合わせ画像についてのブロック境界が目立たなくなるという効果を奏する。   Since the block division position is offset-changed for each frame as described above, there is an effect that the block boundary for the superimposed image after addition becomes inconspicuous.

[他の実施形態および変形例]
以上の説明においては、背景/動被写体判定部150では、ターゲットフレーム内の全てのターゲットブロックについて、背景一致度合いの評価判定を行うようにした。
[Other Embodiments and Modifications]
In the above description, the background / moving subject determination unit 150 performs the evaluation determination of the degree of background matching for all target blocks in the target frame.

しかし、この実施形態では、グローバルモーションは信頼性の高いローカル動きベクトルLMVのみを用いて収束演算して求めるようにしている。信頼性の高いローカル動きベクトルLMVのうち、図44および図45におけるグローバルモーションの収束演算過程において、排除されたローカル動きベクトルLMVは、動被写体ブロックのローカル動きベクトルLMVである可能性が高い。また、グローバルモーションの収束演算において、最終的にグローバルモーションの算出に使用されたローカル動きベクトルLMVは、背景ブロックであると判定することができる。   However, in this embodiment, the global motion is obtained by performing a convergence calculation using only the highly reliable local motion vector LMV. Among the highly reliable local motion vectors LMV, the local motion vector LMV excluded in the global motion convergence calculation process in FIGS. 44 and 45 is likely to be the local motion vector LMV of the moving subject block. Further, in the global motion convergence calculation, the local motion vector LMV finally used for the global motion calculation can be determined to be the background block.

したがって、グローバルモーションの算出時に、評価した信頼性の高いローカル動きベクトルLMVを呈するブロックは、改めて、背景か、動被写体かの評価判定を行う必要はない。そこで、これらの信頼性が高いローカル動きベクトルLMVのターゲットブロックについては、再ブロックマッチングおよび背景/動被写体判定処理は省略することができる。これにより、処理時間および演算量を削減することができる。   Therefore, when calculating global motion, it is not necessary to make another evaluation determination as to whether the block exhibiting the evaluated local motion vector LMV with high reliability is the background or the moving subject. Therefore, re-block matching and background / moving subject determination processing can be omitted for the target blocks of the local motion vector LMV with high reliability. As a result, the processing time and the calculation amount can be reduced.

なお、グローバルモーションの収束演算において、最終的にグローバルモーションの算出に使用されたローカル動きベクトルLMVは、背景ブロックであると判定できるので、そのヒット率βは、β=1.0とすることができる。   In the global motion convergence calculation, since the local motion vector LMV finally used for calculating the global motion can be determined to be a background block, the hit rate β can be set to β = 1.0. it can.

そして、ヒット率βが1.0のときには、ターゲットブロックと補償画ブロックとの加算率αが1.0となるようにすることにより、背景部分については積極的に強く加算され、大きなNR効果が期待できる。   When the hit rate β is 1.0, the addition rate α between the target block and the compensation image block is set to 1.0, so that the background portion is positively and strongly added, resulting in a large NR effect. I can expect.

なお、上述の実施形態では、動き補償画像は、ターゲットブロック単位で動き補償するようにしたが、グローバルモーションGMが得られるので、画素単位で動き補償することもできる。すなわち、例えば、ヒット率βが1.0や0.75のように高く、背景一致度が高いターゲットブロックの画像に対しては、画素毎に、グローバルモーションからグローバル動きベクトルを算出する。そして、算出した画素毎のグローバル動きベクトルを用いて動き補償を行う。動き補償結果は、画素位置に一致しない場合があるので、補間処理を行なって動き補償画素を生成し、これにより、動き補償画を生成するようにする。   In the above-described embodiment, the motion compensation image is motion compensated in units of target blocks. However, since global motion GM is obtained, motion compensation can be performed in units of pixels. That is, for example, for a target block image with a high hit rate β such as 1.0 or 0.75 and a high degree of background matching, a global motion vector is calculated from the global motion for each pixel. Then, motion compensation is performed using the calculated global motion vector for each pixel. Since the motion compensation result may not match the pixel position, interpolation processing is performed to generate a motion compensation pixel, thereby generating a motion compensation image.

このように、画素単位で動き補償するようにすれば、より滑らかな動き補償画像が得られると期待できる。   Thus, if motion compensation is performed in units of pixels, it can be expected that a smoother motion compensated image can be obtained.

なお、上述の実施形態では、相関値としては、SAD値を検出するようにしたが、相関値はSAD値に限定されるものではないことは言うまでもない。   In the above-described embodiment, the SAD value is detected as the correlation value, but it goes without saying that the correlation value is not limited to the SAD value.

また、上述の実施形態では、静止画像についての動き検出処理および画像の重ね合わせ処理は、画像メモリ部4に、複数枚の撮像画像を取り込み、当該取り込んだ複数枚の撮像画像について、上述のような動き検出および画像重ね合わせ処理を行うようにした。しかし、処理対象の複数枚の画像を、動画撮影時と同様に、リアルタイムで処理するようにすることもできる。   In the above-described embodiment, the motion detection process and the image superimposition process for still images are performed by capturing a plurality of captured images into the image memory unit 4 and regarding the captured plurality of captured images as described above. Smooth motion detection and image overlay processing. However, it is also possible to process a plurality of images to be processed in real time as in the case of moving image shooting.

なお、動きベクトルの検出対象となる画像情報は、撮像画像情報に限られるものではないことは言うまでもない。   Needless to say, the image information to be detected by the motion vector is not limited to the captured image information.

また、上述の実施形態では、動きベクトルの信頼性の判定を、動きベクトル信頼性指標値に基づいて行うようにした。しかし、相関値の第1極大値と相関値の第2極大値の差や比のみではなく、当該相関値の第1極大値を取る参照ベクトルと、相関値の第2極大値を取る参照ベクトルとの位置的な異なりをさらに用いて信頼性の判定をするようにしてもよい。また、相関値の第3極大値、さらには、それよりも、より順位の高位の極大値の値や当該極大値を取る参照ベクトルの位置分布をさらに参照して、信頼性の判定をしたりするようにしてもよい。   In the above-described embodiment, the reliability of the motion vector is determined based on the motion vector reliability index value. However, not only the difference or ratio between the first maximum value of the correlation value and the second maximum value of the correlation value, but also the reference vector that takes the first maximum value of the correlation value and the reference vector that takes the second maximum value of the correlation value The reliability may be determined by further using the positional difference between and. Further, the third maximum value of the correlation value, further, the maximum value of the higher rank order and the position distribution of the reference vector taking the maximum value are further referred to to determine the reliability. You may make it do.

なお、上述の実施形態では、グローバルモーションの演算処理に当たって、演算負荷を軽くするため、ローカル動きベクトルLMVの信頼性指標値に応じた重み係数Wは、0と、1とに2値化したものを使用した。しかし、ローカル動きベクトルLMVの信頼性指標値を正規化して得た、例えば0以上、1以下の重み係数Wを、そのまま用いて、グローバルモーションの演算処理をするようにしても、勿論よい。   In the above-described embodiment, the weighting factor W corresponding to the reliability index value of the local motion vector LMV is binarized into 0 and 1 in order to reduce the calculation load in the global motion calculation process. It was used. However, of course, the global motion calculation process may be performed using the weighting factor W of, for example, 0 or more and 1 or less obtained by normalizing the reliability index value of the local motion vector LMV as it is.

また、グローバルモーションは、上述した実施形態のように、アフィン変換を用いた信号処理により算出するのではなく、例えば、ジャイロなどの加速度センサなどを用いて、撮像素子全体に加わる変位として検出することもできる。そして、このように検出されたグローバルモーションを用いて、上述と同様にしてグローバル動きベクトルGMVを求め、求めたグローバル動きベクトルGMVとローカル動きベクトルLMVとを比較して、両者の一致度合いを求めることができる。   Further, the global motion is not calculated by signal processing using affine transformation as in the above-described embodiment, but is detected as a displacement applied to the entire image sensor using, for example, an acceleration sensor such as a gyro. You can also. Then, using the detected global motion, the global motion vector GMV is obtained in the same manner as described above, and the obtained global motion vector GMV and the local motion vector LMV are compared to obtain the degree of coincidence between them. Can do.

この場合において、グローバル動きベクトルGMVは、グローバルモーションから求めた1つのベクトルのみを各ローカル動きベクトルLMVと比較しても良い。また、グローバルモーションが画像(フレーム)の中心位置において生じたと判断して、当該中心位置を原点座標として、各ターゲットブロックのグローバル動きベクトルGMVを、グローバルモーションから求めても良い。   In this case, as the global motion vector GMV, only one vector obtained from the global motion may be compared with each local motion vector LMV. Further, it may be determined that the global motion has occurred at the center position of the image (frame), and the global motion vector GMV of each target block may be obtained from the global motion using the center position as the origin coordinate.

また、重ね合わせる画像についてのターゲットブロック毎のグローバル動きベクトルGMVは、外部で生成するようにすることもできる。その場合には、グローバル動きベクトルGMVは、画像処理装置では、上述のような計算を行なう必要はなく、単に、外部から取得するようにすれば良い。外部では、上述のような信号処理のみからなる計算により、あるいは、ジャイロなどのセンサを用いると共に、必要な計算を行なって、グローバル動きベクトルGMVを生成することができる。   In addition, the global motion vector GMV for each target block for the image to be superimposed can be generated outside. In that case, the global motion vector GMV does not need to be calculated as described above in the image processing apparatus, and may simply be acquired from the outside. Externally, the global motion vector GMV can be generated by calculation including only signal processing as described above or using a sensor such as a gyro and performing necessary calculations.

特に、静止画像について、予め連写した画像を記憶しておき、後の時点において、NR処理をするような場合には、外部でグローバルモーションを算出し、グローバル動きベクトルGMVを取得するようにすることは比較的容易である。   In particular, for still images, images continuously shot in advance are stored, and when performing NR processing at a later time, global motion is calculated externally and global motion vector GMV is acquired. It is relatively easy.

上述の実施形態においては、この発明を、静止画撮影時における動きベクトル検出および背景/動被写体判定の場合に適用したが、この発明は、動画撮影時における動きベクトル検出および背景/動被写体判定をする場合にも、勿論適用できる。   In the above-described embodiment, the present invention is applied to the case of motion vector detection and background / moving subject determination during still image shooting. However, the present invention performs motion vector detection and background / moving subject determination during moving image shooting. Of course, the present invention can also be applied.

図82に、動画撮影時を考慮した撮像装置のハードウエア構成例を示す。図82において、図1と同一部分には、同一番号を付してその詳細な説明は省略する。   FIG. 82 shows an example of the hardware configuration of the imaging apparatus considering the time of moving image shooting. In FIG. 82, the same parts as those in FIG. 1 are denoted by the same reference numerals, and detailed description thereof is omitted.

この図82の例の動画のNR処理時においては、1V(Vは垂直周期(フレームまたはフィールド))毎に、入力される撮像素子11からの撮像画像がターゲット画像となり、加算後の出力画像の、1V前と、2V前の画像が参照画像となる。   In the NR processing of the moving image in the example of FIG. 82, the captured image from the image sensor 11 that is input becomes the target image every 1V (V is a vertical period (frame or field)), and the output image after the addition Images before 1V and before 2V are reference images.

1V前だけでなく、2V前の画像も参照するのは、インターレース画像の場合、静止物体は2V前とのマッチング率の方が高いためである。   The reason why the image before 2V as well as the image before 1V is referred to is that, in the case of an interlaced image, the matching rate of the stationary object with that before 2V is higher.

この図82のシステムにおいても、ローカルベクトルからグローバルモーションを算出し、ターゲット画像内の各ブロックまたは各画素の動きベクトルが、グローバルモーションに一致するかどうかによってヒット率情報を生成し、後段の加算率αを制御する。これにより、NR効果の高い動画の撮像システムとなる。   Also in the system of FIG. 82, global motion is calculated from the local vector, hit rate information is generated depending on whether the motion vector of each block or each pixel in the target image matches the global motion, and the subsequent addition rate α is controlled. Thus, a moving image capturing system having a high NR effect is obtained.

なお、この図82の例の場合には、コーデック部22は、MPEG方式の圧縮符号化を行なうものが用いられる。   In the case of the example shown in FIG. 82, the codec unit 22 that performs MPEG compression coding is used.

以上の説明は、全て画像情報が撮像画像情報の場合であったが、この発明の対象となる画像情報は、撮像画像情報に限られるものではないことは言うまでもない。   The above description has been for the case where the image information is the captured image information. However, it goes without saying that the image information targeted by the present invention is not limited to the captured image information.

また、上述の実施形態では、加算率は、画素単位で算出するようにしたが、ターゲットブロック単位で加算率を求めて、加算を行うようにしてもよい。   In the above-described embodiment, the addition rate is calculated in units of pixels. However, the addition rate may be calculated in units of target blocks.

上述の実施形態は、全てNR処理による画像加算処理に、この発明を適用した場合であるが、ブロック分割して、処理を行なう画像処理としては、画像加算処理に限らないことは言うまでもない。   The above-described embodiment is a case where the present invention is applied to image addition processing by all NR processing, but it goes without saying that image processing for performing processing by dividing blocks is not limited to image addition processing.

図83は、画像処理が画像認識処理の場合に、この発明を適用した実施形態のブロック図を示すものである。   FIG. 83 shows a block diagram of an embodiment to which the present invention is applied when the image processing is image recognition processing.

この図83の実施形態は、入力画像情報をブロック分割するブロック分割処理部1011と、ブロック分割処理部1011からのブロック単位の画像情報について画像認識処理を行なう画像認識処理部1012と、制御部1010とからなる。   The embodiment of FIG. 83 includes a block division processing unit 1011 that divides input image information into blocks, an image recognition processing unit 1012 that performs image recognition processing on image information in units of blocks from the block division processing unit 1011, and a control unit 1010. It consists of.

この図83の実施形態では、制御部1010は、ブロック分割処理部1011に対して、同じフレームの画像情報について、ブロック分割位置を変更して、複数回、画像認識処理部1012において、画像認識を行なわせるように制御する。   In the embodiment of FIG. 83, the control unit 1010 changes the block division position for the image information of the same frame to the block division processing unit 1011 and performs image recognition at the image recognition processing unit 1012 a plurality of times. Control to make it happen.

この図83の実施形態における画像認識処理のフローチャートを、図84に示す。   A flowchart of the image recognition process in the embodiment of FIG. 83 is shown in FIG.

制御部1010は、先ず、入力画像情報についての最初のブロック分割始点を指定して、ブロック分割処理部1011にブロック分割を行なわせるようにする(ステップS601)。   First, the control unit 1010 designates the first block division start point for the input image information, and causes the block division processing unit 1011 to perform block division (step S601).

画像認識処理部1012では、このブロック分割されたブロックについて画像認識処理を行う(ステップS602)。このステップS602における画像認識処理は、1画面の全てのブロックについて行なうようにしてもよいし、予め、定められた注目位置のブロックのみについて行なうようにしてもよい。   The image recognition processing unit 1012 performs image recognition processing on the block divided into blocks (step S602). The image recognition process in step S602 may be performed for all blocks on one screen, or may be performed only for a block at a predetermined target position.

画像認識処理部1012での、1つのブロック分割位置での1フレーム分の画像認識処理が終了すると、制御部1010は、この例では、予め定められた所定回数(所定フレーム回数)だけ、画像認識処理がなされたか否か判別する(ステップS603)。そして、所定回数は画像認識を行なっていないと判別したときには、制御部1010は、ステップS601に戻り、ブロック分割処理部1011に対して、前回とは異なるブロック分割とするブロック分割始点を指示して、ブロック分割を行なわせるようにする。   When the image recognition processing unit 1012 completes the image recognition process for one frame at one block division position, in this example, the control unit 1010 performs image recognition for a predetermined number of times (a predetermined number of frames). It is determined whether or not processing has been performed (step S603). If it is determined that the image recognition has not been performed a predetermined number of times, the control unit 1010 returns to step S601 and instructs the block division processing unit 1011 to specify a block division start point for making a block division different from the previous one. Then, block division is performed.

そして、画像認識処理部1012は、ステップS602において、再分割されたブロックについて、再度、画像認識処理を実行する。   In step S602, the image recognition processing unit 1012 performs image recognition processing again on the re-divided block.

そして、ステップS603で、所定回数だけ、画像認識処理が繰り返されたと判別したときには、制御部1010は、画像認識処理部1012における画像認識処理を終了させる。そして、画像認識処理部1012に、前記所定回数の画像認識処理のうちの最良の処理結果を出力させるように指示する(ステップS604)。そして、この処理ルーチンを終了する。   If it is determined in step S603 that the image recognition processing has been repeated a predetermined number of times, the control unit 1010 ends the image recognition processing in the image recognition processing unit 1012. Then, the image recognition processing unit 1012 is instructed to output the best processing result among the predetermined number of times of image recognition processing (step S604). Then, this processing routine ends.

この実施形態においては、ブロック単位に画像認識を行なうが、そのブロック位置が画像上において異なる位置になるため、画像認識結果が異なることになり、ある分割位置では、認識結果は不良でも、他の分割位置では、良好な認識結果が得られることがある。   In this embodiment, image recognition is performed on a block-by-block basis, but since the block position is a different position on the image, the image recognition result will be different. A good recognition result may be obtained at the division position.

このため、図83の実施形態によれば、画像認識率の向上を図ることができるという効果がある。   Therefore, according to the embodiment of FIG. 83, there is an effect that the image recognition rate can be improved.

以上のように、この発明による画像処理装置は、1フレーム毎に、ブロック分割位置を変更するように制御するが、その場合における画像情報は、前述の実施形態の場合には、順次に所定のフレームレートで入力される画像とされる。一方、図83の実施形態の場合における画像認識対象の画像情報は、同一の1つのフレームの画像情報である。   As described above, the image processing apparatus according to the present invention performs control so that the block division position is changed for each frame. In this case, the image information in the above-described embodiment is sequentially predetermined. The image is input at the frame rate. On the other hand, the image information of the image recognition target in the embodiment of FIG. 83 is the image information of the same one frame.

すなわち、この発明は、同一のフレームの画像情報について、ブロック分割位置を1フレーム分の画像処理毎に変更して、画像処理を行う場合と、時系列信号として入力される画像情報を1フレーム毎に画像処理する場合の、いずれであっても、適用可能である。   In other words, according to the present invention, for image information of the same frame, when the block division position is changed for each image processing for one frame and image processing is performed, the image information input as a time-series signal is changed for each frame. Any of the cases of image processing can be applied.

なお、上述の第1〜第3の実施形態においては、1フレーム分(1画面分)の画像情報の全てを等分にブロック分割するようにした。しかし、図83の実施形態のような画像認識などにおいては、予め、定められた1画面上の特定位置の一部ブロックを処理対象とするようにブロック分割するようにすることもできる。   In the first to third embodiments described above, all image information for one frame (one screen) is divided into equal blocks. However, in image recognition or the like as in the embodiment of FIG. 83, it is also possible to divide a block so that a partial block at a specific position on a predetermined screen is processed.

前者の場合には、1画面分を等分にブロック分割するため、1画面分の画像の分割始点を決定するだけで、ブロック分割位置が決定されるので、1画面について、1個の分割始点のみを制御すればよい。しかし、後者の場合には、各ブロックの始点のそれぞれを制御して、ブロック分割位置を制御する必要がある。   In the former case, since one screen is equally divided into blocks, the block division position is determined simply by determining the division start point of the image for one screen, so one division start point for one screen. Only need to be controlled. However, in the latter case, it is necessary to control the block division position by controlling each of the start points of each block.

なお、この発明は、上述のNR加算処理、画像認識処理に限らず、画像情報を、その1画面分について、ブロック分割して処理を行なう画像処理装置および画像処理方法の全てに適用できることは言うまでもない。   Note that the present invention is not limited to the above-described NR addition processing and image recognition processing, but can be applied to all image processing apparatuses and image processing methods that process image information by dividing the image information into one screen. Yes.

この発明による画像処理装置の第1の実施形態の構成例を示すブロック図である。1 is a block diagram illustrating a configuration example of a first embodiment of an image processing device according to the present invention. この発明による画像処理装置の第1の実施形態の要部を説明するために用いる図である。It is a figure used in order to demonstrate the principal part of 1st Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第1の実施形態の効果を説明するために用いる図である。It is a figure used in order to demonstrate the effect of a 1st embodiment of the image processing device by this invention. この発明による画像処理装置の第1の実施形態におけるブロック分割位置の変更処理例を説明するための図である。It is a figure for demonstrating the example of a change process of the block division position in 1st Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第1の実施形態におけるブロック分割位置の変更処理例を説明するための図である。It is a figure for demonstrating the example of a change process of the block division position in 1st Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第1の実施形態におけるブロック分割位置の変更処理例を説明するための図である。It is a figure for demonstrating the example of a change process of the block division position in 1st Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第1の実施形態におけるブロック分割位置の変更処理例を説明するための図である。It is a figure for demonstrating the example of a change process of the block division position in 1st Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第1の実施形態におけるブロック分割位置の変更処理例を説明するための図である。It is a figure for demonstrating the example of a change process of the block division position in 1st Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態におけるブロックマッチング処理を説明するために用いる図である。It is a figure used in order to demonstrate the block matching process in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態におけるブロックマッチング処理を説明するために用いる図である。It is a figure used in order to demonstrate the block matching process in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態におけるブロックマッチング処理を説明するために用いる図である。It is a figure used in order to demonstrate the block matching process in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態におけるブロックマッチング処理を説明するために用いる図である。It is a figure used in order to demonstrate the block matching process in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態におけるブロックマッチング処理を説明するために用いる図である。It is a figure used in order to demonstrate the block matching process in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態におけるブロックマッチング処理を説明するために用いる図である。It is a figure used in order to demonstrate the block matching process in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態におけるブロックマッチング処理を説明するために用いる図である。It is a figure used in order to demonstrate the block matching process in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態におけるブロックマッチング処理を説明するために用いる図である。It is a figure used in order to demonstrate the block matching process in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態におけるブロックマッチング処理を説明するために用いる図である。It is a figure used in order to demonstrate the block matching process in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態が適用される撮像装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the imaging device with which 2nd Embodiment of the image processing apparatus by this invention is applied. この発明による画像処理装置の第2の実施形態におけるブロックマッチング処理を説明するためのブロック図である。It is a block diagram for demonstrating the block matching process in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態が適用される撮像画像の例を示す図である。It is a figure which shows the example of the captured image to which 2nd Embodiment of the image processing apparatus by this invention is applied. この発明による画像処理装置の第2の実施形態において検出されたローカル動きベクトルを、画像上に対応付けて示した図である。It is the figure which matched and showed on the image the local motion vector detected in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態の要部を説明するために用いる図である。It is a figure used in order to demonstrate the principal part of 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態の要部を説明するために用いる図である。It is a figure used in order to demonstrate the principal part of 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態において、信頼性が高いとされたローカル動きベクトルを、画像上に対応付けて示した図である。In the second embodiment of the image processing apparatus according to the present invention, local motion vectors that are considered to be highly reliable are shown in association with each other on the image. この発明による画像処理装置の第2の実施形態の要部である動きベクトル算出部の構成例を説明するためのブロック図である。It is a block diagram for demonstrating the structural example of the motion vector calculation part which is the principal part of 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態の主要な処理動作を説明するためのフローチャートを示す図である。It is a figure which shows the flowchart for demonstrating the main processing operations of 2nd Embodiment of the image processing apparatus by this invention. 図25の構成例を説明するために用いる図である。FIG. 26 is a diagram used for explaining the configuration example of FIG. 25. この発明による画像処理装置の第2の実施形態の要部の構成例による処理例を説明するためのフローチャートである。It is a flowchart for demonstrating the process example by the structural example of the principal part of 2nd Embodiment of the image processing apparatus by this invention. ローカル動きベクトルからグローバルモーションを求める処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the example of a process which calculates | requires global motion from a local motion vector. ローカル動きベクトルからグローバルモーションを求める処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the example of a process which calculates | requires global motion from a local motion vector. ローカル動きベクトルからグローバルモーションを求める処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the example of a process which calculates | requires global motion from a local motion vector. ローカル動きベクトルからグローバルモーションを求める処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the example of a process which calculates | requires global motion from a local motion vector. ローカル動きベクトルからグローバルモーションを求める処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the example of a process which calculates | requires global motion from a local motion vector. 従来のアフィン変換の問題点を説明するための図である。It is a figure for demonstrating the problem of the conventional affine transformation. グローバルモーションを算出する他の方法を説明するために用いる図である。It is a figure used in order to explain other methods of calculating global motion. この発明による画像処理装置の第2の実施形態で用いる拡張したアフィン変換説明するための図である。It is a figure for demonstrating the extended affine transformation used in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態において、ローカル動きベクトルからグローバルモーションを算出する処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the process example which calculates a global motion from a local motion vector in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態において、ローカル動きベクトルからグローバルモーションを算出する処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the process example which calculates a global motion from a local motion vector in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態において、ローカル動きベクトルからグローバルモーションを算出する処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the process example which calculates a global motion from a local motion vector in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態において、ローカル動きベクトルからグローバルモーションを算出する処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the process example which calculates a global motion from a local motion vector in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態において、ローカル動きベクトルからグローバルモーションを算出する処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the process example which calculates a global motion from a local motion vector in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態において、ローカル動きベクトルからグローバルモーションを算出する処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the process example which calculates a global motion from a local motion vector in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態において、ローカル動きベクトルからグローバルモーションを算出する処理例を説明するために用いる式を説明するための図である。It is a figure for demonstrating the formula used in order to demonstrate the process example which calculates a global motion from a local motion vector in 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態の実施形態において、ローカル動きベクトルからグローバルモーションを求める処理例を説明するためのフローチャートの一部を示す図である。It is a figure which shows a part of flowchart for demonstrating the example of a process which calculates | requires global motion from a local motion vector in embodiment of 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態の実施形態において、ローカル動きベクトルからグローバルモーションを求める処理例を説明するためのフローチャートの一部を示す図である。It is a figure which shows a part of flowchart for demonstrating the example of a process which calculates | requires global motion from a local motion vector in embodiment of 2nd Embodiment of the image processing apparatus by this invention. この発明による画像処理装置の第2の実施形態において、算出されたグローバルモーションから求められたブロック単位の動きベクトルを、画像上に対応付けて示した図である。It is the figure which showed the motion vector of the block unit calculated | required from the calculated global motion in association with on the image in 2nd Embodiment of the image processing apparatus by this invention. この発明の第2の実施形態において、グローバル動きベクトルGMVを用いて、ターゲットブロックの背景一致度合いを評価する処理を説明するために用いる図である。In the second embodiment of the present invention, it is a diagram used to describe a process of evaluating the background matching degree of a target block using a global motion vector GMV. この発明の第2の実施形態の要部である背景/動被写体判定部の構成例を説明するための図である。It is a figure for demonstrating the structural example of the background / moving subject determination part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である背景/動被写体判定部での処理動作を説明するためのフローチャートの一部を示す図である。It is a figure which shows a part of flowchart for demonstrating the processing operation in the background / moving subject determination part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である背景/動被写体判定部での処理動作を説明するためのフローチャートの一部を示す図である。It is a figure which shows a part of flowchart for demonstrating the processing operation in the background / moving subject determination part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である背景/動被写体判定部の他の構成例を説明するための図である。It is a figure for demonstrating the other structural example of the background / moving subject determination part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である背景/動被写体判定部のさらに他の構成例を説明するための図である。It is a figure for demonstrating the further another structural example of the background / moving subject determination part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である背景/動被写体判定部のさらに他の構成例を説明するための図である。It is a figure for demonstrating the further another structural example of the background / moving subject determination part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である背景/動被写体判定部のさらに他の構成例での処理動作を説明するためのフローチャートの一部を示す図である。It is a figure which shows a part of flowchart for demonstrating the processing operation in the further another structural example of the background / moving subject determination part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である背景/動被写体判定部のさらに他の構成例での処理動作を説明するためのフローチャートの一部を示す図である。It is a figure which shows a part of flowchart for demonstrating the processing operation in the further another structural example of the background / moving subject determination part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である背景/動被写体判定部の、またさらに他の構成例を説明するための図である。It is a figure for demonstrating the further another structural example of the background / moving subject determination part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である加算率計算部の一例の構成例の一部を示すブロック図である。It is a block diagram which shows a part of example of a structure of an example of the addition rate calculation part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である加算率計算部の一例の構成例の一部を示すブロック図である。It is a block diagram which shows a part of example of a structure of an example of the addition rate calculation part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である加算率計算部の一例の構成例を説明するために用いる図である。It is a figure used in order to demonstrate the example of a structure of an example of the addition rate calculation part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である加算率計算部の一例の構成例を説明するために用いる図である。It is a figure used in order to demonstrate the example of a structure of an example of the addition rate calculation part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である加算率計算部の一例の構成例を説明するために用いる図である。It is a figure used in order to demonstrate the example of a structure of an example of the addition rate calculation part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である加算率計算部の一例の構成例を説明するために用いる図である。It is a figure used in order to demonstrate the example of a structure of an example of the addition rate calculation part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である加算率計算部の一例の構成例を説明するために用いる図である。It is a figure used in order to demonstrate the example of a structure of an example of the addition rate calculation part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である加算率計算部の一例の構成例を説明するために用いる図である。It is a figure used in order to demonstrate the example of a structure of an example of the addition rate calculation part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の要部である加算率計算部の一例の構成例を説明するために用いる図である。It is a figure used in order to demonstrate the example of a structure of an example of the addition rate calculation part which is the principal part of 2nd Embodiment of this invention. この発明の第2の実施形態の効果を説明するために用いる図である。It is a figure used in order to explain the effect of a 2nd embodiment of this invention. この発明の第2の実施形態の効果を説明するために用いる図である。It is a figure used in order to explain the effect of a 2nd embodiment of this invention. この発明の第2の実施形態の効果を説明するために用いる図である。It is a figure used in order to explain the effect of a 2nd embodiment of this invention. この発明の第2の実施形態の効果を説明するために用いる図である。It is a figure used in order to explain the effect of a 2nd embodiment of this invention. この発明の第2の実施形態の効果を説明するために用いる図である。It is a figure used in order to explain the effect of a 2nd embodiment of this invention. この発明の第2の実施形態の効果を説明するために用いる図である。It is a figure used in order to explain the effect of a 2nd embodiment of this invention. この発明の第3の実施形態における第1の処理例を説明するための図である。It is a figure for demonstrating the 1st process example in 3rd Embodiment of this invention. この発明の第3の実施形態における第1の処理例を説明するための図である。It is a figure for demonstrating the 1st process example in 3rd Embodiment of this invention. この発明の第3の実施形態における第2の処理例を説明するための図である。It is a figure for demonstrating the 2nd processing example in 3rd Embodiment of this invention. この発明の第3の実施形態における第2の処理例を説明するための図である。It is a figure for demonstrating the 2nd processing example in 3rd Embodiment of this invention. この発明の第4の実施形態における要部の処理動作を説明するためのフローチャートを示す図である。It is a figure which shows the flowchart for demonstrating the processing operation of the principal part in 4th Embodiment of this invention. この発明の第4の実施形態による効果を説明するために用いる図である。It is a figure used in order to demonstrate the effect by a 4th embodiment of this invention. この発明の第4の実施形態による効果を説明するために用いる図である。It is a figure used in order to demonstrate the effect by a 4th embodiment of this invention. この発明による画像処理装置の実施形態において、ローカル動きベクトルを求める処理の他の例を説明するための図である。It is a figure for demonstrating the other example of the process which calculates | requires a local motion vector in embodiment of the image processing apparatus by this invention. この発明による画像処理装置の実施形態において、ローカル動きベクトルを求める処理の他の例を説明するための図である。It is a figure for demonstrating the other example of the process which calculates | requires a local motion vector in embodiment of the image processing apparatus by this invention. この発明による画像処理装置の実施形態において、ローカル動きベクトルを求める処理の他の例を説明するための図である。It is a figure for demonstrating the other example of the process which calculates | requires a local motion vector in embodiment of the image processing apparatus by this invention. この発明による画像処理装置の他の実施形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of other embodiment of the image processing apparatus by this invention. この発明による画像処理装置の他の実施形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of other embodiment of the image processing apparatus by this invention. 図83の実施形態の処理動作を説明するためのフローチャートを示す図である。It is a figure which shows the flowchart for demonstrating the processing operation of embodiment of FIG. 従来の画像処理装置の構成例を説明するためのブロック図である。It is a block diagram for demonstrating the structural example of the conventional image processing apparatus. ブロック分割処理の一例を説明するための図である。It is a figure for demonstrating an example of a block division process. 従来の画像処理装置の問題点を説明するための図である。It is a figure for demonstrating the problem of the conventional image processing apparatus.

符号の説明Explanation of symbols

1000…画像処理部、1001…ブロック分割処理部、1002…動きベクトル検出部、1003…動き補償画生成部、1004…画像加算部、1005…分割位置シフト制御部、1006…タイミング信号発生部、1010…制御部、1011…ブロック分割処理部、1012…画像認識処理部、15…動きベクトル算出部、16…動き補償画生成部、17…加算部   DESCRIPTION OF SYMBOLS 1000 ... Image processing part, 1001 ... Block division processing part, 1002 ... Motion vector detection part, 1003 ... Motion compensation image generation part, 1004 ... Image addition part, 1005 ... Division position shift control part, 1006 ... Timing signal generation part, 1010 Control unit, 1011 Block division processing unit, 1012 Image recognition processing unit, 15 Motion vector calculation unit, 16 Motion compensation image generation unit, 17 Addition unit

Claims (10)

1画面分の画像を複数個に分割したブロック単位で、前記画像について所定の画像処理を行なう画像処理手段と、
前記1画面分の画像を複数個に分割して、前記ブロック単位の画像を生成し、生成したブロック単位の画像情報を前記画像処理手段に渡すものであって、前記1画面上での前記ブロックの分割位置を、1画面分の画像の処理を終了する毎に、異なる位置に変更するブロック分割手段と
を備える画像処理装置。
Image processing means for performing predetermined image processing on the image in units of blocks obtained by dividing an image for one screen into a plurality of blocks;
The image for one screen is divided into a plurality of blocks, the block unit image is generated, and the generated block unit image information is passed to the image processing means, and the block on the one screen is generated. An image processing apparatus comprising: a block dividing unit that changes the divided position to a different position each time processing of an image for one screen is completed.
請求項1に記載の画像処理装置において、
前記画像処理手段は、
1画面分の画像情報からなるターゲット画像と、前記ターゲット画像とは異なる1画面分からなる参照画像との間において、前記ブロック毎に動きベクトルを検出する動きベクトル検出手段と、
前記動きベクトル検出手段で検出された前記ブロック毎の前記動きベクトルを用いて、前記参照画像の各ブロックを動き補償した動き補償画像を生成する動き補償手段と、
前記ターゲット画像と前記動き補償画像とを、前記ブロック単位で重ね合わせ、当該重ね合わせた後の加算画像を出力するようにする加算手段と、
を備える画像処理装置。
The image processing apparatus according to claim 1.
The image processing means includes
Motion vector detecting means for detecting a motion vector for each block between a target image consisting of image information for one screen and a reference image consisting of one screen different from the target image;
Motion compensation means for generating a motion compensated image in which each block of the reference image is motion compensated using the motion vector for each block detected by the motion vector detection means;
An adding unit configured to superimpose the target image and the motion compensated image in units of blocks and to output an added image after the superimposition;
An image processing apparatus comprising:
請求項2に記載の画像処理装置において、
前記画像処理手段では、
同じ1枚の前記ターゲット画像に対して、異なる2枚以上の参照画像を重ね合わせる
画像処理装置。
The image processing apparatus according to claim 2,
In the image processing means,
An image processing apparatus that superimposes two or more different reference images on the same target image.
請求項2に記載の画像処理装置において、
前記画像処理手段では、前記加算画像をターゲット画像として、異なる3枚以上の画像を重ね合わせる
画像処理装置。
The image processing apparatus according to claim 2,
An image processing device that superimposes three or more different images using the added image as a target image.
請求項1〜4のいずれかに記載の画像処理装置において、
前記画像情報は、撮像素子から所定のフレームレートで送出される撮像画像情報である
画像処理装置。
The image processing apparatus according to any one of claims 1 to 4,
The image processing apparatus, wherein the image information is captured image information transmitted from an image sensor at a predetermined frame rate.
請求項1〜4のいずれかに記載の画像処理装置において、
前記ブロック分割手段は、
前記1ブロックの範囲内において、黄金比率の割合で、前記ブロック分割の起点を変更する
画像処理装置。
The image processing apparatus according to any one of claims 1 to 4,
The block dividing means includes
An image processing apparatus that changes a starting point of the block division at a ratio of a golden ratio within the range of the one block.
請求項1〜6のいずれかに記載の画像処理装置において、
前記ブロック単位は、水平方向の8画素および垂直方向の8ラインからなる矩形領域の画像とされる
画像処理装置。
The image processing apparatus according to any one of claims 1 to 6,
The block unit is an image processing apparatus in which an image of a rectangular area composed of 8 pixels in the horizontal direction and 8 lines in the vertical direction is used.
請求項1〜7のいずれかに記載の画像処理装置において、
前記ブロック分割手段では、分割ブロックの起点位置を1画像単位あるいは複数画素単位に変化することにより、ブロック分割位置を変更する
画像処理装置。
In the image processing device according to any one of claims 1 to 7,
An image processing apparatus, wherein the block dividing means changes the block dividing position by changing the starting position of the divided block to one image unit or a plurality of pixel units.
1画面分の画像を複数個に分割したブロック単位で、前記画像について所定の画像処理を行い、1画面分単位の処理後画像情報を出力する画像処理工程と、
前記画像処理工程に先立ち、前記1画面分の画像を複数個に分割して、前記ブロック単位の画像を生成し、生成したブロック単位の画像情報を前記画像処理工程に渡す工程であって、前記1画面上での前記ブロックの分割位置を、1画面分の画像の処理を終了する毎に、異なる位置に変更するブロック分割工程と
を有する画像処理方法。
An image processing step of performing predetermined image processing on the image in units of blocks obtained by dividing an image for one screen into a plurality of images, and outputting post-processing image information for one screen;
Prior to the image processing step, the image for one screen is divided into a plurality of images, the block unit image is generated, and the generated block unit image information is passed to the image processing step. An image processing method comprising: a block dividing step of changing a block dividing position on one screen to a different position every time processing of an image for one screen is completed.
請求項9に記載の画像処理方法において、
1画面分の画像情報からなるターゲット画像と、前記ターゲット画像とは異なる1画面分からなる参照画像との間において、前記ブロック毎に動きベクトルを検出する動きベクトル検出工程と、
前記動きベクトル検出工程で検出された前記ブロック毎の前記動きベクトルを用いて、前記参照画像の各ブロックを動き補償した動き補償画像を生成する動き補償工程と、
前記ターゲット画像と前記動き補償画像とを、前記ブロック単位で重ね合わせ、当該重ね合わせた後の加算画像を出力するようにする加算工程と、
を備える画像処理方法。
The image processing method according to claim 9.
A motion vector detecting step for detecting a motion vector for each block between a target image consisting of image information for one screen and a reference image consisting of one screen different from the target image;
Using the motion vector for each block detected in the motion vector detection step, a motion compensation step for generating a motion compensated image in which each block of the reference image is motion-compensated;
An adding step for superimposing the target image and the motion compensated image in units of the blocks and outputting an added image after the superposition;
An image processing method comprising:
JP2008174127A 2008-07-03 2008-07-03 Image processing apparatus and image processing method Pending JP2010016580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008174127A JP2010016580A (en) 2008-07-03 2008-07-03 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008174127A JP2010016580A (en) 2008-07-03 2008-07-03 Image processing apparatus and image processing method

Publications (1)

Publication Number Publication Date
JP2010016580A true JP2010016580A (en) 2010-01-21

Family

ID=41702274

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008174127A Pending JP2010016580A (en) 2008-07-03 2008-07-03 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP2010016580A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016029828A (en) * 2015-10-16 2016-03-03 オリンパス株式会社 Imaging device, imaging method, and program
JP2016091528A (en) * 2014-11-05 2016-05-23 バイドゥ オンライン ネットワーク テクノロジー (ベイジン) カンパニー リミテッド Image segmentation method and image segmentation device
WO2020105235A1 (en) * 2018-11-19 2020-05-28 ソニー株式会社 Motion vector detection device, motion vector detection method and program, and image processing device
US10776937B2 (en) 2016-05-16 2020-09-15 Olympus Corporation Image processing apparatus and image processing method for setting measuring point to calculate three-dimensional coordinates of subject image with high reliability

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016091528A (en) * 2014-11-05 2016-05-23 バイドゥ オンライン ネットワーク テクノロジー (ベイジン) カンパニー リミテッド Image segmentation method and image segmentation device
JP2016029828A (en) * 2015-10-16 2016-03-03 オリンパス株式会社 Imaging device, imaging method, and program
US10776937B2 (en) 2016-05-16 2020-09-15 Olympus Corporation Image processing apparatus and image processing method for setting measuring point to calculate three-dimensional coordinates of subject image with high reliability
WO2020105235A1 (en) * 2018-11-19 2020-05-28 ソニー株式会社 Motion vector detection device, motion vector detection method and program, and image processing device

Similar Documents

Publication Publication Date Title
JP4506875B2 (en) Image processing apparatus and image processing method
JP2009290827A (en) Image processing apparatus, and image processing method
JP4544334B2 (en) Image processing apparatus and image processing method
JP4623111B2 (en) Image processing apparatus, image processing method, and program
JP4645746B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP4760923B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP4893758B2 (en) Image processing apparatus, image processing method, and imaging apparatus
KR100994063B1 (en) Image processing device, image processing method and a computer readable storage medium having stored therein a program
JP4882956B2 (en) Image processing apparatus and image processing method
EP2330812B1 (en) Apparatus for generating a panoramic image, method for generating a panoramic image, and computer-readable medium
JP4899803B2 (en) Image processing apparatus, camera apparatus, image processing method, and program
JP2009105533A (en) Image processing device, imaging device, image processing method, and picked-up image processing method
JP2012142829A (en) Image processing device and image processing method
US8731327B2 (en) Image processing system and image processing method
CN110969575B (en) Adaptive image stitching method and image processing device
JP2010016580A (en) Image processing apparatus and image processing method
JP4930304B2 (en) Image processing apparatus, image processing method, program, and recording medium
KR20090109504A (en) Image processing apparatus and image processing method
JP2010278701A (en) Image combining device, and image combining method and program
JP2012142828A (en) Image processing apparatus and image processing method
CN115239777A (en) Video processing method and device
JP2012142864A (en) Image processing apparatus and image processing method