JP4725105B2 - Image processing apparatus and method, program, and recording medium - Google Patents
Image processing apparatus and method, program, and recording medium Download PDFInfo
- Publication number
- JP4725105B2 JP4725105B2 JP2005000621A JP2005000621A JP4725105B2 JP 4725105 B2 JP4725105 B2 JP 4725105B2 JP 2005000621 A JP2005000621 A JP 2005000621A JP 2005000621 A JP2005000621 A JP 2005000621A JP 4725105 B2 JP4725105 B2 JP 4725105B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- unit
- tracking
- correction
- feature
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 287
- 238000012545 processing Methods 0.000 title claims description 232
- 230000008569 process Effects 0.000 claims description 271
- 230000033001 locomotion Effects 0.000 claims description 266
- 238000012937 correction Methods 0.000 claims description 139
- 238000001514 detection method Methods 0.000 claims description 96
- 238000000605 extraction Methods 0.000 claims description 35
- 239000006185 dispersion Substances 0.000 claims description 25
- 239000011159 matrix material Substances 0.000 claims description 9
- 238000003672 processing method Methods 0.000 claims description 4
- 239000013598 vector Substances 0.000 description 112
- 238000012546 transfer Methods 0.000 description 74
- 230000008859 change Effects 0.000 description 50
- 230000000694 effects Effects 0.000 description 48
- 238000003384 imaging method Methods 0.000 description 37
- 230000014509 gene expression Effects 0.000 description 34
- 238000012544 monitoring process Methods 0.000 description 28
- 238000011156 evaluation Methods 0.000 description 25
- 230000006870 function Effects 0.000 description 24
- 238000003702 image correction Methods 0.000 description 24
- 238000010586 diagram Methods 0.000 description 22
- 239000000203 mixture Substances 0.000 description 17
- 230000010354 integration Effects 0.000 description 15
- 238000010606 normalization Methods 0.000 description 13
- 239000000284 extract Substances 0.000 description 8
- 230000005484 gravity Effects 0.000 description 8
- 230000007704 transition Effects 0.000 description 6
- 230000005236 sound signal Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 239000004065 semiconductor Substances 0.000 description 4
- 230000007423 decrease Effects 0.000 description 2
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 210000003128 head Anatomy 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 208000024891 symptom Diseases 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Closed-Circuit Television Systems (AREA)
- Image Analysis (AREA)
Description
本発明は、画像処理装置および方法、プログラム並びに記録媒体に関し、特に、画像の中で移動するオブジェクトを発見しやすく表示できるようにし、時々刻々と変化する動画像の中の所望の点を確実に追尾することができるようにした画像処理装置および方法、プログラム並びに記録媒体に関する。 The present invention relates to an image processing apparatus and method, a program, and a recording medium, and in particular, makes it possible to easily display an object that moves in an image and to ensure a desired point in a moving image that changes from moment to moment. The present invention relates to an image processing apparatus and method, a program, and a recording medium that can be tracked.
ホームセキュリティシステムでは、撮像装置から送信される監視画像がモニタ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).
また、特許文献3には、追尾対象に関する領域の推定を行い、領域の動きの推定結果に基づいて、領域を追尾することが提案されている。
しかしながら、従来の技術では、例えば、不正な侵入者など、画像の中で動く物体(オブジェクト)を検知して、追尾しても、ユーザに対して表示される画像の中で、どの部分が、注目すべきオブジェクトであるのかを明確に表示することができず、その結果、ユーザが注目すべきオブジェクトを発見するのに時間がかかるおそれがあるという課題があった。 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.
また、特許文献2に記載の技術においては、1つの動きベクトルを用いて追尾を行うようにしているため、比較的ロバスト性に欠ける課題があった。また、追尾対象を含む画像が回転するなどして、追尾対象がユーザから見て見えなくなるような状態になった場合、その後、追尾点が再び見える状態になったとしても、その追尾点をもはや追尾することができなくなる課題があった。
Moreover, in the technique described in
特許文献3の技術においては、領域が利用される。その結果、ロバスト性が向上する。しかしながら、ロバスト性を向上させるために領域を広くしすぎると、例えば、ホームビデオで撮影した画像の中の子供の顔を追尾してズーム表示したいというような場合に、面積の広い子供の胴体を追尾してズーム表示してしまうという症状が生じる課題があった。
In the technique of
また、いずれの技術においても、追尾対象が他の物体により一時的に隠れてしまうオクルージョンが発生したり、あるいはシーンチェンジなどにより追尾対象が一時的に表示されなくなるような場合、ロバストな追尾を行うことが困難である課題があった。 In any technique, robust tracking is performed when the tracking target is temporarily occluded by another object or when the tracking target is temporarily not displayed due to a scene change or the like. There was a problem that was difficult to do.
本発明はこのような状況に鑑みてなされたものであり、画像の中で移動するオブジェクトを発見しやすく表示できるようにするものである。また、物体が回転したり、オクルージョンが発生したり、シーンチェンジが発生したような場合においても、追尾点を確実に追尾することができるようにするものである。 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 tracking point can be reliably tracked even when an object rotates, occlusion occurs, or a scene change occurs.
本発明の画像処理装置は、移動するオブジェクトを明確に表示する画像処理装置であって、画像の中の移動するオブジェクトの特徴点を検出する特徴点検出手段と、特徴点検出手段により検出された特徴点に基づいて、画像の中のオブジェクトの移動を追尾する追尾手段と、追尾手段による追尾結果に基づいて、画像の中のオブジェクトの周囲に予め設定された大きさの補正領域を設定する補正領域設定手段と、画像の中の補正領域内の画像を補正する補正手段と、補正領域内が補正手段により補正された画像の表示を制御する表示制御手段とを備える。また、前記補正手段は、前記補正領域内の画像を特定する制御信号と、画像のぼけの度合い表すパラメータを供給する供給手段と、前記制御信号に基づいて特定された前記補正領域内の画像の特徴を検出し、検出された特徴を表す特徴コードを出力する特徴検出手段と、前記画像のぼけの度合いを表すパラメータと、前記特徴検出手段により出力された特徴コードに対応する係数を記憶する記憶手段と、前記記憶手段から、前記パラメータと前記特徴検出手段により出力された前記特徴コードに対応する係数を読み出す読み出し手段と、前記読み出し手段により読み出された係数に基づいて、入力画像の画素の値に対して積和演算を行う積和演算手段と、前記積和演算手段による演算結果と前記入力画像の画素の値を選択して出力する選択出力手段とを備え、前記補正領域内の画像のぼけを除去するように補正する。 An image processing apparatus according to the present invention is an image processing apparatus that clearly displays a moving object, and is detected by a feature point detecting unit that detects a feature point of the moving object in the image, and the feature point detecting unit. A tracking unit that tracks the movement of an object in the image based on the feature points, and a correction that sets a correction area of a preset size around the object in the image based on the tracking result by the tracking unit An area setting unit, a correction unit that corrects an image in a correction area in the image, and a display control unit that controls display of an image in which the correction area is corrected by the correction unit . The correction means includes a control signal for specifying an image in the correction area, a supply means for supplying a parameter indicating a degree of blur of the image, and an image in the correction area specified based on the control signal. A feature detection unit that detects a feature and outputs a feature code representing the detected feature; a memory that stores a parameter that represents the degree of blur of the image; and a coefficient that corresponds to the feature code output by the feature detection unit Means for reading out the parameter and the coefficient corresponding to the feature code output by the feature detection means from the storage means, and the pixel of the input image based on the coefficient read by the readout means A product-sum operation means for performing a product-sum operation on the value, and a selection output for selecting and outputting the operation result by the product-sum operation means and the pixel value of the input image. And means to correct so as to eliminate image blurring in the correction area.
前記特徴検出手段は、入力画像の中から、積和演算を行う画素の周囲の、予め設定された第1の領域に含まれる複数の画素を抽出する第1の抽出手段と、第1の領域と、垂直または水平の複数の方向に連続した、複数の第2の領域に含まれる複数の画素を抽出する第2の抽出手段と、第1の抽出手段により抽出された画素と、第2の抽出手段により抽出された画素において、対応する画素の値の差分の絶対値の総和を求めて、複数のブロック差分を演算するブロック差分演算手段と、ブロック差分が、予め設定された閾値より大きいか否かを判定する差分判定手段とを備えるようにすることができる。 The feature detection means includes: a first extraction means for extracting a plurality of pixels included in a preset first area around a pixel on which a product-sum operation is performed; A second extraction means for extracting a plurality of pixels included in a plurality of second regions, which are continuous in a plurality of vertical or horizontal directions, a pixel extracted by the first extraction means, a second In the pixel extracted by the extraction unit, a block difference calculation unit for calculating a plurality of block differences by calculating a sum of absolute values of corresponding pixel values, and whether the block difference is larger than a preset threshold value. Difference determining means for determining whether or not there may be provided.
前記パラメータは、ぼけた画像の画素とぼけていない画像の画素の関係を表すモデル式におけるガウス関数のパラメータであるようにすることができる。 The parameter may be a parameter of a Gaussian function in a model expression representing a relationship between pixels of a blurred image and pixels of a non-blurred image.
前記記憶手段により記憶される係数は、モデル式の逆行列を演算することにより求められた係数であるようにすることができる。 The coefficient stored by the storage means can be a coefficient obtained by calculating an inverse matrix of a model formula.
前記選択出力手段は、積和演算手段により積和演算が行われた複数の画素を抽出する第1の抽出手段と、第1の抽出手段により抽出された複数の画素の分散の度合いを表す分散度を演算する分散演算手段と、分散演算手段により演算された分散度が予め設定された閾値より大きいか否かを判定する分散判定手段とを備えるようにすることができる。 The selection output unit includes a first extraction unit that extracts a plurality of pixels that have been subjected to the product-sum operation by the product-sum operation unit, and a variance that represents a degree of dispersion of the plurality of pixels extracted by the first extraction unit. Dispersion calculating means for calculating the degree and dispersion determining means for determining whether or not the degree of dispersion calculated by the dispersion calculating means is greater than a preset threshold value can be provided.
前記選択出力手段は、分散判定手段の判定結果に基づいて、出力する画素の値を、積和演算手段による演算結果、または入力画像の画素の値のいずれかから選択する画素選択手段をさらに備えるようにすることができる。 The selection output unit further includes a pixel selection unit that selects, based on the determination result of the dispersion determination unit, a pixel value to be output from either a calculation result of the product-sum calculation unit or a pixel value of the input image. Can be.
本発明の画像処理方法は、画像の中で、移動するオブジェクトを明確に表示する画像処理装置の画像処理方法であって、画像の中の移動するオブジェクトの特徴点を検出する特徴点検出ステップと、特徴点検出ステップの処理により検出された特徴点に基づいて、画像のオブジェクトの移動を追尾する追尾ステップと、追尾ステップの処理による追尾結果に基づいて、画像の中にオブジェクトの周囲に予め設定された大きさの補正領域を設定する補正領域設定ステップと、画像の中の補正領域内の画像を補正する補正ステップと、補正領域内が補正ステップの処理により補正された画像の表示を制御する表示制御ステップとを含む。また前記補正ステップは、前記補正領域内の画像を特定する制御信号と、画像のぼけの度合い表すパラメータを供給する供給ステップと、前記制御信号に基づいて特定された前記補正領域内の画像の特徴を検出し、検出された特徴を表す特徴コードを出力する特徴検出ステップと、前記画像のぼけの度合いを表すパラメータと、前記特徴検出ステップの処理により出力された特徴コードに対応する係数の記憶を制御する記憶制御ステップと、前記記憶制御ステップの処理により記憶が制御された、前記パラメータと前記特徴検出ステップの処理により出力された前記特徴コードに対応する係数を読み出す読み出しステップと、前記読み出しステップの処理により読み出された係数に基づいて、入力画像の画素の値に対して積和演算を行う積和演算ステップと、前記積和演算ステップの処理による演算結果と前記入力画像の画素の値を選択して出力する選択出力ステップとを含み、前記補正領域内の画像のぼけを除去するように補正する。 An image processing method of the present invention is an image processing method of an image processing apparatus that clearly displays a moving object in an image, and a feature point detecting step for detecting a feature point of the moving object in the image; Based on the feature points detected by the feature point detection step, a tracking step for tracking the movement of the object in the image, and the surroundings of the object in the image based on the tracking result of the tracking step processing A correction area setting step for setting a correction area of a specified size, a correction step for correcting an image in the correction area in the image, and a display of an image in which the correction area is corrected by the correction step process Display control step . The correction step includes a control signal for specifying an image in the correction area, a supply step for supplying a parameter indicating a degree of blur of the image, and a feature of the image in the correction area specified based on the control signal. And a feature detection step for outputting a feature code representing the detected feature, a parameter representing a degree of blur of the image, and a coefficient corresponding to the feature code output by the processing of the feature detection step. A storage control step for controlling, a reading step for reading out the coefficient corresponding to the feature code output by the processing of the parameter and the feature detection step, the storage of which is controlled by the processing of the storage control step, and the reading step A product-sum operation that performs a product-sum operation on the pixel values of the input image based on the coefficients read by the processing A calculation step, and a selection output step of selecting and outputting a calculation result obtained by the processing of the product-sum calculation step and a pixel value of the input image, and correcting so as to remove the blur of the image in the correction region .
本発明のプログラムは、画像の中で、移動するオブジェクトを明確に表示する画像処理装置のプログラムであって、画像の中の移動するオブジェクトの特徴点の検出を制御する特徴点検出制御ステップと、特徴点検出制御ステップの処理により検出された特徴点に基づいて、画像のオブジェクトの移動を追尾するように制御する追尾制御ステップと、追尾制御ステップの処理による追尾結果に基づいて、画像の中にオブジェクトの周囲に予め設定された大きさの補正領域を設定するように制御する補正領域設定制御ステップと、画像の中の補正領域内の画像の補正を制御する補正制御ステップと、補正領域内が補正制御ステップの処理により補正された画像の表示を制御する表示制御ステップとをコンピュータに実行させる。また、前記補正制御ステップは、前記補正領域内の画像を特定する制御信号と、画像のぼけの度合い表すパラメータを供給する供給制御ステップと、前記制御信号に基づいて特定された前記補正領域内の画像の特徴を検出し、検出された特徴を表す特徴コードを出力する特徴検出制御ステップと、前記画像のぼけの度合いを表すパラメータと、前記特徴検出制御ステップの処理により出力が制御された特徴コードに対応する係数の記憶を制御する記憶制御ステップと、前記記憶制御ステップの処理により記憶が制御された、前記パラメータと前記特徴検出制御ステップの処理により出力が制御された前記特徴コードに対応する係数を読み出す読み出し制御ステップと、前記読み出し制御ステップの処理により読み出しが制御された係数に基づいて、入力画像の画素の値に対して積和演算を行う積和演算制御ステップと、前記積和演算制御ステップの処理による演算結果と前記入力画像の画素の値を選択して出力する選択出力制御ステップとを含み、前記補正領域内の画像のぼけを除去するように補正する。 The program of the present invention is a program for an image processing apparatus that clearly displays a moving object in an image, and a feature point detection control step for controlling detection of a feature point of the moving object in the image; Based on the feature points detected by the process of the feature point detection control step, a tracking control step for controlling the movement of the object of the image is tracked, and the tracking result by the process of the tracking control step is included in the image. A correction area setting control step for controlling to set a correction area having a predetermined size around the object, a correction control step for controlling correction of an image in the correction area in the image, and a correction area. Causing the computer to execute a display control step for controlling the display of the image corrected by the processing of the correction control step . The correction control step includes a control signal for specifying an image in the correction area, a supply control step for supplying a parameter indicating a degree of blur of the image, and a correction signal in the correction area specified based on the control signal. A feature detection control step for detecting a feature of an image and outputting a feature code representing the detected feature, a parameter representing a degree of blur of the image, and a feature code whose output is controlled by the processing of the feature detection control step And a coefficient corresponding to the feature code whose output is controlled by the process of the parameter and the feature detection control step. Based on the read control step for reading out and the coefficient for which the read is controlled by the processing of the read control step. A product-sum operation control step for performing a product-sum operation on the pixel value of the input image, and a selection output for selecting and outputting the operation result by the processing of the product-sum operation control step and the pixel value of the input image And a control step for correcting so as to remove the blur of the image in the correction area.
本発明の記録媒体は、画像の中で、移動するオブジェクトを明確に表示する画像処理装置のプログラムが記録される記録媒体であって、画像の中の移動するオブジェクトの特徴点の検出を制御する特徴点検出制御ステップと、特徴点検出制御ステップの処理により検出された特徴点に基づいて、画像のオブジェクトの移動を追尾するように制御する追尾制御ステップと、追尾制御ステップの処理による追尾結果に基づいて、画像の中にオブジェクトの周囲に予め設定された大きさの補正領域を設定するように制御する補正領域設定制御ステップと、画像の中の補正領域内の画像の補正を制御する補正制御ステップと、補正領域内が前記補正制御ステップの処理により補正された画像の表示を制御する表示制御ステップとをコンピュータに実行させるプログラムが記録されている。また、前記補正制御ステップは、前記補正領域内の画像を特定する制御信号と、画像のぼけの度合い表すパラメータを供給する供給制御ステップと、前記制御信号に基づいて特定された前記補正領域内の画像の特徴を検出し、検出された特徴を表す特徴コードを出力する特徴検出制御ステップと、前記画像のぼけの度合いを表すパラメータと、前記特徴検出制御ステップの処理により出力が制御された特徴コードに対応する係数の記憶を制御する記憶制御ステップと、前記記憶制御ステップの処理により記憶が制御された、前記パラメータと前記特徴検出制御ステップの処理により出力が制御された前記特徴コードに対応する係数を読み出す読み出し制御ステップと、前記読み出し制御ステップの処理により読み出しが制御された係数に基づいて、入力画像の画素の値に対して積和演算を行う積和演算制御ステップと、前記積和演算制御ステップの処理による演算結果と前記入力画像の画素の値を選択して出力する選択出力制御ステップとを含み、前記補正領域内の画像のぼけを除去するように補正する。 The recording medium of the present invention is a recording medium on which a program of an image processing apparatus that clearly displays a moving object in an image is recorded, and controls the detection of feature points of the moving object in the image. Based on the feature point detection control step, the tracking control step for controlling the movement of the object of the image based on the feature point detected by the processing of the feature point detection control step, and the tracking result by the processing of the tracking control step And a correction area setting control step for controlling to set a correction area having a predetermined size around the object in the image, and a correction control for controlling correction of the image in the correction area in the image. And a display control step for controlling display of an image in which the correction area is corrected by the processing of the correction control step. Program that has been recorded. The correction control step includes a control signal for specifying an image in the correction area, a supply control step for supplying a parameter indicating a degree of blur of the image, and a correction signal in the correction area specified based on the control signal. A feature detection control step for detecting a feature of an image and outputting a feature code representing the detected feature, a parameter representing a degree of blur of the image, and a feature code whose output is controlled by the processing of the feature detection control step And a coefficient corresponding to the feature code whose output is controlled by the process of the parameter and the feature detection control step. Based on the read control step for reading out and the coefficient for which the read is controlled by the processing of the read control step. A product-sum operation control step for performing a product-sum operation on the pixel value of the input image, and a selection output for selecting and outputting the operation result by the processing of the product-sum operation control step and the pixel value of the input image And a control step for correcting so as to remove the blur of the image in the correction area.
本発明においては、画像の中の移動するオブジェクトの特徴点が検出され、検出された特徴点に基づいて、画像のオブジェクトの移動が追尾され、その追尾結果に基づいて、画像の中にオブジェクトの周囲に予め設定された大きさの補正領域が設定され、画像の中の補正領域内の画像が補正され、補正領域内が補正された画像の表示が制御される。また補正は、補正領域内の画像を特定する制御信号と、画像のぼけの度合い表すパラメータが供給され、制御信号に基づいて特定された補正領域内の画像の特徴が検出され、検出された特徴が表す特徴コードが出力され、画像のぼけの度合いを表すパラメータと、特徴コードに対応する係数が記憶され、パラメータと特徴コードに対応する係数が読み出され、読み出された係数に基づいて、入力画像の画素の値に対して積和演算が行われ、演算結果と入力画像の画素の値が選択されて出力され、補正領域内の画像のぼけが除去されるように補正される。 In the present invention, the feature point of the moving object in the image is detected, the movement of the object of the image is tracked based on the detected feature point, and based on the tracking result, the feature point of the object is detected. A correction area having a preset size is set in the periphery, the image in the correction area in the image is corrected, and display of the image in which the correction area is corrected is controlled. For correction, a control signal for specifying an image in the correction area and a parameter indicating the degree of blur of the image are supplied, and the feature of the image in the correction area specified based on the control signal is detected, and the detected feature is detected. Is output, a parameter representing the degree of blur of the image and a coefficient corresponding to the feature code are stored, a parameter and a coefficient corresponding to the feature code are read, and based on the read coefficient, A product-sum operation is performed on the pixel value of the input image, and the calculation result and the pixel value of the input image are selected and output, and the image is corrected so as to eliminate blur in the correction region.
本発明によれば、注目すべきオブジェクトを発見しやすくすることができる。特に、画像の中で移動するオブジェクトを発見しやすく表示することができる。 According to the present invention, it is possible to easily find a noticeable object. In particular, it is possible to easily display an object that moves in an image.
本発明によれば、画像上の追尾点を追尾することが可能となる。特に、追尾におけるロバスト性を向上させることができる。その結果、対象物が回転して追尾点が一時的に見えなくなったり、オクルージョンやシーンチェンジが発生した場合などにおいても、追尾点を確実に追尾することが可能となる。 According to the present invention, it is possible to track a tracking point on an image. In particular, robustness in tracking can be improved. As a result, the tracking point can be reliably tracked even when the object rotates and the tracking point becomes temporarily invisible or an occlusion or a scene change occurs.
以下、図面を参照して、本発明の実施の形態について説明する。図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により設定された補正対象エリア内の画像を補正する画像補正処理を実行する。画像補正処理の詳細については、図65を参照して後述するが、この処理により、補正対象エリア内の画像について、画像のぼけが除去された鮮明な映像が提供される。
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において、例外処理が実行される。この例外処理の詳細は、図37のフローチャートを参照して後述するが、この例外処理により、追尾点が画像から見えなくなったとき、テンプレートマッチングにより通常処理への復帰処理が実行される。例外処理によって追尾処理を継続することができなくなった(通常処理へ復帰することができなくなった)と判定された場合には処理が終了されるが、テンプレートによる復帰処理の結果、通常処理への復帰が可能と判定された場合には、処理は再びステップ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). In the 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, 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は、後述する図37を参照して後述する処理により、テンプレートにマッチした位置に基づき追尾点と領域推定範囲を設定する。例えば、テンプレート上の追尾点とマッチした現フレーム上の点が追尾点とされ、その点から予め設定されている一定の範囲が領域推定範囲とされる。その後、処理は図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により乗り換え候補抽出処理が実行される。その処理の詳細は、図27のフローチャート参照して後述するが、領域推定部161により領域推定範囲として推定された範囲の点から乗り換え候補の点が抽出され、乗り換え候補保持部56に保持される。
In step S162, the transfer
ステップS163においてテンプレート作成部163によりテンプレート作成処理が実行される。その詳細は、図28のフローチャートを参照して後述するが、この処理によりテンプレートが作成される。
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は、領域推定範囲が矩形である例を示したが、図25A乃至図25Cと図26A乃至図26Cに示されるように、領域推定範囲は円形とすることも可能である。図25A乃至図25Cは、図21A乃至図21Cに対応する図であり、ステップS208(図20)のシフト処理が必要である場合を表し、図26A乃至図26Cは図22A乃至図22Cに対応する図であり、ステップS108のシフト処理が必要でない場合を表している。 21A to 21C and FIGS. 22A to 22C show an example in which the region estimation range is rectangular, but the region estimation range is circular as shown in FIGS. 25A to 25C and FIGS. 26A to 26C. It is also possible. FIGS. 25A to 25C are diagrams corresponding to FIGS. 21A to 21C, showing a case where the shift process of step S208 (FIG. 20) is necessary, and FIGS. 26A to 26C correspond to FIGS. 22A to 22C. It is a figure and represents the case where the shift process of step S108 is not required.
以上のようにして、図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における領域推定範囲の更新処理の例について、図25を参照して説明する。 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個の小領域を決定する)。図26Aと図26Bの例においては、領域推定範囲261のうち、図中黒い四角形で示される領域の点に対応する小領域271,272が決定される。図中小領域271は、4つの点に対応する小領域が重なりあった例を示している。小領域の大きさは、例えば、サンプル点の間隔に比例するように決定してもよい。
In step S231, the
次に、ステップS234において、領域推定部161は、ステップS233の処理で決定した各小領域の和の領域を暫定領域推定範囲とする。図26Cの例においては、小領域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で決定された暫定領域推定範囲の全画面動きによるシフトで、次の領域推定範囲を決定する。図26Dの例においては、暫定領域推定範囲281が全画面動きによる動きベクトル283に基づいてシフトされ、暫定領域推定範囲282とされている。
After the process of step S234 or step S232, in step S235, the
ステップS236において、領域推定部161は、追尾点がステップS235の処理で決定された次の領域推定範囲に含まれるか否かを判定し、含まれない場合には、ステップS237に進み、追尾点を含むように次の領域推定範囲をシフトする。図26Cと図26Dの例においては、領域推定範囲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における乗り換え候補抽出処理について、図27のフローチャートを参照して説明する。 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.
ただし、領域推定結果をそのまま用いることも可能である。この場合の処理については、図42を参照して説明する。 However, the region estimation result can be used as it is. The processing in this case will be described with reference to FIG.
図28は、図14のステップS163におけるテンプレート作成処理の詳細を表している。ステップS281においてテンプレート作成部163は、領域(全画面動きの領域)と推定されたすべての点につき、それぞれに対応する小領域を決定する。図29の例においては、領域の点321に対応して小領域322が決定されている。
FIG. 28 shows details of the template creation processing in step S163 of FIG. In step S <b> 281, the
ステップS282において、テンプレート作成部163は、ステップS281の処理で決定された小領域の和の領域をテンプレート範囲に設定する。図29の例においては、小領域322の和の領域がテンプレート範囲331とされている。
In step S282, the
次にステップS283において、テンプレート作成部163は、ステップS282において設定したテンプレート範囲の情報と画像情報からテンプレートを作成し、テンプレート保持部58に供給し、保持させる。具体的には、テンプレート範囲331内の画素データがテンプレートとされる。
In step S283, the
図30は、領域の点321に対応する小領域341が、図29における小領域322に較べてより大きな面積とされている。その結果、小領域341の和の領域のテンプレート範囲351も、図29のテンプレート範囲331に較べてより広くなっている。
In FIG. 30, 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.
図31は、テンプレートと領域推定範囲の位置関係を表している。テンプレート範囲403には、追尾点405が含まれている。テンプレート範囲403に外接する外接矩形401の図中左上の点がテンプレート基準点404とされている。テンプレート基準点404から追尾点405に向かうベクトル406、並びにテンプレート基準点404から領域推定範囲402の図中左上の基準点408に向かうベクトル407が、テンプレート範囲403の情報とされる。テンプレートは、テンプレート範囲403に含まれる画素で構成される。ベクトル406,407は、テンプレートと同じ画像が検出された際の通常処理への復帰に用いられる。
FIG. 31 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を、例えば図32に示されるように構成することで処理することも可能である。
The region estimation related process 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のテンプレート作成処理は、図28に示した場合と同様であるので、ステップ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. 28, and therefore only the region estimation process in step S161 and the transfer candidate extraction process in step S162 will be described below.
最初に、図33のフローチャートを参照して、ステップS161における領域推定処理の詳細について説明する。ステップS301において、図32の領域推定部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
具体的には、例えば図34Aに示されるように、追尾点421に隣接する8個の方向の画素の画素値が読み取られる。すなわち、上方向、右上方向、右方向、右下方向、下方向、左下方向、左方向、および左上方向の8つの方向に隣接する画素の画素値が読み取られる。読み取られた画素値と追尾点421の画素値との差分が演算される。そして、演算された差分値が閾値THimg以上であるか否かが判定される。図34Aの場合、矢印を付して示される方向の画素値、すなわち上方向、右上方向、下方向、左方向、および左上方向の画素値と追尾点321の差分が閾値THimg未満であり、図中矢印を付さずに示されている方向、すなわち右方向、右下方向、および左下方向の画素値と追尾点421の差分が閾値THimg以上であったとされる。
Specifically, for example, as shown in FIG. 34A, pixel values of pixels in eight directions adjacent to the
この場合、図34Bに示されるように、差分が閾値THimg未満である画素(図34Aにおいて、追尾点421に対して矢印で示される方向の画素)が追尾点421と同色領域の画素422として登録される。同様の処理が同色領域に登録された各画素422において行われる。図34Bに示される例では、図中左上の白い円で示される画素422とそれに隣接する画素(既に同色領域であるとの判定が行われた画素を除く)の画素値の差分が演算され、その差分が閾値THimg以上であるか否かが判定される。図34Bの例においては、右方向、右下方向、および下方向の画素は、既に同色領域の判定処理が終了している方向なので、上方向、右上方向、左下方向、左方向、および左上方向においての差分が演算される。そして、この例では、上方向、右上方向、および左上方向の3つの方向の差分が閾値THimg未満とされ、図34Cに示されるように、その方向の画素が追尾点421と同色領域の画素として登録される。
In this case, as shown in FIG. 34B, a pixel whose difference is less than the threshold THimg (a pixel in a direction indicated by an arrow with respect to the
以上のような処理が順次繰り返されることで、図35に示されるように、サンプル点のうち、同色領域431に含まれる点が追尾点421と同一対象物上の点として推定される。
By sequentially repeating the above processing, as shown in FIG. 35, the points included in the
図33に示される領域推定処理(図14のステップS161)に続いて、図32の乗り換え候補抽出部162において実行される図14のステップS162の乗り換え候補抽出処理は、図36のフローチャートに示されるようになる。
Following the region estimation process shown in FIG. 33 (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
図32の領域推定関連処理部55において、図33の領域推定処理(図14のステップS161)、図36の乗り換え候補抽出処理(図14のステップS162)に引き続き、図32のテンプレート作成部163で実行される図14のステップS163のテンプレート作成処理は、図28に示される場合と同様であるので、その説明は省略する。
32, following the region estimation process in FIG. 33 (step S161 in FIG. 14) and the transfer candidate extraction process in FIG. 36 (step S162 in FIG. 14), the
ただし、この場合においては、追尾点の同色領域をそのままテンプレートの範囲とすることも可能である。 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の例外処理の詳細について、図37のフローチャートを参照して説明する。この処理は、上述したように、図10のステップS124において追尾点の動きを推定することが不可能と判定され、さらにステップS128において追尾点を乗り換える乗り換え候補が選択できなかったと判定された場合に実行されることになる。 Details of the exception processing in step S52 performed following the normal processing 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は、例外処理の初期化処理を実行する。この処理の詳細は図38のフローチャートに示されている。
In step S401, the
ステップS321において、制御部59は、追尾点の追尾ができなくなった際(追尾点の動きを推定することが不可能かつ、追尾点を乗り換える乗り換え候補が選択できなかった際)にシーンチェンジが起きていたか否かを判定する。シーンチェンジ検出部53は、動き推定部52の推定結果に基づいてシーンチェンがあったか否かを常に監視しており、制御部59は、そのシーンチェンジ検出部53の検出結果に基づいて、ステップS421の判定を実行する。シーンチェンジ検出部53の具体的処理については、図54と図55を参照して後述する。
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は、時間的に最も古いテンプレートを選択する処理を実行する。具体的には、図39に示されるように、例えばフレームnからフレームn+1に移行するとき、例外処理が実行されるものとすると、フレームn−m+1からフレームnに関して生成され、テンプレート保持部58に保持されているm個のフレームのテンプレートの中から、時間的に最も古いテンプレートであるフレームn−m+1に関して生成されたテンプレートが選択される。
After the process of step S422 or step S423, the
このように例外処理への移行直前のテンプレート(図39の例の場合フレームnに関して生成されたテンプレート)を用いずに、時間的に少し前のテンプレートを選択するのは、追尾対象のオクルージョンなどで例外処理への移行が発生した場合には、移行の直前には追尾対象が既にかなり隠れており、その時点のテンプレートでは、追尾対象を充分に大きく捉えることができない可能性が高いからである。従って、このように時間的に若干前のフレームにおけるテンプレートを選択することで、確実な追尾が可能となる。 In this way, the template just before the transition to exception processing (the template generated for frame n in the case of the example in FIG. 39) is used in order to select a template a little earlier in time, such as occlusion to be tracked. 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
すなわち、図40に示されるように、フレームnにおいて被写体の顔104の右目102が追尾点101として指定されている場合において、図中左方向からボール121が飛んできて、フレームn+1において追尾点101を含む顔104が隠れ、フレームn+2において、再び追尾点101が現れる場合を想定する。この場合において、追尾点101(テンプレート範囲411に含まれる)を中心とする領域がテンプレート探索範囲412として設定される。
That is, as shown in FIG. 40, when the
ステップS426において、テンプレートマッチング部51は、例外処理への移行後の経過フレーム数およびシーンチェンジ数を0にリセットする。このフレーム数とシーンチェンジ数は、後述する図37のステップS405における継続判定処理(図41のステップS461,S463,S465,S467)において使用される。
In step S426, the
以上のようにして、例外処理の初期化処理が終了した後、図37のステップS402において、制御部59は次のフレームを待つ処理を実行する。ステップS403において、テンプレートマッチング部51は、テンプレート探索範囲内においてテンプレートマッチング処理を行う。ステップS404においてテンプレートマッチング部51は、通常処理への復帰が可能であるか否かを判定する。
After the exception process initialization process is completed as described above, in step S402 in FIG. 37, the
具体的には、テンプレートマッチング処理により、数フレーム前のテンプレート(図40のテンプレート範囲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において、差分絶対値和が最小となる位置をテンプレートのマッチした位置として、このマッチした位置とテンプレートに対応して保持してあったテンプレート位置と追尾点領域推定範囲の位置関係から、追尾点と領域推定範囲の設定が行われる。すなわち、図31を参照して説明したように、追尾点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. 31, the
ただし、図14のステップS161の領域推定処理において、領域推定範囲を用いない手法を用いる場合(例えば、図33に示される領域推定処理が用いられる場合)には、領域推定範囲の設定は行われない。 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. 33 is used), the region estimation range is set. Absent.
図37のステップS404における通常処理への復帰が可能であるか否かの判定は、最小の差分絶対値和をテンプレートのアクティビティで除算して得られる値を閾値と比較することで行うようにしてもよい。この場合におけるアクティビティは、後述する図47のアクティビティ算出部602により、図48のステップS603において算出された値を用いることができる。
The determination as to whether or not it is possible to return to normal processing in step S404 in FIG. 37 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. 48 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に進み、継続判定処理が実行される。継続判定処理の詳細は、図41のフローチャートを参照して後述するが、これにより、追尾処理が継続可能であるか否かの判定が行われる。 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. 41, whereby it is determined whether or not the tracking process can be continued.
ステップS406において、制御部59は、追尾点の追尾が継続可能であるか否かを継続判定処理の結果に基づいて(後述する図41のステップS466,S468で設定されたフラグに基づいて)判定する。追尾点の追尾処理が継続可能である場合には、処理はステップS302に戻り、それ以降の処理が繰り返し実行される。すなわち、追尾点が再び出現するまで待機する処理が繰り返し実行される。
In step S406, the
これに対して、ステップS406において、追尾点の追尾処理が継続可能ではないと判定された場合(後述する図41のステップ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. 41 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.
図41は、図37のステップS405における継続判定処理の詳細を表している。ステップS461において、制御部59は、変数としての経過フレーム数に1を加算する処理を実行する。経過フレーム数は、図37のステップS401の例外処理の初期化処理(図38のステップS426)において、予め0にリセットされている。
FIG. 41 shows the details of the continuation determination process in step S405 of FIG. In step S461, the
次にステップS462において、制御部59は、シーンチェンジがあるか否かを判定する。シーンチェンジがあるか否かは、シーンチェンジ検出部53が、常にその検出処理を実行しており、その検出結果に基づいて判定が可能である。シーンチェンジがある場合には、ステップS463に進み、制御部59は変数としてのシーンチェンジ数に1を加算する。このシーンチェンジ数も、図38のステップS426の初期化処理において0にリセットされている。通常処理から例外処理への移行時にシーンチェンジが発生していない場合には、ステップS463の処理はスキップされる。
Next, in step S462, the
次に、ステップS464において、制御部59は、現在設定されているモードがシーンチェンジであるか否かを判定する。このモードは、図38のステップS422,S423において設定されたものである。現在設定されているモードがシーンチェンジである場合には、ステップS467に進み、制御部59は、シーンチェンジ数が予め設定されている閾値THscより小さいか否かを判定する。シーンチェンジ数が閾値THscより小さい場合には、ステップS466に進み、制御部59は継続可のフラグを設定し、シーンチェンジ数が閾値THsc以上である場合には、ステップS468に進み、継続不可のフラグを設定する。
Next, in step S464, the
一方、ステップS464において、モードがシーンチェンジではないと判定された場合(モードがその他であると判定された場合)、ステップS465に進み、制御部59は、経過フレーム数が閾値THfrより小さいか否かを判定する。この経過フレーム数も、図38の例外処理の初期化処理のステップ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.
また、以上においては、乗り換え候補として、推定した領域内の点の移動先を用いるようにしたが、領域内の点をそのまま用いるようにすることも可能である。この場合、図6のステップS51の通常処理は、図10の処理に代えて、図42の処理に変更される。 In the above description, the estimated movement destination of the point in the area is used as the transfer candidate, but it is also possible to use the point in the area as it is. In this case, the normal process of step S51 of FIG. 6 is changed to the process of FIG. 42 instead of the process of FIG.
図42のステップS501乃至ステップS510の処理は、基本的に図10のステップS21乃至ステップS29の処理と同様の処理であるが、図10のステップS122に対応する図42のステップS502の次のフレームを待つ処理の次に、ステップS503の領域推定関連処理が挿入されている点と、図10におけるステップS126における領域推定関連処理に代えて、ステップS507の領域推定範囲の更新処理が実行される点が異なっている。その他の処理は、図10における場合と同様であるので、その説明は省略する。 The processes in steps S501 through S510 in FIG. 42 are basically the same as the processes in steps S21 through S29 in FIG. 10, but the next frame after step S502 in FIG. 42 corresponding to step S122 in FIG. Next to the process of waiting for the process, the area estimation related process in step S503 is inserted, and the area estimation range update process in step S507 is executed instead of the area estimation related process in step S126 in FIG. Is different. The other processes are the same as those in FIG.
図42のステップS503の領域推定関連処理の詳細は、図10を参照して説明した場合と同様となり、ステップS507の領域推定範囲の更新処理は、図16を参照して説明した場合と同様の処理となる。 The details of the area estimation related process in step S503 in FIG. 42 are the same as those described with reference to FIG. 10, and the area estimation range update process in step S507 is the same as in the case described with reference to FIG. It becomes processing.
通常処理を、図42のフローチャートに示されるように実行した場合における、ステップS503の領域推定関連処理(図10の領域推定関連処理)の領域推定処理(図10のステップS161における領域推定処理)は、図43のフローチャートに示されるようになる。 When the normal processing is executed as shown in the flowchart of FIG. 42, the region estimation processing (region estimation processing in step S161 of FIG. 10) of the region estimation related processing of step S503 (region estimation related processing of FIG. 10) is As shown in the flowchart of FIG.
そのステップS531乃至ステップS535の処理は、基本的に図15のステップS181乃至ステップS186の処理と同様の処理となる。ただし、図15のステップS186における領域推定範囲の更新処理が図43においては省略されている。その他の処理は、図15における場合と同様である。すなわち、領域推定範囲の更新処理は、図42のステップS507において実行されるため、図43の領域推定処理では不要とされるのである。 The processing from step S531 to step S535 is basically the same as the processing from step S181 to step S186 in FIG. However, the region estimation range update processing in step S186 in FIG. 15 is omitted in FIG. Other processes are the same as those in FIG. That is, the area estimation range update process is executed in step S507 of FIG. 42, and is thus unnecessary in the area estimation process of FIG.
さらに、図42の通常処理を行う場合におけるステップS503の領域推定関連処理(図16の領域推定関連処理)の乗り換え候補抽出処理(図14のステップS162における乗り換え候補抽出処理)は、図44に示されるようになる。このステップS551の処理は、図27におけるステップS261の乗り換え候補抽出処理と同様の処理となる。 Furthermore, the transfer candidate extraction process (transfer candidate extraction process in step S162 of FIG. 14) of the area estimation related process (area estimation related process of FIG. 16) in step S503 when the normal process of FIG. 42 is performed is shown in FIG. It comes to be. The process in step S551 is the same as the transfer candidate extraction process in step S261 in FIG.
以上のように、通常処理を図42のフローチャートに示されるように行った場合と、図10に示されるように行った場合とにおける処理の違いを説明すると、図45と図46に示されるようになる。 As described above, the difference in processing between the case where the normal processing is performed as shown in the flowchart of FIG. 42 and the case where the normal processing is performed as shown in FIG. 10 will be described as shown in FIGS. 45 and 46. become.
図10のフローチャートに示される通常処理を行った場合には、図45に示されるように、フレームnにおいて、領域推定範囲221内の図中黒い四角形で示される点451により領域222が構成されているとすると、次のフレームn+1において、前のフレームnにおける領域222の各点451をそれぞれの動きベクトル453に基づいてシフトした位置におけるフレームn+1上の点452が乗り換え候補とされる(図23のステップS161の処理)。
When the normal processing shown in the flowchart of FIG. 10 is performed, as shown in FIG. 45, in the frame n, the
各点451の動きベクトル453は、全画面動きの動きベクトルと同じになることもあるが、全画面動きと同じ動きとみなす精度によっては各点の推定動きに多少のばらつきがでる。例えば、水平方向、垂直方向とも、±1画素の違いは同じとみなすとすると、(0,0)の動きには、(−1,1)や(1,0)の動きも含まれる。この場合、全画面動きが(0,0)であったとしても、各点451が、(−1,1)、(1,0)等の動きを持っているときは、それぞれの動きの分だけシフトされる。移動先の点をそのまま乗り換え候補として用いるのではなく、予め求められたサンプル点のうち、最も近い点を乗り換え候補とすることも可能である。勿論、処理負荷軽減のため、各点451を、全画面動きの分だけシフトしてもよい。
The
これに対して、通常処理を図42のフローチャートに示されるように実行した場合においては、図46に示されるように、フレームnにおける領域推定範囲221内の点461が乗り換え候補とされる。
On the other hand, when the normal process is executed as shown in the flowchart of FIG. 42, as shown in FIG. 46, a
次に、図47を参照して、図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
次に、図48のフローチャートを参照して、動き推定部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は、入力画像からアクティビティを算出する。アクティビティは、画像の複雑さを表す特徴量であり、図49に示されるように、各画素毎に注目画素Y(x,y)と、それに隣接する8画素Y(x+i,y+j)との差分絶対値和の平均値が、注目画素位置のアクティビティActivity(x,y)として次式に基づいて演算される。
In step S603, the
図49の例の場合、3×3画素のうち、中央に位置する注目画素Y(x,y)の値は110であり、それに隣接する8個の画素の値は、それぞれ80,70,75,100,100,100,80,80であるから、アクティビティActivity(x,y)は次式で表される。 In the case of the example of FIG. 49, the value of the pixel of interest Y (x, y) located at the center among the 3 × 3 pixels is 110, and the values of the eight pixels adjacent thereto 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
具体的には、実験の結果、ブロックアクティビティと評価値は、動きベクトルをパラメータとして、図50に示される関係を有する。図50において、横軸はブロックアクティビティ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. 50 using the motion vector as a parameter. In FIG. 50, 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のうち、評価値をブロックアクティビティで割り算して得られた値は、その値によって規定される図50のグラフ上の位置が、原点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は、統合処理を実行する。この統合処理の詳細は、図51のフローチャートに示されている。
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より小さい場合には、正しい動きベクトルが得られていない可能性があるからである。すなわち、図50に示されるように、原点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).
図52は,図5の背景動き推定部54の構成例を表している。この構成例においては、背景動き推定部54は、頻度分布算出部651と背景動き決定部652により構成されている。
FIG. 52 illustrates a configuration example of the background
頻度分布算出部651は、動きベクトルの頻度分布を算出する。ただし、この頻度には、動き推定部12より供給される動きベクトル確度VCを用いることで、確からしい動きに重みが与えられるように、重み付けが行われる。背景動き決定部652は、頻度分布算出部651により算出された頻度分布に基づいて、頻度が最大となる動きを背景動きとして決定する処理を行い、領域推定関連処理部55へ出力する。
The frequency
図53を参照して、背景動き推定部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や図25のステップ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
図54は、図5のシーンチェンジ検出部53の詳細な構成例を表している。この例においては、動きベクトル確度平均算出部671と閾値判定部672によりシーンチェンジ検出部53が構成されている。
FIG. 54 shows a detailed configuration example of the scene
動きベクトル確度平均算出部671は、動き推定部52より供給された動きベクトル確度VCの全画面の平均値を算出し、閾値判定部672に出力する。閾値判定部672は、動きベクトル確度平均算出部671より供給された平均値を、予め定められている閾値と比較し、その比較結果に基づいて、シーンチェンジであるか否かを判定し、判定結果を制御部59に出力する。
The motion vector accuracy
次に、図55のフローチャートを参照して、シーンチェンジ検出部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へ供給され、図38のステップS421におけるシーンチェンジの有無の判定、並びに図41のステップS462のシーンチェンジの有無の判定に利用される。
This 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の詳細な構成例と、その動作について説明する。図56は、画像補正部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-
図57は、制御信号生成部741が生成する制御信号の例を示す図である。制御信号Aは、入力画像の中の修正すべき部分(補正対象エリア52)を特定する信号であり、エリア設定部25の出力に基づいて生成され、領域抽出部745と画像合成部747に供給される。制御信号Bは、後述するぼけの度合いを表すパラメータσを特定する信号であり、アドレス演算部743に供給される。パラメータσの値は、例えば、制御部27を介して行われる、ユーザの指定に基づいて特定されるようにしてもよいし、予め設定されるようにしてもよい。
FIG. 57 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
図58乃至図61を参照して、画像のぼけの原理についてさらに詳しく説明する。図58Aは、簡単のため、画素が水平方向に一次元に配列されたものとして、ある画像における、真値X0乃至X8を表す図である。図58Cは、図58Aに対応する観測値を表す図である。図58Bは、係数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. 58A 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. 58C is a diagram illustrating observation values corresponding to FIG. 58A. FIG. 58B is a graph showing the magnitude of the coefficient W (i) in a bar graph form. 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)に基づいて、図58Cの観測値Y2を求めると、次のようになる。 Here, based on the equation (6), the observed value Y2 in FIG. 58C 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
同様にして、図58Cの観測値Y0を求める場合、真値の中で、図59の枠790−1で示される部分に基づいて、演算を行うことにより、次のように観測値Y0が求められる。 Similarly, when the observed value Y0 in FIG. 58C 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. 59 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を求める場合、図59の枠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 a 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.
図60と図61は、図58Aと図58Cの関係を2次元で表したものである。すなわち、図60を構成する各画素のレベルは、観測値であり、図61を構成する各画素のレベルを真値として、得られたものである。この場合、図60における画素Aに対応する観測値Y(x,y)は次のようにして求められる。 FIGS. 60 and 61 are two-dimensional representations of the relationship between FIGS. 58A and 58C. That is, the level of each pixel constituting FIG. 60 is an observed value, and the level of each pixel constituting FIG. 61 is obtained as a true value. In this case, the observed value Y (x, y) corresponding to the pixel A in FIG. 60 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)
すなわち、図60の画素Aに対応する観測値は、図61において画素A'(画素Aに対応する)を中心として枠aで示される25(=5×5)個の画素に対応する真値に基づいて求められる。同様に、図60の画素B(画素Aの図中右隣の画素)に対応する観測値は、図61において、画素B'(画素Bに対応する)を中心とした25個の画素に対応する真値に基づいて求められ、図60の画素Cに対応する観測値は、図61において、画素C'(画素Cに対応する)を中心とした25個の画素に対応する真値に基づいて求められる。図60の画素BとCに対応する観測値Y(x+1,y)とY(x+2,y)を求める式を次に示す。 That is, the observed values corresponding to the pixel A in FIG. 60 are true values corresponding to 25 (= 5 × 5) pixels indicated by the frame a with the pixel A ′ (corresponding to the pixel A) in FIG. 61 as the center. Based on. Similarly, the observation values corresponding to the pixel B in FIG. 60 (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. 60 is based on the true value corresponding to 25 pixels centered on the pixel C ′ (corresponding to the pixel C) in FIG. Is required. Equations for obtaining observed values Y (x + 1, y) and Y (x + 2, y) corresponding to pixels B and C in FIG. 60 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)
このようにして、図60の各画素に対応する観測値をもとめていくと、式(8)乃至(11)に示されるような行列式が得られる。 In this way, when the observation values corresponding to the respective pixels in FIG. 60 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)に示した行列式は、図58乃至図61を参照して上述したように、観測値の画素に対して、真値の画素が多く、このままでは逆行列を求めることができない(例えば、図59の例では、観測値の画素1個に対して真値の画素5個が必要となる。)。 However, as described above with reference to FIGS. 58 to 61, 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. 59, 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の詳細な動作については、図66を参照して後述する。また、本発明では、入力画像(観測値)の中のエッジ部分と平坦部分の判定結果が、真値の中でのエッジ部分と平坦部分の判定結果に等しいと仮定する。
Therefore, the image
式(12)乃至式(15)において、コードp2の関数である関数W1乃至W4は、重み関数とされる。本発明においては、コードp2に応じてこの重み関数W1乃至W4が制御されることで,画素ごとの関係式の使い分けが行われるようにする。図62にコード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. 62 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.
例えば、図63に示されるように、注目画素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. 63, 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は、図57の制御信号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
しかし、例えば、図61に示される枠(t)内の25(=5×5)個のすべてに画素において、重み関数W1乃至W4の組み合わせを変化させ、4つの関係式を切り替えた場合、15(=図62に示した関数W1乃至W4の組み合わせ)の25(枠(t)内の画素数)乗の組み合わせが存在し、それぞれの組み合わせごとに逆行列演算を行うと、係数の数が膨大になり、係数ROM744の容量には制限があるため、全ての係数を格納しきれなくなるおそれがある。このような場合、枠(t)内の中心画素であるXtのみ、その特徴に基づいて、コードp2を変化させて関係式を切り替え、枠(t)内の画素Xt以外画素の関係式については、例えばコードp2が擬似的に、「1111」に固定されるようにしてもよい。このようにすることで、係数の組み合わせを15通りに限定することができる。 However, for example, when the combination of the weight functions W1 to W4 is changed in all 25 (= 5 × 5) pixels in the frame (t) shown in FIG. (= Combination of functions W1 to W4 shown in FIG. 62) is a combination 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) is changed. 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.
次に図64を参照して、画像補正部22によるぼけ修正処理について説明する。ステップS801において、画像補正部22は、処理対象領域を検出する。この処理対象領域は、ぼけの修正を行うべき領域、すなわち補正対象エリア52であり、エリア設定部25から出力される信号に基づいて検出される。
Next, the blur correction process by the
ステップS802において、画像補正部22は、パラメータσの値を取得する。パラメータσは、ユーザにより指定されるようにしてもよいし、予め設定された値が取得されるようにしてもよい。ステップS803において、画像補正部22は、図65を参照して後述する画像補正処理を実行する。これにより、ぼけた画像が修正され、出力される。
In step S802, the
このようにして、補正対象エリア52内の画像については、画像のぼけが除去されて鮮明な画像となる。
In this way, the image in the
次に、図65を参照して、図64のステップS803の画像補正処理の詳細について説明する。 Next, details of the image correction processing in step S803 in FIG. 64 will be described with reference to FIG.
ステップS821において、画像特徴検出部742は、図66を参照して後述する画像特徴検出処理を実行する。これにより、注目画素に対して、どの方向に平坦なのかが判定され、図62を参照して上述したコードp2が生成され、アドレス演算部743に出力される。
In step S821, the image
ステップS822において、アドレス演算部743は、係数ROM744のアドレスを演算する。係数ROM744のアドレスは、例えば、コードp2に対応する4ビット(画像特徴検出部742の出力)、パラメータσの値を表す4ビット(図57の制御信号B)、および、上述した4つの関係式の重み関数Waを切り替えるコードp1に対応する2ビット(図57の制御信号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は、図69を参照して後述する画像合成処理を実行する。これにより、画素毎に、積和演算部746の処理結果を出力するか、入力画像をそのまま出力するかが判定される。ステップS826において、後処理部747は、補正後処理され、選択された画像を出力する。
In step S825, the
次に図66を参照して、図65のステップS821の画像特徴検出処理について説明する。ステップS841において、画像特徴検出部742は、ブロックを抽出し、ステップS842において、ステップS841で抽出されたブロック間の差分を演算する(その詳細は、図68を参照して後述する)。ステップS843において、画像特徴検出部742は、ステップS842で演算されたブロック差分を予め設定されている閾値と比較し、その比較結果に基づいて、ステップS844において、注目画素に対して平坦な方向を表すコードであるコードp2を出力する。
Next, the image feature detection processing in step S821 in FIG. 65 will be described with reference to FIG. In step S841, the image
図67と図68を参照して、画像特徴検出処理について、さらに詳しく説明する。図67は、画像特徴検出部742の詳細な構成例を示すブロック図である。同図の左側には、入力された画像の中から所定のブロックを抽出するブロック切り出し部841−1乃至841−5が設けられている。ブロック切り出し部841−1乃至841−5は、例えば、図68A乃至図68Eに示されるように、図中黒い丸で示される注目画素(いま修正すべき画素)の周辺の、注目画素を含む9(=3×3)個の画素で構成される5つのブロックを抽出する。
With reference to FIGS. 67 and 68, the image feature detection processing will be described in more detail. FIG. 67 is a block diagram illustrating a detailed configuration example of the image
図68Aに示されるブロック881は、その中心に注目画素を有する中心ブロックであり、ブロック切り出し部841−5により抽出される。図68Bに示されるブロック882は、ブロック881を画素1個分図中上に移動した上側ブロックであり、ブロック切り出し部841−3により抽出される。図68Cに示されるブロック883は、ブロック881を画素1個分図中左に移動した左側ブロックであり、ブロック切り出し部841−4により抽出される。
A
図68Dに示されるブロック884は、ブロック881を画素1個分図中下に移動した下側ブロックであり、ブロック切り出し部841−1により抽出される。図68Eに示されるブロック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」が出力される。しかし、図62に示されるように、コード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. 62, 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
次に、図69を参照して、図65のステップS825の画像合成処理について説明する。ステップS861において、画像合成部747は、積和演算部746からの出力結果に基づいて、画素の分散度を演算する。これにより、注目画素の周囲の画素の分散度合いが演算される。ステップS862において、画像合成部747は、ステップS862で演算された分散度は予め設定された閾値より大きいか否かを判定する。
Next, the image composition processing in step S825 in FIG. 65 will be described with reference to FIG. 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.
この点について、図70と図71を参照して、さらに詳しく説明する。図70は、画像合成部747の構成例を示すブロック図である。積和演算部746からの出力結果が、ブロック切り出し部901に入力され、ブロック切り出し部901は、図71に示されるように、注目画素a5を中心とした9(=3×3)個の画素a1乃至a9を切り出し、分散演算部802に出力する。分散演算部802は、分散度を次のようにして演算する。
This point will be described in more detail with reference to FIGS. 70 and 71. FIG. FIG. 70 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
次に、上述したオブジェクト追尾装置を応用した画像処理装置についてさらに説明を加える。図72は、オブジェクト追尾装置をテレビジョン受像機1000に応用した場合の例を表している。チューナ1001は、RF信号を入力し、復調して画像信号と音声信号とに分離し、画像信号を画像処理部1002に出力し、音声信号を音声処理部1007に出力する。
Next, the image processing apparatus to which the object tracking apparatus described above is applied will be further described. FIG. 72 shows an example where the object tracking device is applied to the
画像処理部1002は、チューナ1001より入力された画像信号を復調し、オブジェクト追尾部1003、ズーム画像作成部1004、および選択部1005に出力する。オブジェクト追尾部1003は、上述した図5のオブジェクト追尾装置26と実質的に同様の構成とされている。オブジェクト追尾部1003は、入力画像からユーザにより指定されたオブジェクトの追尾点を追尾する処理を実行し、その追尾点に関する座標情報をズーム画像作成部1004に出力する。ズーム画像作成部1004は、追尾点を中心とするズーム画像を作成し、選択部1005に出力する。選択部1005は、画像処理部1002より供給された画像またはズーム画像作成部1004より供給された画像の一方をユーザからの指示に基づいて選択し、画像ディスプレイ1006に出力し、表示させる。
The
音声処理部1007は、チューナ1001より入力された音声信号を復調し、スピーカ1008に出力する。
The
リモートコントローラ1010は、ユーザにより操作され、その操作に対応する信号を制御部1009に出力する。制御部1009は、例えばマイクロコンピュータなどにより構成され、ユーザの指示に基づいて各部を制御する。リムーバブルメディア1011は、半導体メモリ、磁気ディスク、光ディスク、光磁気ディスクなどにより構成され、必要に応じて装着され、制御部1009に、プログラム、その他各種のデータを提供する。
The
次に、テレビジョン受像機1000の処理について、図73のフローチャートを参照して説明する。
Next, processing of the
ステップS901において、チューナ1001は、図示せぬアンテナを介して受信したRF信号から、ユーザにより指示されたチャンネルの信号を復調して、画像信号を画像処理部1002に出力し、音声信号を音声処理部1007に出力する。音声信号は、音声処理部1007で復調された後、スピーカ1008から出力される。
In step S901, the
画像処理部1002は、入力された画像信号を復調し、オブジェクト追尾部1003、ズーム画像作成部1004、および選択部1005に出力する。
The
ステップS902において、オブジェクト追尾部1003は、追尾が指示されたか否かを判定し、追尾が指示されていないと判定された場合、ステップS903,S904の処理をスキップする。ステップS905において、選択部1005は、画像処理部1002より供給される画像信号と、ズーム画像作成部1004より入力される画像信号のいずれか一方を制御部1009からの制御に基づいて選択する。いまの場合、ユーザから特に指示がなされていないので、制御部1009は、選択部1005に画像処理部1002からの画像信号を選択させる。ステップS906において画像ディスプレイ1006は、選択部1005により選択された画像を表示する。
In step S902, the
ステップS907において、制御部1009は、ユーザの指示に基づいて画像表示処理を終了するか否かを判定する。すなわちユーザは、画像表示処理を終了するとき、リモートコントローラ1010を操作して、制御部1009にそれを指示する。ユーザから終了が指示されていない場合、処理はステップS901に戻り、それ以降の処理が繰り返し実行される。
In step S907, the
以上のようにして、チューナ1001により受信された信号に対応する画像をそのまま表示する通常の処理が実行される。
As described above, the normal processing for displaying the image corresponding to the signal received by the
ユーザは、画像ディスプレイ1006に表示されている画像を見て追尾したいと思う画像が表示されたとき、リモートコントローラ1010を操作することで、その画像を指定する。この操作がなされたとき、ステップS902において制御部1009は、追尾が指示されたと判定し、オブジェクト追尾部1003を制御する。オブジェクト追尾部1003は、この制御に基づいて、ユーザにより指定された追尾点の追尾処理を開始する。この処理は、上述したオブジェクト追尾装置26の処理と同様の処理である。
When an image desired to be tracked is displayed by looking at the image displayed on the
ステップS904において、ズーム画像作成部1004は、オブジェクト追尾部1003により追尾されている追尾点を中心とするズーム画像を生成し、選択部1005に出力する。
In step S <b> 904, the zoom
このズーム画像作成処理は、本出願人が先に提案しているクラス分類適応処理を利用して行うことができる。例えば、特開2002−196737公報には、予め学習して得た係数を用いて、525i信号を1080i信号に変換する処理が開示されている。この処理は、垂直方向と水平方向の両方に9/4倍に画像を拡大する処理と実質的に同様の処理である。ただし、画像ディスプレイ1006は、画素数が一定であるため、ズーム画像作成部1004は、例えば9/4倍の画像を作成する場合、525i信号を1080i信号に変換した後、追尾点を中心とする所定の数の画素(画像ディスプレイ1006に対応する数の画素)を選択することでズーム画像を作成することができる。縮小する処理は、その逆の処理となる。
This zoom image creation processing can be performed using the class classification adaptation processing previously proposed by the present applicant. For example, Japanese Patent Laid-Open No. 2002-196737 discloses a process for converting a 525i signal into a 1080i signal using a coefficient obtained by learning in advance. This process is substantially the same as the process of enlarging the image 9/4 times in both the vertical direction and the horizontal direction. However, since the
この原理に基づいて、任意の倍率のズーム画像を生成することができる。 Based on this principle, a zoom image with an arbitrary magnification can be generated.
追尾が指示されている場合、ステップS905において選択部1005は、ズーム画像作成部1004により作成されたズーム画像を選択する。その結果、ステップS906において、画像ディスプレイ1006は、ズーム画像作成部1004により作成されたズーム画像を表示することになる。
If tracking is instructed, the
以上のようにして、画像ディスプレイ1006には、ユーザが指定した追尾点を中心とするズーム画像が表示される。倍率が1に設定された場合には、追尾だけが行われる。
As described above, a zoom image centered on the tracking point designated by the user is displayed on the
図74は、本発明を監視カメラシステムに適用した場合の例を表している。この監視カメラシステム1100においては、CCDビデオカメラ等よりなる撮像部1101により撮像された画像が画像ディスプレイ1102に表示される。追尾対象検出部1103は、撮像部1101より入力された画像から追尾対象を検出し、検出結果をオブジェクト追尾部1105に出力する。オブジェクト追尾部1105は、撮像部1101より供給された画像中の、追尾対象検出部1103により指定された追尾対象を追尾するように動作する。オブジェクト追尾部1105は、上述した図1のオブジェクト追尾装置26と基本的に同様の構成を有している。カメラ駆動部1104は、オブジェクト追尾部1105からの制御に基づいて、撮像部1101が追尾対象の追尾点を中心とする画像を撮影するように撮像部1101を駆動する。
FIG. 74 shows an example where the present invention is applied to a surveillance camera system. In this
制御部1106は、例えば、マイクロコンピュータなどにより構成され、各部を制御する。制御部1106には、半導体メモリ、磁気ディスク、光ディスク、光磁気ディスクなどにより構成されるリムーバブルメディア1107が必要に応じて接続され、プログラム、その他各種のデータが必要に応じて供給される。
The
次に、図75のフローチャートを参照して、監視処理の動作について説明する。監視システム1100の電源がオンされているとき、撮像部1101は監視領域を撮像し、その撮像して得られた画像を追尾対象検出部1103、オブジェクト追尾部1105、および画像ディスプレイ1102に出力している。追尾対象検出部1103は、ステップS931において、撮像部1101から入力された画像から追尾対象を検出する処理を実行する。追尾対象検出部1103は、例えば、動く物体が検出された場合、その動く物体を追尾対象として検出する。追尾対象検出部1103は、追尾対象の中から、例えば、最も輝度の高い点、あるいは追尾対象の中心の点などを追尾点として検出し、オブジェクト追尾部1105に出力する。
Next, the operation of the monitoring process will be described with reference to the flowchart in FIG. When the power of the
ステップS932において、オブジェクト追尾部1105は、ステップS931で検出された追尾点を追尾する追尾処理を実行する。この追尾処理は、上述した図5のオブジェクト追尾装置26の処理と同様の処理である。
In step S932, the
ステップS933において、オブジェクト追尾部1105は、追尾点の画面上の位置を検出する。そして、ステップS934においてオブジェクト追尾部1105は、ステップS933の処理により検出された追尾点の位置と画像の中央との差を検出する。ステップS935において、オブジェクト追尾部1105は、ステップS934の処理で検出した差に対応するカメラ駆動信号を生成し、カメラ駆動部1104に出力する。ステップS936において、カメラ駆動部1104はカメラ駆動信号に基づいて撮像部1101を駆動する。これにより撮像部1101は、追尾点が画面の中央に位置するようにパンまたはチルトする。
In step S933, the
ステップS937において、制御部1106は、ユーザからの指示に基づいて監視処理を終了するか否かを判定し、ユーザから終了が指示されていない場合には、ステップS931に戻り、それ以降の処理を繰り返し実行する。ユーザから監視処理の終了が指示された場合、ステップS937において終了すると判定され、制御部1106は監視処理を終了する。
In step S937, the
以上のようにして、この監視カメラシステム1100においては、動く物体が自動的に追尾点として検出され、その追尾点を中心とする画像が画像ディスプレイ1102に表示される。これにより、より簡単かつ確実に、監視処理を行うことが可能となる。
As described above, in the
図76は、本発明を適用した他の監視カメラシステムの構成例を表している。この監視カメラシステム1200は、撮像部1201、画像ディスプレイ1202、オブジェクト追尾部1203、カメラ駆動部1204、制御部1205、指示入力部1206、およびリムーバブルメディア1207により構成されている。
FIG. 76 shows a configuration example of another surveillance camera system to which the present invention is applied. The
撮像部1201は、撮像部1101と同様に、CCDビデオカメラなどにより構成され、撮像した画像を画像ディスプレイ1202とオブジェクト追尾部1203に出力する。画像ディスプレイ1202は、入力された画像を表示する。オブジェクト追尾部1203は、上述した図5のオブジェクト追尾装置26と基本的に同様の構成とされている。カメラ駆動部1204は、オブジェクト追尾部1203からの制御に基づいて、撮像部1201を所定の方向にパン、チルト駆動する。
Similar to the
制御部1205は、例えばマイクロコンピュータなどにより構成され、各部を制御する。指示入力部1206は、各種のボタン、スイッチ、あるいはリモートコントローラなどにより構成され、ユーザからの指示に対応する信号を制御部1205に出力する。リムーバブルメディア1207は、半導体メモリ、磁気ディスク、光ディスク、光磁気ディスクなどにより構成され、必要に応じて接続され、制御部1205に必要なプログラムやデータなどを適宜供給する。
The
次に、図77のフローチャートを参照して、その動作について説明する。 Next, the operation will be described with reference to the flowchart of FIG.
ステップS961において、制御部1205は、ユーザより追尾点が指定されたか否かを判定する。追尾点が指定されていなければ、ステップS969に進み、制御部1205は、ユーザより処理の終了が指示されたか否かを判定し、終了が指示されていなければ、ステップS961に戻り、それ以降の処理を繰り返し実行する。
In step S961, the
すなわち、この間、撮像部1201が撮像エリアを撮像して得られた画像が画像ディスプレイ1202に出力され、表示されている。この画像を見て、監視エリアを監視する処理を終了させる場合、ユーザ(監視者)は指示入力部1206を操作して終了を指令する。終了が指令されたとき、制御部1205は、監視処理を終了する。
That is, during this time, an image obtained by the
一方、ユーザは、画像ディスプレイ1202に表示されている画像を見て、例えば不審者などが表示されたとき、その不審者の所定の点を追尾点として指定する。この指定は、指示入力部1206を操作することで行われる。ユーザが追尾点を指定したとき、ステップS961において、追尾点が指定されたと判定され、ステップS962に進み、追尾処理が実行される。以下、ステップS962乃至ステップS967において実行される処理は、図75のステップS932乃至ステップS937において行われる処理と同様の処理である。すなわち、これにより、撮像部1201が指定された追尾点が画面の中央に来るように駆動される。
On the other hand, the user looks at the image displayed on the
ステップS967において、制御部1205は、監視の終了が指示されたか否かを判定し、指示された場合処理を終了するが、指示されていない場合には、ステップS968に進み、ユーザより追尾の解除が指示されたか否かを判定する。ユーザは、例えば、一旦追尾を指定したものが不審者でないとわかったとき、指示入力部1206を操作して、追尾の解除を指示することができる。制御部1205は、ステップS968で、追尾の解除が指示されていないと判定された場合、ステップS962に戻り、それ以降の処理を実行する。すなわち、この場合には、指定された追尾点を追尾する処理が継続される。
In step S967, the
ステップS968において追尾の解除が指示されたと判定された場合、追尾処理は解除され、処理はステップS961に戻り、それ以降の処理が繰り返し実行される。 If it is determined in step S968 that tracking cancellation is instructed, the tracking process is canceled, the process returns to step S961, and the subsequent processes are repeatedly executed.
以上のようにして、この監視カメラシステム1200においては、ユーザが指示した追尾点の画像が画像ディスプレイ1202の中央に表示される。従って、ユーザは、所望の画像を任意に選択して、きめ細やかに監視を行うことが可能となる。
As described above, in the
本発明は、テレビジョン受像機や監視カメラシステムに限らず、各種の画像処理装置に適応することが可能である。 The present invention can be applied not only to a television receiver and a surveillance camera system but also to various image processing apparatuses.
なお、以上においては、画像の処理単位をフレームとしたが、フィールドを処理単位とする場合にも本発明は適用が可能である。 In the above, the image processing unit is a frame, but the present invention can also be applied to a case where a field is a processing unit.
なお、上述した一連の処理をハードウェアで実現するか、ソフトウェアで実現するかは問わない。上述した一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、汎用のパーソナルコンピュータなどに、ネットワークやリムーバブルメディアなどの記録媒体からインストールされる。 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 is 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 画像合成部
DESCRIPTION OF
Claims (9)
画像の中の移動するオブジェクトの特徴点を検出する特徴点検出手段と、
前記特徴点検出手段により検出された前記特徴点に基づいて、前記画像の中の前記オブジェクトの移動を追尾する追尾手段と、
前記追尾手段による追尾結果に基づいて、前記画像の中の前記オブジェクトの周囲に予め設定された大きさの補正領域を設定する補正領域設定手段と、
前記画像の中の前記補正領域内の画像を補正する補正手段と、
前記補正領域内が前記補正手段により補正された画像の表示を制御する表示制御手段と
を備え、
前記補正手段は、
前記補正領域内の画像を特定する制御信号と、画像のぼけの度合い表すパラメータを供給する供給手段と、
前記制御信号に基づいて特定された前記補正領域内の画像の特徴を検出し、検出された特徴を表す特徴コードを出力する特徴検出手段と、
前記画像のぼけの度合いを表すパラメータと、前記特徴検出手段により出力された特徴コードに対応する係数を記憶する記憶手段と、
前記記憶手段から、前記パラメータと前記特徴検出手段により出力された前記特徴コードに対応する係数を読み出す読み出し手段と、
前記読み出し手段により読み出された係数に基づいて、入力画像の画素の値に対して積和演算を行う積和演算手段と、
前記積和演算手段による演算結果と前記入力画像の画素の値を選択して出力する選択出力手段とを備え、
前記補正領域内の画像のぼけを除去するように補正する
画像処理装置。 An image processing apparatus that clearly displays a moving object,
Feature point detecting means for detecting feature points of a moving object in an image;
Tracking means for tracking the movement of the object in the image based on the feature points detected by the feature point detection means;
Correction area setting means for setting a correction area of a preset size around the object in the image based on the tracking result by the tracking means;
Correction means for correcting an image in the correction region in the image;
Display control means for controlling the display of the image in the correction area corrected by the correction means ,
The correction means includes
Supply means for supplying a control signal for specifying an image in the correction area, and a parameter representing a degree of blur of the image;
Feature detection means for detecting a feature of the image in the correction region identified based on the control signal and outputting a feature code representing the detected feature;
Storage means for storing a parameter representing the degree of blur of the image and a coefficient corresponding to the feature code output by the feature detection means;
Reading means for reading out the coefficient and the coefficient corresponding to the feature code output by the feature detection means from the storage means;
Product-sum operation means for performing product-sum operation on the pixel values of the input image based on the coefficient read by the reading means;
A selection output means for selecting and outputting a calculation result by the product-sum calculation means and a pixel value of the input image;
Correct so as to remove the blur of the image in the correction area
Image processing device.
入力画像の中から、積和演算を行う画素の周囲の、予め設定された第1の領域に含まれる複数の画素を抽出する第1の抽出手段と、
前記第1の領域と、垂直または水平の複数の方向に連続した、複数の第2の領域に含まれる複数の画素を抽出する第2の抽出手段と、
前記第1の抽出手段により抽出された画素と、前記第2の抽出手段により抽出された画素において、対応する画素の値の差分の絶対値の総和を求めて、複数のブロック差分を演算するブロック差分演算手段と、
前記ブロック差分が、予め設定された閾値より大きいか否かを判定する差分判定手段と
を備える請求項1に記載の画像処理装置。 The feature detection means includes
A first extraction means for extracting a plurality of pixels included in a preset first area around the pixel to be subjected to the product-sum operation from the input image;
A second extraction means for extracting a plurality of pixels included in a plurality of second regions, which are continuous in a plurality of vertical or horizontal directions, and the first region;
A block for calculating a plurality of block differences by calculating a sum of absolute values of differences between corresponding pixel values in the pixels extracted by the first extracting unit and the pixels extracted by the second extracting unit. Difference calculation means;
The image processing apparatus according to claim 1 , further comprising: a difference determination unit that determines whether the block difference is larger than a preset threshold value.
請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1 , wherein the parameter is a parameter of a Gaussian function in a model formula representing a relationship between a pixel of a blurred image and a pixel of a non-blurred image.
請求項3に記載の画像処理装置。 The image processing apparatus according to claim 3 , wherein the coefficient stored by the storage unit is a coefficient obtained by calculating an inverse matrix of the model formula.
前記積和演算手段により積和演算が行われた複数の画素を抽出する第1の抽出手段と、
前記第1の抽出手段により抽出された複数の画素の分散の度合いを表す分散度を演算する分散演算手段と、
前記分散演算手段により演算された分散度が予め設定された閾値より大きいか否かを判定する分散判定手段と
請求項1に記載の画像処理装置。 The selection output means includes
First extraction means for extracting a plurality of pixels on which product-sum operation has been performed by the product-sum operation means;
Dispersion calculating means for calculating a degree of dispersion representing a degree of dispersion of the plurality of pixels extracted by the first extracting means;
The image processing apparatus according to claim 1 , wherein a dispersion determination unit that determines whether or not the degree of dispersion calculated by the dispersion calculation unit is greater than a preset threshold value.
をさらに備える請求項5に記載の画像信号処理装置。 The selection output unit is a pixel selection unit that selects a pixel value to be output from either a calculation result by the product-sum calculation unit or a pixel value of the input image based on the determination result of the variance determination unit. The image signal processing apparatus according to claim 5 , further comprising:
画像の中の移動するオブジェクトの特徴点を検出する特徴点検出ステップと、
前記特徴点検出ステップの処理により検出された前記特徴点に基づいて、画像の前記オブジェクトの移動を追尾する追尾ステップと、
前記追尾ステップの処理による追尾結果に基づいて、前記画像の中に前記オブジェクトの周囲に予め設定された大きさの補正領域を設定する補正領域設定ステップと、
前記画像の中の前記補正領域内の画像を補正する補正ステップと、
前記補正領域内が前記補正ステップの処理により補正された画像の表示を制御する表示制御ステップと
を含み、
前記補正ステップは、
前記補正領域内の画像を特定する制御信号と、画像のぼけの度合い表すパラメータを供給する供給ステップと、
前記制御信号に基づいて特定された前記補正領域内の画像の特徴を検出し、検出された特徴を表す特徴コードを出力する特徴検出ステップと、
前記画像のぼけの度合いを表すパラメータと、前記特徴検出ステップの処理により出力された特徴コードに対応する係数の記憶を制御する記憶制御ステップと、
前記記憶制御ステップの処理により記憶が制御された、前記パラメータと前記特徴検出ステップの処理により出力された前記特徴コードに対応する係数を読み出す読み出しステップと、
前記読み出しステップの処理により読み出された係数に基づいて、入力画像の画素の値に対して積和演算を行う積和演算ステップと、
前記積和演算ステップの処理による演算結果と前記入力画像の画素の値を選択して出力する選択出力ステップとを含み、
前記補正領域内の画像のぼけを除去するように補正する
画像処理方法。 An image processing method of an image processing apparatus for clearly displaying a moving object in an image,
A feature point detecting step for detecting a feature point of a moving object in the image;
A tracking step of tracking the movement of the object in the image based on the feature points detected by the processing of the feature point detection step;
A correction area setting step for setting a correction area of a predetermined size around the object in the image based on the tracking result of the tracking step;
A correction step of correcting an image in the correction area of the image;
And a display control step of the correction area to control the display of the corrected image by the processing in the correction step,
The correction step includes
Supplying a control signal for specifying an image in the correction area, and a parameter representing a degree of blur of the image;
A feature detection step of detecting a feature of the image in the correction region specified based on the control signal and outputting a feature code representing the detected feature;
A parameter indicating the degree of blur of the image, and a storage control step for controlling storage of a coefficient corresponding to the feature code output by the processing of the feature detection step;
A step of reading out a parameter corresponding to the feature code output by the processing of the parameter and the feature detection step, the storage of which is controlled by the processing of the storage control step;
A product-sum operation step for performing a product-sum operation on the pixel values of the input image based on the coefficients read out by the processing in the reading step;
A selection output step of selecting and outputting a calculation result by the process of the product-sum calculation step and a pixel value of the input image;
An image processing method for performing correction so as to remove blur in an image in the correction area .
画像の中の移動するオブジェクトの特徴点の検出を制御する特徴点検出制御ステップと、
前記特徴点検出制御ステップの処理により検出された前記特徴点に基づいて、画像の前記オブジェクトの移動を追尾するように制御する追尾制御ステップと、
前記追尾制御ステップの処理による追尾結果に基づいて、前記画像の中に前記オブジェクトの周囲に予め設定された大きさの補正領域を設定するように制御する補正領域設定制御ステップと、
前記画像の中の前記補正領域内の画像の補正を制御する補正制御ステップと、
前記補正領域内が前記補正制御ステップの処理により補正された画像の表示を制御する表示制御ステップと
を含み、
前記補正制御ステップは、
前記補正領域内の画像を特定する制御信号と、画像のぼけの度合い表すパラメータを供給する供給制御ステップと、
前記制御信号に基づいて特定された前記補正領域内の画像の特徴を検出し、検出された特徴を表す特徴コードを出力する特徴検出制御ステップと、
前記画像のぼけの度合いを表すパラメータと、前記特徴検出制御ステップの処理により出力が制御された特徴コードに対応する係数の記憶を制御する記憶制御ステップと、
前記記憶制御ステップの処理により記憶が制御された、前記パラメータと前記特徴検出制御ステップの処理により出力が制御された前記特徴コードに対応する係数を読み出す読み出し制御ステップと、
前記読み出し制御ステップの処理により読み出しが制御された係数に基づいて、入力画像の画素の値に対して積和演算を行う積和演算制御ステップと、
前記積和演算制御ステップの処理による演算結果と前記入力画像の画素の値を選択して出力する選択出力制御ステップとを含み、
前記補正領域内の画像のぼけを除去するように補正する
処理をコンピュータに実行させるプログラム。 An image processing apparatus program that clearly displays a moving object in an image,
A feature point detection control step for controlling detection of feature points of a moving object in the image;
A tracking control step for controlling to track the movement of the object in the image based on the feature point detected by the processing of the feature point detection control step;
A correction area setting control step for controlling to set a correction area of a preset size around the object in the image based on the tracking result by the processing of the tracking control step;
A correction control step for controlling correction of an image in the correction region in the image;
A display control step for controlling display of an image in which the correction area is corrected by the processing of the correction control step;
Including
The correction control step includes
A supply control step of supplying a control signal for specifying an image in the correction area, and a parameter representing a degree of blur of the image;
A feature detection control step of detecting a feature of the image in the correction region identified based on the control signal and outputting a feature code representing the detected feature;
A parameter representing the degree of blur of the image, and a storage control step for controlling storage of a coefficient corresponding to the feature code whose output is controlled by the processing of the feature detection control step;
A read control step for reading out the coefficient corresponding to the feature code whose output is controlled by the process of the parameter and the feature detection control step whose storage is controlled by the process of the storage control step;
A product-sum operation control step for performing a product-sum operation on the pixel value of the input image based on the coefficient whose reading is controlled by the processing of the reading control step;
A selection output control step of selecting and outputting a calculation result by the process of the product-sum calculation control step and a pixel value of the input image;
A program for causing a computer to execute a process of correcting so as to remove blurring of an image in the correction area .
画像の中の移動するオブジェクトの特徴点の検出を制御する特徴点検出制御ステップと、
前記特徴点検出制御ステップの処理により検出された前記特徴点に基づいて、画像の前記オブジェクトの移動を追尾するように制御する追尾制御ステップと、
前記追尾制御ステップの処理による追尾結果に基づいて、前記画像の中に前記オブジェクトの周囲に予め設定された大きさの補正領域を設定するように制御する補正領域設定制御ステップと、
前記画像の中の前記補正領域内の画像の補正を制御する補正制御ステップと、
前記補正領域内が前記補正制御ステップの処理により補正された画像の表示を制御する表示制御ステップと
を含み、
前記補正制御ステップは、
前記補正領域内の画像を特定する制御信号と、画像のぼけの度合い表すパラメータを供給する供給制御ステップと、
前記制御信号に基づいて特定された前記補正領域内の画像の特徴を検出し、検出された特徴を表す特徴コードを出力する特徴検出制御ステップと、
前記画像のぼけの度合いを表すパラメータと、前記特徴検出制御ステップの処理により出力が制御された特徴コードに対応する係数の記憶を制御する記憶制御ステップと、
前記記憶制御ステップの処理により記憶が制御された、前記パラメータと前記特徴検出制御ステップの処理により出力が制御された前記特徴コードに対応する係数を読み出す読み出し制御ステップと、
前記読み出し制御ステップの処理により読み出しが制御された係数に基づいて、入力画像の画素の値に対して積和演算を行う積和演算制御ステップと、
前記積和演算制御ステップの処理による演算結果と前記入力画像の画素の値を選択して出力する選択出力制御ステップとを含み、
前記補正領域内の画像のぼけを除去するように補正する
処理をコンピュータに実行させるプログラムが記録される記録媒体。 A recording medium in which a program of an image processing device for clearly displaying a moving object in an image is recorded,
A feature point detection control step for controlling detection of feature points of a moving object in the image;
A tracking control step for controlling to track the movement of the object in the image based on the feature point detected by the processing of the feature point detection control step;
A correction area setting control step for controlling to set a correction area of a preset size around the object in the image based on the tracking result by the processing of the tracking control step;
A correction control step for controlling correction of an image in the correction region in the image;
A display control step for controlling display of an image in which the correction area is corrected by the processing of the correction control step;
Including
The correction control step includes
A supply control step of supplying a control signal for specifying an image in the correction area, and a parameter representing a degree of blur of the image;
A feature detection control step of detecting a feature of the image in the correction region identified based on the control signal and outputting a feature code representing the detected feature;
A parameter representing the degree of blur of the image, and a storage control step for controlling storage of a coefficient corresponding to the feature code whose output is controlled by the processing of the feature detection control step;
A read control step for reading out the coefficient corresponding to the feature code whose output is controlled by the process of the parameter and the feature detection control step whose storage is controlled by the process of the storage control step;
A product-sum operation control step for performing a product-sum operation on the pixel value of the input image based on the coefficient whose reading is controlled by the processing of the reading control step;
A selection output control step of selecting and outputting a calculation result by the process of the product-sum calculation control step and a pixel value of the input image;
A recording medium on which is recorded a program that causes a computer to execute a correction process so as to remove blur in an image in the correction area .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005000621A JP4725105B2 (en) | 2004-01-06 | 2005-01-05 | Image processing apparatus and method, program, and recording medium |
Applications Claiming Priority (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004000752 | 2004-01-06 | ||
JP2004000752 | 2004-01-06 | ||
JP2004077398 | 2004-03-18 | ||
JP2004077398 | 2004-03-18 | ||
JP2005000621A JP4725105B2 (en) | 2004-01-06 | 2005-01-05 | Image processing apparatus and method, program, and recording medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005303983A JP2005303983A (en) | 2005-10-27 |
JP4725105B2 true JP4725105B2 (en) | 2011-07-13 |
Family
ID=35334930
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005000621A Expired - Fee Related JP4725105B2 (en) | 2004-01-06 | 2005-01-05 | Image processing apparatus and method, program, and recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4725105B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101855224B1 (en) | 2014-06-17 | 2018-05-08 | 텐센트 테크놀로지(센젠) 컴퍼니 리미티드 | Image processing method and apparatus |
Families Citing this family (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4682820B2 (en) * | 2005-11-25 | 2011-05-11 | ソニー株式会社 | Object tracking device, object tracking method, and program |
JP4826316B2 (en) * | 2006-03-31 | 2011-11-30 | ソニー株式会社 | Image processing apparatus and method, program, and recording medium |
JP4797753B2 (en) * | 2006-03-31 | 2011-10-19 | ソニー株式会社 | Image processing apparatus and method, and program |
JP4558696B2 (en) * | 2006-09-25 | 2010-10-06 | パナソニック株式会社 | Automatic body tracking device |
JP4874150B2 (en) * | 2007-03-30 | 2012-02-15 | セコム株式会社 | Moving object tracking device |
CN101398896B (en) * | 2007-09-28 | 2012-10-17 | 三星电子株式会社 | Device and method for extracting color characteristic with strong discernment for image forming apparatus |
JP4978402B2 (en) * | 2007-09-28 | 2012-07-18 | 富士通セミコンダクター株式会社 | Image processing filter, image processing method of image processing filter, and image processing circuit of image processing apparatus including image processing filter |
KR100927009B1 (en) * | 2008-02-04 | 2009-11-16 | 광주과학기술원 | Haptic interaction method and system in augmented reality |
JP4513035B2 (en) | 2008-03-10 | 2010-07-28 | ソニー株式会社 | Information processing apparatus and method, and program |
JP4963297B2 (en) * | 2008-03-17 | 2012-06-27 | グローリー株式会社 | Person counting device and person counting method |
JP2009223722A (en) | 2008-03-18 | 2009-10-01 | Sony Corp | Image signal processing apparatus, image signal processing method, and program |
JP4623122B2 (en) | 2008-04-03 | 2011-02-02 | ソニー株式会社 | Image signal processing apparatus, image signal processing method, and program |
JP4513039B2 (en) * | 2008-05-30 | 2010-07-28 | ソニー株式会社 | Image processing apparatus, image processing method, and program |
JP4507129B2 (en) | 2008-06-06 | 2010-07-21 | ソニー株式会社 | Tracking point detection apparatus and method, program, and recording medium |
JP5487610B2 (en) | 2008-12-18 | 2014-05-07 | ソニー株式会社 | Image processing apparatus and method, and program |
JP5012875B2 (en) * | 2009-11-10 | 2012-08-29 | 富士通株式会社 | High-speed moving image shooting device and high-speed moving image shooting method |
JP5394952B2 (en) * | 2010-03-03 | 2014-01-22 | セコム株式会社 | Moving object tracking device |
KR101870902B1 (en) * | 2011-12-12 | 2018-06-26 | 삼성전자주식회사 | Image processing apparatus and image processing method |
JP5808282B2 (en) * | 2012-03-23 | 2015-11-10 | 三菱電機株式会社 | Video signal recording / reproducing apparatus and monitoring method |
US10334159B2 (en) * | 2014-08-05 | 2019-06-25 | Panasonic Corporation | Correcting and verifying method, and correcting and verifying device |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS61182389A (en) * | 1985-02-08 | 1986-08-15 | Hitachi Ltd | Picture image signal processing device |
JPS62127976A (en) * | 1985-11-29 | 1987-06-10 | Kyocera Corp | Image recording processor |
JP3182808B2 (en) * | 1991-09-20 | 2001-07-03 | 株式会社日立製作所 | Image processing system |
JP2001043382A (en) * | 1999-07-27 | 2001-02-16 | Fujitsu Ltd | Eye tracking device |
JP2002369071A (en) * | 2001-06-08 | 2002-12-20 | Olympus Optical Co Ltd | Picture processing method and digital camera mounted with the same and its program |
-
2005
- 2005-01-05 JP JP2005000621A patent/JP4725105B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101855224B1 (en) | 2014-06-17 | 2018-05-08 | 텐센트 테크놀로지(센젠) 컴퍼니 리미티드 | Image processing method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
JP2005303983A (en) | 2005-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4725105B2 (en) | Image processing apparatus and method, program, and recording medium | |
KR101108634B1 (en) | Image processing device and image processing method and recording medium | |
JP5052301B2 (en) | Image processing apparatus and image processing method | |
JP3898606B2 (en) | Motion vector detection method and apparatus, and frame interpolation image creation method and apparatus | |
EP2330812B1 (en) | Apparatus for generating a panoramic image, method for generating a panoramic image, and computer-readable medium | |
US9262684B2 (en) | Methods of image fusion for image stabilization | |
JP4489033B2 (en) | Frame rate conversion device, pan / tilt determination device and video device | |
JP5272886B2 (en) | Moving object detection apparatus, moving object detection method, and computer program | |
CN110008795B (en) | Image target tracking method and system and computer readable recording medium | |
JP4617883B2 (en) | Image processing apparatus and method, program, and recording medium | |
US10121251B2 (en) | Method for controlling tracking using a color model, corresponding apparatus and non-transitory program storage device | |
JP2007272732A (en) | Image processing apparatus and method, and program | |
JP5163429B2 (en) | Motion vector detection apparatus, processing method thereof, and program | |
JP6924064B2 (en) | Image processing device and its control method, and image pickup device | |
JP2007274543A (en) | Image processing apparatus and method, program, and recording medium | |
JP2015080107A (en) | Moving body display system and moving body display program | |
JP6320053B2 (en) | Image processing apparatus, image processing method, and computer program | |
US8385430B2 (en) | Video signal processing apparatus and video signal processing method | |
JP5841345B2 (en) | Image processing apparatus, image processing method, image processing program, and imaging apparatus | |
JP2010114596A (en) | Motion vector detection apparatus, motion vector processing method and program | |
JP4612522B2 (en) | Change area calculation method, change area calculation device, change area calculation program | |
JP4826316B2 (en) | Image processing apparatus and method, program, and recording medium | |
JP2007272731A (en) | Image processing apparatus and method, and program | |
JP2006215657A (en) | Method, apparatus, program and program storage medium for detecting motion vector | |
JP2007272735A (en) | Image processor and image processing method, program, and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070809 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100518 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100603 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100709 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20110315 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110328 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140422 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |