JP2006235689A - Image processor, image display device, image pickup device, image processing method, program and recording medium - Google Patents

Image processor, image display device, image pickup device, image processing method, program and recording medium Download PDF

Info

Publication number
JP2006235689A
JP2006235689A JP2005045277A JP2005045277A JP2006235689A JP 2006235689 A JP2006235689 A JP 2006235689A JP 2005045277 A JP2005045277 A JP 2005045277A JP 2005045277 A JP2005045277 A JP 2005045277A JP 2006235689 A JP2006235689 A JP 2006235689A
Authority
JP
Japan
Prior art keywords
image
correction
fixed amount
limit value
frame image
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
JP2005045277A
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 JP2005045277A priority Critical patent/JP2006235689A/en
Publication of JP2006235689A publication Critical patent/JP2006235689A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To solve a problem that in the case that the size of a correction image cut out from a frame image is always fixed, even a frame image does not need to be corrected is also cut out. <P>SOLUTION: Images are acquired one by one by an image acquisition part 110 per a certain volume of images in a time series order. A motion vector of the certain volume of focused images included in the images which are sequentially acquired is calculated by using the certain volume of images which were acquired prior to the certain volume of focused images by one in the time series order by a motion vector calculation part 120. For the certain volume of focused images, a correction position vector for representing a position to cut out the predetermined image is calculated by a correction position calculation part 130 which is equipped with a correction limit value calculation part for calculating a correction limit value equivalent to a cutting size of the predetermined image. The correction limit value changes corresponding to the size of the correction position vector. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、動画像または時系列に連続する静止画像からフレーム画像を取得し、取得したフレーム画像から所定の画像を切り取って、補正フレーム画像を生成する画像処理技術に関する。   The present invention relates to an image processing technique for acquiring a frame image from a moving image or a time-series continuous still image, cutting out a predetermined image from the acquired frame image, and generating a corrected frame image.

近年ビデオカメラやデジタルカメラ、さらに画像撮影機能を有する携帯電話などの撮影機器を用いて、運動会など所望する画像を動画像として撮影することが行われている。その際、撮影装置を手持ちで撮影したとき、手ぶれによって撮影画像に画像ぶれが生じてしまう。このため、従来より、撮影時の画像ぶれを補正する画像処理技術が提案されている(例えば、特許文献1)。   In recent years, a desired image such as an athletic meet has been taken as a moving image by using a video camera, a digital camera, and a photographing device such as a mobile phone having an image photographing function. At that time, when the photographing apparatus is photographed by hand, image blurring occurs in the photographed image due to camera shake. For this reason, conventionally, an image processing technique for correcting image blur at the time of shooting has been proposed (for example, Patent Document 1).

特許文献1には、撮影したフィールド画像の動きベクトルを算出し、算出した動きベクトルから計算した積分ベクトルだけフィールド画像をシフトさせることによって手ぶれを補正する画像処理技術が開示されている。   Patent Document 1 discloses an image processing technique that corrects camera shake by calculating a motion vector of a captured field image and shifting the field image by an integral vector calculated from the calculated motion vector.

特許第2957851号公報Japanese Patent No. 2957851

特許文献1に記載の画像処理技術では、手ぶれによる映像の動きをキャンセルさせる方向に各フレーム画像をシフトさせる際、映像が欠落しないように最大のシフト量に応じてフレーム画像をトリミングして出力する。しかし、特許文献1に記載の画像処理技術では、フレーム画像から切り取られる補正画像のサイズは常に一定であり、補正の必要のない画像についてもフレーム画像の切り取りが行われてしまうという課題がある。

本発明は、このような課題を解決するためになされたもので、フレーム画像から切り取られる補正画像のサイズが可変である画像処理装置、画像表示装置、画像撮像装置、画像処理方法、プログラムおよび記録媒体を提供することを目的とする。
In the image processing technique described in Patent Document 1, when each frame image is shifted in a direction to cancel the motion of the video due to camera shake, the frame image is trimmed and output according to the maximum shift amount so that the video is not lost. . However, the image processing technique described in Patent Document 1 has a problem that the size of the corrected image cut out from the frame image is always constant, and the frame image is cut out even for an image that does not need to be corrected.

The present invention has been made to solve such a problem, and an image processing device, an image display device, an image capturing device, an image processing method, a program, and a recording in which the size of a corrected image cut out from a frame image is variable. The purpose is to provide a medium.

上記目的を達成する本発明の一態様による画像処理装置は、動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成する画像処理装置であって、時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得部と、前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出部と、前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出部と、を備え、前記補正位置算出部が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出部をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化するように構成される。   An image processing apparatus according to an aspect of the present invention that achieves the above object acquires a fixed amount of an image from a moving image or a time-series continuous still image, and cuts out a predetermined image from the acquired fixed amount of image. An image processing apparatus that generates a corrected image, and for each fixed amount of images in time-series order, an image acquisition unit that sequentially acquires the fixed amount of images, and of the fixed amount of images acquired sequentially, A motion vector calculation unit that calculates a motion vector of a certain amount of image using a certain amount of image immediately before the fixed amount of image in time series order, and the predetermined amount of the image A correction position calculation unit that calculates a correction position vector indicating a position to cut out the image of the image, and the correction position calculation unit calculates a correction limit value corresponding to a size for cutting out the predetermined image. Part further comprising a configured such that the correction limit value is changed according to the magnitude of the corrected position vector.

上記のように構成された画像処理装置によれば、所定の画像を切り取るサイズに相当する補正限界値が、一定量の画像のシフト量に相当する補正位置ベクトルの大きさに応じて変化する。このため、補正位置ベクトルの大きさに応じてフレーム画像の切り取りサイズを連続的に変化させることで、通常表示(Smax(n)=0の状態)と補正表示(0<Smax(n)≦Smax_maxの状態)とを徐々に切り替えることができる。   According to the image processing apparatus configured as described above, the correction limit value corresponding to the size for cutting out a predetermined image changes according to the size of the correction position vector corresponding to a certain amount of image shift. Therefore, by continuously changing the cutout size of the frame image according to the size of the correction position vector, normal display (state of Smax (n) = 0) and correction display (0 <Smax (n) ≦ Smax_max) Can be switched gradually.

ここで、「一定量の画像」は、実施形態における「フレーム画像」に対応しているが、フレーム画像には限定されない。   Here, the “fixed amount of image” corresponds to the “frame image” in the embodiment, but is not limited to the frame image.

また、「補正画像」が、実施形態における「補正フレーム画像」に対応し、「画像取得部」が、実施形態における「フレーム画像取得部110」に対応している。   The “corrected image” corresponds to the “corrected frame image” in the embodiment, and the “image acquisition unit” corresponds to the “frame image acquisition unit 110” in the embodiment.

上記本発明による画像処理装置によれば、前記補正限界値算出部は、前記所定の画像を切り取るサイズが前記補正位置ベクトルの大きさよりも大きい場合には前記所定の画像を切り取るサイズを小さくし、前記所定の画像を切り取るサイズが前記補正位置ベクトルの大きさよりも小さい場合には前記所定の画像を切り取るサイズを大きくすることが好ましい。   According to the image processing device of the present invention, the correction limit value calculation unit reduces the size of the predetermined image when the size of the predetermined image is larger than the size of the correction position vector, When the size of the predetermined image cut out is smaller than the correction position vector, it is preferable to increase the size of the predetermined image cut out.

上記本発明による画像処理装置によれば、前記補正限界値算出部は、前記補正限界値Smax(n)の算出において、
Smax(n)=Smax(n−1)+α×{Smax(n−1)−Smax(n−2)}−β×{Smax(n−1)−S(n−1)}
Smax(n−1):時系列順(n−1)番目の一定量の画像についての補正限界値
Smax(n−2):時系列順(n−2)番目の一定量の画像についての補正限界値
S(n−1):時系列順(n−1)番目の一定量の画像についての補正位置ベクトル
α:1以下の正の補正係数
β:0.1以下の正の補正係数
で示される演算式を用いることが好ましい。
According to the image processing apparatus of the present invention, the correction limit value calculation unit calculates the correction limit value Smax (n).
Smax (n) = Smax (n−1) + α × {Smax (n−1) −Smax (n−2)} − β × {Smax (n−1) −S (n−1)}
Smax (n-1): correction limit value for a fixed amount image in the time series (n-1) th order Smax (n-2): correction for a fixed amount image in the time series order (n-2) Limit value
S (n-1): correction position vector α for a fixed amount of images in time-series order (n−1): α: positive correction coefficient β: 1 or less positive calculation: positive correction coefficient 0.1 or less It is preferable to use the formula.

上記本発明による画像処理装置によれば、αは、0.9≦α<1の定数であることが好ましい。   According to the image processing apparatus of the present invention, α is preferably a constant of 0.9 ≦ α <1.

上記本発明による画像処理装置によれば、
βは0<β≦0.1の定数、または
{Smax(n−1)−S(n−1)}の値が大きいほどβの値を小さくする、または
{Smax(n−1)−Smax(n−2)}の値が大きいほどβの値を小さくする、
ようにすることが好ましい。
According to the image processing apparatus of the present invention,
β is a constant of 0 <β ≦ 0.1, or the larger the value of {Smax (n−1) −S (n−1)}, the smaller the value of β, or {Smax (n−1) −Smax (n -2)} decreases the value of β as the value of
It is preferable to do so.

上記本発明による画像処理装置によれば、前記算出された補正位置ベクトルに基づいて、前記取得された一定量の画像についての補正画像を生成する補正画像生成部をさらに備え、前記補正位置算出部が、前記補正限界値Smax(n)に基づいて補正画像のサイズおよび補正画像の拡大率を算出し、前記補正画像生成部が、算出された補正画像のサイズおよび補正画像の拡大率に基づいて、前記所定の画像を切り取って補正画像を生成するように構成することが好ましい。   The image processing apparatus according to the present invention further includes a correction image generation unit that generates a correction image for the acquired fixed amount of image based on the calculated correction position vector, and the correction position calculation unit Calculates the size of the correction image and the enlargement ratio of the correction image based on the correction limit value Smax (n), and the correction image generator generates the correction image based on the calculated size of the correction image and the enlargement ratio of the correction image. It is preferable that the predetermined image is cut out to generate a corrected image.

ここで、「補正画像生成部」が、実施形態における「補正フレーム画像生成部140」に対応している。   Here, the “correction image generation unit” corresponds to the “correction frame image generation unit 140” in the embodiment.

本発明の他の態様による画像表示装置は、動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成して表示する画像表示装置であって、時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得部と、前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出部と、前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出部と、を備え、前記補正位置算出部が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出部をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化するように構成される。   An image display device according to another aspect of the present invention acquires a fixed amount of an image from a moving image or a time-series continuous still image, and generates a corrected image by cutting out a predetermined image from the acquired fixed amount of image. An image acquisition unit that sequentially acquires the fixed amount of images for each fixed amount of images in time series, and a fixed amount of interest among the sequentially acquired fixed amount of images A motion vector calculation unit that calculates a motion vector of the image using a certain amount of image immediately before the fixed amount of image in time series order, and the predetermined amount of image A correction position calculation unit that calculates a correction position vector indicating a position to cut out an image, and the correction position calculation unit calculates a correction limit value corresponding to a size at which the predetermined image is cut out. The The provided configured such that the correction limit value is changed according to the magnitude of the corrected position vector.

本発明のさらに他の態様による画像撮像装置は、動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成する画像撮像装置であって、時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得部と、前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出部と、前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出部と、を備え、前記補正位置算出部が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出部をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化するように構成される。   An image pickup apparatus according to still another aspect of the present invention acquires a fixed amount of an image from a moving image or a still image that is continuous in time series, and cuts out a predetermined image from the acquired fixed amount of image to obtain a corrected image. An image capturing device to be generated, for each fixed amount of images in time series, an image acquisition unit that sequentially acquires the fixed amount of images, and a fixed amount of image of interest among the sequentially acquired fixed amount of images A motion vector calculation unit that calculates a certain amount of motion vector using a certain amount of the image immediately before the fixed amount of time image in chronological order, and the predetermined image for the fixed amount of image of interest A correction position calculation unit that calculates a correction position vector indicating a position to cut out, and the correction position calculation unit further includes a correction limit value calculation unit that calculates a correction limit value corresponding to a size at which the predetermined image is cut out. Provided, configured such that the correction limit value is changed according to the magnitude of the corrected position vector.

本発明のさらに他の態様による画像処理方法は、動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成する画像処理方法であって、時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得工程と、前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出工程と、前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出工程と、を備え、前記補正位置算出工程が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出工程をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化するように構成される。   An image processing method according to still another aspect of the present invention acquires a fixed amount of an image from a moving image or a still image that is continuous in time series, and cuts out a predetermined image from the acquired fixed amount of image to obtain a corrected image. An image processing method to be generated, an image acquisition step of sequentially acquiring the fixed amount of images for each fixed amount of images in time series, and a fixed amount of images of interest among the sequentially acquired fixed amount of images A motion vector calculation step of calculating a motion vector of a predetermined amount using a certain amount of image immediately before the fixed amount of image in time series order, and the predetermined image for the fixed amount of image of interest A correction position calculation step of calculating a correction position vector indicating a position to cut out, wherein the correction position calculation step calculates a correction limit value corresponding to a size at which the predetermined image is cut out. Extent further comprising a configured the correction limit value is changed according to the magnitude of the corrected position vector.

本発明のさらに他の態様によるプログラムは、動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成する処理をコンピュータに実行させるためのプログラムであって、時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得処理と、前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出処理と、前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出処理と、を備え、前記補正位置算出処理が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出処理をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化するように構成される。   A program according to still another aspect of the present invention acquires a fixed amount of an image from a moving image or a time-series continuous still image, and generates a corrected image by cutting out a predetermined image from the acquired fixed amount of image. A program for causing a computer to execute a process, and for each of a fixed amount of images in time series, an image acquisition process for sequentially acquiring the fixed amount of images, and attention is paid to the fixed amount of images acquired sequentially. A motion vector calculation process for calculating a motion vector of a fixed amount of image using a fixed amount of image immediately before the fixed amount of image in time series order, and for the fixed amount of image, A correction position calculation process for calculating a correction position vector indicating a position to cut out the predetermined image, wherein the correction position calculation process corresponds to a size corresponding to the size at which the predetermined image is cut out. Further comprising a correction limit value calculation processing for calculating a limit value, configured such that the correction limit value is changed according to the magnitude of the corrected position vector.

本発明のさらに他の態様による記録媒体は、動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成する処理をコンピュータに実行させるためのプログラムを記録したコンピュータによって読取可能な記録媒体であって、時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得処理と、前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出処理と、前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出処理と、を備え、前記補正位置算出処理が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出処理をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化する、プログラムを記録したコンピュータによって読取可能な記録媒体である。
ように構成される。
A recording medium according to still another aspect of the present invention acquires a fixed amount of an image from a moving image or a time-series continuous still image, and generates a corrected image by cutting out a predetermined image from the acquired fixed amount of image. A computer-readable recording medium storing a program for causing a computer to execute processing, and for each fixed amount of images in time series order, an image acquisition process for sequentially acquiring the fixed amount of images, and the sequential A motion vector calculation process for calculating a motion vector of a certain amount of image of interest in a certain amount of acquired images, using a certain amount of image immediately before the certain amount of image in time series order; A correction position calculation process for calculating a correction position vector indicating a position to cut out the predetermined image for the fixed amount of image of interest, and the correction position calculation process A correction limit value calculation process for calculating a correction limit value corresponding to a size for cutting out the predetermined image, and the correction limit value changes according to the magnitude of the correction position vector. It is a readable recording medium.
Configured as follows.

次に、本発明の実施の形態を説明する。図1は本発明の一実施形態としての画像処理装置の概略構成を示す説明図である。この画像処理装置は汎用のコンピュータであり、入力インターフェイス(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. This image processing apparatus is a general-purpose computer, 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. Has been. 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に格納されるものとしてもよい。   The application program in which the predetermined image processing is recorded may be stored in advance in the hard disk 105 or the ROM 104. For example, the application program may be supplied from the outside by a computer-readable recording medium such as a CD-ROM, and the DVD- It may be stored by being stored in the hard disk 105 via the R / RW drive. 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に格納されたアプリケーションプログラムを読み出し、この読み出したアプリケーションプログラムを所定のオペレーティングシステムのもとで実行することによって、画像処理装置として機能する。特に図1に示したように、このアプリケーションプログラムが実行されることにより、CPU103は、フレーム画像取得部110、動きベクトル算出部120、補正位置算出部130、補正フレーム画像生成部140、補正動きベクトル算出部150、画像出力部160として機能する。   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. In particular, as shown in FIG. 1, by executing this application program, the CPU 103 causes the frame image acquisition unit 110, the motion vector calculation unit 120, the correction position calculation unit 130, the correction frame image generation unit 140, the correction motion vector to be corrected. The calculation unit 150 and the image output unit 160 function.

各部はそれぞれ以下の処理を司る。フレーム画像取得部110は、コンピュータ100に入力した動画像から時系列順にフレーム画像を取得する。動きベクトル算出部120は、取得されたフレーム画像の移動ベクトルを算出し、補正位置算出部130に渡す。補正位置算出部130は、動きベクトルなどを用いて、フレーム画像から所定の画像を切り取るための画像位置を補正位置ベクトルとして算出する。補正フレーム画像生成部140は、算出された補正位置ベクトルなどに基づいて補正フレーム画像を生成する。補正動きベクトル算出部150は、生成された補正フレーム画像についての動きベクトルを補正動きベクトルとして算出し、補正位置算出部に渡す。画像出力部160は、生成された補正フレーム画像を所定の画像データに変換して出力する。   Each part manages the following processes. The frame image acquisition unit 110 acquires frame images from a moving image input to the computer 100 in chronological order. The motion vector calculation unit 120 calculates a movement vector of the acquired frame image and passes it to the correction position calculation unit 130. The correction position calculation 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 correction frame image generation unit 140 generates a correction frame image based on the calculated correction position vector and the like. The corrected motion vector calculation unit 150 calculates a motion vector for the generated corrected frame image as a corrected motion vector, and passes it to the correction position calculation unit. The image output unit 160 converts the generated corrected frame image into predetermined image data and outputs it.

次に、本実施形態の画像処理装置について各部が行う処理を、図2の処理フローチャートにより説明する。図2に示した処理が開始されると、まずステップS10にて、フレーム画像取得部110は、入力される動画像から時系列順に、フレーム画像F(n)をコンピュータ100に取り込む処理を行う。なお、本実施形態における以下の画像処理装置の説明において、(n)は時系列順でn番目であることを意味する。   Next, processing performed by each unit in the image processing apparatus according to the present embodiment will be described with reference to the processing flowchart of FIG. When the process shown in FIG. 2 is started, first, in step S10, the frame image acquisition unit 110 performs a process of taking 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 in the present embodiment, (n) means nth in time series order.

本実施形態では、動画像の入力をトリガーにして、自動的にフレーム画像を時系列順で順次取り込むこととする。もとより、取り込むフレーム画像を指定することとしてもよい。フレーム画像の指定方法は、動画像からフレーム画像を取得してコンピュータ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)次のステップに進み、存在しなければ(NO)画像処理装置における処理を終了する。   Next, in step S <b> 20, the frame image acquisition unit 110 determines whether or not there is a frame image F (n) acquired by being captured by the computer 100. If the frame image F (n) acquired from the moving image exists (YES), the process proceeds to the next step. If not (NO), the process in the image processing apparatus is terminated.

次に、ステップS30において、動きベクトル算出部120は、取得したフレーム画像F(n)の動きベクトルV0(n)の算出処理を行う。ここで、フレーム画像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)は、CPU103によってRAM102などに格納される。   Next, in step S30, the motion vector calculation unit 120 performs processing for calculating the motion vector V0 (n) of the acquired frame image F (n). Here, calculation processing of the motion vector V0 (n) of the frame image F (n) will be described. The relative position of the frame image F (n) is calculated with respect to the n−1th frame image F (n−1) in time series order, 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 calculated 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 RAM 102 or the like by the CPU 103.

フレーム画像間の相対位置は、特許文献1に開示されている方法や、画像のパターンマッチングまたは特徴点追跡といった周知の画像処理方法によって求めることができる。具体的な相対位置の算出処理方法については、本発明の本質ではないので説明を省略する。   The relative position between the frame images can be obtained by a method disclosed in Patent Document 1 or a known image processing method such as image pattern matching or feature point tracking. Since the specific relative position calculation processing method is not the essence of the present invention, the description thereof will be omitted.

ここで、次のステップS40における補正位置ベクトルS(n)の算出処理、及び以下のステップS60における補正動きベクトルV1(n)の算出処理について、処理内容の説明についての理解を容易にするため、フレーム画像F(n)の動きベクトルV0(n)と補正位置ベクトルS(n)、及び補正動きベクトルV1(n)の関係について、図3および図4を用いて前もって説明する。   Here, in order to facilitate understanding of the description of the processing contents of the calculation processing of the corrected position vector S (n) in the next step S40 and the calculation processing of the corrected motion vector V1 (n) in the following step S60, 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.

図3は、最初に取得される時系列順1番目のフレーム画像F(1)と、2番目、3番目のフレーム画像F(2)、F(3)をそれぞれ示している。本発明は、補正量に基づいてフレーム画像から所定の画像を切り取る補正処理によって補正フレーム画像を生成する画像処理技術を提供するものであり、補正量が0の場合に切り取られるフレーム画像は、それぞれ図3破線で示したフレーム画像FK(1)、FK(2)、FK(3)となる。   FIG. 3 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 each frame image cut out when the correction amount is 0 Frame images FK (1), FK (2), and FK (3) indicated by broken lines in FIG.

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

可変の補正限界値Smax(n)(X成分はSxmax(n)、Y成分はSymax(n))の算出については、以下でステップS42の処理において詳細に説明する。   The calculation of the variable correction limit value Smax (n) (X component is Sxmax (n) and Y component is Symax (n)) will be described in detail in the process of step S42 below.

同じく図3(下側)に、求められた相対位置に従って配置されたフレーム画像FK(1)、FK(2)、FK(3)を示した。図3より明らかなように、例えばフレーム画像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. 3 (lower side) shows frame images FK (1), FK (2), and FK (3) arranged according to the obtained relative positions. As apparent from FIG. 3, 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 the center of the frame image FK (1) (in this embodiment, the “center” is the diagonal line of the rectangle constituting the frame image or the correction frame image). It is obtained as the position of the center of the frame image FK (2) with respect to the intersection. Similarly, the motion vector V0 (3) of the frame image FK (3) is obtained as the position of the center of the frame image FK (3) with respect to the center of 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.

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

次に、図4を用いてフレーム画像F(n)の補正位置ベクトルS(n)と動きベクトルV0(n)、及びステップS60(図2)にて算出される補正動きベクトルV1(n)の関係を説明する。図4は、図3(下部)に示したフレーム画像FK(1)〜FK(3)の中心付近を拡大して示した説明図である。ここで、補正フレーム画像HFG(2)は、ステップS40(図2)で算出されるフレーム画像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 S60 (FIG. 2) are used with reference to FIG. Explain the relationship. FIG. 4 is an explanatory diagram showing an enlargement of the vicinity of the center of the frame images FK (1) to FK (3) shown in FIG. 3 (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. 2). ing.

図4から明らかなように、フレーム画像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 apparent from FIG. 4, the frame image FK (2) is obtained by moving the position of the center of the frame image FK (1) according to the number of pixels of the X and Y components of the motion vector V0 (2). The frame image HFG (2) is obtained by moving the center 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 center 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 position of the center of the frame image FK (3) moved according to the number of pixels of the X component and Y component of the correction position vector S (3).

また、図4に示したように、補正動きベクトルV1(2)は、フレーム画像FK(1)中心に対する補正フレーム画像HFG(2)の中心の相対的な位置を示すものであり、補正動きベクトルV1(3)は、補正フレーム画像HFG(2)の中心に対する補正フレーム画像HFG(3)の中心の相対的な位置を示すものである。なお、動きベクトルV0(1)は0であることより補正位置ベクトルS(1)も0となる(後述する)。従って、フレーム画像FK(1)は補正フレーム画像HFG(1)と同じものになる。   Also, as shown in FIG. 4, the corrected motion vector V1 (2) indicates the relative position of the center of the corrected frame image HFG (2) with respect to the center of the frame image FK (1). V1 (3) indicates a relative position of the center of the correction frame image HFG (3) with respect to the center of 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)は、図4に示したように動きベクトル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.

本実施形態によれば、図4にて説明したように、補正位置ベクトルS(n)を、補正位置ベクトルS(n−1)と、動きベクトルV0(n)と、補正動きベクトルV1(n−1)との3つのベクトルから求める画像処理技術を提供することによって補正遅れを抑制するとともに、補正量を可変の補正限界値Smax(n)以内に抑えることによって、不規則な画面移動を抑制できる。   According to the present embodiment, as described with reference to FIG. 4, the corrected position vector S (n), the corrected position vector S (n−1), the motion vector V 0 (n), and the corrected motion vector V 1 (n -1) and an image processing technique obtained from the three vectors to suppress the correction delay, and suppress the irregular screen movement by suppressing the correction amount within the variable correction limit value Smax (n). it can.

次に、ステップS40(図2)において、補正位置算出部130は、補正位置ベクトルS(n)の算出処理を行う。ここでの処理について、図5のフローチャートを用いて詳しく説明する。   Next, in step S40 (FIG. 2), the correction position calculation unit 130 performs a calculation process of the correction position vector S (n). This process will be described in detail with reference to the flowchart of FIG.

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

次に、ステップS420にて、注目するフレーム画像F(n)に対して時系列順で一つ前のフレーム画像の補正動きベクトルV1(n−1)を入力する処理を行う。ステップS60(図2)にて算出され、RAM102などのメモリーに格納された補正動きベクトルV1(n−1)を、CPU103が読み出すことによって入力処理を行う。   Next, in step S420, a process of inputting the corrected motion vector V1 (n-1) of the previous frame image in time series order with respect to the frame image F (n) of interest is performed. The CPU 103 reads out the corrected motion vector V1 (n−1) calculated in step S60 (FIG. 2) and stored in a memory such as the RAM 102, thereby performing input processing.

また、ステップS430にて、注目するフレーム画像F(n)に対して時系列順で一つ前のフレーム画像の補正位置ベクトルS(n−1)を入力する処理を行う。具体的には、ステップS40(図2)にて算出され、RAM102などのメモリーに格納された補正位置ベクトルS(n−1)を、CPU103が読み出すことによって入力処理を行う。   In step S430, a process of inputting the correction position vector S (n-1) of the previous frame image in time series order with respect to the frame image F (n) of interest is performed. Specifically, the CPU 103 reads the corrected position vector S (n−1) calculated in step S40 (FIG. 2) and stored in a memory such as the RAM 102, thereby performing 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 frame image immediately preceding the target frame image in time series order (hereinafter simply referred to as “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の値を決定する方法。
「減衰係数決定方法の第1実施例」
まず、ステップS440(図5)にて行われる処理について、第1の実施例における減衰係数K、Dの決定処理の詳細を、図6に示した処理フローチャートを用いて説明する。第1の実施例での減衰係数K、Dの値の決定方法は、注目するフレーム画像の動きベクトルの大きさ及び向きと、時系列順一つ前の補正フレーム画像の大きさ及び向きとから補正量を算出し、動きベクトルの方向変化と大きさにあわせて注目するフレーム画像の補正量を算出しようとするものである。なお、ここでは、注目するフレーム画像のX成分についての処理を説明するが、処理ステップS440ではY成分についても図6に示したX成分の処理と同様の処理を行い、X成分、Y成分それぞれについて減衰係数K、Dの値を決定する。そして、後述する次の処理ステップS490(図5)において、補正位置ベクトルのX成分とY成分を所定の演算式にて算出する際、それぞれ決定した減衰係数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 Embodiment”: The amount of movement of an image calculated for a corrected frame image obtained by correcting the previous frame image (hereinafter simply referred to as “previous correction frame image”) and the amount of movement of the frame image of interest The values of the damping coefficients K and D are determined. 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 K is based on the direction of the 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 value of D.
“Second Embodiment”: Attenuation coefficient K based on the ratio of the correction amount of the previous frame image to the correction limit value indicating the correctable range and the determination of whether the correction amount of the previous frame image is “increase” or “decrease”. , A method for determining the value of D.
“Third embodiment”: The motion vector of the frame image of interest and the corrected motion vector of the previous frame image with respect to the difference amount 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 how much the difference amount is.
“First Example of Decay Factor Determination Method”
First, regarding the processing performed in step S440 (FIG. 5), 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 of determining the values of the attenuation coefficients K and D in the first embodiment corrects from the magnitude and direction of the motion vector of the frame image of interest and the size and orientation of the corrected frame image one time earlier in the chronological order. The amount is calculated, and the correction amount of the focused frame image is calculated in accordance with the direction change and the magnitude of the 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. 5), which will be described later, when the X component and 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にて注目するフレーム画像の動きベクトルV0(n)のX成分V0x(n)の抽出処理を行う。X成分V0x(n)はX方向の画素数で示され、図4に示したようにベクトルの向きが図面右方向であればプラス、左方向であればマイナスとなる。なお注目するフレーム画像の動きベクトルV0(n)のY成分V0y(n)については、図4に示したようにベクトルの向きが図面上方向であればプラス、下方向であればマイナスとなる。   When the process is started, an extraction process of the X component V0x (n) of the motion vector V0 (n) of the frame image of interest is first performed in step S441. The X component V0x (n) is indicated by the number of pixels in the X direction. As shown in FIG. 4, the X component V0x (n) is positive if the vector direction is the right direction of the drawing and negative if the vector direction is the left direction. Note that the Y component V0y (n) of the motion vector V0 (n) of the frame image of interest is positive if the vector direction is upward in the drawing as shown in FIG. 4, and negative if downward.

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

次に、ステップS443にて、V0x(n)の絶対値と、V1x(n−1)の絶対値とを算出する。そして、次の処理ステップS444にてV0x(n)の絶対値がV1x(n−1)の絶対値以上か否かを判定する。ステップS444でNOの場合、つまり注目するフレーム画像の移動量が、前補正フレーム画像の移動量より小さい場合、ステップS445に進み、減衰係数K、Dの値をK1、D1に決定し、ステップS490(図5)に進む。   Next, in step S443, the absolute value of V0x (n) and the absolute value of V1x (n-1) are calculated. Then, in the next processing step S444, it is determined whether or not the absolute value of V0x (n) is greater than or equal to the absolute value of V1x (n-1). 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. Go to (Fig. 5).

一方、ステップS444でYESの場合、つまり注目するフレーム画像の移動量が、前補正フレーム画像の移動量以上の場合、ステップS446に進み、V0x(n)とV1x(n−1)の積BSxを算出する。そして、次の処理ステップS447にて、BSxが0以上か否かを判定する。つまり、ここではベクトルV0x(n)とベクトルV1x(n−1)とが同じ向き(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, and the product BSx of V0x (n) and V1x (n−1) is set. calculate. Then, in the next processing step S447, it is determined whether BSx is 0 or more. That is, here, it is checked whether the vector V0x (n) and the vector V1x (n-1) are in the same direction (0 or more) or in the opposite direction (less than 0).

ステップS447にてNOの場合(つまり逆向きの場合)、ステップS448に進み、減衰係数K、Dの値をK2、D2に決定し、ステップS490(図5)に進む。ここで、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. 5). 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(図5)に進む。ここで、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. 5). 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の値について、その一例を図7の減衰係数テーブルGKT1に示した。ここで、減衰係数Kの値は0.9≦K≦1の範囲で、K1<K2<K3を満たす値であることが望ましい。また、減衰係数Dの値は0.5≦D≦1の範囲で、D1<D2<D3を満たす値であることが望ましい。補正しようとするフレーム画像の移動量が、前補正フレーム画像の移動量より小さい場合、補正しようとするフレーム画像の移動量が前フレーム画像の移動量に対して減少しているということになる。従って、仮に、補正しようとするフレーム画像の補正量が、前フレーム画像と同じ補正量であったとすると、補正量が補正限界値に達する確率は高くなる。そこで、小さい値の減衰係数を用いて補正量を少なくし、補正限界値に達しにくくするのである。   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 of the frame image to be corrected is smaller than the movement amount of the previous correction frame image, the movement amount of the frame image to be corrected is reduced with respect to the movement amount of the previous frame image. Therefore, if the correction amount of the frame image to be corrected is the same correction amount as that of the previous frame image, the probability that the correction amount reaches the correction limit value increases. 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つのフレーム画像の移動量が違う方向のときは、補正しようとするフレーム画像の画面位置が前補正フレーム画像の画面位置に近づく方向に反転移動していることになる。そこで、同じ方向のときにくらべて減衰係数の値を小さくして、補正しようとするフレーム画像の補正量を少なくするのである。なお、減衰係数K1〜K3、D1〜D3の値は、本実施例に限らず、前述した条件を満たす値であれば何でもよい。
「減衰係数決定方法の第2実施例」
次に、第2の実施例における減衰係数K、Dの決定処理の詳細を、図8に示した処理フローチャートを用いて説明する。第2の実施例での減衰係数K、Dの値の決定方法は、補正限界値に近いか否かを所定の比率RSによって補正量を算出し、さらに、所定の演算式によって補正量が増加か減少かを判断して注目するフレーム画像の補正量を算出しようとするものである。なお、ここでも、注目するフレーム画像のX成分についての処理を説明するが、処理ステップS440ではY成分についても図8に示したX成分の処理と同様の処理を行い、X成分、Y成分それぞれについて減衰係数K、Dの値を決定する。そして、後述する次の処理ステップS490(図5)にて、補正位置ベクトルのX成分とY成分を所定の演算式にて算出する際に、それぞれ決定した減衰係数K、Dの値を用いるのである。
Further, when 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, when the movement amounts of these two frame images are in different directions, the screen position of the frame image to be corrected is This means that the image is reversed and moved in the direction approaching the screen position of the previous correction frame image. 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.
“Second Embodiment of Damping Coefficient Determination Method”
Next, details of the process of determining the attenuation coefficients K and D in the second embodiment will be described with reference to the process 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. 5) 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, respectively. is there.

ここでの処理が開始されると、まずステップS451にて前フレーム画像の補正限界値Sxmax(n−1)の入力処理を行う。具体的には、ステップS42で計算され、RAM102などのメモリに格納されたSmax(n−1)のX成分についての値をCPU103が読み出すことで行う。   When the processing here is started, first, input processing of the correction limit value Sxmax (n−1) of the previous frame image is performed in step S451. Specifically, the CPU 103 reads the value of the X component of Smax (n−1) calculated in step S42 and stored in a memory such as the RAM 102.

ステップS451およびステップS453において、「n=1」つまり時系列順1番目のフレーム画像の場合、前フレーム画像が存在しない。この場合、補正限界値Sxmax(n−1)を0とする。   In step S451 and step S453, 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, the correction limit value Sxmax (n−1) is set to 0.

次に、ステップS452にて、注目するフレーム画像F(n)に対して時系列順で一つ前のフレーム画像の補正位置ベクトルS(n−1)のX成分Sx(n−1)の抽出処理を行う。ここで、前述したように、X成分Sx(n−1)は、画面左方向を正方向とする画素数で表される。もとよりY成分Sy(n−1)は、画面下方向を正とする画素数で表される。   Next, in step S452, the X component Sx (n−1) of the corrected position vector S (n−1) of the previous frame image in time series order with respect to the frame image F (n) of interest is extracted. Process. Here, as described above, the X component Sx (n−1) 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−1) is represented by the number of pixels with the screen lower direction being positive.

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

次にステップS454にて、注目するフレーム画像F(n)の動きベクトルV0(n)のX成分V0x(n)の抽出処理を行う。X成分V0x(n)はX方向の画素数で示され、図4に示したようにベクトルの向きが図面右方向であればプラス、左方向であればマイナスとなる。なお注目するフレーム画像F(n)の動きベクトルV0(n)のY成分V0y(n)については、図4に示したようにベクトルの向きが図面上方向であればプラス、下方向であればマイナスとなる。   In step S454, the X component V0x (n) of the motion vector V0 (n) of the frame image F (n) of interest is extracted. The X component V0x (n) is indicated by the number of pixels in the X direction. As shown in FIG. 4, the X component V0x (n) is positive if the vector direction is the right direction of the drawing and negative if the vector direction is the left direction. As for the Y component V0y (n) of the motion vector V0 (n) of the frame image F (n) of interest, as shown in FIG. Negative.

次に、ステップS455にて、注目するフレーム画像F(n)に対して時系列順で一つ前のフレーム画像の補正動きベクトルV1(n−1)のX成分V1x(n−1)の抽出処理を行う。なお、前述したように、注目するフレーム画像F(n)が時系列順1番目のフレーム画像である場合は、V1x(n−1)は0である。   Next, in step S455, extraction of the X component V1x (n-1) of the corrected motion vector V1 (n-1) of the previous frame image in time series order with respect to the frame image F (n) of interest. Process. As described above, V1x (n−1) is 0 when the frame image F (n) of interest is the first frame image in time series order.

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

KHx=Sx(n−1)×(V0x(n)−V1x(n−1))…「式1」
次に、ステップS457にて、傾向値KHxが0以上か否かの判定処理を行う。そして、YESの場合は、ステップS459にて補正は「増加」と判断し、NOの場合はステップS458にて「減少」と判断する処理を行う。Sx(n−1)つまり前フレーム画像の補正位置ベクトルに基づく補正方向と、V0x(n)−V1x(n−1)つまり注目するフレーム画像の動きベクトルと前フレーム画像の補正ベクトルとの差に基づく画像の移動方向とを比べて、それぞれの向きが逆方向の場合は増加、同じ方向の場合は減少と判断するのである。
KHx = Sx (n-1) * (V0x (n) -V1x (n-1)) ... "Expression 1"
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 process of determining “decrease” is performed in step S458. The difference between Sx (n−1), that is, the correction direction based on the correction position vector of the previous frame image, and V0x (n) −V1x (n−1), that is, the motion vector of the target frame image and the correction vector of the previous frame image. Compared with the moving direction of the image based on it, it is determined that the direction is increased when the directions are opposite, and the direction is decreased when the directions are the same.

次に、算出された比率RSと「増加」又は「減少」の判断情報から、ステップS460にて、減衰係数テーブルGKT2を用いて減衰係数K、Dの値を決定する処理を行う。減衰係数テーブルGKT2の一例を図9に示す。減衰係数テーブルはハードディスク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.

図9に示したように、第2の実施例では、減衰係数テーブルGKT2において、比率RSの値を、小数点第2位を四捨五入し0.1きざみの値とした。そして、減衰係数K、Dの値を、比率RSが大きい値になるに従って、前の値以下の小さい値になるよう設定した。さらに「増加」情報に対応する値を、「減少」情報に対応する値よりも小さい値に設定した。比率RSが同じ場合でも、増加と判断した場合は、補正方向と画像の移動方向とが逆方向であることから、減少と判断した場合よりも補正が補正限界値に達しやすいため、減衰係数K、Dを小さくして補正量を少なくするのである。もとより、比率RSの値はさらに細かいきざみ幅としたり、逆にもっと粗いきざみ幅としたりしてもよい。さらに、きざみ幅も同一でなく変化させたりしても差し支えない。   As shown in FIG. 9, in the second embodiment, 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.

図9に示した減衰係数テーブルGKT2は、減衰係数K、Dの具体的な数値設定の一例を示したものであり、減衰係数Kの値は0.9≦K≦1の範囲で、減衰係数Dの値は0.5≦D≦1の範囲で、RSの値に合わせて変更してもよい。このとき、RSの値が大きい値になるに従って、減衰係数K、Dの値は前の値以下の小さい値になるよう設定することが好ましい。RSの値が大きい場合は、RSの値が小さい場合よりも補正量が補正限界値に近いことになるため、減衰係数を小さくして補正量を少なくするのである。
「減衰係数決定方法の第3実施例」
次に、第3の実施例における減衰係数K、Dの決定処理の詳細を、図10に示した処理フローチャートを用いて説明する。第3の実施例での減衰係数K、Dの値の決定方法は、注目するフレーム画像の補正量を算出する際、時系列順で一つ前の補正フレーム画像の補正量で補正したとき、補正限界値まで何回補正可能かを調べて注目するフレーム画像の補正量を算出しようとするものである。なお、ここでも、注目するフレーム画像のX成分についての処理を説明するが、処理ステップS440ではY成分についても図10に示したX成分の処理と同様の処理を行い、X成分、Y成分それぞれについて減衰係数K、Dの値を決定する。そして、後述する次の処理ステップS490(図5)にて、補正位置ベクトルのX成分とY成分を所定の演算式にて算出する際に、それぞれ決定した減衰係数K、Dの値を用いるのである。
The attenuation coefficient table GKT2 shown in FIG. 9 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.
“Third embodiment of damping coefficient determination method”
Next, details of the determination processing of the attenuation coefficients K and D in the third embodiment will be described using the processing 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. 5) 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, respectively. is there.

ここでの処理が開始されると、まずステップS461にて補正限界値Sxmax(n−1)の入力処理を行う。具体的には、ステップS42で計算され、RAM102などのメモリに格納されたSmax(n−1)のX成分についての値をCPU103が読み出すことで行う。   When the process is started, the correction limit value Sxmax (n−1) is first input in step S461. Specifically, the CPU 103 reads the value of the X component of Smax (n−1) calculated in step S42 and stored in a memory such as the RAM 102.

ステップS461およびステップS466において、「n=1」つまり時系列順1番目のフレーム画像の場合、前フレーム画像が存在しない。この場合、補正限界値Sxmax(n−1)を0とする。   In step S461 and step S466, 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, the correction limit value Sxmax (n−1) is set to 0.

次にステップS462にて、注目するフレーム画像F(n)の動きベクトルV0(n)のX成分V0x(n)の抽出処理を行う。X成分V0x(n)はX方向の画素数で示され、図4に示したようにベクトルの向きが図面右方向であればプラス、左方向であればマイナスとなる。なお注目するフレーム画像F(n)の動きベクトルV0(n)のY成分V0y(n)については、図4に示したようにベクトルの向きが図面上方向であればプラス、下方向であればマイナスとなる。   In step S462, the X component V0x (n) of the motion vector V0 (n) of the frame image F (n) of interest is extracted. The X component V0x (n) is indicated by the number of pixels in the X direction. As shown in FIG. 4, the X component V0x (n) is positive if the vector direction is the right direction of the drawing and negative if the vector direction is the left direction. As for the Y component V0y (n) of the motion vector V0 (n) of the frame image F (n) of interest, as shown in FIG. Negative.

次に、ステップS463にて、注目するフレーム画像に対して時系列順で一つ前のフレーム画像の補正動きベクトルV1(n−1)のX成分V1x(n−1)の抽出処理を行う。もとより、前述したように、注目するフレーム画像が時系列順1番目のフレーム画像である場合は、V1x(n−1)は0である。   Next, in step S463, extraction processing of the X component V1x (n-1) of the corrected motion vector V1 (n-1) of the previous frame image in time series order with respect to the frame image of interest is performed. Of course, as described above, when the frame image of interest is the first frame image in time series order, V1x (n−1) is zero.

次に、ステップS464にて、注目するフレーム画像F(n)に対して時系列順で一つ前のフレーム画像の補正位置ベクトルS(n−1)のX成分Sx(n−1)の抽出処理を行う。ここで、前述したように、X成分Sx(n−1)は、画面左方向を正方向とする画素数で表される。もとよりY成分Sy(n−1)は、画面下方向を正とする画素数で表される。   Next, in step S464, the X component Sx (n-1) of the corrected position vector S (n-1) of the previous frame image in time series order with respect to the frame image F (n) of interest is extracted. Process. Here, as described above, the X component Sx (n−1) 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−1) is represented by the number of pixels with the screen lower direction being positive.

次に、ステップS465にて、「式2」よりベクトル差分値BSTの算出処理を行う。
BST=|V0x(n)−V1x(n−1)| …「式2」
次に、ステップS466にて、「式3」より補正残量値SZTの算出処理を行う。
SZT=Sxmax(n−1)−|Sx(n−1)| …「式3」
次に、ステップS467にて、「式4」より補正限界フレーム数Tの算出処理を行う。
T=SZT÷BST …「式4」
ステップS467にて算出された補正限界フレーム数Tの値から、ステップS468にて、減衰係数テーブルGKT3を用いて減衰係数K、Dの値を決定する。減衰係数テーブルGKT3の一例を図11に示す。減衰係数テーブルGKT3はハードディスク105などに格納され、補正限界フレーム数Tのデータから、CPU103は、減衰係数テーブルGKT3より該当するアドレスの値を読み出し、減衰係数K、Dの値を決定する。
Next, in step S465, the vector difference value BST is calculated from “Expression 2”.
BST = | V0x (n) −V1x (n−1) |
Next, in step S466, the correction remaining amount value SZT is calculated from “Expression 3”.
SZT = Sxmax (n−1) − | Sx (n−1) |
Next, in step S467, the correction limit frame number T is calculated from “Expression 4”.
T = SZT ÷ BST “Equation 4”
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.

図11に示した減衰係数テーブル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. 11, 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(図5)に戻り、所定の演算式を用いて注目するフレーム画像F(n)の補正位置ベクトルS(n)を算出する処理を行う。本実施形態では、所定の演算式として次の「式5」を用いる。   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. 5), and the frame image F ( The process of calculating the correction position vector S (n) of n) is performed. In the present embodiment, the following “Expression 5” is used as the predetermined arithmetic expression.

S(n)=K×S(n−1)+D×(V0(n)−V1(n−1)) …「式5」
注目するフレーム画像F(n)の補正位置ベクトルS(n)は、具体的には「式5」を用いて、X成分およびY成分についての補正位置ベクトルSx(n)およびSy(n)をそれぞれ算出することによって求められる。
S (n) = K * S (n-1) + D * (V0 (n) -V1 (n-1)) ... "Formula 5"
Specifically, the correction position vector S (n) of the focused frame image F (n) is obtained by using the “Expression 5” to calculate the correction position vectors Sx (n) and Sy (n) for the X component and the Y component. It is obtained by calculating each.

「式5」から明らかなように、注目するフレーム画像F(n)の動きベクトルV0(n)と、フレーム画像F(n−1)を補正した補正フレーム画像HFG(n−1)の補正動きベクトルV1(n−1)との差分を求め、この差分に減衰係数Dを乗じた値を補正位置ベクトルS(n)の算出に用いるため、補正後の注目するフレーム画像F(n)と前補正フレーム画像HFG(n−1)間について、画像の移動が滑らかになる確率が高くなる。   As apparent from “Expression 5”, the motion vector V0 (n) of the frame image F (n) of interest and the corrected motion of the corrected frame image HFG (n−1) obtained by correcting the frame image F (n−1). Since a difference from the vector V1 (n−1) is obtained and a value obtained by multiplying the difference by the attenuation coefficient D is used for calculation of the corrected position vector S (n), the corrected frame image F (n) and the previous frame image The probability that the movement of the image is smooth between the correction frame images HFG (n−1) increases.

また、「式5」による補正位置ベクトルの算出方法によれば、補正しようとするフレーム画像が、パンやチルトなど一定の画面移動速度で撮影された画像の場合、V0(n)が変数ではなく定数になることから、算出されるS(n)は一定値になりやすい。つまり、パンやチルトなど一定方向に連続した動きを有するフレーム画像の補正については、撮影された元々の画像の動きに対する追随性がよいという効果も合わせて奏することになる。   Also, according to the calculation method of the correction position vector according to “Expression 5”, when the frame image to be corrected is an image shot at a constant screen movement speed such as panning or tilting, V0 (n) is not a variable. Since it is a constant, the calculated S (n) tends to be a constant value. In other words, the correction of a frame image having a continuous movement in a certain direction such as panning and tilting also has an effect that the followability to the movement of the original image taken is good.

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

以上で、補正位置ベクトルの算出処理ルーチン(図2、ステップS40)を終了し、次にステップS42(図2)に進む。ステップS42では、補正限界値Smax(n)の算出処理を行う。補正限界値Smax(n)は、第n番目のフレーム画像の切り取り幅(サイズ)に対応する値である。   Thus, the correction position vector calculation processing routine (FIG. 2, step S40) is completed, and then the process proceeds to step S42 (FIG. 2). In step S42, a correction limit value Smax (n) is calculated. The correction limit value Smax (n) is a value corresponding to the cut width (size) of the nth frame image.

この際、補正位置算出部130にて、時系列順(n−1)番目のフレームの補正位置ベクトルS(n−1)と、時系列順(n−1)番目のフレームの補正限界値Smax(n−1)、時系列順(n−2)番目のフレームの補正限界値Smax(n−2)から、下記の「式6」を用いて、時系列順n番目のフレームの補正限界値Smax(n)を算出し、RAM102に保存する。
Smax(n)=Smax(n−1)+α×{Smax(n−1)−Smax(n−2)}−β×{Smax(n−1)−S(n−1)}
…「式6」
ここで、「n=1」(時系列順1番目のフレーム画像)の場合、Smax(n−1)およびSmax(n−2)を0とし、「n=2」(時系列順2番目のフレーム画像)の場合、Smax(n−2)を0とする。
「補正係数α」
補正係数αは1以下の正の定数で、Smax(n)を急に変化させず滑らかに変化させる効果がある。なお、経験的に、αの値は0.9≦α<1が好ましい。
「補正係数β」
βを定数とする場合
補正係数βは0.1以下の正の定数で、切り取り幅が補正フレームのシフト量より大きい場合は切り取り幅を小さくし、切り取り幅がシフト量より小さい場合には切り取り幅を大きくする効果がある。
At this time, the correction position calculation unit 130 corrects the correction position vector S (n−1) of the (n−1) th frame in time series and the correction limit value Smax of the (n−1) th frame in time series. (N-1) From the correction limit value Smax (n-2) of the (n-2) th frame in time series order, using the following "Expression 6", the correction limit value of the nth frame in time series order Smax (n) is calculated and stored in the RAM 102.
Smax (n) = Smax (n−1) + α × {Smax (n−1) −Smax (n−2)} − β × {Smax (n−1) −S (n−1)}
... "Formula 6"
Here, in the case of “n = 1” (first frame image in time series order), Smax (n−1) and Smax (n−2) are set to 0, and “n = 2” (second in time series order). In the case of a frame image), Smax (n−2) is set to 0.
"Correction coefficient α"
The correction coefficient α is a positive constant of 1 or less, and has an effect of smoothly changing Smax (n) without suddenly changing it. Empirically, the value of α is preferably 0.9 ≦ α <1.
"Correction coefficient β"
When β is a constant Correction coefficient β is a positive constant of 0.1 or less. If the cropping width is larger than the shift amount of the correction frame, the cropping width is reduced. If the cropping width is smaller than the shift amount, the cropping width is increased. There is an effect to.

このようにして、フレーム画像の切り取り幅(サイズ)に相当するSmax(n)が、フレーム画像のシフト量に相当する補正位置ベクトルS(n)の大きさに応じて変化するように構成できる。
βを変数とする場合
また、補正係数βの値は、0<β≦0.1の範囲内で、{Smax(n−1)−S(n−1)}または{Smax(n−1)−Smax(n−2)}の値に応じて変化させても良い。具体的には、0<β≦0.1の範囲内で、{Smax(n−1)−S(n−1)}の値が大きいほど補正係数βの値を小さくすることで、切り取り幅が補正フレームのシフト量より小さくなる確率を抑えることができる。または、0<β≦0.1の範囲内で、{Smax(n−1)−Smax(n−2)}の値が大きいほど補正係数βの値を小さくすることでSmax(n)が増加し易く減少し難くなり、切り取り幅が補正フレームのシフト量より小さくなる確率を抑えることができる。
In this manner, Smax (n) corresponding to the cutout width (size) of the frame image can be configured to change according to the magnitude of the correction position vector S (n) corresponding to the shift amount of the frame image.
When β is a variable, the value of the correction coefficient β is {Smax (n−1) −S (n−1)} or {Smax (n−1) −Smax within the range of 0 <β ≦ 0.1. You may change according to the value of (n-2)}. Specifically, within the range of 0 <β ≦ 0.1, the cut width is corrected by decreasing the value of the correction coefficient β as the value of {Smax (n−1) −S (n−1)} increases. The probability of becoming smaller than the frame shift amount can be suppressed. Alternatively, within the range of 0 <β ≦ 0.1, Smax (n) is likely to increase by decreasing the value of the correction coefficient β as the value of {Smax (n−1) −Smax (n−2)} increases. It is difficult to decrease, and the probability that the cut width becomes smaller than the shift amount of the correction frame can be suppressed.

このようにしても、フレーム画像の切り取り幅(サイズ)に相当するSmax(n)が、フレーム画像のシフト量に相当する補正位置ベクトルS(n)の大きさに応じて変化するように構成できる。   Even in this case, Smax (n) corresponding to the cut-out width (size) of the frame image can be configured to change according to the magnitude of the correction position vector S (n) corresponding to the shift amount of the frame image. .

さらに、補正限界値Smax(n)が無限に大きくならないように、Smax(n)の最大値Smax_maxを定めておき、「式6」の計算結果Smax(n)がSmax_maxより大きくなる場合には、Smax(n)=Smax_maxに修正する。   Further, a maximum value Smax_max of Smax (n) is determined so that the correction limit value Smax (n) does not become infinitely large, and when the calculation result Smax (n) of “Expression 6” is larger than Smax_max, It is corrected to Smax (n) = Smax_max.

図13に、補正前後のフレーム位置の軌跡と補正限界値Smax(n)で決まる補正可能な範囲との関係を示す。図13において、縦軸は各フレーム画像のX方向若しくはY方向の画面位置を示し、横軸は取得したフレーム画像の時系列順を表すフレーム画像数を示している。ちなみに横軸の左端はフレーム画像F(1)を示す。細い実線は補正前のフレーム画像のフレーム位置の軌跡を示し、太い実線は補正後の補正フレーム画像HFG(n)のフレーム位置の軌跡を示している。また、細い点線は補正できる範囲(補正限界値Smax(n))を示す。   FIG. 13 shows the relationship between the trajectory of the frame position before and after correction and the correctable range determined by the correction limit value Smax (n). In FIG. 13, the vertical axis indicates the screen position of each frame image in the X direction or Y direction, and the horizontal axis indicates the number of frame images representing the time-series order of the acquired frame images. Incidentally, the left end of the horizontal axis indicates the frame image F (1). The thin solid line indicates the trajectory of the frame position of the frame image before correction, and the thick solid line indicates the trajectory of the frame position of the corrected frame image HFG (n) after correction. A thin dotted line indicates a range that can be corrected (correction limit value Smax (n)).

図13に示すように、第n番目のフレーム画像の切り取り幅(サイズ)に相当するSmax(n)は、時間に寄らず通常一定値であるが、本発明の画像処理によれば、フレーム画像のシフト量に相当する補正位置ベクトルS(n)の大きさに応じて適応的に変化する。   As shown in FIG. 13, Smax (n) corresponding to the cut-out width (size) of the nth frame image is normally a constant value regardless of time, but according to the image processing of the present invention, the frame image Changes adaptively according to the magnitude of the correction position vector S (n) corresponding to the shift amount.

図13に示すように、補正前のフレーム位置が急激に変化している矢印Aの時点と、補正前のフレーム位置の変化量が比較的少ない矢印Bの時点とを比較すると、矢印Aの時点から矢印Bの時点に移行するにつれて、フレーム画像のシフト量に相当する補正位置ベクトルS(n)が小さくなり、これに伴いフレーム画像の切り取り幅(サイズ)に相当するSmax(n)が徐々に小さくなって行くことがわかる。すなわち、図13において、フレーム画像の切り取り幅(サイズ)に相当するSmax(n)が、フレーム画像のシフト量に相当する補正位置ベクトルS(n)の大きさに応じて適応的に変化することがわかる。   As shown in FIG. 13, when the time point of the arrow A where the frame position before the correction is rapidly changed is compared with the time point of the arrow B where the amount of change in the frame position before the correction is relatively small, the time point of the arrow A From the time point to the point of arrow B, the correction position vector S (n) corresponding to the shift amount of the frame image decreases, and Smax (n) corresponding to the cut-out width (size) of the frame image gradually increases accordingly. You can see that it gets smaller. That is, in FIG. 13, Smax (n) corresponding to the cutout width (size) of the frame image is adaptively changed according to the magnitude of the correction position vector S (n) corresponding to the shift amount of the frame image. I understand.

以上で、補正限界値Smax(n)の算出処理(図2、ステップS42)を終了し、次にステップS44(図2)に進む。ステップS44では、補正位置算出部130が、補正フレーム画像のサイズおよび拡大率の計算処理を行う。   This completes the correction limit value Smax (n) calculation process (FIG. 2, step S42), and then proceeds to step S44 (FIG. 2). In step S <b> 44, the correction position calculation unit 130 performs calculation processing for the size and enlargement ratio of the correction frame image.

ステップ44において、補正位置算出部130は、S42で求めた補正限界値Smax(n)から、下記の「式7」および「式8」を用いて補正フレーム画像HFG(n)の幅(サイズ)および拡大率を計算する。   In step 44, the correction position calculation unit 130 calculates the width (size) of the correction frame image HFG (n) from the correction limit value Smax (n) obtained in S42 using the following “Expression 7” and “Expression 8”. And calculate the magnification.

(HFG(n)の幅)=(フレーム画像の幅)−2×Smax(n) …「式7」
(HFG(n)に対する拡大率(%))=(フレーム画像の幅)/(HFG(n)の幅)×100 …「式8」
以上で、補正フレーム画像のサイズ(幅)および拡大率の計算処理(図2、ステップS44)を終了し、次にステップS50(図2)に進む。ステップS50では、補正フレーム画像生成部140が、補正フレーム画像HFG(n)の生成処理を行う。
(Width of HFG (n)) = (Width of frame image) −2 × Smax (n) ... “Expression 7”
(Magnification ratio (%) with respect to HFG (n)) = (width of frame image) / (width of HFG (n)) × 100 (Equation 8)
This completes the process of calculating the size (width) and magnification of the corrected frame image (FIG. 2, step S44), and then proceeds to step S50 (FIG. 2). In step S50, the correction frame image generation unit 140 performs a generation process of the correction frame image HFG (n).

ステップS50において、補正フレーム画像生成部140は、補正フレーム画像生成部にて、フレーム画像からステップS44の「式7」で求めたサイズで、ステップS40で求めた補正位置ベクトルS(n)だけ中央からシフトさせた画像を切り取り、これを補正フレーム画像HFG(n)として出力する。但し、補正位置ベクトルS(n)が、ステップS42で求めた補正限界値Smax(n)よりも大きい場合は、Smax(n)だけシフトさせる。   In step S50, the correction frame image generation unit 140 uses the correction frame image generation unit to calculate the center of the frame image by the correction position vector S (n) obtained in step S40 with the size obtained in “expression 7” in step S44. The image shifted from is cut out and output as a corrected frame image HFG (n). However, when the correction position vector S (n) is larger than the correction limit value Smax (n) obtained in step S42, the correction position vector S (n) is shifted by Smax (n).

図12に、n=3のときフレーム画像F(3)から、ステップS44の「式7」で求めたサイズで、所定の画像を切り取って生成される補正フレーム画像HFG(3)の例を示した。図12の上側に、補正がされない場合つまり補正量が0である場合において所定の画像となるフレーム画像FK(3)を破線で示した。そして、図12の下側に、ステップS40にて算出された補正位置ベクトルS(3)に従って、X方向にSx(3)、Y方向にSy(3)だけ画面位置を補正して切り取った補正フレーム画像HFG(3)を示した。このように、画面位置を補正することによって、フレーム画像について画像の移動量が抑えられることになる。   FIG. 12 shows an example of a corrected frame image HFG (3) generated by cutting out a predetermined image from the frame image F (3) when n = 3 and having the size calculated by “Expression 7” in step S44. It was. On the upper side of FIG. 12, a frame image FK (3) that is 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. 12, in accordance with the correction position vector S (3) calculated in step S40, correction is performed by correcting the screen position by Sx (3) in the X direction and Sy (3) in the Y direction. A frame image HFG (3) is shown. Thus, by correcting the screen position, the amount of movement of the image with respect to the frame image can be suppressed.

次にステップS60にて、補正動きベクトル算出部150は、生成された補正フレーム画像HFG(n)について補正動きベクトルV1(n)の算出処理を行う。前述したように、ここで算出した補正動きベクトルは時系列順で一つ後のフレーム画像の補正動きベクトルを算出するため、次のステップS40で用いられる。もとより、補正動きベクトルはX成分V1x(n)とY成分V1y(n)のベクトルとして算出する。   Next, in step S60, the corrected motion vector calculation unit 150 performs a process of calculating a corrected motion vector V1 (n) for the generated corrected frame image HFG (n). As described above, the corrected motion vector calculated here is used in the next step S40 in order to calculate the corrected motion vector of the next frame image in time series order. Of course, the corrected motion vector is calculated as a vector of the X component V1x (n) and the Y component V1y (n).

次に、ステップ65にて、補正フレーム画像生成部140は、S44の「式8」で求めた拡大率に応じて、補正フレーム画像HFG(n)を拡大する。この処理は必ずしも当該画像処理装置内で行わなくてもよい。その場合は、ステップS70において画像表示装置に拡大前の補正フレーム画像HFG(n)とその拡大率を出力し、補正フレーム画像HFG(n)の拡大は画像表示装置で行う。   Next, in step 65, the correction frame image generation unit 140 enlarges the correction frame image HFG (n) according to the enlargement ratio obtained in “Expression 8” of S44. This process does not necessarily have to be performed within the image processing apparatus. In that case, in step S70, the corrected frame image HFG (n) and its enlargement ratio are output to the image display device, and the correction frame image HFG (n) is enlarged by the image display device.

次に、ステップS70にて、補正フレーム画像HFG(n)の出力処理を行う。本実施形態では、生成された補正フレーム画像HFG(n)を、出力I/F106(図1)によってビデオプロジェクタ300などの画像表示装置が必要とする画像信号に変換し、補正フレーム画像を生成する毎に直ちに出力するものとする。こうすれば、補正対象となるフレーム画像の取得後から補正フレーム画像の出力までの時間が短くなり、補正をリアルタイムでおこなえる可能性がある。もとより、補正フレーム画像HFG(n)の出力先をRAM102やハードディスク105などに設けられた所定の画像ファイルとし、生成した一連の複数の補正フレーム画像を格納することとしてもよい。   Next, in step S70, the corrected frame image HFG (n) is output. In the present embodiment, the generated corrected frame image HFG (n) 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) to generate a corrected frame image. Every time it is output immediately. By doing this, the time from acquisition of the frame image to be corrected to the output of the corrected frame image is shortened, and there is a possibility that correction can be performed in real time. Of course, the output destination of the correction frame image HFG (n) may be a predetermined image file provided in the RAM 102 or the hard disk 105, and a series of a plurality of generated correction frame images may be stored.

以上でフレーム画像F(n)についての処理を終了し、ステップS80にてnを更新処理する。そして、ステップS10に戻り、時系列順で一つ後のフレーム画像を新たにフレーム画像F(n)として以降の処理を繰り返し、取得される全てのフレーム画像について補正フレーム画像を出力するのである。   Thus, the process for the frame image F (n) is completed, and n is updated in step S80. Then, the process returns to step S10, and the subsequent processing is repeated with the next frame image as a new frame image F (n) in chronological order, and the corrected frame images are output for all the acquired frame images.

上記本発明の一実施形態による画像処理装置によれば、フレーム画像の切り取り幅(サイズ)に相当するSmax(n)が、フレーム画像のシフト量に相当する補正位置ベクトルS(n)の大きさに応じて適応的に変化する。このように、フレーム画像の切り取りサイズを連続的に変化させることで、通常表示(Smax(n)=0の状態)と補正表示(0<Smax(n)≦Smax_maxの状態)とを徐々に切り替えることができる。   According to the image processing apparatus of the embodiment of the present invention, Smax (n) corresponding to the cut-out width (size) of the frame image is the magnitude of the correction position vector S (n) corresponding to the shift amount of the frame image. It will change adaptively according to. In this way, by continuously changing the cropping size of the frame image, the normal display (state of Smax (n) = 0) and the correction display (state of 0 <Smax (n) ≦ Smax_max) are gradually switched. be able to.

以上、本発明の一実施形態を説明したが、本発明はこうした実施の形態に何ら限定されるものではなく、本発明の趣旨を逸脱しない範囲内において様々な形態で実施し得ることは勿論である。   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 movement vector of the frame image F (n) acquired from the moving image. If the screen position data exists as metadata of the frame image by means of detecting the amount of movement, such as a speed sensor or acceleration sensor, when moving images are taken, the screen position data is used to move 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)また前記実施形態では、生成される補正フレーム画像の画面サイズは、取得したフレーム画像の画面サイズに対して、横方向で2×Sxmax(n)、縦方向で2×Symax(n)分小さい画像であったが、本変形例では補正フレーム画像の生成処理に際して、取得したフレーム画像と同じ画面サイズに拡大処理した画像としてもよい。こうすれば、補正フレーム画像による動画像は、補正前の元の動画像と同じ画面サイズになり、鑑賞者は同じ画面サイズの動画像を楽しむことができる。   (Modification 2) In the embodiment, the screen size of the generated correction frame image is 2 × Sxmax (n) in the horizontal direction and 2 × Symax (in the vertical direction with respect to the screen size of the acquired frame image. Although the image is smaller by n), in this modification, an image that has been enlarged to the same screen size as the acquired frame image may be used in the generation process of the corrected frame image. In this way, the moving image based on the corrected frame image has the same screen size as the original moving image before correction, and the viewer can enjoy the moving image having the same screen size.

画面の拡大は、補正フレーム画像の画素数をフレーム画像の画素数と同じにすることで行う。画像を構成する画素数の増加は、画素の補間処理によって実現することができる。補間処理は、バイ・リニア法のほか、バイ・キュービック法、ニアレストネイバ法など、周知の手法を用いればよい。   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 may use a known method such as the bi-cubic method or the nearest neighbor method.

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

(変形例4)また、前記実施形態における画像処理装置は、フレーム画像を構成する所定枚数のフィールド画像全てからフレーム画像を取得し、この取得したフレーム画像について所定の画像を切り取る位置を補正するものとしたが、これに限定せず、フレーム画像がN枚(Nは2以上の整数)のフィールド画像によって構成されている場合、これらN枚のフィールド画像のうち、1枚からN−1枚までのうち任意の枚数のフィールド画像から得られる画像をフレーム画像として、所定の画像を切り取る位置を補正するものとしても差し支えない。   (Modification 4) Further, the image processing apparatus according to the above embodiment acquires a frame image from all the predetermined number of field images constituting the frame image, and corrects a position where the predetermined image is cut out from the acquired frame image. 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 a 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. 画像処理装置の処理を説明するフローチャートである。It is a flowchart explaining the process of an image processing apparatus. フレーム画像の動きベクトルを説明するための説明図である。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. 補正前後のフレーム位置の軌跡と補正限界値Smax(n)で決まる補正可能な範囲との関係を示す図である。It is a figure which shows the relationship between the locus | trajectory of the frame position before and behind correction | amendment, and the correctable range determined by correction | amendment limit value Smax (n).

符号の説明Explanation of symbols

100…コンピュータ、101…入力I/F、102…RAM、103…CPU、104…ROM、105…ハードディスク、106…出力I/F、107…バスライン、110…フレーム画像取得部、120…動きベクトル算出部、130…補正位置算出部、140…補正フレーム画像生成部、150…補正動きベクトル算出部、160…画像出力部、200…ビデオカメラ、210…DVDプレーヤ、300…プロジェクタ、310…ディスプレイ、F(n)…フレーム画像、FK(n)…フレーム画像、HFG(1)…補正フレーム画像、Smax(n)…補正限界値、Sxmax(n)…補正限界値のX成分、Symax(n)…補正限界値の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 acquisition part, 120 ... Motion vector Calculation unit 130 ... correction position calculation unit 140 ... correction frame image generation unit 150 ... correction motion vector calculation unit 160 ... image output unit 200 ... video camera 210 ... DVD player 300 ... projector 310 ... display F (n) ... frame image, FK (n) ... frame image, HFG (1) ... corrected frame image, Smax (n) ... correction limit value, Sxmax (n) ... X component of correction limit value, Symax (n) ... Y component of correction limit value, V0 (n) ... motion vector, V1 (n) ... correction motion vector, S (n) ... correction position base Torr, Sx (n) ... X component of the corrected position vector, Sy (n) ... Y component of the corrected position vector, K ... damping coefficient, D ... attenuation coefficient, GKT1~3 ... damping coefficient table.

Claims (13)

動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成する画像処理装置であって、
時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得部と、
前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出部と、
前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出部と、
を備え、
前記補正位置算出部が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出部をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化する、画像処理装置。
An image processing apparatus that acquires a fixed amount of an image from a moving image or a time-series continuous still image, and generates a corrected image by cutting out a predetermined image for the acquired fixed amount of image,
For each fixed amount of images in time series, an image acquisition unit that sequentially acquires the fixed amount of images,
A motion vector calculation that calculates a motion vector of a certain amount of image of interest among the certain amount of images acquired sequentially using a certain amount of image immediately before the certain amount of image in time series. And
A correction position calculation unit that calculates a correction position vector indicating a position to cut out the predetermined image for the fixed amount of image of interest;
With
The correction position calculation unit further includes a correction limit value calculation unit that calculates a correction limit value corresponding to a size for cutting out the predetermined image, and the correction limit value changes according to the magnitude of the correction position vector. Image processing device.
請求項1に記載の画像処理装置であって、
前記補正限界値算出部は、前記所定の画像を切り取るサイズが前記補正位置ベクトルの大きさよりも大きい場合には前記所定の画像を切り取るサイズを小さくし、前記所定の画像を切り取るサイズが前記補正位置ベクトルの大きさよりも小さい場合には前記所定の画像を切り取るサイズを大きくする、画像処理装置。
The image processing apparatus according to claim 1,
The correction limit value calculating unit reduces the size of cutting out the predetermined image when the size of cutting out the predetermined image is larger than the size of the correction position vector, and the size of cutting out the predetermined image is the correction position. An image processing apparatus for increasing a size for cutting out the predetermined image when the size is smaller than a vector.
請求項1に記載の画像処理装置であって、
前記補正限界値算出部は、前記補正限界値Smax(n)の算出において、
Smax(n)=Smax(n−1)+α×{Smax(n−1)−Smax(n−2)}−β×{Smax(n−1)−S(n−1)}
Smax(n−1):時系列順(n−1)番目の一定量の画像についての補正限界値
Smax(n−2):時系列順(n−2)番目の一定量の画像についての補正限界値
S(n−1):時系列順(n−1)番目の一定量の画像についての補正位置ベクトル
α:1以下の正の補正係数
β:0.1以下の正の補正係数
で示される演算式を用いる、画像処理装置。
The image processing apparatus according to claim 1,
The correction limit value calculation unit calculates the correction limit value Smax (n).
Smax (n) = Smax (n−1) + α × {Smax (n−1) −Smax (n−2)} − β × {Smax (n−1) −S (n−1)}
Smax (n-1): correction limit value for a fixed amount image in the time series (n-1) th order Smax (n-2): correction for a fixed amount image in the time series order (n-2) Limit value
S (n-1): correction position vector α for a fixed amount of images in time-series order (n−1): α: positive correction coefficient β: 1 or less positive calculation: positive correction coefficient 0.1 or less An image processing apparatus using a formula.
請求項3に記載の画像処理装置であって、
αは、0.9≦α<1の定数である、画像処理装置。
The image processing apparatus according to claim 3,
α is an image processing apparatus in which 0.9 ≦ α <1.
請求項3または4に記載の画像処理装置であって、
βは、0<β≦0.1の定数である、画像処理装置。
The image processing apparatus according to claim 3, wherein:
β is an image processing apparatus in which 0 <β ≦ 0.1.
請求項3または4に記載の画像処理装置であって、
{Smax(n−1)−S(n−1)}の値が大きいほどβの値を小さくする、画像処理装置。
The image processing apparatus according to claim 3, wherein:
An image processing apparatus that decreases the value of β as the value of {Smax (n−1) −S (n−1)} increases.
請求項3または4に記載の画像処理装置であって、
{Smax(n−1)−Smax(n−2)}の値が大きいほどβの値を小さくする、画像処理装置。
The image processing apparatus according to claim 3, wherein:
An image processing apparatus that decreases the value of β as the value of {Smax (n−1) −Smax (n−2)} increases.
請求項3乃至7のいずれか一項に記載の画像処理装置であって、
前記算出された補正位置ベクトルに基づいて、前記取得された一定量の画像についての補正画像を生成する補正画像生成部をさらに備え、
前記補正位置算出部が、前記補正限界値Smax(n)に基づいて補正画像のサイズおよび補正画像の拡大率を算出し、
前記補正画像生成部が、算出された補正画像のサイズおよび補正画像の拡大率に基づいて、前記所定の画像を切り取って補正画像を生成する、画像処理装置。
An image processing apparatus according to any one of claims 3 to 7,
A correction image generating unit that generates a correction image for the acquired fixed amount of image based on the calculated correction position vector;
The correction position calculation unit calculates the size of the correction image and the enlargement ratio of the correction image based on the correction limit value Smax (n),
The image processing device, wherein the correction image generation unit generates a correction image by cutting out the predetermined image based on the calculated size of the correction image and the magnification of the correction image.
動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成して表示する画像表示装置であって、
時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得部と、
前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出部と、
前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出部と、
を備え、
前記補正位置算出部が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出部をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化する、画像表示装置。
An image display device that acquires a fixed amount of an image from a moving image or a time-series continuous still image, and generates a corrected image by cutting out a predetermined image for the acquired fixed amount of image, and displays the corrected image.
For each fixed amount of images in time series, an image acquisition unit that sequentially acquires the fixed amount of images,
A motion vector calculation that calculates a motion vector of a certain amount of image of interest among the certain amount of images acquired sequentially using a certain amount of image immediately before the certain amount of image in time series. And
A correction position calculation unit that calculates a correction position vector indicating a position to cut out the predetermined image for the fixed amount of image of interest;
With
The correction position calculation unit further includes a correction limit value calculation unit that calculates a correction limit value corresponding to a size for cutting out the predetermined image, and the correction limit value changes according to the magnitude of the correction position vector. Image display device.
動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成する画像撮像装置であって、
時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得部と、
前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出部と、
前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出部と、
を備え、
前記補正位置算出部が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出部をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化する、画像撮像装置。
An image capturing apparatus that acquires a fixed amount of an image from a moving image or a time-series continuous still image, and generates a corrected image by cutting out a predetermined image for the acquired fixed amount of image,
For each fixed amount of images in time series, an image acquisition unit that sequentially acquires the fixed amount of images,
A motion vector calculation that calculates a motion vector of a certain amount of image of interest among the certain amount of images acquired sequentially using a certain amount of image immediately before the certain amount of image in time series. And
A correction position calculation unit that calculates a correction position vector indicating a position to cut out the predetermined image for the fixed amount of image of interest;
With
The correction position calculation unit further includes a correction limit value calculation unit that calculates a correction limit value corresponding to a size for cutting out the predetermined image, and the correction limit value changes according to the magnitude of the correction position vector. Imaging device.
動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成する画像処理方法であって、
時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得工程と、
前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出工程と、
前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出工程と、
を備え、
前記補正位置算出工程が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出工程をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化する、画像処理方法。
An image processing method for acquiring a fixed amount of an image from a moving image or a still image continuous in time series, and cutting out a predetermined image and generating a corrected image for the acquired fixed amount of image,
For each fixed amount of images in chronological order, an image acquisition step of sequentially acquiring the fixed amount of images,
A motion vector calculation that calculates a motion vector of a certain amount of image of interest among the certain amount of images acquired sequentially using a certain amount of image immediately before the certain amount of image in time series. Process,
A correction position calculation step of calculating a correction position vector indicating a position to cut out the predetermined image for the fixed amount of image of interest;
With
The correction position calculating step further includes a correction limit value calculating step for calculating a correction limit value corresponding to a size for cutting out the predetermined image, and the correction limit value changes according to the magnitude of the correction position vector. Image processing method.
動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成する処理をコンピュータに実行させるためのプログラムであって、
時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得処理と、
前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出処理と、
前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出処理と、
を備え、
前記補正位置算出処理が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出処理をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化する、プログラム。
A program for causing a computer to execute a process of acquiring a fixed amount of an image from a moving image or a still image continuous in time series, and cutting out a predetermined image and generating a corrected image for the acquired fixed amount of image. And
For each fixed amount of images in chronological order, an image acquisition process for sequentially acquiring the fixed amount of images,
A motion vector calculation that calculates a motion vector of a certain amount of image of interest among the certain amount of images acquired sequentially using a certain amount of image immediately before the certain amount of image in time series. Processing,
A correction position calculation process for calculating a correction position vector indicating a position to cut out the predetermined image for the fixed amount of image of interest;
With
The correction position calculation process further includes a correction limit value calculation process for calculating a correction limit value corresponding to a size for cutting out the predetermined image, and the correction limit value changes according to the magnitude of the correction position vector. program.
動画像または時系列に連続する静止画像から一定量の画像を取得し、該取得した一定量の画像について、所定の画像を切り取って補正画像を生成する処理をコンピュータに実行させるためのプログラムを記録したコンピュータによって読取可能な記録媒体であって、
時系列順に一定量の画像毎に、当該一定量の画像を順次取得する画像取得処理と、
前記順次取得した一定量の画像のうち、注目する一定量の画像の動きベクトルを、当該注目する一定量の画像より時系列順で一つ前の一定量の画像を用いて算出する動きベクトル算出処理と、
前記注目する一定量の画像について、前記所定の画像を切り取る位置を示す補正位置ベクトルを算出する補正位置算出処理と、
を備え、
前記補正位置算出処理が、前記所定の画像を切り取るサイズに相当する補正限界値を算出する補正限界値算出処理をさらに備え、当該補正限界値が前記補正位置ベクトルの大きさに応じて変化する、プログラムを記録したコンピュータによって読取可能な記録媒体。
A program for causing a computer to execute a process of acquiring a fixed amount of an image from a moving image or a time-series continuous still image and cutting out the predetermined image and generating a corrected image for the acquired fixed amount of image is recorded. A computer-readable recording medium,
For each fixed amount of images in chronological order, an image acquisition process for sequentially acquiring the fixed amount of images,
A motion vector calculation that calculates a motion vector of a certain amount of image of interest among the certain amount of images acquired sequentially using a certain amount of image immediately before the certain amount of image in time series. Processing,
A correction position calculation process for calculating a correction position vector indicating a position to cut out the predetermined image for the fixed amount of image of interest;
With
The correction position calculation process further includes a correction limit value calculation process for calculating a correction limit value corresponding to a size for cutting out the predetermined image, and the correction limit value changes according to the magnitude of the correction position vector. A recording medium readable by a computer on which a program is recorded.
JP2005045277A 2005-02-22 2005-02-22 Image processor, image display device, image pickup device, image processing method, program and recording medium Withdrawn JP2006235689A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005045277A JP2006235689A (en) 2005-02-22 2005-02-22 Image processor, image display device, image pickup device, image processing method, program and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005045277A JP2006235689A (en) 2005-02-22 2005-02-22 Image processor, image display device, image pickup device, image processing method, program and recording medium

Publications (1)

Publication Number Publication Date
JP2006235689A true JP2006235689A (en) 2006-09-07

Family

ID=37043307

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005045277A Withdrawn JP2006235689A (en) 2005-02-22 2005-02-22 Image processor, image display device, image pickup device, image processing method, program and recording medium

Country Status (1)

Country Link
JP (1) JP2006235689A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015505447A (en) * 2012-01-16 2015-02-19 グーグル・インコーポレーテッド Method and system for processing video for image stabilization using dynamic cropping

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015505447A (en) * 2012-01-16 2015-02-19 グーグル・インコーポレーテッド Method and system for processing video for image stabilization using dynamic cropping
US9554043B2 (en) 2012-01-16 2017-01-24 Google Inc. Methods and systems for processing a video for stabilization using dynamic crop

Similar Documents

Publication Publication Date Title
JP4947060B2 (en) Image composition apparatus, image composition method, and program
US8072511B2 (en) Noise reduction processing apparatus, noise reduction processing method, and image sensing apparatus
US9225901B2 (en) Image capturing apparatus, control method thereof, and storage medium
US20090096879A1 (en) Image capturing apparatus and image capturing method
JP4674620B2 (en) Image processing apparatus, image processing method, and program
JP2010258710A (en) Motion vector detection apparatus, method for controlling the same, and image capturing apparatus
JP2009212899A (en) Imaging device
US8731328B2 (en) Image processing apparatus, method and recording medium for generating a composite image
US10482580B2 (en) Image processing apparatus, image processing method, and program
JP5553109B2 (en) Image processing apparatus and image processing program
JP4482933B2 (en) Motion vector detection device, image display device, image imaging device, motion vector detection method, program, and recording medium
JP6282133B2 (en) Imaging device, control method thereof, and control program
WO2017104102A1 (en) Imaging device
JP5300413B2 (en) Motion vector detection device, motion vector detection method, imaging device, and program
JP5015089B2 (en) Frame rate conversion device, frame rate conversion method, television receiver, frame rate conversion program, and recording medium recording the program
JP2007028251A (en) Image processing apparatus, image processing method, program, and recording medium
JP2006235689A (en) Image processor, image display device, image pickup device, image processing method, program and recording medium
JP2006285655A (en) Image processor, image processing method and image processing program
JP2003219246A (en) Electronic camera and electronic camera system
EP3836540B1 (en) Image processing apparatus and image capturing apparatus
JP2006186762A (en) Apparatus, method, and program for image processing
JP2015111764A (en) Image processing apparatus, imaging apparatus, and control method
US9854166B2 (en) Image pickup apparatus and method of controlling the same, and reproduction apparatus and method of controlling the same
JP2006246270A (en) Image processing apparatus, image displaying apparatus, image imaging apparatus, image processing method, program and recording medium
JP6708490B2 (en) Image processing method and image processing apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071217

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20100112