JP2007028251A - Image processing apparatus, image processing method, program, and recording medium - Google Patents

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

Info

Publication number
JP2007028251A
JP2007028251A JP2005208145A JP2005208145A JP2007028251A JP 2007028251 A JP2007028251 A JP 2007028251A JP 2005208145 A JP2005208145 A JP 2005208145A JP 2005208145 A JP2005208145 A JP 2005208145A JP 2007028251 A JP2007028251 A JP 2007028251A
Authority
JP
Japan
Prior art keywords
image
frame image
frame
motion vector
motion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2005208145A
Other languages
Japanese (ja)
Inventor
Masafumi Kanai
政史 金井
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2005208145A priority Critical patent/JP2007028251A/en
Publication of JP2007028251A publication Critical patent/JP2007028251A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem that a frame memory for storing one frame and more is necessary in order to correct camera shake. <P>SOLUTION: A frame image receiving means successively receives frame images in time-series order and a moving vector detection means detects the moving vector of the n-th frame image. A moving vector prediction means predicts the moving vector of the (n+1)th frame image and a segmentation position calculation means calculates a segmentation position indicating a position for segmenting a prescribed image in the (n+1)th frame image by using the predicted moving vector of the (n+1)th frame image. The detection of the moving vector of the n-th frame image, the prediction of the moving vector of the (n+1)th frame image and the calculation of the segmentation position of the (n+1)th frame image are performed during the acquisition of the n-th frame image by the frame image receiving means. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、手ぶれなどの画像揺れを含んでいる、動画像または時系列に連続する静止画像からフレーム画像を取得し、取得したフレーム画像から所定の画像を切り出したフレーム画像(補正フレーム画像)を生成することで、画像揺れを補正する画像処理装置、画像処理方法、プログラム、プログラムを記録した記録媒体に関する。   The present invention acquires a frame image from a moving image or a time-series continuous still image including image shake such as camera shake, and a frame image (corrected frame image) obtained by cutting out a predetermined image from the acquired frame image. The present invention relates to an image processing device, an image processing method, a program, and a recording medium on which the program is recorded.

ビデオカメラやデジタルカメラ、画像撮影機能を有する携帯電話などの画像撮像装置を用いて、所望する画像を動画像として撮影する際、手ぶれによって撮影画像に生じる画像揺れ補正する画像処理技術が提案されている(例えば、特許文献1)。   An image processing technique has been proposed that corrects image shake caused by camera shake when shooting a desired image as a moving image using an image pickup device such as a video camera, digital camera, or mobile phone having an image shooting function. (For example, Patent Document 1).

特許文献1には、撮像管で撮影した数フレーム分の画像をフレームメモリに保存すると共に、動き検出回路でフレーム間の画像の動きを示す動きベクトルを求め、フレーム画像から補正フレーム画像を切り出す位置を動きベクトルに応じて変えることで、画像揺れを補正するテレビジョン信号処理装置が開示されている。   Japanese Patent Laid-Open No. 2004-228867 stores a number of frames of images taken with a tube in a frame memory, obtains a motion vector indicating the motion of an image between frames by a motion detection circuit, and positions to extract a corrected frame image from the frame image There is disclosed a television signal processing apparatus that corrects image shake by changing the frequency according to a motion vector.

画像揺れの補正は、フレーム画像からフレーム画像より小さい部分画像(補正フレーム画像)を切り出し、補正フレーム画像を出力して行われる。補正フレーム画像を切り出すとき、画像揺れが解消するように補正フレームを切り出すことにより、出力した補正フレーム画像から画像揺れがなくなる。   Image shake correction is performed by cutting out a partial image (corrected frame image) smaller than the frame image from the frame image and outputting the corrected frame image. When the correction frame image is cut out, the image is not shaken from the output correction frame image by cutting out the correction frame so as to eliminate the image shake.

図8は、フレーム画像の動きベクトルを説明するための説明図である。図8(上部)には、動画像におけるフレーム画像F(1),F(2),F(3)をそれぞれ示している(括弧内の数字は時系列順を示している)。また、フレーム画像F(1),F(2),F(3)の内部に破線で示されたフレーム画像FK(1),FK(2),FK(3)は、補正フレーム画像と同じ大きさの画像である。図8(下側)は、補正フレーム画像FK(1),FK(2),FK(3)に写っている物体が同じ位置になるように配置した図である。このとき、フレーム画像FK(1)を基準とするフレーム画像FK(2)の動きを示す動きベクトルはV0(2)となり、フレーム画像FK(2)を基準とするフレーム画像FK(3)の動きを示す動きベクトルはV0(3)となる。この動きベクトルV0(2),V0(3)が、手ぶれなどにより生じた前記撮像装置の動きを示していることになる。   FIG. 8 is an explanatory diagram for explaining a motion vector of a frame image. FIG. 8 (upper part) shows frame images F (1), F (2), and F (3) in a moving image, respectively (numbers in parentheses indicate chronological order). The frame images FK (1), FK (2), and FK (3) indicated by broken lines inside the frame images F (1), F (2), and F (3) are the same size as the corrected frame image. This is the image. FIG. 8 (lower side) is a diagram in which the objects shown in the corrected frame images FK (1), FK (2), and FK (3) are arranged at the same position. At this time, the motion vector indicating the motion of the frame image FK (2) relative to the frame image FK (1) is V0 (2), and the motion of the frame image FK (3) relative to the frame image FK (2). Is represented by V0 (3). The motion vectors V0 (2) and V0 (3) indicate the movement of the imaging device caused by camera shake or the like.

したがって、図8(上部)において、フレーム画像FK(2),FK(3)の位置を、動きベクトルV0(2),V0(3)をキャンセルする方向に移動させれば、フレーム画像FK(1),FK(2),FK(3)に写っている物体が動かないことになる。すなわち画像ぶれが解消されたフレーム画像が得られることになる。このように、動きベクトルV0(2),V0(3)をキャンセルする方向に移動させたフレーム画像が、補正フレーム画像である。   Therefore, in FIG. 8 (upper part), if the positions of the frame images FK (2) and FK (3) are moved in the direction of canceling the motion vectors V0 (2) and V0 (3), the frame image FK (1 ), FK (2), FK (3), the object shown in FIG. That is, a frame image in which image blur is eliminated is obtained. Thus, the frame image in which the motion vectors V0 (2) and V0 (3) are moved in the canceling direction is a corrected frame image.

次に、図19を用いて、画像ぶれの補正について説明する。最初に、動画像から時系列順に得られるフレーム画像F(2)をフレーム画像受取手段110が受け取る。次に、受け取ったフレーム画像F(2)を使って、動きベクトル検出手段120が、時系列順で一つ前のフレーム画像F(1)を基準とするフレーム画像の動きを示す動きベクトルV0(2)を検出する。そして、切出位置算出手段130が動きベクトルV0(2)をキャンセルして画像ぶれを解消する補正フレーム画像の切出位置を算出する。次に部分画像切出手段140が、フレーム画像F(2)から補正フレーム画像を切出して、画像表示手段150により補正フレーム画像を出力するのである。   Next, image blur correction will be described with reference to FIG. First, the frame image receiving means 110 receives the frame image F (2) obtained from the moving image in chronological order. Next, using the received frame image F (2), the motion vector detecting unit 120 uses the motion vector V0 () indicating the motion of the frame image with reference to the previous frame image F (1) in time series order. 2) is detected. Then, the cutout position calculation unit 130 cancels the motion vector V0 (2) and calculates the cutout position of the corrected frame image that eliminates the image blur. Next, the partial image cutout unit 140 cuts out the correction frame image from the frame image F (2), and the image display unit 150 outputs the correction frame image.

特公平8−17454号公報Japanese Patent Publication No. 8-17454

しかし、図19の処理において、フレーム画像F(2)は、動きベクトル検出手段120と部分画像切出手段140の2箇所で使用される。そのため、動きベクトル検出手段120でフレーム画像F(2)を使用した後に、部分画像切出手段140が再び使うまでフレーム画像F(2)を記憶しておくフレームメモリ113が必要である。   However, in the process of FIG. 19, the frame image F (2) is used in two places, the motion vector detection means 120 and the partial image cutout means 140. Therefore, after using the frame image F (2) in the motion vector detecting unit 120, the frame memory 113 for storing the frame image F (2) until the partial image cutting unit 140 uses it again is necessary.

本発明は、このような課題を解決するためになされたもので、手ぶれ補正処理を行う際に必要な、フレーム画像を保持するためのメモリ量を抑えることのできる画像処理装置、画像表示装置、画像撮像装置、画像処理方法、プログラムおよび記録媒体を提供することを目的とする。   The present invention has been made to solve such a problem, and is an image processing device, an image display device, and an image display device that can suppress the amount of memory for holding a frame image, which is necessary when performing camera shake correction processing, An object is to provide an image pickup apparatus, an image processing method, a program, and a recording medium.

上記課題を解決するために、本発明に係る画像処理装置では、時系列に連続する、表示すべき(M+1)個(Mは2以上の整数)のフレーム画像F(1)〜F(M+1)(括弧内は時系列順を示す整数)であって、画像揺れを発生させる可能性のある前記フレーム画像F(1)〜F(M+1)を順次受け取るフレーム画像受取手段と、フレーム画像F(p−1)(1<p≦(M+1))を基準とするフレーム画像F(p)の動きを示す動きベクトルV0(p)を検出することにより、前記(M+1)個のフレーム画像F(1)〜F(M+1)のうち、M個のフレーム画像F(2)〜F(M+1)の動きを示すM個の動きベクトルV0(2)〜V0(M+1)を得る動きベクトル検出手段と、前記M個の動きベクトルV0(2)〜V0(M+1)のうちの(M−1)個の動きベクトルV0(2)〜V0(M)で示される、M個のフレーム画像F(1)〜F(M)の全体的な動きを前記画像揺れにより特定されるX個(Xは整数)の基底の周波数に分解し、当該周波数より規定されるX個の正弦波を、時間軸上で、(M+1)番目のフレーム画像F(M+1)を表示するべき時刻まで延長することにより、フレーム画像F(M)を基準とする前記フレーム画像F(M+1)の動きを示す、前記フレーム画像F(M+1)の動きベクトルである予測動きベクトルYV0(M+1)を予測する動きベクトル予測手段と、フレーム画像F(k)(kは時系列順を示す整数)からフレーム画像F(k)の一部である部分画像HFG(k)を切り出すときの切出位置S(k)を算出する切出位置算出手段であって、前記予測動きベクトルYV0(M+1)を用いて、前記画像揺れを減衰させる切出位置S(M+1)を算出する切出位置算出手段と、前記切出位置S(M+1)を用いて、前記フレーム画像F(M+1)から前記部分画像HFG(M+1)を切り出す部分画像切出手段とを有し、前記部分画像切出手段による前記部分画像HFG(M+1)の切り出しを行うことに先立ち、前記画像受取手段による時系列順でM番目のフレームの前記フレーム画像F(M)の受け取り、前記動きベクトル検出手段による動きベクトルV0(M)の検出、前記動きベクトル予測手段による前記予測動きベクトルYV0(M+1)の予測、及び前記切出位置算出手段による前記切出位置S(M+1)の算出を行い、前記部分画像切出手段による前記部分画像HFG(M+1)の切り出しの一部と前記動きベクトル検出手段による動きベクトルV0(M+1)の検出の一部とを並行して行うことを要旨とする。   In order to solve the above-described problem, in the image processing apparatus according to the present invention, (M + 1) (M is an integer of 2 or more) frame images F (1) to F (M + 1) to be displayed, which are continuous in time series. A frame image receiving means for sequentially receiving the frame images F (1) to F (M + 1) that are likely to cause image fluctuations, and a frame image F (p -1) By detecting a motion vector V0 (p) indicating the motion of the frame image F (p) with reference to (1 <p ≦ (M + 1)), the (M + 1) frame images F (1) are detected. Motion vector detection means for obtaining M motion vectors V0 (2) to V0 (M + 1) indicating the motion of M frame images F (2) to F (M + 1) out of F (M + 1); Motion vectors V0 (2) to V0 (M + 1) The overall motion of M frame images F (1) to F (M) indicated by (M-1) motion vectors V0 (2) to V0 (M) is specified by the image shaking. The (M + 1) th frame image F (M + 1) should be displayed on the time axis with X sine waves defined by the frequency divided into X base frequencies (X is an integer). By extending to the time, the predicted motion vector YV0 (M + 1), which is the motion vector of the frame image F (M + 1), indicating the motion of the frame image F (M + 1) with respect to the frame image F (M) is predicted. And a cutout position S () when a partial image HFG (k) that is a part of the frame image F (k) is cut out from the frame image F (k) (k is an integer indicating the time series order). k) cutting position calculation to calculate Means for calculating a cutout position S (M + 1) for attenuating the image fluctuation using the predicted motion vector YV0 (M + 1), and the cutout position S (M + 1). The partial image HFG (M + 1) from the frame image F (M + 1), and prior to cutting out the partial image HFG (M + 1) by the partial image cutout means. Receiving the frame image F (M) of the Mth frame in time-series order by the image receiving means, detecting the motion vector V0 (M) by the motion vector detecting means, and the predicted motion vector by the motion vector predicting means YV0 (M + 1) is predicted, and the cut-out position calculation unit calculates the cut-out position S (M + 1), and the partial image cut-out unit performs the calculation. The gist is that a part of the partial image HFG (M + 1) is cut out in parallel with a part of the detection of the motion vector V0 (M + 1) by the motion vector detecting means.

これによれば、部分画像切出手段による、時系列順で(M+1)番目のフレーム画像F(M+1)から部分画像HFG(M+1)の切り出しが始まるときには、画像受取手段による時系列順でM番目のフレームのフレーム画像F(M)の受け取り、動きベクトル検出手段による動きベクトルV0(M)の検出、動きベクトル予測手段による予測動きベクトルYV0(M+1)の予測、及び切出位置算出手段による切出位置S(M+1)の算出が終了しているので、部分画像切出手段が必要とする切出位置S(M+1)は算出済みである。   According to this, when the partial image HFG (M + 1) starts to be cut out from the (M + 1) th frame image F (M + 1) in the time series order by the partial image cutting means, the Mth in the time series order by the image receiving means. Frame image F (M) of the current frame, detection of motion vector V0 (M) by the motion vector detection means, prediction of predicted motion vector YV0 (M + 1) by the motion vector prediction means, and extraction by the extraction position calculation means Since the calculation of the position S (M + 1) has been completed, the cutting position S (M + 1) required by the partial image cutting means has been calculated.

そのため、部分画像切出手段は、フレーム画像受取手段が受け取ったフレーム画像F(M+1)のデータをすぐに使うことができる。また、動きベクトル検出手段による動きベクトルV0(M+1)の検出は、部分画像切出手段と並行して動作するので、フレーム画像受取手段が受け取ったフレーム画像F(M+1)のデータは、動きベクトル検出手段でもすぐに使うことが出来る。したがって、フレーム画像F(M+1)をフレームメモリなどに記憶しておく必要がなくなり、メモリ使用量を削減することが出来る。   For this reason, the partial image cutout means can immediately use the data of the frame image F (M + 1) received by the frame image receiving means. In addition, since the detection of the motion vector V0 (M + 1) by the motion vector detection means operates in parallel with the partial image extraction means, the data of the frame image F (M + 1) received by the frame image reception means is the motion vector detection. It can be used immediately by means. Therefore, it is not necessary to store the frame image F (M + 1) in a frame memory or the like, and the memory usage can be reduced.

また、動きベクトル予測部は、動きベクトル検出手段が検出した動きベクトルを用いて、M個のフレーム画像F(1)〜F(M)の動きを前記画像揺れにより特定されるX個の基底の周波数に分解する。X個の基底の周波数により規定されるX個の正弦波を時間軸上で(M+1)番目のフレームを表示するべき時間まで延長することから、フレーム画像F(M)を基準とするフレーム画像F(M+1)の動きを示す動きベクトルを精度良く予測する。   Further, the motion vector prediction unit uses the motion vector detected by the motion vector detection means to determine the motions of the M frame images F (1) to F (M) based on the X bases specified by the image shaking. Decompose into frequencies. Since the X sine waves defined by the X base frequencies are extended to the time for displaying the (M + 1) th frame on the time axis, the frame image F with reference to the frame image F (M) is used. A motion vector indicating (M + 1) motion is predicted with high accuracy.

また、上記した本発明に係る画像処理装置では、前記(M−1)個の動きベクトルV0(2)〜V0(M)を用いて、任意のフレーム画像を基準位置とする前記M個のフレーム画像F(1)〜F(M)の全体的な動きを示す軌跡であるM個の動き軌跡X0(1)〜X0(M)を算出する動き軌跡算出手段をさらに有し、前記動きベクトル予測手段は、前記M個の動き軌跡X0(1)〜X0(M)を前記X個の基底の周波数に分解し、当該周波数より規定される前記X個の正弦波を、時間軸上で、前記フレーム画像F(M+1)を表示するべき時刻まで延長することにより、前記予測動きベクトルYV0(M+1)を予測する。   In the above-described image processing apparatus according to the present invention, the M frames having an arbitrary frame image as a reference position using the (M-1) motion vectors V0 (2) to V0 (M). The motion vector prediction means further includes motion trajectory calculation means for calculating M motion trajectories X0 (1) to X0 (M) that are trajectories indicating the overall motion of the images F (1) to F (M). The means decomposes the M motion trajectories X0 (1) to X0 (M) into the X base frequencies, and converts the X sine waves defined by the frequencies on the time axis, The predicted motion vector YV0 (M + 1) is predicted by extending the frame image F (M + 1) to the time to be displayed.

これによれば、(M−1)個の動きベクトルV0(2)〜V0(M)から時間軸上の動きを示す軌跡であるM個の動き軌跡X0(1)〜X0(M)が算出される。軌跡、すなわち座標列としてフレーム画像の動きを表すことで、周波数への分解と正弦波の合成のための計算が簡単になり、処理時間を短縮することができる。   According to this, M motion trajectories X0 (1) to X0 (M), which are trajectories indicating motion on the time axis, are calculated from (M-1) motion vectors V0 (2) to V0 (M). Is done. By representing the motion of the frame image as a trajectory, that is, a coordinate sequence, the calculation for the decomposition into the frequency and the synthesis of the sine wave is simplified, and the processing time can be shortened.

また、上記した本発明に係る画像処理装置では、前記基底の周波数の数Xは、前記M個とは異なる数であることが好ましい。   In the above-described image processing apparatus according to the present invention, it is preferable that the number of base frequencies X is a number different from the M.

基底の周波数の数Xと前記M個が同じ数である場合、予測動きベクトルYV0(M+1)の算出において、時系列順で(M+1)番目以降のフレーム画像の動きは、M個のフレーム画像F(1)〜F(M)の動きを周期的な繰り返しであるという周期性の性質が出てきてしまい、誤差が発生する。基底の周波数の数Xと前記M個が異なる数である場合、周期性の問題は発生しないので、フレーム画像F(M+1)の動きの予測精度がさらに向上する。   When the number of base frequencies X is the same as the M, the motion of the (M + 1) th and subsequent frame images in the time series order in the calculation of the predicted motion vector YV0 (M + 1) is M frame images F. The periodic nature of the movement of (1) to F (M) is a periodic repetition, and an error occurs. When the number of base frequencies X is different from the M, the problem of periodicity does not occur, and the motion prediction accuracy of the frame image F (M + 1) is further improved.

また、前記基底の周波数の数Xは、前記M個よりも少ない数であることが好ましい。   The number X of the base frequencies is preferably smaller than the M.

こうすれば、M個のフレーム画像F(1)〜F(M)を表示すべき時間は、基底の周波数の周期よりも長くなり、M個のフレーム画像F(1)〜F(M)の中に、基底の周波数と同じか高い周波数成分の情報が正確に含まれるようになる。そのため、フレーム画像F(M+1)の動きの予測精度がさらに向上する。   In this way, the time for displaying the M frame images F (1) to F (M) is longer than the period of the base frequency, and the M frame images F (1) to F (M) are displayed. The information of the frequency component that is the same as or higher than the base frequency is accurately included therein. Therefore, the motion prediction accuracy of the frame image F (M + 1) is further improved.

また、前記X個の基底の周波数のうち、直流成分を除く基底の周波数の周期は、フレーム画像F(1)を表示すべき時刻から前記フレーム画像F(M)を表示すべき時刻までの時間よりも短いことが好ましい。   The period of the base frequency excluding the DC component among the X base frequencies is the time from the time when the frame image F (1) should be displayed to the time when the frame image F (M) should be displayed. Shorter than that.

これによれば、周期性の問題は発生しない上に、M個のフレーム画像F(1)〜F(M)の中に、基底の周波数と同じか高い周波数成分の情報が正確に含まれるようになる。そのため、フレーム画像F(M+1)の動きの予測精度がさらに向上する。   According to this, the periodicity problem does not occur, and information on frequency components that are the same as or higher than the base frequency is accurately included in the M frame images F (1) to F (M). become. Therefore, the motion prediction accuracy of the frame image F (M + 1) is further improved.

また、前記動き軌跡算出手段が算出した前記動き軌跡X0(1)〜X0(M)から、前記X個の基底の周波数のうちの直流成分を除く基底の周波数より低い周波数成分であるベースラインを取り除いた軌跡を前記動き軌跡X0(1)〜X0(M)として修正するベースライン算出手段をさらに有し、前記動きベクトル予測手段は、前記ベースライン算出手段により修正された前記M個の動き軌跡X0(1)〜X0(M)を前記X個の基底の周波数に分解し、当該周波数より規定される前記X個の正弦波を、時間軸上で、(M+1)番目の前記フレーム画像F(M+1)を表示するべき時刻まで延長して得られる座標位置と、前記ベースラインを、時間軸上で、(M+1)番目の前記フレーム画像F(M+1)を表示するべき時刻まで延長して得られる座標位置とを加算することにより、動き軌跡X0(M+1)を予測し、動き軌跡X0(M)及び前記動き軌跡X0(M+1)から前記フレーム画像F(M+1)の前記予測動きベクトルYV0(M+1)を予測する。   Further, a baseline that is a frequency component lower than the base frequency excluding the direct current component of the X base frequencies from the motion trajectories X0 (1) to X0 (M) calculated by the motion trajectory calculation means is obtained. Baseline calculation means for correcting the removed trajectory as the motion trajectories X0 (1) to X0 (M) is further included, and the motion vector prediction means is the M motion trajectories corrected by the baseline calculation means. X0 (1) to X0 (M) are decomposed into X base frequencies, and the X sine waves defined by the frequencies are converted into the (M + 1) th frame image F ( The coordinate position obtained by extending to the time to display M + 1) and the baseline are extended to the time to display the (M + 1) th frame image F (M + 1) on the time axis. The motion trajectory X0 (M + 1) is predicted by adding the calculated coordinate position, and the motion vector XV (M + 1) of the frame image F (M + 1) is predicted from the motion trajectory X0 (M) and the motion trajectory X0 (M + 1). ).

これによれば、予測動き軌跡算出手段での周波数への分解と正弦波を時間軸上で延長する処理の対象となる軌跡から、直流成分を除く基底の周波数より低周波成分を取り除く。そのため、修正された動き軌跡X0(1)〜X0(M)には、X個の基底の周波数より低い周波数が少なくなるので、予測精度が向上する。   According to this, the low frequency component is removed from the base frequency excluding the direct current component from the trajectory to be processed by the predicted motion trajectory calculating means and the process of extending the sine wave on the time axis. Therefore, the corrected motion trajectories X0 (1) to X0 (M) have fewer frequencies lower than the X base frequencies, and thus the prediction accuracy is improved.

また、前記ベースラインは、前記動き軌跡X0(1)〜X0(M)の各フレーム間の傾きを平均した傾きをもつ直線であることが好ましい。   Moreover, it is preferable that the base line is a straight line having an inclination obtained by averaging the inclinations between the frames of the movement trajectories X0 (1) to X0 (M).

これによれば、ベースラインは、動き軌跡X0(1)〜X0(M)の各フレーム間の傾き、すなわち、動きベクトルV0(2)〜V0(M)を平均した傾きを持つ直線となる。そのため、ベースラインの算出が簡略化できる。   According to this, the base line is a straight line having an inclination between the frames of the motion trajectories X0 (1) to X0 (M), that is, an average of the motion vectors V0 (2) to V0 (M). Therefore, the calculation of the baseline can be simplified.

また、前記動きベクトル予測手段が前記動き軌跡X0(1)〜X0(M)を使用する前に、時系列順で(M)番目のフレームに近いほど大きな重みを施すことにより、前記動き軌跡X0(1)〜X0(M)を修正する動き軌跡重み付け手段をさらに有することが好ましい。   Further, before the motion vector predicting means uses the motion trajectories X0 (1) to X0 (M), the motion trajectory X0 is given a greater weight as it is closer to the (M) th frame in time series order. It is preferable to further include motion trajectory weighting means for correcting (1) to X0 (M).

これによれば、動き軌跡重み付け手段は、動き軌跡X0(1)〜X0(M)に、時系列順でM番目のフレームに近いほど大きな重みを施す。そして、予測フレーム画像動き算出手段により、動き軌跡X0(1)〜X0(M)をX個の基底の周波数に分解して得られるX個の正弦波は、時系列順でM番目のフレーム画像に近いフレーム画像の動きが強調される。そのため、動きベクトル予測手段手段により、予測動きベクトルYV0(M+1)は、時系列順で遠いフレーム画像の動きよりも、時系列順で近いフレーム画像の動きを反映させらるので、より正確な予測が可能になる。   According to this, the motion trajectory weighting means assigns a larger weight to the motion trajectories X0 (1) to X0 (M) as it is closer to the Mth frame in time series order. Then, the X sine waves obtained by decomposing the motion trajectories X0 (1) to X0 (M) into X base frequencies by the predicted frame image motion calculation means are the Mth frame images in time series order. The motion of the frame image close to is emphasized. For this reason, the motion vector prediction means means that the motion vector predictor YV0 (M + 1) reflects the motion of the frame images that are closer in time series order than the motion of the frame images that are farther in time series order. Is possible.

また、前記動き軌跡重み付け手段は、時系列順で1番目のフレームに対応する値が0に最も近く、時系列順でM番目のフレームに対応する値が1に最も近くなる関数W(n)を用いて、フレームごとに動き軌跡X0(n)の座標とW(n)の値をかけて前記動き軌跡X0(1)〜X0(M)を修正することが好ましい。   The motion trajectory weighting means has a function W (n) in which the value corresponding to the first frame in time series order is closest to 0, and the value corresponding to the Mth frame in time series order is closest to 1. It is preferable to correct the motion trajectories X0 (1) to X0 (M) by multiplying the coordinates of the motion trajectory X0 (n) and the value of W (n) for each frame.

これによれば、動き軌跡重み付け手段は、関数W(n)と動き軌跡X0(n)とをかけて動き軌跡X0(1)〜X0(M)を修正する。そのため、動き軌跡の修正を簡単にかつ早く行うことが出来る。   According to this, the motion trajectory weighting means corrects the motion trajectories X0 (1) to X0 (M) by applying the function W (n) and the motion trajectory X0 (n). Therefore, the movement trajectory can be corrected easily and quickly.

また、前記部分画像HFG(M+1)を時系列順に順次を表示する画像表示手段を有する。   In addition, image display means for sequentially displaying the partial images HFG (M + 1) in chronological order.

この構成によれば、本発明の画像処理装置と同等の効果を持つ画像表示装置が得られる。   According to this configuration, an image display device having an effect equivalent to that of the image processing device of the present invention can be obtained.

また、本発明に係る画像処理方法は、時系列に連続する、表示すべき(M+1)個(Mは2以上の整数)のフレーム画像F(1)〜F(M+1)(括弧内は時系列順を示す整数)であって、画像揺れを発生させる可能性のある前記フレーム画像F(1)〜F(M+1)を順次受け取るフレーム画像受取工程と、フレーム画像F(p−1)(1<p≦(M+1))を基準とするフレーム画像F(p)の動きを示す動きベクトルV0(p)を検出することにより、前記(M+1)個のフレーム画像F(1)〜F(M+1)のうち、M個のフレーム画像F(2)〜F(M+1)の動きを示すM個の動きベクトルV0(2)〜V0(M+1)を得る動きベクトル検出工程と、前記M個の動きベクトルV0(2)〜V0(M+1)のうちの(M−1)個の動きベクトルV0(2)〜V0(M)で示される、M個のフレーム画像F(1)〜F(M)の全体的な動きを前記画像揺れにより特定されるX個(Xは整数)の基底の周波数に分解し、当該周波数より規定されるX個の正弦波を、時間軸上で、(M+1)番目のフレーム画像F(M+1)を表示するべき時刻まで延長することにより、フレーム画像F(M)を基準とする前記フレーム画像F(M+1)の動きを示す、前記フレーム画像F(M+1)の動きベクトルである予測動きベクトルYV0(M+1)を予測する動きベクトル予測工程と、フレーム画像F(k)(kは時系列順を示す整数)からフレーム画像F(k)の一部である部分画像HFG(k)を切り出すときの切出位置S(k)を算出する切出位置算出工程であって、前記予測動きベクトルYV0(M+1)を用いて、前記画像揺れを減衰させる切出位置S(M+1)を算出する切出位置算出工程と、前記切出位置S(M+1)を用いて、前記フレーム画像F(M+1)から前記部分画像HFG(M+1)を切り出す部分画像切出工程とを有し、前記部分画像切出工程による前記部分画像HFG(M+1)の切り出しを行うことに先立ち、前記画像受取工程による時系列順でM番目のフレームの前記フレーム画像F(M)の受け取り、前記動きベクトル検出工程による動きベクトルV0(M)の検出、前記動きベクトル予測工程による前記予測動きベクトルYV0(M+1)の予測、及び前記切出位置算出工程による前記切出位置S(M+1)の算出を行い、前記部分画像切出工程による前記部分画像HFG(M+1)の切り出しの一部と前記動きベクトル検出工程による動きベクトルV0(M+1)の検出の一部とを並行して行うことを要旨とする。   In addition, the image processing method according to the present invention provides (M + 1) frame images F (1) to F (M + 1) to be displayed (M is an integer equal to or larger than 2), which are continuous in time series. A frame image receiving step for sequentially receiving the frame images F (1) to F (M + 1) that may cause image shaking, and a frame image F (p−1) (1 < (M + 1) frame images F (1) to F (M + 1) are detected by detecting a motion vector V0 (p) indicating the motion of the frame image F (p) with reference to p ≦ (M + 1)). Among them, a motion vector detecting step for obtaining M motion vectors V0 (2) to V0 (M + 1) indicating motions of M frame images F (2) to F (M + 1), and the M motion vectors V0 ( (M-1) of 2) to V0 (M + 1) X pieces (X is an integer) of the overall movement of the M frame images F (1) to F (M) indicated by the motion vectors V0 (2) to V0 (M) specified by the image shake. The frame image F is decomposed into base frequencies, and X sine waves defined by the frequencies are extended to the time at which the (M + 1) th frame image F (M + 1) is to be displayed on the time axis. A motion vector prediction step of predicting a predicted motion vector YV0 (M + 1), which is a motion vector of the frame image F (M + 1), indicating the motion of the frame image F (M + 1) with reference to (M); A cut-out position calculating step of calculating a cut-out position S (k) when cutting out a partial image HFG (k) that is a part of the frame image F (k) from (k) (k is an integer indicating a time-series order) And said Using the motion vector YV0 (M + 1), a cutout position calculating step for calculating a cutout position S (M + 1) for attenuating the image fluctuation, and using the cutout position S (M + 1), the frame image F ( A partial image cutting step of cutting out the partial image HFG (M + 1) from M + 1), and prior to cutting out the partial image HFG (M + 1) by the partial image cutting step, Receiving the frame image F (M) of the Mth frame in sequence order, detecting the motion vector V0 (M) by the motion vector detection step, and predicting the prediction motion vector YV0 (M + 1) by the motion vector prediction step; And the cut-out position S (M + 1) is calculated by the cut-out position calculating step, and the partial image HFG (M + 1) by the partial image cut-out step is calculated. ) And a part of the detection of the motion vector V0 (M + 1) by the motion vector detection step in parallel.

この構成によれば、本発明の画像処理装置と同等の効果が得られる。   According to this configuration, an effect equivalent to that of the image processing apparatus of the present invention can be obtained.

また、本発明に係る画像処理プログラムは、コンピュータを、時系列に連続する、表示すべき(M+1)個(Mは2以上の整数)のフレーム画像F(1)〜F(M+1)(括弧内は時系列順を示す整数)であって、画像揺れを発生させる可能性のある前記フレーム画像F(1)〜F(M+1)を順次受け取るフレーム画像受取手段と、フレーム画像F(p−1)(1<p≦(M+1))を基準とするフレーム画像F(p)の動きを示す動きベクトルV0(p)を検出することにより、前記(M+1)個のフレーム画像F(1)〜F(M+1)のうち、M個のフレーム画像F(2)〜F(M+1)の動きを示すM個の動きベクトルV0(2)〜V0(M+1)を得る動きベクトル検出手段と、前記M個の動きベクトルV0(2)〜V0(M+1)のうちの(M−1)個の動きベクトルV0(2)〜V0(M)で示される、M個のフレーム画像F(1)〜F(M)の全体的な動きを前記画像揺れにより特定されるX個(Xは整数)の基底の周波数に分解し、当該周波数より規定されるX個の正弦波を、時間軸上で、(M+1)番目のフレーム画像F(M+1)を表示するべき時刻まで延長することにより、フレーム画像F(M)を基準とする前記フレーム画像F(M+1)の動きを示す、前記フレーム画像F(M+1)の動きベクトルである予測動きベクトルYV0(M+1)を予測する動きベクトル予測手段と、フレーム画像F(k)(kは時系列順を示す整数)からフレーム画像F(k)の一部である部分画像HFG(k)を切り出すときの切出位置S(k)を算出する切出位置算出手段であって、前記予測動きベクトルYV0(M+1)を用いて、前記画像揺れを減衰させる切出位置S(M+1)を算出する切出位置算出手段と、前記切出位置S(M+1)を用いて、前記フレーム画像F(M+1)から前記部分画像HFG(M+1)を切り出す部分画像切出手段として機能させるためのプログラムであって、前記部分画像切出手段による前記部分画像HFG(M+1)の切り出しを行うことに先立ち、前記画像受取手段による時系列順でM番目のフレームの前記フレーム画像F(M)の受け取り、前記動きベクトル検出手段による動きベクトルV0(M)の検出、前記動きベクトル予測手段による前記予測動きベクトルYV0(M+1)の予測、及び前記切出位置算出手段による前記切出位置S(M+1)の算出を行い、前記部分画像切出手段による前記部分画像HFG(M+1)の切り出しの一部と前記動きベクトル検出手段による動きベクトルV0(M+1)の検出の一部とを並行して行うことを要旨とする。   In addition, the image processing program according to the present invention causes a computer to display (M + 1) (M + 1) frame images F (1) to F (M + 1) (in parentheses) to be displayed in time series. Is an integer indicating a time-series order), and frame image receiving means for sequentially receiving the frame images F (1) to F (M + 1) that may cause image shaking, and a frame image F (p-1) By detecting a motion vector V0 (p) indicating the motion of the frame image F (p) based on (1 <p ≦ (M + 1)), the (M + 1) frame images F (1) to F ( M + 1), M motion vectors V0 (2) to V0 (M + 1) indicating motion of the M frame images F (2) to F (M + 1), and the M motions Vectors V0 (2) to V0 (M + 1) The overall motion of M frame images F (1) to F (M) indicated by (M-1) motion vectors V0 (2) to V0 (M) is specified by the image shaking. The (M + 1) th frame image F (M + 1) should be displayed on the time axis with X sine waves defined by the frequency divided into X base frequencies (X is an integer). By extending to the time, the predicted motion vector YV0 (M + 1), which is the motion vector of the frame image F (M + 1), indicating the motion of the frame image F (M + 1) with respect to the frame image F (M) is predicted. And a cutout position S () when a partial image HFG (k) that is a part of the frame image F (k) is cut out from the frame image F (k) (k is an integer indicating the time series order). k) cutting position calculation to calculate Means for calculating a cutout position S (M + 1) for attenuating the image fluctuation using the predicted motion vector YV0 (M + 1), and the cutout position S (M + 1). A program for causing the partial image HFG (M + 1) to be cut out from the frame image F (M + 1), and cutting out the partial image HFG (M + 1) by the partial image cutting out means Prior to performing the reception of the frame image F (M) of the Mth frame in time-series order by the image receiving means, detection of the motion vector V0 (M) by the motion vector detection means, and the motion vector prediction means Prediction of the predicted motion vector YV0 (M + 1) by the calculation of the cutout position S (M + 1) by the cutout position calculation means The gist is that a part of the partial image HFG (M + 1) cut out by the partial image cutout unit and a part of the detection of the motion vector V0 (M + 1) by the motion vector detection unit are performed in parallel.

この構成によれば、本発明の画像処理装置と同等の効果が得られる。   According to this configuration, an effect equivalent to that of the image processing apparatus of the present invention can be obtained.

また、本発明を画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体としても捉えることができる。この構成によれば、本発明の画像処理装置と同等の効果が得られる。   The present invention can also be understood as a computer-readable recording medium on which an image processing program is recorded. According to this configuration, an effect equivalent to that of the image processing apparatus of the present invention can be obtained.

次に、本発明の実施の形態を説明する。図1は本発明の一実施形態としての画像処理装置の概略構成を示す説明図である。この画像処理装置は汎用のコンピュータ100であり、入力インターフェイス(I/F)101、CPU103、RAM102、ROM104、ハードディスク105および出力インターフェイス(I/F)106とを備え、これらはバス107を介して互いに接続されている。入力I/F101には、動画像を入力する装置としてのデジタルビデオカメラ200(画像撮像装置)およびDVDプレーヤ210が接続され、出力I/F106には動画像を出力する装置(画像表示装置)としてのビデオプロジェクタ300およびディスプレイ310が接続されている。その他、必要に応じて、動画像を記憶した記憶媒体からデータを読み出すことが可能な駆動装置や、動画像を出力することが可能な画像表示装置をそれぞれ接続することもできる。なお、動画像には時系列に連続する静止画像も含まれる。   Next, an embodiment of the present invention will be described. FIG. 1 is an explanatory diagram showing a schematic configuration of an image processing apparatus as an embodiment of the present invention. The image processing apparatus is a general-purpose computer 100, and includes an input interface (I / F) 101, a CPU 103, a RAM 102, a ROM 104, a hard disk 105, and an output interface (I / F) 106, which are connected to each other via a bus 107. It is connected. The input I / F 101 is connected to a digital video camera 200 (image capturing device) and a DVD player 210 as devices that input moving images, and the output I / F 106 is a device (image display device) that outputs moving images. Video projector 300 and display 310 are connected. In addition, if necessary, a drive device that can read data from a storage medium that stores a moving image and an image display device that can output a moving image can be connected. Note that moving images include time-sequential still images.

また、上記画像撮像装置および画像表示装置が、それぞれ本発明による画像処理装置を備えるように構成することもできる。   In addition, the image capturing apparatus and the image display apparatus may each include an image processing apparatus according to the present invention.

入力I/F101は、所定の画素数とRGB形式など所定の画素値を有する動画像からフレーム画像を取得し、コンピュータ100で処理できるフレーム画像データに変換する。本実施形態では、フレーム画像を構成する所定枚数のフィールド画像から、フレーム画像データを取得するものとする。フレーム画像は、記録方式に応じて通常複数の所定枚数のフィールド画像によって構成されている。例えば、NTSC方式で記録された動画像の場合は、インターレース方式であり、毎秒60枚のフィールド画像によって毎秒30枚のフレーム画像が構成されている。従って、入力I/F101は、2つのフィールド画像の画素値を用いて1つのフレーム画像を取得する。もとより、1つのフィールド画像が1つのフレーム画像を構成しているプレグレッシブ方式(ノンインターレース方式)のような場合は、1つのフィールド画像を用いて1つのフレーム画像を取得することになる。   The input I / F 101 acquires a frame image from a moving image having a predetermined number of pixels and a predetermined pixel value such as an RGB format, and converts it into frame image data that can be processed by the computer 100. In the present embodiment, it is assumed that frame image data is acquired from a predetermined number of field images constituting the frame image. The frame image is usually composed of a plurality of predetermined number of field images according to the recording method. For example, in the case of a moving image recorded by the NTSC system, it is an interlace system, and 60 frame images per second constitute 30 frame images per second. Therefore, the input I / F 101 acquires one frame image using the pixel values of the two field images. Of course, in the case of a progressive method (non-interlace method) in which one field image constitutes one frame image, one frame image is acquired using one field image.

変換されたフレーム画像データは、RAM102又はハードディスク105に格納される。CPU103は格納されたフレーム画像データに対して所定の画像処理を実行し、補正フレーム画像データとして再びRAM102又はハードディスク105に格納する。補正フレーム画像データを生成するまでに行われる所定の画像処理に際し、必要に応じてRAM102やハードディスク105が画像処理データのワーキングメモリとして用いられる。そして、格納した補正フレーム画像データを、出力I/F106を介して所定の画像データに変換し、ビデオプロジェクタ300などに送出する。   The converted frame image data is stored in the RAM 102 or the hard disk 105. The CPU 103 executes predetermined image processing on the stored frame image data, and stores it again in the RAM 102 or the hard disk 105 as corrected frame image data. In the case of predetermined image processing performed until the corrected frame image data is generated, the RAM 102 and the hard disk 105 are used as a working memory for the image processing data as necessary. Then, the stored corrected frame image data is converted into predetermined image data via the output I / F 106 and sent to the video projector 300 or the like.

所定の画像処理を記録したアプリケーションプログラムは、予めハードディスク105やROM104に格納されていることとしてもよい。例えばCD−ROMなどのコンピュータが読み取り可能な記録媒体によって外部から供給され、図示しないDVD−R/RWドライブを介してハードディスク105に記憶することによって格納されるものとしてもよい。もとより、インターネットなどのネットワーク手段を介して、アプリケーションプログラムを供給するサーバー等にアクセスし、データをダウンロードすることによってハードディスク105に格納されるものとしてもよい。   An application program that records predetermined image processing may be stored in advance in the hard disk 105 or the ROM 104. For example, the recording medium may be supplied from the outside by a computer-readable recording medium such as a CD-ROM and stored in the hard disk 105 via a DVD-R / RW drive (not shown). Of course, the data may be stored in the hard disk 105 by accessing a server or the like that supplies an application program via network means such as the Internet and downloading data.

CPU103は、バス107を介してハードディスク105またはROM104に格納されたアプリケーションプログラムを読み出し、この読み出したアプリケーションプログラムを所定のオペレーティングシステムのもとで実行することによって、画像処理装置として機能する。図2に、本発明の一実施形態としての画像処理装置の機能ブロック図を示す。図2に示すように、このアプリケーションプログラムが実行されることにより、CPU103は、フレーム画像受取手段110、動きベクトル検出手段120、動き軌跡算出手段121、ベースライン算出手段122、動き軌跡重み付け手段123、動きベクトル予測手段124、メモリ126、切出位置算出手段130、部分画像切出手段140および画像表示手段150として機能する。   The CPU 103 functions as an image processing apparatus by reading an application program stored in the hard disk 105 or the ROM 104 via the bus 107 and executing the read application program under a predetermined operating system. FIG. 2 shows a functional block diagram of an image processing apparatus as an embodiment of the present invention. As shown in FIG. 2, by executing this application program, the CPU 103 causes the frame image receiving means 110, the motion vector detecting means 120, the motion trajectory calculating means 121, the baseline calculating means 122, the motion trajectory weighting means 123, It functions as a motion vector prediction unit 124, a memory 126, a cutout position calculation unit 130, a partial image cutout unit 140, and an image display unit 150.

各部はそれぞれ以下の処理を司る。フレーム画像受取手段110は、コンピュータ100に入力した動画像から時系列順にフレーム画像を取得する。動きベクトル検出手段120は、取得されたフレーム画像の動きベクトルを算出して、メモリ126に格納するとともに、動き軌跡算出手段121に供給する。動き軌跡算出手段121は、現フレームから過去Mフレーム分の動き軌跡を用いて、現フレームから過去Mフレーム分のフレーム画像の動きを示す動き軌跡を算出する。そして、ベースライン算出手段122は、動き軌跡の低周波成分であるベースラインを算出して、動き軌跡算出手段121が算出した動き軌跡からベースラインの成分を取り除いたものを動き軌跡として修正する。次に動き軌跡重み付け手段123は、ベースライン算出手段122が修正した動き軌跡に対して、現フレームに近いフレームが1であり、現フレームから離れるに従って0に近づいていく窓関数W(n)を用いて、動き軌跡に重み付けを施して動き軌跡を修正する。この処理により、動き軌跡は、現フレームに近いほど、修正前の軌跡に近く、現フレームから離れるに従って、振幅がほとんどない軌跡になる。次に動きベクトル予測手段124は、動き軌跡をX個の基底の周波数に分解する。そして、基底の周波数により規定される正弦波の重ね合わせで動き軌跡を表せるようにする。次にこの正弦波を現フレームの次のフレームの時刻まで延長することで、次フレームのフレーム画像の動き軌跡を予測する。そして、この動き軌跡にベースライン成分を加算し、現フレームの動き軌跡と予測した次フレームの動き軌跡から次フレームの動きベクトルを予測するのである。
切出位置算出手段130は、動きベクトルなどを用いて、フレーム画像から所定の画像を切り出すための画像位置を補正位置ベクトルとして算出する。部分画像切出手段140は、算出された補正位置ベクトルなどに基づいて補正フレーム画像を生成する。画像表示手段150は、生成された補正フレーム画像を所定の画像データに変換して出力する。
Each part manages the following processes. The frame image receiving unit 110 acquires frame images from the moving image input to the computer 100 in chronological order. The motion vector detection unit 120 calculates a motion vector of the acquired frame image, stores it in the memory 126, and supplies it to the motion trajectory calculation unit 121. The motion trajectory calculation means 121 calculates a motion trajectory indicating the motion of the frame image for the past M frames from the current frame using the motion trajectory for the past M frames from the current frame. The baseline calculation unit 122 calculates a baseline that is a low frequency component of the motion trajectory, and corrects the motion trajectory calculated by the motion trajectory calculation unit 121 by removing the baseline component as a motion trajectory. Next, the motion trajectory weighting means 123 calculates a window function W (n) that is 1 near the current frame and approaches 0 as it moves away from the current frame with respect to the motion trajectory corrected by the baseline calculation means 122. Use to correct the motion trajectory by weighting the motion trajectory. With this processing, the closer to the current frame the closer to the current trajectory, the closer to the trajectory before correction, and the closer to the current frame, the less trajectory the amplitude is. Next, the motion vector prediction unit 124 decomposes the motion trajectory into X base frequencies. Then, the motion trajectory can be expressed by superposition of sine waves defined by the base frequency. Next, by extending this sine wave to the time of the next frame of the current frame, the motion trajectory of the frame image of the next frame is predicted. Then, the baseline component is added to the motion trajectory, and the motion vector of the next frame is predicted from the motion trajectory of the current frame and the predicted motion trajectory of the next frame.
The cut-out position calculating unit 130 calculates an image position for cutting out a predetermined image from the frame image as a correction position vector using a motion vector or the like. The partial image cutout unit 140 generates a correction frame image based on the calculated correction position vector. The image display means 150 converts the generated corrected frame image into predetermined image data and outputs it.

次に、本実施形態の画像処理装置について各部が行う処理を、図3の処理フローチャートにより説明する。図3に示した処理が開始されると、まずステップS10にて、フレーム画像受取手段110は、入力される動画像から時系列順に、フレーム画像F(n)をコンピュータ100に取り込む処理を行う。なお、本実施形態における以下の画像処理装置の説明において、(n)は時系列順でn番目(nは1以上の整数)であることを意味する。また、図3において、mは整数であり、nおよびmの初期値はそれぞれn=1、m=0とする。   Next, processing performed by each unit in the image processing apparatus according to the present embodiment will be described with reference to a processing flowchart of FIG. When the process shown in FIG. 3 is started, first, in step S10, the frame image receiving unit 110 performs a process of fetching the frame image F (n) into the computer 100 in order of time series from the input moving image. In the following description of the image processing apparatus according to the present embodiment, (n) means the nth (n is an integer of 1 or more) in time series order. In FIG. 3, m is an integer, and the initial values of n and m are n = 1 and m = 0, respectively.

本実施形態では、動画像の入力をトリガーにして、自動的にフレーム画像を時系列順で順次取り込むこととする。もとより、取り込むフレーム画像を指定することとしてもよい。フレーム画像の指定方法は、動画像からフレーム画像を取得してコンピュータ100に取り込む際、通常付加されるフレーム画像の識別番号を指定するようにしてもよい。あるいは、ユーザーがビデオカメラに備えられたモニターなどのディスプレイ(図示せず)に表示されるフレーム画像を見ながら画像を直接指定することとしてもよい。   In this embodiment, it is assumed that frame images are automatically captured sequentially in time-series order with the input of a moving image as a trigger. Of course, the frame image to be captured may be designated. As a method for specifying a frame image, an identification number of a frame image that is normally added may be specified when a frame image is acquired from a moving image and imported into the computer 100. Alternatively, the user may directly designate an image while viewing a frame image displayed on a display (not shown) such as a monitor provided in the video camera.

次に、ステップS20において、フレーム画像受取手段110は、コンピュータ100に取り込むことによって取得したフレーム画像F(n)が存在するか否かを判定する。動画像から取得したフレーム画像F(n)が存在すれば(YES)ステップS24に進む。一方、動画像から取得したフレーム画像F(n)が存在しなければ(NO)、ステップS22に進みmを更新して(m=m+1として)ステップS24に進む。   Next, in step S <b> 20, the frame image receiving unit 110 determines whether or not there is a frame image F (n) acquired by being taken into the computer 100. If the frame image F (n) acquired from the moving image exists (YES), the process proceeds to step S24. On the other hand, if the frame image F (n) acquired from the moving image does not exist (NO), the process proceeds to step S22, m is updated (m = m + 1), and the process proceeds to step S24.

そして、ステップS24において、m=2か否かが判定され、m=2の場合(S24、YES)には画像処理装置における処理を終了する。   In step S24, it is determined whether or not m = 2. If m = 2 (S24, YES), the processing in the image processing apparatus ends.

一方、m=2でない場合(S24、NO)、(A)S26、S30、S35およびS40における処理と、(B)S28およびS50における処理と、(C)S65およびS70における処理とが、S10において1フレーム分の情報を読み込む間に並行して行われる。   On the other hand, if m = 2 is not satisfied (S24, NO), (A) the processes in S26, S30, S35 and S40, (B) the processes in S28 and S50, and (C) the processes in S65 and S70 are performed in S10. This is done in parallel while reading information for one frame.

まず、S26、S30、S35、S40における処理について説明する。
(A)S26、S30、S35、S40における処理
ステップS26において、m=1か否かが判定され、m=1の場合(S26、YES)には、ステップS80に進む。
First, the processes in S26, S30, S35, and S40 will be described.
(A) Processing in S26, S30, S35, and S40 In step S26, it is determined whether m = 1 or not. If m = 1 (S26, YES), the process proceeds to step S80.

一方、m=1でない場合(S26、NO)、ステップS30において、動きベクトル検出手段120は、取得したフレーム画像F(n)の動きベクトルV0(n)の検出処理を行う。時系列順n−1番目のフレーム画像F(n−1)に対するフレーム画像F(n)の相対位置を検出し、その相対位置にフレーム画像F(n)を配置する。そして、フレーム画像F(n−1)の画面位置に対するフレーム画像F(n)の画面位置のずれ量を、X,Y方向のそれぞれの画素数として検出する。このX方向の画素数をX成分、Y方向の画素数をY成分とするベクトルによって表したものが、フレーム画像F(n)の動きベクトルV0(n)となる。算出した動きベクトルV0(n)のデータV0(n)は、メモリ126(RAM102など)に格納される。   On the other hand, if m = 1 is not satisfied (S26, NO), in step S30, the motion vector detection means 120 performs a process for detecting the motion vector V0 (n) of the acquired frame image F (n). The relative position of the frame image F (n) with respect to the n−1th frame image F (n−1) in time series order is detected, and the frame image F (n) is arranged at the relative position. Then, the shift amount of the screen position of the frame image F (n) with respect to the screen position of the frame image F (n−1) is detected as the number of pixels in the X and Y directions. A motion vector V0 (n) of the frame image F (n) is represented by a vector having the number of pixels in the X direction as an X component and the number of pixels in the Y direction as a Y component. Data V0 (n) of the calculated motion vector V0 (n) is stored in the memory 126 (such as the RAM 102).

次に、図4及び図5を参照して、動きベクトル検出手段120による、図3のS30におけるn番目のフレーム画像の動きベクトル検出処理を詳細に説明する。ここで、図4は、図3のS30におけるn番目のフレーム画像の動きベクトルの検出処理を詳細に説明するためのフローチャートである。また、図5は、図3のS30におけるn番目のフレーム画像の動きベクトルの検出処理を詳細に説明するための説明図である。   Next, with reference to FIGS. 4 and 5, the motion vector detection processing of the nth frame image in S30 of FIG. 3 by the motion vector detection means 120 will be described in detail. Here, FIG. 4 is a flowchart for explaining in detail the motion vector detection processing of the n-th frame image in S30 of FIG. FIG. 5 is an explanatory diagram for explaining in detail the motion vector detection processing of the nth frame image in S30 of FIG.

まず、動きベクトル検出手段120は、以下で図5を参照して説明する差分値行列をリセットする(ステップS300)。すなわち、差分値行列の成分の値をすべて0にする。   First, the motion vector detection unit 120 resets a difference value matrix described below with reference to FIG. 5 (step S300). That is, all the component values of the difference value matrix are set to zero.

次に、動きベクトル検出手段120は、図5に示す差分算出領域の座標データを読み込む(ステップS302)。すなわち、動きベクトル検出手段120は、各サンプリングポイント毎に設定されている、フレーム画像内における差分算出領域の範囲を示す座標データをメモリ126から読み込む。なお、当該実施形態において、「差分算出領域」とは、図5において点線で示される正方形状の領域で、以下で説明するステップS310〜S316における処理を行う領域である。各処理については後述する。   Next, the motion vector detection means 120 reads the coordinate data of the difference calculation area shown in FIG. 5 (step S302). That is, the motion vector detection unit 120 reads from the memory 126 coordinate data indicating the range of the difference calculation area in the frame image set for each sampling point. In the present embodiment, the “difference calculation area” is a square area indicated by a dotted line in FIG. 5 and is an area for performing the processing in steps S310 to S316 described below. Each process will be described later.

次に、動きベクトル検出手段120は、(n−1)番目のフレーム画像のサンプリングポイントにおけるデータを読み込む(ステップS304)。すなわち、動きベクトル検出手段120は、メモリ126から、(n−1)番目のフレーム画像におけるサンプリングポイント(図5に示す)の座標データおよび画素データを読み込む。当該実施形態において、読み込まれる画素データは、RGBいずれかのチャンネルの値または輝度値とする。   Next, the motion vector detection means 120 reads data at the sampling point of the (n−1) th frame image (step S304). That is, the motion vector detection unit 120 reads the coordinate data and pixel data of the sampling point (shown in FIG. 5) in the (n−1) th frame image from the memory 126. In the present embodiment, the pixel data to be read is a value of one of RGB channels or a luminance value.

次に、動きベクトル検出手段120は、n番目のフレーム画像における各画素データ(入力信号)およびその座標データを読み込む(ステップS306)。ここで、読み込まれる画素データは、RGBいずれかのチャンネルの値または輝度値であり、座標データは、フレーム画像内における各画素の位置を示す。読み込む順番は、図5に示すように、フレーム画像の左上から右横方向に読み込み、順次下方に1ライン毎読み込む。最終的にはフレーム画像の右下のポイントEP2まで到達し、当該読み込み処理を終了する。   Next, the motion vector detection means 120 reads each pixel data (input signal) and its coordinate data in the nth frame image (step S306). Here, the pixel data to be read is a value or luminance value of one of the RGB channels, and the coordinate data indicates the position of each pixel in the frame image. As shown in FIG. 5, the order of reading is read from the upper left of the frame image to the right lateral direction, and sequentially read downward line by line. Eventually, it reaches the lower right point EP2 of the frame image, and the reading process is terminated.

次に、動きベクトル検出手段120は、ステップS306において読み込まれた各画素が差分算出領域内に存在するか否かを判定する(ステップS308)。具体的には、ステップS306で読み込んだ画素の座標データと、ステップS302で読み込んだ差分算出領域の座標データを比較し、ステップS306で読み込んだ画素が差分算出領域内に存在するか否かを判定する。   Next, the motion vector detection means 120 determines whether or not each pixel read in step S306 exists in the difference calculation area (step S308). Specifically, the coordinate data of the pixel read in step S306 and the coordinate data of the difference calculation area read in step S302 are compared, and it is determined whether or not the pixel read in step S306 exists in the difference calculation area. To do.

判定の結果、ステップS306で読み込んだ画素が差分算出領域外ならば(ステップS308、No)、ステップS306に戻り、次の画素を読み込む。   If the result of determination is that the pixel read in step S306 is outside the difference calculation area (No in step S308), the process returns to step S306 to read the next pixel.

判定の結果、ステップS306で読み込んだ画素が差分算出領域内に存在する場合(ステップS308、Yes)、動きベクトル検出手段120は、ステップS306で読み込んだ画素の座標データと、ステップS304で読み込んだ(n−1)番目のフレーム画像におけるサンプリングポイントの座標データとが一致するか否かを判定する(ステップS310)。判定の結果、ステップS306で読み込んだ画素の座標データと、ステップS304で読み込んだ(n−1)番目のフレーム画像におけるサンプリングポイントの座標データとが一致すれば(ステップS310、Yes)、動きベクトル検出手段120は、ステップS306で読み込んだn番目のフレーム画像における画素の画素データをサンプリングデータとしてメモリ126に保存する(ステップS312)。   As a result of the determination, when the pixel read in step S306 is present in the difference calculation area (step S308, Yes), the motion vector detection unit 120 reads the pixel coordinate data read in step S306 and the pixel data read in step S304 ( It is determined whether or not the coordinate data of the sampling point in the n-1) th frame image matches (step S310). If the coordinate data of the pixel read in step S306 matches the coordinate data of the sampling point in the (n−1) th frame image read in step S304 as a result of the determination (step S310, Yes), motion vector detection is performed. The means 120 stores the pixel data of the pixels in the nth frame image read in step S306 in the memory 126 as sampling data (step S312).

そして、ステップS312の処理の後、またはステップS310における判定の結果、ステップS306で読み込んだ画素の座標データと、ステップS304で読み込んだ(n−1)番目のフレーム画像におけるサンプリングポイントの座標データとが一致しない場合(ステップS310、No)、動きベクトル検出手段120は、(n−1)番目のフレーム画像におけるサンプリングポイントのデータと、n番目のフレーム画像における画素データとの差分の絶対値を算出して(ステップS314)、当該算出された絶対値を差分値行列の対応成分に加算する(ステップS316)。   Then, after the process of step S312, or as a result of the determination in step S310, the coordinate data of the pixel read in step S306 and the coordinate data of the sampling point in the (n−1) th frame image read in step S304. If they do not match (No in step S310), the motion vector detection means 120 calculates the absolute value of the difference between the sampling point data in the (n-1) th frame image and the pixel data in the nth frame image. (Step S314), the calculated absolute value is added to the corresponding component of the difference value matrix (Step S316).

当該実施形態において、図5に示すように、差分値行列は差分算出領域内の全画素数と同数のデータを格納できるように構成され、差分値行列の中央の座標がサンプリングポイントの座標に相当する。差分値の絶対値を加算する成分は、差分値行列内のサンプリングポイントに対する位置関係において、ステップS306で読み込んだ画素座標と同じ位置にある成分である。   In this embodiment, as shown in FIG. 5, the difference value matrix is configured to store the same number of data as the total number of pixels in the difference calculation area, and the coordinates of the center of the difference value matrix correspond to the coordinates of the sampling points. To do. The component to which the absolute value of the difference value is added is a component at the same position as the pixel coordinate read in step S306 in the positional relationship with respect to the sampling point in the difference value matrix.

動きベクトル検出手段120は、差分算出領域内の全画素の読み込みが終了したか否かの判定を行い(ステップS318)、ステップS306で読み込んだ画素の座標が図5の「差分値計算が終了するポイントEP1」か否かを判定する。差分算出領域内の全画素の読み込みが終了していない場合(ステップS318、No)、動きベクトル検出手段120は、ステップS306〜S316の処理を繰り返す。   The motion vector detecting means 120 determines whether or not reading of all the pixels in the difference calculation area is completed (step S318), and the coordinates of the pixel read in step S306 are “difference value calculation is completed” in FIG. It is determined whether or not the point is “EP1”. When reading of all the pixels in the difference calculation area has not been completed (No at Step S318), the motion vector detection unit 120 repeats the processes at Steps S306 to S316.

差分算出領域内の全画素の読み込みが終了し、ステップS306で読み込んだ画素の座標が図5の「差分値計算が終了するポイントEP1」に到達した場合(ステップS318、Yes)、フレーム画像受取手段110がn番目のフレーム画像における残りの画素の読み込みを継続するとともに、動きベクトル検出手段120は、n番目のフレーム画像の動きベクトルを検出する(ステップS320)。すなわち、動きベクトル検出手段120は、差分値行列内における最小値の成分のサンプリングポイントからの位置(ベクトル)を求め、当該位置(ベクトル)をn番目のフレーム画像の動きベクトルとして検出して、メモリ126に保存する。   When the reading of all the pixels in the difference calculation area is completed and the coordinates of the pixel read in step S306 have reached the “point EP1 at which the difference value calculation ends” in FIG. 5 (step S318, Yes), the frame image receiving means 110 continues reading the remaining pixels in the nth frame image, and the motion vector detection means 120 detects the motion vector of the nth frame image (step S320). That is, the motion vector detection unit 120 obtains a position (vector) from the sampling point of the minimum value component in the difference value matrix, detects the position (vector) as a motion vector of the nth frame image, and Save to 126.

以上により図3のステップS30におけるn番目のフレーム画像の動きベクトル検出処理が終了して、図3のステップS35における(n+1)番目のフレーム画像の動きベクトルの予測処理が行われる。図6の(n+1)番目のフレーム画像の動きベクトルの予測処理を説明するためのフローチャートと、図7の動き軌跡による動きベクトルの予測処理を説明するための説明図を用いて、(n+1)番目のフレーム画像の動きベクトルの予測処理を説明する。   Thus, the motion vector detection process for the nth frame image in step S30 in FIG. 3 is completed, and the motion vector prediction process for the (n + 1) th frame image in step S35 in FIG. 3 is performed. Using the flowchart for explaining the motion vector prediction process of the (n + 1) th frame image in FIG. 6 and the explanatory diagram for explaining the motion vector prediction process by the motion trajectory in FIG. The motion vector prediction process of the frame image will be described.

最初に、動き軌跡算出手段121は、(n−M+1)番目からn番目までのM個のフレーム画像の動きベクトルV0(n−M+1)〜V0(n)をメモリ126から読み取る(ステップS340)。また、フレーム画像は時系列順で1番目から始まるため、時系列順で2番目より前フレーム画像の動きベクトルは算出されていない。そのため、(n−M+1)≦1である場合は、V0(q)=0(q≦1)として、動き軌跡算出手段121がM個の動きベクトル(n−M+1)〜V0(n)を読み取れるようにする。Mは、手ぶれなどの画像揺れの周波数などにより予め決められる数であり、本実施形態では8とする。次に、動き軌跡算出手段121は、式(1)を用いて(n−M+1)番目からn番目までのM個のフレーム画像の座標を示す動き軌跡X(−M+1)〜X(0)を算出する(ステップS342)。動き軌跡X(i)と後で説明する修正された動き軌跡X1(i),X2(i),X3(i),X4(i)と、窓関数W(i)、及びベースラインB(i)における括弧内の整数iは、フレーム画像の時系列順を示す整数である。iは、フレーム画像F(n)で使用している時系列順とは原点が異なり、n番目のフレーム画像F(n)を原点0とする時系列順を示す整数である。すなわち、動き軌跡X(0)で示される座標は、フレーム画像F(n)の座標を指す。以下の説明では、n番目のフレーム画像F(n)を原点0とする時系列順を時系列順iと呼び、この時系列順を変数iを使って示して,nのような時系列順と区別する。   First, the motion trajectory calculating means 121 reads the motion vectors V0 (n−M + 1) to V0 (n) of M frame images from the (n−M + 1) th to the nth from the memory 126 (step S340). Further, since the frame image starts from the first in the time series order, the motion vector of the frame image before the second in the time series order is not calculated. Therefore, when (n−M + 1) ≦ 1, it is possible to read the M motion vectors (n−M + 1) to V0 (n) with V0 (q) = 0 (q ≦ 1) and the motion trajectory calculation unit 121. Like that. M is a number determined in advance by the frequency of image shake such as camera shake, and is set to 8 in the present embodiment. Next, the motion trajectory calculation means 121 uses the equation (1) to obtain motion trajectories X (−M + 1) to X (0) indicating the coordinates of the M frame images from the (n−M + 1) th to the nth. Calculate (step S342). The motion trajectory X (i), modified motion trajectories X1 (i), X2 (i), X3 (i), X4 (i), which will be described later, the window function W (i), and the baseline B (i The integer i in parentheses in) is an integer indicating the time-series order of the frame images. i is an integer indicating a time-series order in which the origin is different from the time-series order used in the frame image F (n) and the n-th frame image F (n) is the origin 0. That is, the coordinates indicated by the movement locus X (0) indicate the coordinates of the frame image F (n). In the following description, the time-series order with the nth frame image F (n) as the origin 0 is referred to as time-series order i, and this time-series order is indicated using a variable i, such as n. To distinguish.

Figure 2007028251
Figure 2007028251

式(1)は、M個の動きベクトルからM個のフレーム画像の座標を算出して動き軌跡を求めており、各フレーム画像の座標の原点は、フレーム画像F(n−M)となる。また、式(2)を使い、フレーム画像F(n−M+1)を原点として、(−M+2)≦i≦0の範囲のiについて動き軌跡X(i)を算出しても良い。   Expression (1) calculates the motion trajectory by calculating the coordinates of the M frame images from the M motion vectors, and the origin of the coordinates of each frame image is the frame image F (n−M). Also, using equation (2), the motion trajectory X (i) may be calculated for i in the range of (−M + 2) ≦ i ≦ 0 with the frame image F (n−M + 1) as the origin.

当該実施形態では、M個のフレーム画像の動きから、まだ取得していない次フレームのフレーム画像F(n+1)の動きを予測し、予測した動きを元にして手ぶれなどの画像揺れを補正する。そのため、手ぶれなどの画像揺れを十分に取り除くためには、フレーム画像F(n+1)の予測精度を高くする必要がある。フレーム画像F(n+1)の予測精度は、M個のフレーム画像の動きから手ぶれなどの画像揺れの情報を正確に抽出できるかどうかに依存する。一般に、手ぶれなど不快な画像の揺れの周波数は、2〜4Hzより高い周波数の動きであるといわれている。したがって、M個のフレーム画像を表示する時間(以下、参照時間と呼ぶ)は、取り除きたい画像の揺れの周期(1/2〜1/4)を元にして決めると良い。フレームレートが30フレーム/秒である動画の場合では、M=8〜16(参照時間=0.27秒〜0.53秒)ぐらいにするのがよく、この中でもM=8ぐらいが最適である。このように、Mの値は、取り除きたい画像の揺れの周波数と、フレームレートから決めると良い。   In this embodiment, the motion of the frame image F (n + 1) of the next frame that has not yet been acquired is predicted from the motion of M frame images, and image shake such as camera shake is corrected based on the predicted motion. Therefore, in order to sufficiently remove image shake such as camera shake, it is necessary to increase the prediction accuracy of the frame image F (n + 1). The prediction accuracy of the frame image F (n + 1) depends on whether image shake information such as camera shake can be accurately extracted from the movements of the M frame images. In general, it is said that the frequency of unpleasant image shaking such as camera shake is a motion with a frequency higher than 2 to 4 Hz. Therefore, the time for displaying M frame images (hereinafter referred to as reference time) may be determined based on the fluctuation period (1/2 to 1/4) of the image to be removed. In the case of a movie with a frame rate of 30 frames / second, it is better to set M = 8 to 16 (reference time = 0.27 seconds to 0.53 seconds), and among these, M = 8 is optimal. . As described above, the value of M may be determined from the frequency of image shaking to be removed and the frame rate.

次に、ベースライン算出手段122は、動き軌跡X(−M+1)〜X(0)のベースラインB(i)を算出し、動き軌跡X(−M+1)〜X(0)からベースラインB(i)の成分を取り除いた動き軌跡X1(−M+1)〜X1(0)を算出する(ステップS344)。ベースラインは、式(4)に示すようにM個の動きベクトルV0(n−M+1)〜V0(n)の平均ベクトルVBを算出することで、式(3)のように示される。また、平均ベクトルVBは、(M−1)個の動きベクトルV0(n−M+2)〜V0(n)の平均から算出しても良い。   Next, the baseline calculation unit 122 calculates the baseline B (i) of the movement trajectories X (−M + 1) to X (0), and the baseline B ( The motion trajectories X1 (−M + 1) to X1 (0) from which the component i) is removed are calculated (step S344). The baseline is expressed as shown in Expression (3) by calculating an average vector VB of M motion vectors V0 (n−M + 1) to V0 (n) as shown in Expression (4). The average vector VB may be calculated from the average of (M−1) motion vectors V0 (n−M + 2) to V0 (n).

B(i)=X(0)+i×VB … (3)   B (i) = X (0) + i × VB (3)

Figure 2007028251
Figure 2007028251

図7(A)は、動き軌跡X(−M+1)〜X(0)とベースラインB(i)をグラフに表したものである。図7(A)より、ベースラインB(i)は、動き軌跡X(i)の大きな動き、すなわち低周波の動き軌跡であることがわかる。また、ベースラインB(i)は、式(3)とは別の、動き軌跡X(i)の低周波成分を表すことが出来る式を用いても良い。次にベースライン算出手段122は、式(5)を用いて、動き軌跡X(−M+1)〜X(0)からベースラインB(i)の成分を取り除いて、修正された動き軌跡X1(i)を算出する。   FIG. 7A is a graph showing the movement trajectories X (−M + 1) to X (0) and the baseline B (i). From FIG. 7A, it can be seen that the baseline B (i) is a large movement of the movement locus X (i), that is, a low-frequency movement locus. For the baseline B (i), an equation that can represent a low frequency component of the motion trajectory X (i) different from the equation (3) may be used. Next, the baseline calculation means 122 removes the component of the baseline B (i) from the motion trajectories X (−M + 1) to X (0) using the equation (5), and corrects the motion trajectory X1 (i ) Is calculated.

X1(i)=X(i)−B(i) … (5)   X1 (i) = X (i) -B (i) (5)

修正された動き軌跡X1(i)は、ベースラインB(i)で表される大きな動きが取り除かれているため、手ぶれなどに由来する周波数の高い画像の揺れの成分が強調されていることになる。そのため、この修正された動き軌跡X1(i)を使うことで、手ぶれなどに由来する周波数の高い画像の揺れに関連する動きを精度良く計算をすることができる。   In the corrected motion trajectory X1 (i), since the large motion represented by the baseline B (i) is removed, the shake component of the high-frequency image derived from camera shake is emphasized. Become. Therefore, by using the corrected motion trajectory X1 (i), it is possible to accurately calculate the motion related to the shaking of the high-frequency image derived from camera shake or the like.

次に、動き軌跡重み付け手段123は、動き軌跡X1(i)に式(6)で示される窓関数を用いて、式(7)のように重み付けを施して、重み付けされた動き軌跡X2(i)を算出する(ステップS346)。
W(i)=exp{−(2i/M)2} … (6)
X2(i)=X1(i)×W(i) … (7)
Next, the motion trajectory weighting means 123 weights the motion trajectory X1 (i) using the window function represented by Equation (6) as shown in Equation (7), and weighted motion trajectory X2 (i ) Is calculated (step S346).
W (i) = exp {− (2i / M) 2 } (6)
X2 (i) = X1 (i) × W (i) (7)

図7(B)は窓関数の形状を示したグラフである。窓関数は、一番新しいフレーム画像F(n)に対応する窓関数W(0)の値が1であり、そこから時系列順で古いフレームに行くに従って0に近づく形状をしている。図7(C)は、式(7)を用いて、修正された動き軌跡X1(i)に窓関数をかけて重み付けを施した動き軌跡X2(i)である。図7(C)から明らかなように、重み付けされた動き軌跡X2(i)は、古いフレームほど振幅が小さく、新しいフレームになればなるほど、振幅が大きくなる。   FIG. 7B is a graph showing the shape of the window function. The window function has a shape in which the value of the window function W (0) corresponding to the newest frame image F (n) is 1, and approaches 0 as it goes from the old frame in time series order. FIG. 7C shows a motion trajectory X2 (i) obtained by weighting the corrected motion trajectory X1 (i) with a window function using Expression (7). As is clear from FIG. 7C, the weighted motion trajectory X2 (i) has a smaller amplitude for an older frame and a larger amplitude for a new frame.

次に、動きベクトル予測手段124は、式(8)、式(9)、式(10)を用いて、重み付けされた動き軌跡X2(i)をX個の基底の周波数に分解して、X個の正弦波の重ね合わせで表現する(ステップS348)。式(8)のX3(i)が、正弦波の重ね合わせで表現された動き軌跡である。   Next, the motion vector predicting unit 124 decomposes the weighted motion trajectory X2 (i) into X base frequencies using Equation (8), Equation (9), and Equation (10), and X This is expressed by superposing the sine waves (step S348). X3 (i) in Expression (8) is a motion locus expressed by superposition of sine waves.

重み付けされた動き軌跡X2(i)は、時系列順でn番目のフレームに近いフレームほど振幅が大きくなるように重み付けを施されているので、X個の正弦波にも時系列順でn番目のフレームに近いフレームの大きな振幅の動きが強く反映されることになる。そのため、X個の正弦波には、時系列順で(n+1)に近いフレーム画像の動き、すなわち(n+1)に近い時間帯の手ぶれによる画像揺れが多く含まれていることになる。そのため、X個の正弦波から予測される次フレームの位置の予測精度が向上する。   Since the weighted motion trajectory X2 (i) is weighted such that the closer the frame is to the nth frame in time series order, the larger the amplitude is, the xth sine wave is also nth in time series order. The movement of the large amplitude of the frame close to this frame is strongly reflected. For this reason, the X sine waves contain many frame image motions close to (n + 1) in time series order, that is, many image shakes due to camera shake in a time zone close to (n + 1). Therefore, the prediction accuracy of the position of the next frame predicted from X sine waves is improved.

Figure 2007028251
Figure 2007028251

X個の基底の周波数は、フレームレートをf(フレーム/秒)とすると、0(Hz),f/X(Hz),2f/X(Hz),・・・,(X−1)f/X(Hz)である。u=1の時の基底の周期になるX/fが、参照時間M/fと等しくなると、式(8)では周期性が出てしまい、(n+1)番目のフレーム画像の位置の予測精度が悪くなる。そのため、XとMは違う値であるほうが良い。また、u=1の時の基底の周期になるX/fを、参照時間M/fよりも短くすれば、参照時間M/fの中に基底の周波数が1周期分以上入ることになり、予測精度が向上する。以上のことから、式(8)において、(n+1)番目のフレーム画像の位置の予測精度を向上させるためには,X≠Mであるほうが良く、参照時間よりもu=1の時の基底の周期が長い、すなわち X<Mであればさらに良い。当該実施形態では、M=8であるので、基底の周波数の数Xは7以下が良い。   The X base frequencies are 0 (Hz), f / X (Hz), 2f / X (Hz),..., (X-1) f /, where f (frame / second) is the frame rate. X (Hz). If X / f, which is the base period when u = 1, is equal to the reference time M / f, periodicity is generated in Equation (8), and the prediction accuracy of the position of the (n + 1) -th frame image is high. Deteriorate. Therefore, it is better that X and M have different values. Further, if X / f, which is the base period when u = 1, is shorter than the reference time M / f, the base frequency is included in the reference time M / f by one period or more. Prediction accuracy is improved. From the above, in Equation (8), in order to improve the prediction accuracy of the position of the (n + 1) th frame image, it is better that X ≠ M, and the basis of when u = 1 is longer than the reference time. It is even better if the period is long, ie X <M. In this embodiment, since M = 8, the number of base frequencies X is preferably 7 or less.

次に、動きベクトル予測手段124は、式(11)を用いて、各正弦波を時間方向に次フレーム(時系列順で(n+1)番目のフレーム)まで延長し、各周波数の正弦波を加算する(ステップS350)。式(11)のX3(1)が、時系列順で(n+1)番目のフレームにまで延長された座標である。このとき、時系列順iの原点0をn番目のフレームにしているので、三角関数の計算を省略することができ、式(11)のように計算が簡単になる。図7(D)は、分解されたX個の正弦波と、各正弦波を次フレームまで延長した様子をグラフにしたものである。   Next, the motion vector predictor 124 extends each sine wave in the time direction to the next frame (the (n + 1) th frame in time series order) using the equation (11), and adds the sine wave of each frequency. (Step S350). X3 (1) in Expression (11) is a coordinate extended to the (n + 1) th frame in time series order. At this time, since the origin 0 of the time series order i is set to the nth frame, the calculation of the trigonometric function can be omitted, and the calculation is simplified as shown in Expression (11). FIG. 7D is a graph showing the X sine waves that have been decomposed and how each sine wave is extended to the next frame.

Figure 2007028251
Figure 2007028251

次に、動きベクトル予測手段124は、式(12)を用いて、延長された動き軌跡X3(1)とベースラインB(i)から、(n+1)番目のフレームの動き軌跡X4(1)を予測する(ステップS352)。図7(E)は、合成した正弦波とベースラインと(n+1)番目のフレームの動き軌跡X4(1)とを示した図である。   Next, the motion vector prediction means 124 uses the equation (12) to calculate the motion trajectory X4 (1) of the (n + 1) th frame from the extended motion trajectory X3 (1) and the baseline B (i). Prediction is made (step S352). FIG. 7E is a diagram showing the synthesized sine wave, the baseline, and the motion locus X4 (1) of the (n + 1) th frame.

Figure 2007028251
Figure 2007028251

最後に、式(13)を用いて、n番目のフレーム画像を基準とする(n+1)番目のフレーム画像の動きを示す動きベクトルV0(n+1)を算出する(ステップS354)。   Finally, using equation (13), a motion vector V0 (n + 1) indicating the motion of the (n + 1) th frame image with respect to the nth frame image is calculated (step S354).

Figure 2007028251
Figure 2007028251

以上により図3のステップS35における(n+1)番目のフレーム画像の動きベクトルの予測処理が終了して、図3のステップS40における(n+1)番目のフレーム画像の補正位置ベクトルS(n+1)の算出処理が行われる。   Thus, the motion vector prediction process for the (n + 1) th frame image in step S35 in FIG. 3 is completed, and the correction position vector S (n + 1) calculation process for the (n + 1) th frame image in step S40 in FIG. Is done.

ここで、次のステップS40における補正位置ベクトルS(n+1)の算出処理、及び以下のステップS420(図10)における補正動きベクトルV1(n)の算出処理について、処理内容の説明についての理解を容易にするため、フレーム画像F(n)の動きベクトルV0(n)と補正位置ベクトルS(n)、及び補正動きベクトルV1(n)の関係について、図8および図9を用いて前もって説明する。   Here, regarding the calculation processing of the corrected position vector S (n + 1) in the next step S40 and the calculation processing of the corrected motion vector V1 (n) in the following step S420 (FIG. 10), it is easy to understand the explanation of the processing contents. Therefore, the relationship between the motion vector V0 (n) of the frame image F (n), the corrected position vector S (n), and the corrected motion vector V1 (n) will be described in advance with reference to FIGS.

図8は、最初に取得される時系列順1番目のフレーム画像F(1)と、2番目、3番目のフレーム画像F(2)、F(3)をそれぞれ示している。本発明は、補正量に基づいてフレーム画像から所定の画像を切り出す補正処理によって補正フレーム画像を生成する画像処理技術を提供するものであり、補正処理が行われない場合、または補正量が0の場合に切り出されるフレーム画像は、それぞれ図8破線で示したフレーム画像FK(1)、FK(2)、FK(3)となる。   FIG. 8 shows the first frame image F (1), the second frame image F (2), and F (3) acquired in the time series order first. The present invention provides an image processing technique for generating a corrected frame image by a correction process for cutting out a predetermined image from a frame image based on a correction amount, and when the correction process is not performed or when the correction amount is zero. The frame images cut out in this case are frame images FK (1), FK (2), and FK (3) shown by broken lines in FIG.

ここで、フレーム画像FK(n)は、図8に示したように、フレーム画像F(n)に対して所定の補正限界値Smax分小さい画面サイズとなる。詳しくは、X方向では左右それぞれ所定の補正限界値Sxmaxだけ、Y方向では上下それぞれ所定の補正限界値Symaxだけ画面サイズが小さい画像である。つまり、切り出される画像は、X方向では2×Sxmax分、Y方向では2×Symax分小さい画面サイズとなる。   Here, as shown in FIG. 8, the frame image FK (n) has a screen size smaller than the frame image F (n) by a predetermined correction limit value Smax. Specifically, the image has a small screen size by a predetermined correction limit value Sxmax in the left and right directions in the X direction and by a predetermined correction limit value Symax in the upper and lower directions in the Y direction. That is, the image to be cut out has a screen size that is 2 × Sxmax smaller in the X direction and 2 × Symax smaller in the Y direction.

所定の補正限界値Smax(X成分はSxmax、Y成分はSymax)は、本実施形態では、予めアプリケーションプログラムにデフォルトで所定の値が設定され、ハードディスク105などに格納されているものとする。もとより、ユーザーが、コンピュータ100に接続された入力手段(図示せず)を用いてデータ入力することによって設定し、格納するものとしてもよい。   In this embodiment, the predetermined correction limit value Smax (X component is Sxmax, Y component is Symax) is set in advance as a default value in the application program and stored in the hard disk 105 or the like. Of course, the user may set and store the data by inputting data using an input means (not shown) connected to the computer 100.

同じく図8(下側)に、求められた相対位置に従って配置されたフレーム画像FK(1)、FK(2)、FK(3)を示した。図8より明らかなように、例えばフレーム画像F(2)の動きベクトルV0(2)は、フレーム画像FK(2)の動きベクトルと等しくなる。つまり、フレーム画像F(2)の動きベクトルV0(2)は、フレーム画像FK(1)に対するフレーム画像FK(2)の画面位置として求められる。フレーム画像FK(3)の動きベクトルV0(3)も同様にフレーム画像FK(2)に対するフレーム画像FK(3)の画面位置として求められる。動きベクトルV0(2)、V0(3)のX成分はX方向の画素数、Y成分はY方向の画素数で表される。   Similarly, FIG. 8 (lower side) shows frame images FK (1), FK (2), and FK (3) arranged according to the obtained relative positions. As apparent from FIG. 8, for example, the motion vector V0 (2) of the frame image F (2) is equal to the motion vector of the frame image FK (2). That is, the motion vector V0 (2) of the frame image F (2) is obtained as the screen position of the frame image FK (2) with respect to the frame image FK (1). Similarly, the motion vector V0 (3) of the frame image FK (3) is obtained as the screen position of the frame image FK (3) with respect to the frame image FK (2). The X components of the motion vectors V0 (2) and V0 (3) are represented by the number of pixels in the X direction, and the Y component is represented by the number of pixels in the Y direction.

図8において、フレーム画像F(1)は、時系列順で一つ前のフレーム画像が存在しないため、本実施形態ではフレーム画像F(1)は動いていないものとして扱い、フレーム画像FK(1)の動きベクトルV0(1)は0とする。   In FIG. 8, since the frame image F (1) has no previous frame image in chronological order, in the present embodiment, the frame image F (1) is treated as not moving, and the frame image FK (1 The motion vector V0 (1) in FIG.

次に、図9を用いてフレーム画像F(n)の補正位置ベクトルS(n)と動きベクトルV0(n)、及びステップS420(図10)にて算出される補正動きベクトルV1(n)の関係を説明する。図9は、図8(下部)に示したフレーム画像FK(1)〜FK(3)の左上隅部分を拡大して示した説明図である。ここで、補正フレーム画像HFG(2)は、ステップS40(図3)で算出されるフレーム画像F(2)の補正位置ベクトルS(2)によってフレーム画像FK(2)が補正された状態を示している。   Next, the corrected position vector S (n) and the motion vector V0 (n) of the frame image F (n) and the corrected motion vector V1 (n) calculated in step S420 (FIG. 10) are used with reference to FIG. Explain the relationship. FIG. 9 is an explanatory diagram showing an enlarged upper left corner portion of the frame images FK (1) to FK (3) shown in FIG. 8 (lower part). Here, the corrected frame image HFG (2) indicates a state in which the frame image FK (2) is corrected by the correction position vector S (2) of the frame image F (2) calculated in step S40 (FIG. 3). ing.

図9から明らかなように、フレーム画像FK(2)は、動きベクトルV0(2)のX成分とY成分の画素数に従ってフレーム画像FK(1)の画面位置を移動したものであり、補正フレーム画像HFG(2)は、補正位置ベクトルS(2)のX成分とY成分の画素数に従ってフレーム画像FK(2)の画面位置を移動したものである。また、同様に、フレーム画像FK(3)は、動きベクトルV0(3)のX成分とY成分の画素数に従ってフレーム画像FK(2)の画面位置を移動したものであり、補正フレーム画像HFG(3)は、補正位置ベクトルS(3)のX成分とY成分の画素数に従って、フレーム画像FK(3)の画面位置を移動したものである。   As is apparent from FIG. 9, the frame image FK (2) is obtained by moving the screen position of the frame image FK (1) according to the number of pixels of the X component and Y component of the motion vector V0 (2). The image HFG (2) is obtained by moving the screen position of the frame image FK (2) according to the number of pixels of the X component and the Y component of the correction position vector S (2). Similarly, the frame image FK (3) is obtained by moving the screen position of the frame image FK (2) according to the number of pixels of the X and Y components of the motion vector V0 (3), and the corrected frame image HFG ( 3) shows the screen position of the frame image FK (3) moved according to the number of pixels of the X and Y components of the correction position vector S (3).

また、図9に示したように、補正動きベクトルV1(2)は、フレーム画像FK(1)に対する補正フレーム画像HFG(2)の相対的な画面位置を示すものであり、補正動きベクトルV1(3)は、補正フレーム画像HFG(2)に対する補正フレーム画像HFG(3)の相対的な画面位置を示すものである。なお、動きベクトルV0(1)は0であることより補正位置ベクトルS(1)も0となる(後述する)。従って、フレーム画像FK(1)は補正フレーム画像HFG(1)と同じものになる。   As shown in FIG. 9, the corrected motion vector V1 (2) indicates a relative screen position of the corrected frame image HFG (2) with respect to the frame image FK (1), and the corrected motion vector V1 ( 3) shows a relative screen position of the correction frame image HFG (3) with respect to the correction frame image HFG (2). Since the motion vector V0 (1) is 0, the correction position vector S (1) is also 0 (described later). Therefore, the frame image FK (1) is the same as the corrected frame image HFG (1).

ここで、動きベクトルV0(n)および補正動きベクトルV1(n)は、X成分は図面右方向をプラス、Y成分は図面上方向をプラスとするが、補正位置ベクトルS(n)は、移動量を補正する意味から動きベクトルと反対に、X成分は図面左方向をプラス、Y成分は図面下方向をプラスとする。従って、フレーム画像FK(2)、FK(3)の補正位置ベクトルS(2)、S(3)は、図9に示したように動きベクトルV0(2)、V0(3)と反対方向がプラス方向になる。   Here, in the motion vector V0 (n) and the corrected motion vector V1 (n), the X component is positive in the drawing right direction and the Y component is positive in the drawing upward direction, but the corrected position vector S (n) is moving. Contrary to the motion vector, the X component is positive in the left direction of the drawing, and the Y component is positive in the downward direction of the drawing. Accordingly, the correction position vectors S (2) and S (3) of the frame images FK (2) and FK (3) are opposite to the motion vectors V0 (2) and V0 (3) as shown in FIG. It goes in the positive direction.

なお、当該実施形態では、動きベクトルV0(n+1)の代わりに、S35で求められた(n+1)番目のフレーム画像の動き予測ベクトルを用いる。   In this embodiment, the motion prediction vector of the (n + 1) th frame image obtained in S35 is used instead of the motion vector V0 (n + 1).

次に、図3に戻り、切出位置算出手段130は、ステップS40において、補正位置ベクトルS(n+1)の算出処理を行う。ステップS40での処理については、図10のフローチャートを用いて詳しく説明する。   Next, returning to FIG. 3, the cut-out position calculation means 130 performs a correction position vector S (n + 1) calculation process in step S <b> 40. The process in step S40 will be described in detail with reference to the flowchart of FIG.

ステップS40の処理が開始されると、まずステップS410において、S35で求められた注目するフレーム画像F(n+1)の予測動きベクトルV(n+1)を入力する処理を行う。ここでは、ステップS35にて求められ、RAM102などのメモリ126に格納された予測動きベクトルV(n+1)を、CPU103が読み出すことによって入力処理を行う。   When the process of step S40 is started, first, in step S410, a process of inputting the predicted motion vector V (n + 1) of the target frame image F (n + 1) obtained in S35 is performed. Here, the CPU 103 reads out the predicted motion vector V (n + 1) obtained in step S35 and stored in the memory 126 such as the RAM 102, and performs input processing.

次に、ステップS420にて、注目するフレーム画像F(n+1)に対して時系列順で一つ前のフレーム画像(以下、単に「前フレーム画像」と称する)の補正動きベクトルV1(n)を算出する処理を行う。補正動きベクトルV1(n)は、X成分V1x(n)とY成分V1y(n)のベクトルとして以下の式を用いて算出する。   Next, in step S420, the corrected motion vector V1 (n) of the previous frame image (hereinafter simply referred to as “previous frame image”) in time series order with respect to the frame image F (n + 1) of interest is obtained. Processing to calculate is performed. The corrected motion vector V1 (n) is calculated using the following equation as a vector of the X component V1x (n) and the Y component V1y (n).

V1x(n)=V0x(n)−Sx(n)
V1y(n)=V0y(n)−Sy(n)
図8及び図9を参照して説明したように算出され、RAM102などのメモリ126に格納される。
V1x (n) = V0x (n) -Sx (n)
V1y (n) = V0y (n) -Sy (n)
It is calculated as described with reference to FIGS. 8 and 9 and is stored in the memory 126 such as the RAM 102.

また、ステップS430にて、フレーム画像F(n)の補正位置ベクトルS(n)を入力する処理を行う。具体的には、一つ前のフレーム画像F(n−1)が入力されている間のステップS40(図3)において算出され、RAM102などのメモリ126に格納された補正位置ベクトルS(n)を、CPU103が読み出すことによって入力処理を行う。   In step S430, a process of inputting the correction position vector S (n) of the frame image F (n) is performed. Specifically, the corrected position vector S (n) calculated in step S40 (FIG. 3) while the previous frame image F (n−1) is input and stored in the memory 126 such as the RAM 102. Are read out by the CPU 103 to perform input processing.

ステップS420及びステップS430において、「n=1」つまり時系列順1番目のフレーム画像の場合、前フレーム画像が存在しない。この場合は、前述したように本実施形態ではフレーム画像F(n)は動いていないものとし、その結果、補正動きベクトルV1(1)は0、また補正位置ベクトルS(1)も0となる。   In step S420 and step S430, in the case of “n = 1”, that is, the first frame image in time series order, the previous frame image does not exist. In this case, as described above, the frame image F (n) is not moved in the present embodiment, and as a result, the corrected motion vector V1 (1) is 0 and the corrected position vector S (1) is also 0. .

次に、ステップS440にてX、Y各成分別に減衰係数K、Dの値の決定処理を行う。減衰係数K、Dは、次の処理ステップS490で用いる所定の演算式において使用する係数であり、補正位置ベクトルの大きさ、つまり補正量を決める係数となる。減衰係数K、Dとも、それぞれ1以下の小数である。   Next, in step S440, attenuation coefficient K and D values are determined for each of the X and Y components. The attenuation coefficients K and D are coefficients used in a predetermined calculation formula used in the next processing step S490, and are coefficients that determine the size of the correction position vector, that is, the correction amount. The attenuation coefficients K and D are both decimal numbers of 1 or less.

本実施形態では、次の3つの実施例のうち少なくとも一つの方法を用いて減衰係数K、Dの値を決定する。
「減衰係数決定方法の第1実施例」
前フレーム画像を補正した補正フレーム画像(以下、単に「前補正フレーム画像」と称する)について算出した画像の移動量と、注目するフレーム画像の移動量との大小によって、減衰係数K、Dの値を決定する。さらに、注目するフレーム画像の移動量が、前補正フレーム画像の移動量以上の場合、注目するフレーム画像の予測動きベクトルの方向と、前補正フレーム画像の補正動きベクトルの方向とに基づいて減衰係数K、Dの値を決定する方法。
「減衰係数決定方法の第2実施例」
補正可能範囲を示す補正限界値に対する前フレーム画像の補正量の比率と、前フレーム画像の補正量が「増加」か「減少」かの判断とによって、減衰係数K、Dの値を決定する方法。
「減衰係数決定方法の第3実施例」
補正可能範囲である補正限界値と、前フレーム画像の補正量との差分量に対して、注目するフレーム画像の予測動きベクトルと、前フレーム画像の補正動きベクトルとの差分量が、どれくらいの割合にあるかによって、減衰係数K、Dの値を決定する方法。
In this embodiment, the values of the attenuation coefficients K and D are determined using at least one of the following three examples.
“First Example of Decay Factor Determination Method”
The values of the attenuation coefficients K and D depend on the magnitude of the movement amount of the image calculated for the correction frame image obtained by correcting the previous frame image (hereinafter simply referred to as “pre-correction frame image”) and the movement amount of the frame image of interest. To decide. Further, when the movement amount of the frame image of interest is equal to or greater than the movement amount of the previous correction frame image, the attenuation coefficient is based on the direction of the predicted motion vector of the frame image of interest and the direction of the correction motion vector of the previous correction frame image. A method for determining the values of K and D.
“Second Embodiment of Damping Coefficient Determination Method”
A method of determining the values of the attenuation coefficients K and D by determining the ratio of the correction amount of the previous frame image to the correction limit value indicating the correctable range and determining whether the correction amount of the previous frame image is “increase” or “decrease”. .
“Third embodiment of damping coefficient determination method”
What percentage of the difference between the predicted motion vector of the frame image of interest and the corrected motion vector of the previous frame image with respect to the difference between the correction limit value that is the correctable range and the correction amount of the previous frame image A method of determining the values of the attenuation coefficients K and D depending on whether or not.

「第1の実施例」
まず、ステップS440(図10)にて行われる処理について、第1の実施例における減衰係数K、Dの決定処理の詳細を、図11に示した処理フローチャートを用いて説明する。第1の実施例での減衰係数K、Dの値の決定方法は、注目するフレーム画像の予測動きベクトルの大きさ及び向きと、時系列順一つ前の補正フレーム画像の大きさ及び向きとから補正量を算出し、予測動きベクトルの方向変化と大きさにあわせて注目するフレーム画像の補正量を算出しようとするものである。なお、ここでは、注目するフレーム画像のX成分についての処理を説明するが、処理ステップS440ではY成分についても図11に示したX成分の処理と同様の処理を行い、X成分、Y成分それぞれについて減衰係数K、Dの値を決定する。そして、後述する次の処理ステップS490(図10)において、補正位置ベクトルのX成分とY成分を所定の演算式にて算出する際、それぞれ決定した減衰係数K、Dの値を用いるのである。
“First Example”
First, regarding the processing performed in step S440 (FIG. 10), details of the determination processing of the attenuation coefficients K and D in the first embodiment will be described using the processing flowchart shown in FIG. The method for determining the values of the attenuation coefficients K and D in the first embodiment is based on the size and orientation of the predicted motion vector of the frame image of interest and the size and orientation of the corrected frame image one time before in the chronological order. The correction amount is calculated, and the correction amount of the frame image to be noticed is calculated in accordance with the direction change and the magnitude of the predicted motion vector. Here, the processing for the X component of the frame image of interest will be described. However, in processing step S440, the same processing as the processing for the X component shown in FIG. Determine the values of the damping coefficients K, D for. Then, in the next processing step S490 (FIG. 10) to be described later, when the X component and the Y component of the correction position vector are calculated by a predetermined arithmetic expression, the values of the determined attenuation coefficients K and D are used.

ここでの処理が開始されると、まずステップS441において、S35で求められた注目するフレーム画像の予測動きベクトルV(n+1)のX成分Vx(n+1)の抽出処理を行う。X成分Vx(n+1)はX方向の画素数で示され、図9に示したようにベクトルの向きが図面右方向であればプラス、左方向であればマイナスとなる。なお注目するフレーム画像の予測動きベクトルV(n+1)のY成分Vy(n+1)については、図9に示したようにベクトルの向きが図面上方向であればプラス、下方向であればマイナスとなる。   When the process is started, first, in step S441, an X component Vx (n + 1) extraction process of the predicted motion vector V (n + 1) of the target frame image obtained in S35 is performed. The X component Vx (n + 1) is indicated by the number of pixels in the X direction, and is positive if the vector direction is the right direction of the drawing as shown in FIG. Note that the Y component Vy (n + 1) of the predicted motion vector V (n + 1) of the frame image of interest is positive if the vector direction is upward in the drawing as shown in FIG. 9, and negative if downward. .

次に、ステップS442にて、注目するフレーム画像に対して時系列順で一つ前のフレーム画像の補正動きベクトルV1(n)のX成分V1x(n)の抽出処理を行う。もとより、前述したように、V1x(0)=0である。   Next, in step S442, the X component V1x (n) of the corrected motion vector V1 (n) of the previous frame image in time series order is extracted from the frame image of interest. Of course, as described above, V1x (0) = 0.

次に、ステップS443にて、Vx(n+1)の絶対値と、V1x(n)の絶対値とを算出する。そして、次の処理ステップS444にてVx(n+1)の絶対値がV1x(n)の絶対値以上か否かを判定する。ステップS444でNOの場合、つまり注目するフレーム画像の移動量が、前補正フレーム画像の移動量より小さい場合、ステップS445に進み、減衰係数K、Dの値をK1、D1に決定し、ステップS490(図10)に進む。   Next, in step S443, the absolute value of Vx (n + 1) and the absolute value of V1x (n) are calculated. Then, in the next processing step S444, it is determined whether or not the absolute value of Vx (n + 1) is greater than or equal to the absolute value of V1x (n). If NO in step S444, that is, if the moving amount of the focused frame image is smaller than the moving amount of the previous correction frame image, the process proceeds to step S445, where the values of the attenuation coefficients K and D are determined as K1 and D1, and step S490 is performed. Proceed to (FIG. 10).

一方、ステップS444でYESの場合、つまり注目するフレーム画像の移動量が、前補正フレーム画像の移動量以上の場合、ステップS446に進み、Vx(n+1)とV1x(n)の積BSxを算出する。そして、次の処理ステップS447にて、BSxが0以上か否かを判定する。つまり、ここではベクトルVx(n+1)とベクトルV1x(n)とが同じ向き(0以上)なのか逆向き(0より小さい)なのかを調べるのである。   On the other hand, if “YES” in the step S444, that is, if the moving amount of the focused frame image is equal to or larger than the moving amount of the previous correction frame image, the process proceeds to a step S446 to calculate the product BSx of Vx (n + 1) and V1x (n). . Then, in the next processing step S447, it is determined whether BSx is 0 or more. That is, it is checked here whether the vector Vx (n + 1) and the vector V1x (n) are in the same direction (0 or more) or in the opposite direction (less than 0).

ステップS447にてNOの場合(つまり逆向きの場合)、ステップS448に進み、減衰係数K、Dの値をK2、D2に決定し、ステップS490(図10)に進む。ここで、K2の値はK1の値より大きく、D2の値はD1の値よりも大きい値である。   If NO in step S447 (that is, in the reverse direction), the process proceeds to step S448, where the values of the attenuation coefficients K and D are determined as K2 and D2, and the process proceeds to step S490 (FIG. 10). Here, the value of K2 is larger than the value of K1, and the value of D2 is larger than the value of D1.

一方、ステップS447にてYESの場合(つまり同じ向きの場合)、ステップS449に進み、減衰係数K、Dの値をK3、D3に決定し、ステップS490(図10)に進む。ここで、K3の値はK2の値より大きく、D3の値はD2の値よりも大きい値である。   On the other hand, if YES in step S447 (that is, in the same direction), the process proceeds to step S449, where the values of the attenuation coefficients K and D are determined as K3 and D3, and the process proceeds to step S490 (FIG. 10). Here, the value of K3 is larger than the value of K2, and the value of D3 is larger than the value of D2.

第1の実施例における減衰係数K、Dの値について、その一例を図12の減衰係数テーブルGKT1に示した。ここで、減衰係数Kの値は0.9≦K≦1の範囲で、K1<K2<K3を満たす値であることが望ましい。また、減衰係数Dの値は0.5≦D≦1の範囲で、D1<D2<D3を満たす値であることが望ましい。補正しようとするフレーム画像の移動量Vx(n+1)が、前補正フレーム画像の移動量V1x(n)より小さい場合、補正しようとするフレーム画像の移動量Vx(n+1)が前フレーム画像の移動量V1x(n)に対して減少しているということになる。従って、仮に、補正しようとするフレーム画像の補正フレーム画像の移動量V1x(n+1)が、前フレーム画像の移動量V1x(n)と同じであるように補正しようとするフレームの補正量Sx(n+1)を指定した(つまりK=D=1)とすると、補正量Sx(n+1)が補正限界値に達する確率は高くなる。そこで、小さい値の減衰係数を用いて補正量を少なくし、補正限界値に達しにくくするのである。   An example of the values of the attenuation coefficients K and D in the first embodiment is shown in the attenuation coefficient table GKT1 in FIG. Here, the value of the attenuation coefficient K is desirably a value satisfying K1 <K2 <K3 in a range of 0.9 ≦ K ≦ 1. Further, the value of the attenuation coefficient D is desirably a value satisfying D1 <D2 <D3 in a range of 0.5 ≦ D ≦ 1. When the movement amount Vx (n + 1) of the frame image to be corrected is smaller than the movement amount V1x (n) of the previous correction frame image, the movement amount Vx (n + 1) of the frame image to be corrected is the movement amount of the previous frame image. It means that it is decreasing with respect to V1x (n). Therefore, suppose that the correction amount Sx (n + 1) of the frame to be corrected so that the movement amount V1x (n + 1) of the correction frame image of the frame image to be corrected is the same as the movement amount V1x (n) of the previous frame image. ) Is designated (that is, K = D = 1), the probability that the correction amount Sx (n + 1) reaches the correction limit value is high. Therefore, a small amount of attenuation coefficient is used to reduce the correction amount and make it difficult to reach the correction limit value.

また、補正しようとするフレーム画像の移動量が、前補正フレーム画像の移動量以上である場合あっても、これら2つのフレーム画像の移動量が違う方向のときは、補正しようとするフレーム画像の補正フレーム画像の移動量V1x(n+1)が、前フレーム画像の移動量V1x(n)と同じであるように補正しようとするフレームの補正量Sx(n+1)を指定した(つまりK=D=1)とすると、補正量Sx(n+1)が補正限界値に達する確率は高くなる。そこで、同じ方向のときにくらべて減衰係数の値を小さくして、補正しようとするフレーム画像の補正量を少なくするのである。なお、減衰係数K1〜K3、D1〜D3の値は、本実施例に限らず、前述した条件を満たす値であれば何でもよい。   Even if the movement amount of the frame image to be corrected is equal to or larger than the movement amount of the previous correction frame image, if the movement amounts of these two frame images are in different directions, the frame image to be corrected The correction amount Sx (n + 1) of the frame to be corrected is designated so that the movement amount V1x (n + 1) of the correction frame image is the same as the movement amount V1x (n) of the previous frame image (that is, K = D = 1) ), The probability that the correction amount Sx (n + 1) reaches the correction limit value is high. Therefore, the amount of correction of the frame image to be corrected is reduced by reducing the value of the attenuation coefficient compared to the case of the same direction. The values of the attenuation coefficients K1 to K3 and D1 to D3 are not limited to the present embodiment, and any values may be used as long as the above-described conditions are satisfied.

「第2の実施例」
次に、第2の実施例における減衰係数K、Dの決定処理の詳細を、図13に示した処理フローチャートを用いて説明する。第2の実施例での減衰係数K、Dの値の決定方法は、補正限界値に近いか否かを所定の比率RSによって補正量を算出し、さらに、所定の演算式によって補正量が増加か減少かを判断して注目するフレーム画像の補正量を算出しようとするものである。なお、ここでも、注目するフレーム画像のX成分についての処理を説明するが、処理ステップS440ではY成分についても図13に示したX成分の処理と同様の処理を行い、X成分、Y成分それぞれについて減衰係数K、Dの値を決定する。そして、後述する次の処理ステップS490(図10)にて、補正位置ベクトルのX成分とY成分を所定の演算式にて算出する際に、それぞれ決定した減衰係数K、Dの値を用いるのである。
"Second Example"
Next, details of the determination processing of the attenuation coefficients K and D in the second embodiment will be described using the processing flowchart shown in FIG. In the method of determining the values of the attenuation coefficients K and D in the second embodiment, the correction amount is calculated based on a predetermined ratio RS as to whether or not it is close to the correction limit value, and further, the correction amount is increased by a predetermined arithmetic expression. It is intended to calculate the correction amount of the frame image to be noticed by determining whether it is reduced or not. Here, the processing for the X component of the frame image of interest is also described. However, in processing step S440, the same processing as the processing for the X component shown in FIG. Determine the values of the damping coefficients K, D for. Then, in the next processing step S490 (FIG. 10) to be described later, when the X component and the Y component of the correction position vector are calculated by a predetermined arithmetic expression, the values of the determined attenuation coefficients K and D are used. is there.

ここでの処理が開始されると、まずステップS451にて補正限界値Sxmaxの入力処理を行う。具体的には、CPU103がハードディスク105などに格納されたSmaxのX成分についての値を読み出すことで行う。   When the processing here is started, input processing of the correction limit value Sxmax is first performed in step S451. More specifically, the CPU 103 reads the value of the Smax X component stored in the hard disk 105 or the like.

次に、ステップS452にて、フレーム画像F(n)の補正位置ベクトルS(n)のX成分Sx(n)の抽出処理を行う。具体的には、S10において一つ前のフレーム画像F(n−1)が入力されている間のステップS40(図3)において算出され、RAM102などのメモリ126に格納された補正位置ベクトルS(n)を、CPU103が読み出すことによって入力処理を行う。ここで、前述したように、X成分Sx(n)は、画面左方向を正方向とする画素数で表される。もとよりY成分Sy(n)は、画面下方向を正とする画素数で表される。   Next, in step S452, the X component Sx (n) of the correction position vector S (n) of the frame image F (n) is extracted. Specifically, the corrected position vector S (() calculated in step S40 (FIG. 3) while the previous frame image F (n-1) is input in S10 and stored in the memory 126 such as the RAM 102 is stored. n) is read by the CPU 103 to perform input processing. Here, as described above, the X component Sx (n) is represented by the number of pixels with the left direction on the screen as the positive direction. Of course, the Y component Sy (n) is represented by the number of pixels with the screen lower direction being positive.

次に、ステップS453にて、Sx(n)の絶対値をSxmaxで除した比率RSの値を算出する。RSの値が大きいほど、補正量が補正限界値に近い状態であることを示すことになる。   Next, in step S453, the value of the ratio RS obtained by dividing the absolute value of Sx (n) by Sxmax is calculated. The larger the RS value, the closer the correction amount is to the correction limit value.

次にステップS454において、S35で求められた予測動きベクトルV(n+1)のX成分Vx(n+1)の抽出処理を行う。X成分Vx(n+1)はX方向の画素数で示され、図9に示したようにベクトルの向きが図面右方向であればプラス、左方向であればマイナスとなる。なお予測動きベクトルV(n+1)のY成分Vy(n+1)については、図9に示したようにベクトルの向きが図面上方向であればプラス、下方向であればマイナスとなる。   Next, in step S454, an X component Vx (n + 1) extraction process of the predicted motion vector V (n + 1) obtained in S35 is performed. The X component Vx (n + 1) is indicated by the number of pixels in the X direction, and is positive if the vector direction is the right direction of the drawing as shown in FIG. As shown in FIG. 9, the Y component Vy (n + 1) of the predicted motion vector V (n + 1) is positive if the direction of the vector is upward in the drawing and negative if it is downward.

次に、ステップS455にて、フレーム画像F(n)の補正動きベクトルV1(n)のX成分V1x(n)の抽出処理を行う。なお、前述したように、n=1のときはV1x(1)=0である。   Next, in step S455, an X component V1x (n) extraction process of the corrected motion vector V1 (n) of the frame image F (n) is performed. As described above, when n = 1, V1x (1) = 0.

ステップS452、S454、S455にて抽出した各ベクトルを用いて、次のステップS456では、式(14)より傾向値KHxを算出する処理を行う。   Using each vector extracted in steps S452, S454, and S455, in the next step S456, a process for calculating the tendency value KHx from the equation (14) is performed.

KHx=Sx(n)×(Vx(n+1)−V1x(n))…(14)
次に、ステップS457にて、傾向値KHxが0以上か否かの判定処理を行う。そして、YESの場合は、ステップS459にて補正は「増加」と判断し、NOの場合はステップS458にて補正は「減少」と判断する処理を行う。Sx(n)つまり前フレーム画像の補正位置ベクトルに基づく補正方向と、Vx(n+1)−V1x(n)つまり注目するフレーム画像の予測動きベクトルと前フレーム画像の補正ベクトルとの差に基づく画像の移動方向とを比べて、それぞれの向きが逆方向の場合は増加、同じ方向の場合は減少と判断するのである。
KHx = Sx (n) × (Vx (n + 1) −V1x (n)) (14)
Next, in step S457, it is determined whether or not the tendency value KHx is 0 or more. If YES, the correction is determined to be “increase” in step S459, and if NO, the correction is determined to be “decrease” in step S458. Sx (n), that is, the correction direction based on the correction position vector of the previous frame image, and Vx (n + 1) −V1x (n), that is, the image based on the difference between the predicted motion vector of the target frame image and the correction vector of the previous frame image. Compared with the moving direction, it is determined that the direction is increased if the direction is opposite, and decreased if the direction is the same.

次に、算出された比率RSと「増加」又は「減少」の判断情報から、ステップS460にて、減衰係数テーブルGKT2を用いて減衰係数K、Dの値を決定する処理を行う。減衰係数テーブルGKT2の一例を図14に示す。減衰係数テーブルはハードディスク105などに格納され、比率RSのデータと「増加」又は「減少」の情報とから、CPU103は、減衰係数テーブルGKT2より該当するアドレスの値を読み出し、減衰係数K、Dの値を決定する。   Next, processing for determining the values of the attenuation coefficients K and D using the attenuation coefficient table GKT2 is performed in step S460 from the calculated ratio RS and the determination information of “increase” or “decrease”. An example of the attenuation coefficient table GKT2 is shown in FIG. The attenuation coefficient table is stored in the hard disk 105 or the like. From the data of the ratio RS and the information of “increase” or “decrease”, the CPU 103 reads the value of the corresponding address from the attenuation coefficient table GKT2, and stores the attenuation coefficients K and D. Determine the value.

図14に示したように、第2の実施例では、減衰係数テーブルGKT2において、比率RSの値を、小数点第2位を四捨五入し0.1きざみの値とした。そして、減衰係数K、Dの値を、比率RSが大きい値になるに従って、前の値以下の小さい値になるよう設定した。さらに「増加」情報に対応する値を、「減少」情報に対応する値よりも小さい値に設定した。比率RSが同じ場合でも、増加と判断した場合は、補正方向と画像の移動方向とが逆方向であることから、減少と判断した場合よりも補正が補正限界値に達しやすいため、減衰係数K、Dを小さくして補正量を少なくするのである。もとより、比率RSの値はさらに細かいきざみ幅としたり、逆にもっと粗いきざみ幅としたりしてもよい。さらに、きざみ幅も同一でなく変化させたりしても差し支えない。   As shown in FIG. 14, in the second example, in the attenuation coefficient table GKT2, the value of the ratio RS is rounded off to the second decimal place to a value of 0.1. Then, the values of the attenuation coefficients K and D were set so as to become smaller values than the previous values as the ratio RS became larger. Furthermore, the value corresponding to the “increase” information is set to a value smaller than the value corresponding to the “decrease” information. Even when the ratio RS is the same, if the increase is determined, the correction direction and the moving direction of the image are opposite to each other. , D is reduced to reduce the correction amount. Of course, the value of the ratio RS may be a finer step size, or conversely, a coarser step size. Furthermore, the step width is not the same and can be changed.

図14に示した減衰係数テーブルGKT2は、減衰係数K、Dの具体的な数値設定の一例を示したものであり、減衰係数Kの値は0.9≦K≦1の範囲で、減衰係数Dの値は0.5≦D≦1の範囲で、RSの値に合わせて変更してもよい。このとき、RSの値が大きい値になるに従って、減衰係数K、Dの値は前の値以下の小さい値になるよう設定することが好ましい。RSの値が大きい場合は、RSの値が小さい場合よりも補正量が補正限界値に近いことになるため、減衰係数を小さくして補正量を少なくするのである。   The attenuation coefficient table GKT2 shown in FIG. 14 shows an example of specific numerical values for the attenuation coefficients K and D. The value of the attenuation coefficient K is in the range of 0.9 ≦ K ≦ 1, and the attenuation coefficient The value of D may be changed in accordance with the value of RS in the range of 0.5 ≦ D ≦ 1. At this time, it is preferable that the values of the attenuation coefficients K and D are set to be smaller than the previous values as the value of RS becomes larger. When the RS value is large, the correction amount is closer to the correction limit value than when the RS value is small. Therefore, the attenuation coefficient is reduced to reduce the correction amount.

「第3の実施例」
次に、第3の実施例における減衰係数K、Dの決定処理の詳細を、図15に示した処理フローチャートを用いて説明する。第3の実施例での減衰係数K、Dの値の決定方法は、注目するフレーム画像の補正量を算出する際、時系列順で一つ前の補正フレーム画像の補正量で補正したとき、補正限界値まで何回補正可能かを調べて注目するフレーム画像の補正量を算出しようとするものである。なお、ここでも、注目するフレーム画像のX成分についての処理を説明するが、処理ステップS440ではY成分についても図15に示したX成分の処理と同様の処理を行い、X成分、Y成分それぞれについて減衰係数K、Dの値を決定する。そして、後述する次の処理ステップS490(図10)にて、補正位置ベクトルのX成分とY成分を所定の演算式にて算出する際に、それぞれ決定した減衰係数K、Dの値を用いるのである。
“Third Example”
Next, details of the process of determining the attenuation coefficients K and D in the third embodiment will be described with reference to the process flowchart shown in FIG. The method of determining the values of the attenuation coefficients K and D in the third embodiment is that when calculating the correction amount of the frame image of interest, when correcting with the correction amount of the previous correction frame image in time series order, The number of corrections up to the correction limit value is examined to calculate the correction amount of the frame image to be noted. Here, the processing for the X component of the frame image of interest is also described. However, in processing step S440, the same processing as the processing for the X component shown in FIG. Determine the values of the damping coefficients K, D for. Then, in the next processing step S490 (FIG. 10) to be described later, when the X component and the Y component of the correction position vector are calculated by a predetermined arithmetic expression, the values of the determined attenuation coefficients K and D are used. is there.

ここでの処理が開始されると、まずステップS461にて補正限界値Sxmaxの入力処理を行う。具体的には、CPU103がハードディスク105などに格納されたSmaxのX成分についての値を読み出すことで行う。   When the processing here is started, input processing of the correction limit value Sxmax is first performed in step S461. More specifically, the CPU 103 reads the value of the Smax X component stored in the hard disk 105 or the like.

次にステップS462において、S35で求められた予測動きベクトルV(n+1)のX成分Vx(n+1)の抽出処理を行う。X成分Vx(n+1)はX方向の画素数で示され、図9に示したようにベクトルの向きが図面右方向であればプラス、左方向であればマイナスとなる。なお予測動きベクトルV(n+1)のY成分Vy(n+1)については、図9に示したようにベクトルの向きが図面上方向であればプラス、下方向であればマイナスとなる。   Next, in step S462, the X component Vx (n + 1) of the predicted motion vector V (n + 1) obtained in S35 is extracted. The X component Vx (n + 1) is indicated by the number of pixels in the X direction, and is positive if the vector direction is the right direction of the drawing as shown in FIG. As shown in FIG. 9, the Y component Vy (n + 1) of the predicted motion vector V (n + 1) is positive if the direction of the vector is upward in the drawing and negative if it is downward.

次に、ステップS463にて、補正動きベクトルV1(n)のX成分V1x(n)の抽出処理を行う。もとより、前述したように、n=1のときはV1x(1)=0である。   Next, in step S463, an X component V1x (n) extraction process of the corrected motion vector V1 (n) is performed. Of course, as described above, when n = 1, V1x (1) = 0.

次に、ステップS464にて、補正位置ベクトルS(n)のX成分Sx(n)の抽出処理を行う。ここで、前述したように、X成分Sx(n)は、画面左方向を正方向とする画素数で表される。もとよりY成分Sy(n)は、画面下方向を正とする画素数で表される。   Next, in step S464, an X component Sx (n) extraction process of the correction position vector S (n) is performed. Here, as described above, the X component Sx (n) is represented by the number of pixels with the left direction on the screen as the positive direction. Of course, the Y component Sy (n) is represented by the number of pixels with the screen lower direction being positive.

次に、ステップS465にて、式(15)よりベクトル差分値BSTの算出処理を行う。   Next, in step S465, the vector difference value BST is calculated from equation (15).

BST=|Vx(n+1)−V1x(n)| …(15)
次に、ステップS466にて、式(16)より補正残量値SZTの算出処理を行う。
BST = | Vx (n + 1) −V1x (n) | (15)
Next, in step S466, a correction remaining amount value SZT is calculated from equation (16).

SZT=Sxmax−|Sx(n)| …(16)
次に、ステップS467にて、式(17)より補正限界フレーム数Tの算出処理を行う。
SZT = Sxmax− | Sx (n) | (16)
In step S467, the correction limit frame number T is calculated from equation (17).

T=SZT÷BST …(17)
ステップS467にて算出された補正限界フレーム数Tの値から、ステップS468にて、減衰係数テーブルGKT3を用いて減衰係数K、Dの値を決定する。減衰係数テーブルGKT3の一例を図16に示す。減衰係数テーブルGKT3はハードディスク105などに格納され、補正限界フレーム数Tのデータから、CPU103は、減衰係数テーブルGKT3より該当するアドレスの値を読み出し、減衰係数K、Dの値を決定する。
T = SZT ÷ BST (17)
From the value of the correction limit frame number T calculated in step S467, the values of the attenuation coefficients K and D are determined using the attenuation coefficient table GKT3 in step S468. An example of the attenuation coefficient table GKT3 is shown in FIG. The attenuation coefficient table GKT3 is stored in the hard disk 105 or the like, and from the data of the correction limit frame number T, the CPU 103 reads the value of the corresponding address from the attenuation coefficient table GKT3 and determines the values of the attenuation coefficients K and D.

図16に示した減衰係数テーブルGKT3において、補正限界フレーム数Tは、小数点第一位を四捨五入して整数値化した値とした。また減衰係数テーブルGKT3は、具体的な数値設定の一例を示したものであり、減衰係数Kの値は0.9≦K≦1の範囲で、減衰係数Dの値は0.5≦D≦1の範囲で、補正限界フレーム数Tの値に合わせて変更してもよい。このとき、Tの値が大きい値になるに従って、減衰係数K、Dの値は大きい値になるよう設定することが好ましい。Tの値が大きい場合は、Tの値が小さい場合よりも補正限界値に達するまでの補正量に余裕があることになるため、減衰係数を大きくしてフレーム画像の補正量を多くするのである。   In the attenuation coefficient table GKT3 shown in FIG. 16, the correction limit frame number T is a value obtained by rounding the first decimal place to an integer value. The attenuation coefficient table GKT3 shows an example of specific numerical values. The value of the attenuation coefficient K is in the range of 0.9 ≦ K ≦ 1, and the value of the attenuation coefficient D is 0.5 ≦ D ≦. In the range of 1, it may be changed according to the value of the correction limit frame number T. At this time, it is preferable to set the attenuation coefficients K and D to be larger as the value of T becomes larger. When the value of T is large, there is a margin in the amount of correction until the correction limit value is reached compared to when the value of T is small, so the attenuation coefficient is increased and the amount of correction of the frame image is increased. .

以上、第1から第3の実施例にて説明したX成分についての処理を、Y成分についても同様に行い、X、Y各成分別に減衰係数K、Dの値を決定して処理ステップS490に進む。   As described above, the processing for the X component described in the first to third embodiments is similarly performed for the Y component, the values of the attenuation coefficients K and D are determined for each of the X and Y components, and the process proceeds to processing step S490. move on.

第1ないし第3の実施例によって減衰係数K、Dの値がX成分、Y成分について決定されると、ステップS490(図10)に戻り、所定の演算式を用いて補正位置ベクトルS(n+1)を算出する処理を行う。本実施形態では、所定の演算式として次の式(18)を用いる。   When the values of the attenuation coefficients K and D are determined for the X and Y components according to the first to third embodiments, the process returns to step S490 (FIG. 10), and the corrected position vector S (n + 1) is used using a predetermined arithmetic expression. ) Is calculated. In the present embodiment, the following expression (18) is used as the predetermined arithmetic expression.

S(n+1)=K×S(n)+D×(V(n+1)−V1(n)) …(18)
補正位置ベクトルS(n+1)は、具体的には式(18)を用いて、X成分およびY成分についての補正位置ベクトルSx(n+1)およびSy(n+1)をそれぞれ算出することによって求められる。
S (n + 1) = K × S (n) + D × (V (n + 1) −V1 (n)) (18)
Specifically, the correction position vector S (n + 1) is obtained by calculating the correction position vectors Sx (n + 1) and Sy (n + 1) for the X component and the Y component, respectively, using Expression (18).

式(18)から明らかなように、予測動きベクトルV(n+1)と、フレーム画像F(n)を補正した補正フレーム画像HFG(n)の補正動きベクトルV1(n)との差分を求め、この差分に減衰係数Dを乗じた値を補正位置ベクトルS(n+1)の算出に用いるため、フレーム画像F(n+1)を補正した補正フレーム画像HFG(n+1)と前補正フレーム画像HFG(n)間について、画像の移動が滑らかになる確率が高くなる。   As apparent from the equation (18), the difference between the predicted motion vector V (n + 1) and the corrected motion vector V1 (n) of the corrected frame image HFG (n) obtained by correcting the frame image F (n) is obtained. Since a value obtained by multiplying the difference by the attenuation coefficient D is used to calculate the correction position vector S (n + 1), between the corrected frame image HFG (n + 1) obtained by correcting the frame image F (n + 1) and the previous corrected frame image HFG (n). The probability of smooth image movement increases.

なお式(18)において、注目するフレーム画像が時系列順1番目(n=1)の場合、本実施形態では前述したようにフレーム画像F(1)は動いていないとしたことから、S(1)=0である。ちなみに、
n=2の場合は、S(2)=K×0+D×(V(2)−0)=D×V(2)
n=3の場合は、S(3)=K×S(2)+D×(V(3)−V1(2))
によって、補正位置ベクトルが算出される。
In the equation (18), when the frame image of interest is the first in chronological order (n = 1), since the frame image F (1) is not moved in the present embodiment as described above, S ( 1) = 0. By the way,
When n = 2, S (2) = K × 0 + D × (V (2) −0) = D × V (2)
In the case of n = 3, S (3) = K × S (2) + D × (V (3) −V1 (2))
Thus, a corrected position vector is calculated.

(B)S28およびS50における処理
次に、図3に戻り、前記(A)S26、S30、S35およびS40における処理および(C)S65およびS70における処理と並行して行われるS28およびS50における処理について説明する。
(B) Processing in S28 and S50 Next, returning to FIG. 3, (A) the processing in S26, S30, S35 and S40 and (C) the processing in S28 and S50 performed in parallel with the processing in S65 and S70. explain.

まず、ステップS28において、m=1か否かが判定され、m=1の場合(S28、YES)には、ステップS80に進む。   First, in step S28, it is determined whether m = 1. If m = 1 (S28, YES), the process proceeds to step S80.

一方、m=1でない場合(S28、NO)、ステップS50において、部分画像切出手段140が、補正フレーム画像HFG(n)の生成処理を行う。   On the other hand, if m = 1 is not satisfied (S28, NO), in step S50, the partial image cutting means 140 performs a process of generating a corrected frame image HFG (n).

図17に、n=3のときフレーム画像F(3)から所定の画像を切り出して生成される補正フレーム画像HFG(3)の例を示した。図17の上側に、補正がされない場合つまり補正量が0である場合において所定の画像となるフレーム画像FK(3)を破線で示した。そして、図17の下側に、ステップS40にて算出された補正位置ベクトルS(3)に従って、X方向にSx(3)、Y方向にSy(3)だけ画面位置を補正して切り出した補正フレーム画像HFG(3)を示した。   FIG. 17 shows an example of the corrected frame image HFG (3) generated by cutting out a predetermined image from the frame image F (3) when n = 3. On the upper side of FIG. 17, a frame image FK (3) that becomes a predetermined image when correction is not performed, that is, when the correction amount is 0, is indicated by a broken line. Then, on the lower side of FIG. 17, correction is performed by correcting the screen position by Sx (3) in the X direction and Sy (3) in the Y direction according to the correction position vector S (3) calculated in step S40. A frame image HFG (3) is shown.

同様に、一般的に、S10において(n−1)番目のフレーム画像F(n−1)が入力されている間にステップS40において算出される補正位置ベクトルS(n)に従って、フレーム画像F(n)の画面位置をX方向にSx(n)、Y方向にSy(n)だけを補正して切り出して補正フレーム画像HFG(n)を生成する。   Similarly, generally, in accordance with the corrected position vector S (n) calculated in step S40 while the (n−1) -th frame image F (n−1) is input in S10, the frame image F ( The corrected frame image HFG (n) is generated by correcting and cutting out the screen position of n) by correcting only Sx (n) in the X direction and Sy (n) in the Y direction.

このように、画面位置を補正することによって、フレーム画像について画像の移動量が抑えられることになる。   Thus, by correcting the screen position, the amount of movement of the image with respect to the frame image can be suppressed.

(C)S65およびS70における処理
次に、図3に戻り、前記(A)S26、S30、S35およびS40における処理および(B)S28およびS50における処理と並行して行われるS65およびS70における処理について説明する。
(C) Processing in S65 and S70 Next, returning to FIG. 3, (A) the processing in S26, S30, S35 and S40 and (B) the processing in S65 and S70 performed in parallel with the processing in S28 and S50. explain.

まず、S65では、画像表示手段150が、S10で(n−1)番目のフレーム画像F(n−1)が入力されている間にS50において生成された補正フレーム画像HFG(n−1)の拡大処理を、S10でn番目のフレーム画像F(n)が入力されている間に行う。   First, in S65, the image display means 150 receives the corrected frame image HFG (n-1) generated in S50 while the (n-1) th frame image F (n-1) is input in S10. The enlargement process is performed while the nth frame image F (n) is input in S10.

S50において生成される補正フレーム画像の画面サイズは、取得したフレーム画像の画面サイズに対して、横方向で2×Sxmax、縦方向で2×Symax分小さい画像であるが、当該実施形態においては、S50において生成される補正フレーム画像の画面サイズを、取得したフレーム画像と同じ画面サイズに拡大する。   The screen size of the corrected frame image generated in S50 is an image that is smaller by 2 × Sxmax in the horizontal direction and 2 × Symax in the vertical direction than the screen size of the acquired frame image. The screen size of the corrected frame image generated in S50 is enlarged to the same screen size as the acquired frame image.

画面の拡大は、補正フレーム画像の画素数をフレーム画像の画素数と同じにすることで行う。画像を構成する画素数の増加は、画素の補間処理によって実現することができる。補間処理は、バイ・リニア法のほか、バイ・キュービック法、ニアレストネイバ法など、周知の手法を用いる。   The screen is enlarged by making the number of pixels of the corrected frame image the same as the number of pixels of the frame image. An increase in the number of pixels constituting an image can be realized by pixel interpolation processing. In addition to the bi-linear method, the interpolation process uses a known method such as the bi-cubic method or the nearest neighbor method.

次に、ステップS70にて、画像表示手段150が、S65において拡大された補正フレーム画像HFG(n−1)の出力処理を行う。本実施形態では、拡大された補正フレーム画像HFG(n−1)を、出力I/F106(図1)によってビデオプロジェクタ300などの画像表示装置が必要とする画像信号に変換し、補正フレーム画像を生成する毎に直ちに出力するものとする。こうすれば、補正対象となるフレーム画像の取得後から補正フレーム画像の出力までの時間が短くなり、補正をリアルタイムでおこなえる。もとより、拡大された補正フレーム画像HFG(n−1)の出力先をRAM102やハードディスク105などに設けられた所定の画像ファイルとし、生成した一連の複数の補正フレーム画像を格納することとしてもよい。   Next, in step S70, the image display means 150 performs an output process of the corrected frame image HFG (n-1) enlarged in S65. In the present embodiment, the enlarged corrected frame image HFG (n−1) is converted into an image signal required by an image display device such as the video projector 300 by the output I / F 106 (FIG. 1), and the corrected frame image is converted. Every time it is generated, it is output immediately. In this way, the time from acquisition of the frame image to be corrected to output of the corrected frame image is shortened, and correction can be performed in real time. Of course, the output destination of the enlarged corrected frame image HFG (n−1) may be a predetermined image file provided in the RAM 102, the hard disk 105, or the like, and a series of a plurality of generated corrected frame images may be stored.

以上でS26〜S70についての処理を終了し、ステップS80にてnを更新する(n=n+1とする)。そして、ステップS10に戻り、時系列順で一つ後のフレーム画像について同様の処理を繰り返し、取得される全てのフレーム画像について補正フレーム画像を出力する。   Thus, the processes for S26 to S70 are finished, and n is updated in step S80 (n = n + 1). Then, returning to step S10, the same processing is repeated for the next frame image in time series order, and corrected frame images are output for all the acquired frame images.

図18に、本発明の一実施形態による画像処理装置の動作タイミング図を示す。横軸は時間であり、「(1)入力画像信号」におけるn、n+1は、それぞれS10においてn番目および(n+1)番目のフレーム画像が入力されている間を示す。Δtは、図5に示すように、S306で読み込まれている画素が、EP1(差分値計算が終了するポイント)からEP2(当該フレームにおけるデータの読み込みが終了するポイント)に至るまでの時間であり、その間に次フレームの動きベクトルの予測処理および補正位置算出処理を行う。もし、現フレームの読み込みが終了してから(EP2)、次のフレームの読み込みが開始されるまでの間に、垂直ブランキング期間などの時間が存在する場合には、次フレームの動きベクトルの予測処理および補正位置算出処理は、次フレームの読み込みが開始されるまでの間に行えば良い。「(2)差分算出領域」における各矢印は、各差分算出領域において図4のS310〜S318の処理が行われている間を示す。「(3)動きベクトル検出」における矢印{n−(n−1)}および{(n+1)−n}は、それぞれn番目および(n+1)番目のフレーム画像の動きベクトル検出処理(S30)が行われている間を示す。「(4)次フレーム動きベクトル予測」における矢印{(n+1)−n}および{(n+2)−(n+1)}は、それぞれ(n+1)番目および(n+2)番目のフレーム画像の動きベクトル予測処理(S35)が行われている間を示す。「(5)補正位置算出処理」における矢印{(n+1)−n}および{(n+2)−(n+1)}は、それぞれ(n+1)番目および(n+2)番目のフレーム画像の補正位置算出処理(S40)が行われている間を示す。「(6)フレーム画像切り出し」におけるn、n+1は、それぞれS10においてn番目および(n+1)番目のフレーム画像の切り出し処理(S50の補正フレーム画像の生成処理)が行われている間を示す。「(7)フレーム画像拡大」におけるn−1、nは、それぞれS10において(n−1)番目およびn番目のフレーム画像の拡大および出力処理(S65およびS70)が行われている間を示す。   FIG. 18 shows an operation timing chart of the image processing apparatus according to the embodiment of the present invention. The horizontal axis represents time, and n and n + 1 in “(1) Input Image Signal” indicate the time during which the nth and (n + 1) th frame images are input in S10. As shown in FIG. 5, Δt is the time from when the pixel read in S306 reaches from EP1 (the point where the difference value calculation ends) to EP2 (the point where the data reading in the frame ends). In the meantime, a motion vector prediction process and a correction position calculation process for the next frame are performed. If there is a time such as a vertical blanking period between the end of reading the current frame (EP2) and the start of reading the next frame, the motion vector of the next frame is predicted. The processing and the correction position calculation processing may be performed before reading of the next frame is started. Each arrow in “(2) Difference calculation area” indicates that the processes of S310 to S318 in FIG. 4 are being performed in each difference calculation area. The arrows {n− (n−1)} and {(n + 1) −n} in “(3) motion vector detection” are performed by the motion vector detection processing (S30) of the nth and (n + 1) th frame images, respectively. It shows while being broken. The arrows {(n + 1) −n} and {(n + 2) − (n + 1)} in “(4) Next frame motion vector prediction” indicate motion vector prediction processing of the (n + 1) th and (n + 2) th frame images, respectively ( It shows during S35). The arrows {(n + 1) −n} and {(n + 2) − (n + 1)} in “(5) Correction position calculation processing” indicate correction position calculation processing (S40 of the (n + 1) th and (n + 2) th frame images, respectively. ) Is shown. “N, n + 1” in “(6) Frame image cutout” indicates that the nth and (n + 1) th frame image cutout processing (correction frame image generation processing in S50) is being performed in S10. “N−1” and “n” in “(7) Frame image enlargement” indicate that the (n−1) -th and n-th frame images are being enlarged and output (S65 and S70) in S10, respectively.

図18から明らかなように、S10においてn番目のフレーム画像を読み込んでいる間に、n番目のフレーム画像以前の複数のフレーム画像に基づき求めた動きベクトルから、(n+1)番目のフレーム画像の予想動きベクトルを求めることができる。求めた(n+1)番目のフレーム画像の予想動きベクトルを用いて補正位置算出処理を行う。これによって、入力映像に対し手ぶれによる画像ぶれの補正を行う。   As is clear from FIG. 18, the (n + 1) th frame image is predicted from motion vectors obtained based on a plurality of frame images before the nth frame image while the nth frame image is read in S10. A motion vector can be obtained. A correction position calculation process is performed using the predicted motion vector of the obtained (n + 1) th frame image. As a result, image blur due to camera shake is corrected for the input video.

また、S10においてn番目のフレーム画像を読み込んでいる間に、n番目のフレーム画像の動きベクトル算出、(n+1)番目のフレーム画像の予想動きベクトルの算出、(n+1)番目のフレーム画像の読み出し位置の計算を行う。もし、n番目のフレーム画像と(n+1)番目のフレーム画像の間に垂直ブランキング期間などの時間が存在する場合には、(n+1)番目のフレーム画像の予測動きベクトルの算出と(n+1)番目のフレームの読み出し位置の計算は、(n+1)番目のフレーム画像の読み込みが開始されるまでの間に行えば良い。S10においてn番目のフレーム画像を読み込んでいる間に求めた(n+1)番目のフレーム画像の読み出し位置を用いて、(n+1)番目のフレーム画像を読み込むのと平行して、(n+1)番目のフレーム画像の切り抜き画像を出力することができる。   While the nth frame image is being read in S10, the motion vector of the nth frame image is calculated, the predicted motion vector of the (n + 1) th frame image is calculated, and the readout position of the (n + 1) th frame image. Perform the calculation. If there is a time such as a vertical blanking period between the nth frame image and the (n + 1) th frame image, the calculation of the predicted motion vector of the (n + 1) th frame image and the (n + 1) th frame image are performed. The calculation of the reading position of the frame may be performed until the reading of the (n + 1) th frame image is started. The (n + 1) th frame image is read in parallel with the (n + 1) th frame image read using the read position of the (n + 1) th frame image obtained while the nth frame image is read in S10. A clipped image of the image can be output.

このようにして、n番目のフレーム画像以前の複数のフレーム画像に基づいて求めた動きベクトルから、次のフレーム画像での動きベクトルを予測することができる。よって、動きベクトルの検出から次フレーム画像の動きベクトルの予測、次フレーム画像に対する補正量の計算までを、1フレーム画像分の情報を読み込む間に平行して行うことにより、手ぶれ補正処理などをリアルタイムで行う際に必要な、フレーム画像を保持するためのメモリの量を抑えつつリアルタイムの処理が可能になる。   In this way, the motion vector in the next frame image can be predicted from the motion vector obtained based on the plurality of frame images before the nth frame image. Therefore, by performing in parallel while reading the information for one frame image, from the detection of the motion vector to the prediction of the motion vector of the next frame image and the calculation of the correction amount for the next frame image, the camera shake correction processing and the like are performed in real time. Real-time processing is possible while suppressing the amount of memory required to hold the frame image, which is necessary when performing the above.

以上、本発明の一実施形態を説明したが、本発明はこうした実施の形態に何ら限定されるものではなく、本発明の趣旨を逸脱しない範囲内において様々な形態で実施し得ることは勿論である。   As mentioned above, although one embodiment of the present invention has been described, the present invention is not limited to such an embodiment, and can of course be implemented in various forms without departing from the spirit of the present invention. is there.

(変形例1)例えば、前記実施形態では、動画像から取得したフレーム画像F(n)の動きベクトルを、フレーム画像F(n)とフレーム画像F(n−1)との相対的な位置関係から算出したが、動画像を撮影する際に、速度センサーや加速度センサーなど移動量を検出する手段によって、フレーム画像のメタデータとして画面位置データが存在する場合は、この画面位置データを用いて動きベクトルを算出してもよい。こうすれば、画像のパターンマッチングや特徴点追跡といった画像処理を行う必要がなく、動きベクトルを算出に関する処理の負荷を軽減することができる。   (Modification 1) For example, in the above-described embodiment, the relative positional relationship between the frame image F (n) and the frame image F (n−1) is determined based on the motion vector of the frame image F (n) acquired from the moving image. If the screen position data exists as frame image metadata by means of detecting the amount of movement, such as a speed sensor or an acceleration sensor, when moving images are captured, the screen position data is used for motion. A vector may be calculated. In this way, it is not necessary to perform image processing such as image pattern matching or feature point tracking, and the processing load relating to motion vector calculation can be reduced.

(変形例2)また、前記実施形態における画像処理装置は、汎用のコンピュータで構成するようにしたが、本発明はこれに限定されるものでなく、モバイルコンピュータやワークステーションなどで構成するようにしてもよい。あるいは、デジタルカメラやビデオカメラ、DVD録画再生機、またはビデオプロジェクタやTV、あるいは携帯電話など、動画像を記録又は再生できる機器や、時系列順で静止画像を記録又は再生できる種々の機器に、本発明の画像処理装置を組み込んで構成するようにしてもよい。   (Modification 2) In addition, the image processing apparatus in the embodiment is configured by a general-purpose computer, but the present invention is not limited to this, and is configured by a mobile computer, a workstation, or the like. May be. Alternatively, in a digital camera, a video camera, a DVD recorder / player, a video projector, a TV, or a mobile phone, such as a device that can record or play a moving image, or various devices that can record or play a still image in chronological order, The image processing apparatus of the present invention may be incorporated.

(変形例3)また、前記実施形態における画像処理装置は、フレーム画像を構成する所定枚数のフィールド画像全てからフレーム画像を取得し、この取得したフレーム画像について所定の画像を切り出す位置を補正するものとしたが、これに限定せず、フレーム画像がN枚(Nは2以上の整数)のフィールド画像によって構成されている場合、これらN枚のフィールド画像のうち、1枚からN−1枚までのうち任意の枚数のフィールド画像から得られる画像をフレーム画像として、所定の画像を切り出す位置を補正するものとしても差し支えない。   (Modification 3) Further, the image processing apparatus according to the embodiment acquires frame images from all the predetermined number of field images constituting the frame image, and corrects the position where the predetermined image is cut out from the acquired frame images. However, the present invention is not limited to this, and when the frame image is composed of N (N is an integer of 2 or more) field images, 1 to N−1 of these N field images. Of these, an image obtained from an arbitrary number of field images may be used as a frame image, and the position where a predetermined image is cut out may be corrected.

本発明の一実施形態としての画像処理装置の概略構成を示す説明図である。1 is an explanatory diagram showing a schematic configuration of an image processing apparatus as an embodiment of the present invention. 本発明の一実施形態としての画像処理装置の機能ブロック図である。1 is a functional block diagram of an image processing apparatus as an embodiment of the present invention. 本発明の一実施形態としての画像処理装置における処理を説明するフローチャートである。It is a flowchart explaining the process in the image processing apparatus as one Embodiment of this invention. 図3のS30におけるn番目のフレーム画像の動きベクトルの検出処理を詳細に説明するためのフローチャートである。4 is a flowchart for explaining in detail a motion vector detection process of an nth frame image in S30 of FIG. 3. 図3のS30におけるn番目のフレーム画像の動きベクトルの検出処理を詳細に説明するための説明図である。It is explanatory drawing for demonstrating in detail the detection process of the motion vector of the nth frame image in S30 of FIG. (n+1)番目のフレーム画像の動きベクトルの予測処理を説明するためのフローチャートである。It is a flowchart for demonstrating the prediction process of the motion vector of the (n + 1) th frame image. 動き軌跡により動きベクトルの予測処理を説明するための説明図である。It is explanatory drawing for demonstrating the prediction process of a motion vector by a motion locus. フレーム画像の動きベクトルを説明するための説明図である。It is explanatory drawing for demonstrating the motion vector of a frame image. フレーム画像の動きベクトルと補正動きベクトル、及び補正位置ベクトルの関係を説明するための説明図である。It is explanatory drawing for demonstrating the relationship between the motion vector of a frame image, a correction | amendment motion vector, and a correction | amendment position vector. 補正位置ベクトルの算出処理を説明するフローチャートである。It is a flowchart explaining the calculation process of a correction position vector. 第1の実施例における減衰係数の決定処理を説明するフローチャートである。It is a flowchart explaining the determination process of the attenuation coefficient in a 1st Example. 第1の実施例における減衰係数の値を説明するための減衰係数テーブルである。It is an attenuation coefficient table for demonstrating the value of the attenuation coefficient in a 1st Example. 第2の実施例における減衰係数の決定処理を説明するフローチャートである。It is a flowchart explaining the determination process of the attenuation coefficient in a 2nd Example. 第2の実施例における減衰係数の値を説明するための減衰係数テーブルである。It is an attenuation coefficient table for demonstrating the value of the attenuation coefficient in a 2nd Example. 第3の実施例における減衰係数の決定処理を説明するフローチャートである。It is a flowchart explaining the determination process of the attenuation coefficient in a 3rd Example. 第3の実施例における減衰係数の値を説明するための減衰係数テーブルである。It is an attenuation coefficient table for demonstrating the value of the attenuation coefficient in a 3rd Example. フレーム画像から補正フレーム画像を生成する方法を説明する説明図である。It is explanatory drawing explaining the method to produce | generate a correction | amendment frame image from a frame image. 本発明の一実施形態による画像処理装置の動作タイミング図である。It is an operation | movement timing diagram of the image processing apparatus by one Embodiment of this invention. 従来の画像ぶれ補正処理時のデータの流れを説明する説明図である。It is explanatory drawing explaining the data flow at the time of the conventional image blurring correction process.

符号の説明Explanation of symbols

100…コンピュータ、101…入力I/F、102…RAM、103…CPU、104…ROM、105…ハードディスク、106…出力I/F、107…バスライン、110…フレーム画像受取手段、120…動きベクトル検出手段、121…動き軌跡算出手段、122…ベースライン算出手段、123…動き軌跡重み付け手段、124…動きベクトル予測手段、126…メモリ、130…切出位置算出手段、140…部分画像切出手段、150…画像表示手段、200…ビデオカメラ、210…DVDプレーヤ、300…プロジェクタ、310…ディスプレイ、F(n)…フレーム画像、FK(n)…フレーム画像、HFG(1)…補正フレーム画像、Smax…補正限界値、Sxmax…補正限界値のX成分、Symax…補正限界値のY成分、V0(n)…動きベクトル、V1(n)…補正動きベクトル、S(n)…補正位置ベクトル、Sx(n)…補正位置ベクトルのX成分、Sy(n)…補正位置ベクトルのY成分、K…減衰係数、D…減衰係数、GKT1〜3…減衰係数テーブル。
DESCRIPTION OF SYMBOLS 100 ... Computer, 101 ... Input I / F, 102 ... RAM, 103 ... CPU, 104 ... ROM, 105 ... Hard disk, 106 ... Output I / F, 107 ... Bus line, 110 ... Frame image receiving means, 120 ... Motion vector Detection means 121... Motion trajectory calculation means 122. Baseline calculation means 123... Motion trajectory weighting means 124... Motion vector prediction means 126 126 Memory 130 Extraction position calculation means 140 140 Partial image extraction means 150 ... Image display means, 200 ... Video camera, 210 ... DVD player, 300 ... Projector, 310 ... Display, F (n) ... Frame image, FK (n) ... Frame image, HFG (1) ... Corrected frame image, Smax: Correction limit value, Sxmax: X component of correction limit value, Symax: Correction limit Y component, V0 (n) ... motion vector, V1 (n) ... corrected motion vector, S (n) ... corrected position vector, Sx (n) ... X component of corrected position vector, Sy (n) ... corrected position vector Y component, K ... attenuation coefficient, D ... attenuation coefficient, GKT1-3 ... attenuation coefficient table.

Claims (13)

時系列に連続する、表示すべき(M+1)個(Mは2以上の整数)のフレーム画像F(1)〜F(M+1)(括弧内は時系列順を示す整数)であって、画像揺れを発生させる可能性のある前記フレーム画像F(1)〜F(M+1)を順次受け取るフレーム画像受取手段と、
フレーム画像F(p−1)(1<p≦(M+1))を基準とするフレーム画像F(p)の動きを示す動きベクトルV0(p)を検出することにより、前記(M+1)個のフレーム画像F(1)〜F(M+1)のうち、M個のフレーム画像F(2)〜F(M+1)の動きを示すM個の動きベクトルV0(2)〜V0(M+1)を得る動きベクトル検出手段と、
前記M個の動きベクトルV0(2)〜V0(M+1)のうちの(M−1)個の動きベクトルV0(2)〜V0(M)で示される、M個のフレーム画像F(1)〜F(M)の全体的な動きを前記画像揺れにより特定されるX個(Xは整数)の基底の周波数に分解し、当該周波数より規定されるX個の正弦波を、時間軸上で、(M+1)番目のフレーム画像F(M+1)を表示するべき時刻まで延長することにより、フレーム画像F(M)を基準とする前記フレーム画像F(M+1)の動きを示す、前記フレーム画像F(M+1)の動きベクトルである予測動きベクトルYV0(M+1)を予測する動きベクトル予測手段と、
フレーム画像F(k)(kは時系列順を示す整数)から当該フレーム画像F(k)の一部である部分画像HFG(k)を切り出すときの切出位置S(k)を算出する切出位置算出手段であって、前記予測動きベクトルYV0(M+1)を用いて、前記フレーム画像F(M+1)の画像揺れを減衰させる切出位置S(M+1)を算出する切出位置算出手段と、
前記切出位置S(M+1)を用いて、前記フレーム画像F(M+1)から前記部分画像HFG(M+1)を切り出す部分画像切出手段とを有し、
前記部分画像切出手段による前記部分画像HFG(M+1)の切り出しを行うことに先立ち、前記画像受取手段による時系列順でM番目のフレームの前記フレーム画像F(M)の受け取り、前記動きベクトル検出手段による動きベクトルV0(M)の検出、前記動きベクトル予測手段による前記予測動きベクトルYV0(M+1)の予測、及び前記切出位置算出手段による前記切出位置S(M+1)の算出を行い、
前記部分画像切出手段による前記部分画像HFG(M+1)の切り出しの一部と前記動きベクトル検出手段による動きベクトルV0(M+1)の検出の一部とを並行して行うことを特徴とする画像処理装置。
(M + 1) frame images F (1) to F (M + 1) (M is an integer equal to or greater than 2) to be displayed, which are continuous in time series (in parentheses are integers indicating the time series order), and image shaking Frame image receiving means for sequentially receiving the frame images F (1) to F (M + 1) that may cause
By detecting the motion vector V0 (p) indicating the motion of the frame image F (p) with reference to the frame image F (p−1) (1 <p ≦ (M + 1)), the (M + 1) frames are detected. Motion vector detection for obtaining M motion vectors V0 (2) to V0 (M + 1) indicating the motion of M frame images F (2) to F (M + 1) among the images F (1) to F (M + 1). Means,
Of the M motion vectors V0 (2) to V0 (M + 1), M frame images F (1) to F (1) to (M−1) motion vectors V0 (2) to V0 (M) are shown. The overall motion of F (M) is decomposed into X (X is an integer) base frequency specified by the image fluctuation, and X sine waves defined by the frequency are expressed on the time axis. The frame image F (M + 1) indicating the movement of the frame image F (M + 1) with reference to the frame image F (M) by extending the (M + 1) th frame image F (M + 1) to the time to be displayed. Motion vector predicting means for predicting a predicted motion vector YV0 (M + 1) that is a motion vector of
A cutout for calculating a cutout position S (k) when cutting out a partial image HFG (k) that is a part of the frame image F (k) from the frame image F (k) (k is an integer indicating the time series order). Extraction position calculation means, which uses the predicted motion vector YV0 (M + 1) to calculate a extraction position S (M + 1) for attenuating image fluctuation of the frame image F (M + 1);
Partial image cutout means for cutting out the partial image HFG (M + 1) from the frame image F (M + 1) using the cutout position S (M + 1);
Prior to cutting out the partial image HFG (M + 1) by the partial image cutting means, the frame image F (M) of the Mth frame is received in time series by the image receiving means, and the motion vector detection is performed. Detecting the motion vector V0 (M) by the means, predicting the predicted motion vector YV0 (M + 1) by the motion vector predicting means, and calculating the cut-out position S (M + 1) by the cut-out position calculating means,
Image processing characterized in that a part of the partial image HFG (M + 1) cut out by the partial image cutout unit and a part of the detection of the motion vector V0 (M + 1) by the motion vector detection unit are performed in parallel. apparatus.
請求項1に記載の画像処理装置であって、
前記(M−1)個の動きベクトルV0(2)〜V0(M)を用いて、任意のフレーム画像を基準位置とする前記M個のフレーム画像F(1)〜F(M)の全体的な動きを示す軌跡であるM個の動き軌跡X0(1)〜X0(M)を算出する動き軌跡算出手段をさらに有し、
前記動きベクトル予測手段は、前記M個の動き軌跡X0(1)〜X0(M)を前記X個の基底の周波数に分解し、当該周波数より規定される前記X個の正弦波を、時間軸上で、前記フレーム画像F(M+1)を表示するべき時刻まで延長することにより、前記予測動きベクトルYV0(M+1)を予測することを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
Using the (M-1) motion vectors V0 (2) to V0 (M), the entire M frame images F (1) to F (M) having an arbitrary frame image as a reference position. Motion trajectory calculating means for calculating M motion trajectories X0 (1) to X0 (M), which are trajectories that indicate correct movement,
The motion vector prediction means decomposes the M motion trajectories X0 (1) to X0 (M) into the X base frequencies, and converts the X sine waves defined by the frequencies into a time axis. The image processing apparatus according to claim 1, wherein the predicted motion vector YV0 (M + 1) is predicted by extending the frame image F (M + 1) to a time to be displayed.
請求項2に記載の画像処理装置であって、
前記基底の周波数の数Xは、前記M個とは異なる数であることを特徴とする画像処理装置。
The image processing apparatus according to claim 2,
An image processing apparatus according to claim 1, wherein the number of base frequencies X is different from the M.
請求項3に記載の画像処理装置であって、
前記基底の周波数の数Xは、前記M個よりも少ない数であることを特徴とする画像処理装置。
The image processing apparatus according to claim 3,
The number X of the base frequencies is a number smaller than the M pieces.
請求項2に記載の画像処理装置であって、
前記X個の基底の周波数のうち、直流成分を除く基底の周波数の周期は、フレーム画像F(1)を表示すべき時刻から前記フレーム画像F(M)を表示すべき時刻までの時間よりも短いことを特徴とする画像処理装置。
The image processing apparatus according to claim 2,
Of the X base frequencies, the period of the base frequency excluding the DC component is longer than the time from the time when the frame image F (1) should be displayed to the time when the frame image F (M) should be displayed. An image processing apparatus characterized by being short.
請求項2〜5のいずれか一項に記載の画像処理装置であって、
前記動き軌跡算出手段が算出した前記動き軌跡X0(1)〜X0(M)から、前記X個の基底の周波数のうちの直流成分を除く基底の周波数より低い周波数成分であるベースラインを取り除いた軌跡を前記動き軌跡X0(1)〜X0(M)として修正するベースライン算出手段をさらに有し、
前記動きベクトル予測手段は、前記ベースライン算出手段により修正された前記M個の動き軌跡X0(1)〜X0(M)を前記X個の基底の周波数に分解し、当該周波数より規定される前記X個の正弦波を、時間軸上で、(M+1)番目の前記フレーム画像F(M+1)を表示するべき時刻まで延長して得られる座標位置と、前記ベースラインを、時間軸上で、(M+1)番目の前記フレーム画像F(M+1)を表示するべき時刻まで延長して得られる座標位置とを加算することにより、動き軌跡X0(M+1)を予測し、動き軌跡X0(M)及び前記動き軌跡X0(M+1)から前記フレーム画像F(M+1)の前記予測動きベクトルYV0(M+1)を予測することを特徴とする画像処理装置。
An image processing apparatus according to any one of claims 2 to 5,
The baseline, which is a frequency component lower than the base frequency excluding the DC component of the X base frequencies, is removed from the motion trajectories X0 (1) to X0 (M) calculated by the motion trajectory calculation means. Baseline calculation means for correcting a trajectory as the motion trajectories X0 (1) to X0 (M),
The motion vector prediction means decomposes the M motion trajectories X0 (1) to X0 (M) corrected by the baseline calculation means into the X base frequencies, and is defined by the frequencies. The coordinate position obtained by extending X sine waves to the time to display the (M + 1) -th frame image F (M + 1) on the time axis, and the base line on the time axis ( The motion trajectory X0 (M + 1) is predicted by adding the coordinate position obtained by extending to the time at which the M + 1) th frame image F (M + 1) should be displayed, and the motion trajectory X0 (M) and the motion An image processing apparatus that predicts the predicted motion vector YV0 (M + 1) of the frame image F (M + 1) from a locus X0 (M + 1).
請求項6に記載の画像処理装置であって、
前記ベースラインは、前記動き軌跡X0(1)〜X0(M)の各フレーム間の傾きを平均した傾きをもつ直線であることを特徴とする画像処理装置。
The image processing apparatus according to claim 6,
The image processing apparatus according to claim 1, wherein the base line is a straight line having an inclination obtained by averaging inclinations between frames of the motion trajectories X0 (1) to X0 (M).
請求項2〜7のいずれか一項に記載の画像処理装置であって、
前記動きベクトル予測手段が前記動き軌跡X0(1)〜X0(M)を使用する前に、時系列順で(M)番目のフレームに近いほど大きな重みを施すことにより、前記動き軌跡X0(1)〜X0(M)を修正する動き軌跡重み付け手段をさらに有することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 2 to 7,
Before the motion vector predictor uses the motion trajectories X0 (1) to X0 (M), the motion trajectory X0 (1) is weighted so as to be closer to the (M) th frame in time series order. ) To X0 (M), further comprising a motion trajectory weighting means.
請求項2〜8のいずれか一項に記載の画像処理装置であって、
前記動き軌跡重み付け手段は、時系列順で1番目のフレームに対応する値が0に最も近く、時系列順でM番目のフレームに対応する値が1に最も近くなる関数W(n)を用いて、フレームごとに動き軌跡X0(n)の座標とW(n)の値をかけて前記動き軌跡X0(1)〜X0(M)を修正することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 2 to 8,
The motion trajectory weighting means uses a function W (n) in which the value corresponding to the first frame in time series order is closest to 0 and the value corresponding to the Mth frame in time series order is closest to 1. The image processing apparatus is characterized by correcting the motion trajectories X0 (1) to X0 (M) by multiplying the coordinates of the motion trajectory X0 (n) and the value of W (n) for each frame.
請求項1〜9のいずれか一項に記載の画像処理装置であって、
前記部分画像HFG(M+1)を時系列順に順次を表示する画像表示手段を有することを特徴とする画像処理装置。
An image processing apparatus according to any one of claims 1 to 9,
An image processing apparatus comprising image display means for sequentially displaying the partial images HFG (M + 1) in chronological order.
時系列に連続する、表示すべき(M+1)個(Mは2以上の整数)のフレーム画像F(1)〜F(M+1)(括弧内は時系列順を示す整数)であって、画像揺れを発生させる可能性のある前記フレーム画像F(1)〜F(M+1)を順次受け取るフレーム画像受取工程と、
フレーム画像F(p−1)(1<p≦(M+1))を基準とするフレーム画像F(p)の動きを示す動きベクトルV0(p)を検出することにより、前記(M+1)個のフレーム画像F(1)〜F(M+1)のうち、M個のフレーム画像F(2)〜F(M+1)の動きを示すM個の動きベクトルV0(2)〜V0(M+1)を得る動きベクトル検出工程と、
前記M個の動きベクトルV0(2)〜V0(M+1)のうちの(M−1)個の動きベクトルV0(2)〜V0(M)で示される、M個のフレーム画像F(1)〜F(M)の全体的な動きを前記画像揺れにより特定されるX個(Xは整数)の基底の周波数に分解し、当該周波数より規定されるX個の正弦波を、時間軸上で、(M+1)番目のフレーム画像F(M+1)を表示するべき時刻まで延長することにより、フレーム画像F(M)を基準とする前記フレーム画像F(M+1)の動きを示す、前記フレーム画像F(M+1)の動きベクトルである予測動きベクトルYV0(M+1)を予測する動きベクトル予測工程と、
フレーム画像F(k)(kは時系列順を示す整数)からフレーム画像F(k)の一部である部分画像HFG(k)を切り出すときの切出位置S(k)を算出する切出位置算出工程であって、前記予測動きベクトルYV0(M+1)を用いて、前記画像揺れを減衰させる切出位置S(M+1)を算出する切出位置算出工程と、
前記切出位置S(M+1)を用いて、前記フレーム画像F(M+1)から前記部分画像HFG(M+1)を切り出す部分画像切出工程とを有し、
前記部分画像切出工程による前記部分画像HFG(M+1)の切り出しを行うことに先立ち、前記画像受取工程による時系列順でM番目のフレームの前記フレーム画像F(M)の受け取り、前記動きベクトル検出工程による動きベクトルV0(M)の検出、前記動きベクトル予測工程による前記予測動きベクトルYV0(M+1)の予測、及び前記切出位置算出工程による前記切出位置S(M+1)の算出を行い、
前記部分画像切出工程による前記部分画像HFG(M+1)の切り出しの一部と前記動きベクトル検出工程による動きベクトルV0(M+1)の検出の一部とを並行して行うことを特徴とする画像処理方法。
(M + 1) frame images F (1) to F (M + 1) (M is an integer equal to or greater than 2) to be displayed, which are continuous in time series (in parentheses are integers indicating the time series order), and image shaking Frame image receiving step for sequentially receiving the frame images F (1) to F (M + 1) that may generate
By detecting the motion vector V0 (p) indicating the motion of the frame image F (p) with reference to the frame image F (p−1) (1 <p ≦ (M + 1)), the (M + 1) frames are detected. Motion vector detection for obtaining M motion vectors V0 (2) to V0 (M + 1) indicating the motion of M frame images F (2) to F (M + 1) among the images F (1) to F (M + 1). Process,
Of the M motion vectors V0 (2) to V0 (M + 1), M frame images F (1) to F (1) to (M−1) motion vectors V0 (2) to V0 (M) are shown. The overall motion of F (M) is decomposed into X (X is an integer) base frequency specified by the image fluctuation, and X sine waves defined by the frequency are expressed on the time axis. The frame image F (M + 1) indicating the movement of the frame image F (M + 1) with reference to the frame image F (M) by extending the (M + 1) th frame image F (M + 1) to the time to be displayed. A motion vector prediction step of predicting a predicted motion vector YV0 (M + 1) that is a motion vector of
A cutout for calculating a cutout position S (k) when cutting out a partial image HFG (k) that is a part of the frame image F (k) from the frame image F (k) (k is an integer indicating the time series order). A position calculation step, which uses the predicted motion vector YV0 (M + 1) to calculate a cut position S (M + 1) that attenuates the image shake;
A partial image cutting step of cutting out the partial image HFG (M + 1) from the frame image F (M + 1) using the cutting position S (M + 1),
Prior to cutting out the partial image HFG (M + 1) by the partial image cutting step, receiving the frame image F (M) of the Mth frame in time series order by the image receiving step, and detecting the motion vector Detecting a motion vector V0 (M) by a step, predicting the predicted motion vector YV0 (M + 1) by the motion vector prediction step, and calculating the cut position S (M + 1) by the cut position calculation step,
Image processing characterized in that a part of the partial image HFG (M + 1) cut out by the partial image cutout step and a part of the detection of the motion vector V0 (M + 1) by the motion vector detection step are performed in parallel. Method.
コンピュータを、
時系列に連続する、表示すべき(M+1)個(Mは2以上の整数)のフレーム画像F(1)〜F(M+1)(括弧内は時系列順を示す整数)であって、画像揺れを発生させる可能性のある前記フレーム画像F(1)〜F(M+1)を順次受け取るフレーム画像受取手段と、
フレーム画像F(p−1)(1<p≦(M+1))を基準とするフレーム画像F(p)の動きを示す動きベクトルV0(p)を検出することにより、前記(M+1)個のフレーム画像F(1)〜F(M+1)のうち、M個のフレーム画像F(2)〜F(M+1)の動きを示すM個の動きベクトルV0(2)〜V0(M+1)を得る動きベクトル検出手段と、
前記M個の動きベクトルV0(2)〜V0(M+1)のうちの(M−1)個の動きベクトルV0(2)〜V0(M)で示される、M個のフレーム画像F(1)〜F(M)の全体的な動きを前記画像揺れにより特定されるX個(Xは整数)の基底の周波数に分解し、当該周波数より規定されるX個の正弦波を、時間軸上で、(M+1)番目のフレーム画像F(M+1)を表示するべき時刻まで延長することにより、フレーム画像F(M)を基準とする前記フレーム画像F(M+1)の動きを示す、前記フレーム画像F(M+1)の動きベクトルである予測動きベクトルYV0(M+1)を予測する動きベクトル予測手段と、
フレーム画像F(k)(kは時系列順を示す整数)からフレーム画像F(k)の一部である部分画像HFG(k)を切り出すときの切出位置S(k)を算出する切出位置算出手段であって、前記予測動きベクトルYV0(M+1)を用いて、前記画像揺れを減衰させる切出位置S(M+1)を算出する切出位置算出手段と、
前記切出位置S(M+1)を用いて、前記フレーム画像F(M+1)から前記部分画像HFG(M+1)を切り出す部分画像切出手段として機能させるためのプログラムであって、
前記部分画像切出手段による前記部分画像HFG(M+1)の切り出しを行うことに先立ち、前記画像受取手段による時系列順でM番目のフレームの前記フレーム画像F(M)の受け取り、前記動きベクトル検出手段による動きベクトルV0(M)の検出、前記動きベクトル予測手段による前記予測動きベクトルYV0(M+1)の予測、及び前記切出位置算出手段による前記切出位置S(M+1)の算出を行い、
前記部分画像切出手段による前記部分画像HFG(M+1)の切り出しの一部と前記動きベクトル検出手段による動きベクトルV0(M+1)の検出の一部とを並行して行うことを特徴とする画像処理プログラム。
Computer
(M + 1) frame images F (1) to F (M + 1) (M is an integer equal to or greater than 2) to be displayed, which are continuous in time series (in parentheses are integers indicating the time series order), and image shaking Frame image receiving means for sequentially receiving the frame images F (1) to F (M + 1) that may cause
By detecting the motion vector V0 (p) indicating the motion of the frame image F (p) with reference to the frame image F (p−1) (1 <p ≦ (M + 1)), the (M + 1) frames are detected. Motion vector detection for obtaining M motion vectors V0 (2) to V0 (M + 1) indicating the motion of M frame images F (2) to F (M + 1) among the images F (1) to F (M + 1). Means,
Of the M motion vectors V0 (2) to V0 (M + 1), M frame images F (1) to F (1) to (M−1) motion vectors V0 (2) to V0 (M) are shown. The overall motion of F (M) is decomposed into X (X is an integer) base frequency specified by the image fluctuation, and X sine waves defined by the frequency are expressed on the time axis. The frame image F (M + 1) indicating the movement of the frame image F (M + 1) with reference to the frame image F (M) by extending the (M + 1) th frame image F (M + 1) to the time to be displayed. Motion vector predicting means for predicting a predicted motion vector YV0 (M + 1) that is a motion vector of
A cutout for calculating a cutout position S (k) when cutting out a partial image HFG (k) that is a part of the frame image F (k) from the frame image F (k) (k is an integer indicating the time series order). A position calculation unit, which uses the predicted motion vector YV0 (M + 1) to calculate a cutout position S (M + 1) that attenuates the image shake;
A program for functioning as a partial image cutout means for cutting out the partial image HFG (M + 1) from the frame image F (M + 1) using the cutout position S (M + 1),
Prior to cutting out the partial image HFG (M + 1) by the partial image cutting means, the frame image F (M) of the Mth frame is received in time series by the image receiving means, and the motion vector detection is performed. Detecting the motion vector V0 (M) by the means, predicting the predicted motion vector YV0 (M + 1) by the motion vector predicting means, and calculating the cut-out position S (M + 1) by the cut-out position calculating means,
Image processing characterized in that a part of the partial image HFG (M + 1) cut out by the partial image cutout unit and a part of the detection of the motion vector V0 (M + 1) by the motion vector detection unit are performed in parallel. program.
請求項12に記載の画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体。
A computer-readable recording medium on which the image processing program according to claim 12 is recorded.
JP2005208145A 2005-07-19 2005-07-19 Image processing apparatus, image processing method, program, and recording medium Withdrawn JP2007028251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005208145A JP2007028251A (en) 2005-07-19 2005-07-19 Image processing apparatus, image processing method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005208145A JP2007028251A (en) 2005-07-19 2005-07-19 Image processing apparatus, image processing method, program, and recording medium

Publications (1)

Publication Number Publication Date
JP2007028251A true JP2007028251A (en) 2007-02-01

Family

ID=37788416

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005208145A Withdrawn JP2007028251A (en) 2005-07-19 2005-07-19 Image processing apparatus, image processing method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP2007028251A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010134046A (en) * 2008-12-02 2010-06-17 Tohoku Univ Image display device and image display method
JP2010226314A (en) * 2009-03-23 2010-10-07 Casio Computer Co Ltd Video processing apparatus, method and program
JP2011244183A (en) * 2010-05-18 2011-12-01 Nikon Corp Imaging apparatus, image display apparatus, and image display program
KR20160135748A (en) * 2014-03-19 2016-11-28 소니 주식회사 Control of shake blur and motion blur for pixel multiplexing cameras

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010134046A (en) * 2008-12-02 2010-06-17 Tohoku Univ Image display device and image display method
JP2010226314A (en) * 2009-03-23 2010-10-07 Casio Computer Co Ltd Video processing apparatus, method and program
JP2011244183A (en) * 2010-05-18 2011-12-01 Nikon Corp Imaging apparatus, image display apparatus, and image display program
KR20160135748A (en) * 2014-03-19 2016-11-28 소니 주식회사 Control of shake blur and motion blur for pixel multiplexing cameras
JP2017517909A (en) * 2014-03-19 2017-06-29 ソニー株式会社 Control of camera shake blur and motion blur to multiplex pixels
KR102174808B1 (en) 2014-03-19 2020-11-05 소니 주식회사 Control of shake blur and motion blur for pixel multiplexing cameras

Similar Documents

Publication Publication Date Title
US20180041708A1 (en) One-Pass Video Stabilization
KR102141290B1 (en) Image processing apparatus, image processing method, image processing program and storage medium
JP6500535B2 (en) Image processing apparatus, image processing method and program
JP2507138B2 (en) Motion vector detection device and image shake correction device
JP2007028251A (en) Image processing apparatus, image processing method, program, and recording medium
JP4617883B2 (en) Image processing apparatus and method, program, and recording medium
JP6017279B2 (en) Image processing apparatus, image processing method, and program
JP5841345B2 (en) Image processing apparatus, image processing method, image processing program, and imaging apparatus
US20140176794A1 (en) Image processing apparatus, image processing method, and program
US20090323814A1 (en) Tracking point detection apparatus and method, program, and recording medium
US20100026904A1 (en) Video signal processing apparatus and video signal processing method
JP4875564B2 (en) Flicker correction apparatus and flicker correction method
JP4482933B2 (en) Motion vector detection device, image display device, image imaging device, motion vector detection method, program, and recording medium
JP2005150903A (en) Image processing apparatus, noise elimination method, and noise elimination program
US7522189B2 (en) Automatic stabilization control apparatus, automatic stabilization control method, and computer readable recording medium having automatic stabilization control program recorded thereon
JP5300413B2 (en) Motion vector detection device, motion vector detection method, imaging device, and program
JP2006285655A (en) Image processor, image processing method and image processing program
JP6245968B2 (en) Image processing apparatus, imaging apparatus, and control method
JP2015079329A (en) Image processor, image processing method and program
JP2003078808A (en) Device and method for detecting motion vector, device and method for correcting camera shake and imaging apparatus
JP2004140693A (en) Image processor
CN110692235B (en) Image processing apparatus, image processing program, and image processing method
JP2006246270A (en) Image processing apparatus, image displaying apparatus, image imaging apparatus, image processing method, program and recording medium
JP4763415B2 (en) Image processing device
JP2007060104A (en) Autocorrelation value calculating method, interpolation pixel generating method, apparatus therefor and program therefor

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20070404

A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20081007