JP5441737B2 - Image processing apparatus, image processing method, and image processing program - Google Patents

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

Info

Publication number
JP5441737B2
JP5441737B2 JP2010016997A JP2010016997A JP5441737B2 JP 5441737 B2 JP5441737 B2 JP 5441737B2 JP 2010016997 A JP2010016997 A JP 2010016997A JP 2010016997 A JP2010016997 A JP 2010016997A JP 5441737 B2 JP5441737 B2 JP 5441737B2
Authority
JP
Japan
Prior art keywords
image processing
moving object
threshold
euclidean distance
threshold value
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
Application number
JP2010016997A
Other languages
Japanese (ja)
Other versions
JP2011154634A (en
Inventor
昭宜 大黒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Information Systems Japan Corp
Original Assignee
Toshiba Information Systems Japan Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Information Systems Japan Corp filed Critical Toshiba Information Systems Japan Corp
Priority to JP2010016997A priority Critical patent/JP5441737B2/en
Publication of JP2011154634A publication Critical patent/JP2011154634A/en
Application granted granted Critical
Publication of JP5441737B2 publication Critical patent/JP5441737B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Description

この発明は、移動可能なカメラにより撮像された画像を用いてカメラが移動中においても適切に移動物体を検出することが可能な画像処理装置、画像処理方法及び画像処理用プログラムに関するものである。   The present invention relates to an image processing apparatus, an image processing method, and an image processing program capable of appropriately detecting a moving object using an image captured by a movable camera even while the camera is moving.

従来の画像処理においては、カメラが移動する環境において移動物体を検出するものとしては、車両から撮像した画像について前方等を走行する車両を検出する車両用周辺監視装置が知られている(特許文献1参照)。この装置において、移動物体検出のためには、ブロックを設定して、このブロック内において1画素(ピクセル)単位で複雑な演算を行って移動ベクトルを検出することが必要である。この装置は車両からの撮像であるため、パーンやチルト更にはカメラの位置自体を変化させて移動物体を撮像する場合には、移動物体が動くと共に背景が動くことになるので高精度で検出を行うためには相当の複雑な演算を行う必要があるという問題があった。   In conventional image processing, as a device that detects a moving object in an environment in which a camera moves, a vehicle periphery monitoring device that detects a vehicle traveling ahead in an image captured from a vehicle is known (Patent Document). 1). In this apparatus, in order to detect a moving object, it is necessary to set a block and perform a complex operation in units of one pixel (pixel) in this block to detect a moving vector. Since this device captures images from a vehicle, when moving objects are imaged by changing the pan, tilt, or even the camera position itself, the moving object moves and the background moves, so detection is performed with high accuracy. In order to do so, there is a problem that it is necessary to perform a considerably complicated operation.

特開平7−239998号公報JP-A-7-239998

本発明は上記のような従来の画像処理における問題点を解決せんとしてなされたもので、その目的は、カメラが移動して背景が時間経過と共に変化するような場合にも高精度に移動物体を検出するが可能である画像処理装置、画像処理方法及び画像処理用プログラムを提供することである。   The present invention has been made as a solution to the above-mentioned problems in conventional image processing, and its purpose is to accurately move a moving object even when the camera moves and the background changes over time. An image processing apparatus, an image processing method, and an image processing program that can be detected are provided.

本発明に係る画像処理装置は、移動可能なカメラにより撮像された画像における1フレーム中のm×m(m:2以上の整数)画素を1ブロックとして、時間的に前後のフレームにおける対応する複数のブロックについてそれぞれの輝度データによる行列を前後のフレーム分作成する行列作成手段と、前記対応する行列を用いて共分散行列を生成する生成手段と、前記共分散行列から固有値及び固有ベクトルを求め、固有値及び固有ベクトルに基づき前後のフレームの対応する各ブロック間のユークリッド距離を求める演算手段と、求められたユークリッド距離に基づき閾値を算出する閾値算出手段と、ユークリッド距離と前記閾値との比較に基づき移動物体を検出する移動物体検出手段とを具備することを特徴とする。   The image processing apparatus according to the present invention uses m × m (m: integer greater than or equal to 2) pixels in one frame in an image captured by a movable camera as one block, and a plurality of corresponding pixels in temporally preceding and following frames. Matrix generating means for generating a matrix based on the respective luminance data for the preceding and subsequent frames, a generating means for generating a covariance matrix using the corresponding matrix, an eigenvalue and an eigenvector from the covariance matrix, and an eigenvalue And a calculating means for calculating a Euclidean distance between corresponding blocks of the preceding and following frames based on the eigenvector, a threshold calculating means for calculating a threshold based on the obtained Euclidean distance, and a moving object based on a comparison between the Euclidean distance and the threshold And a moving object detection means for detecting.

本発明に係る画像処理装置では、閾値算出手段は、求められたユークリッド距離を加算してブロック数にて除算して閾値を算出することを特徴とする。   In the image processing apparatus according to the present invention, the threshold value calculation means calculates the threshold value by adding the obtained Euclidean distance and dividing by the number of blocks.

本発明に係る画像処理装置では、閾値算出手段は、求められた全ブロックのユークリッド距離の中央値を演算して閾値を算出することを特徴とする。   In the image processing apparatus according to the present invention, the threshold value calculation means calculates a threshold value by calculating a median value of the obtained Euclidean distances of all blocks.

本発明に係る画像処理装置は、ユークリッド距離に基づき、カメラが移動しているか否かを検出するカメラ移動検出手段を備え、該カメラ移動検出手段がカメラの移動を検出した場合に、閾値算出手段が閾値を新たに算出し、移動物体検出手段がこの新たな閾値を用いて移動物体検出を行うことを特徴とする。   The image processing apparatus according to the present invention includes camera movement detection means for detecting whether or not the camera is moving based on the Euclidean distance, and when the camera movement detection means detects movement of the camera, threshold calculation means Calculates a new threshold value, and the moving object detection means detects the moving object using the new threshold value.

本発明に係る画像処理装置では、移動物体検出手段は、閾値から所定以上大きなユークリッド距離のブロックをラベリング処理して移動物体を検出することを特徴とする。   In the image processing apparatus according to the present invention, the moving object detecting means detects a moving object by labeling a block having a Euclidean distance larger than a threshold by a predetermined amount or more.

本発明に係る画像処理方法は、移動可能なカメラにより撮像された画像における1フレーム中のm×m(m:2以上の整数)画素を1ブロックとして、時間的に前後のフレームにおける対応する複数のブロックについてそれぞれの輝度データによる行列を前後のフレーム分作成する行列作成ステップと、前記対応する行列を用いて共分散行列を生成する生成ステップと、前記共分散行列から固有値及び固有ベクトルを求め、固有値及び固有ベクトルに基づき前後のフレームの対応する各ブロック間のユークリッド距離を求める演算ステップと、求められたユークリッド距離に基づき閾値を算出する閾値算出ステップと、ユークリッド距離と前記閾値との比較に基づき移動物体を検出する移動物体検出ステップとを具備することを特徴とする。   In the image processing method according to the present invention, m × m (m: integer greater than or equal to 2) pixels in one frame in an image captured by a movable camera is used as one block, and a plurality of corresponding pixels in the preceding and following frames in time. A matrix creating step for creating a matrix of each luminance data for the previous and subsequent frames, a generating step for generating a covariance matrix using the corresponding matrix, an eigenvalue and an eigenvector from the covariance matrix, and an eigenvalue And a calculation step for obtaining a Euclidean distance between corresponding blocks of the preceding and following frames based on the eigenvector, a threshold calculation step for calculating a threshold based on the obtained Euclidean distance, and a moving object based on a comparison between the Euclidean distance and the threshold And a moving object detection step for detecting.

本発明に係る画像処理方法では、閾値算出ステップは、求められたユークリッド距離を加算してブロック数にて除算して閾値を算出することを特徴とする。   In the image processing method according to the present invention, the threshold calculation step calculates the threshold by adding the obtained Euclidean distance and dividing by the number of blocks.

本発明に係る画像処理方法では、閾値算出ステップは、求められた全ブロックのユークリッド距離の中央値を演算して閾値を算出することを特徴とする。   In the image processing method according to the present invention, the threshold value calculating step calculates a threshold value by calculating a median value of the obtained Euclidean distances of all blocks.

本発明に係る画像処理方法では、ユークリッド距離に基づき、カメラが移動しているか否かを検出するカメラ移動検出ステップを備え、該カメラ移動検出ステップがカメラの移動を検出した場合に、閾値算出ステップが閾値を新たに算出し、移動物体検出ステップがこの新たな閾値を用いて移動物体検出を行うことを特徴とする。   The image processing method according to the present invention includes a camera movement detection step for detecting whether or not the camera is moving based on the Euclidean distance, and when the camera movement detection step detects the movement of the camera, a threshold calculation step Calculates a new threshold value, and the moving object detection step performs moving object detection using the new threshold value.

本発明に係る画像処理方法では、移動物体検出ステップは、閾値から所定以上大きなユークリッド距離のブロックをラベリング処理して移動物体を検出することを特徴とする。   In the image processing method according to the present invention, the moving object detection step is characterized in that a moving object is detected by performing a labeling process on a block having a Euclidean distance greater than a threshold by a predetermined amount or more.

本発明に係る画像処理用プログラムは、画像処理を行うコンピュータを、移動可能なカメラにより撮像された画像における1フレーム中のm×m(m:2以上の整数)画素を1ブロックとして、時間的に前後のフレームにおける対応する複数のブロックについてそれぞれの輝度データによる行列を前後のフレーム分作成する行列作成手段、前記対応する行列を用いて共分散行列を生成する生成手段、前記共分散行列から固有値及び固有ベクトルを求め、固有値及び固有ベクトルに基づき前後のフレームの対応する各ブロック間のユークリッド距離を求める演算手段、求められたユークリッド距離に基づき閾値を算出する閾値算出手段、ユークリッド距離と前記閾値との比較に基づき移動物体を検出する移動物体検出手段として機能させることを特徴とする。   An image processing program according to the present invention uses a computer that performs image processing as a block with m × m (m: integer greater than or equal to 2) pixels in one frame in an image captured by a movable camera. Matrix generating means for generating a matrix of luminance data for each of a plurality of corresponding blocks in the preceding and following frames for the preceding and following frames, generating means for generating a covariance matrix using the corresponding matrix, and eigenvalues from the covariance matrix And calculating means for obtaining eigenvectors, calculating euclidean distances between corresponding blocks of the preceding and following frames based on eigenvalues and eigenvectors, threshold calculating means for calculating a threshold based on the obtained Euclidean distance, and comparing Euclidean distance with the threshold Function as a moving object detection means to detect moving objects based on And features.

本発明に係る画像処理用プログラムでは、コンピュータを閾値算出手段として、求められたユークリッド距離を加算してブロック数にて除算して閾値を算出するように機能させることを特徴とする。   The image processing program according to the present invention is characterized in that a computer is used as a threshold value calculation means, and functions to calculate the threshold value by adding the obtained Euclidean distance and dividing by the number of blocks.

本発明に係る画像処理用プログラムでは、コンピュータを閾値算出手段として、求められた全ブロックのユークリッド距離の中央値を演算して閾値を算出するように機能させることを特徴とする。   The image processing program according to the present invention is characterized in that a computer serves as a threshold value calculation means to calculate a threshold value by calculating a median value of the obtained Euclidean distances of all blocks.

本発明に係る画像処理用プログラムでは、コンピュータをユークリッド距離に基づき、カメラが移動しているか否かを検出するカメラ移動検出手段として機能させると共に、前記コンピュータがカメラ移動検出手段して機能しカメラの移動を検出した場合に、前記コンピュータを、閾値算出手段として閾値を新たに算出するように機能させ、更にコンピュータを移動物体検出手段としてこの新たな閾値を用いて移動物体検出を行うように機能させることを特徴とする。   In the image processing program according to the present invention, the computer functions as a camera movement detection unit that detects whether the camera is moving based on the Euclidean distance, and the computer functions as a camera movement detection unit and functions as a camera. When the movement is detected, the computer is caused to function as a threshold value calculation unit so as to newly calculate a threshold value, and the computer is further functioned as a moving object detection unit so as to detect a moving object using the new threshold value. It is characterized by that.

本発明に係る画像処理用プログラムでは、前記コンピュータを移動物体検出手段として、閾値から所定以上大きなユークリッド距離のブロックをラベリング処理して移動物体を検出するように機能させることを特徴とする。   The image processing program according to the present invention is characterized in that the computer serves as a moving object detection means, and functions to detect a moving object by labeling a block having a predetermined Euclidean distance greater than a threshold value.

本発明によれば、移動可能なカメラにより撮像された画像における1フレーム中のm×m(m:2以上の整数)画素を1ブロックとして行列を作成して、前後のフレームの対応する各ブロック間のユークリッド距離を求め、求められたユークリッド距離に基づき閾値を算出し、ユークリッド距離と上記閾値との比較に基づき移動物体を検出するので、カメラ移動の度合いに応じて閾値が適宜変更されることから高精度に移動物体検出が可能である。   According to the present invention, a matrix is created with m × m (m: integer greater than or equal to 2) pixels in one frame in an image taken by a movable camera as one block, and each block corresponding to the preceding and following frames is created. Since the Euclidean distance is calculated, a threshold is calculated based on the obtained Euclidean distance, and a moving object is detected based on a comparison between the Euclidean distance and the above threshold, the threshold is appropriately changed according to the degree of camera movement. Therefore, it is possible to detect moving objects with high accuracy.

本発明によれば、1フレームのブロックのユークリッド距離の相加平均を得て閾値とし、または、求められた全ブロックのユークリッド距離の中央値を演算して閾値を算出することになり、カメラ移動の度合いに応じて適切な閾値を得ることができるので、周囲環境(周囲画像)の変化に応じた閾値を用いて高精度に移動物体検出が可能である。   According to the present invention, the arithmetic mean of the Euclidean distances of the blocks of one frame is obtained as a threshold value, or the threshold value is calculated by calculating the median value of the obtained Euclidean distances of all the blocks. Since an appropriate threshold value can be obtained according to the degree of the moving object, it is possible to detect a moving object with high accuracy using the threshold value according to a change in the surrounding environment (ambient image).

本発明によれば、ユークリッド距離に基づき、カメラが移動しているか否かを検出し、カメラの移動を検出した場合に、閾値を新たに算出し、この新たな閾値を用いて移動物体検出を行うので、カメラ移動の度合いに応じて適切な閾値を得ることができ、高精度に移動物体検出が可能である。   According to the present invention, based on the Euclidean distance, whether or not the camera is moving is detected, and when the movement of the camera is detected, a threshold value is newly calculated, and moving object detection is performed using this new threshold value. Therefore, an appropriate threshold value can be obtained according to the degree of camera movement, and a moving object can be detected with high accuracy.

本発明によれば、閾値から所定以上大きなユークリッド距離のブロックをラベリング処理して移動物体を検出するので、カメラが移動している場合にも静止している場合にも、移動物体を閾値から所定以上大きなユークリッド距離の領域として適切に捉え高精度に移動物体検出が可能である。   According to the present invention, since a moving object is detected by labeling a block having a Euclidean distance greater than a predetermined value from the threshold value, the moving object is determined from the threshold value regardless of whether the camera is moving or stationary. As described above, it is possible to detect the moving object with high accuracy by appropriately capturing the region as a large Euclidean distance.

本発明に係る画像処理装置の第1の実施形態を示す構成図。1 is a configuration diagram showing a first embodiment of an image processing apparatus according to the present invention. FIG. 本発明に係る画像処理装置の実施例によるブロック分けを説明するための図。The figure for demonstrating the block division by the Example of the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置の実施例による行列作成を説明するための図。The figure for demonstrating the matrix preparation by the Example of the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置の実施例による行列作成から共分散行列生成までの動作を説明するための図。The figure for demonstrating the operation | movement from the matrix preparation by the Example of the image processing apparatus which concerns on this invention to covariance matrix production | generation. 本発明に係る画像処理装置の実施例による共分散行列からユークリッド距離を求めるまでの動作を説明するための図。The figure for demonstrating operation | movement until it calculates | requires Euclidean distance from the covariance matrix by the Example of the image processing apparatus which concerns on this invention. 発明に係る画像処理装置の実施例により求められたユークリッド距離をマトリックス状に並べた状態を示す図。The figure which shows the state which arranged the Euclidean distance calculated | required by the Example of the image processing apparatus which concerns on invention in the matrix form. 発明に係る画像処理装置の実施例によるエッジ検出の動作を説明するための図。The figure for demonstrating the operation | movement of the edge detection by the Example of the image processing apparatus which concerns on invention. 発明に係る画像処理装置の実施例によるラベリングの動作を説明するための図。The figure for demonstrating the operation | movement of labeling by the Example of the image processing apparatus which concerns on invention. 発明に係る画像処理装置の第1の実施形態による画像処理の動作を説明するためのフローチャート。4 is a flowchart for explaining an image processing operation according to the first embodiment of the image processing apparatus according to the invention; 本発明に係る画像処理装置の第2の実施形態を示す構成図。The block diagram which shows 2nd Embodiment of the image processing apparatus which concerns on this invention. 発明に係る画像処理装置の第2の実施形態による画像処理の動作を説明するためのフローチャート。12 is a flowchart for explaining an image processing operation according to the second embodiment of the image processing apparatus according to the invention; 発明に係る画像処理装置の第2の実施形態による画像処理のカメラ移動判定動作を説明するためのフローチャート。9 is a flowchart for explaining a camera movement determination operation in image processing according to a second embodiment of the image processing apparatus according to the invention. 本発明に係る画像処理装置の第3の実施形態を示す構成図。The block diagram which shows 3rd Embodiment of the image processing apparatus which concerns on this invention. 発明に係る画像処理装置の第3の実施形態による画像処理の動作を説明するためのフローチャート。12 is a flowchart for explaining an image processing operation according to the third embodiment of the image processing apparatus according to the invention; 本発明に係る画像処理装置の第4の実施形態を示す構成図。The block diagram which shows 4th Embodiment of the image processing apparatus which concerns on this invention. 発明に係る画像処理装置の第4の実施形態による画像処理のカメラ移動判定動作を説明するための図。The figure for demonstrating the camera movement determination operation | movement of the image processing by 4th Embodiment of the image processing apparatus which concerns on invention. 発明に係る画像処理装置の実施例による、カメラ移動が検出された場合に行うラベリング処理の手法の説明図。Explanatory drawing of the method of the labeling process performed when the camera movement is detected by the Example of the image processing apparatus which concerns on invention. 発明に係る画像処理装置の第3の実施形態による閾値の更新のために行われる仮想画像の生成を示す概念図。The conceptual diagram which shows the production | generation of the virtual image performed for the update of the threshold value by 3rd Embodiment of the image processing apparatus which concerns on invention.

以下添付図面を用いて本発明に係る画像処理装置、画像処理方法及び画像処理用プログラムの実施例を説明する。各図において、同一の構成要素には同一の符号を付して重複する説明を省略する。図1に実施形態に係る画像処理装置の構成図を示す。この画像処理装置は、CPU10とメモリ(主メモリ及び外部記憶メモリ)11を有し、情報を表示するための表示部13がCPU10に接続されたコンピュータシステムにより構成されている。   Embodiments of an image processing apparatus, an image processing method, and an image processing program according to the present invention will be described below with reference to the accompanying drawings. In each figure, the same components are denoted by the same reference numerals, and redundant description is omitted. FIG. 1 shows a configuration diagram of an image processing apparatus according to the embodiment. The image processing apparatus includes a CPU 10 and a memory (main memory and external storage memory) 11, and is configured by a computer system in which a display unit 13 for displaying information is connected to the CPU 10.

メモリ11には、画像処理用プログラムが記憶されており、この画像処理用プログラムによりCPU10が行列作成手段21、生成手段22、演算手段23、閾値算出手段24及び移動物体検出手段25として機能する。   An image processing program is stored in the memory 11, and the CPU 10 functions as a matrix creation unit 21, a generation unit 22, a calculation unit 23, a threshold value calculation unit 24, and a moving object detection unit 25 by the image processing program.

行列作成手段21は、移動可能なカメラにより撮像された画像における1フレーム中のm×m(m:2以上の整数)画素を1ブロックとして、時間的に前後のフレームにおける対応する複数のブロックについてそれぞれの輝度データによる行列を前後のフレーム分作成するものである。上記画像信号は動画画像であり、カメラから送られたものでも、或いは記憶媒体に記憶されていたものでも良い。   The matrix creation means 21 sets m × m (m: integer greater than or equal to 2) pixels in one frame in an image captured by a movable camera as one block, and a plurality of corresponding blocks in temporally preceding and following frames. A matrix based on each luminance data is created for the previous and subsequent frames. The image signal is a moving image and may be sent from a camera or stored in a storage medium.

例えば、1フレームが320×240画素により構成される場合、図2に示すように5×5画素を1ブロックとすると、64×48ブロックに分けることになる。以下、1ブロックの画素構成を分割粒度という。上記では分割粒度が5×5画素であるが、分割粒度が10×10画素や分割粒度が2×2画素であっても良い。   For example, when one frame is composed of 320 × 240 pixels, if 5 × 5 pixels are taken as one block as shown in FIG. 2, it is divided into 64 × 48 blocks. Hereinafter, the pixel configuration of one block is referred to as division granularity. In the above description, the division granularity is 5 × 5 pixels, but the division granularity may be 10 × 10 pixels or the division granularity may be 2 × 2 pixels.

1フレームにおける全ブロックまたは間引いたブロックを行列の作成に使用する。分割粒度が5×5画素として間引く場合には例えば図3に示すように、第1フレームFrame1及び第2フレームFrame2においては、最左列から1列おきであって最上行から1行おきにサンプリングしたブロック(合計32×24)を用いる。第2フレームFrame2及び第3フレームFrame3においては、最左列の次列から1列おきであって最上行から1行おきにサンプリングしたブロック(合計32×24)を用いる。   All blocks or thinned blocks in one frame are used to create a matrix. When the division granularity is thinned out by 5 × 5 pixels, for example, as shown in FIG. 3, in the first frame Frame1 and the second frame Frame2, sampling is performed every other column from the leftmost column and every other row from the uppermost row. Blocks (total of 32 × 24) are used. In the second frame Frame2 and the third frame Frame3, blocks sampled every other column from the next column of the leftmost column and every other row from the uppermost row (32 × 24 in total) are used.

第3フレームFrame3及び第4フレームFrame4においては、最左列の次列から1列おきであって最上行の次行から1行おきにサンプリングしたブロック(合計32×24)を用いる。第4フレームFrame4及び第5フレームFrame5においては、最左列から1列おきであって最上行の次行から1行おきにサンプリングしたブロック(合計32×24)ブロックを用いる。以下、同様にサンプリングを行う。上記のようにインターレース方式でサンプリングすることによって、均等なサンプリングを行うことができる。   In the third frame Frame3 and the fourth frame Frame4, blocks sampled every other column from the next row of the leftmost column and every other row from the next row of the uppermost row (32 × 24 in total) are used. In the fourth frame Frame4 and the fifth frame Frame5, blocks (total 32 × 24) blocks sampled every other column from the leftmost column and every other row from the next row of the uppermost row are used. Thereafter, sampling is performed in the same manner. By sampling in the interlaced manner as described above, uniform sampling can be performed.

全ブロックを用いて行列を作成して処理する場合には、上記よりも高精度な処理を行うことができ、また、分割粒度を小さくすることにより精度を上げることができる。分割粒度を5×5画素として行列を作成する場合には、例えば、4ブロック毎に一つの行列を作成する。   When a matrix is created and processed using all blocks, processing with higher accuracy than the above can be performed, and accuracy can be improved by reducing the division granularity. When creating a matrix with a division granularity of 5 × 5 pixels, for example, one matrix is created for every four blocks.

図4に示すように、第1フレームFrame1の1〜4で示す4ブロックの画素の輝度情報を25行×4列の行列とする。つまり、1により示されるブロックにおける5×5=25画素の輝度情報が第1列に並べられ、2により示されるブロックにおける5×5=25画素の輝度情報が第2列に並べられ、3により示されるブロックにおける5×5=25画素の輝度情報が第3列に並べられ、4により示されるブロックにおける5×5=25画素の輝度情報が第4列に並べられて全体で4行とされた行列が図4の行列1である。   As shown in FIG. 4, the luminance information of the four blocks of pixels indicated by 1 to 4 in the first frame Frame1 is a 25 × 4 matrix. That is, the luminance information of 5 × 5 = 25 pixels in the block indicated by 1 is arranged in the first column, and the luminance information of 5 × 5 = 25 pixels in the block indicated by 2 is arranged in the second column. The luminance information of 5 × 5 = 25 pixels in the indicated block is arranged in the third column, and the luminance information of 5 × 5 = 25 pixels in the block indicated by 4 is arranged in the fourth column to form a total of four rows. The matrix is the matrix 1 in FIG.

同様に第2フレームFrame2の5〜8で示す4ブロックの画素の輝度情報を25行×4列の行列とする。即ち、5により示されるブロックにおける5×5=25画素の輝度情報が第1列に並べられ、6により示されるブロックにおける5×5=25画素の輝度情報が第2列に並べられ、7により示されるブロックにおける5×5=25画素の輝度情報が第3列に並べられ、8により示されるブロックにおける5×5=25画素の輝度情報が第4列に並べられて全体で4行とされた行列が図4の行列2である。以下、同様にして全ブロックについて行列を作成する。   Similarly, the luminance information of the pixels of the four blocks indicated by 5 to 8 in the second frame Frame2 is a 25 × 4 matrix. That is, luminance information of 5 × 5 = 25 pixels in the block indicated by 5 is arranged in the first column, luminance information of 5 × 5 = 25 pixels in the block indicated by 6 is arranged in the second column, and The luminance information of 5 × 5 = 25 pixels in the indicated block is arranged in the third column, and the luminance information of 5 × 5 = 25 pixels in the block indicated by 8 is arranged in the fourth column to form a total of four rows. The matrix is the matrix 2 in FIG. In the same manner, matrices are created for all blocks.

生成手段22は、上記行列作成手段21によって作成された行列における対応する行列を用いて共分散行列を生成する。図4におけるS11に示されるように、行列1と行列2とを並べた25行×8列の行列3を生成し、これの転置行列3を生成する(S12)。この転置行列3は、8行×25列である。更に、生成手段22は、図4におけるS13に示すように転置行列3と行列3との乗算を行い、S14に示す共分散行列を生成する。生成手段22は、以下同様に、前後するフレームの対応ブロックによって作成された行列から共分散行列を生成する。画面が縦長横長或いは正方形である場合において、一般的に、粒度をm×m(m:2以上の整数)として、1フレームをNブロックに分割すると、(2×N)×(2×N)の共分散行列が生成される。 The generation unit 22 generates a covariance matrix using a corresponding matrix in the matrix created by the matrix creation unit 21. As shown in S11 in FIG. 4, a matrix 3 of 25 rows × 8 columns in which the matrix 1 and the matrix 2 are arranged is generated, and a transposed matrix 3 T is generated (S12). The transposed matrix 3 T is 8 rows × 25 columns. Further, generating unit 22 performs multiplication of the transposed matrix 3 T and the matrix 3, as shown to step S13 in FIG. 4, to generate the covariance matrix shown in S14. Similarly, the generation unit 22 generates a covariance matrix from a matrix created by corresponding blocks of preceding and following frames. When the screen is vertically long or square, generally, when the granularity is m × m (m: integer of 2 or more) and one frame is divided into N blocks, (2 × N) × (2 × N) A covariance matrix is generated.

演算手段23は、上記共分散行列から固有値及び固有ベクトルを求め、固有値及び固有ベクトルに基づき前後のフレームの対応する各ブロック間のユークリッド距離を求めるものである。図5に示すように、まず共分散行列から既知の演算により固有値及び固有ベクトルを求める(S15)。求められた固有値をλ1 〜λ8 とし、固有ベクトルVを次の(式1)とする。 The computing means 23 obtains eigenvalues and eigenvectors from the covariance matrix and obtains Euclidean distances between corresponding blocks in the preceding and succeeding frames based on the eigenvalues and eigenvectors. As shown in FIG. 5, eigenvalues and eigenvectors are first obtained from the covariance matrix by a known calculation (S15). The obtained eigenvalues are set to λ 1 to λ 8 , and the eigenvector V is set to the following (formula 1).

次に演算手段23は、(式1)の固有ベクトルVと上記(行列3T )と(行列3)を用いて、((行列3)・V)T ・(行列3)を計算して特徴ベクトルを算出する。ここで算出される特徴ベクトルは、次に示す(式2)のように8行8列(一般的にはk行k列)であり、(式2)における行方向に並ぶ要素を集合して特徴ベクトルc1〜c8を得る。即ち、c1={c11,・・・,c81T 、c2={c12,・・・,c82T 、・・・、c8={c18,・・・,c88T を得る。なお、(式2)においては、行列3をQにより示している。 Next, the calculation means 23 calculates ((matrix 3) · V) T · (matrix 3) using the eigenvector V of (Equation 1) and the above (matrix 3 T ) and (matrix 3) to calculate the feature vector. Is calculated. The feature vector calculated here is 8 rows and 8 columns (generally k rows and k columns) as shown in (Expression 2) below, and the elements arranged in the row direction in (Expression 2) are collected. Feature vectors c1 to c8 are obtained. That, c1 = {c 11, ··· , c 81} T, c2 = {c 12, ···, c 82} T, ···, c8 = {c 18, ···, c 88} T Get. In (Expression 2), the matrix 3 is indicated by Q.

更に演算手段23は、特徴ベクトルc1〜c8の各要素間の距離を算出するものであり、本実施例では各要素間の距離をdmnとするとき、次の(式3)により、ユークリッド距離が求められる(図5のS16)。(式3)は、一般式であり、共分散行列が8行×8列である本例では、k=8である。   Further, the computing means 23 calculates the distance between each element of the feature vectors c1 to c8. In this embodiment, when the distance between each element is dmn, the Euclidean distance is calculated by the following (Equation 3). It is obtained (S16 in FIG. 5). (Expression 3) is a general expression, and in this example where the covariance matrix is 8 rows × 8 columns, k = 8.

演算手段23によって求められたユークリッド距離は、図5に示す距離行列Dのように、8行×8列であり、第1フレームFrame1の1〜4で示す4ブロックと第2フレームFrame2の5〜8で示す4ブロックにおいてそれぞれ対応するブロックについての距離は、右上側に斜めに並ぶD(1,5)、D(2,6)、D(3,7)、D(4,8)或いは、左下側に斜めに並ぶD(5,1)、D(6,2)、D(7,3)、D(8,4)に存在する。図5には、上記以外に第1フレームFrame1のブロック1と第2フレームFrame2のブロック8との距離D(8,1)の位置と、第2フレームFrame2のブロック6と第2フレームFrame2のブロック7との距離D(7,6)の位置についても示すことにより、距離行列Dの構成を説明している。   The Euclidean distance obtained by the calculation means 23 is 8 rows × 8 columns as shown in the distance matrix D shown in FIG. 5, and 4 blocks indicated by 1 to 4 of the first frame Frame1 and 5 of the second frame Frame2. The distances for the corresponding blocks in the four blocks indicated by 8 are D (1,5), D (2,6), D (3,7), D (4,8) or D (4,8) or It exists in D (5,1), D (6,2), D (7,3), and D (8,4) arranged diagonally on the lower left side. In FIG. 5, in addition to the above, the position of the distance D (8, 1) between the block 1 of the first frame Frame1 and the block 8 of the second frame Frame2, the block 6 of the second frame Frame2, and the block of the second frame Frame2 The structure of the distance matrix D is described by also showing the position of the distance D (7, 6) to 7.

演算手段23は、前後フレームにおける残りの対応するブロックについても同様の演算によりユークリッド距離を求める。ここでは、1フレームが320×240画素で、分割粒度を5×5画素としたので、全体では64×48=3072個のユークリッド距離が求められる。   The calculating means 23 calculates the Euclidean distance by the same calculation for the remaining corresponding blocks in the previous and subsequent frames. Here, since one frame is 320 × 240 pixels and the division granularity is 5 × 5 pixels, 64 × 48 = 3072 Euclidean distances are obtained as a whole.

図1における閾値算出手段24は、求められたユークリッド距離に基づき閾値を算出する。分割粒度を5×5画素とした場合、前後する1フレームにおいて対応するブロック間のユークリッド距離は64×48得られ、図6のマトリックスに並べることができる。これに対し、閾値算出手段24は、例えば全ユークリッド距離を加算してブロック数にて除算して平均を求めて閾値(平均閾値)とすることができる。或いは、上記平均閾値に対し適当な定数を用いて加減乗除等の少なくともいずれかによる演算を行って閾値としても良い。更に、閾値算出手段24は、求められた全ブロックのユークリッド距離の中央値を演算して閾値を算出するなど、適宜な演算により閾値を求めても良い。   The threshold value calculation means 24 in FIG. 1 calculates a threshold value based on the obtained Euclidean distance. When the division granularity is 5 × 5 pixels, the Euclidean distance between corresponding blocks in one frame before and after is obtained 64 × 48 and can be arranged in the matrix of FIG. On the other hand, for example, the threshold value calculation unit 24 can add all the Euclidean distances and divide by the number of blocks to obtain an average to obtain a threshold value (average threshold value). Or it is good also as a threshold value by calculating by at least any one of addition / subtraction / division / division etc. using a suitable constant with respect to the said average threshold value. Further, the threshold value calculation means 24 may calculate the threshold value by an appropriate calculation such as calculating the threshold value by calculating the median value of the obtained Euclidean distances of all blocks.

移動物体検出手段25は、ユークリッド距離と上記閾値との比較に基づき移動物体を検出する。例えばユークリッド距離と閾値との差、或いはユークリッド距離と閾値との比等を求めて、移動物体検出手段25は、この値に基づき、閾値から所定以上大きなユークリッド距離のブロックをラベリング処理して移動物体を検出する。即ち、上記「差」が「0」に近いブロック或いは、上記値である「比」が「1」に近いブロックは、移動物体を構成するブロックであると判定することができる。   The moving object detection means 25 detects a moving object based on the comparison between the Euclidean distance and the threshold value. For example, the difference between the Euclidean distance and the threshold value, or the ratio between the Euclidean distance and the threshold value, and the like are obtained. Is detected. That is, the block where the “difference” is close to “0” or the block whose “ratio” which is the value is close to “1” can be determined as a block constituting a moving object.

例えば、移動物体を構成するブロックに1を割り当て、移動物体以外のブロックに0を割り当て1フレームについて1と0のモザイクにより構成し、前後するフレームにおいて値が0から1にまたは1から0に変化しているブロックを検出するエッジ検出を行う。このエッジ検出の後、図7においてはハッチングが施されて示されているエッジとされたブロックが図7(a)のようにループしているか、図7(b)のようにループしていないかを検出し、ループしている場合に、ループのエリアに異なる番号を割り当てるラベリングを行う。   For example, 1 is assigned to a block that constitutes a moving object, 0 is assigned to a block other than the moving object, and a 1 and 0 mosaic is formed for one frame, and the value changes from 0 to 1 or 1 to 0 in the preceding and following frames. Edge detection is performed to detect a block that is being processed. After this edge detection, the blocks shown as hatched in FIG. 7 are looped as shown in FIG. 7 (a) or not looped as shown in FIG. 7 (b). If a loop is detected, labeling that assigns a different number to the loop area is performed.

ラベリングにより、例えば図8に示されるように移動物体A(番号1)と移動物体B(番号2)が1フレームに検出されている場合に、複数フレームにおいてはトラッキングを行う。この場合、各フレームにおいて全ブロックのユークリッド距離が求まっているため、移動物体検出手段25はこのユークリッド距離を用いて移動物体Aと移動物体Bのトラッキングを行う。   For example, when the moving object A (number 1) and the moving object B (number 2) are detected in one frame by labeling as shown in FIG. 8, tracking is performed in a plurality of frames. In this case, since the Euclidean distance of all the blocks is obtained in each frame, the moving object detection means 25 performs tracking of the moving object A and the moving object B using this Euclidean distance.

トラッキングの手法としては、例えば、前述の閾値を超えている領域の大きさを用いることや、ラベリングされた領域のユークリッド距離の平均や分布を用いる等して、各フレームにおいて移動物体Aと移動物体Bとを同定する。トラッキングした移動物体Aの領域に例えば赤い矩形による枠を表示し、トラッキングした移動物体Bの領域に例えば黒い矩形による枠を表示して、図1に示されている図1の表示部13に表示する。これにより、表示された映像を目視することにより移動物体Aを赤い矩形によって追跡することができ、また移動物体Bを黒い矩形によって追跡することができ、監視の場合に有効である。   As a tracking method, for example, the moving object A and the moving object are used in each frame by using the size of the area exceeding the above-described threshold or using the average or distribution of the Euclidean distance of the labeled area. B is identified. For example, a red rectangular frame is displayed in the tracked moving object A area, and a black rectangular frame is displayed in the tracked moving object B area, for example, and displayed on the display unit 13 of FIG. 1 shown in FIG. To do. Accordingly, the moving object A can be tracked by the red rectangle by visually observing the displayed video, and the moving object B can be tracked by the black rectangle, which is effective for monitoring.

図9は、画像処理用プログラムに対応するフローチャートである。このフローチャートにより図1に示されている各手段が実現されるので、このフローチャートに基づきCPU10による動作を説明する。画像処理装置が起動されてスタートとなると、画像信号の第i(当初i=1)フレームを取り込み(S21)、更に画像信号の第i+1フレームを取り込む(S22)。次に、CPU10は、第iフレームと第i+1フレームにおける対応するj個のブロックを取り込み、行列を作成する(S23)。これによって、1フロックの分割粒度を5×5画素とした場合には、図2に示される行列が作成される。   FIG. 9 is a flowchart corresponding to the image processing program. Since each means shown in FIG. 1 is realized by this flowchart, the operation of the CPU 10 will be described based on this flowchart. When the image processing apparatus is started and started, the i-th (initially i = 1) frame of the image signal is captured (S21), and the i + 1-th frame of the image signal is further captured (S22). Next, the CPU 10 takes in corresponding j blocks in the i-th frame and the i + 1-th frame and creates a matrix (S23). Accordingly, when the division granularity of 1 flock is 5 × 5 pixels, the matrix shown in FIG. 2 is created.

次に、CPU10は、上記行列を用いて固有値と固有ベクトルを求め、この固有値と固有ベクトルを用いて既に説明の通りの処理により共分散行列を生成する(S24)。この共分散行列は、図4に示されているようである。   Next, the CPU 10 obtains eigenvalues and eigenvectors using the above matrix, and generates a covariance matrix using the eigenvalues and eigenvectors as described above (S24). This covariance matrix is as shown in FIG.

ステップS24に続いて、共分散行列を用いて第iフレームと第i+1フレームにおける対応するブロック間のユークリッド距離を求める(S25)。求められるユークリッド距離は、図5に示すように8行×8列の距離行列Dである。   Subsequent to step S24, a Euclidean distance between corresponding blocks in the i-th frame and the i + 1-th frame is obtained using a covariance matrix (S25). The obtained Euclidean distance is a distance matrix D of 8 rows × 8 columns as shown in FIG.

ステップS25においてユークリッド距離が求められると、全対象ブロックの処理が終了したのかを検出し(S26)、NOとなると選択するブロックを更新して(S27)、ステップS23へ戻って処理を続ける。また、ステップS26において全対象ブロックの処理が終了したことが検出された場合には、全ユークリッド距離を加算して平均を求めて閾値(平均閾値)とする(S28)。   When the Euclidean distance is obtained in step S25, it is detected whether the processing of all target blocks has been completed (S26). If NO, the selected block is updated (S27), and the process returns to step S23 to continue the processing. If it is detected in step S26 that all the target blocks have been processed, all the Euclidean distances are added to obtain an average to obtain a threshold (average threshold) (S28).

ステップS28に続き、ユークリッド距離と上記閾値との比較に基づき移動物体を検出する(S29)と共に、移動物体の有無を検出する(S29A)。既に述べた通り、移動物体の検出手法としては例えばユークリッド距離と閾値との差を求める手法を採用することができ、求めた結果である「差」が「0」に近いブロック或いは、上記値である「比」が「1」に近いブロックは、移動物体を構成するブロックであると判定する。ステップS29に続いて移動物体の有無の判定が行われ(S29A)、移動物体があると検出された場合にはエッジ検出やラベリングの処理を行い、処理結果を反映させた画像作成が行われて(S30)、撮像により得られている画像表示のために出力され(S31)、次のフレームがあるか判定がなされ(S32)、次に処理すべきフレームがあればiを1インクリメントして(S33)ステップS22へ戻って処理を続ける。   Following step S28, a moving object is detected based on the comparison between the Euclidean distance and the threshold (S29), and the presence or absence of the moving object is detected (S29A). As already described, as a moving object detection method, for example, a method for obtaining the difference between the Euclidean distance and the threshold value can be adopted, and the obtained “difference” is a block close to “0” or the above value. A block whose “ratio” is close to “1” is determined to be a block constituting a moving object. Following step S29, the presence / absence of a moving object is determined (S29A). When it is detected that there is a moving object, edge detection and labeling are performed, and an image is created that reflects the processing result. (S30) is output for image display obtained by imaging (S31), and it is determined whether there is a next frame (S32). If there is a frame to be processed next, i is incremented by 1 ( S33) Returning to step S22, the processing is continued.

図10は、第2の実施形態に係る画像処理装置の構成を示すブロック図である。この実施形態では、第1の実施形態と比べてCPU10Aにカメラ移動検出手段26が追加された構成を有している。カメラ移動検出手段26は、ユークリッド距離に基づき、カメラが移動しているか否かを検出するものである。   FIG. 10 is a block diagram illustrating a configuration of an image processing apparatus according to the second embodiment. This embodiment has a configuration in which a camera movement detection means 26 is added to the CPU 10A as compared with the first embodiment. The camera movement detection means 26 detects whether or not the camera is moving based on the Euclidean distance.

即ち、図9に示した第1の実施形態のフローチャートにおけるステップS26とステップS28の間に、ステップS35〜S37による処理を行う図11に示すフローチャートによる動作が行われる。まず、ステップS26において全対象ブロックの処理が終了したことが検出された場合には、ステップS26までに得られている全ユークリッド距離を用いてカメラ移動を検出する(S35)。   That is, the operation according to the flowchart shown in FIG. 11 in which the processes in steps S35 to S37 are performed is performed between step S26 and step S28 in the flowchart of the first embodiment shown in FIG. First, when it is detected in step S26 that all the target blocks have been processed, camera movement is detected using all the Euclidean distances obtained up to step S26 (S35).

このステップS35に続いてカメラが移動しているか否かを判定する(S36)。上記ステップS36の判定においてカメラが移動していると検出された場合にはステップS28へ進み、第1の実施形態に示した処理が行われる。   Following this step S35, it is determined whether or not the camera is moving (S36). If it is detected in step S36 that the camera is moving, the process proceeds to step S28, and the process shown in the first embodiment is performed.

一方、上記ステップS36の判定においてカメラが静止している(移動していない)ことが検出された場合には、ユークリッド距離と既存の閾値との比較に基づき移動物体を検出する(S37)。このステップS37においては、用いる既存の閾値は、予め実験的に求めたものやステップS28が前回実行されたときに求めて記憶しておいたものが用いられる。この点を除いては移動物体の検出について、第1の実施形態と同様に行われる。そして、ステップS37における移動物体検出処理の後にはステップS29Aへ進み、更に処理が続けられる。   On the other hand, when it is detected in step S36 that the camera is stationary (not moving), a moving object is detected based on the comparison between the Euclidean distance and the existing threshold (S37). In this step S37, the existing threshold value used is experimentally obtained in advance or the value obtained and stored when step S28 was executed last time. Except for this point, the detection of the moving object is performed in the same manner as in the first embodiment. Then, after the moving object detection process in step S37, the process proceeds to step S29A, and the process is further continued.

上記ステップS35におけるカメラ移動の検出処理は、図12のフローチャートに示す通りである。ステップS35に進むまでには、全対象ブロックについてユークリッド距離の処理が終了しているので、対応ブロックのユークリッド距離と予め用意したカメラ移動判定用閾値を比較し、比較値を検出する(S41)。   The camera movement detection process in step S35 is as shown in the flowchart of FIG. Since the processing of the Euclidean distance has been completed for all the target blocks before proceeding to step S35, the Euclidean distance of the corresponding block is compared with the camera movement determination threshold prepared in advance, and a comparison value is detected (S41).

ステップS41に続き、上記検出された比較値に基づきが画像を撮像したカメラの移動を判定する(S42)。ここで、比較値としては例えばユークリッド距離とカメラ移動判定用閾値との差を採用することができ、比較値である「差」が「0」に近いブロック数が半数(所定割合)以上であるときカメラ移動中であると判定する。判定結果は次の処理や画像表示のために出力される(S43)。   Following step S41, the movement of the camera that captured the image is determined based on the detected comparison value (S42). Here, for example, the difference between the Euclidean distance and the camera movement determination threshold can be adopted as the comparison value, and the number of blocks in which the comparison value “difference” is close to “0” is more than half (predetermined ratio). It is determined that the camera is moving. The determination result is output for the next processing or image display (S43).

図13は、第3の実施形態に係る画像処理装置の構成を示すブロック図である。この実施形態では、第2の実施形態と比べてCPU10Bに対して仮想画像生成手段28と閾値更新手段29が追加された構成を有している。仮想画像生成手段28は、1フレームの原画像を所定方向にずらした仮想画像の1フレームを生成するものである。閾値更新手段29は、ユークリッド距離を用いてカメラ移動判定用閾値を更新するものである。移動物体検出に関しては、既に説明した図9及び図11に示したフローチャートのプログラムに基づき処理を行う。   FIG. 13 is a block diagram illustrating a configuration of an image processing apparatus according to the third embodiment. This embodiment has a configuration in which a virtual image generation unit 28 and a threshold update unit 29 are added to the CPU 10B as compared to the second embodiment. The virtual image generation means 28 generates one frame of a virtual image obtained by shifting one frame of the original image in a predetermined direction. The threshold update means 29 updates the camera movement determination threshold using the Euclidean distance. Regarding the moving object detection, processing is performed based on the program of the flowchart shown in FIGS.

この第3の実施形態では、図14のフローチャートに示す処理によりカメラ移動判定用閾値の更新を行う。例えば、フレーム数が所定値(ここでは5)の倍数となったかを検出し(S51)、5の倍数のフレームが到来すると、このフレームの原画像を図18に示すように例えば右方に5画素ずらし、また下方へ5画素ずらした1フレームの仮想画像を生成する(S52)。このとき空白となる画素領域E(ハッチングで示す)の画素には、白や黒或いはその中間色の輝度値を補充する。   In the third embodiment, the camera movement determination threshold is updated by the process shown in the flowchart of FIG. For example, it is detected whether the number of frames has become a multiple of a predetermined value (here, 5) (S51). When a frame having a multiple of 5 arrives, the original image of this frame is, for example, 5 to the right as shown in FIG. A virtual image of one frame shifted by 5 pixels and shifted downward by 5 pixels is generated (S52). At this time, pixels in the pixel area E (shown by hatching) that are blank are supplemented with luminance values of white, black, or an intermediate color thereof.

上記原画像の1フレームと仮想画像の1フレームとについて、図9のステップS23からステップS27までと同様にして、全ブロックについてユークリッド距離を求める(S23〜S27)。更に、上記で求めたユークリッド距離を用いてカメラ移動判定用閾値を作成して、次のフレームについてカメラ移動を検出するカメラ移動判定用閾値を更新する(S53)。ユークリッド距離を用いてカメラ移動判定用閾値を作成する場合、例えば全ユークリッド距離を加算して平均を求めて閾値(平均閾値)とすることができる。或いは、上記平均閾値に対し適当な定数を用いて加減乗除等の少なくともいずれかによる演算を行ってカメラ移動判定用閾値としても良い。   For one frame of the original image and one frame of the virtual image, the Euclidean distance is obtained for all blocks in the same manner as in steps S23 to S27 in FIG. 9 (S23 to S27). Further, a camera movement determination threshold value is created using the Euclidean distance obtained above, and the camera movement determination threshold value for detecting camera movement for the next frame is updated (S53). When the threshold for camera movement determination is created using the Euclidean distance, for example, all the Euclidean distances can be added to obtain an average to obtain a threshold (average threshold). Alternatively, a camera movement determination threshold value may be obtained by performing an arithmetic operation based on at least one of addition, subtraction, multiplication, and division using an appropriate constant with respect to the average threshold value.

上記のようにカメラ移動判定用閾値を変更するため、カメラ移動によって背景が変ってゆく場合に、これに追随してカメラ移動判定用閾値を更新することになる。このため、適切なカメラ移動判定用閾値により高精度な検出を行うことができる。   Since the camera movement determination threshold is changed as described above, when the background changes due to camera movement, the camera movement determination threshold is updated accordingly. For this reason, highly accurate detection can be performed with an appropriate camera movement determination threshold.

次に、第4の実施形態を説明する。この第4の実施形態に係る画像処理装置は、画面に大きな移動物体が現れた場合にカメラ移動であると誤検出することを防止する。即ち、第2の実施形態においては、1フレーム全体を対象として処理を行ったが、図15に示すように、CPU10Cに検出領域設定手段27が備えられており、前後の1フレームそれぞれの中に離れた複数の検出領域を設定する。   Next, a fourth embodiment will be described. The image processing apparatus according to the fourth embodiment prevents erroneous detection of camera movement when a large moving object appears on the screen. That is, in the second embodiment, processing is performed for the entire one frame. However, as shown in FIG. 15, the CPU 10C is provided with the detection area setting means 27, and each of the preceding and following frames is provided. A plurality of separated detection areas are set.

例えば、図16に示されるように第iフレームの画像における左右の端部に幅が10ブロック程度の短冊状の領域Ai、Biを設定する。次の第i+1フレームの画像における左右の端部にも上記と全く同様に、幅が10ブロック程度の短冊状の領域Ai+1、Bi+1を設定する。この設定領域について(Ai,Ai+1)の組合せと(Bi,Bi+1)の組合せにより、それぞれ図11に示した処理を行い、カメラ移動の検出を行う。検出結果は2通り得られるので、2つの結果がカメラ移動であることを示している場合のみ、カメラ移動とする。これにより、画面に大きな移動物体が現れた場合には、上記左右の領域が同時に移動物体で覆われることは少なく、誤検出を防止することができる。ここでは、左右の端部に検出領域を設けたが、上下の端部や画面の隅等を検出領域とすることもできる。また、検出領域の数は複数であれば良い。   For example, as shown in FIG. 16, strip-shaped areas Ai and Bi having a width of about 10 blocks are set at the left and right ends of the image of the i-th frame. In the same manner as described above, strip-like areas Ai + 1 and Bi + 1 having a width of about 10 blocks are set at the left and right ends of the next i + 1-th frame image. With respect to this set area, the processing shown in FIG. 11 is performed by the combination of (Ai, Ai + 1) and the combination of (Bi, Bi + 1) to detect camera movement. Since two detection results are obtained, only when the two results indicate that the camera is moved, the camera is moved. Thereby, when a large moving object appears on the screen, the left and right regions are rarely covered with the moving object at the same time, and erroneous detection can be prevented. Here, the detection areas are provided at the left and right edges, but the upper and lower edges, the corners of the screen, and the like may be used as the detection areas. The number of detection regions may be plural.

上記の第4の実施形態により処理を行う場合において、前述の第3の実施形態の如くカメラ移動判定用閾値を更新する場合は、仮想画像生成手段28は、上記検出領域それぞれについて仮想画像の生成を行い、閾値更新手段29は、上記検出領域それぞれについて閾値を得て更新を行うことになる。これにより、適切なカメラ移動判定用閾値により高精度な検出を行うことができる。   In the case of performing processing according to the above-described fourth embodiment, when the camera movement determination threshold is updated as in the above-described third embodiment, the virtual image generation unit 28 generates a virtual image for each of the detection regions. Then, the threshold update unit 29 obtains a threshold for each of the detection areas and updates it. Thereby, highly accurate detection can be performed with an appropriate camera movement determination threshold.

図17に、カメラ移動が検出された場合に行うラベリング処理の手法を示す。まず、移動物体を検出するための閾値(平均閾値等)を大きく超えるブロックを検出する。図17(a)では、P(s)により示されている。次に、このP(s)を囲む一辺が3ブロックのブロックに注目し、3ブロックの合計のユークリッド距離が移動物体を検出するための閾値(平均閾値等)の3倍を大きく超えるかにより移動物体の一部を構成するブロックを検出する。図17(b)では、(D1,D2,D3)、(D3,D6,D9)、(D9,D8,D7)、(D7,D4,D1)について検出を行う。移動物体の一部を構成するブロックを以下同様にして検出する。上記図17(b)のブロックが全て移動物体の一部を構成する場合には、図17(c)に示すように、一辺が4ブロックの領域について4ブロックの合計のユークリッド距離が移動物体を検出するための閾値(平均閾値等)の4倍を大きく超えるかにより移動物体の一部を構成するブロックを検出する。   FIG. 17 shows a labeling process performed when camera movement is detected. First, a block that greatly exceeds a threshold (such as an average threshold) for detecting a moving object is detected. In FIG. 17A, this is indicated by P (s). Next, pay attention to a block with one side surrounding P (s), and move depending on whether the total Euclidean distance of the three blocks greatly exceeds three times the threshold (average threshold, etc.) for detecting a moving object. A block constituting a part of the object is detected. In FIG. 17B, detection is performed for (D1, D2, D3), (D3, D6, D9), (D9, D8, D7), and (D7, D4, D1). Blocks constituting a part of the moving object are detected in the same manner. When all the blocks in FIG. 17B constitute a part of the moving object, as shown in FIG. 17C, the total Euclidean distance of the four blocks in the area having four blocks on one side is the moving object. A block that constitutes a part of the moving object is detected depending on whether it greatly exceeds four times the threshold for detection (average threshold or the like).

更に、図17(d)に示すように、一辺が7ブロックの領域について7ブロックの合計のユークリッド距離が移動物体を検出するための閾値(平均閾値等)の7倍を大きく超えるかにより移動物体の一部を構成するブロックを検出する。以下同様にして、移動物体の一部を構成するブロックによる矩形で囲われる領域を求めラベリングを行う。順次のフレームにおいてトラッキングを行い、トラッキングした移動物体の領域に例えば赤や黒など所定の色の矩形による枠を表示して移動物体を表示する。この手法により、適切に移動物体の一部を構成するブロックによる矩形で囲われる領域を求めることができ、移動物体の追跡表示に好適である。   Further, as shown in FIG. 17 (d), the moving object depends on whether the total Euclidean distance of 7 blocks in the area of 7 blocks on the side greatly exceeds 7 times the threshold value (average threshold value, etc.) for detecting the moving object. Detect blocks that form part of. In the same manner, a region surrounded by a rectangle by blocks constituting a part of the moving object is obtained and labeled. Tracking is performed in sequential frames, and a moving object is displayed by displaying a rectangular frame of a predetermined color such as red or black in the tracked moving object region. By this method, a region surrounded by a rectangle by blocks that constitute a part of the moving object can be obtained appropriately, which is suitable for tracking display of the moving object.

尚、上記図17の例では、N(整数)ブロックの合計のユークリッド距離が移動物体を検出するための閾値(平均閾値等)のN倍を大きく超えるかにより移動物体の一部を構成するブロックを検出することとしたが、Nブロックの場合にN倍としたのは一例であり、環境やユーザの要求などによって適宜変更され得ることは勿論である。   In the example of FIG. 17 above, blocks that constitute a part of the moving object depending on whether the total Euclidean distance of N (integer) blocks greatly exceeds N times a threshold (such as an average threshold) for detecting the moving object. However, in the case of N blocks, N times is an example, and it is needless to say that it can be appropriately changed depending on the environment, user requirements, and the like.

また、上記の実施形態では、各手段をソフトウエアによって実現したが、演算回路や論理回路のようなハードウエアの組み合わせによっても各手段を実現し、これにより画像処理装置を構成するようにしても良い。   In the above-described embodiment, each unit is realized by software. However, each unit is also realized by a combination of hardware such as an arithmetic circuit and a logic circuit, thereby configuring the image processing apparatus. good.

10、10A〜10C CPU
11 メモリ
13 表示部
21 行列作成手段
22 生成手段
23 演算手段
24 閾値算出手段
25 移動物体検出手段
26 カメラ移動検出手段
27 検出領域設定手段
28 仮想画像生成手段
29 閾値更新手段
10, 10A-10C CPU
DESCRIPTION OF SYMBOLS 11 Memory 13 Display part 21 Matrix preparation means 22 Generation means 23 Calculation means 24 Threshold calculation means 25 Moving object detection means 26 Camera movement detection means 27 Detection area setting means 28 Virtual image generation means 29 Threshold update means

Claims (15)

移動可能なカメラにより撮像された画像における1フレーム中のm×m(m:2以上の整数)画素を1ブロックとして、時間的に前後のフレームにおける対応する複数のブロックについてそれぞれの輝度データによる行列を前後のフレーム分作成する行列作成手段と、
前記対応する行列を用いて共分散行列を生成する生成手段と、
前記共分散行列から固有値及び固有ベクトルを求め、固有値及び固有ベクトルに基づき前後のフレームの対応する各ブロック間のユークリッド距離を求める演算手段と、
求められたユークリッド距離に基づき閾値を算出する閾値算出手段と、
ユークリッド距離と前記閾値との比較に基づき移動物体を検出する移動物体検出手段と
を具備することを特徴とする画像処理装置。
A matrix of luminance data for a plurality of corresponding blocks in temporally preceding and following frames, where m × m (m: integer greater than or equal to 2) pixels in one frame in an image captured by a movable camera is one block. Matrix creation means for creating a frame for the previous and next frames,
Generating means for generating a covariance matrix using the corresponding matrix;
Calculating means for obtaining eigenvalues and eigenvectors from the covariance matrix, and obtaining Euclidean distances between corresponding blocks of the preceding and following frames based on the eigenvalues and eigenvectors;
Threshold calculation means for calculating a threshold based on the obtained Euclidean distance;
An image processing apparatus comprising: a moving object detection unit that detects a moving object based on a comparison between the Euclidean distance and the threshold value.
閾値算出手段は、求められたユークリッド距離を加算してブロック数にて除算して閾値を算出することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the threshold value calculation unit calculates the threshold value by adding the obtained Euclidean distance and dividing the result by the number of blocks. 閾値算出手段は、求められた全ブロックのユークリッド距離の中央値を演算して閾値を算出することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the threshold value calculation unit calculates a threshold value by calculating a median value of the obtained Euclidean distances of all blocks. ユークリッド距離に基づき、カメラが移動しているか否かを検出するカメラ移動検出手段を備え、
該カメラ移動検出手段がカメラの移動を検出した場合に、閾値算出手段が閾値を新たに算出し、移動物体検出手段がこの新たな閾値を用いて移動物体検出を行うことを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。
Camera movement detection means for detecting whether the camera is moving based on the Euclidean distance,
The threshold calculation unit newly calculates a threshold when the camera movement detection unit detects a movement of the camera, and the moving object detection unit detects the moving object using the new threshold. The image processing apparatus according to any one of 1 to 3.
移動物体検出手段は、閾値から所定以上大きなユークリッド距離のブロックをラベリング処理して移動物体を検出することを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。   5. The image processing apparatus according to claim 1, wherein the moving object detection unit detects a moving object by performing a labeling process on a block having a Euclidean distance larger than a threshold by a predetermined amount or more. 移動可能なカメラにより撮像された画像における1フレーム中のm×m(m:2以上の整数)画素を1ブロックとして、時間的に前後のフレームにおける対応する複数のブロックについてそれぞれの輝度データによる行列を前後のフレーム分作成する行列作成ステップと、
前記対応する行列を用いて共分散行列を生成する生成ステップと、
前記共分散行列から固有値及び固有ベクトルを求め、固有値及び固有ベクトルに基づき前後のフレームの対応する各ブロック間のユークリッド距離を求める演算ステップと、
求められたユークリッド距離に基づき閾値を算出する閾値算出ステップと、
ユークリッド距離と前記閾値との比較に基づき移動物体を検出する移動物体検出ステップと
を具備することを特徴とする画像処理方法。
A matrix of luminance data for a plurality of corresponding blocks in temporally preceding and following frames, where m × m (m: integer greater than or equal to 2) pixels in one frame in an image captured by a movable camera is one block. Creating a matrix for the previous and next frames,
Generating a covariance matrix using the corresponding matrix;
An eigenvalue and an eigenvector are obtained from the covariance matrix, and an Euclidean distance between corresponding blocks of the preceding and succeeding frames based on the eigenvalue and eigenvector is calculated.
A threshold calculation step for calculating a threshold based on the obtained Euclidean distance;
A moving object detection step of detecting a moving object based on a comparison between a Euclidean distance and the threshold value.
閾値算出ステップは、求められたユークリッド距離を加算してブロック数にて除算して閾値を算出することを特徴とする請求項6に記載の画像処理方法。   The image processing method according to claim 6, wherein the threshold calculation step calculates the threshold by adding the obtained Euclidean distance and dividing by the number of blocks. 閾値算出ステップは、求められた全ブロックのユークリッド距離の中央値を演算して閾値を算出することを特徴とする請求項6に記載の画像処理方法。 The image processing method according to claim 6, wherein the threshold value calculating step calculates a threshold value by calculating a median value of the Euclidean distances of all the obtained blocks . ユークリッド距離に基づき、カメラが移動しているか否かを検出するカメラ移動検出ステップを備え、
該カメラ移動検出ステップがカメラの移動を検出した場合に、閾値算出ステップが閾値を新たに算出し、移動物体検出ステップがこの新たな閾値を用いて移動物体検出を行うことを特徴とする請求項6乃至8のいずれか1項に記載の画像処理方法。
A camera movement detection step for detecting whether the camera is moving based on the Euclidean distance;
The threshold calculation step newly calculates a threshold when the camera movement detection step detects a movement of the camera, and the moving object detection step detects the moving object using the new threshold. The image processing method according to any one of 6 to 8.
移動物体検出ステップは、閾値から所定以上大きなユークリッド距離のブロックをラベリング処理して移動物体を検出することを特徴とする請求項6乃至9のいずれか1項に記載の画像処理方法。   10. The image processing method according to claim 6, wherein the moving object detection step detects a moving object by labeling a block having a Euclidean distance larger than a threshold by a predetermined amount or more. 11. 画像処理を行うコンピュータを、
移動可能なカメラにより撮像された画像における1フレーム中のm×m(m:2以上の整数)画素を1ブロックとして、時間的に前後のフレームにおける対応する複数のブロックについてそれぞれの輝度データによる行列を前後のフレーム分作成する行列作成手段、
前記対応する行列を用いて共分散行列を生成する生成手段、
前記共分散行列から固有値及び固有ベクトルを求め、固有値及び固有ベクトルに基づき前後のフレームの対応する各ブロック間のユークリッド距離を求める演算手段、
求められたユークリッド距離に基づき閾値を算出する閾値算出手段、
ユークリッド距離と前記閾値との比較に基づき移動物体を検出する移動物体検出手段
として機能させることを特徴とする画像処理用プログラム。
A computer that performs image processing
A matrix of luminance data for a plurality of corresponding blocks in temporally preceding and following frames, where m × m (m: integer greater than or equal to 2) pixels in one frame in an image captured by a movable camera is one block. Matrix creation means to create the frame for the previous and next frames,
Generating means for generating a covariance matrix using the corresponding matrix;
An operation means for obtaining eigenvalues and eigenvectors from the covariance matrix and obtaining Euclidean distances between corresponding blocks of the preceding and succeeding frames based on the eigenvalues and eigenvectors,
Threshold calculation means for calculating a threshold based on the obtained Euclidean distance;
An image processing program that functions as a moving object detection unit that detects a moving object based on a comparison between a Euclidean distance and the threshold value.
コンピュータを閾値算出手段として、求められたユークリッド距離を加算してブロック数にて除算して閾値を算出するように機能させることを特徴とする請求項11に記載の画像処理用プログラム。   12. The image processing program according to claim 11, wherein the computer functions as a threshold value calculation means so as to calculate the threshold value by adding the obtained Euclidean distance and dividing by the number of blocks. コンピュータを閾値算出手段として、求められた全ブロックのユークリッド距離の中央値を演算して閾値を算出するように機能させることを特徴とする請求項11に記載の画像処理用プログラム12. The image processing program according to claim 11, wherein the computer functions as a threshold value calculation means to calculate a threshold value by calculating a median value of the obtained Euclidean distances of all blocks. コンピュータを
ユークリッド距離に基づき、カメラが移動しているか否かを検出するカメラ移動検出手段として機能させると共に、
前記コンピュータがカメラ移動検出手段として機能しカメラの移動を検出した場合に、前記コンピュータを、閾値算出手段として閾値を新たに算出するように機能させ、更にコンピュータを移動物体検出手段としてこの新たな閾値を用いて移動物体検出を行うように機能させることを特徴とする請求項11乃至13のいずれか1項に記載の画像処理用プログラム。
Based on the Euclidean distance, let the computer function as camera movement detection means that detects whether the camera is moving,
When the computer functions as a camera movement detection unit and detects the movement of the camera, the computer functions as a threshold value calculation unit so as to newly calculate a threshold value, and further uses the computer as a moving object detection unit. The image processing program according to any one of claims 11 to 13, wherein the image processing program is caused to function so as to detect a moving object.
前記コンピュータを移動物体検出手段として、閾値から所定以上大きなユークリッド距離のブロックをラベリング処理して移動物体を検出するように機能させることを特徴とする請求項11乃至14のいずれか1項に記載の画像処理用プログラム。   15. The function according to claim 11, wherein the computer serves as a moving object detection unit, and functions to detect a moving object by labeling a block having a Euclidean distance larger than a threshold by a predetermined amount or more. Image processing program.
JP2010016997A 2010-01-28 2010-01-28 Image processing apparatus, image processing method, and image processing program Expired - Fee Related JP5441737B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010016997A JP5441737B2 (en) 2010-01-28 2010-01-28 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010016997A JP5441737B2 (en) 2010-01-28 2010-01-28 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2011154634A JP2011154634A (en) 2011-08-11
JP5441737B2 true JP5441737B2 (en) 2014-03-12

Family

ID=44540529

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010016997A Expired - Fee Related JP5441737B2 (en) 2010-01-28 2010-01-28 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP5441737B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2525587A (en) * 2014-04-14 2015-11-04 Quantum Vision Technologies Ltd Monocular camera cognitive imaging system for a vehicle
WO2017077261A1 (en) 2015-11-05 2017-05-11 Quantum Vision Technologies Ltd A monocular camera cognitive imaging system for a vehicle
CN111862624B (en) * 2020-07-29 2022-05-03 浙江大华技术股份有限公司 Vehicle matching method and device, storage medium and electronic device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7720289B2 (en) * 2005-12-14 2010-05-18 Mitsubishi Electric Research Laboratories, Inc. Method for constructing covariance matrices from data features
JP5004743B2 (en) * 2007-10-10 2012-08-22 東芝情報システム株式会社 Data processing device

Also Published As

Publication number Publication date
JP2011154634A (en) 2011-08-11

Similar Documents

Publication Publication Date Title
EP3540637B1 (en) Neural network model training method, device and storage medium for image processing
JP6573361B2 (en) Image processing apparatus, image processing system, image processing method, and computer program
US8289402B2 (en) Image processing apparatus, image pickup apparatus and image processing method including image stabilization
US10412462B2 (en) Video frame rate conversion using streamed metadata
US9436981B2 (en) Dictionary creation device, image processing device, image processing system, dictionary creation method, image processing method, and program
JP2021506017A (en) Object detector and object detection method
US8098963B2 (en) Resolution conversion apparatus, method and program
JP2018170003A (en) Detection device and method for event in video, and image processor
US20110091074A1 (en) Moving object detection method and moving object detection apparatus
US10970807B2 (en) Information processing apparatus and storage medium
CN113362441A (en) Three-dimensional reconstruction method and device, computer equipment and storage medium
JP5441737B2 (en) Image processing apparatus, image processing method, and image processing program
KR20200096426A (en) Moving body detecting device, moving body detecting method, and moving body detecting program
JP2017130042A (en) Video processing apparatus, video processing method, and program
US9842260B2 (en) Image processing apparatus and image processing method of performing image segmentation
JP2019096222A (en) Image processor, method for processing image, and computer program
US9400929B2 (en) Object detection device and method for detecting an object by performing a raster scan on a scan window
US9392146B2 (en) Apparatus and method for extracting object
JP2008113292A (en) Motion estimation method and device, program thereof and recording medium thereof
JP2006215655A (en) Method, apparatus, program and program storage medium for detecting motion vector
JP2006215657A (en) Method, apparatus, program and program storage medium for detecting motion vector
JP5367601B2 (en) Image processing apparatus, image processing method, and image processing program
JP5455682B2 (en) Image processing apparatus, image processing method, and image processing program
CN117636078B (en) Target detection method, target detection system, computer equipment and storage medium
JP2012226403A (en) Image area tracking device, image area tracking method, and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121127

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130829

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130910

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131108

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131217

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131217

R150 Certificate of patent or registration of utility model

Ref document number: 5441737

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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