JP2005301984A - System and method for image processing, program, and recording medium - Google Patents
System and method for image processing, program, and recording medium Download PDFInfo
- Publication number
- JP2005301984A JP2005301984A JP2005000622A JP2005000622A JP2005301984A JP 2005301984 A JP2005301984 A JP 2005301984A JP 2005000622 A JP2005000622 A JP 2005000622A JP 2005000622 A JP2005000622 A JP 2005000622A JP 2005301984 A JP2005301984 A JP 2005301984A
- Authority
- JP
- Japan
- Prior art keywords
- value
- unit
- motion vector
- image
- pixel
- 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.)
- Granted
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、画像処理装置および方法、プログラム並びに記録媒体に関し、特に、画像の中で移動するオブジェクトを発見しやすく表示できるようにし、その発見の際に、簡単かつ確実に動きベクトルの確度を算出することができるようにする画像処理装置および方法、プログラム並びに記録媒体に関する。 The present invention relates to an image processing apparatus and method, a program, and a recording medium, and in particular, enables an object that moves in an image to be easily displayed, and calculates the accuracy of a motion vector easily and reliably at the time of discovery. The present invention relates to an image processing apparatus and method, a program, and a recording medium.
ホームセキュリティシステムでは、撮像装置から送信される監視画像がモニタTV(Television)に表示される。このようなシステムにおいて、マイクロ波センサと画像センサを組み合わせて監視装置を構成し、侵入者の監視の精度を向上させる方法が提案されている(例えば、特許文献1参照)。 In the home security system, a monitoring image transmitted from the imaging device is displayed on a monitor TV (Television). In such a system, a method has been proposed in which a monitoring device is configured by combining a microwave sensor and an image sensor to improve the accuracy of intruder monitoring (see, for example, Patent Document 1).
また、動画像として表示される画像の中で、移動する(動く)物体を追尾対象とし、その追尾点を、自動的に追尾して画像を表示する方法も提案されている(例えば、特許文献2参照)。 In addition, a method has been proposed in which a moving (moving) object is a tracking target in an image displayed as a moving image, and the tracking point is automatically tracked to display an image (for example, Patent Documents). 2).
ところで、画像圧縮する場合、異なるフレーム間の動きベクトルを求め、この動きベクトルを利用して圧縮処理が行われる。この動きベクトルは、上記した所定の物体を追尾するときなどの処理にも求められることが多い。 By the way, when compressing an image, a motion vector between different frames is obtained, and compression processing is performed using this motion vector. This motion vector is often required for processing such as when tracking a predetermined object.
動きベクトルを求める方法としては、連続するフレーム間の所定の大きさの画素ブロックごとの処理を基本としたブロックマッチング法や、各画素における明るさの空間的勾配と時間的勾配の間の関係を用いる勾配法等の種々の方法がある。 As a method for obtaining a motion vector, a block matching method based on a process for each pixel block having a predetermined size between consecutive frames, and a relationship between a spatial gradient of brightness and a temporal gradient in each pixel. There are various methods such as a gradient method to be used.
例えば、ブロックマッチング法により動きベクトルを求める場合には、一方のフレームの画像上のブロックに最も良く一致する位置が、他方のフレームの画像上において一意に決定されなければならない。 For example, when the motion vector is obtained by the block matching method, the position that best matches the block on the image of one frame must be uniquely determined on the image of the other frame.
しかし、ブロックマッチング法では、輝度差の少ないブロックの場合、誤ったブロックに対するマッチングが行われてしまうという課題があった。そこで、誤ったブロックマッチング処理による動きベクトルを検出しないために、動きベクトルの確度を求める方法が種々提案されている。 However, in the block matching method, there is a problem that matching is performed on an incorrect block in the case of a block having a small luminance difference. Therefore, various methods for obtaining the accuracy of motion vectors have been proposed in order to prevent detection of motion vectors due to erroneous block matching processing.
例えば、特許文献3には、設定したブロック領域内において、画像の複雑さを表す特徴量を算出し、その特徴量が閾値より小さい場合、動きベクトルの信頼性がないと判定することが提案されている。特許文献4には、設定されたブロック領域内において、分散値を算出し、その値が閾値より小さい場合に動きベクトルの信頼性がないと判定することが提案されている。これらは、いずれも共通して、誤ったブロックマッチング処理により検出される動きベクトルを用いないようにするための指標であった。
For example,
また、非特許文献1には、動きベクトルの信頼性を複雑な数式を用いることで評価することが提案されている。
しかしながら、従来の技術では、例えば、不正な侵入者など、画像の中で動く物体(オブジェクト)を検知して、追尾しても、ユーザに対して表示される画像の中で、どの部分が、注目すべきオブジェクトであるのかを明確に表示することができず、その結果、ユーザが注目すべきオブジェクトを発見するのに時間がかかるおそれがあるという課題があった。 However, in the conventional technology, even if an object (object) that moves in an image, such as an unauthorized intruder, is detected and tracked, which part of the image displayed to the user is There is a problem in that it is not possible to clearly display whether the object is a notable object, and as a result, it may take time for the user to find the notable object.
また、特許文献3と特許文献4の技術では、画像の複雑さを表す特徴量のみを参照することで閾値判定が行われている。その結果、各ブロック毎の動きベクトル決定時の評価値(2枚のフレームの画像のブロックの差分絶対値和)自体が大きいので、動きベクトルの信頼性が低いと判定されるべきブロックであっても、画像の複雑さを表す特徴量に信頼性があるために、誤った動きベクトルが検出されてしまうことがあった。また、評価値自体はある程度小さく、本来は信頼性がないと判定されるべきブロックであっても、画像の複雑さを表す特徴量がわずかな差で信頼性があると判定されることで、誤ったブロックマッチングを行ってしまうことがあった。従って、単純な閾値による判定では、誤った判定を行う可能性があるという課題があった。
Further, in the techniques of
また、特許文献3と特許文献4の技術では、信頼性があるか否かは判定されるが、信頼性がある場合に、どのくらい信頼できるのかという程度が不明であるという課題があった。
Further, in the techniques of
さらに、非特許文献1の技術は、信頼性の程度を数値として表現するが、動画像中の動きは小さく、平行移動のみという仮定を含んでいるために、実用性に乏しいという課題があった。また、複雑な数式を解くことにより算出されるために、ハードウェアを作る場合、処理が重く、また、規模が大きくなり、コストも高くなってしまうという課題があった。
Furthermore, although the technique of Non-Patent
本発明はこのような状況に鑑みてなされたものであり、画像の中で移動するオブジェクトを発見しやすく表示できるようにするものである。また本発明は、信頼性の高い動きベクトルの確度を数値として表現可能にし、ハードウェアを作成する場合においても、低規模、低コストにすることができるようにするものである。 The present invention has been made in view of such a situation, and makes it possible to easily display a moving object in an image and display it. In addition, the present invention makes it possible to represent the accuracy of a highly reliable motion vector as a numerical value, and to reduce the scale and cost even when creating hardware.
本発明の画像処理装置は、第1の処理単位上の少なくとも1つ以上の画素である注目画素と、第1の処理単位と異なる第2の処理単位上の少なくとも1つ以上の画素であって、注目画素の動きベクトルに基づいて規定される対応画素との相関を表す評価値を算出する評価値算出手段と、注目画素を基準とする画素値の変動を表す変動値を算出する変動値算出手段と、評価値と変動値に基づいて、動きベクトルの確度を演算する確度演算手段とを備えることを特徴とする。 The image processing apparatus of the present invention includes a target pixel that is at least one or more pixels on a first processing unit, and at least one or more pixels on a second processing unit that is different from the first processing unit. Evaluation value calculation means for calculating an evaluation value representing a correlation with a corresponding pixel defined based on a motion vector of the target pixel, and a variation value calculation for calculating a variation value representing a variation of the pixel value with respect to the target pixel And means for calculating the accuracy of the motion vector based on the evaluation value and the fluctuation value.
注目画素の画素数と対応画素数の画素数は同じであるようにすることができる。 The number of pixels of the target pixel and the number of corresponding pixels can be made the same.
変動値は、分散値、またはダイナミックレンジであるようにすることができる。 The variation value can be a variance value or a dynamic range.
変動値は、画素値の空間方向の変動を表す値であるようにすることができる。 The variation value can be a value representing variation in the spatial direction of the pixel value.
処理単位は、フレームまたはフィールドであるようにすることができる。 The processing unit can be a frame or a field.
確度演算手段は、評価値を変動値で正規化した値に基づいて動きベクトルの確度を演算するようにすることができる。 The accuracy calculation means can calculate the accuracy of the motion vector based on a value obtained by normalizing the evaluation value with the variation value.
確度演算手段は、変動値が所定の閾値よりも大きい場合には、評価値を変動値で正規化した値を動きベクトルの確度とし、変動値が閾値よりも小さい場合には、動きベクトルの確度が低いことを表す固定値を選択するようにすることができる。 When the variation value is larger than the predetermined threshold, the accuracy calculation means uses the value obtained by normalizing the evaluation value with the variation value as the accuracy of the motion vector, and when the variation value is smaller than the threshold, the accuracy of the motion vector It is possible to select a fixed value representing that the value is low.
評価値算出手段は、注目画素を含むブロックと、対応画素を含むブロックの画素の差分の絶対値の総和として評価値を演算するようにすることができる。 The evaluation value calculation means can calculate the evaluation value as the sum of absolute values of differences between the pixels including the target pixel and the blocks including the corresponding pixel.
変動値算出手段は、注目画素を含むブロックにおいて、注目画素とそれに隣接する隣接画素との差分の絶対値の総和を隣接画素の数で除算して得られた値の、ブロック内の総和として変動値を演算するようにすることができる。 The variation value calculation means varies in the block including the target pixel as a sum in the block of values obtained by dividing the sum of absolute values of differences between the target pixel and the adjacent pixels adjacent thereto by the number of adjacent pixels. The value can be calculated.
確度演算手段は、変動値を第1の基準値と比較する比較手段と、第2の基準値と、評価値を変動値で正規化した値との差を演算する差演算手段と、比較手段による比較結果と、差演算手段により演算された差に基づいて、動きベクトルの確度を演算し、出力する出力手段と設けるようにすることができる。 The accuracy calculation means includes a comparison means for comparing the fluctuation value with the first reference value, a difference calculation means for calculating a difference between the second reference value and a value obtained by normalizing the evaluation value with the fluctuation value, and a comparison means. It is possible to provide an output means for calculating and outputting the accuracy of the motion vector based on the comparison result obtained by the above and the difference calculated by the difference calculating means.
入力画像から動きベクトルを検出し、評価値算出手段に供給する動きベクトル検出手段と、動きベクトル検出手段により検出された動きベクトルに基づいて、入力画像を動き補償する動き補償手段と、動き補償手段により動き補償された画像と動き補償されていない画像のいずれかを、動きベクトルの確度に基づいて選択する選択手段と、選択手段により選択された画像を符号化する符号化手段とをさらに設けるようにすることができる。 Motion vector detection means for detecting a motion vector from the input image and supplying it to the evaluation value calculation means, motion compensation means for motion compensation of the input image based on the motion vector detected by the motion vector detection means, and motion compensation means And selecting means for selecting one of the image compensated for motion and the image not compensated for motion based on the accuracy of the motion vector, and encoding means for encoding the image selected by the selecting means. Can be.
動きベクトルの確度で重み付けされた頻度分布を算出する頻度分布算出手段と、頻度分布算出手段により算出された頻度分布の最大値を検出し、検出された最大値に基づいて、背景動きを検出する最大値検出手段とをさらに設けるようにすることができる。 A frequency distribution calculating unit that calculates a frequency distribution weighted by the accuracy of the motion vector, a maximum value of the frequency distribution calculated by the frequency distribution calculating unit, and detecting a background motion based on the detected maximum value. Maximum value detection means may be further provided.
動きベクトルの確度の処理単位における平均値を算出する平均値算出手段と、平均値算出手段により算出された平均値を基準値と比較し、その比較結果に基づいてシーンチェンジの有無を判定する判定手段とをさらに設けるようにすることができる。 Average value calculating means for calculating the average value of the motion vector accuracy in the processing unit, and comparing the average value calculated by the average value calculating means with a reference value and determining the presence or absence of a scene change based on the comparison result Means can be further provided.
平均値算出手段は、1つの処理単位について、1つの平均値を演算するようにすることができる。 The average value calculation means can calculate one average value for one processing unit.
本発明の画像処理方法は、第1の処理単位上の少なくとも1つ以上の画素である注目画素と、第1の処理単位と異なる第2の処理単位上の少なくとも1つ以上の画素であって、注目画素の動きベクトルに基づいて規定される対応画素との相関を表す評価値を算出する評価値算出ステップと、注目画素を基準とする画素値の変動を表す変動値を算出する変動値算出ステップと、評価値と変動値に基づいて、動きベクトルの確度を演算する確度演算ステップとを含むことを特徴とする。 The image processing method of the present invention includes a target pixel that is at least one pixel on a first processing unit, and at least one pixel on a second processing unit that is different from the first processing unit. An evaluation value calculating step for calculating an evaluation value representing a correlation with a corresponding pixel defined based on a motion vector of the pixel of interest, and a variation value calculation for calculating a variation value representing a variation of the pixel value with reference to the pixel of interest And a step of calculating the accuracy of the motion vector based on the evaluation value and the fluctuation value.
本発明の記録媒体のプログラムは、第1の処理単位上の少なくとも1つ以上の画素である注目画素と、第1の処理単位と異なる第2の処理単位上の少なくとも1つ以上の画素であって、注目画素の動きベクトルに基づいて規定される対応画素との相関を表す評価値を算出する評価値算出ステップと、注目画素を基準とする画素値の変動を表す変動値を算出する変動値算出ステップと、評価値と変動値に基づいて、動きベクトルの確度を演算する確度演算ステップとを含むことを特徴とする。 The program of the recording medium of the present invention includes a target pixel that is at least one pixel on the first processing unit, and at least one pixel on a second processing unit different from the first processing unit. An evaluation value calculating step for calculating an evaluation value representing a correlation with a corresponding pixel defined based on a motion vector of the pixel of interest, and a variation value for calculating a variation value representing a variation of the pixel value with reference to the pixel of interest It includes a calculation step, and an accuracy calculation step for calculating the accuracy of the motion vector based on the evaluation value and the fluctuation value.
本発明のプログラムは、第1の処理単位上の少なくとも1つ以上の画素である注目画素と、第1の処理単位と異なる第2の処理単位上の少なくとも1つ以上の画素であって、注目画素の動きベクトルに基づいて規定される対応画素との相関を表す評価値を算出する評価値算出ステップと、注目画素を基準とする画素値の変動を表す変動値を算出する変動値算出ステップと、評価値と変動値に基づいて、動きベクトルの確度を演算する確度演算ステップとをコンピュータに実行させることを特徴とする。 The program according to the present invention includes a target pixel that is at least one pixel on the first processing unit, and at least one pixel on a second processing unit that is different from the first processing unit, An evaluation value calculating step for calculating an evaluation value representing a correlation with a corresponding pixel defined based on a pixel motion vector, and a variation value calculating step for calculating a variation value representing a variation in a pixel value with respect to the target pixel. The computer is caused to execute an accuracy calculation step for calculating the accuracy of the motion vector based on the evaluation value and the fluctuation value.
本発明においては、第1の処理単位上の少なくとも1つ以上の画素である注目画素と、第2の処理単位上の少なくとも1つ以上の画素であって、注目画素とその動きベクトルに基づいて決定される対応画素との相関を表す評価値が算出される。さらに注目画素の画素値の変動を表す変動値が算出され、評価値と変動値に基づいて、動きベクトルの確度が演算される。 In the present invention, the target pixel which is at least one pixel on the first processing unit, and at least one pixel on the second processing unit, based on the target pixel and its motion vector An evaluation value representing a correlation with the determined corresponding pixel is calculated. Further, a fluctuation value representing a fluctuation of the pixel value of the target pixel is calculated, and the accuracy of the motion vector is calculated based on the evaluation value and the fluctuation value.
本発明によれば、動きベクトルの確度を算出することができる。特に、低規模、低コストで高い信頼性を有する動きベクトルの確度を数値として算出することができる。 According to the present invention, the accuracy of a motion vector can be calculated. In particular, the accuracy of a motion vector having high reliability at a low scale and low cost can be calculated as a numerical value.
以下に本発明の実施の形態を説明するが、本明細書に記載した発明と、発明の実施の形態との対応関係を例示すると、次のようになる。この記載は、本明細書に記載されている発明をサポートする実施の形態が明細書に記載されていることを確認するためのものである。従って、明細書には記載されているが、ここには記載されていない実施の形態があったとしても、そのことは、その実施の形態が、その発明に対応するものではないことを意味するものではない。逆に、実施の形態が発明に対応するものとしてここに記載されていたとしても、そのことは、その実施の形態が、その発明以外の発明には対応しないものであることを意味するものでもない。 Embodiments of the present invention will be described below. The correspondence relationship between the invention described in this specification and the embodiments of the invention is exemplified as follows. This description is intended to confirm that the embodiments supporting the invention described in this specification are described in the specification. Therefore, even if there is an embodiment which is described in the specification but is not described here, this means that the embodiment does not correspond to the invention. It is not a thing. Conversely, even if an embodiment is described herein as corresponding to an invention, that means that the embodiment does not correspond to an invention other than the invention. Absent.
さらに、この記載は、明細書に記載されている発明が、全て請求されていることを意味するものではない。換言すれば、この記載は、明細書に記載されている発明であって、この出願では請求されていない発明の存在、すなわち、将来、分割出願されたり、補正により出願、または追加される発明の存在を否定するものではない。 Further, this description does not mean that all the inventions described in the specification are claimed. In other words, this description is for the invention described in the specification and not claimed in this application, i.e., for the invention that will be filed in division or applied or added in the future. It does not deny existence.
本発明によれば、画像処理装置が提供される。この画像処理装置(例えば、図65の画像処理装置1000)は、第1の処理単位(例えば、図73のフレームFn)上の少なくとも1つ以上の画素である注目画素(例えば、図73の点P13(XP,YP)に位置する画素)と、第1の処理単位と異なる第2の処理単位(例えば、図73のフレームFn+1)上の少なくとも1つ以上の画素であって、注目画素の動きベクトル(例えば、図73の動きベクトルV(vx,vy))に基づいて規定される対応画素(例えば、図73の点Q13(Xq,Yq)に位置する画素)との相関を表す評価値(例えば、式(18)で表される評価値)を算出する評価値算出手段(例えば、図66の評価値算出部1041)と、注目画素を基準とする画素値の変動を表す変動値(例えば、式(20)で表されるブロックアクティビティ)を算出する変動値算出手段(例えば、図66のアクティビティ算出部1042)と、評価値と変動値に基づいて、動きベクトルの確度を演算する確度演算手段(例えば、図66の演算部43)とを含む。
According to the present invention, an image processing apparatus is provided. This image processing apparatus (for example, the
この画像処理装置は、確度演算手段が、評価値(例えば、式(18)で表される評価値)を変動値(例えば、式(20)で表されるブロックアクティビティ)で正規化した値(例えば、式(21)の「評価値/ブロックアクティビティ」)に基づいて動きベクトルの確度を演算するようにすることができる。 In this image processing apparatus, the accuracy calculation means normalizes an evaluation value (for example, an evaluation value represented by Expression (18)) with a variation value (for example, a block activity represented by Expression (20)) ( For example, the accuracy of the motion vector can be calculated based on “evaluation value / block activity” in Expression (21).
この画像処理装置は、確度演算手段が、変動値が所定の閾値よりも大きい場合には、評価値を変動値で正規化した値を動きベクトルの確度とし(例えば、図78のステップS992)、変動値が閾値よりも小さい場合には、動きベクトルの確度が低いことを表す固定値(例えば、図78のステップS993で設定される「0」)を選択する(例えば、図78のステップS993)ようにすることができる。 In this image processing apparatus, when the accuracy calculation means has a fluctuation value larger than a predetermined threshold, the value obtained by normalizing the evaluation value with the fluctuation value is set as the accuracy of the motion vector (for example, step S992 in FIG. 78). When the variation value is smaller than the threshold value, a fixed value (for example, “0” set in step S993 in FIG. 78) indicating that the accuracy of the motion vector is low is selected (for example, step S993 in FIG. 78). Can be.
この画像処理装置は、評価値算出手段が、注目画素を含むブロック(例えば、図73のブロックBp)と、対応画素を含むブロック(例えば、図73のブロックBq)の画素の差分の絶対値の総和(例えば、式(18)のEval(P,Q,i,j))として評価値を演算するようにすることができる。 In this image processing apparatus, the evaluation value calculation means uses the absolute difference between the pixels of the block including the target pixel (for example, the block B p in FIG. 73) and the block including the corresponding pixel (for example, the block B q in FIG. 73). The evaluation value can be calculated as the sum of values (for example, Eval (P, Q, i, j) in Expression (18)).
この画像処理装置は、変動値算出手段が、注目画素を含むブロック(例えば、図73および図75のブロックBp)において、注目画素(例えば、図74の注目画素Y(x,y))とそれに隣接する隣接画素(例えば、図74の隣接画素Y(x−1,y−1),Y(x,y−1),Y(x+1,y−1),Y(x+1,y),Y(x+1,y+1),Y(x,y+1),Y(x−1,y+1),Y(x−1,y))との差分の絶対値の総和を隣接画素の数で除算して得られた値(例えば、式(19)のActivity(x,y))の、ブロック内の総和(例えば、式(20)のBlockactivity(i,j))として変動値を演算するようにすることができる。 In this image processing apparatus, the fluctuation value calculation means is connected to the target pixel (for example, the target pixel Y (x, y) in FIG. 74) in the block including the target pixel (for example, the block B p in FIGS. 73 and 75). Adjacent pixels adjacent thereto (for example, adjacent pixels Y (x-1, y-1), Y (x, y-1), Y (x + 1, y-1), Y (x + 1, y), Y in FIG. 74) (X + 1, y + 1), Y (x, y + 1), Y (x-1, y + 1), Y (x-1, y)) and the sum of the absolute values of the differences is obtained by dividing by the number of adjacent pixels. The variation value can be calculated as the sum (for example, Blockactivity (i, j) in Expression (20)) of the values (for example, Activity (x, y) in Expression (19)) within the block. .
この画像処理装置は、確度演算手段が、変動値を第1の基準値(例えば、図43の閾値THa)と比較する比較手段(例えば、図66の閾値判定部1051)と、第2の基準値(例えば、式(21)の値「1」)と、評価値を変動値で正規化した値(例えば、式(21)の「評価値/ブロックアクティビティ」)との差を演算する差演算手段(例えば、図66の正規化処理部1052)と、比較手段による比較結果と、差演算手段により演算された差に基づいて、動きベクトルの確度を演算し、出力する出力手段(例えば、図66の統合処理部1053)とを含むようにすることができる。
In this image processing apparatus, the accuracy calculation means compares the fluctuation value with a first reference value (for example, the threshold value THa in FIG. 43), a comparison means (for example, the threshold
この画像処理装置は、入力画像から動きベクトルを検出し、評価値算出手段に供給する動きベクトル検出手段(例えば、図80の動きベクトル検出部1021)と、動きベクトル検出手段により検出された動きベクトルに基づいて、入力画像を動き補償する動き補償手段(例えば、図80の動き補償部1272)と、動き補償手段により動き補償された画像と動き補償されていない画像のいずれかを、動きベクトルの確度に基づいて選択する選択手段(例えば、図80の選択部1273)と、選択手段により選択された画像を符号化する符号化手段(例えば、図80の画素値符号化部1276)とをさらに含むようにすることができる。
This image processing apparatus detects a motion vector from an input image and supplies it to an evaluation value calculation unit (for example, a motion
この画像処理装置は、動きベクトルの確度で重み付けされた頻度分布を算出する頻度分布算出手段(例えば、図83の頻度分布算出部1322)と、頻度分布算出手段により算出された頻度分布の最大値を検出し、検出された最大値に基づいて、背景動きを検出する最大値検出手段(例えば、図83の背景動き決定部1323)とをさらに含むようにすることができる。
This image processing apparatus includes a frequency distribution calculating unit (for example, a frequency
この画像処理装置は、動きベクトルの確度の処理単位における平均値を算出する平均値算出手段(例えば、図86の動きベクトル確度平均値算出部1372)と、平均値算出手段により算出された平均値を基準値と比較し、その比較結果に基づいてシーンチェンジの有無を判定する判定手段(例えば、図86の閾値判定部1373)とをさらに含むようにすることができる。
This image processing apparatus includes an average value calculating unit (for example, a motion vector accuracy average
この画像処理装置は、平均値算出手段が、1つの処理単位(例えば、図68のフレームFn)について、1つの平均値を演算するようにすることができる。 In this image processing apparatus, the average value calculation means can calculate one average value for one processing unit (for example, frame F n in FIG. 68).
本発明によれば、画像処理方法が提供される。この画像処理方法は、第1の処理単位(例えば、図73のフレームFn)上の少なくとも1つ以上の画素である注目画素(例えば、図73の点P13(XP,YP)に位置する画素)と、第1の処理単位と異なる第2の処理単位(例えば、図73のフレームFn+1)上の少なくとも1つ以上の画素であって、注目画素の動きベクトル(例えば、図73の動きベクトルV(vx,vy))に基づいて規定される対応画素(例えば、図73の点Q13(Xq,Yq)に位置する画素)との相関を表す評価値(例えば、式(18)で表される評価値)を算出する評価値算出ステップ(例えば、図72のステップS931)と、注目画素を基準とする画素値の変動を表す変動値(例えば、式(20)で表されるブロックアクティビティ)を算出する変動値算出ステップ(例えば、図72のステップS932)と、評価値と変動値に基づいて、動きベクトルの確度を演算する確度演算ステップ(例えば、図72のステップS935)とを含む。 According to the present invention, an image processing method is provided. In this image processing method, a pixel of interest (for example, a point P 13 (X P , Y P ) in FIG. 73 is at least one pixel on the first processing unit (for example, frame F n in FIG. 73)). Pixel) and at least one pixel on a second processing unit (for example, frame Fn + 1 in FIG. 73) different from the first processing unit, and a motion vector (for example, FIG. 73 (eg, a pixel located at the point Q 13 (X q , Y q ) in FIG. 73) defined based on the motion vector V (vx, vy) of 73 An evaluation value calculating step (for example, step S931 in FIG. 72) for calculating the evaluation value represented by Expression (18), and a variation value (for example, Expression (20)) representing a variation in the pixel value with reference to the target pixel. Fluctuation value calculation that calculates the block activity represented by Step (e.g., step S932 in FIG. 72) includes a, on the basis of the evaluation value and the variation value, and accuracy computing step for computing the accuracy of motion vectors (e.g., step S935 in FIG. 72).
本発明によれば、コンピュータが読み取り可能なプログラムが記録されている記録媒体が提供される。この記録媒体のプログラムは、第1の処理単位(例えば、図73のフレームFn)上の少なくとも1つ以上の画素である注目画素(例えば、図73の点P13(XP,YP)に位置する画素)と、第1の処理単位と異なる第2の処理単位(例えば、図73のフレームFn+1)上の少なくとも1つ以上の画素であって、注目画素の動きベクトル(例えば、図73の動きベクトルV(vx,vy))に基づいて規定される対応画素(例えば、図73の点Q13(Xq,Yq)に位置する画素)との相関を表す評価値(例えば、式(18)で表される評価値)を算出する評価値算出ステップ(例えば、図72のステップS931)と、注目画素を基準とする画素値の変動を表す変動値(例えば、式(20)で表されるブロックアクティビティ)を算出する変動値算出ステップ(例えば、図72のステップS932)と、評価値と変動値に基づいて、動きベクトルの確度を演算する確度演算ステップ(例えば、図72のステップS935)とを含む。 According to the present invention, a recording medium on which a computer-readable program is recorded is provided. The program of this recording medium is a pixel of interest (for example, a point P 13 (X P , Y P ) in FIG. 73) that is at least one pixel on the first processing unit (for example, frame F n in FIG. 73). And at least one pixel on a second processing unit (for example, frame F n + 1 in FIG. 73) different from the first processing unit, and a motion vector (for example, 73, an evaluation value representing a correlation with a corresponding pixel (for example, a pixel located at a point Q 13 (X q , Y q ) in FIG. 73) defined based on the motion vector V (vx, vy) in FIG. For example, an evaluation value calculating step (for example, step S931 in FIG. 72) for calculating an evaluation value represented by Expression (18) and a variation value (for example, Expression ( 20) is calculated. A dynamic value calculating step (for example, step S932 in FIG. 72) and an accuracy calculating step (for example, step S935 in FIG. 72) for calculating the accuracy of the motion vector based on the evaluation value and the fluctuation value are included.
本発明によれば、プログラムが提供される。このプログラムは、第1の処理単位(例えば、図73のフレームFn)上の少なくとも1つ以上の画素である注目画素(例えば、図73の点P13(XP,YP)に位置する画素)と、第1の処理単位と異なる第2の処理単位(例えば、図73のフレームFn+1)上の少なくとも1つ以上の画素であって、注目画素の動きベクトル(例えば、図73の動きベクトルV(vx,vy))に基づいて規定される対応画素(例えば、図73の点Q13(Xq,Yq)に位置する画素)との相関を表す評価値(例えば、式(18)で表される評価値)を算出する評価値算出ステップ(例えば、図72のステップS931)と、注目画素を基準とする画素値の変動を表す変動値(例えば、式(20)で表されるブロックアクティビティ)を算出する変動値算出ステップ(例えば、図72のステップS932)と、評価値と変動値に基づいて、動きベクトルの確度を演算する確度演算ステップ(例えば、図72のステップS935)とを含む。 According to the present invention, a program is provided. This program is located at a pixel of interest (for example, point P 13 (X P , Y P ) of FIG. 73, which is at least one pixel on the first processing unit (for example, frame F n of FIG. 73). Pixel) and at least one pixel on a second processing unit (for example, frame F n + 1 in FIG. 73) different from the first processing unit, and a motion vector (for example, FIG. 73) of the target pixel. Evaluation value (for example, an expression) representing a correlation with a corresponding pixel (for example, a pixel located at a point Q 13 (X q , Y q ) in FIG. 73) defined based on the motion vector V (vx, vy) of An evaluation value calculating step (for example, step S931 in FIG. 72) for calculating (an evaluation value represented by (18)), and a variation value (for example, Expression (20)) representing a variation in the pixel value with reference to the target pixel. (Variable value calculation) Step (for example, step S932 in FIG. 72) and an accuracy calculation step (for example, step S935 in FIG. 72) for calculating the accuracy of the motion vector based on the evaluation value and the fluctuation value.
以下、図面を参照して、本発明の実施の形態について説明する。図1は、本発明を監視カメラシステムに適用した場合の構成例を表している。この監視カメラシステム1においては、CCDビデオカメラ等よりなる撮像部21により撮像された画像が画像ディスプレイ23に表示される。追尾対象検出部24は、撮像部21より入力された画像から追尾対象を検出し、検出結果をオブジェクト追尾部26に出力する。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows a configuration example when the present invention is applied to a surveillance camera system. In the
オブジェクト追尾部26は、撮像部21より供給された画像中の、追尾対象検出部24により指定された追尾点を追尾するように動作する。エリア設定部25は、オブジェクト追尾部26からの出力結果に基づいて、撮像部21により撮像された画像の中から、追尾点を含むオブジェクトの周辺の所定の領域(エリア)を設定し、その領域を指定する位置情報を画像補正部22に出力する。画像補正部22は、撮像部21により撮像された画像の中のエリア設定部25により設定された領域について、画像のぼけ(フォーカスぼけ)を除去する補正を行い、画像ディスプレイ23に出力する。カメラ駆動部27は、オブジェクト追尾部26からの制御に基づいて、撮像部21が追尾点を中心とする画像を撮影するように撮像部21を駆動する。
The
制御部27は、例えば、マイクロコンピュータなどにより構成され、各部を制御する。制御部27には、半導体メモリ、磁気ディスク、光ディスク、光磁気ディスクなどにより構成されるリムーバブルメディア28が必要に応じて接続され、プログラム、その他各種のデータが必要に応じて供給される。制御部27は、また、図示せぬ入出力インタフェースを介して、ユーザからの指示(コマンドなど)の入力を受け付ける。
The
次に、図2のフローチャートを参照して、監視処理の動作について説明する。監視システム1の電源がオンされているとき、撮像部21は監視する領域を撮像し、その撮像して得られた画像を追尾対象検出部24、オブジェクト追尾部26、および画像補正部22を介して画像ディスプレイ23に出力する。追尾対象検出部24は、ステップS1において、撮像部21から入力された画像から追尾対象を検出する処理を実行する。追尾対象検出部24は、例えば、動く物体が検出された場合、その動く物体を追尾対象として検出する。追尾対象検出部24は、追尾対象の中から、例えば、最も輝度の高い点、あるいは追尾対象の中心の点などを追尾点として検出し、オブジェクト追尾部26に出力する。
Next, the operation of the monitoring process will be described with reference to the flowchart of FIG. When the power of the
ステップS2において、オブジェクト追尾部26は、ステップS1で検出された追尾点を追尾する追尾処理を実行する。追尾処理の詳細については、図6を参照して後述するが、この処理により、撮像部21により撮像された画像の中の追尾対象となるオブジェクト(例えば、人、動物など)の中の追尾点(例えば、目、頭の中心)が追尾され、その追尾位置を表す位置情報がエリア設定部25に出力される。
In step S2, the
ステップS3において、エリア設定部25は、オブジェクト追尾部26からの出力に基づいて、追尾対象のオブジェクトの周辺の所定の領域(例えば、追尾点を中心として、所定の大きさの四角形で表される領域)を補正対象エリアとして設定する。
In step S <b> 3, the
ステップS4において、画像補正部22は、撮像部21により撮像された画像の中で、エリア設定部25により設定された補正対象エリア内の画像を補正する画像補正処理を実行する。画像補正処理の詳細については、図58を参照して後述するが、この処理により、補正対象エリア内の画像について、画像のぼけが除去された鮮明な映像が提供される。
In step S <b> 4, the
ステップS5において、画像ディスプレイ23は、ステップS4で補正された画像、すなわち、撮像部21により撮像された画像であって、特に、補正対象エリア内のみが鮮明になるように補正された画像を出力する。
In step S5, the
ステップS6において、オブジェクト追尾部26は、ステップS2の処理による追尾結果に基づいて、オブジェクトの移動を検出し、移動したオブジェクトを撮像できるようにカメラを駆動させるカメラ駆動信号を生成し、カメラ駆動部27に出力する。ステップS7において、カメラ駆動部27はカメラ駆動信号に基づいて撮像部21を駆動する。これにより撮像部21は、追尾点が画面のから外れてしまうことがないようにカメラをパンまたはチルトする。
In step S6, the
ステップS8において、制御部27は、ユーザからの指示に基づいて監視処理を終了するか否かを判定し、ユーザから終了が指示されていない場合には、ステップS1に戻り、それ以降の処理を繰り返し実行する。ユーザから監視処理の終了が指示された場合、ステップS8において終了すると判定され、制御部27は監視処理を終了する。
In step S8, the
図3A乃至図3Cは、このとき画像ディスプレイ23に表示される画像の例を、時系列に示した図である。図3Aは、撮像部21により、追尾対象となるオブジェクト51が撮像された画像の例であり、この例では、図中左方向に走って移動する人が、オブジェクト51として撮像されている。図3Bでは、オブジェクト51が、図3Aの位置から図中左に移動しており、図3Cでは、オブジェクト51が、図3Bの位置からさらに左に移動している。
3A to 3C are diagrams showing an example of an image displayed on the
追尾対象検出部24は、図2のステップS1で、オブジェクト51を検出し、このオブジェクト51(人)の目を、追尾点51Aとしてオブジェクト追尾部26に出力する。ステップS2ではオブジェクト追尾部26により追尾処理が行われ、エリア設定部25により、ステップS3で追尾対象のオブジェクト51(追尾点51A)の周辺の所定領域が補正対象エリア52として設定される。
The tracking
上述したように、オブジェクト追尾部26は、追尾点51Aに基づいて、オブジェクト51を追尾するので、オブジェクト51が移動すると、追尾点51Aも移動し、その追尾結果(位置)がエリア設定部25に出力される。このため、図3A乃至図3Cに示されるように、オブジェクト51が図中左に移動していくと、補正対象エリア52も図中左に移動していく。
As described above, the
移動するオブジェクト51(追尾点51A)に対応する補正対象エリア52の設定は、例えば、次のようにして行われる。図4は、補正対象エリアとして、追尾点の周辺に所定の大きさの四角形の領域が設定される例を示す。同図において、最初に補正対象エリア71Aが設定されたものとする。最初の補正対象エリア71Aとしては、例えば、追尾点51Aを基準として、それを中心とする一定の範囲が設定される。勿論、ユーザにより指定された場合には、その指定された範囲が補正対象エリア71Aとして設定される。このときエリア設定部25は、補正対象エリア71Aの左上の角の座標(X,Y)を、内蔵するメモリに記憶する。オブジェクト51の追尾点51Aが移動すると、オブジェクト追尾部26による追尾が行われ、追尾点51Aの、画面上におけるX軸方向(図中左右の方向)、Y軸方向(図中上下方向)の位置(または移動距離)の情報が、追尾結果としてエリア設定部25に供給される。
The
そして、上述した左上の角の座標に基づいて、補正対象エリアが設定される。例えば、追尾点51Aが画面上で、X軸方向にx、Y軸方向にyだけそれぞれ移動すると、エリア設定部25は、補正対象エリア71Aの左上の座標(X,Y)に、xとyを加算し、座標(X+x,Y+y)を計算し、その座標を新たな補正対象エリア71Bの左上の角の座標として記憶するとともに、補正対象エリア71Bを設定する。追尾点51AがX軸方向にa、Y軸方向にbだけさらに移動すると、エリア設定部25は、補正対象エリア71Aの左上の座標(X+x,Y+y)に、aとbを加算し、座標(X+x+a,Y+y+b)を計算し、その座標を新たな補正対象エリア71Cの左上の角の座標として記憶するとともに、補正対象エリア71Cを設定する。
Then, the correction target area is set based on the coordinates of the upper left corner described above. For example, when the
このように、オブジェクト(追尾点)の移動に伴って、補正対象エリアも移動していく。 In this way, the correction target area moves with the movement of the object (tracking point).
また、上述したように、補正対象エリア52内の画像については、画像補正部22による画像補正処理(図2のステップS4)が行われ、画像のぼけが除去されて、画像ディスプレイ23に表示される。従って、図3A乃至Cに示される画像は、補正対象エリア52内が鮮明に表示され、補正対象エリア52の外の領域(背景)である背景53の画像は、補正対象エリア52内の画像と比較すると、相対的に不鮮明に表示される。
Further, as described above, the image in the
このようにすることで、画像ディスプレイ23に表示される画像の中で、補正対象エリア52内のオブジェクト51が、常に鮮明に表示されるので、画像ディスプレイ23を観察するユーザは、自然にオブジェクト51を注目するようになり、その結果、例えば不審者の侵入、物体の移動などをより迅速に発見することができる。また、オブジェクト51は、鮮明に表示されるので、移動するオブジェクト(例えば、人物)が何(誰)であるのか、ユーザに、正確に認識させることができる。
By doing so, the
次に、図1のオブジェクト追尾部26の詳細な構成例と、その動作について説明する。図5はオブジェクト追尾部26の機能的構成例を示すブロック図である。この例では、オブジェクト追尾部26は、テンプレートマッチング部51、動き推定部52、シーンチェンジ検出部53、背景動き推定部54、領域推定関連処理部55、乗り換え候補保持部56、追尾点決定部57、テンプレート保持部58、および制御部59により構成されている。
Next, a detailed configuration example and operation of the
テンプレートマッチング部51は、入力画像と、テンプレート保持部58に保持されているテンプレート画像のマッチング処理を行う。動き推定部52は、入力画像の動きを推定し、推定の結果得られた動きベクトルと、その動きベクトルの確度を、シーンチェンジ検出部53、背景動き推定部54、領域推定関連処理部55、および追尾点決定部57に出力する。シーンチェンジ検出部53は、動き推定部52より供給された確度に基づいて、シーンチェンジを検出する。
The
背景動き推定部54は、動き推定部52より供給された動きベクトルと確度に基づいて背景動きを推定する処理を実行し、推定結果を領域推定関連処理部55に供給する。領域推定関連処理部55は、動き推定部52より供給された動きベクトルと確度、背景動き推定部54より供給された背景動き、並びに追尾点決定部57より供給された追尾点情報に基づいて、領域推定処理を行う。また、領域推定関連処理部55は、入力された情報に基づいて乗り換え候補を生成し、乗り換え候補保持部56へ供給し、保持させる。さらに、領域推定関連処理部55は、入力画像に基づいてテンプレートを作成し、テンプレート保持部58に供給し、保持させる。
The background
追尾点決定部57は、動き推定部52より供給された動きベクトルと確度、並びに乗り換え候補保持部56より供給された乗り換え候補に基づいて、追尾点を決定し、決定された追尾点に関する情報を領域推定関連処理部55に出力する。
The tracking
制御部59は、追尾対象検出部から24から出力された追尾点の情報に基づいて、テンプレートマッチング部51乃至テンプレート保持部58の各部を制御して、検出された追尾対象を追尾させるとともに、画像ディスプレイ23に表示される画面の中に、追尾点が表示されるように(追尾点が画面の外にでないように)、カメラ駆動部27に制御信号を出力し、カメラ(撮像部21)の駆動を制御する。また、制御部59は、追尾点の画面上での位置の情報などの追尾結果を、エリア設定部25、制御部27などに出力する。
The
次に、オブジェクト追尾部26の動作について説明する。図6は、図2のステップS2において、オブジェクト追尾部26が実行する追尾処理の詳細を説明するフローチャートである。
Next, the operation of the
図7に示されるように、オブジェクト追尾部26は、基本的に通常処理と例外処理を実行する。すなわち、ステップS51で通常処理が行われる。この通常処理の詳細は、図10を参照して後述するが、この処理により追尾対象検出部24により指定された追尾点を追尾する処理が実行される。ステップS51の通常処理において追尾点の乗り換えができなくなったとき、ステップS52において、例外処理が実行される。この例外処理の詳細は、図35のフローチャートを参照して後述するが、この例外処理により、追尾点が画像から見えなくなったとき、テンプレートマッチングにより通常処理への復帰処理が実行される。例外処理によって追尾処理を継続することができなくなった(通常処理へ復帰することができなくなった)と判定された場合には処理が終了されるが、テンプレートによる復帰処理の結果、通常処理への復帰が可能と判定された場合には、処理は再びステップS51に戻る。このようにして、ステップS51の通常処理とステップS52の例外処理が、各フレーム毎に順次繰り返し実行される。
As shown in FIG. 7, the
本発明においては、この通常処理と例外処理により、図7乃至図9に示されるように、追尾対象が回転したり、オクルージョンが発生したり、シーンチェンジが発生する等、追尾点が一時的に見えなくなった場合においても、追尾が可能となる。 In the present invention, as shown in FIG. 7 to FIG. 9, the tracking point is temporarily changed by the normal process and the exception process, such as the tracking target is rotated, the occlusion occurs, the scene change occurs, and the like. Even when it becomes invisible, tracking is possible.
すなわち、例えば、図7に示されるように、フレームn−1には追尾対象(オブジェクト)としての人の顔104が表示されており、この人の顔104は、右目102と左目103を有している。ユーザが、このうちの、例えば右目102(正確には、その中の1つの画素)を追尾点101として指定したとする。図7の例においては、次のフレームnにおいて、人が図中左方向に移動しており、さらに次のフレームn+1においては、人の顔104が時計方向に回動している。その結果、今まで見えていた右目102が表示されなくなり、いままでの方法では、追尾ができなくなる。そこで、上述したステップS51の通常処理においては、右目102と同一の対象物としての顔104上の左目103が選択され、追尾点が左目103に乗り換えられる(設定される)。これにより追尾が可能となる。
That is, for example, as shown in FIG. 7, a
図8の表示例では、フレームn−1において、顔104の図中左側からボール121が移動してきて、次のフレームnにおいては、ボール121がちょうど顔104を覆う状態となっている。この状態において、追尾点101として指定されていた右目102を含む顔104が表示されていない。このようなオクルージョンが起きると、対象物としての顔504が表示されていないので、追尾点101に代えて追尾する乗り換え点もなくなり、以後、追尾点を追尾することが困難になる。しかし、本発明においては、追尾点101としての右目102をフレームn−1(実際には時間的にもっと前のフレーム)の画像がテンプレートとして予め保存されており、ボール121がさらに右側に移動し、フレームn+1において、追尾点101として指定された右目102が再び現れると、上述したステップS52の例外処理により、追尾点101としての右目102が再び表示されたことが確認され、右目102が再び追尾点101として追尾されることになる。
In the display example of FIG. 8, in the frame n−1, the
図9の例では、フレームn−1においては、顔104が表示されているが、次のフレームnにおいては、自動車111が人の顔を含む全体を覆い隠している。すなわち、この場合、シーンチェンジが起きたことになる。本発明では、このようにシーンチェンジが起きて追尾点101が画像から存在しなくなっても、自動車111が移動して、フレームn+1において再び右目102が表示されると、ステップS52の例外処理で、追尾点101としての右目102が再び出現したことがテンプレートに基づいて確認され、この右目102を再び追尾点101として追尾することが可能となる。
In the example of FIG. 9, the
次に、図10のフローチャートを参照して、図6のステップS51の通常処理の詳細について説明する。ステップS121において、追尾点決定部57により通常処理の初期化処理が実行される。その詳細は、図11のフローチャートを参照して後述するが、この処理によりユーザから追尾するように指定された追尾点を基準とする領域推定範囲が指定される。この領域推定範囲は、ユーザにより指定された追尾点と同一の対象物(例えば、追尾点が人の目である場合、目と同様の動きをする剛体としての人の顔、または人の体など)に属する点の範囲を推定する際に参照する範囲である。乗り換え点は、この領域推定範囲の中の点から選択される。
Next, the details of the normal processing in step S51 in FIG. 6 will be described with reference to the flowchart in FIG. In step S121, the tracking
次に、ステップS122において、制御部59は、次のフレームの画像の入力を待機するように各部を制御する。ステップS123において、動き推定部52は、追尾点の動きを推定する。すなわち、ユーザにより指定された追尾点を含むフレーム(前フレーム)より時間的に後のフレーム(後フレーム)をステップS122の処理で取り込むことで、結局連続する2フレームの画像が得られたことになるので、ステップS123において、前フレームの追尾点に対応する後フレームの追尾点の位置を推定することで、追尾点の動きが推定される。
Next, in step S122, the
なお、時間的に前とは、処理の順番(入力の順番)をいう。通常、撮像の順番に各フレームの画像が入力されるので、その場合、より時間的に前に撮像されたフレームが前フレームとなるが、時間的に後に撮像されたフレームが先に処理(入力)される場合には、時間的に後に撮像されたフレームが前フレームとなる。 Note that “preceding in time” means the processing order (input order). Normally, images of each frame are input in the order of imaging. In this case, the frame captured earlier in time becomes the previous frame, but the frame captured later in time is processed (input) first. ), The frame imaged later in time becomes the previous frame.
ステップS124において、動き推定部52は、ステップS123の処理の結果、追尾点が推定可能であったか否かを判定する。追尾点が推定可能であったか否かは、例えば、動き推定部52が生成、出力する動きベクトル(後述)の確度の値を、予め設定されている閾値と比較することで判定される。具体的には、動きベクトルの確度が閾値以上であれば推定が可能であり、閾値より小さければ推定が不可能であると判定される。すなわち、ここにおける可能性は比較的厳格に判定され、実際には推定が不可能ではなくても確度が低い場合には、不可能と判定される。これにより、より確実な追尾処理が可能となる。
In step S124, the
なお、ステップS124では、追尾点での動き推定結果と追尾点の近傍の点での動き推定結果が、多数を占める動きと一致する場合には推定可能、一致しない場合には推定不可能と判定するようにすることも可能である。 In step S124, it is determined that the motion estimation result at the tracking point and the motion estimation result at a point near the tracking point can be estimated if they match the motions that occupy the majority, and that they cannot be estimated if they do not match. It is also possible to do so.
追尾点の動きが推定可能であると判定された場合(追尾点が同一対象物上の対応する点上に正しく設定されている確率(右目102が追尾点101として指定された場合、右目102が正しく追尾されている確率)が比較的高い場合)、ステップS125に進み、追尾点決定部57は、ステップS123の処理で得られた推定動き(動きベクトル)の分だけ追尾点をシフトする。すなわち、これにより、前フレームの追尾点の追尾後の後フレームにおける追尾の位置が決定されることになる。
When it is determined that the movement of the tracking point can be estimated (the probability that the tracking point is correctly set on the corresponding point on the same object (if the
ステップS125の処理の後、ステップS126において、領域推定関連処理が実行される。この領域推定関連処理の詳細は、図14を参照して後述するが、この処理により、ステップS121の通常処理の初期化処理で指定された領域推定範囲が更新される。さらに、対象物体が回転するなどして、追尾点が表示されない状態になった場合に、追尾点を乗り換えるべき点としての乗り換え点としての候補(乗り換え候補)が、この状態(まだ追尾が可能な状態)において、予め抽出(作成)される。また、乗り換え候補への乗り換えもできなくなった場合、追尾は一旦中断されるが、再び追尾が可能になった(追尾点が再び出現した)ことを確認するために、テンプレートが予め作成される。 After step S125, region estimation related processing is executed in step S126. The details of the area estimation related process will be described later with reference to FIG. 14. By this process, the area estimation range designated in the initialization process of the normal process in step S121 is updated. Furthermore, if the tracking point is not displayed because the target object rotates, for example, the candidate as a switching point (transfer candidate) as a point to be switched to is the state (can still be tracked). (State), it is extracted (created) in advance. Further, when the transfer to the transfer candidate cannot be performed, the tracking is temporarily interrupted, but a template is created in advance in order to confirm that the tracking is possible again (the tracking point appears again).
ステップS126の領域推定関連処理が終了した後、処理は再びステップS122に戻り、それ以降の処理が繰り返し実行される。 After the region estimation related process in step S126 is completed, the process returns to step S122 again, and the subsequent processes are repeatedly executed.
すなわち、ユーザから指定された追尾点の動きが推定可能である限り、ステップS122乃至ステップS126の処理がフレーム毎に繰り返し実行され、追尾が行われることになる。 That is, as long as the movement of the tracking point designated by the user can be estimated, the processing from step S122 to step S126 is repeatedly executed for each frame, and tracking is performed.
これに対して、ステップS124において、追尾点の動きが推定可能ではない(不可能である)と判定された場合、すなわち、上述したように、例えば動きベクトルの確度が閾値以下であるような場合、処理はステップS127に進む。ステップS127において、追尾点決定部57は、ステップS126の領域推定関連処理で生成された乗り換え候補が乗り換え候補保持部116に保持されているので、その中から、元の追尾点に最も近い乗り換え候補を1つ選択する。追尾点決定部57は、ステップS128で乗り換え候補が選択できたか否かを判定し、乗り換え候補が選択できた場合には、ステップS129に進み、追尾点をステップS127の処理で選択した乗り換え候補に乗り換える(変更する)。すなわち、乗り換え候補の点が新たな追尾点として設定される。その後、処理はステップS123に戻り、乗り換え候補の中から選ばれた追尾点の動きを推定する処理が実行される。
On the other hand, if it is determined in step S124 that the movement of the tracking point cannot be estimated (that is, impossible), that is, as described above, for example, the accuracy of the motion vector is equal to or less than the threshold value. The process proceeds to step S127. In step S127, since the transfer candidate generated by the region estimation related process in step S126 is held in the transfer candidate holding unit 116, the tracking
ステップS124において新たに設定された追尾点の動きが推定可能であるか否かが再び判定され、推定可能であれば、ステップS125において追尾点を推定動き分だけシフトする処理が行われ、ステップS126において、領域推定関連処理が実行される。その後、処理は再びステップS122に戻り、それ以降の処理が繰り返し実行される。 In step S124, it is determined again whether or not the movement of the newly set tracking point can be estimated. If it can be estimated, a process of shifting the tracking point by the estimated movement is performed in step S125, and step S126. In, the area estimation related process is executed. Thereafter, the process returns to step S122 again, and the subsequent processes are repeatedly executed.
ステップS124において、新たに設定された追尾点も推定不可能であると判定された場合には、再びステップS127に戻り、乗り換え候補の中から、元の追尾点に次に最も近い乗り換え候補が選択され、ステップS129において、その乗り換え候補が新たな追尾点とされる。その新たな追尾点について、再びステップS123以降の処理が繰り返される。 If it is determined in step S124 that the newly set tracking point cannot be estimated, the process returns to step S127, and the next transfer candidate closest to the original tracking point is selected from the transfer candidates. In step S129, the transfer candidate is set as a new tracking point. The process after step S123 is repeated again for the new tracking point.
用意されているすべての乗り換え候補を新たな追尾点としても、追尾点の動きを推定することができなかった場合には、ステップS128において、乗り換え候補が選択できなかったと判定され、この通常処理は終了される。そして、図6のステップS52の例外処理に処理が進むことになる。 Even when all the prepared transfer candidates are used as new tracking points, if the movement of the tracking point cannot be estimated, it is determined in step S128 that the transfer candidate cannot be selected, and this normal process is performed. Is terminated. Then, the process proceeds to the exception process in step S52 of FIG.
次に、図11のフローチャートを参照して、図10のステップS121の通常処理の初期化処理の詳細について説明する。 Next, the details of the initialization process of the normal process in step S121 of FIG. 10 will be described with reference to the flowchart of FIG.
ステップS141において、制御部59は、今の処理は例外処理からの復帰の処理であるのか否かを判定する。すなわち、ステップS52の例外処理を終了した後、再びステップS51の通常処理に戻ってきたのか否かが判定される。最初のフレームの処理においては、まだステップS52の例外処理は実行されていないので、例外処理からの復帰ではないと判定され、処理はステップS142に進む。ステップS142において、追尾点決定部57は、追尾点を追尾点指示の位置に設定する処理を実行する。すなわち、入力画像の中で、例えば、最も輝度の高い点が追尾点として設定される。
In step S141, the
なお、追尾点は、ユーザによる指定など、他の方法により設定されるようにしてもよい。ユーザによる指定とは、例えば、図示せぬマウス、その他の入力部を操作することで、制御部59に、入力画像の中の所定の点を追尾点として指定することにより行われることである。追尾点決定部57は、設定した追尾点の情報を領域推定関連処理部55に供給する。
The tracking point may be set by other methods such as designation by the user. The designation by the user is performed, for example, by designating a predetermined point in the input image as a tracking point to the
ステップS143において、領域推定関連処理部55は、ステップS142の処理で設定された追尾点の位置に基づき、領域推定範囲を設定する。この領域推定範囲は、追尾点と同じ剛体上の点を推定する際の参照範囲であり、予め追尾点と同じ剛体部分が領域推定範囲の大部分を占めるように、より具体的には、追尾点と同じ剛体部分に推定領域範囲の位置や大きさが追随するように設定することで、領域推定範囲の中で最も多数を占める動きを示す部分を追尾点と同じ剛体部分であると推定できるようにするためのものである。ステップS143では初期値として、例えば、追尾点を中心とする予め設定された一定の範囲が領域推定範囲とされる。
In step S143, the region estimation related processing
その後処理は、図10のステップS122に進むことになる。 Thereafter, the processing proceeds to step S122 in FIG.
一方、ステップS141において、現在の処理が、ステップS52の例外処理からの復帰の処理であると判定された場合、ステップS144に進み、追尾点決定部57は、後述する図35を参照して後述する処理により、テンプレートにマッチした位置に基づき追尾点と領域推定範囲を設定する。例えば、テンプレート上の追尾点とマッチした現フレーム上の点が追尾点とされ、その点から予め設定されている一定の範囲が領域推定範囲とされる。その後、処理は図10のステップS122に進む。
On the other hand, if it is determined in step S141 that the current process is a process for returning from the exception process in step S52, the process proceeds to step S144, and the tracking
以上の処理を図12を参照して説明すると次のようになる。すなわち、図11のステップS142において、例えば、図12に示されるように、フレームn−1の人の目102が追尾点101として指定されると、ステップS143において、追尾点101を含む所定の領域が領域推定範囲133として指定される。ステップS124において、領域推定範囲133の範囲内のサンプル点が次のフレームにおいて推定可能であるか否かが判定される。図12の例の場合、フレームnの次のフレームn+1においては、領域推定範囲133のうち、左目102を含む図中左側半分の領域134がボール121で隠されているため、フレームnの追尾点101の動きを、次のフレームn+1において推定することができない。そこで、このような場合においては、時間的に前のフレームn−1で乗り換え候補として予め用意されていた領域指定範囲133内(右目102を含む剛体としての顔104内)の点の中から1つの点(例えば、顔104に含まれる左目103(正確には、その中の1つの画素))が選択され、その点がフレームn+1における、追尾点とされる。
The above process will be described with reference to FIG. That is, in step S142 of FIG. 11, for example, as shown in FIG. 12, when the
領域推定関連処理部55は、図10のステップS126における領域推定関連処理を実行するために、図13に示されるような構成を有している。すなわち、領域推定関連処理部55の領域推定部161には、動き推定部52より動きベクトルと確度が入力され、背景動き推定部54より背景動きが入力され、そして追尾点決定部57より追尾点の位置情報が入力される。乗り換え候補抽出部162には、動き推定部52より動きベクトルと確度が供給される他、領域推定部161の出力が供給される。テンプレート作成部163には、入力画像が入力される他、領域推定部161の出力が入力される。
The region estimation related processing
領域推定部161は、入力に基づいて、追尾点を含む剛体の領域を推定し、推定結果を乗り換え候補抽出部162とテンプレート作成部163に出力する。乗り換え候補抽出部162は入力に基づき乗り換え候補を抽出し、抽出した乗り換え候補を乗り換え候補保持部56へ供給する。テンプレート作成部163は入力に基づきテンプレートを作成し、作成したテンプレートをテンプレート保持部58へ供給する。
The
図14は、領域推定関連処理部55により実行される領域推定関連処理(図10のステップS126の処理)の詳細を表している。最初にステップS161において、領域推定部161により領域推定処理が実行される。その詳細は、図15のフローチャートを参照して後述するが、この処理により、追尾点が属する対象と同一の対象(追尾点と同期した動きをする剛体)に属すると推定される画像上の領域の点が領域推定範囲の点として抽出される。
FIG. 14 shows details of the area estimation related process (the process of step S126 in FIG. 10) executed by the area estimation related processing
ステップS162において、乗り換え候補抽出部162により乗り換え候補抽出処理が実行される。その処理の詳細は、図25のフローチャート参照して後述するが、領域推定部161により領域推定範囲として推定された範囲の点から乗り換え候補の点が抽出され、乗り換え候補保持部56に保持される。
In step S162, the transfer
ステップS163においてテンプレート作成部163によりテンプレート作成処理が実行される。その詳細は、図26のフローチャートを参照して後述するが、この処理によりテンプレートが作成される。
In step S163, the
次に、図15のフローチャートを参照して、図14のステップS161の領域推定処理の詳細について説明する。 Next, details of the region estimation processing in step S161 in FIG. 14 will be described with reference to the flowchart in FIG.
最初に、ステップS181において、領域推定部161は、追尾点と同一の対象に属すると推定される点の候補の点としてのサンプル点を決定する。
First, in step S181, the
このサンプル点は、例えば図16に示されるように、図中、白い四角形で示されるフレームの全画面における画素のうち、固定された基準点201を基準として、水平方向および垂直方向に、所定の画素数ずつ離れた位置の画素をサンプル点(図中、黒い四角形で表されている)とすることができる。図16の例においては、各フレームの左上の画素が基準点201とされ(図中基準点201は×印で示されている)、水平方向に5個、並びに垂直方向に5個ずつ離れた位置の画素がサンプル点とされる。すなわち、この例の場合、全画面中に分散した位置の画素がサンプル点とされる。また、この例の場合、基準点は、各フレームn,n+1において固定された同一の位置の点とされる。
For example, as shown in FIG. 16, the sample points are predetermined in the horizontal direction and the vertical direction with reference to the fixed
基準点201は、例えば図17に示されるように、各フレームn,n+1毎に異なる位置の点となるように、動的に変化させることもできる。
For example, as shown in FIG. 17, the
図16と図17の例においては、サンプル点の間隔が各フレームにおいて固定された値とされているが、例えば図18に示されるように、フレーム毎にサンプル点の間隔を可変とすることもできる。図18の例においては、フレームnにおいては、サンプル点の間隔は5画素とされているのに対し、フレームn+1においては8画素とされている。このときの間隔の基準としては、追尾点と同一の対象に属すると推定される領域の面積を用いることができる。具体的には、領域推定範囲の面積が狭くなれば間隔も短くなる。
In the example of FIGS. 16 and 17, the interval between the sample points is a fixed value in each frame. However, for example, as shown in FIG. 18, the interval between the sample points may be variable for each frame. it can. In the example of FIG. 18, the interval between sample points is 5 pixels in frame n, whereas it is 8 pixels in
あるいはまた、図19に示されるように、1つのフレーム内においてサンプル点の間隔を可変とすることもできる。このときの間隔の基準としては、追尾点からの距離を用いることができる。すなわち、追尾点に近いサンプル点ほど間隔が小さく、追尾点から遠くなるほど間隔が大きくなる。 Alternatively, as shown in FIG. 19, the interval between sample points can be made variable in one frame. The distance from the tracking point can be used as a reference for the interval at this time. That is, the sample point closer to the tracking point has a smaller interval, and the farther from the tracking point, the larger the interval.
以上のようにしてサンプル点が決定されると、次にステップS182において、領域推定部161は、領域推定範囲(図11のステップS143,S144の処理、または、後述する図20のステップS206,S208の処理で決定されている)内のサンプル点の動きを推定する処理を実行する。すなわち、領域推定部161は、動き推定部52より供給された動きベクトルに基づいて、領域推定範囲内のサンプル点に対応する次のフレームの対応する点を抽出する。
When the sample points are determined as described above, in step S182, the
ステップS183において、領域推定部161は、ステップS182の処理で推定したサンプル点のうち、確度が予め設定されている閾値より低い動きベクトルに基づく点を対象外とする処理を実行する。この処理に必要な動きベクトルの確度は、動き推定部52より供給される。これにより、領域推定範囲内のサンプル点のうち、確度が高い動きベクトルに基づいて推定された点だけが抽出される。
In step S183, the
ステップS184において、領域推定部161は、領域推定範囲内の動き推定結果での全画面動きを抽出する。全画面動きとは、同一の動きに対応する領域を考え、その面積が最大となる動きのことを意味する。具体的には、各サンプル点の動きに、そのサンプル点におけるサンプル点間隔に比例する重みを付けて動きのヒストグラムを生成し、この重み付け頻度が最大となる1つの動き(1つの動きベクトル)が全画面動きとして抽出される。なお、ヒストグラムを生成する場合、例えば、動きの代表値を画素精度で準備し、画素精度で1個となる値を持つ動きについてもヒストグラムへの加算を行うようにすることもできる。
In step S184, the
ステップS185において、領域推定部161は、全画面動きを持つ領域推定範囲内のサンプル点を領域推定の結果として抽出する。この場合における全画面動きを持つサンプル点としては、全画面動きと同一の動きを持つサンプル点はもちろんのこと、全画面動きとの動きの差が予め設定されている所定の閾値以下である場合には、そのサンプル点もここにおける全画面動きを持つサンプル点とすることも可能である。
In step S185, the
このようにして、ステップS143,S144,S206,S208の処理で決定された領域推定範囲内のサンプル点のうち、全画面動きを有するサンプル点が、追尾点と同一対象に属すると推定される点として最終的に抽出(生成)される。 In this way, among the sample points within the area estimation range determined by the processing of steps S143, S144, S206, and S208, the sample point having the full screen motion is estimated to belong to the same target as the tracking point. Is finally extracted (generated).
次に、ステップS186において、領域推定部161は、領域推定範囲の更新処理を実行する。その後、処理は、図10のステップS122に進む。
Next, in step S186, the
図20は、図15のステップS186の領域推定範囲の更新処理の詳細を表している。ステップS201において、領域推定部161は、領域の重心を算出する。この領域とは、図15のステップS185の処理で抽出されたサンプル点で構成される領域(追尾点と同一対象に属すると推定される点で構成される領域)を意味する。すなわち、この領域には1つの動きベクトル(全画面動き)が対応している。例えば、図21Aに示されるように、図中白い四角形で示されるサンプル点のうち、領域推定範囲221内のサンプル点の中から、図15のステップS185の処理で全画面動きを持つサンプル点として、図21Aにおいて黒い四角形で示されるサンプル点が抽出され、そのサンプル点で構成される領域が、領域222として抽出(推定)される。そして、領域222の重心224がさらに算出される。具体的には、各サンプル点にサンプル点間隔の重みを付けたサンプル点重心が領域の重心として求められる。この処理は、現フレームにおける領域の位置を求めるという意味を有する。
FIG. 20 shows details of the region estimation range update processing in step S186 of FIG. In step S201, the
次にステップS202において、領域推定部161は、領域の重心を全画面動きによりシフトする処理を実行する。この処理は、領域推定範囲221を領域の位置の動きに追従させ、次フレームにおける推定位置に移動させるという意味を有する。図21Bに示されるように、現フレームにおける追尾点223が、その動きベクトル238に基づいて次フレームにおいて追尾点233として出現する場合、全画面動きベクトル230が、追尾点の動きベクトル238にほぼ対応しているので、現フレームにおける重心224を動きベクトル230(全画面動き)に基づいてシフトすることで、追尾点233と同一のフレーム(次フレーム)上の点234が求められる。この点234を中心として領域推定範囲231を設定すれば、領域推定範囲221を領域222の位置の動きに追従させて、次のフレームにおける推定位置に移動させることになる。
Next, in step S202, the
ステップS203において、領域推定部161は、領域推定結果に基づき、次の領域推定範囲の大きさを決定する。具体的には、領域と推定された全てのサンプル点に関するサンプル点の間隔(図21Aにおける領域222の中の黒い四角形で示される点の間隔)の2乗和を領域222の面積と見なし、この面積よりも少し大きめの大きさとなるように、次フレームにおける領域推定範囲231の大きさが決定される。すなわち、領域推定範囲231の大きさは、領域222の中のサンプル点の数が多ければ広くなり、少なければ狭くなる。このようにすることで、領域222の拡大縮小に追従することができるばかりでなく、領域推定範囲221内の全画面領域が追尾対象の周辺領域となるのを防ぐことができる。
In step S203, the
図15のステップS184で抽出された全画面動きが、背景動きと一致する場合には、動きにより背景と追尾対象を区別することができない。そこで、背景動き推定部54は背景動き推定処理を常に行っており、ステップS204において、領域推定部161は、背景動き推定部54より供給される背景動きと、図15のステップS184の処理で抽出された全画面動きとが一致するか否かを判定する。全画面動きと背景動きが一致する場合には、ステップS205において、領域推定部161は、次の領域推定範囲の大きさを、今の領域推定範囲の大きさが最大となるように制限する。これにより、背景が追尾対象として誤認識され、領域推定範囲の大きさが拡大してしまうようなことが抑制される。
When the full screen motion extracted in step S184 in FIG. 15 matches the background motion, the background and the tracking target cannot be distinguished by the motion. Therefore, the background
ステップS204において、全画面動きと背景動きが一致しないと判定された場合には、ステップS205の処理は必要がないのでスキップされる。 If it is determined in step S204 that the full screen motion and the background motion do not match, the processing in step S205 is not necessary and is skipped.
次に、ステップS206において、領域推定部161は、シフト後の領域重心を中心として次の領域推定範囲の大きさを決定する。これにより、領域推定範囲が、その重心が既に求めたシフト後の領域重心と一致し、かつ、その大きさが領域の広さに比例するように決定される。
Next, in step S <b> 206, the
図21Bの例では、領域推定範囲231が、動きベクトル(全画面動き)230に基づくシフト後の重心234を中心として、領域222の面積に応じた広さに決定されている。
In the example of FIG. 21B, the
領域推定範囲231内での全画面動きを有する領域が追尾対象(例えば、図12の顔104)の領域であることを担保する(確実にする)必要がある。そこで、ステップS207において、領域推定部161は、追尾点が次の領域推定範囲に含まれるか否かを判定し、含まれていない場合には、ステップS208において、追尾点を含むように次の領域推定範囲をシフトする処理を実行する。追尾点が次の領域推定範囲に含まれている場合には、ステップS208の処理は必要がないのでスキップされる。
It is necessary to ensure (ensure) that the region having the full screen motion within the
この場合における具体的なシフトの方法としては、移動距離が最小となるようにする方法、シフト前の領域推定範囲の重心から追尾点に向かうベクトルに沿って追尾点が含まれるようになる最小距離だけ移動する方法などが考えられる。 As a specific method of shifting in this case, a method of minimizing the moving distance, a minimum distance at which the tracking point is included along a vector from the center of gravity of the region estimation range before the shift to the tracking point A way to move only is considered.
なお、追尾のロバスト性を重視するために、領域に追尾点を含むようにするためのシフトを行わない方法も考えられる。 In order to emphasize the robustness of tracking, a method of not performing a shift to include a tracking point in the region is also conceivable.
図21Cの例においては、領域推定範囲231が追尾点233を含んでいないので、領域推定範囲241として示される位置(追尾点233をその左上に含む位置)に領域推定範囲241がシフトされる。
In the example of FIG. 21C, since the
図21A乃至図21Cは、ステップS208のシフト処理が必要な場合を示しているが、図22A乃至図22Cは、ステップS208のシフト処理が必要でない場合(ステップS207において追尾点が次の領域推定範囲に含まれると判定された場合)の例を表している。 21A to 21C show the case where the shift process of step S208 is necessary, but FIGS. 22A to 22C show the case where the shift process of step S208 is not necessary (the tracking point is the next region estimation range in step S207). Example).
図22A乃至図22Cに示されるように、領域推定範囲221内のすべてのサンプル点が領域の点である場合には、図20のステップS208のシフト処理が必要なくなることになる。
As shown in FIGS. 22A to 22C, when all the sample points in the
なお、図21A乃至図21Cと図22A乃至図22Cは、領域推定範囲が矩形である例を示したが、領域推定範囲は、他の形状(例えば、円形)としてもよい。 21A to 21C and FIGS. 22A to 22C show examples in which the region estimation range is rectangular, but the region estimation range may have another shape (for example, a circle).
以上のようにして、図20(図15のステップS186)の領域推定範囲の更新処理により、次フレームのための領域推定範囲の位置と大きさが追尾点を含むように決定される。 As described above, the position estimation range position and size for the next frame are determined to include the tracking point by the region estimation range update process in FIG. 20 (step S186 in FIG. 15).
図20の領域推定範囲の更新処理においては、領域推定範囲を矩形(または円形)の固定形状としたが、可変形状とすることも可能である。この場合における図15のステップS186における領域推定範囲の更新処理の例について、図23を参照して説明する。 In the update process of the area estimation range in FIG. 20, the area estimation range is a rectangular (or circular) fixed shape, but may be a variable shape. An example of the region estimation range update processing in step S186 in FIG. 15 in this case will be described with reference to FIG.
ステップS231において、領域推定部161は、図15のステップS184の処理で抽出された全画面動きと背景動き推定部164により推定された背景動きとが一致するか否かを判定する。両者の動きが一致しない場合には、ステップS233に進み、領域推定部161は、領域(全画面動きと一致する画素で構成される領域)と推定されたすべての点につき、それぞれに対応する小領域を決定する(1個の点に対して1個の小領域を決定する)。図24Aと図24Bの例においては、領域推定範囲261のうち、図中黒い四角形で示される領域の点に対応する小領域271,272が決定される。図中小領域271は、4つの点に対応する小領域が重なりあった例を示している。小領域の大きさは、例えば、サンプル点の間隔に比例するように決定してもよい。
In step S231, the
次に、ステップS234において、領域推定部161は、ステップS233の処理で決定した各小領域の和の領域を暫定領域推定範囲とする。図24Cの例においては、小領域271と小領域272の和の領域281が暫定領域推定範囲とされる。小領域の和をとった結果、不連続な複数の領域が形成される場合には、その中の最大面積を持つ領域のみを暫定領域推定範囲とすることもできる。
Next, in step S234, the
ステップS231において、全画面動きと背景動きとが一致すると判定された場合には、ステップS232において、領域推定部161は、現在の領域推定範囲を暫定領域推定範囲とする。現在の領域推定範囲を暫定推定領域範囲とするのは、背景動き推定の結果と全画面動きが一致する場合には、動きにより背景と追尾対象を区別することができないので、現在の領域推定範囲を変更しないようにするためである。
If it is determined in step S231 that the full screen motion matches the background motion, in step S232, the
ステップS234またはステップS232の処理の後、ステップS235において領域推定部161は、ステップS234またはステップS232で決定された暫定領域推定範囲の全画面動きによるシフトで、次の領域推定範囲を決定する。図24Dの例においては、暫定領域推定範囲281が全画面動きによる動きベクトル283に基づいてシフトされ、暫定領域推定範囲282とされている。
After the process of step S234 or step S232, in step S235, the
ステップS236において、領域推定部161は、追尾点がステップS235の処理で決定された次の領域推定範囲に含まれるか否かを判定し、含まれない場合には、ステップS237に進み、追尾点を含むように次の領域推定範囲をシフトする。図24Cと図24Dの例においては、領域推定範囲282が追尾点284を含んでいないので、追尾点284を左上に含むようにシフトされ、領域推定範囲291とされている。
In step S236, the
ステップS236において、追尾点が次の領域推定範囲に含まれると判定された場合には、ステップS237のシフト処理は必要ないのでスキップされる。 If it is determined in step S236 that the tracking point is included in the next region estimation range, the shift processing in step S237 is not necessary and is skipped.
次に図14のステップS162における乗り換え候補抽出処理について、図25のフローチャートを参照して説明する。 Next, the transfer candidate extraction process in step S162 of FIG. 14 will be described with reference to the flowchart of FIG.
ステップS261において、乗り換え候補抽出部162は、全画面動きの領域と推定されたすべての点につき、それぞれに対応する推定動きでの点のシフト結果を乗り換え候補として保持する。すなわち、領域推定結果として得られた点をそのまま用いるのではなく、それらを次のフレームでの使用のために、それぞれの動き推定結果に基づきシフトされた結果を抽出する処理が行われ、その抽出された乗り換え候補が、乗り換え候保持部56に供給され、保持される。
In step S261, the transfer
この処理を図12を参照して説明すると、次のようになる。すなわち、図12の例において、フレームn−1,nでは追尾点101が存在するが、フレームn+1においては、図中左側から飛んできたボール121により隠されてしまい、追尾点101が存在しない。そこでフレームn+1において、追尾点を追尾対象としての顔104上の他の点(例えば、左目103(実際には右目102にもっと近接した点))に乗り換える必要が生じる。そこで、乗り換えが実際に必要になる前のフレームで、乗り換え候補を予め用意しておくのである。
This process will be described with reference to FIG. That is, in the example of FIG. 12, the
具体的には、図12の例の場合、フレームnからフレームn+1への領域推定範囲133内での動き推定結果は、領域推定範囲133において乗り換えが必要なことから、正しく推定できない確率が高いことが予想される。すなわち、図12の例では、乗り換えが追尾点と、それと同一の対象物の一部が隠れることに起因して起きる。その結果、フレームnでの領域推定範囲133のうち、フレームn+1で対象が隠れる部分(図12において影を付した部分)134については、動きが正しく推定されず、動きの確度が低いことが推定されるか、または確度が低くないと推定され、かつ、動き推定結果としては意味のないものが得られることになる。
Specifically, in the case of the example in FIG. 12, the motion estimation result in the
このような場合には、領域推定の際に用いることが可能な動き推定結果が減少する、あるいは誤った動き推定結果が混入するなどの理由で、領域推定が誤る可能性が高まる。一方、このような可能性は、一般的に、より時間的に前のフレームn−1からフレームnの間での領域推定においては、フレームnからフレームn+1での間での推定に比較して低くなることが予想される。
In such a case, there is a high possibility that the region estimation is erroneous due to a decrease in motion estimation results that can be used in region estimation or a mixture of erroneous motion estimation results. On the other hand, such a possibility is generally greater in the region estimation between the previous frame n−1 and the frame n in comparison with the estimation between the frame n and the
そこで、リスク低減のため、領域推定結果をそのまま用いるのではなく、前のフレームn−1(あるいは、時間的にもっと前のフレーム)で求めた領域推定結果を、その次のフレームでの移動先の乗り換え候補として用いるのが性能向上の上で望ましい。 Therefore, in order to reduce the risk, the region estimation result is not used as it is, but the region estimation result obtained in the previous frame n-1 (or a frame earlier in time) is used as the movement destination in the next frame. It is desirable to use as a transfer candidate for improving the performance.
図26は、図14のステップS163におけるテンプレート作成処理の詳細を表している。ステップS281においてテンプレート作成部163は、領域(全画面動きの領域)と推定されたすべての点につき、それぞれに対応する小領域を決定する。図27の例においては、領域の点321に対応して小領域322が決定されている。
FIG. 26 shows details of the template creation processing in step S163 of FIG. In step S <b> 281, the
ステップS282において、テンプレート作成部163は、ステップS281の処理で決定された小領域の和の領域をテンプレート範囲に設定する。図27の例においては、小領域322の和の領域がテンプレート範囲331とされている。
In step S282, the
次にステップS283において、テンプレート作成部163は、ステップS282において設定したテンプレート範囲の情報と画像情報からテンプレートを作成し、テンプレート保持部58に供給し、保持させる。具体的には、テンプレート範囲331内の画素データがテンプレートとされる。
In step S283, the
図28は、領域の点321に対応する小領域341が、図27における小領域322に較べてより大きな面積とされている。その結果、小領域341の和の領域のテンプレート範囲351も、図27のテンプレート範囲331に較べてより広くなっている。
In FIG. 28, the
小領域の大きさは、サンプル点の間隔に比例させることが考えられるが、その際の比例定数は、面積がサンプル点間隔の自乗になるように決めることもできるし、それより大きくまたは小さく決めることも可能である。 It is conceivable that the size of the small region is proportional to the interval between the sample points, but the proportionality constant at that time can be determined so that the area becomes the square of the interval between the sample points, or larger or smaller than that. It is also possible.
なお、領域推定結果を用いず、例えば追尾点を中心とする固定の大きさや形状の範囲をテンプレート範囲として用いることも可能である。 For example, a fixed size or shape range centered on the tracking point may be used as the template range without using the region estimation result.
図29は、テンプレートと領域推定範囲の位置関係を表している。テンプレート範囲403には、追尾点405が含まれている。テンプレート範囲403に外接する外接矩形401の図中左上の点がテンプレート基準点404とされている。テンプレート基準点404から追尾点405に向かうベクトル406、並びにテンプレート基準点404から領域推定範囲402の図中左上の基準点408に向かうベクトル407が、テンプレート範囲403の情報とされる。テンプレートは、テンプレート範囲403に含まれる画素で構成される。ベクトル406,407は、テンプレートと同じ画像が検出された際の通常処理への復帰に用いられる。
FIG. 29 shows the positional relationship between the template and the area estimation range. The
以上の処理においては、乗り換え候補の場合と異なり、範囲、画素ともに、現フレームに対応するものをテンプレートとする例を説明したが、乗り換え候補の場合と同様に、次フレームでの移動先をテンプレートとして用いることも可能である。 In the above processing, unlike the case of the transfer candidate, the example in which both the range and the pixel correspond to the current frame is used as the template. However, as in the case of the transfer candidate, the destination in the next frame is set as the template. Can also be used.
以上のようにして、追尾点を含む画素データからなるテンプレートが乗り換え候補と同様に、通常処理中に、予め作成される。 As described above, a template made up of pixel data including a tracking point is created in advance during normal processing in the same manner as a transfer candidate.
図10のステップS126における領域推定関連処理は、領域推定関連処理部55を、例えば図30に示されるように構成することで処理することも可能である。
The region estimation related processing in step S126 of FIG. 10 can be processed by configuring the region estimation related processing
この場合においても、領域推定関連処理部55は、図13における場合と同様に、領域推定部161、乗り換え候補抽出部162、およびテンプレート作成部163により構成されるが、この実施の形態の場合、領域推定部161には、追尾点決定部57より追尾点の情報と入力画像が入力される。乗り換え候補抽出部162には、領域推定部161の出力のみが供給されている。テンプレート作成部163には、領域推定部161の出力と入力画像とが供給されている。
Even in this case, the region estimation related processing
この場合においても、基本的な処理は、図14に示される場合と同様に、ステップS161において、領域推定処理が行われ、ステップS162において、乗り換え候補抽出処理が行われ、ステップS163において、テンプレート作成処理が行われる。このうちのステップS163のテンプレート作成処理は、図26に示した場合と同様であるので、ステップS161の領域推定処理と、ステップS162の乗り換え候補抽出処理についてのみ以下に説明する。 Also in this case, as in the case shown in FIG. 14, the basic processing is performed in step S161, in which region estimation processing is performed, in step S162, transfer candidate extraction processing is performed, and in step S163, template creation is performed. Processing is performed. Of these, the template creation process in step S163 is the same as that shown in FIG. 26, so only the region estimation process in step S161 and the transfer candidate extraction process in step S162 will be described below.
最初に、図31のフローチャートを参照して、ステップS161における領域推定処理の詳細について説明する。ステップS301において、図30の領域推定部161は、追尾点と同一対象に属する画像上の領域を推定するためにサンプル点を決定する。この処理は、図15のステップS181の処理と同様の処理である。
First, the details of the region estimation processing in step S161 will be described with reference to the flowchart in FIG. In step S301, the
ただし、このステップS301の処理において対象とされるフレームは、追尾点を求め終わったフレーム(追尾後の追尾点を含むフレーム)であり、この点、図15のステップS181においてサンプル点を求めるフレームが前フレームであるのと異なる。 However, the target frame in the process of step S301 is a frame for which a tracking point has been obtained (a frame including a tracking point after tracking), and this point is a frame for obtaining a sample point in step S181 of FIG. Different from the previous frame.
次に、このステップS302において、領域推定部161は、次フレーム(ステップS301でサンプル点を決定したフレーム)の画像に空間方向のローパスフィルタを施す処理を実行する。すなわちローパスフィルタを施すことにより、高周波成分が除去され、画像が平滑化される。これにより、次のステップS303における同色領域の成長処理が容易になる。
Next, in step S302, the
次に、ステップS303において、領域推定部161は、追尾点を出発点として、画素値の差分が閾値THimg未満であるという条件で、追尾点の同色領域を成長させ、同色領域に含まれるサンプル点を領域の推定結果とする処理を実行する。領域の推定結果としては、成長させた結果の同色領域に含まれるサンプル点が利用される。
Next, in step S303, the
具体的には、例えば図32Aに示されるように、追尾点421に隣接する8個の方向の画素の画素値が読み取られる。すなわち、上方向、右上方向、右方向、右下方向、下方向、左下方向、左方向、および左上方向の8つの方向に隣接する画素の画素値が読み取られる。読み取られた画素値と追尾点421の画素値との差分が演算される。そして、演算された差分値が閾値THimg以上であるか否かが判定される。図32Aの場合、矢印を付して示される方向の画素値、すなわち上方向、右上方向、下方向、左方向、および左上方向の画素値と追尾点321の差分が閾値THimg未満であり、図中矢印を付さずに示されている方向、すなわち右方向、右下方向、および左下方向の画素値と追尾点421の差分が閾値THimg以上であったとされる。
Specifically, for example, as illustrated in FIG. 32A, pixel values of pixels in eight directions adjacent to the
この場合、図32Bに示されるように、差分が閾値THimg未満である画素(図32Aにおいて、追尾点421に対して矢印で示される方向の画素)が追尾点421と同色領域の画素422として登録される。同様の処理が同色領域に登録された各画素422において行われる。図32Bに示される例では、図中左上の白い円で示される画素422とそれに隣接する画素(既に同色領域であるとの判定が行われた画素を除く)の画素値の差分が演算され、その差分が閾値THimg以上であるか否かが判定される。図32Bの例においては、右方向、右下方向、および下方向の画素は、既に同色領域の判定処理が終了している方向なので、上方向、右上方向、左下方向、左方向、および左上方向においての差分が演算される。そして、この例では、上方向、右上方向、および左上方向の3つの方向の差分が閾値THimg未満とされ、図32Cに示されるように、その方向の画素が追尾点421と同色領域の画素として登録される。
In this case, as shown in FIG. 32B, a pixel whose difference is less than the threshold THimg (a pixel in a direction indicated by an arrow with respect to the
以上のような処理が順次繰り返されることで、図33に示されるように、サンプル点のうち、同色領域431に含まれる点が追尾点421と同一対象物上の点として推定される。
By sequentially repeating the above processing, as shown in FIG. 33, the points included in the
図31に示される領域推定処理(図14のステップS161)に続いて、図30の乗り換え候補抽出部162において実行される図14のステップS162の乗り換え候補抽出処理は、図34のフローチャートに示されるようになる。
Subsequent to the area estimation process shown in FIG. 31 (step S161 in FIG. 14), the transfer candidate extraction process in step S162 in FIG. 14 executed in the transfer
すなわち、ステップS331において、乗り換え候補抽出部162は、領域(同色領域)と推定されたすべての点をそのまま乗り換え候補とし、それを乗り換え候補保持部56に供給し、保持させる。
That is, in step S331, the transfer
図30の領域推定関連処理部55において、図31の領域推定処理(図14のステップS161)、図34の乗り換え候補抽出処理(図14のステップS162)に引き続き、図30のテンプレート作成部163で実行される図14のステップS163のテンプレート作成処理は、図26に示される場合と同様であるので、その説明は省略する。
In the region estimation related processing
ただし、この場合においては、追尾点の同色領域をそのままテンプレートの範囲とすることも可能である。 However, in this case, the same color area of the tracking point can be used as the template range as it is.
以上に説明した図6のステップS51の通常処理に続いて行われるステップS52の例外処理の詳細について、図35のフローチャートを参照して説明する。この処理は、上述したように、図10のステップS124において追尾点の動きを推定することが不可能と判定され、さらにステップS128において追尾点を乗り換える乗り換え候補が選択できなかったと判定された場合に実行されることになる。 Details of the exception process in step S52 performed following the normal process in step S51 of FIG. 6 described above will be described with reference to the flowchart of FIG. As described above, this process is performed when it is determined in step S124 in FIG. 10 that it is impossible to estimate the movement of the tracking point, and in step S128, it is determined that the transfer candidate for changing the tracking point cannot be selected. Will be executed.
ステップS401において、制御部59は、例外処理の初期化処理を実行する。この処理の詳細は図36のフローチャートに示されている。
In step S401, the
ステップS321において、制御部59は、追尾点の追尾ができなくなった際(追尾点の動きを推定することが不可能かつ、追尾点を乗り換える乗り換え候補が選択できなかった際)にシーンチェンジが起きていたか否かを判定する。シーンチェンジ検出部53は、動き推定部52の推定結果に基づいてシーンチェンがあったか否かを常に監視しており、制御部59は、そのシーンチェンジ検出部53の検出結果に基づいて、ステップS421の判定を実行する。シーンチェンジ検出部53の具体的処理については、図47と図48を参照して後述する。
In step S321, the
シーンチェンジが起きている場合、追尾ができなくなった理由がシーンチェンジが発生したことによるものと推定して、ステップS422において制御部19は、モードをシーンチェンジに設定する。これに対して、ステップS421においてシーンチェンジが発生していないと判定された場合には、制御部59は、ステップS423においてモードをその他のモードに設定する。
If a scene change has occurred, it is presumed that the reason why tracking has become impossible is due to the occurrence of a scene change, and in step S422, the
ステップS422またはステップS423の処理の後、ステップS424においてテンプレートマッチング部51は、時間的に最も古いテンプレートを選択する処理を実行する。具体的には、図37に示されるように、例えばフレームnからフレームn+1に移行するとき、例外処理が実行されるものとすると、フレームn−m+1からフレームnに関して生成され、テンプレート保持部58に保持されているm個のフレームのテンプレートの中から、時間的に最も古いテンプレートであるフレームn−m+1に関して生成されたテンプレートが選択される。
After the process of step S422 or step S423, the
このように例外処理への移行直前のテンプレート(図37の例の場合フレームnに関して生成されたテンプレート)を用いずに、時間的に少し前のテンプレートを選択するのは、追尾対象のオクルージョンなどで例外処理への移行が発生した場合には、移行の直前には追尾対象が既にかなり隠れており、その時点のテンプレートでは、追尾対象を充分に大きく捉えることができない可能性が高いからである。従って、このように時間的に若干前のフレームにおけるテンプレートを選択することで、確実な追尾が可能となる。 In this way, the template just before the transition to exception processing (the template generated with respect to frame n in the case of the example in FIG. 37) is used to select a template a little before in time for the occlusion to be tracked or the like. This is because when the transition to exception processing occurs, the tracking target is already considerably hidden immediately before the transition, and it is highly likely that the tracking target cannot be captured sufficiently large in the template at that time. Therefore, reliable tracking is possible by selecting a template in a frame slightly before in time.
次に、ステップS425において、テンプレートマッチング部51は、テンプレート探索範囲を設定する処理を実行する。テンプレート探索範囲は、例えば、例外処理に移行する直前の追尾点の位置がテンプレート探索範囲の中心となるように設定される。
Next, in step S425, the
すなわち、図38に示されるように、フレームnにおいて被写体の顔104の右目102が追尾点101として指定されている場合において、図中左方向からボール121が飛んできて、フレームn+1において追尾点101を含む顔104が隠れ、フレームn+2において、再び追尾点101が現れる場合を想定する。この場合において、追尾点101(テンプレート範囲411に含まれる)を中心とする領域がテンプレート探索範囲412として設定される。
That is, as shown in FIG. 38, when the
ステップS426において、テンプレートマッチング部51は、例外処理への移行後の経過フレーム数およびシーンチェンジ数を0にリセットする。このフレーム数とシーンチェンジ数は、後述する図35のステップS405における継続判定処理(図39のステップS461,S463,S465,S467)において使用される。
In step S426, the
以上のようにして、例外処理の初期化処理が終了した後、図35のステップS402において、制御部59は次のフレームを待つ処理を実行する。ステップS403において、テンプレートマッチング部51は、テンプレート探索範囲内においてテンプレートマッチング処理を行う。ステップS404においてテンプレートマッチング部51は、通常処理への復帰が可能であるか否かを判定する。
After the exception process initialization process is completed as described above, in step S402 in FIG. 35, the
具体的には、テンプレートマッチング処理により、数フレーム前のテンプレート(図38のテンプレート範囲411内の画素)と、テンプレート探索範囲内のマッチング対象の画素の差分の絶対値和が演算される。より詳細には、テンプレート範囲411内の所定のブロックと、テンプレート探索範囲内の所定のブロックにおけるそれぞれの画素の差分の絶対値和が演算される。ブロックの位置がテンプレート範囲411内で順次移動され、各ブロックの差分の絶対値和が加算され、そのテンプレートの位置における値とされる。そして、テンプレートをテンプレート探索範囲内で順次移動させた場合における差分の絶対値和が最も小さくなる位置とその値が検索される。ステップS404において、最小の差分の絶対値和が、予め設定されている所定の閾値と比較される。差分の絶対値和が閾値以下である場合には、追尾点(テンプレートに含まれている)を含む画像が再び出現したことになるので、通常処理への復帰が可能であると判定され、処理は図6のステップS51の通常処理に戻る。
Specifically, the absolute value sum of the difference between the template several frames before (a pixel in the
そして上述したように、図11のステップS141において、例外処理からの復帰であると判定され、ステップS144において、差分絶対値和が最小となる位置をテンプレートのマッチした位置として、このマッチした位置とテンプレートに対応して保持してあったテンプレート位置と追尾点領域推定範囲の位置関係から、追尾点と領域推定範囲の設定が行われる。すなわち、図29を参照して説明したように、追尾点405を基準とするベクトル406,407に基づいて、領域推定範囲402が設定される。
Then, as described above, in step S141 in FIG. 11, it is determined that the return from the exception processing is performed, and in step S144, the position where the difference absolute value sum is minimum is set as the matched position of the template, The tracking point and area estimation range are set based on the positional relationship between the template position and the tracking point area estimation range held corresponding to the template. That is, as described with reference to FIG. 29, the
ただし、図14のステップS161の領域推定処理において、領域推定範囲を用いない手法を用いる場合(例えば、図31に示される領域推定処理が用いられる場合)には、領域推定範囲の設定は行われない。 However, in the region estimation process in step S161 of FIG. 14, when a method that does not use the region estimation range is used (for example, when the region estimation process shown in FIG. 31 is used), the region estimation range is set. Absent.
図35のステップS404における通常処理への復帰が可能であるか否かの判定は、最小の差分絶対値和をテンプレートのアクティビティで除算して得られる値を閾値と比較することで行うようにしてもよい。この場合におけるアクティビティは、後述する図40のアクティビティ算出部602により、図41のステップS603において算出された値を用いることができる。
The determination as to whether or not it is possible to return to normal processing in step S404 in FIG. 35 is performed by comparing the value obtained by dividing the minimum sum of absolute differences by the activity of the template with a threshold value. Also good. As the activity in this case, the value calculated in step S603 of FIG. 41 by the
あるいはまた、今回の最小の差分絶対値和を1フレーム前における最小の差分絶対値和で除算することで得られた値を所定の閾値と比較することで、通常処理への復帰が可能であるか否かを判定するようにしてもよい。この場合、アクティビティの計算が不要となる。すなわち、ステップS404では、テンプレートとテンプレート探索範囲の相関が演算され、相関値と閾値の比較に基づいて判定が行われる。 Alternatively, it is possible to return to the normal processing by comparing a value obtained by dividing the current minimum absolute difference sum by the minimum absolute difference sum one frame before with a predetermined threshold. It may be determined whether or not. In this case, it is not necessary to calculate the activity. That is, in step S404, the correlation between the template and the template search range is calculated, and determination is performed based on the comparison between the correlation value and the threshold value.
ステップS404において、通常処理への復帰が可能ではないと判定された場合、ステップS405に進み、継続判定処理が実行される。継続判定処理の詳細は、図39のフローチャートを参照して後述するが、これにより、追尾処理が継続可能であるか否かの判定が行われる。 If it is determined in step S404 that it is not possible to return to the normal process, the process proceeds to step S405, and the continuation determination process is executed. The details of the continuation determination process will be described later with reference to the flowchart of FIG. 39, and thereby, it is determined whether or not the tracking process can be continued.
ステップS406において、制御部59は、追尾点の追尾が継続可能であるか否かを継続判定処理の結果に基づいて(後述する図39のステップS466,S468で設定されたフラグに基づいて)判定する。追尾点の追尾処理が継続可能である場合には、処理はステップS302に戻り、それ以降の処理が繰り返し実行される。すなわち、追尾点が再び出現するまで待機する処理が繰り返し実行される。
In step S406, the
これに対して、ステップS406において、追尾点の追尾処理が継続可能ではないと判定された場合(後述する図39のステップS465で、追尾点が消失した後の経過フレーム数が閾値THfr以上と判定されるか、または、ステップS467でシーンチェンジ数が閾値THsc以上と判定された場合)、最早、追尾処理は不可能として、追尾処理は終了される。 On the other hand, when it is determined in step S406 that the tracking point tracking process cannot be continued (in step S465 of FIG. 39 described later, it is determined that the number of elapsed frames after the tracking point disappears is greater than or equal to the threshold value THfr. Or when it is determined in step S467 that the number of scene changes is equal to or greater than the threshold value THsc), the tracking process is terminated as the tracking process is no longer possible.
図39は、図35のステップS405における継続判定処理の詳細を表している。ステップS461において、制御部59は、変数としての経過フレーム数に1を加算する処理を実行する。経過フレーム数は、図35のステップS401の例外処理の初期化処理(図36のステップS426)において、予め0にリセットされている。
FIG. 39 shows the details of the continuation determination process in step S405 of FIG. In step S461, the
次にステップS462において、制御部59は、シーンチェンジがあるか否かを判定する。シーンチェンジがあるか否かは、シーンチェンジ検出部53が、常にその検出処理を実行しており、その検出結果に基づいて判定が可能である。シーンチェンジがある場合には、ステップS463に進み、制御部59は変数としてのシーンチェンジ数に1を加算する。このシーンチェンジ数も、図36のステップS426の初期化処理において0にリセットされている。通常処理から例外処理への移行時にシーンチェンジが発生していない場合には、ステップS463の処理はスキップされる。
Next, in step S462, the
次に、ステップS464において、制御部59は、現在設定されているモードがシーンチェンジであるか否かを判定する。このモードは、図36のステップS422,S423において設定されたものである。現在設定されているモードがシーンチェンジである場合には、ステップS467に進み、制御部59は、シーンチェンジ数が予め設定されている閾値THscより小さいか否かを判定する。シーンチェンジ数が閾値THscより小さい場合には、ステップS466に進み、制御部59は継続可のフラグを設定し、シーンチェンジ数が閾値THsc以上である場合には、ステップS468に進み、継続不可のフラグを設定する。
Next, in step S464, the
一方、ステップS464において、モードがシーンチェンジではないと判定された場合(モードがその他であると判定された場合)、ステップS465に進み、制御部59は、経過フレーム数が閾値THfrより小さいか否かを判定する。この経過フレーム数も、図36の例外処理の初期化処理のステップS426において、予め0にリセットされている。経過フレーム数が閾値THfrより小さいと判定された場合には、ステップS466において、継続可のフラグが設定され、経過フレーム数が閾値THfr以上であると判定された場合には、ステップS468において、継続不可のフラグが設定される。
On the other hand, when it is determined in step S464 that the mode is not a scene change (when it is determined that the mode is other), the process proceeds to step S465, and the
このように、テンプレートマッチング処理時におけるシーンチェンジ数が閾値THsc以上になるか、または経過フレーム数が閾値THfr以上になった場合には、それ以上の追尾処理は不可能とされる。 As described above, when the number of scene changes during the template matching process is equal to or greater than the threshold value THsc, or when the number of elapsed frames is equal to or greater than the threshold value THfr, no further tracking process is possible.
なお、モードがその他である場合には、シーンチェンジ数が0であるという条件も加えて、継続が可能であるか否かを判定するようにしてもよい。 When the mode is other, a condition that the number of scene changes is 0 may be added to determine whether or not continuation is possible.
以上においては、画像のフレームを処理単位とし、すべてのフレームを用いることを前提としたが、フィールド単位で処理したり、すべてのフレームまたはフィールドを利用するのではなく、所定の間隔で間引いて抽出されたフレームまたはフィールドを用いるようにすることも可能である。 In the above, it is assumed that the frame of the image is used as a processing unit and all frames are used. However, processing is not performed in units of fields or using all frames or fields, but is extracted by thinning out at a predetermined interval. It is also possible to use a modified frame or field.
次に、図40を参照して、図5の動き推定部52の構成例について説明する。この実施の形態においては、入力画像が、評価値算出部601、アクティビティ算出部602、および動きベクトル検出部606に供給されている。評価値算出部601は、動きベクトルにより対応付けられる両対象の一致度に関する評価値を算出し、正規化処理部604に供給する。アクティビティ算出部602は、入力画像のアクティビティを算出し、閾値判定部603と正規化処理部604に供給する。動きベクトル検出部606は、入力画像から動きベクトルを検出し、評価値算出部601と統合処理部605に供給する。
Next, a configuration example of the
正規化処理部604は、評価値算出部601より供給された評価値を、アクティビティ算出部602より供給されたアクティビティに基づいて正規化し、得られた値を統合処理部605に供給する。閾値判定部603は、アクティビティ算出部602より供給されたアクティビティを所定の閾値と比較し、その判定結果を統合処理部605に供給する。統合処理部605は、正規化処理部604から供給された正規化情報と、閾値判定部603より供給された判定結果に基づいて、動きベクトルの確度を演算し、得られた確度を動きベクトル検出部606より供給された動きベクトルとともに出力する。
The
次に、図41のフローチャートを参照して、動き推定部52の動き推定処理について説明する。動きベクトルは、点に対するものとして求められているが、その確度は、動きベクトルにより対応付けられる2つの点の近傍の、例えば点を中心とする、小ブロックの画像データを用いて計算される。ステップS601において、動きベクトル検出部606は、入力画像から動きベクトルを検出する。この検出には、例えばブロックマッチング方式や勾配法が用いられる。検出された動きベクトルは、評価値算出部601と統合処理部605に供給される。
Next, the motion estimation process of the
ステップS602において、評価値算出部601は評価値を算出する。具体的には、例えば、動きベクトルで対応付けられる2つの点を中心とする2つのブロックの画素値の差分絶対値和が算出される。すなわち、ステップS601で動きベクトル検出部606により検出された動きベクトルV(vx,vy)と、それに基づく時間的に前のフレームの画像Fi上の点P(Xp,Yp)、並びに時間的に後のフレームの画像Fj上の点Q(Xq,Yq)の関係は次式で表される。
Q(Xq,Yq)=P(Xp,Yp)+V(vx,vy) ・・・(1)
In step S602, the evaluation
Q (Xq, Yq) = P (Xp, Yp) + V (vx, vy) (1)
評価値算出部601は点Pを中心とするブロックと、点Qを中心とするブロックについて、次式に基づいて評価値Eval(P,Q,i,j)を演算する。
The evaluation
各ブロックは、1辺が2L+1画素の正方形とされている。上記式における総和ΣΣは、xが−LからLについて、yが−LからLについて、対応する画素同士で行われる。従って、例えば、L=2である場合、9個の差分が得られ、その絶対値の総和が演算される。評価値は、その値が0に近づくほど、2つのブロックがよく一致していることを表している。 Each block is a square having 2L + 1 pixels on one side. The summation ΣΣ in the above equation is performed between corresponding pixels when x is from −L to L and y is from −L to L. Therefore, for example, when L = 2, nine differences are obtained, and the sum of the absolute values is calculated. The evaluation value indicates that the two blocks match well as the value approaches zero.
評価値算出部601は、生成した評価値を正規化処理部604に供給する。
The evaluation
ステップS603において、アクティビティ算出部602は、入力画像からアクティビティを算出する。アクティビティは、画像の複雑さを表す特徴量であり、図42に示されるように、各画素毎に注目画素Y(x,y)と、それに隣接する8画素Y(x+i,y+j)との差分絶対値和の平均値が、注目画素位置のアクティビティActivity(x,y)として次式に基づいて演算される。
In step S603, the
図42の例の場合、3×3画素のうち、中央に位置する注目画素Y(x,y)の値は110であり、それに隣接する8個の画素の値は、それぞれ80,70,75,100,100,100,80,80であるから、アクティビティActivity(x,y)は次式で表される。 In the case of the example in FIG. 42, the value of the pixel of interest Y (x, y) located in the center among 3 × 3 pixels is 110, and the values of the eight pixels adjacent to it are 80, 70, and 75, respectively. , 100, 100, 100, 80, 80, the activity Activity (x, y) is expressed by the following equation.
Activity(x,y) ={|80−110|+|70−110|+|75−110|+|100−110|+|100−110|+|100−110|+|80−110|+|80−110|}/8 =24.375となる。 Activity (x, y) = {| 80-110 | + | 70-110 | + | 75-110 | + | 100-110 | + | 100-110 | + | 80-110 | + | 80−110 |} /8=24.375.
同様の処理が、そのフレームのすべての画素について実行される。 Similar processing is performed for all pixels in the frame.
ブロック単位で動きベクトル確度を算出するため、次式で表されるブロック内の全画素のアクティビティの総和が、そのブロックのアクティビティ(ブロックアクティビティ)Blockactivity(i,j)と定義される。 In order to calculate the motion vector accuracy in units of blocks, the sum of the activities of all the pixels in the block expressed by the following equation is defined as the activity (block activity) Blockactivity (i, j) of the block.
なお、アクティビティとしては、この他、分散値、ダイナミックレンジなどとすることも可能である。 In addition, the activity may be a variance value, a dynamic range, or the like.
閾値判定部603は、ステップS604において、アクティビティ算出部602により算出されたブロックアクティビティを予め設定されている所定の閾値と比較する。そして、入力されたブロックアクティビティが閾値より大きいか否かを表すフラグを統合処理部605に出力する。
In step S604, the
具体的には、実験の結果、ブロックアクティビティと評価値は、動きベクトルをパラメータとして、図43に示される関係を有する。図43において、横軸はブロックアクティビティBlockactivity(i,j)を表し、縦軸は評価値Evalを表している。動きが正しく検出されている場合(正しい動きベクトルが与えられている場合)、そのブロックアクティビティと評価値の値は、曲線621より図中下側の領域R1に分布する。これに対して誤った動き(不正解の動きベクトル)が与えられた場合、そのブロックアクティビティと評価値の値は、曲線622より、図中左側の領域R2に分布する(曲線622より上側の領域R2以外の領域と曲線621より下側の領域R1以外の領域には殆ど分布がない)。曲線621と曲線622は、点Pにおいて交差する。この点Pにおけるブロックアクティビティの値が閾値THaとされる。閾値THaは、ブロックアクティビティの値がそれより小さい場合には、対応する動きベクトルが正しくない可能性があることを意味する(この点については後に詳述する)。閾値判定部603は、アクティビティ算出部602より入力されたブロックアクティビティの値が、この閾値THaより大きいか否かを表すフラグを統合処理ブロック605に出力する。
Specifically, as a result of the experiment, the block activity and the evaluation value have the relationship shown in FIG. 43 using the motion vector as a parameter. In FIG. 43, the horizontal axis represents the block activity Blockactivity (i, j), and the vertical axis represents the evaluation value Eval. When the motion is correctly detected (when the correct motion vector is given), the block activity and the value of the evaluation value are distributed in the region R1 below the
ステップS605において、正規化処理部604は、正規化処理を実行する。具体的には、正規化処理部604は、次式に従って動きベクトル確度VCを演算する。
In step S605, the
VC=1−評価値/ブロックアクティビティ ・・・(5) VC = 1-evaluation value / block activity (5)
但し、動きベクトル確度VCの値が0未満となる場合にはその値を0に置き換える。動きベクトル確度VCのうち、評価値をブロックアクティビティで割り算して得られた値は、その値によって規定される図43のグラフ上の位置が、原点Oと点Pを結ぶ傾きが1の直線623より、図中下側の領域内であるのか、図中上側の領域内であるのかを表す。すなわち、直線623の傾きは1であり、評価値をブロックアクティビティで割り算して得られた値が1より大きければ、その値に対応する点は、直線623の上側の領域に分布する点であることを意味する。そしてこの値を1から減算して得られる動きベクトル確度VCは、その値が小さい程、対応する点が領域R2に分布する可能性が高いことを意味する。
However, if the value of the motion vector accuracy VC is less than 0, the value is replaced with 0. Of the motion vector accuracy VC, the value obtained by dividing the evaluation value by the block activity is a
これに対して、評価値をブロックアクティビティで割り算して得られた値が1より小さければ、その値に対応する点は、直線623の図中下側の領域に分布することを意味する。そして、そのときの動きベクトル確度VCは、その値が大きい程(0に近い程)、対応する点が領域R1に分布することを意味する。正規化処理部604は、このようにして演算して得られた動きベクトル確度VCを統合処理部605に出力する。
On the other hand, if the value obtained by dividing the evaluation value by the block activity is smaller than 1, it means that the points corresponding to the value are distributed in the lower area of the
ステップS606において、統合処理部605は、統合処理を実行する。この統合処理の詳細は、図44のフローチャートに示されている。
In step S606, the
統合処理部605は、ステップS631において、ブロックアクティビティが閾値THa以下か否かを判定する。この判定は、閾値判定部603より供給されたフラグに基づいて行われる。ブロックアクティビティが閾値THa以下である場合には、ステップS632において統合処理部605は、正規化処理部604が算出した動きベクトル確度VCの値を0に設定する。ステップS631において、アクティビティの値が閾値THaより大きいと判定された場合には、ステップS632の処理はスキップされ、正規化処理部604で生成された動きベクトル確度VCの値が、そのまま動きベクトルとともに出力される。
In step S631, the
これは、正規化処理部604において演算された動きベクトルの確度VCの値が正であったとしても、ブロックアクティビティの値が閾値THaより小さい場合には、正しい動きベクトルが得られていない可能性があるからである。すなわち、図43に示されるように、原点Oと点Pの間においては、曲線622が、曲線621より図中下側に(直線623より下側に)突出することになる。ブロックアクティビティの値が閾値Thaより小さい区間であって、曲線621と曲線622において囲まれる領域R3においては、評価値をブロックアクティビティで割り算して得られる値は、領域R1とR2の両方に分布し、正しい動きベクトルが得られていない可能性が高い。そこで、このような分布状態である場合には、動きベクトルの確度は低いものとして処理するようにする。このため、ステップS632において、動きベクトル確度VCは、その値が正であったとしても、閾値Thaより小さい場合には、0に設定される。このようにすることで、動きベクトル確度VCの値が正である場合には、正しい動きベクトルが得られている場合であることを確実に表すことが可能となる。しかも、動きベクトル確度VCの値が大きい程、正しい動きベクトルが得られている確率が高くなる(分布が領域R1に含まれる確率が高くなる)。
This is because there is a possibility that a correct motion vector is not obtained if the block activity value is smaller than the threshold value THa even if the value of the motion vector accuracy VC calculated by the
このことは、一般的に、輝度変化が少ない領域(アクティビティが小さい領域)では信頼性が高い動きベクトルを検出することが困難であるとの経験上の法則とも一致する。 This coincides with an empirical rule that, in general, it is difficult to detect a motion vector with high reliability in a region where the luminance change is small (region where the activity is small).
図45は,図5の背景動き推定部54の構成例を表している。この構成例においては、背景動き推定部54は、頻度分布算出部651と背景動き決定部652により構成されている。
FIG. 45 illustrates a configuration example of the background
頻度分布算出部651は、動きベクトルの頻度分布を算出する。ただし、この頻度には、動き推定部12より供給される動きベクトル確度VCを用いることで、確からしい動きに重みが与えられるように、重み付けが行われる。背景動き決定部652は、頻度分布算出部651により算出された頻度分布に基づいて、頻度が最大となる動きを背景動きとして決定する処理を行い、領域推定関連処理部55へ出力する。
The frequency
図46を参照して、背景動き推定部54の背景動き推定処理について説明する。
The background motion estimation process of the background
ステップS651において、頻度分布算出部651は、動き頻度分布を算出する。具体的には、頻度分布算出部651は、背景動きの候補としての動きベクトルのx座標とy座標がそれぞれ基準点から±16画素分の範囲で表されるとすると、1089個(=16×2+1)×(16×2+1))の箱、すなわち動きベクトルがとり得る値に対応する座標分の箱を用意し、動きベクトルが発生した場合、その動きベクトルに対応する座標に1を加算する。このようにすることで、動きベクトルの頻度分布を算出することができる。
In step S651, the frequency
ただし、1個の動きベクトルが発生した場合、1を加算していくと、確度が低い動きベクトルの発生頻度が多い場合、その確実性が低い動きベクトルが背景動きとして決定されてしまう恐れがある。そこで、頻度分布算出部651は、動きベクトルが発生した場合、その動きベクトルに対応する箱(座標)に、値1を加算するのではなく、値1に動きベクトル確度VCを乗算した値(=動きベクトル確度VCの値)を加算する。動きベクトル確度VCの値は、0から1の間の値として正規化されており、その値が1に近いほど確度が高い値である。従って、このようにして得られた頻度分布は、動きベクトルをその確度に基づいて重み付けした頻度分布となる。これにより、確度の低い動きが背景動きとして決定される恐れが少なくなる。
However, when one motion vector is generated, if 1 is added, if the frequency of occurrence of a motion vector with low accuracy is high, a motion vector with low certainty may be determined as the background motion. . Therefore, when a motion vector is generated, the frequency
次に、ステップS652において、頻度分布算出部651は、動き頻度分布を算出する処理を全ブロックについて終了したか否かを判定する。まだ処理していないブロックが存在する場合には、ステップS651に戻り、次のブロックについてステップS651の処理が実行される。
Next, in step S652, the frequency
以上のようにして、全画面に対して動き頻度分布算出処理が行われ、ステップS652において、全ブロックの処理が終了したと判定された場合、ステップS653に進み、背景動き決定部652は、頻度分布の最大値を検索する処理を実行する。すなわち、背景動き決定部652は、頻度分布算出部651により算出された頻度の中から最大の頻度のものを選択し、その頻度に対応する動きベクトルを背景動きの動きベクトルとして決定する。この背景動きの動きベクトルは、領域推定関連処理部55に供給され、例えば、図20のステップS204や図23のステップS231の全画面動きと背景動きが一致するか否かの判定処理に用いられる。
As described above, the motion frequency distribution calculation process is performed on the entire screen, and when it is determined in step S652 that the processing of all blocks has been completed, the process proceeds to step S653, and the background motion determination unit 652 A process for searching for the maximum value of the distribution is executed. That is, the background
図47は、図5のシーンチェンジ検出部53の詳細な構成例を表している。この例においては、動きベクトル確度平均算出部671と閾値判定部672によりシーンチェンジ検出部53が構成されている。
FIG. 47 shows a detailed configuration example of the scene
動きベクトル確度平均算出部671は、動き推定部52より供給された動きベクトル確度VCの全画面の平均値を算出し、閾値判定部672に出力する。閾値判定部672は、動きベクトル確度平均算出部671より供給された平均値を、予め定められている閾値と比較し、その比較結果に基づいて、シーンチェンジであるか否かを判定し、判定結果を制御部59に出力する。
The motion vector accuracy
次に、図48のフローチャートを参照して、シーンチェンジ検出部53の動作について説明する。ステップS681において、動きベクトル確度平均算出部671は、ベクトル確度の総和を算出する。具体的には、動きベクトル確度平均算出部671は、動き推定部52の統合処理部605より出力された各ブロック毎に算出された動きベクトル確度VCの値を加算する処理を実行する。ステップS682において、動きベクトル確度平均算出部671は、ベクトル確度VCの総和を算出する処理が全ブロックについて終了したか否かを判定し、まだ終了していない場合には、ステップS681の処理を繰り返す。この処理を繰り返すことで、1画面分の各ブロックの動きベクトル確度VCの総和が算出される。ステップS682において1画面全部についての動きベクトル確度VCの総和の算出処理が終了したと判定された場合、ステップS683に進み、動きベクトル確度平均算出部671は、ベクトル確度VCの平均値を算出する処理を実行する。具体的には、ステップS681の処理で算出された1画面分のベクトル確度VCの総和を、足し込まれたブロック数で除算して得られた値が平均値として算出される。
Next, the operation of the scene
ステップS684において、閾値判定部672は、ステップS683の処理で動きベクトル確度平均算出部671により算出された動きベクトル確度VCの平均値を、予め設定されている閾値と比較し、閾値より小さいか否かを判定する。一般的に、動画中の時刻が異なる2フレーム間でシーンチェンジが発生すると、対応する画像が存在しないため、動きベクトルを算出しても、その動きベクトルは確からしくないことになる。そこで、ベクトル確度VCの平均値が閾値より小さい場合には、ステップS685において、閾値判定部672はシーンチェンジフラグをオンし、閾値より小さくない場合(閾値以上である場合)、ステップS586において、シーンチェンジフラグをオフにする。シーンチェンジフラグのオンは、シーンチェンジがあったことを表し、そのオフは、シーンチェンジが無いことを表す。
In step S684, the threshold
このシーンチェンジフラグは、制御部59へ供給され、図36のステップS421におけるシーンチェンジの有無の判定、並びに図39のステップS462のシーンチェンジの有無の判定に利用される。
The scene change flag is supplied to the
以上のように、図1のオブジェクト追尾部26を構成することにより、追尾すべきオブジェクト51(図3)が回転したり、オクルージョンが発生したり、あるいはシーンチェンジにより、オブジェクト51の追尾点51Aが一時的に表示されなくなるような場合でも、画像の中で移動するオブジェクト51(追尾点51A)を正確に追尾することができる。
As described above, by configuring the
このようにして追尾されるオブジェクト51の追尾点51Aの位置情報が、図1のオブジェクト追尾部26による追尾結果としてエリア設定部25に出力されることにより、エリア設定部25によって、上述したように補正対象エリア52が設定される。そして、画像補正部22が補正対象エリア52の中の画像のぼけ(フォーカスぼけ)を除去する。
The position information of the
次に、図1の画像補正部22の詳細な構成例と、その動作について説明する。図49は、画像補正部22の詳細な構成例を示すブロック図である。この例では画像補正部22に、エリア設定部25の出力信号に基づいて制御信号を生成し、その制御信号を各部に供給する制御信号生成部741、入力画像の特徴を検出する画像特徴検出部742、制御信号に基づいて、アドレスの演算を行うアドレス演算部743、アドレス演算部743により演算されたアドレスに基づいて、予め記憶された所定の係数を出力する係数ROM744、および入力画像の中の所定の領域に対応する複数の画素を抽出する領域抽出部745が設けられている。
Next, a detailed configuration example and operation of the
また、領域抽出部745から出力された画素のレベルに対して、係数ROM744から出力された係数に基づく積和演算を行い、新たに修正された画素レベルを出力する積和演算部746、および積和演算部746の出力結果と制御信号に基づいて、補正対象エリア52内の画像と、背景53を合成し、出力する画像合成部747が設けられている。
Also, a product-
図50は、制御信号生成部741が生成する制御信号の例を示す図である。制御信号Aは、入力画像の中の修正すべき部分(補正対象エリア52)を特定する信号であり、エリア設定部25の出力に基づいて生成され、領域抽出部745と画像合成部747に供給される。制御信号Bは、後述するぼけの度合いを表すパラメータσを特定する信号であり、アドレス演算部743に供給される。パラメータσの値は、例えば、制御部27を介して行われる、ユーザの指定に基づいて特定されるようにしてもよいし、予め設定されるようにしてもよい。
FIG. 50 is a diagram illustrating an example of a control signal generated by the control
制御信号Cは、後述するぼけのモデル式を解くために用いられる関係式の重みWaの切り替えを指定する信号であり、アドレス演算部743に供給される。制御信号Dは、画像の特徴を検出するとき用いられる閾値の切り替えを指定する信号であり、画像特徴検出部742に供給される。制御信号CとDについては、監視カメラシステム1の特性などを考慮して予め設定されるようにしてもよいし、制御部27を介して行われる、ユーザの指定に基づいて生成されるようにしてもよい。
The control signal C is a signal for designating switching of the weight Wa of the relational expression used for solving a blur model expression described later, and is supplied to the
次に、画像のぼけの原理について説明する。いま、カメラのピントが適正に設定され被写体がフォーカスぼけしていない画像の画素のレベルXを真値とし、カメラのピントが外れて被写体がフォーカスぼけした画像の画素のレベルYを観測値とする。画像を構成する複数の画素を表現するために、画像の水平方向の座標をxであらわし、垂直方向の座標をyで表すと、真値は、X(x,y)で表され、観測値は、Y(x,y)で表すことができる。 Next, the principle of image blur will be described. Now, the pixel level X of the image in which the camera is properly set and the subject is not out of focus is set as a true value, and the pixel level Y of the image in which the subject is out of focus and the subject is out of focus is set as an observation value. . In order to express a plurality of pixels constituting an image, if the horizontal coordinate of the image is represented by x and the vertical coordinate is represented by y, the true value is represented by X (x, y), and the observed value Can be represented by Y (x, y).
本発明では、ぼけのモデル式として、式(6)を適用する。式(6)においては、式(7)に示されるガウス関数を用い、真値X(x,y)にガウス関数を畳み込むことにより観測値Y(x,y)が得られる。 In the present invention, Expression (6) is applied as a blur model expression. In equation (6), the observed value Y (x, y) is obtained by convolution of the Gaussian function with the true value X (x, y) using the Gaussian function shown in equation (7).
式(6)において、パラメータσは、ぼけの度合いを表すパラメータである。 In equation (6), the parameter σ is a parameter representing the degree of blur.
式(6)によれば、1つの観測値Y(x,y)は、変数iとj(−r<i<r,−r<j<r)により変化する複数の真値X(x+i,y+j)を係数Wで重みづけすることにより求められる。従って、ぼけのない画像の1つの画素のレベルは、ぼけた画像の複数の画素のレベルに基づいて得られたものとされる。 According to the equation (6), one observation value Y (x, y) is a plurality of true values X (x + i, r) that vary depending on variables i and j (−r <i <r, −r <j <r). y + j) is obtained by weighting with a coefficient W. Therefore, the level of one pixel of the image having no blur is obtained based on the levels of a plurality of pixels of the blurred image.
また、上述したパラメータσの値により画像のぼけの度合いが変化する。パラメータσの値が比較的小さい場合、真値の情報が観測値において広範囲に拡散されておらず、比較的ぼけの小さい画像となる。これに対して、パラメータσの値が比較的大きい場合、真値の情報が観測値において広範囲に拡散され、比較的ぼけの大きい画像となる。 Further, the degree of blurring of the image changes depending on the value of the parameter σ described above. When the value of the parameter σ is relatively small, the true value information is not diffused over a wide range in the observed value, and the image is relatively blurred. On the other hand, when the value of the parameter σ is relatively large, true value information is diffused over a wide range in the observed value, resulting in an image with relatively large blur.
このように、パラメータσの値の変化により、画像のぼけの度合いは変化する。このため、画像のぼけを正確に修正するためには、パラメータσの値を適切に求める必要がある。本発明においては、パラメータσの値をユーザが指定する。あるいは、監視カメラシステム1の特性などが考慮され、最適な値が予め設定されるようにしてもよい。
As described above, the degree of blurring of the image changes due to the change in the value of the parameter σ. For this reason, in order to correct the blur of the image accurately, it is necessary to appropriately obtain the value of the parameter σ. In the present invention, the user specifies the value of the parameter σ. Alternatively, an optimum value may be set in advance in consideration of the characteristics of the
図51乃至図54を参照して、画像のぼけの原理についてさらに詳しく説明する。図51Aは、簡単のため、画素が水平方向に一次元に配列されたものとして、ある画像における、真値X0乃至X8を表す図である。図51Cは、図51Aに対応する観測値を表す図である。図51Bは、係数W(i)の大きさを棒グラフ状に表した図である。この例では、変数iが、−2<i<2とされ、中央の棒グラフが、係数W(0)とされ、左端の棒グラフから順番に係数W(-2),W(-1),W(0),W(1),W(2)とされる。 The principle of image blur will be described in more detail with reference to FIGS. FIG. 51A is a diagram showing true values X0 to X8 in an image on the assumption that pixels are arranged one-dimensionally in the horizontal direction for the sake of simplicity. FIG. 51C is a diagram illustrating observation values corresponding to FIG. 51A. FIG. 51B is a diagram showing the magnitude of the coefficient W (i) in a bar graph shape. In this example, the variable i is set to −2 <i <2, the center bar graph is set to the coefficient W (0), and the coefficients W (−2), W (−1), W in order from the leftmost bar graph. (0), W (1), and W (2).
ここで、式(6)に基づいて、図51Cの観測値Y2を求めると、次のようになる。 Here, based on the equation (6), the observed value Y2 in FIG. 51C is obtained as follows.
Y2=W(-2)X2+W(-1)X3+W(0)X4+W(1)X5+W(2)X6 Y2 = W (-2) X2 + W (-1) X3 + W (0) X4 + W (1) X5 + W (2) X6
同様にして、図51Cの観測値Y0を求める場合、真値の中で、図52の枠790−1で示される部分に基づいて、演算を行うことにより、次のように観測値Y0が求められる。 Similarly, when the observed value Y0 in FIG. 51C is obtained, the observed value Y0 is obtained as follows by performing an operation based on the portion indicated by the frame 790-1 in FIG. 52 in the true value. It is done.
Y0=W(-2)X0+W(-1)X1+W(0)X2+W(1)X3+W(2)X4 Y0 = W (-2) X0 + W (-1) X1 + W (0) X2 + W (1) X3 + W (2) X4
さらに、観測値Y1を求める場合、図52の枠790−2で示される部分に基づいて、演算を行うことにより、次のように観測値Y1が求められる。 Further, when the observed value Y1 is obtained, the observed value Y1 is obtained as follows by performing an operation based on the portion indicated by the frame 790-2 in FIG.
Y1=W(-2)X1+W(-1)X2+W(0)X3+W(1)X4+W(2)X5 Y1 = W (-2) X1 + W (-1) X2 + W (0) X3 + W (1) X4 + W (2) X5
Y3、Y4についても、同様にして求めることができる。 Y3 and Y4 can be similarly determined.
図53と図54は、図51Aと図51Cの関係を2次元で表したものである。すなわち、図53を構成する各画素のレベルは、観測値であり、図54を構成する各画素のレベルを真値として、得られたものである。この場合、図53における画素Aに対応する観測値Y(x,y)は次のようにして求められる。 53 and 54 are two-dimensional representations of the relationship between FIGS. 51A and 51C. That is, the level of each pixel constituting FIG. 53 is an observed value, and the level of each pixel constituting FIG. 54 is obtained as a true value. In this case, the observed value Y (x, y) corresponding to the pixel A in FIG. 53 is obtained as follows.
(Y (x, y) = W(-2,-2)X(x-2, y-2) +W(-1,-2)X(x-1, y-2) +W(0,.2)X(x, y-2). . . +W(2, 2)X(x+2, y+ 2) (Y (x, y) = W (-2, -2) X (x-2, y-2) + W (-1, -2) X (x-1, y-2) + W (0, .2) X (x, y-2) ... + W (2, 2) X (x + 2, y + 2)
すなわち、図53の画素Aに対応する観測値は、図54において画素A'(画素Aに対応する)を中心として枠aで示される25(=5×5)個の画素に対応する真値に基づいて求められる。同様に、図53の画素B(画素Aの図中右隣の画素)に対応する観測値は、図54において、画素B'(画素Bに対応する)を中心とした25個の画素に対応する真値に基づいて求められ、図53の画素Cに対応する観測値は、図54において、画素C'(画素Cに対応する)を中心とした25個の画素に対応する真値に基づいて求められる。図53の画素BとCに対応する観測値Y(x+1,y)とY(x+2,y)を求める式を次に示す。 That is, the observed value corresponding to the pixel A in FIG. 53 is a true value corresponding to 25 (= 5 × 5) pixels indicated by a frame a centering on the pixel A ′ (corresponding to the pixel A) in FIG. Based on. Similarly, the observation values corresponding to the pixel B in FIG. 53 (the pixel on the right side of the pixel A in the drawing) correspond to 25 pixels centered on the pixel B ′ (corresponding to the pixel B) in FIG. The observed value corresponding to the pixel C in FIG. 53 is based on the true value corresponding to 25 pixels centered on the pixel C ′ (corresponding to the pixel C) in FIG. Is required. Expressions for obtaining observed values Y (x + 1, y) and Y (x + 2, y) corresponding to the pixels B and C in FIG. 53 are as follows.
Y(x+1, y) = W(-2,-2)X(x-1, y-2) +W(-1,-2)X(x,y-2) +W(0,-2)X(x-1,y-2). . . +W(2,2)X(x+3,y+2) Y (x + 1, y) = W (-2, -2) X (x-1, y-2) + W (-1, -2) X (x, y-2) + W (0,- 2) X (x-1, y-2) ... + W (2,2) X (x + 3, y + 2)
Y(x+2,y) = W(-2,-2)X(x,y-2) +W(-1,-2)X(x+1,y-2) +W(0,-2)X(x+2,y-2). . . +W(2,2)X(x+4,y+2) Y (x + 2, y) = W (-2, -2) X (x, y-2) + W (-1, -2) X (x + 1, y-2) + W (0,- 2) X (x + 2, y-2) ... + W (2,2) X (x + 4, y + 2)
このようにして、図53の各画素に対応する観測値をもとめていくと、式(8)乃至(11)に示されるような行列式が得られる。 In this way, when the observed values corresponding to the respective pixels in FIG. 53 are obtained, determinants as shown in Expressions (8) to (11) are obtained.
ここで、式(11)に示した行列式において、行列Wfの逆行列を求めることができれば、観測値Yfに基づいて真値Xfを求めることができる。すなわち、ぼけた画像の画素に基づいて、ぼけのない画像の画素を得ることができ、ぼけた画像を修正することができる。 Here, in the determinant shown in Expression (11), if the inverse matrix of the matrix Wf can be obtained, the true value Xf can be obtained based on the observed value Yf. That is, based on the pixels of the blurred image, the pixels of the image without blur can be obtained, and the blurred image can be corrected.
しかし、式(8)乃至式(11)に示した行列式は、図51乃至図54を参照して上述したように、観測値の画素に対して、真値の画素が多く、このままでは逆行列を求めることができない(例えば、図52の例では、観測値の画素1個に対して真値の画素5個が必要となる。)。 However, as described above with reference to FIGS. 51 to 54, the determinants shown in the equations (8) to (11) have more true-value pixels than the observed-value pixels. A matrix cannot be obtained (for example, in the example of FIG. 52, five true-value pixels are required for one observed-value pixel).
そこで、式(8)乃至式(11)に加えて、式(12)乃至式(15)に示される関係式を導入する。 Therefore, in addition to the expressions (8) to (11), the relational expressions shown in the expressions (12) to (15) are introduced.
式(12)乃至式(15)は、隣接する画素のレベルの差分について限定を加えるものであり、求めるべき真値が、画像の平坦な(隣接する画素のレベルと大きな差がない)部分である場合には矛盾がない。しかし、求めるべき真値がエッジ部分である(隣接する画素のレベルと大きな差がある)場合には矛盾が生じ、修正した画像に劣化が生じる恐れがある。このため、ぼけた画像を適正に修正するためには、式(12)乃至式(15)の4つの関係式を、真値のエッジ部分をまたがないように画素ごとに使い分ける必要がある。 Expressions (12) to (15) limit the difference between the levels of adjacent pixels, and the true value to be obtained is a flat part of the image (no significant difference from the level of adjacent pixels). In some cases there is no contradiction. However, when the true value to be obtained is an edge portion (there is a large difference from the level of adjacent pixels), a contradiction occurs, and the corrected image may be deteriorated. For this reason, in order to appropriately correct a blurred image, it is necessary to properly use the four relational expressions (12) to (15) for each pixel so as not to cross the true edge portion.
そこで、画像特徴検出部742において、入力画像の中のエッジ部分と平坦部分の判定を行い、どの方向(例えば、上下左右)に平坦になっているかを表すコードp2を生成する。なお、画像特徴検出部742の詳細な動作については、図59を参照して後述する。また、本発明では、入力画像(観測値)の中のエッジ部分と平坦部分の判定結果が、真値の中でのエッジ部分と平坦部分の判定結果に等しいと仮定する。
Therefore, the image
式(12)乃至式(15)において、コードp2の関数である関数W1乃至W4は、重み関数とされる。本発明においては、コードp2に応じてこの重み関数W1乃至W4が制御されることで,画素ごとの関係式の使い分けが行われるようにする。図55にコードp2に対応する重み関数W1乃至W4の値を示す。この重み関数の値が大きい場合、式(12)乃至式(15)において平坦であるという意味合いが強くなり、重み関数の値が小さい場合、その意味合いが弱くなる(エッジである意味合いが強くなる)。 In Expressions (12) to (15), functions W1 to W4 that are functions of the code p2 are weight functions. In the present invention, the weighting functions W1 to W4 are controlled according to the code p2, so that the relational expressions for each pixel are properly used. FIG. 55 shows the values of the weight functions W1 to W4 corresponding to the code p2. When the value of the weight function is large, the meaning of being flat in the equations (12) to (15) is strong, and when the value of the weight function is small, the meaning is weak (meaning that is an edge is strong). .
コードp2は、4ビットにより構成されており、それぞれのビットは、左から順番に、上、右、下または左方向に平坦か否かを示しており、その方向に平坦である場合には、対応するビットが「1」に設定される。例えば、コードp2が「0001」の場合、注目画素の左方向に平坦であり、それ以外の方向は平坦ではない(エッジが存在する)ことを表す。このため、コードp2が「0001」の場合、重み関数W4の値が大きくなり、式(12)乃至式(15)の4つの関係式の中で式(15)の重みが大きくなる。このようにすることで、コードp2により、4つの関係式の重みを変化させることができ、4つの関係式を、エッジをまたがないように画素ごとに使い分けることができる。 The code p2 is composed of 4 bits, and each bit indicates whether it is flat in the upper, right, lower or left direction in order from the left, and when it is flat in that direction, The corresponding bit is set to “1”. For example, when the code p2 is “0001”, it indicates that the pixel is flat in the left direction of the target pixel and the other directions are not flat (there is an edge). For this reason, when the code p2 is “0001”, the value of the weighting function W4 increases, and the weight of Expression (15) among the four relational expressions of Expressions (12) to (15) increases. In this way, the weights of the four relational expressions can be changed by the code p2, and the four relational expressions can be used properly for each pixel so as not to cross the edge.
例えば、図56に示されるように、注目画素Xaの上方向と左方向が平坦であり、右方向と下方向がエッジである場合、コードp2により、式(12)乃至式(15)の4つの関係式の重みを変化させることにより、隣接する画素のレベルの差分について、「Xa−Xb=0」、「Xa―Xc=0」という限定が加えられるが、「Xa−Xd=0」、「Xa―Xe=0」という限定は加えられない。なお、Xb,Xc,Xd,Xeは、それぞれ注目画素Xaの右、下、上、または左に隣接する画素を表す。 For example, as shown in FIG. 56, when the upper direction and the left direction of the target pixel Xa are flat and the right direction and the lower direction are edges, 4 of Expressions (12) to (15) is expressed by the code p2. By changing the weights of two relational expressions, the difference between adjacent pixel levels is limited to “Xa−Xb = 0” and “Xa−Xc = 0”, but “Xa−Xd = 0”, The limitation “Xa−Xe = 0” is not added. Xb, Xc, Xd, and Xe represent pixels adjacent to the right, bottom, top, or left of the target pixel Xa, respectively.
また、式(12)乃至式(15)において、関数Waは、別の重み関数であり、やはりコードp1により重み関数Waの値が変化する。重み関数Waの値を変化させることで、修正された画像の全体のノイズ、ディテールを制御することができる。重み関数Waの値が大きいと、修正された画像においてノイズの影響が小さく感じられ、ノイズ感が減少する。また、重み関数Waの値が小さいと、修正された画像においてディテールが強調されたように感じられ、ディテール感が向上する。なお、重み関数Waの値を変化させるコードp1は、図50の制御信号Cに対応している。 In Expressions (12) to (15), the function Wa is another weight function, and the value of the weight function Wa changes according to the code p1. By changing the value of the weight function Wa, it is possible to control the noise and details of the entire corrected image. When the value of the weight function Wa is large, the influence of noise is felt small in the corrected image, and the noise feeling is reduced. Further, when the value of the weight function Wa is small, it is felt that the detail is emphasized in the corrected image, and the feeling of detail is improved. Note that the code p1 for changing the value of the weight function Wa corresponds to the control signal C in FIG.
このように、式(8)乃至式(11)に加えて、式(12)乃至式(15)に示される関係式を導入する。これにより、式(16)に示されるような逆行列を演算することが可能になり、その結果、観測値に基づいて真値を求めることができる。 Thus, in addition to the equations (8) to (11), the relational expressions shown in the equations (12) to (15) are introduced. Thereby, it becomes possible to calculate an inverse matrix as shown in Expression (16), and as a result, a true value can be obtained based on the observed value.
本発明では、観測値Ysにかかる係数Ws-1が係数ROM744に予め保持され、領域抽出部745により抽出された入力画像に対して、式(16)の行列式の演算(積和演算)が積和演算部746により行われる。このようにすることで、画像の修正を行う都度、逆行列演算を行う必要がなく、積和演算だけでぼけを修正することが可能になる。ただし、入力画像に応じて、パラメータσや、上述した4つの関係式が異なるため、想定しうるそれらの全ての組み合わせでの逆行列演算を予め行っておき、パラメータσ、コードp2などに対応するアドレスを定めて、そのアドレス毎に異なる係数が係数ROM744に格納される。
In the present invention, the coefficient Ws-1 related to the observed value Ys is stored in the coefficient ROM 744 in advance, and the determinant (product-sum) operation of Expression (16) is performed on the input image extracted by the
しかし、例えば、図54に示される枠(t)内の25(=5×5)個のすべてに画素において、重み関数W1乃至W4の組み合わせを変化させ、4つの関係式を切り替えた場合、15(=図55に示した関数W1乃至W4の組み合わせ)の25(枠(t)内の画素数)乗の組み合わせが存在し、それぞれの組み合わせごとに逆行列演算を行うと、係数の数が膨大になり、係数ROM744の容量には制限があるため、全ての係数を格納しきれなくなるおそれがある。このような場合、枠(t)内の中心画素であるXtのみ、その特徴に基づいて、コードp2を変化させて関係式を切り替え、枠(t)内の画素Xt以外画素の関係式については、例えばコードp2が擬似的に、「1111」に固定されるようにしてもよい。このようにすることで、係数の組み合わせを15通りに限定することができる。 However, for example, in the case where all the 25 (= 5 × 5) pixels in the frame (t) shown in FIG. (= Combination of functions W1 to W4 shown in FIG. 55) There are combinations of powers of 25 (the number of pixels in the frame (t)), and when the inverse matrix operation is performed for each combination, the number of coefficients is enormous. Therefore, since the capacity of the coefficient ROM 744 is limited, all the coefficients may not be stored. In such a case, for only Xt that is the central pixel in the frame (t), the relational expression is switched by changing the code p2 based on the feature, and the relational expression of the pixels other than the pixel Xt in the frame (t) For example, the code p2 may be fixed to “1111” in a pseudo manner. By doing so, the combinations of coefficients can be limited to 15.
なお以上においては、ぼけの原理(モデル式)を説明するために、ガウス関数の定義域を、-2≦(x,y)≦2 としたが、実際には、パラメータσの値が十分大きくても対応できるような範囲が設定される。また、式(12)乃至式(15)に示した関係式についても,画像の特徴を記述する式であれば,これに限定されるものではない。さらに、係数ROM744の容量に制限がある場合の例として、ぼけの中心位相(Xt)のみに限定して関係式を切り替える例を説明したが、それに限定されるものではなく、係数ROM744の容量に応じて、関係式の切り替え方法を変えてもよい。 In the above, in order to explain the principle of blur (model equation), the domain of the Gaussian function is set to -2≤ (x, y) ≤2, but in reality the value of parameter σ is sufficiently large A range that can be handled is set. In addition, the relational expressions shown in Expressions (12) to (15) are not limited to these as long as they are expressions describing image characteristics. Further, as an example in the case where the capacity of the coefficient ROM 744 is limited, the example in which the relational expression is switched only to the blur center phase (Xt) has been described. However, the present invention is not limited to this, and the capacity of the coefficient ROM 744 is limited. The relational expression switching method may be changed accordingly.
次に図57を参照して、画像補正部22によるぼけ修正処理について説明する。ステップS801において、画像補正部22は、処理対象領域を検出する。この処理対象領域は、ぼけの修正を行うべき領域、すなわち補正対象エリア52であり、エリア設定部25から出力される信号に基づいて検出される。
Next, the blur correction process by the
ステップS802において、画像補正部22は、パラメータσの値を取得する。パラメータσは、ユーザにより指定されるようにしてもよいし、予め設定された値が取得されるようにしてもよい。ステップS803において、画像補正部22は、図58を参照して後述する画像補正処理を実行する。これにより、ぼけた画像が修正され、出力される。
In step S802, the
このようにして、補正対象エリア52内の画像については、画像のぼけが除去されて鮮明な画像となる。
In this way, the image in the
次に、図58を参照して、図57のステップS803の画像補正処理の詳細について説明する。 Next, details of the image correction processing in step S803 in FIG. 57 will be described with reference to FIG.
ステップS821において、画像特徴検出部742は、図59を参照して後述する画像特徴検出処理を実行する。これにより、注目画素に対して、どの方向に平坦なのかが判定され、図55を参照して上述したコードp2が生成され、アドレス演算部743に出力される。
In step S821, the image
ステップS822において、アドレス演算部743は、係数ROM744のアドレスを演算する。係数ROM744のアドレスは、例えば、コードp2に対応する4ビット(画像特徴検出部742の出力)、パラメータσの値を表す4ビット(図50の制御信号B)、および、上述した4つの関係式の重み関数Waを切り替えるコードp1に対応する2ビット(図50の制御信号C)により構成され、0乃至1023の1024(2の10乗)個アドレスが存在する。アドレス演算部743は、画像特徴検出部742の出力、制御信号B、および制御信号Cに基づいて、対応するアドレスを演算する。
In step S822, the
ステップS823において、アドレス演算部743は、ステップS822で演算したアドレスに基づいて、係数ROM744から係数を読み出し、積和演算部746に供給する。
In step S823, the
ステップS824において、積和演算部746は、ステップS823で読み出された係数に基づいて、画素毎に積和演算を行い、その結果を後処理部747に出力する。これにより、上述したように、観測値から真値が求められ、ぼけた画像が修正される。
In step S824, the product-
ステップS825において、画像合成部747は、図62を参照して後述する画像合成処理を実行する。これにより、画素毎に、積和演算部746の処理結果を出力するか、入力画像をそのまま出力するかが判定される。ステップS826において、後処理部747は、補正後処理され、選択された画像を出力する。
In step S825, the
次に図59を参照して、図58のステップS821の画像特徴検出処理について説明する。ステップS841において、画像特徴検出部742は、ブロックを抽出し、ステップS842において、ステップS841で抽出されたブロック間の差分を演算する(その詳細は、図61を参照して後述する)。ステップS843において、画像特徴検出部742は、ステップS842で演算されたブロック差分を予め設定されている閾値と比較し、その比較結果に基づいて、ステップS844において、注目画素に対して平坦な方向を表すコードであるコードp2を出力する。
Next, the image feature detection processing in step S821 in FIG. 58 will be described with reference to FIG. In step S841, the image
図60と図61を参照して、画像特徴検出処理について、さらに詳しく説明する。図60は、画像特徴検出部742の詳細な構成例を示すブロック図である。同図の左側には、入力された画像の中から所定のブロックを抽出するブロック切り出し部841−1乃至841−5が設けられている。ブロック切り出し部841−1乃至841−5は、例えば、図61A乃至図61Eに示されるように、図中黒い丸で示される注目画素(いま修正すべき画素)の周辺の、注目画素を含む9(=3×3)個の画素で構成される5つのブロックを抽出する。
With reference to FIGS. 60 and 61, the image feature detection processing will be described in more detail. FIG. 60 is a block diagram illustrating a detailed configuration example of the image
図61Aに示されるブロック881は、その中心に注目画素を有する中心ブロックであり、ブロック切り出し部841−5により抽出される。図61Bに示されるブロック882は、ブロック881を画素1個分図中上に移動した上側ブロックであり、ブロック切り出し部841−3により抽出される。図61Cに示されるブロック883は、ブロック881を画素1個分図中左に移動した左側ブロックであり、ブロック切り出し部841−4により抽出される。
A
図61Dに示されるブロック884は、ブロック881を画素1個分図中下に移動した下側ブロックであり、ブロック切り出し部841−1により抽出される。図61Eに示されるブロック885は、ブロック881を画素1個分図中右に移動した右側ブロックであり、ブロック切り出し部841−2により抽出される。ステップS841においては、注目画素毎に、ブロック881乃至885の5つのブロックが抽出される。
A
ブロック切り出し部841−1乃至841−5により抽出された各ブロックを構成する画素の情報は、ブロック差分演算部842−1乃至842−4に出力される。ブロック差分演算部842−1乃至842−4は、各ブロックの画素の差分を、例えば、次のようにして演算する。 Information on the pixels constituting each block extracted by the block cutout units 841-1 to 841-5 is output to the block difference calculation units 842-1 to 842-4. The block difference calculation units 842-1 to 842-4 calculate the pixel difference of each block as follows, for example.
いま、ブロック881の9個の画素のうち一番上の行の3個の画素(のレベル)を左からa(881),b(881),c(881)とする。中央の行の3個の画素を左からd(881),e(881),f(881)とする。一番下の行の3個の画素を左からg(881),h(881),i(881)とする。同様に、ブロック884の9個の画素についても、一番上の行の3個の画素(のレベル)を左からa(884),b(884),c(884)とし、中央の行の3個の画素を左からd(884),e(884),f(884)とし、一番上の行の3個の画素を左からg(884),h(884),i(884)とする。ブロック差分演算部842−1は、ブロック差分B(1)を次のように演算する。
Now, the three pixels (levels) in the top row among the nine pixels of the
B(1)=│a(881)-a(884)│+│b(881)-b(884)│+│c(881)-c(884)│+・・・ +│i(881)-i(884)│ B (1) = │a (881) -a (884) │ + │b (881) -b (884) │ + │c (881) -c (884) │ + ・ ・ ・ + │i (881) -i (884) │
すなわち、ブロック差分B(1)は、ブロック881(中心)とブロック884(下)において対応する各画素のレベルの差分の絶対値の総和である。同様にして、ブロック差分演算部842−2は、ブロック881(中心)とブロック885(右)において対応する各画素のレベルの差分の絶対値の総和を求め、ブロック差分B(2)を演算する。さらに、ブロック差分演算部842−3は、ブロック881(中心)とブロック882(上)について、ブロック差分演算部842−3は、ブロック881(中心)とブロック883(左)について、それぞれ対応する各画素のレベルの差分の絶対値の総和を求め、ブロック差分B(3)とB(4)を演算する。 That is, the block difference B (1) is the sum of absolute values of the difference in level of each corresponding pixel in the block 881 (center) and the block 884 (bottom). Similarly, the block difference calculation unit 842-2 calculates a block difference B (2) by calculating the sum of absolute values of the differences between the levels of the corresponding pixels in the block 881 (center) and the block 885 (right). . Further, the block difference calculation unit 842-3 corresponds to the block 881 (center) and the block 882 (upper), and the block difference calculation unit 842-3 corresponds to each of the block 881 (center) and the block 883 (left). The sum of absolute values of pixel level differences is obtained, and block differences B (3) and B (4) are calculated.
ステップS842においては、このように中心ブロックと上下左右の4方向のブロックとの差分であるブロック差分B(1)乃至B(4)が演算され、その結果は、対応する閾値判定部843−1乃至843−4にそれぞれ出力されると同時に、最小方向判定部844にも供給される。
In step S842, the block differences B (1) to B (4), which are the differences between the central block and the four blocks in the up, down, left, and right directions, are calculated in this way, and the result is the corresponding threshold value determination unit 843-1. To 843-4, and simultaneously supplied to the minimum
閾値判定部843−1乃至843−4は、それぞれブロック差分B(1)乃至B(4)を予め設定された閾値と比較し、その大小を判定する。なお、この閾値は制御信号Dに基づいて切り替えられる。閾値判定部843−1乃至843−4は、それぞれブロック差分B(1)乃至B(4)が予め設定された閾値より大きい場合、その方向はエッジ部分であると判定し、「0」を出力し、閾値より小さい場合、その方向は平坦な部分であると判定し、「1」を出力する。 The threshold value determination units 843-1 to 843-4 compare the block differences B (1) to B (4) with preset threshold values, respectively, and determine their magnitudes. The threshold value is switched based on the control signal D. The threshold value determination units 843-1 to 843-4 determine that the direction is an edge portion and output “0” when the block differences B (1) to B (4) are larger than a preset threshold value, respectively. If it is smaller than the threshold, it is determined that the direction is a flat portion, and “1” is output.
ステップS843おいては、このようにしてブロック差分と閾値の比較が行われる。閾値判定部843−1乃至843−4の出力結果は、4ビットのコードとしてセレクタ845に出力される。例えば、ブロック差分B(1)、B(3)およびB(4)が閾値より小さく、ブロック差分B(2)が閾値より大きい場合、コードとして「1011」が出力される。
In step S843, the block difference is compared with the threshold value in this way. The output results of the threshold determination units 843-1 to 843-4 are output to the
ところで、ブロック差分B(1)乃至B(4)が、全て閾値より大きくなってしまう場合(平坦な部分がない場合)も考えられる。この場合、閾値判定部843−1乃至843−4から、コードとして「0000」が出力される。しかし、図55に示されるように、コードp2が「0000」の場合、対応する重み関数W1乃至W4が特定できない。そこで、セレクタ845は、閾値判定部843−1乃至843−4からの出力結果が「0000」か否かを判定し、閾値判定部843−1乃至843−4からの出力結果が「0000」であると判定された場合、最小方向判定部844からの出力をコードp2として出力する。
By the way, the case where the block differences B (1) to B (4) are all larger than the threshold value (when there is no flat portion) is also conceivable. In this case, “0000” is output as a code from the threshold determination units 843-1 to 843-4. However, as shown in FIG. 55, when the code p2 is “0000”, the corresponding weight functions W1 to W4 cannot be specified. Therefore, the
最小方向判定部844は、ブロック差分B(1)乃至B(4)の中で、最小の値を判定し、判定結果に対応した4ビットのコードを、閾値判定部843−1乃至843−4がコードを出力するのと同じタイミングで、セレクタ845に出力する。例えば、ブロック差分B(1)乃至B(4)の中で、B(1)が最小であると判定された場合、最小方向判定部844は、コードとして「1000」をセレクタ845に出力する。
The minimum
このようにすることで、閾値判定部843−1乃至843−4からコード「0000」が出力されても、最小方向判定部844から出力されたコード「1000」がコードp2として出力されるようにすることができる。勿論、閾値判定部843−1乃至843−4からの出力結果が「0000」ではない場合は、閾値判定部843−1乃至843−4からの出力結果がコードp2として出力される。ステップS844においては、このようにしてコードp2が生成され、アドレス演算部743に出力される。
In this way, even if the code “0000” is output from the threshold determination units 843-1 to 843-4, the code “1000” output from the minimum
次に、図62を参照して、図58のステップS825の画像合成処理について説明する。ステップS861において、画像合成部747は、積和演算部746からの出力結果に基づいて、画素の分散度を演算する。これにより、注目画素の周囲の画素の分散度合いが演算される。ステップS862において、画像合成部747は、ステップS862で演算された分散度は予め設定された閾値より大きいか否かを判定する。
Next, with reference to FIG. 62, the image composition processing in step S825 in FIG. 58 will be described. In step S <b> 861, the
ステップS862において、分散度が閾値より大きいと判定された場合、画像合成部747は、ステップS863において、注目画素に対応する入力画像入れ替えフラグをONに設定する。一方、分散度が閾値より大きくないと判定された場合、画像合成部747は、ステップS64において、注目画素に対応する入力画像入れ替えフラグをOFFに設定する。
If it is determined in step S862 that the degree of dispersion is greater than the threshold, the
入力画像において、もともとぼけていない部分の画素に対して、積和演算部746により積和演算を行うと、その画素の周囲の画像のアクティビティが大きくなり、かえって画像が劣化してしまう場合がある。ここで、分散度が閾値より大きい場合、その画素は劣化した画素であると判定され、入力画像入れ替えフラグがONに設定される。入力画像入れ替えフラグがONに設定された画素は、出力されるとき、入力画像の画素と入れ替えられて(元の状態に戻されて)出力される。
If the product-sum operation is performed by the product-
ステップS865において、画像合成部747は、全ての画素についてチェックしたか否かを判定し、まだ全画素をチェックしていないと判定された場合、ステップS861に戻り、それ以降の処理が繰り返し実行される。ステップS865において、全ての画素についてチェックしたと判定された場合、ステップS866において、画像合成部747は、画像が補正され、ぼけが除去された補正対象エリア52内の画像と、背景53の画像を合成し、画像ディスプレイ23に出力する。
In step S865, the
このようにして、画素毎に、積和演算結果を出力するか、または入力画像の画素をそのまま出力するかが判定される。このようにすることで、入力画像の中で、もともとぼけていない部分に対して、画像の修正を行うことにより、かえって画像が劣化してしまうことを防止することができる。 In this way, it is determined for each pixel whether the product-sum operation result is output or the pixel of the input image is output as it is. By doing so, it is possible to prevent the image from being deteriorated by correcting the image with respect to the originally unblurred portion of the input image.
この点について、図63と図64を参照して、さらに詳しく説明する。図63は、画像合成部747の構成例を示すブロック図である。積和演算部746からの出力結果が、ブロック切り出し部901に入力され、ブロック切り出し部901は、図64に示されるように、注目画素a5を中心とした9(=3×3)個の画素a1乃至a9を切り出し、分散演算部802に出力する。分散演算部802は、分散度を次のようにして演算する。
This point will be described in more detail with reference to FIGS. 63 and 64. FIG. FIG. 63 is a block diagram illustrating a configuration example of the
ここで、mは、ブロック内の9個の画素(のレベル)の平均値を表し、vは、それぞれの画素の平均値との差の2乗の総和であり、ブロック内の画素の分散度を表す。ステップS861においては、このようにして分散度が演算され、演算結果が閾値判定部903に出力される。
Here, m represents an average value of (levels) of nine pixels in the block, v is a sum of squares of differences from the average values of the respective pixels, and the degree of dispersion of the pixels in the block Represents. In step S861, the degree of dispersion is calculated in this way, and the calculation result is output to the threshold
閾値判定部903は、分散演算部902からの出力結果(分散度)と予め設定された閾値を比較し、分散度が閾値より大きいと判定された場合、画像合成部747は、注目画素に対応する入力画像入れ替えフラグをONに設定するように選択部904を制御する。分散度が閾値より大きくないと判定された場合、画像合成部747は、注目画素に対応する入力画像入れ替えフラグをOFFに設定するように選択部804を制御する。ステップS862乃至S864においては、このように、分散度が閾値より大きいか否かが判定され、判定結果に基づいて、入力画像入れ替えフラグが設定される。
The
そして、切り替え部905により、選択部904による最終処理結果と、入力画像の画素が切り替えられ、出力される。すなわち補正対象エリア52内の画像の画素は、選択部904による最終処理結果とされ、背景53の画像の画素は、入力画像の画素となるように切り替えられる。
Then, the
このようにして、オブジェクト51(図3)が追尾され、オブジェクト51が含まれる補正対象エリア52内の画像のみが、画像のぼけが除去されるように修正(補正)され鮮明に表示される。一方、背景53の画像は、画像のぼけが除去されずに表示されるので、自然に、ユーザを、移動するオブジェクト51に注目させることができる。
In this way, the object 51 (FIG. 3) is tracked, and only the image in the
以上においては、画像補正部22により、撮像部21により撮像された画像の中の補正対象エリア52内の画像について、画像のぼけが除去されるように、補正される例について説明したが、画像補正部22により、画像のぼけが除去されることなく、補正対象エリア52内の画像について、例えば、画像を構成する各画素の輝度や色などの設定が変更され、単純にハイライト表示されるように、画像が補正されるようにしてもよい。このようにすることで、ユーザがオブジェクト51を正確に視認することができなくなるおそれはあるものの、やはり、自然に、ユーザを、移動するオブジェクト51に注目させることができ、また、画像のぼけが除去されるように補正される場合と比較して、画像補正部22を、より簡単な構成とすることができ、その結果、監視カメラシステム1を、より低コストで実現することができる。
In the above description, the example in which the
上記した実施の形態において、動き推定部52(図5)は、動きベクトルの確度を算出したが、その確度をより信頼性の高いものとするための仕組みについて、以下に説明を加える。また、以下に説明を加える動き推定部52は、上述した実施の形態で説明したような装置に適用できることは勿論であるが、他の装置にも適用でき、その適用例も合わせて説明を加えるため、以下の説明では、画像処理装置1000として説明を加える。
In the above-described embodiment, the motion estimation unit 52 (FIG. 5) calculates the accuracy of the motion vector, but a mechanism for making the accuracy more reliable will be described below. In addition, the
図65は本発明を適用した画像処理装置1000の機能的構成例を表している。この画像処理装置1000は、動きベクトル検出部1021、および動きベクトル確度算出部1022により構成されている。
FIG. 65 shows a functional configuration example of an
動きベクトル検出部1021は、入力画像から動きベクトルを検出し、検出した動きベクトルと入力画像を動きベクトル確度算出部1022に供給する。また、動きベクトル検出部1021は、入力画像が既に動きベクトルを含む場合、画像データと動きベクトルを分離して、動きベクトル確度算出部1022に供給する。画像データとその動きベクトルが既に分離された状態で入力される場合、動きベクトル検出部1021は省略することができる。
The motion
動きベクトル確度算出部1022は、入力された入力画像(画像データ)に基づいて、対応する動きベクトルの確度(以下、動きベクトル確度と称する)を演算し、動きベクトル確度を図示せぬ装置に出力する。
The motion vector
図66は、図65の動きベクトル確度算出部1022の構成例を表している。この実施の形態においては、動きベクトル確度算出部1022は、評価値算出部1041、アクティビティ算出部1042、および演算部43により構成されている。演算部43は、閾値判定部1051、正規化処理部1052、および統合処理部1053により構成されている。
FIG. 66 illustrates a configuration example of the motion vector
図65の動きベクトル検出部1021から出力された動きベクトルが、評価値算出部1041に入力され、入力画像(画像データ)が、評価値算出部1041とアクティビティ算出部1042に入力されている。
The motion vector output from the motion
評価値算出部1041は、入力画像の評価値を算出し、演算部43の正規化処理部1052に供給する。アクティビティ算出部1042は、入力画像のアクティビティを算出し、演算部43の閾値判定部1051と正規化処理部1052に供給する。
The evaluation
正規化処理部1052は、評価値算出部1041より供給された評価値を、アクティビティ算出部1042より供給されたアクティビティに基づいて正規化し、得られた値を統合処理部1053に供給する。閾値判定部1051は、アクティビティ算出部1042より供給されたアクティビティを所定の閾値と比較し、その判定結果を統合処理部1053に供給する。統合処理部1053は、正規化処理部1052から供給された正規化情報と、閾値判定部1051より供給された判定結果に基づいて、動きベクトル確度を演算し、得られた動きベクトル確度を図示せぬ装置に出力する。
The
次に図67のフローチャートを参照して、画像処理装置1000の動き演算処理の詳細について説明する。動きベクトル検出部1021は、ステップS901において、入力画像を取得し、ステップS902で、入力画像のフレームを所定のブロックに分割し、ステップS903で、時間的に後(または前)のフレームと比較することで動きベクトルを検出する。具体的には、ブロックマッチグ法により動きベクトルが検出される。検出された動きベクトルは、評価値算出部1041に供給される。
Next, details of the motion calculation process of the
以上の処理を図68乃至図71を参照して説明すると次のようになる。すなわち、図67のステップS901において、例えば、図68に示されるように、フレームF1(第1フレーム)乃至フレームFN(第Nフレーム)のN個のフレームが順次取得されると、ステップS902において、1つのフレームの画像が一辺2L+1画素の正方形のブロックに分割される。ここで、分割されたフレームFnの任意のブロックをブロックBPとし、図69に示されるように、ブロックBPの中心座標(画素)を点P(XP,YP)とする。 The above processing will be described with reference to FIGS. 68 to 71 as follows. That is, in step S901 in FIG. 67, for example, as shown in FIG. 68, when N frames from frame F 1 (first frame) to frame F N (Nth frame) are sequentially acquired, step S902 is performed. 1, an image of one frame is divided into square blocks each having 2L + 1 pixels. Here, an arbitrary block of the divided frame F n is a block BP, and the center coordinates (pixels) of the block BP are a point P (X P , Y P ) as shown in FIG.
次にステップS903において、例えば、図70に示されるように、フレームFnの次のフレームであるフレームFn+1において、ブロックBPをフレームFn+1上の所定の走査範囲内で走査させながら、対応する画素の差分絶対値和が最小となる位置が調べられ、その値が最小となる位置のブロック(ブロックBq)が検出される。その中心点Q(Xq,Yq)がブロックBPの点P(XP,YP)との対応点とされる。 In step S903, for example, as shown in FIG. 70, in the frame F n + 1 is a frame subsequent to frame F n, scanning the block B P in a predetermined scanning range on the frame F n + 1 The position where the sum of absolute differences of the corresponding pixels is minimized is checked, and the block (block B q ) at the position where the value is minimized is detected. The center point Q (X q , Y q ) is the corresponding point with the point P (X P , Y P ) of the block B P.
図71に示されるように、ブロックBPの中心点P(XP,YP)とブロックBqの中心点Q(Xq,Yq)とを結んで表される線(矢印)が、動きベクトルV(vx,vy)として検出される。すなわち、次式に基づいて動きベクトルV(vx,vy)が演算される。
V(vx,vy)=Q(Xq,Yq)−P(XP,YP) ・・・(17)
As shown in FIG. 71, the center point P (X P, Y P) of the block B P and center point Q (X q, Y q) of the block B q lines represented by connecting the (arrow), It is detected as a motion vector V (vx, vy). That is, the motion vector V (vx, vy) is calculated based on the following equation.
V (vx, vy) = Q (X q, Y q) -P (X P, Y P) ··· (17)
図67のステップS904において、動きベクトル確度算出部1022により動きベクトル確度演算処理が実行される。その詳細は、図72を参照して後述するが、この処理により、動きベクトル確度が定量的な数値として算出される。
In step S904 in FIG. 67, the motion vector
ステップS905において、動きベクトル確度算出部1022(図66の統合処理部1053)は、1つのフレームの全てのブロックに対して、動きベクトル確度の算出が終了したか否かを判定する。
In step S905, the motion vector accuracy calculation unit 1022 (
動きベクトル確度算出部1022は、ステップS905において、まだ全てのブロックに対して動きベクトル確度が算出されていないと判定した場合、処理をステップS904に戻し、以降の処理を繰り返し実行する。全てのブロックに対して動きベクトル確度の算出が終了したと判定された場合、そのフレームについての処理を終了する。以上の処理は、各フレーム毎に行われる。
If the motion vector
次に図72のフローチャートを参照して、図67のステップS904の動きベクトル確度演算処理の詳細について説明する。ステップS931において、評価値算出部1041は、次式に基づいて評価値Eval(P,Q,i,j)を演算する。
Next, details of the motion vector accuracy calculation processing in step S904 in FIG. 67 will be described with reference to the flowchart in FIG. In step S931, the evaluation
上記式(18)における総和ΣΣは、xが−LからLについて、yが−LからLについて行われる。すなわち、簡単のため、図73に示されるように、ブロックBPとブロックBqの一辺を5(=2L+1=2×2+1)画素とする場合、フレームFnのブロックBPの左上端の座標(点P1(XP−2,YP−2))に位置する画素71の画素値と、画素71に対応するフレームFn+1のブロックBqの座標(点Q1(Xq−2,Yq−2))に位置する画素111の画素値との差が演算される。同様の演算が、点P1(XP−2,YP−2)乃至点P25(XP+2,YP+2)に位置する画素のそれぞれに対応するブロックBqの点Q1(Xq−2,Yq−2)乃至Q25(Xq+2,Yq+2)に位置する画素の画素値とのそれぞれの差が演算される。L=2である場合、25個の差分が得られ、その絶対値の総和が演算される。
The sum ΣΣ in the above equation (18) is performed for x from −L to L and y from −L to L. That is, for simplicity, as shown in FIG. 73, when one side of the block B P and the block B q is 5 (= 2L + 1 = 2 × 2 + 1) pixels, the coordinates of the upper left corner of the block B P of the frame F n The pixel value of the
なお、上述したフレームFnのブロックBpの中心座標の点P(Xp,Yp)に位置する画素(注目画素)、及びその対応点であるフレームFn+1のブロックBqの中心座標の点Q(Xq,Yq)に位置する画素(対応画素)の画素数は、少なくとも1個であればよい。但し、複数にする場合には、その数を同じにする必要がある。 Incidentally, the point P (X p, Y p) of the center coordinates of the block B p in the frame F n described above pixels positioned (pixel of interest), and the center of the a corresponding point frame F n + 1 of the block B q The number of pixels (corresponding pixels) located at the coordinate point Q (X q , Y q ) may be at least one. However, in the case of using a plurality, it is necessary to make the number the same.
この評価値は、一方のフレームの画像上の点と、他方のフレームの画像上の点のそれぞれを中心とするブロックの評価値(従って、動きベクトルの評価値)を示すものであり、評価値が0に近づくほど、よく一致していることを表している。また、上記式(18)において、FiおよびFjは、時間的に異なるフレームを示し、上述した説明では、FnがFiに対応し、Fn+1がFjに対応する。上記式(18)では、差分絶対和を評価値としているが、差分二乗和を評価値としてもよい。 This evaluation value indicates the evaluation value of the block centered on the point on the image of one frame and the point on the image of the other frame (hence, the evaluation value of the motion vector). The closer to 0, the better the match. In the above equation (18), F i and F j indicate temporally different frames. In the above description, F n corresponds to F i and F n + 1 corresponds to F j . In the above equation (18), the absolute difference sum is used as the evaluation value, but the sum of squared differences may be used as the evaluation value.
ブロックマッチング法以外に、勾配法や、ベクトル検出方法によって評価値を演算することも可能である。 In addition to the block matching method, the evaluation value can be calculated by a gradient method or a vector detection method.
評価値算出部1041は、生成した評価値を正規化処理部1052に供給する。
The evaluation
ステップS932において、アクティビティ算出部1042は、入力画像からアクティビティを算出する。アクティビティは、画像の複雑さを表す特徴量であり、図74に示されるように、各画素毎の注目画素Y(x,y)と、それに隣接する8画素、すなわち隣接画素Y(x−1,y−1),Y(x,y−1),Y(x+1,y−1),Y(x+1,y),Y(x+1,y+1),Y(x,y+1),Y(x−1,y+1),Y(x−1,y)との差分絶対和の平均値が、注目画素のアクティビティとして次式に基づいて演算される。
In step S932, the
図74の例の場合、3×3画素のうち、中央に位置する注目画素Y(x,y)の値は110であり、それに隣接する8個の画素(隣接画素Y(x−1,y−1),Y(x,y−1),Y(x+1,y−1),Y(x+1,y),Y(x+1,y+1),Y(x,y+1),Y(x−1,y+1),Y(x−1,y))の値は、それぞれ80,70,75,100,100,100,80,80であるから、アクティビティは次式で表される。
Activity(x,y) ={|80−110|+|70−110|+|75−110|+|100−110|+|100−110|+|100−110|+|80−110|+|80−110|}/8 =24.375となる。
In the case of the example in FIG. 74, the value of the pixel of interest Y (x, y) located in the center among 3 × 3 pixels is 110, and eight pixels adjacent to it (adjacent pixels Y (x−1, y) -1), Y (x, y-1), Y (x + 1, y-1), Y (x + 1, y), Y (x + 1, y + 1), Y (x, y + 1), Y (x-1, y + 1) ), Y (x-1, y)) are 80, 70, 75, 100, 100, 100, 80, and 80, respectively, so that the activity is expressed by the following equation.
Activity (x, y) = {| 80-110 | + | 70-110 | + | 75-110 | + | 100-110 | + | 100-110 | + | 80-110 | + | 80−110 |} /8=24.375.
動きベクトル確度を画素単位で算出する場合には、このアクティビティがそのまま動きベクトル確度の算出に用いられる。複数の画素よりなるブロック単位で動きベクトル確度を算出するには、ブロックのアクティビティがさらに算出される。 When the motion vector accuracy is calculated in units of pixels, this activity is directly used for calculating the motion vector accuracy. In order to calculate the motion vector accuracy in units of blocks including a plurality of pixels, the block activity is further calculated.
ブロック単位で動きベクトル確度を算出するため、ブロックのアクティビティは、例えば、図75Aに示されるように、一辺を5(=2L+1=2×2+1)画素としたブロックBPでは、アクティビティ算出範囲151aの中央に含まれる画素71が注目画素とされ、画素71の値と、それに隣接する8つの画素の値においてアクティビティが演算される。
In order to calculate the motion vector accuracy in units of blocks, for example, as shown in FIG. 75A, the activity of the block is a block BP in which one side is 5 (= 2L + 1 = 2 × 2 + 1) pixels. A
また、図75B乃至Fに示されるように、ブロックBP内の画素が順に走査され、アクティビティ算出範囲151b乃至151fに含まれる注目画素と隣接画素とのアクティビティが演算される。ブロックBPの全ての画素に対して演算されたアクティビティの総和がブロックBPのブロックのアクティビティとされる。 Further, as shown in FIGS. 75B to 75F, the pixels in the block BP are sequentially scanned, and the activities of the target pixel and adjacent pixels included in the activity calculation ranges 151b to 151f are calculated. Sum of the calculated activities for all the pixels of the block B P is an activity of blocks of the block B P.
従って、次式で表されるブロック内の全画素のアクティビティの総和が、そのブロックのアクティビティ(ブロックアクティビティ)Blockactivity(i,j)と定義される。 Accordingly, the sum of the activities of all the pixels in the block expressed by the following equation is defined as the activity (block activity) Blockactivity (i, j) of the block.
上記式(20)における総和は、xが−LからLについて、yが−LからLについて行われる。式(20)のi,jは、ブロックの中心位置を表しており、式(19)のi,jとは異なるものである。 The summation in the above equation (20) is performed for x from -L to L and y from -L to L. I, j in equation (20) represents the center position of the block, and is different from i, j in equation (19).
なお、アクティビティとしては、この他、ブロックにおける分散値、ダイナミックレンジ、その他の画素値の空間方向の変動を表す値などとすることも可能である。 In addition, the activity may be a dispersion value in a block, a dynamic range, a value representing a variation in the spatial direction of other pixel values, or the like.
閾値判定部1051は、ステップS933において、アクティビティ算出部1042により、ステップS932の処理で算出されたブロックアクティビティが、予め設定してある閾値(図43を参照して説明した閾値THa)より大きいか否かを判定する。その詳細は、図76のフローチャートを参照して説明するが、この処理により、ブロックアクティビティが閾値THaより大きいか否かのフラグが設定される。
In step S933, the
ステップS934において、正規化処理部1052は、正規化処理を実行する。その詳細は、図77を参照して後述するが、この処理によりステップS931の処理で算出された評価値、ステップS932の処理で算出されたブロックアクティビティ、および閾値(図43を参照して説明した直線203の傾き)に基づいた動きベクトル確度が演算される。
In step S934, the
ステップS935において、統合処理部1053により統合処理が実行される。その詳細は、図78を参照して後述するが、この処理によりステップS933の処理(図76のステップ52またはステップS953の処理)で設定されたフラグに基づいて、図示せぬ装置に出力する動きベクトル確度が決定される。
In step S935, integration processing is executed by the
次に、図76を参照して、図72のステップS933の処理の閾値処理の詳細について説明する。ステップS951において、閾値判定部1051は、図72のステップS932の処理の結果、算出されたブロックアクティビティが閾値THaより大きいか否かを判定する。
Next, with reference to FIG. 76, the details of the threshold process of the process of step S933 of FIG. 72 will be described. In step S951, the
具体的には、実験の結果、ブロックアクティビティと評価値は、動きベクトルをパラメータとして、図43に示される関係を有する。図43に関する説明は、既にしたので、ここでは、その説明を省略する。閾値判定部1051は、アクティビティ算出部1042より入力されたブロックアクティビティの値が、閾値THaより大きいか否かを表すフラグを統合処理部1053に出力する。
Specifically, as a result of the experiment, the block activity and the evaluation value have the relationship shown in FIG. 43 using the motion vector as a parameter. Since description on FIG. 43 has already been made, description thereof is omitted here. The
ステップS951において、ブロックアクティビティが閾値THaより大きいと判定された場合(対応する動きベクトルが正しい可能性が高い場合)、ステップS952に進み、閾値判定部1051は、ブロックアクティビティが閾値THaより大きいことを示すフラグを設定する。
When it is determined in step S951 that the block activity is greater than the threshold THa (when the corresponding motion vector is likely to be correct), the process proceeds to step S952, and the
これに対して、ステップS951において、ブロックアクティビティが閾値THaより大きくはない(小さい)と判定された場合(対応する動きベクトルが正しくない可能性がある場合)、ステップS953に進み、ブロックアクティビティが大きくはない(小さい)ことを示すフラグが設定される。 On the other hand, when it is determined in step S951 that the block activity is not larger (smaller) than the threshold THa (when the corresponding motion vector may be incorrect), the process proceeds to step S953, where the block activity is larger. A flag indicating that there is no (small) is set.
そして、閾値判定部1051は、入力されたブロックアクティビティが閾値より大きいか否かを示すフラグを統合処理部1053に出力する。
Then, the
次に、図77のフローチャートを参照して、図72のステップS934の正規化処理の詳細について説明する。ステップS971において、正規化処理部1052は、図72のステップS931の処理で算出された評価値、ステップS932の処理で算出されたブロックアクティビティ、および予め設定されている閾値(図43の直線203の傾き)に基づいて、次式に従って動きベクトル確度VCを演算する。
Next, details of the normalization processing in step S934 in FIG. 72 will be described with reference to the flowchart in FIG. In step S971, the
VC=1−評価値/ブロックアクティビティ ・・・(21) VC = 1-evaluation value / block activity (21)
動きベクトル確度VCのうち、評価値をブロックアクティビティで割り算して得られた値は、その値によって規定される図43のグラフ上の位置が、原点Oと点Pを結ぶ傾きが1の直線203より、図中下側の領域内であるのか、図中上側の領域内であるのかを表す。すなわち、直線203の傾きは1であり、評価値をブロックアクティビティで割り算して得られた値が1より大きければ、その値に対応する点は、直線203の上側の領域に分布する点であることを意味する。そしてこの値を1から減算して得られる動きベクトル確度VCは、その値が小さい程(負に大きい程)、対応する点が領域R2に分布する可能性が高いことを意味する。 Of the motion vector accuracy VC, the value obtained by dividing the evaluation value by the block activity is a straight line 203 where the position on the graph of FIG. 43 defined by the value is the slope connecting the origin O and the point P is 1. Therefore, it indicates whether the region is in the lower region or the upper region in the figure. That is, the slope of the straight line 203 is 1, and if the value obtained by dividing the evaluation value by the block activity is greater than 1, the points corresponding to the value are points distributed in the area above the straight line 203. Means that. The motion vector accuracy VC obtained by subtracting this value from 1 means that the smaller the value (the larger the negative value), the higher the possibility that corresponding points will be distributed in the region R2.
これに対して、評価値をブロックアクティビティで割り算して得られた値が1より小さければ、その値に対応する点は、直線203の図中下側の領域に分布することを意味する。そして、そのときの動きベクトル確度VCは、その値が大きい程(0に近い程)、対応する点が領域R1に分布することを意味する。 On the other hand, if the value obtained by dividing the evaluation value by the block activity is smaller than 1, it means that the points corresponding to the value are distributed in the lower area of the straight line 203 in the figure. The motion vector accuracy VC at that time means that the larger the value (closer to 0), the corresponding points are distributed in the region R1.
ステップS972において、正規化処理部1052は、式(21)に基づいて算出された動きベクトル確度VCが0より小さいか否か(動きベクトル確度VCが負の値か否か)を判定する。動きベクトル確度VCが0以上の値の場合、正規化処理部1052は、ステップS973に進み、ステップS971の処理で演算された動きベクトル確度VCをそのまま統合処理部1053に供給する。
In step S972, the
これに対して、ステップS972において、動きベクトル確度VCが0より小さい(動きベクトル確度VCが負の値)と判定された場合、ステップS974に進み、正規化処理部1052は、動きベクトル確度VCを固定値として0に設定し、統合処理部1053に供給する。
In contrast, if it is determined in step S972 that the motion vector accuracy VC is smaller than 0 (the motion vector accuracy VC is a negative value), the process proceeds to step S974, and the
以上のようにして、動きベクトルが正しくない可能性がある(不正解ベクトルの可能性がある)場合(動きベクトル確度VCが負の場合)、動きベクトル確度は0に設定される。 As described above, when there is a possibility that the motion vector is not correct (there is a possibility of an incorrect solution vector) (when the motion vector accuracy VC is negative), the motion vector accuracy is set to zero.
次に、図78のフローチャートを参照して、図72のステップS935の統合処理の詳細について説明する。 Next, details of the integration processing in step S935 in FIG. 72 will be described with reference to the flowchart in FIG.
統合処理部1053は、ステップS991において、ブロックアクティビティが閾値THa以下か否かを判定する。この判定は、閾値判定部1051より供給されたフラグに基づいて行われる。ブロックアクティビティの値が閾値THaより大きい場合には、ステップS992において、統合処理部1053は、正規化処理部1052によって演算された動きベクトル確度VCの値を、そのまま出力する。
In step S991, the
これに対して、ブロックアクティビティが閾値THa以下であると判定された場合には、ステップS993において、正規化処理部1052によって算出された動きベクトル確度VCの値が0に設定され、出力される。
On the other hand, if it is determined that the block activity is equal to or less than the threshold value THa, the value of the motion vector accuracy VC calculated by the
これは、正規化処理部1052において演算された動きベクトルの確度VCの値が正であったとしても、ブロックアクティビティの値が閾値THaより小さい場合には、正しい動きベクトルが得られていない可能性があるからである。すなわち、図43に示されるように、原点Oと点Pの間においては、曲線202が、曲線201より図中下側に(直線203より下側に)突出することになる。ブロックアクティビティの値が閾値THaより小さい区間であって、曲線201と曲線202において囲まれる領域R3においては、評価値をブロックアクティビティで割り算して得られる値は、領域R1とR2の両方に分布し、正しい動きベクトルが得られていない可能性が高い。そこで、このような分布状態である場合には、動きベクトルの確度は低いものとして処理するようにする。このため、ステップS993において、動きベクトル確度VCは、その値が負である場合はもとより、正であったとしても、閾値THaより小さい場合には、0に設定される。このようにすることで、動きベクトル確度VCの値が正である場合には、正しい動きベクトルが得られている場合であることを確実に表すことが可能となる。しかも、動きベクトル確度VCの値が大きい程、正しい動きベクトルが得られている確率が高くなる(分布が領域R1に含まれた確率が高くなる)。
This is because there is a possibility that a correct motion vector is not obtained if the block activity value is smaller than the threshold value THa even if the value of the motion vector accuracy VC calculated by the
このことは、一般的に輝度変化が少ない領域(アクティビティが小さい領域)では信頼性が高い動きベクトルを検出することが困難であるとの経験上の法則とも一致する。 This coincides with an empirical rule that it is generally difficult to detect a motion vector with high reliability in a region where the luminance change is small (region where the activity is small).
以上のようにして、動きベクトル確度が算出される。従って、動きベクトル確度を定量的な数値として表すことが可能になり、信頼性の高い動きベクトルを検出することが可能になる。なお、フレームの画像を処理単位として説明したが、フィールドを処理単位としてもよい。 The motion vector accuracy is calculated as described above. Therefore, the motion vector accuracy can be expressed as a quantitative numerical value, and a highly reliable motion vector can be detected. Note that although the frame image has been described as a processing unit, a field may be used as a processing unit.
上述した画像処理装置1000は、例えば、パーソナルコンピュータなどで構成することができる。
The above-described
この場合、画像処理装置1000は、例えば、図79で示されるように構成される。CPU(Central Processing Unit)1231は、ROM(Read Only Memory)1232に記憶されているプログラム、または記憶部1239からRAM(Random Access Memory)1233にロードされたプログラムに従って各種の処理を実行する。RAM1233にはまた、CPU1231が各種の処理を実行する上において必要なデータなども適宜記憶される。
In this case, the
CPU1231、ROM1232、およびRAM1233は、バス1234を介して相互に接続されている。このバス1234にはまた、入出力インタフェース1235も接続されている。
The
入出力インタフェース1235には、キーボード、マウスなどよりなる入力部1236,CRT(Cathode Ray Tube),LCD(Liquid Crystal Display)などよりなるディスプレイ、並びにスピーカなどよりなる出力部1237、モデム、ターミナルアダプタなどより構成される通信部1238、ハードディスクなどより構成される記憶部1239が接続されている。通信部1238は、図示せぬLANやインターネットを介して他の装置との通信処理を行う。
The input /
入出力インタフェース1235にはまた、ドライブ1240が接続され、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア1241が適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて記憶部1239にインストールされる。
A
次に、本発明を応用した符号化装置1261について、図80を参照して説明する。 Next, an encoding device 1261 to which the present invention is applied will be described with reference to FIG.
この符号化装置1261においては、入力画像は、動き演算部1271の動きベクトル検出部1021、動き補償部1272、および選択部1273に供給される。動き演算部1271は、上述した図65の画像処理装置1000と実質的に同様の構成とされている。動きベクトル検出部1021は、入力画像から動きベクトルを検出し、検出した動きベクトルを動き補償部1272、および付加コード作成部1275に出力する。また、動きベクトル検出部1021は、動きベクトル、および入力画像を動きベクトル確度算出部1022に出力する。
In the encoding device 1261, the input image is supplied to the motion
動きベクトル確度算出部1022は、動きベクトル検出部1021より入力された動きベクトル、および入力画像から動きベクトル確度を算出し、制御部1274に出力する。制御部1274は、入力された動きベクトル確度に基づいて選択部1273、および付加コード作成部1275を制御する。
The motion vector
動き補償部1272は、供給された入力画像と動きベクトル検出部1021より供給された動きベクトルに基づいて、動き補償を行い、動き補償した画像を選択部1273に供給する。選択部1273は、制御部1274の制御に基づいて、画素値符号化部1276に入力画像、または動き補償された画像を選択して出力する。画素値符号化部1276は、入力された画像の符号化を行い、統合部1277に出力する。
The
付加コード作成部1275は、制御部1274の制御に基づいて、各フレームの画像に対し、動き補償を行ったか否かを表す付加コードを作成し、動きベクトル検出部1021より入力された動きベクトルと合成し、必要に応じて、さらに動きベクトル確度を付加して、統合部1277に出力する。
Based on the control of the
統合部1277は、画素値符号化部1276から入力された符号、および付加コード作成部1275から入力された付加コードを統合して図示せぬ装置に出力する。
The
次に、符号化装置1261の処理について、図81のフローチャートを参照して説明する。なお、ステップS1021乃至ステップS1025の処理は、図67で説明したステップS901乃至ステップS905の処理と同様の処理である。すなわち、画像が入力され、画像の各フレームが所定のブロックに分割される。分割されたブロックに基づいて、動きベクトルが検出され、各動きベクトルの確度(動きベクトル確度)が算出され、全てのブロックに対して動きベクトル確度が算出されるまで同様の処理が繰り返し実行される。 Next, processing of the encoding device 1261 will be described with reference to the flowchart of FIG. Note that the processes in steps S1021 to S1025 are the same as the processes in steps S901 to S905 described with reference to FIG. That is, an image is input and each frame of the image is divided into predetermined blocks. Based on the divided blocks, a motion vector is detected, the accuracy of each motion vector (motion vector accuracy) is calculated, and the same processing is repeatedly performed until the motion vector accuracy is calculated for all blocks. .
その後、ステップS1026において、動き補償部1272は、入力画像と動きベクトルに基づいて動き補償を行う。すなわち、動きベクトルに基づいて、前後のフレームの画像の差分を算出し、差分画像(動き補償画像)を作成する。
Thereafter, in step S1026, the
ステップS1027において、選択部1273は、制御部1274の制御に基づいて、入力画像、または動き補償部1272より供給された動き補償された画像のどちらかを選択する。すなわち、制御部1274は、動きベクトル確度が充分大きいとき、選択部1273に、符号化する画像として動き補償された画像を選択させ、そうでないとき入力画像を選択させる。動きベクトル確度に基づいて、入力画像と動き補償された画像のいずれかが選択されるので、信頼性の低い動きベクトルによって動き補償された画像が利用されることを防ぐことが可能となる。選択部1273は、選択した画像を画素値符号化部1276に供給する。
In step S <b> 1027, the
ステップS1028において、画素値符号化部1276は、ステップS1028の処理で選択された画像(入力画像、または動き補償された画像)の符号化を行う。
In step S1028, the pixel
ステップS1029において、付加コード作成部1275は、制御部1274からの制御に基づいて、復号時に必要な符号化された画像が動き補償された画像か否かを表す付加コードを作成する。この付加コードには、動きベクトル確度を含めることができる。
In step S <b> 1029, the additional
ステップS1030において、統合部1277は、ステップS1028の処理により符号化された画像とステップS1029の処理により作成された付加コードを統合し、図示せぬ装置に出力する。
In step S1030, the
以上のようにして、画像が符号化され、正しくない可能性がある(不正解ベクトルの可能性がある)動きベクトルに基づいて動き補償された画像が利用されることを防ぐことが可能となる。従って、信頼性のない動きベクトルを用いて動き補償を行うことで画像が破綻してしまうことを防ぎ、復号時に高画質な画像を得ることが可能となる。 As described above, an image is encoded, and it is possible to prevent the use of an image compensated for motion based on a motion vector that may be incorrect (possibly an incorrect solution vector). . Therefore, by performing motion compensation using an unreliable motion vector, it is possible to prevent the image from failing and to obtain a high-quality image at the time of decoding.
図82は、本発明を手振れ補正装置1301に応用した場合の例を表している。手振れ補正装置1301は、例えば、デジタルビデオカメラ等に適用される。 FIG. 82 shows an example where the present invention is applied to a camera shake correction apparatus 1301. The camera shake correction device 1301 is applied to, for example, a digital video camera.
入力画像は、背景動き検出部1311、および出力画像生成部1314に入力される。背景動き検出部1311は、入力画像から背景動きを検出し、変位蓄積部1312に出力する。背景動き検出部1311の詳細な構成は図83を参照して後述する。変位蓄積部1312は、入力された背景動きから変位量を蓄積し、蓄積した変位量を手振れ判定部1313、および出力画像生成部1314に出力する。手振れ判定部1313は、入力された変位情報を所定の閾値に基づいて、手振れか否かを判定し、判定結果を出力画像生成部1314に出力する。
The input image is input to the background
出力画像生成部1314は、供給されている入力画像から、変位蓄積部1312より入力された変位量と手振れ判定部1313から入力された判定結果に基づいて、出力画像を生成し、例えば、HDD(Hard Disk Drive)、ビデオテープ等のような書き込み可能な記録媒体1315に記録する。また、出力画像生成部1314は、生成した画像を、例えば、LCD(Liquid Crystal Display)等で構成される表示部1316に出力し、表示させる。
The output
図83は、図82の背景動き検出部1311の詳細な構成例を表している。この構成例においては、背景動き検出部1311は、動き演算部1321、頻度分布算出部1322、および背景動き決定部1323により構成されている。動き演算部1321は、上述した図65の画像処理装置1000と実質的に同様の構成とされている。
FIG. 83 shows a detailed configuration example of the background
入力画像は、動き演算部1321の動きベクトル検出部1021に供給される。動きベクトル検出部1021は、入力画像から動きベクトルを検出し、検出した動きベクトル、および入力画像を動きベクトル確度算出部1022に出力する。動きベクトル確度算出部1022は、入力された動きベクトルおよび入力画像に基づいて、対応する動きベクトルの確度(動きベクトル確度)を算出し、頻度分布算出部1322に出力する。
The input image is supplied to the motion
頻度分布算出部1322は、動きベクトルの頻度分布を算出する。ただし、この頻度には、動き演算部1321より供給される動きベクトル確度VCを用いることで、確からしい動きに重みが与えられるように、重み付けが行われる。背景動き決定部1323は、頻度分布算出部1322により算出された頻度分布に基づいて、頻度が最大となる動きを背景動きとして決定する処理を行い、変位蓄積部1312へ出力する。
The frequency
次に、図84のフローチャートを参照して、手振れ補正装置1301の手振れ補正処理を説明する。ステップS1031乃至ステップS1034の処理のそれぞれは図67を参照して説明したステップS901乃至ステップS904の処理と同様である。すなわち、これらの処理で、入力画像が取得され、画像のフレームが所定のブロックに分割される。分割されたブロックに基づいて、例えば、ブロックマッチング法により動きベクトルが検出され、各動きベクトルの確度(動きベクトル確度)が算出される。 Next, the camera shake correction processing of the camera shake correction apparatus 1301 will be described with reference to the flowchart in FIG. Each of the processes in steps S1031 to S1034 is the same as the processes in steps S901 to S904 described with reference to FIG. That is, in these processes, an input image is acquired, and a frame of the image is divided into predetermined blocks. Based on the divided blocks, for example, a motion vector is detected by a block matching method, and the accuracy (motion vector accuracy) of each motion vector is calculated.
ステップS1035において、頻度分布算出部1322は、動き頻度分布を算出する。具体的には、頻度分布算出部1322は、例えば、背景動きの候補としての動きベクトルのx座標とy座標がそれぞれ基準点から±16画素分の範囲で表されるとすると、1089個(=16×2+1)×(16×2+1))の箱、すなわち動きベクトルが取り得る値に対応する座標分の箱を用意し、動きベクトルが発生した場合、その動きベクトルに対応する座標に1を加算する。このようにすることで、動きベクトルの頻度分布を算出することができる。
In step S1035, the frequency
ただし、1個の動きベクトルが発生した場合、1を加算していくと、確度が低い動きベクトルの発生頻度が多い場合、その確実性が低い動きベクトルが背景動きとして決定されてしまう恐れがある。そこで、頻度分布算出部1322は、動きベクトルが発生した場合、その動きベクトルに対応する箱(座標)に、値1を加算するのではなく、値1に動きベクトル確度VCを乗算した値(=動きベクトル確度VCの値)を加算する。動きベクトル確度VCの値は、0から1の間の値として正規化されており、その値が1に近いほど確度が高い値である。従って、このようにして得られた頻度分布は、動きベクトルをその確度に基づいて重み付けした頻度分布となる。これにより、確度の低い動きが背景動きとして決定される恐れが少なくなる。
However, when one motion vector is generated, if 1 is added, if the frequency of occurrence of a motion vector with low accuracy is high, a motion vector with low certainty may be determined as the background motion. . Therefore, when a motion vector is generated, the frequency
次に、ステップS1036において、動きベクトル確度算出部1022は、全てのブロックに対して動きベクトルの確度が算出されたか否かを判定する。まだ処理していないブロックが存在する場合には、ステップS1034に戻り、次のブロックについてステップS1034、およびステップS1035の処理が繰り返し実行される。
Next, in step S1036, the motion vector
以上のようにして、全画面に対して動き頻度分布算出処理が行われた場合、ステップS1037に進み、背景動き決定部1323は、頻度分布の最大値を検索する処理を実行する。すなわち、背景動き決定部1323は、頻度分布算出部1322により算出された頻度の中から最大の頻度のものを選択し、その頻度に対応する動きベクトルを背景動きの動きベクトルとして決定する。この背景動きの動きベクトルは、変位蓄積部1312に供給される。
As described above, when the motion frequency distribution calculation process is performed on the entire screen, the process proceeds to step S1037, and the background
ステップS1038において、変位蓄積部1312は、各フレームの背景動きとしての動きベクトルを順次記憶する。
In step S1038, the
ステップS1039において、手振れ判定部1313は、背景動きとしての動きベクトルの変位量(絶対値)が予め設定されている閾値より大きいか否かを判定することで、入力画像がユーザの手振れによってブレた画像か否かを判定する。変位量が閾値より大きい場合、手振れであると判定され、閾値より小さい場合、手振れではないと判定される。手振れ判定部1313は、判定結果を出力画像生成部1314に供給する。
In step S1039, the camera
ステップS1039において、手振れ判定部1313は、手振れが発生したと判定された場合、ステップS140において、出力画像生成部1314は、そのときの変位量とは逆の変位量分シフトした画像を生成し、出力する。これにより、ユーザは、手振れの少ない画像を記録または見ることが可能となる。
In step S1039, when it is determined that the camera shake has occurred, in step S140, in step S140, the output
これに対して、ステップS1039において、手振れではなかったと判定された場合、ステップS141に進み、出力画像生成部1314は、入力された画像をそのまま出力する。出力された画像は、記録媒体1315に記録され、また表示部1316に表示される。
On the other hand, if it is determined in step S1039 that there is no camera shake, the process proceeds to step S141, and the output
以上のようにして、手振れが検出、補正される。動きベクトル確度を利用することで、背景動きを精度良く検出することが可能となり、ユーザに手振れの少ない画像を提供することが可能となる。 As described above, camera shake is detected and corrected. By using the motion vector accuracy, the background motion can be detected with high accuracy, and an image with less camera shake can be provided to the user.
図85は、本発明を適用した蓄積装置1341の例を表している。HDD(Hard Disk Drive)レコーダとしての蓄積装置1341は、選択部1351、記録媒体(HDD)1352、インデックス作成部1353、シーンチェンジ検出部11354、制御部1355、インデックステーブル1356、選択部1357、表示画像作成部1358、全体制御部1359、指示入力部1360で構成されている。
FIG. 85 shows an example of a storage device 1341 to which the present invention is applied. A storage device 1341 as an HDD (Hard Disk Drive) recorder includes a
選択部1351は、全体制御部1351の制御に基づいて記録媒体1352に記録されている画像、または入力画像を選択し、インデックス作成部1353、シーンチェンジ検出部11354、および選択部1357に供給する。HDDで構成される記録媒体1352には、全体制御部1359の制御に基づいて画像が記録される。
The
シーンチェンジ検出部11354は、供給された画像からシーンチェンジを検出し、検出結果を制御部1355に供給する。制御部1355は、供給された検出結果に基づいてインデックス作成部1353、およびインデックステーブル1356を制御する。
The scene change detection unit 11354 detects a scene change from the supplied image and supplies the detection result to the
インデックス作成部1353は、制御部1355の制御に基づいて、記録媒体1352に記録された画像であって、シーンチェンジと判定されたときの各シーンの先頭の画像を縮小した画像であるインデックス画像、およびそのインデックス画像に対応する画像の記録媒体1352上での位置を特定する付加情報(タイムコード、アドレスなど)を抽出し、インデックステーブル1356に供給する。
The
インデックステーブル1356は、供給されたインデックス画像とそれに対応する付加情報を保持する。また、インデックステーブル1356は、制御部1355の制御に基づいて、保持しているインデックス画像に対応する付加情報を全体制御部1359に供給する。
The index table 1356 holds the supplied index image and additional information corresponding thereto. Further, the index table 1356 supplies additional information corresponding to the held index image to the
選択部1357は、全体制御部1359の指示に従って、選択部1351から供給された画像、またはインデックステーブル1356から入力されたインデックス画像の一方を選択し、表示画像作成部1358に出力する。表示画像作成部1358は、全体制御部1359の指示に従って、入力された画像から、画像表示装置365で表示可能な画像を作成、出力し、表示させる。
The
制御部1355は、シーンチェンジ検出部1354から出力されるシーンチェンジフラグ、および全体制御部1359の制御に基づいて、インデックス作成部1353やインデックステーブル1356を制御する。
The
全体制御部1359は、例えばマイクロコンピュータなどにより構成され、各部を制御する。指示入力部1360は、各種のボタン、スイッチ、あるいはリモートコントローラなどにより構成され、ユーザからの指示に対応する信号を全体制御部1359に出力する。
The
図86は、図85のシーンチェンジ検出部1354の詳細な構成例を表している。この例においては、動き演算部1371、動きベクトル確度平均値算出部1372、閾値判定部1373によりシーンチェンジ検出部1354が構成されている。動き演算部1371は、上述した図65の画像処理装置1000と実質的に同様の構成とされている。
FIG. 86 shows a detailed configuration example of the scene
動きベクトル検出部1021は、選択部1351より入力された画像から動きベクトルを検出し、検出した動きベクトル、および入力画像を動きベクトル確度算出部1022に出力する。動きベクトル確度算出部1022は、入力された動きベクトルおよび入力画像に基づいて、対応する動きベクトルの確度(動きベクトル確度)を算出し、動きベクトル確度平均値算出部1372に出力する。
The motion
動きベクトル確度平均値算出部1372は、動き演算部1371より供給された動きベクトル確度VCの全画面の平均値を算出し、閾値判定部1373に出力する。閾値判定部1373は、動きベクトル確度平均値算出部1372より供給された平均値を、予め定められている閾値と比較し、その比較結果に基づいて、シーンチェンジであるか否かを判定し、判定結果を制御部1355に出力する。
The motion vector accuracy average
次に、図87のフローチャートを参照して、蓄積装置1341が記録媒体1352に画像を記録する場合に実行されるインデックス画像作成処理の詳細について説明する。この処理は、入力された画像が記録媒体1352に記録されているとき実行される。
Next, details of index image creation processing executed when the storage device 1341 records an image on the
ステップS1071乃至ステップS1074の処理のそれぞれは図67を参照して説明したステップS901乃至ステップS904の処理と同様である。 Each of the processes in steps S1071 to S1074 is the same as the processes in steps S901 to S904 described with reference to FIG.
すなわち、これらの処理で画像が入力され、画像のフレームが所定のブロックに分割される。分割されたブロックに基づいて、例えば、ブロックマッチング法により動きベクトルが検出され、各動きベクトルの確度(動きベクトル確度)が算出される。 That is, an image is input by these processes, and the frame of the image is divided into predetermined blocks. Based on the divided blocks, for example, a motion vector is detected by a block matching method, and the accuracy (motion vector accuracy) of each motion vector is calculated.
ステップS1075において、動きベクトル確度平均値算出部1372は、選択部1351を介して入力される画像(記録媒体1352に記録中の画像)の動きベクトル確度の総和を算出する。具体的には、動きベクトル確度平均値算出部1372は、動き演算部1371の動きベクトル確度算出部1022の統合処理部1053(図66)より出力された各ブロック毎に算出された動きベクトル確度VCの値を加算する処理を実行する。ステップS1076において、動きベクトル確度算出部1022は、全ブロックについて動きベクトル確度VCを算出したか否かを判定し、まだ終了していない場合には、ステップS1074およびステップS1075の処理を繰り返す。これらの処理を繰り返すことで、1画面分の全ブロックの動きベクトル確度VCの総和が算出される。ステップS1076において1画面全部についての動きベクトル確度VCの総和の算出処理が終了したと判定された場合、ステップS1077に進み、動きベクトル確度平均値算出部1372は、動きベクトル確度VCの平均値を算出する処理を実行する。具体的には、ステップS1075の処理で算出された1画面分の動きベクトル確度VCの総和を、足し込まれたブロック数で除算して得られた値が平均値として算出される。従って、この平均値は1画面(1フレーム)について1個となる。
In step S <b> 1075, the motion vector accuracy average
ステップS1078において、閾値判定部1373は、ステップS1077の処理で動きベクトル確度平均値算出部1373により算出された動きベクトル確度VCの平均値を、予め設定されている閾値と比較し、その比較結果を制御部1355に出力する。ステップS1079において、制御部1355は、閾値判定部1373の比較結果に基づいて、平均値が閾値より小さいか否かを判定する。一般的に動画中の連続する2フレーム間でシーンチェンジが発生すると、対応する画像が存在しないため、動きベクトルを算出しても、その動きベクトルは確からしくないことになる。そこで、動きベクトル確度VCの平均値が閾値より小さい場合には、制御部1355は、ステップS1080において、インデックス作成部1353を制御し、インデックス画像を作成させる。
In step S1078, the
すなわち、ステップS1081において、インデックス作成部1353は、制御部1355の制御に基づいて、新たなシーンの先頭のフレームの画像のサイズを縮小し、インデックス画像を生成する。インデックス画像が、例えば1画面中に3×3個配置されて表示される場合、元の画像の縦方向と横方向のサイズをそれぞれ1/3に縮小することでインデックス画像が生成される。また、このとき、インデックス作成部1353は、そのフレームの画像の記録媒体1352上での記録位置を特定する付加情報(タイムコード、アドレスなど)を抽出する。
That is, in step S1081, the
ステップS1081において、インデック作成部1353は、ステップS1080の処理で作成したインデックス画像、およびそれに対応する付加情報をインデックステーブル1356に記録する。
In step S1081, the
ステップS1079で、動きベクトル確度VCの平均値が閾値以上であると判定された場合、シーンチェンジが発生した可能性は低いので、ステップS1080,S1081の処理はスキップされ、インデックス画像は作成されない。 If it is determined in step S1079 that the average value of the motion vector accuracy VC is equal to or greater than the threshold value, it is unlikely that a scene change has occurred. Therefore, the processes in steps S1080 and S1081 are skipped and an index image is not created.
その後、ステップS1082で、制御部1355は、ユーザより、記録の終了が指令されたか否かを判定し、終了が指示されていない場合には処理はステップS1071に戻り、それ以降の処理が繰り返される。記録の終了が指示された場合、処理は終了される。
Thereafter, in step S1082, the
以上のようにして、記録動作中にシーンチェンジが自動的に検出され、インデックス画像が自動的に作成される。 As described above, a scene change is automatically detected during a recording operation, and an index image is automatically created.
次に図88のフローチャートを参照して、蓄積装置1341の画像表示装置365に対する画像出力処理を説明する。この処理は、ユーザにより記録画像の再生出力が指令されたとき実行される。 Next, image output processing for the image display device 365 of the storage device 1341 will be described with reference to the flowchart of FIG. This process is executed when a reproduction output of the recorded image is instructed by the user.
ステップS1201において、全体制御部1359は、ユーザの指示入力部1360の操作に基づいて、記録媒体1352に記録されている画像を再生出力させる。選択部1351は、記録媒体1352により再生された画像を、選択部1357を介して、表示画像作成部1358に供給する。表示画像作成部1358は、入力された画像を画像表示装置365に表示可能な画像に変換し、画像表示装置365に出力し、表示させる。
In step S <b> 1201, the
ステップS1202において、全体制御部1359は、ユーザによって指示入力部1360が操作されることでインデックス画像の表示が指示されたか否かを判定する。ユーザからインデックス画像を表示する指示が入力されていない場合、処理はステップS1201に戻り、それ以降の処理が繰り返し実行される。すなわち、記録媒体1352の記録画像を画像表示装置365に再生、出力(表示)する処理が継続される。
In step S1202, the
これに対して、ユーザからインデックス画像の表示が指示された場合、ステップ203において、全体制御部1359は、インデックステーブル1356を制御し、そこに記録されているインデックス画像を出力させる。すなわち、インデックステーブル1356は、インデックス画像を一覧として読み出し、選択部1357を介して、表示画像作成部1358に出力する。表示画像作成部1358は、入力されたインデックス画像の一覧を画像表示装置365に出力し、表示させる。これにより、画像表示装置365には、1画面中に、3×3個のインデックス画像が配置された一覧が表示される。
On the other hand, when the display of the index image is instructed by the user, in step 203, the
ユーザは、指示入力部1360を操作することで、複数表示されているインデックス画像(インデックス画像の一覧)の中から、1つを選択することができる。そこで、ステップS1206において、全体制御部1359は、画像表示装置365に表示されているインデックス画像が選択されたか否かを判定する。インデックス画像が選択されていないと判定された場合、処理はステップS1203に戻り、それ以降の処理が繰り返し実行される。すなわち、インデックス画像の一覧が画像表示装置365により継続的に表示される。
The user can select one from a plurality of displayed index images (a list of index images) by operating the
これに対し、インデックス画像が選択されたと判定された場合(ユーザからインデックス画像の一覧の中の所望のインデックス画像が選択(指示)された場合)、ステップS1205において、全体制御部1359は、その選択されたインデックス画像に対応する画像から始まる記録画像を記録媒体1352から再生させ、選択部1351、選択部1357および表示画像作成部1358を介し画像表示装置365に出力し、表示させる。すなわち、インデックス画像が選択されたと判定された場合、全体制御部1359は、インデックステーブル1356から、ステップS1204の処理で選択されたインデックス画像に対応する付加情報(タイムコード、アドレスなど)を読み込み、記録媒体1352を制御し、そのインデックス画像に対応する画像からそれに続く画像を再生させ、画像表示装置365に出力し、表示させる。
On the other hand, if it is determined that the index image has been selected (when the user selects (instructs) a desired index image in the list of index images), in step S1205, the
ステップS1206において、全体制御部1359は、終了が指示されたか否かを判定する。ユーザによって指示入力部1360が操作されることで、画像の出力(表示)終了の指示が入力されたか否かが判定される。終了の指示が入力されていないと判定された場合、処理はステップS1201に戻り、それ以降の処理が繰り返し実行される。これに対し、終了の指示が入力されたと判定された場合、処理は終了する。
In step S1206,
また、蓄積装置1341は、その記録媒体が例えば、DVD,ビデオテープ等である場合にも適用可能である。 The storage device 1341 can also be applied when the recording medium is, for example, a DVD or a video tape.
なお、上述した一連の処理をハードウェアで実現するか、ソフトウェアで実現するかは問わない。上述した一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、汎用のパーソナルコンピュータなどに、ネットワークやリムーバブルメディアなどの記録媒体からインストールされる。 It does not matter whether the above-described series of processing is realized by hardware or software. When the above-described series of processing is executed by software, a program constituting the software executes various functions by installing a computer incorporated in dedicated hardware or various programs. It can be installed on a general-purpose personal computer or the like from a recording medium such as a network or a removable medium.
また、本明細書において上述した一連の処理を実行するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。 In addition, the steps of executing the series of processes described above in this specification are performed in parallel or individually even if they are not necessarily processed in time series, as well as processes performed in time series in the order described. The processing to be performed is also included.
1 監視カメラシステム, 21 撮像部, 22 画像補正部, 24 追尾対象検出部, 25 エリア設定部, 26 オブジェクト追尾部, 51 テンプレートマッチング部, 52 動き推定部, 53 シーンチェンジ検出部, 54 背景動き推定部, 55 領域推定関連処理部, 56 乗り換え候補保持部, 57 追尾点決定部, 58 テンプレート保持部, 741 制御信号生成部, 742 画像特徴検出部, 743 アドレス演算部, 744 係数ROM, 745 領域抽出部, 746 積和演算部, 747 画像合成部, 1000 画像処理装置, 1021 動きベクトル検出部, 1022 動きベクトル確度算出部, 1041 評価値算出部, 1042 アクティビティ算出部, 1043 演算部, 1051 閾値判定部, 1052 正規化処理部, 1053 統合処理部, 1261 符号化装置, 1271 動き演算部, 1272 動き補償部, 1273 選択部, 1276 画素値符号化部, 1301 手振れ補正装置, 1311 背景動き検出部, 1312 変位蓄積部, 1313 手振れ判定部, 1321 動き演算部, 1322 頻度分布算出部, 1323 背景動き決定部, 1341 蓄積装置, 1354 シーンチェンジ検出部, 1371 動き演算部, 1372 動きベクトル確度平均値算出部, 1373 閾値判定部 DESCRIPTION OF SYMBOLS 1 Surveillance camera system, 21 Image pick-up part, 22 Image correction part, 24 Tracking object detection part, 25 Area setting part, 26 Object tracking part, 51 Template matching part, 52 Motion estimation part, 53 Scene change detection part, 54 Background motion estimation , 55 region estimation related processing unit, 56 transfer candidate holding unit, 57 tracking point determination unit, 58 template holding unit, 741 control signal generation unit, 742 image feature detection unit, 743 address calculation unit, 744 coefficient ROM, 745 region extraction Unit, 746 product-sum operation unit, 747 image composition unit, 1000 image processing device, 1021 motion vector detection unit, 1022 motion vector accuracy calculation unit, 1041 evaluation value calculation unit, 1042 activity calculation unit, 1043 calculation unit, 1051 threshold judgment Unit, 1052 normalization processing unit, 1053 integration processing unit, 1261 encoding device, 1271 motion calculation unit, 1272 motion compensation unit, 1273 selection unit, 1276 pixel value encoding unit, 1301 camera shake correction device, 1311 background motion detection unit, 1312 Displacement accumulation unit, 1313 Camera shake determination unit, 1321 Motion calculation unit, 1322 Frequency distribution calculation unit, 1323 Background motion determination unit, 1341 Accumulation device, 1354 Scene change detection unit, 1371 Motion calculation unit, 1372 Motion vector accuracy average value calculation unit , 1373 threshold determination unit
Claims (17)
前記注目画素を基準とする画素値の変動を表す変動値を算出する変動値算出手段と、
前記評価値と前記変動値に基づいて、前記動きベクトルの確度を演算する確度演算手段と
を備えることを特徴とする画像処理装置。 A pixel of interest which is at least one pixel on the first processing unit, and at least one pixel on a second processing unit different from the first processing unit, the motion vector of the pixel of interest Evaluation value calculation means for calculating an evaluation value representing a correlation with a corresponding pixel defined based on
Change value calculating means for calculating a change value representing a change in pixel value with respect to the target pixel;
An image processing apparatus comprising: an accuracy calculation unit that calculates the accuracy of the motion vector based on the evaluation value and the variation value.
ことを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the number of pixels of the target pixel and the number of corresponding pixels are the same.
ことを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the variation value is a value representing variation in a spatial direction of a pixel value.
ことを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the variation value is a variance value or a dynamic range.
ことを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the processing unit is a frame or a field.
ことを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the accuracy calculation unit calculates the accuracy of the motion vector based on a value obtained by normalizing the evaluation value with the variation value.
ことを特徴とする請求項1に記載の画像処理装置。 When the fluctuation value is larger than a predetermined threshold, the accuracy calculation means uses the value obtained by normalizing the evaluation value with the fluctuation value as the accuracy of the motion vector, and the fluctuation value is smaller than the threshold. The image processing apparatus according to claim 1, wherein a fixed value indicating that the accuracy of the motion vector is low is selected.
ことを特徴とする請求項1に記載の画像処理装置。 The image processing according to claim 1, wherein the evaluation value calculation unit calculates the evaluation value as a sum of absolute values of differences between a block including the target pixel and a pixel including the corresponding pixel. apparatus.
ことを特徴とする請求項1に記載の画像処理装置。 The fluctuation value calculating means is a block including a value obtained by dividing a sum of absolute values of differences between the target pixel and adjacent pixels adjacent to the target pixel in a block including the target pixel by the number of the adjacent pixels. The image processing apparatus according to claim 1, wherein the fluctuation value is calculated as a sum of the values.
前記変動値を第1の基準値と比較する比較手段と、
第2の基準値と、前記評価値を前記変動値で正規化した値との差を演算する差演算手段と、
前記比較手段による比較結果と、前記差演算手段により演算された差に基づいて、前記動きベクトルの確度を演算し、出力する出力手段と
を備えることを特徴とする請求項1に記載の画像処理装置。 The accuracy calculation means includes:
Comparing means for comparing the variation value with a first reference value;
Difference calculating means for calculating a difference between a second reference value and a value obtained by normalizing the evaluation value with the variation value;
The image processing according to claim 1, further comprising: an output unit that calculates and outputs the accuracy of the motion vector based on a comparison result by the comparison unit and a difference calculated by the difference calculation unit. apparatus.
前記動きベクトル検出手段により検出された前記動きベクトルに基づいて、前記入力画像を動き補償する動き補償手段と、
前記動き補償手段により動き補償された画像と動き補償されていない画像のいずれかを、前記動きベクトルの確度に基づいて選択する選択手段と、
前記選択手段により選択された画像を符号化する符号化手段と
をさらに備えることを特徴とする請求項1に記載の画像処理装置。 Motion vector detection means for detecting the motion vector from an input image and supplying it to the evaluation value calculation means;
Motion compensation means for motion compensation of the input image based on the motion vector detected by the motion vector detection means;
Selecting means for selecting one of an image motion-compensated by the motion compensation means and an image not motion-compensated based on the accuracy of the motion vector;
The image processing apparatus according to claim 1, further comprising: an encoding unit that encodes the image selected by the selection unit.
前記頻度分布算出手段により算出された前記頻度分布の最大値を検出し、検出された前記最大値に基づいて、背景動きを検出する最大値検出手段と
をさらに備えることを特徴とする請求項1に記載の画像処理装置。 A frequency distribution calculating means for calculating a frequency distribution weighted by the accuracy of the motion vector;
2. A maximum value detecting means for detecting a maximum value of the frequency distribution calculated by the frequency distribution calculating means and detecting a background motion based on the detected maximum value. An image processing apparatus according to 1.
前記平均値算出手段により算出された前記平均値を基準値と比較し、その比較結果に基づいてシーンチェンジの有無を判定する判定手段と
をさらに備えることを特徴とする請求項1に記載の画像処理装置。 Average value calculating means for calculating an average value of the accuracy of the motion vector in the processing unit;
2. The image according to claim 1, further comprising: a determination unit that compares the average value calculated by the average value calculation unit with a reference value and determines the presence or absence of a scene change based on the comparison result. Processing equipment.
ことを特徴とする請求項13に記載の画像処理装置。 The image processing apparatus according to claim 13, wherein the average value calculation unit calculates one average value for one processing unit.
前記注目画素を基準とする画素値の変動を表す変動値を算出する変動値算出ステップと、
前記評価値と前記変動値に基づいて、前記動きベクトルの確度を演算する確度演算ステップと
を含むことを特徴とする画像処理方法。 A pixel of interest which is at least one pixel on the first processing unit, and at least one pixel on a second processing unit different from the first processing unit, the motion vector of the pixel of interest An evaluation value calculating step for calculating an evaluation value representing a correlation with a corresponding pixel defined based on
A fluctuation value calculating step for calculating a fluctuation value representing a fluctuation of a pixel value with reference to the target pixel;
An image processing method comprising: an accuracy calculation step of calculating the accuracy of the motion vector based on the evaluation value and the variation value.
前記注目画素を基準とする画素値の変動を表す変動値を算出する変動値算出ステップと、
前記評価値と前記変動値に基づいて、前記動きベクトルの確度を演算する確度演算ステップと
を含むことを特徴とするコンピュータが読み取り可能なプログラムが記録されている記録媒体。 A pixel of interest which is at least one pixel on the first processing unit, and at least one pixel on a second processing unit different from the first processing unit, the motion vector of the pixel of interest An evaluation value calculating step for calculating an evaluation value representing a correlation with a corresponding pixel defined based on
A fluctuation value calculating step for calculating a fluctuation value representing a fluctuation of a pixel value with reference to the target pixel;
An accuracy calculation step of calculating the accuracy of the motion vector based on the evaluation value and the variation value. A recording medium on which a computer-readable program is recorded.
前記注目画素を基準とする画素値の変動を表す変動値を算出する変動値算出ステップと、
前記評価値と前記変動値に基づいて、前記動きベクトルの確度を演算する確度演算ステップと
をコンピュータに実行させることを特徴とするプログラム。 A pixel of interest which is at least one pixel on the first processing unit, and at least one pixel on a second processing unit different from the first processing unit, the motion vector of the pixel of interest An evaluation value calculating step for calculating an evaluation value representing a correlation with a corresponding pixel defined based on
A fluctuation value calculating step for calculating a fluctuation value representing a fluctuation of a pixel value with reference to the target pixel;
A program causing a computer to execute an accuracy calculation step of calculating the accuracy of the motion vector based on the evaluation value and the variation value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005000622A JP4617883B2 (en) | 2004-01-06 | 2005-01-05 | Image processing apparatus and method, program, and recording medium |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004000752 | 2004-01-06 | ||
JP2004077399 | 2004-03-18 | ||
JP2005000622A JP4617883B2 (en) | 2004-01-06 | 2005-01-05 | Image processing apparatus and method, program, and recording medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005301984A true JP2005301984A (en) | 2005-10-27 |
JP4617883B2 JP4617883B2 (en) | 2011-01-26 |
Family
ID=35333372
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005000622A Expired - Fee Related JP4617883B2 (en) | 2004-01-06 | 2005-01-05 | Image processing apparatus and method, program, and recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4617883B2 (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007074605A1 (en) * | 2005-12-26 | 2007-07-05 | Nikon Corporation | Image processing method, image processing program, image processing device, and imaging device |
JP2007336235A (en) * | 2006-06-15 | 2007-12-27 | Sony Corp | Method for detecting motion, program for its method, recording medium recording its program, and device for detecting motion |
WO2008084590A1 (en) * | 2007-01-12 | 2008-07-17 | Mitsubishi Electric Corporation | Image degradation detecting device, image degradation detecting method, program for executing the image degradation detecting method, and recording medium |
JP2009200672A (en) * | 2008-02-20 | 2009-09-03 | Sony Corp | Image signal processing apparatus, image signal processing method, and program |
EP2101486A2 (en) | 2008-03-13 | 2009-09-16 | Sony Corporation | Image processing apparatus and image processing method |
JP2009253505A (en) * | 2008-04-03 | 2009-10-29 | Sony Corp | Image signal processing apparatus, image signal processing method, and program |
KR20100108758A (en) * | 2009-03-30 | 2010-10-08 | 삼성전자주식회사 | A digital picturing device, a method for controlling the digital picturing device, and a computer-readable storage medium |
US8594371B2 (en) | 2009-04-08 | 2013-11-26 | Nikon Corporation | Subject tracking device and camera |
US20140314295A1 (en) * | 2013-04-22 | 2014-10-23 | Ge Medical Systems Global Technology Company, Llc | Image processing method and apparatus and program |
JPWO2016021121A1 (en) * | 2014-08-05 | 2017-05-25 | パナソニック株式会社 | Correction confirmation method and correction confirmation apparatus |
JP2017161586A (en) * | 2016-03-07 | 2017-09-14 | キヤノン株式会社 | Image shake correction device and method of controlling image shake correction device, imaging device, program, and storage medium |
CN111698517A (en) * | 2020-06-29 | 2020-09-22 | Oppo广东移动通信有限公司 | Method and device for determining motion vector, electronic equipment and readable storage medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020240853A1 (en) * | 2019-05-31 | 2020-12-03 | 日本電信電話株式会社 | Image processing device, image processing method, and program |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10134193A (en) * | 1996-10-31 | 1998-05-22 | Oki Electric Ind Co Ltd | Method and device for calculating moving vector |
-
2005
- 2005-01-05 JP JP2005000622A patent/JP4617883B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10134193A (en) * | 1996-10-31 | 1998-05-22 | Oki Electric Ind Co Ltd | Method and device for calculating moving vector |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1968308A1 (en) * | 2005-12-26 | 2008-09-10 | Nikon Corporation | Image processing method, image processing program, image processing device, and imaging device |
JPWO2007074605A1 (en) * | 2005-12-26 | 2009-06-04 | 株式会社ニコン | Image processing method, image processing program, image processing apparatus, and imaging apparatus |
WO2007074605A1 (en) * | 2005-12-26 | 2007-07-05 | Nikon Corporation | Image processing method, image processing program, image processing device, and imaging device |
US8482619B2 (en) | 2005-12-26 | 2013-07-09 | Nikon Corporation | Image processing method, image processing program, image processing device, and imaging device for image stabilization |
EP1968308A4 (en) * | 2005-12-26 | 2010-03-17 | Nikon Corp | Image processing method, image processing program, image processing device, and imaging device |
JP2007336235A (en) * | 2006-06-15 | 2007-12-27 | Sony Corp | Method for detecting motion, program for its method, recording medium recording its program, and device for detecting motion |
WO2008084590A1 (en) * | 2007-01-12 | 2008-07-17 | Mitsubishi Electric Corporation | Image degradation detecting device, image degradation detecting method, program for executing the image degradation detecting method, and recording medium |
JP4513034B2 (en) * | 2008-02-20 | 2010-07-28 | ソニー株式会社 | Image signal processing apparatus, image signal processing method, and program |
JP2009200672A (en) * | 2008-02-20 | 2009-09-03 | Sony Corp | Image signal processing apparatus, image signal processing method, and program |
US8611424B2 (en) | 2008-03-13 | 2013-12-17 | Sony Corporation | Image processing apparatus and image processing method |
EP2101486A2 (en) | 2008-03-13 | 2009-09-16 | Sony Corporation | Image processing apparatus and image processing method |
JP4623122B2 (en) * | 2008-04-03 | 2011-02-02 | ソニー株式会社 | Image signal processing apparatus, image signal processing method, and program |
US8369571B2 (en) | 2008-04-03 | 2013-02-05 | Sony Corporation | Image signal processing apparatus, image signal processing method, and program |
JP2009253505A (en) * | 2008-04-03 | 2009-10-29 | Sony Corp | Image signal processing apparatus, image signal processing method, and program |
KR20100108758A (en) * | 2009-03-30 | 2010-10-08 | 삼성전자주식회사 | A digital picturing device, a method for controlling the digital picturing device, and a computer-readable storage medium |
KR101581222B1 (en) * | 2009-03-30 | 2015-12-30 | 삼성전자주식회사 | A digital picturing device a method for controlling the digital picturing device and a computer-readable storage medium |
US8594371B2 (en) | 2009-04-08 | 2013-11-26 | Nikon Corporation | Subject tracking device and camera |
US20140314295A1 (en) * | 2013-04-22 | 2014-10-23 | Ge Medical Systems Global Technology Company, Llc | Image processing method and apparatus and program |
US9256916B2 (en) * | 2013-04-22 | 2016-02-09 | General Electric Company | Image processing method and apparatus and program |
JPWO2016021121A1 (en) * | 2014-08-05 | 2017-05-25 | パナソニック株式会社 | Correction confirmation method and correction confirmation apparatus |
JP2017161586A (en) * | 2016-03-07 | 2017-09-14 | キヤノン株式会社 | Image shake correction device and method of controlling image shake correction device, imaging device, program, and storage medium |
CN111698517A (en) * | 2020-06-29 | 2020-09-22 | Oppo广东移动通信有限公司 | Method and device for determining motion vector, electronic equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
JP4617883B2 (en) | 2011-01-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101108634B1 (en) | Image processing device and image processing method and recording medium | |
JP4725105B2 (en) | Image processing apparatus and method, program, and recording medium | |
US9262684B2 (en) | Methods of image fusion for image stabilization | |
TWI432017B (en) | Systems and methods for a motion compensated picture rate converter | |
JP5272886B2 (en) | Moving object detection apparatus, moving object detection method, and computer program | |
Huang et al. | Correlation-based motion vector processing with adaptive interpolation scheme for motion-compensated frame interpolation | |
JP4617883B2 (en) | Image processing apparatus and method, program, and recording medium | |
JP5163429B2 (en) | Motion vector detection apparatus, processing method thereof, and program | |
US8503820B2 (en) | Method and apparatus for removing image noise | |
US9020273B2 (en) | Image processing method, image processor, integrated circuit, and program | |
US10121251B2 (en) | Method for controlling tracking using a color model, corresponding apparatus and non-transitory program storage device | |
CN114429191B (en) | Electronic anti-shake method, system and storage medium based on deep learning | |
JP2009212605A (en) | Information processing method, information processor, and program | |
JP2010114596A (en) | Motion vector detection apparatus, motion vector processing method and program | |
CN114302137B (en) | Time domain filtering method and device for video, storage medium and electronic equipment | |
JP5812808B2 (en) | Image processing apparatus and image processing method | |
JP2018180714A (en) | Moving body detection system, moving body detection device, moving body detection method and program | |
JP2007028251A (en) | Image processing apparatus, image processing method, program, and recording medium | |
JP2006279413A (en) | Motion vector detector, image display, image photographing apparatus, motion vector detecting method, program, and recording medium | |
JP2012019465A (en) | Image processing device and image processing method | |
CN114268797B (en) | Method, device, storage medium and electronic equipment for time domain filtering of video | |
JP5834671B2 (en) | Image processing apparatus, image processing method, and program | |
JP2007272735A (en) | Image processor and image processing method, program, and recording medium | |
JP2012222736A (en) | Image processing device, image processing method, and program | |
JP2001086387A (en) | Motion-detecting device and method and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070802 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100527 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100601 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100712 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100928 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20101011 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131105 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131105 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |