JP2009245172A - Counting device for moving object, and program - Google Patents
Counting device for moving object, and program Download PDFInfo
- Publication number
- JP2009245172A JP2009245172A JP2008091163A JP2008091163A JP2009245172A JP 2009245172 A JP2009245172 A JP 2009245172A JP 2008091163 A JP2008091163 A JP 2008091163A JP 2008091163 A JP2008091163 A JP 2008091163A JP 2009245172 A JP2009245172 A JP 2009245172A
- Authority
- JP
- Japan
- Prior art keywords
- moving body
- counting
- detection point
- detection
- data
- 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.)
- Pending
Links
Images
Landscapes
- Closed-Circuit Television Systems (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
Description
本発明は、移動体の計数対象領域を上方からカメラで撮影して、計数対象領域を所定方向に向かって通過する移動体を計数する移動体の計数装置及びプログラムに関する。 The present invention relates to a moving body counting apparatus and a program for photographing a counting target area of a moving body with a camera from above and counting the moving body passing through the counting target area in a predetermined direction.
従来、例えば店舗等の建物や特定の施設に入退出する人の数を把握するため、その出入り口や通路等の所定領域を通過する移動体を検出し、その通過数を計数することが行われている。また、このような計数装置として、計数対象領域を上方からカメラで撮影し、カメラの各撮影画像を画像処理して解析等し、計数対象領域を所定方向に通過する移動体を判別して計数する装置も知られている(特許文献1、2参照)。
Conventionally, in order to grasp the number of people entering and leaving a building or a specific facility such as a store, for example, a moving body passing through a predetermined area such as an entrance or a passage is detected and the number of passages is counted. ing. In addition, as such a counting device, a counting target area is photographed from above by a camera, each captured image of the camera is subjected to image processing, analysis, etc., and a moving object passing through the counting target area in a predetermined direction is discriminated and counted. An apparatus is also known (see
ところが、このようなカメラを使用した従来の計数装置では、カメラの性能に応じて、VGA(Video Graphics Array)の画像(640×480ドット)やQVGA(Quarter VGA)の画像(320×240ドット)等、比較的画素数の多い画像を使用し、その全体に対して画像処理や解析を行うのが一般的である。これに伴い、取得した画像も、複雑なアルゴリズムにより計算して解析する必要があり、移動体の計数に複雑かつ面倒な処理や計算を要する。その結果、従来の計数装置では、必要な計算量が非常に多くなり、処理負荷が増加する傾向があり、これに対処するためには、高性能なCPU(Central Processing Unit)等の演算処理装置と大容量のメモリとを必要とし、装置全体のコストが増加する、という問題が生じる。 However, in a conventional counting device using such a camera, a VGA (Video Graphics Array) image (640 × 480 dots) or a QVGA (Quarter VGA) image (320 × 240 dots) is used depending on the performance of the camera. In general, an image having a relatively large number of pixels is used, and image processing and analysis are performed on the entire image. Along with this, the acquired image also needs to be calculated and analyzed by a complicated algorithm, and complicated and troublesome processing and calculation are required for counting moving objects. As a result, in the conventional counting device, the amount of calculation required is very large and the processing load tends to increase. To cope with this, an arithmetic processing device such as a high-performance CPU (Central Processing Unit) And a large-capacity memory are required, which increases the cost of the entire apparatus.
本発明は、前記従来の問題に鑑みなされたものであって、その目的は、簡易な構成で計数対象領域を通過する移動体を計数できるようにし、移動体の計数時の計算量を減少させて処理負荷を軽減するとともに、計数装置のコストを低減させることである。 The present invention has been made in view of the above-described conventional problems, and an object of the present invention is to make it possible to count moving objects passing through the counting target area with a simple configuration, and to reduce the amount of calculation when counting moving objects. Thus, the processing load is reduced and the cost of the counting device is reduced.
本発明は、計数対象領域を上方からカメラで撮影して通過する移動体を計数する移動体の計数装置であって、計数対象領域の撮影画像に、移動体の通過方向と交差する方向に配列された複数の検出ポイントからなる移動体の検出ポイント列を、前記通過方向に沿って複数設定する設定手段と、計数対象領域の撮影画像から各検出ポイント列の検出ポイント毎に移動体を検出する検出手段と、複数の検出ポイント列の各検出ポイントでの移動体の検出結果に基づき、計数対象領域を通過する移動体の有無を判定する通過判定手段と、計数対象領域を前記通過方向に通過する移動体数をカウントするカウント手段と、を備えたことを特徴とする。
また、本発明は、コンピュータを請求項1ないし8のいずれかに記載された移動体の計数装置の各手段として機能させるためのプログラムである。
The present invention is a moving body counting device that counts a moving body that is photographed by a camera from above and that passes through the counting target area, and is arranged in a direction that intersects the passing direction of the moving body on a captured image of the counting target area A detecting unit for setting a plurality of detection point sequences of the moving body composed of a plurality of detection points along the passing direction, and detecting the moving body for each detection point of each detection point sequence from the captured image of the counting target region. Detection means, passage determination means for determining the presence or absence of a moving body that passes the counting target area based on the detection result of the moving body at each detection point of the plurality of detection point sequences, and passing the counting target area in the passing direction And a counting means for counting the number of moving bodies to be operated.
Further, the present invention is a program for causing a computer to function as each unit of the moving body counting device according to any one of
本発明によれば、簡易な構成で計数対象領域を通過する移動体を計数でき、移動体の計数時の計算量を減少させて処理負荷を軽減できるとともに、計数装置のコストを低減させることができる。 According to the present invention, it is possible to count moving bodies that pass through the counting target region with a simple configuration, reduce the calculation amount when counting moving bodies, reduce the processing load, and reduce the cost of the counting device. it can.
以下、本発明の一実施形態について、図面を参照して説明する。
本実施形態の移動体の計数装置(以下、計数装置という)は、計数対象領域を上方からカメラで撮影して通過する移動体の数を計数する装置であり、例えば店舗等の建物や施設のドア近傍や通路等に設置され、その領域を所定方向に通過する人等の移動体の計数に使用される。以下では、建物への出入り口であるドアの内側で、ドアを通って移動する移動体を計数する場合を例に採り説明する。その際、この計数装置では、低画素の画像を撮影するカメラを使用し、ドアを通って内外方向に移動して建物に入退出する移動体の数を通過方向毎に計数する。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
The moving body counting device (hereinafter referred to as a counting device) of the present embodiment is a device that counts the number of moving bodies that pass through the counting target region by photographing with a camera from above, for example, a building or facility such as a store. It is installed in the vicinity of a door, a passage, etc., and used for counting moving objects such as people passing through the area in a predetermined direction. Below, the case where the moving body which moves through a door is counted inside the door which is the doorway to a building is taken and demonstrated as an example. In this case, the counting device uses a camera that captures a low-pixel image, and counts the number of moving bodies that move in and out through the door and enter and leave the building for each passing direction.
図1は、本実施形態の計数装置の概略構成を示す模式図であり、建物90のドア91(例えばスライド式の自動ドア)の内側(計数対象領域R)への設置状態も、側方から見て模式的に示している。
この計数装置1は、図示のように、制御装置を兼ねる計数処理装置10と、計数処理装置10に接続されたカメラ2とを備え、計数処理装置10により、カメラ2による撮影画像から移動体T(ここでは人)を検出して、その通過数(図の矢印方向毎の数)を計数する。
FIG. 1 is a schematic diagram showing a schematic configuration of the counting device of the present embodiment, and the installation state of the
As shown in the figure, the
カメラ2は、建物90内の所定範囲に設定された計数対象領域Rの撮影手段(カメラモジュール)であり、建物90の通路の上方に下方に向けて設置され、計数対象領域Rの全体を、その上を移動する移動体Tとともに上方から撮影する。ここでは、計数対象領域Rは、ドア91の付近で建物90の通路を横断して略矩形状をなすように設定されており、カメラ2は、計数対象領域Rの中央部上方に、かつ光軸を略垂直方向下側に向けた状態で、建物90の天井部に取り付けられている。また、カメラ2は、市販のデジタルカメラ、デジタルビデオカメラ、又はCMOS(Complementary Metal Oxide Semiconductor)イメージセンサ等からなり、計数処理装置10により制御されて、計数対象領域Rの画像を連続して、又は所定の間隔やタイミングで撮影し、撮影画像を計数処理装置10に出力する。
The
なお、この計数装置1では、比較的低画素(ここでは横40×縦30ドット)のカラー画像を撮影するカメラ2を使用し、これにより、計数対象領域Rや移動体Tを撮影してカラー画像を出力する。その際、カメラ2は、撮影素子上に結像した画像を電気信号に変換してA/D変換し、内蔵の画像信号処理回路により各種補正の処理等を行って、撮影画像の画像データを計数処理装置10に出力する。
The counting
計数処理装置10は、中央演算処理装置(CPU)11と、各種の制御や計数処理のための手順をCPU11に実行させるプログラム等を格納するROM(Read Only Memory)12と、CPUの処理用データやプログラム等を一時的に格納するRAM(Random Access Memory)13を備えた、例えばコンピュータから構成されている。また、計数処理装置10は、設定用ディップスイッチ等からなる設定入力部と、カメラ2等が接続される入出力ポートを有する入出力部(それぞれ図示せず)とを有し、接続された各装置との間で各種データや制御信号を送受信する。これにより、計数処理装置10は、所定のプログラムや予め設定された条件等に基づいて、カメラ2を制御して撮影させ、かつ取得した撮影画像を画像処理や解析し、以下説明する移動体Tの計数のための各処理を実行する。
The
図2は、この計数処理装置10の概略構成を示す機能ブロック図である。
計数処理装置10は、図示のように、装置全体の制御や計数処理を制御する制御部14や、カメラ2による撮影画像から取得したデータや処理中のデータ等の各種データを記憶する記憶部15に加えて、設定部16、カウント部17、及び画像処理部(解析部)20を備えている。また、計数処理装置10は、上記した設定入力部18及び、カメラ2や計数結果の出力先が接続された入出力部19を備え、これら各部(手段)14〜20を、バスK等を介して互いに接続している。
FIG. 2 is a functional block diagram showing a schematic configuration of the
As shown in the figure, the
設定入力部18は、カメラ2の設置条件や計数処理装置10の処理条件等の設定に使用され、ユーザから入力された内容を、制御部14へ出力し、又は記憶部15に記憶させる。この設定入力部18からは、例えばカメラ2の設置高さや撮影条件が入力されて設定され、その情報から、制御部14が、予め設定された条件に基づき、後述する設定部16による設定内容を含む、移動体Tの検出や計数処理に関する各種条件を設定する。
The
設定部16は、入出力部19を介してカメラ2から取得した撮影画像に対し、移動体Tを検出するための特定の検出ポイント(抽出点)を設定する手段であり、その画像内で計数処理に使用する画素の位置を、各条件等に応じて複数設定する。計数処理装置10は、各撮影画像から、この設定部16により設定された移動体Tの検出ポイントのデータを抽出し、そのデータを使用して移動体Tの検出や計数処理を実行する。
The
図3は、この設定部16による検出ポイントの設定について説明するための模式図であり、図3Aはカメラ2による計数対象領域Rの撮影画像Gの例を示している。また、図3Aでは、上下方向が移動体Tの通過方向(図1参照)であり、その方向(図3A右側の2つの矢印参照)に沿って、移動体Tは撮影画像G(計数対象領域R)内を移動する。
FIG. 3 is a schematic diagram for explaining setting of detection points by the
設定部16は、図3Aに示すように、カメラ2から取得する計数対象領域Rの撮影画像Gに、移動体Tの通過方向と交差する方向に、複数(図では左右方向に5つ)の検出ポイントP(図では、それぞれ矩形で示す)を互いに離間して配列させ、これら複数の検出ポイントPからなる移動体Tの検出ポイント列を設定する。併せて、この検出ポイント列を、移動体Tの通過方向(図では上下方向)に沿って、互いに離間して複数設定(図に示すA列、B列、C列)して、撮影画像Gの全体に亘って、検出ポイントPを互いに離間した状態で略均等に設定する。
As shown in FIG. 3A, the
この設定時に、本実施形態では、複数の検出ポイントPを、移動体Tの通過方向及び、それに直行する方向に沿って、それぞれ略等間隔で整列させて配置する。また、各検出ポイントPを、1つの移動体Tのみが検出される大きさ、例えば、それぞれ縦横1〜数ピクセル(ここでは1〜2ピクセル)となるように、かつ、撮影画像Gのサイズやドット数等に応じて、移動体Tの検出漏れがない所定ドット間隔(ここでは縦横6ドット程度の間隔)で配置する。その際、この計数装置1では、各検出ポイント列で、隣り合う検出ポイントP同士を大人の肩幅に合わせて配置し、大人一人が1つの検出ポイントP、又は隣り合う2つの検出ポイントPで検出されるようにしている。また、設定部16により、移動体Tの通過方向に沿って順に配置された第1、第2、第3検出ポイント列(例えば、図3で通過方向が下方向のときには、それぞれA列、B列、C列に対応)を少なくとも設定(ここでは、これら3列のみ設定)する。計数処理装置10は、これら各列の各検出ポイントPでの移動体Tの検出結果やその変化等に基づき、移動体Tの移動(通過)方向の判別や、通過する移動体Tの有無を判定等する。
At the time of this setting, in the present embodiment, the plurality of detection points P are arranged at substantially equal intervals along the passing direction of the moving body T and the direction orthogonal thereto. Further, each detection point P has a size such that only one moving body T is detected, for example, 1 to several pixels in length and width (here, 1 to 2 pixels in this case), and the size of the captured image G Depending on the number of dots and the like, they are arranged at a predetermined dot interval (here, an interval of about 6 dots in length and width) that does not cause detection of the moving body T. At this time, in this
このようにして、計数処理装置10は、設定部16により、撮影画像Gに、それぞれ5つの検出ポイントPからなる3列(A列、B列、C列)の検出ポイント列を設定し、各検出ポイントPのデータを抽出(図3B参照)して画像処理部20により処理する。
なお、図3Bは、検出ポイントPのみを抽出した状態(画像)を模式的に示しており、以下では、主に、これと同様のブロック状の図を用いて、移動体Tの計数処理等について説明する。また、各検出ポイント列を特に区別するときには、それぞれA列、B列、C列(図3Bの左側参照)とのみ表し、それらの5つの各検出ポイントPは、左から順に1〜5の番号(図3Bの上側参照)を付して区別し、例えばA列では左から順にA列1、A列2、A列3、A列4、A列5(B列、C列も同様)と表す。更に、以下では、A列からC列へ向かう方向をダウン方向、その逆方向をアップ方向として説明する。
In this way, the
Note that FIG. 3B schematically shows a state (image) in which only the detection point P is extracted. In the following, mainly using the same block diagram, the counting process of the moving object T, etc. Will be described. Further, when particularly distinguishing each detection point column, it is represented only as column A, column B, and column C (see the left side in FIG. 3B), and these five detection points P are
画像処理部20(図2参照)は、これら各検出ポイントPの画像データを、撮影画像Gから取得して画像処理や解析処理を行う手段であり、検出部21、数判定部22及び、比較部24と移動体判別部25とを有する通過判定部23から構成されている。
The image processing unit 20 (see FIG. 2) is means for acquiring image data of each detection point P from the captured image G and performing image processing and analysis processing. The
検出部21は、計数対象領域Rの撮影画像Gから、各検出ポイント列の検出ポイントP毎に移動体Tを検出する手段であり、例えばカメラ2が連続して撮影するフレーム画像の各検出ポイントP同士を比較し、そのフレーム間差分を算出して検出ポイントP毎に画像変化を抽出する。この結果から、検出部21は、各差分量を所定の閾値と比較する等して、各検出ポイントPの位置に移動体Tがあるか否かを判断し、検出ポイント列の各検出ポイントPで移動体Tを検出する。
The
数判定部22は、これら各検出ポイント列の複数の検出ポイントPでの各検出結果に基づき、移動体Tを検出した検出ポイントPの数や、それらの位置関係等から、その検出ポイント列で検出した移動体の数を判定する。その際、ここでは、予め設定された数変換テーブルを使用し、テーブルと移動体Tを検出した検出ポイントPとを対応させて検出した移動体Tの数を判定する。
Based on the detection results at the plurality of detection points P of each detection point sequence, the
図4は、この数変換テーブルの一部を示す模式図であり、各段に、検出ポイント列の各検出ポイントP(図3Bの検出ポイント1〜5に対応)での検出結果と、その結果に対応する移動体Tの数を示す。また、図4では、移動体Tを検出した検出ポイントPは1で、非検出の検出ポイントPは0でそれぞれ示している。
図5は、数判定部22による判定について説明するための模式図であり、それぞれ図3Aと同様の計数対象領域Rの撮影画像Gと、その撮影画像Gにおける各検出ポイントPでの移動体Tの検出結果とを横に並べて、4つの例を示している。また、図5では、移動体Tの検出結果を図3Bと同様のブロック状の図で示し、その中で移動体Tを検出した検出ポイントPには1を表記する。一方、撮影画像Gには、各移動体Tを楕円形で模式的に示し、その移動方向を矢印で併記する。
FIG. 4 is a schematic diagram showing a part of this number conversion table. In each stage, detection results at detection points P (corresponding to
FIG. 5 is a schematic diagram for explaining the determination by the
本実施形態では、図4に示すように、移動体Tの検出が無い状態(図5A参照)に対し、各検出ポイント列内で、1つ又は隣接する2つの検出ポイントPで移動体Tを検出したときには(図5B、図5D参照)、移動体Tの数を1とする。また、それらが1以上の検出ポイントPを挟んで、2及び3箇所に現れたときには(図5C参照)、それぞれ移動体Tの数を2及び3と判定する。これに対し、連続する3つ又は4つの検出ポイントPで移動体Tを検出したときには2と、5つ全てで検出したときには3と、各々移動体Tの数を判定し、これらを組み合わせて、その検出ポイント列で検出した移動体Tの数を判定する。画像処理部20は、数判定部22により、このように設定された数変換テーブルに基づき、複数の検出ポイントPでの検出結果を変換することで、移動体Tの数を判定する。
In the present embodiment, as shown in FIG. 4, with respect to the state where the moving body T is not detected (see FIG. 5A), the moving body T is moved at one or two adjacent detection points P in each detection point row. When it is detected (see FIGS. 5B and 5D), the number of moving bodies T is set to 1. Further, when they appear at two and three positions with one or more detection points P interposed therebetween (see FIG. 5C), the numbers of the moving bodies T are determined to be 2 and 3, respectively. On the other hand, when the moving body T is detected at three or four consecutive detection points P, the number of the moving bodies T is determined as 2 when detected at all 5 and 3 when detected at all five, and these are combined, The number of moving bodies T detected in the detection point sequence is determined. The
通過判定部23(図2参照)は、複数の検出ポイント列の各検出ポイントPでの移動体Tの検出結果に基づき、例えば全ての又は一部の検出ポイント列同士を比較し、或いは取得する撮影画像G間の検出位置の変化等から、計数対象領域Rを通過する移動体Tの有無を判定する。この判定時に、通過判定部23は、現在のフレームや、それよりも前のフレームの撮影画像Gに対する移動体Tの検出結果を取得し、比較部24により、予め設定された条件に応じて、検出ポイント列間の移動体Tを検出した検出ポイントPの位置(図3Bの1〜5)を比較する。また、通過判定部23は、この位置の比較結果に基づき、移動体判別部25により、例えば所定の検出ポイント列同士の比較結果を互いに対比する等して、計数対象領域Rを、上記したダウン方向又はアップ方向のいずれかの通過方向へ移動する移動体Tを判別する。この判別結果に基づいて、通過判定部23は、計数対象領域Rを両方向に通過する移動体Tの有無をそれぞれ判定する。
The passage determination unit 23 (see FIG. 2) compares or acquires, for example, all or some of the detection point sequences based on the detection result of the moving body T at each detection point P of the plurality of detection point sequences. The presence or absence of the moving body T that passes through the counting target region R is determined from the change in the detection position between the captured images G or the like. At the time of this determination, the
その際、通過判定部23は、検出ポイント列間の移動体Tを検出した検出ポイントPの各通過方向に沿う位置の変化に基づき、移動体判別部25により、それぞれの通過方向に移動する移動体Tを判別し、移動体Tが計数対象領域Rを通過したか否かを判定する。ただし、ここでは、計数対象領域R内で斜行や蛇行等する移動体Tを把握して、通過したか否かを確実に判定するため、各検出ポイント列間の対応する位置の検出ポイントPに加えて、その1つ隣りの両側の検出ポイントPも併せて比較して移動体Tを判別する。
At that time, the
また、この計数装置1では、通過判定部23は、上記した移動体Tの通過方向上流側に位置する第1検出ポイント列と、通過方向下流側に位置する第3検出ポイント列(それぞれA列又はC列)の、それぞれの検出ポイントP毎の移動体Tの検出結果に基づき、各検出ポイント列で新たに検出した移動体Tを各々把握する。これにより、それぞれ、計数対象領域Rに入った移動体Tの位置や数、及び計数対象領域R外へ向かって移動する移動体Tの位置や数をそれぞれ判別する。更に、通過判定部23は、この第3検出ポイント列と、通過方向の中間に位置する第2検出ポイント列(B列)の移動体Tを検出した検出ポイントP同士の位置や数等を比較し、各通過方向へ移動する移動体Tを判別するとともに、これら各判別結果を比較する。通過判定部23は、第3検出ポイント列での判別により、計数対象領域R外へ向かう移動体Tを検出したときに、判定処理を実行して上記した各判別結果を比較し、その比較結果に基づき、計数対象領域Rを通過する移動体Tの有無や通過方向を判定する。
Further, in the
計数処理装置10は、このようにして、移動体Tの通過等を判定し、その判定結果に基づいて、カウント部17により、計数対象領域Rを各通過方向に通過する移動体Tの数(通過数)を、通過する度に順次カウントして計数する。その際、カウント部17は、計数対象領域Rを互いに逆方向に通過する移動体Tをそれぞれカウントし、通過方向毎に移動体Tを計数する。また、この計数処理装置10は、後述するように、制御部14により検出ポイントP毎の検出結果を監視し、予め設定された数(フレーム)の撮影画像Gで、連続して全ての検出ポイントPで移動体Tが検出されないことを条件に、通過判定部23で使用中の判定に関する変動データをクリアする。これにより、通過判定部23をリセットして、そのデータ等を判定処理開始時の初期状態に戻し、判定を新たに開始させて、通過する移動体Tの有無の判定を再開させる処理を行う。
In this way, the
ここで、本実施形態では、各検出ポイント列の検出結果に関するデータを1バイト(8ビット)で処理し、5つの検出ポイントP(図3参照)のデータを、それぞれ1バイト中の各ビットに対応させてデータ処理する。また、3列の検出ポイント列(A列、B列、C列)のデータ等をレジスタに保持し、それらを比較する等して、上記した通過判定部23の処理を含む計数処理を実行する。
Here, in the present embodiment, data relating to the detection result of each detection point sequence is processed in 1 byte (8 bits), and data of 5 detection points P (see FIG. 3) is converted into each bit in 1 byte. Data is processed correspondingly. In addition, the data of the three detection point columns (A column, B column, C column) is held in a register and compared, and the counting process including the process of the
図6は、このデータ処理について説明するための模式図であり、図3Bに対応する3列(3×5)のデータの例をブロックで示している。
本実施形態では、図示のように、A列、B列、C列毎に8ビット中の5ビット(図の実線で示す部分)を使用し、それ以外の3ビット(図の破線で示す部分)は0で固定してデータを処理する。このように、検出ポイント列の各検出ポイントPのデータを1ビットで表し、移動体Tを検出した検出ポイントPに対応するビットは1に、他のビットは0にする等してビット演算する。以下、検出ポイントPの移動体Tの検出に関するデータ(0又は1)を、このように各ビットに割り当てて行う、上記した画像処理部20等による処理例について具体的に説明するが、以下の各図では使用する5ビットの部分のみ示し、他の3ビットは省略する。また、各図では、移動体Tを検出したビット(データが1になるビット)には斜線でハッチングを付し、空白の他のビット(データが0になるビット)と区別する。
FIG. 6 is a schematic diagram for explaining the data processing, and shows an example of data in three columns (3 × 5) corresponding to FIG. 3B.
In this embodiment, as shown in the figure, 5 bits (portion indicated by a solid line in the figure) of 8 bits are used for each of the A column, the B column, and the C column, and the other 3 bits (portion indicated by a broken line in the drawing). ) Is fixed at 0 to process data. In this way, the data of each detection point P in the detection point sequence is represented by 1 bit, and the bit operation is performed by setting the bit corresponding to the detection point P that detected the moving body T to 1 and the other bits to 0. . Hereinafter, a specific example of processing by the above-described
図7は、検出ポイント列で移動体Tを検出したときの処理について説明するための模式図であり、図7Aは現フレームの撮影画像Gから、図7Bは前フレームの撮影画像Gから、それぞれ取得した移動体Tの検出結果を示している。
画像処理部20(通過判定部23)は、図示のように、現在の所定の検出ポイント列(ここでは、A列とC列)を監視し、各検出ポイント列での移動体Tの検出に関するデータ(以下、検出データという)と、それぞれ対応する過去の同一検出ポイント列の検出データとから、その検出ポイント列で移動体Tを検出した検出ポイントPの変化や、検出位置等を把握するためのデータを演算処理して算出及び記憶する。
FIG. 7 is a schematic diagram for explaining processing when the moving object T is detected in the detection point sequence. FIG. 7A is from the captured image G of the current frame, and FIG. 7B is from the captured image G of the previous frame. The detection result of the acquired moving body T is shown.
As shown in the figure, the image processing unit 20 (passage determination unit 23) monitors a current predetermined detection point sequence (here, A column and C column) and relates to detection of the moving object T at each detection point sequence. From the data (hereinafter referred to as detection data) and the corresponding detection data of the same detection point sequence in the past, in order to grasp the change of the detection point P where the moving body T is detected in the detection point sequence, the detection position, etc. Is calculated and stored.
その際、ここでは、まず、検出ポイント列の現在と過去(前)の検出データ(以下、それぞれ現データ、前データという)との間で排他的論理和(以下、XORと記す)を演算する。続いて、演算後のデータと現データとの論理積(以下、ANDと記す)を演算((現データ XOR 前データ) AND 現データ)して、前データと比べて、現データの検出ポイント列で、移動体Tを新たに検出して変化した検出ポイントPに関するデータ(以下、変化データという)を算出する。次に、この変化データから、各検出ポイント列に入った移動体Tに関するイン(In)データ(以下、インデータという)を、検出ポイント列毎に演算して記憶する。このインデータは、変化データの演算時に、インデータが無いときには演算した変化データであり、過去にインデータがあるときには、そのインデータと演算した変化データの論理和(以下、ORと記す)を演算(インデータ OR 変化データ)して算出される。 In this case, first, an exclusive OR (hereinafter referred to as XOR) is calculated between the present and previous (previous) detection data (hereinafter referred to as current data and previous data, respectively) in the detection point sequence. . Subsequently, a logical product (hereinafter referred to as AND) of the calculated data and the current data is calculated ((current data XOR previous data) AND current data), and compared to the previous data, the detection point sequence of the current data Then, the data (hereinafter referred to as change data) relating to the detection point P that has been changed by newly detecting the moving body T is calculated. Next, in (in) data (hereinafter referred to as in-data) relating to the moving body T that has entered each detection point sequence is calculated and stored for each detection point sequence from the change data. This in-data is the change data calculated when there is no in-data when calculating the change data. When there is in-data in the past, the in-data is the logical sum (hereinafter referred to as OR) of the calculated change data. Calculated by calculation (in-data OR change data).
具体的には、A列の変化データとインデータ(以下、それぞれA列変化データ、A列インデータという)は、現データ(10100)と前データ(00000)とから(10100)となる。これに対し、C列の変化データとインデータ(以下、それぞれC列変化データ、C列インデータという)は、現データ(00100)と前データ(00000)とから(00100)となる。 Specifically, the change data and in data of the A column (hereinafter referred to as A column change data and A column in data, respectively) are (10100) from the current data (10100) and the previous data (00000). On the other hand, change data and in data of the C column (hereinafter referred to as C column change data and C column in data, respectively) are (00100) from the current data (00100) and the previous data (00000).
また、図8は、各検出ポイント列間やインデータの検出ポイントPの比較処理について説明するための模式図であり、移動体TがA列からC列に向かってダウン方向に移動するときの例を示している。
ここでは、画像処理部20は、C列(図8A参照)の検出ポイントP(C列3)で新たに移動体Tを検出して変化が生じたときに、このC列の上記したC列変化データ(変化した検出ポイントP)と過去のB列(前データ)とを比較して、B列からC列へ移動した移動体Tの有無を判別する。その際、B列(前データ)の同一位置の検出ポイントP(B列3)(図8B参照)で移動体Tを検出していたときには、B列からC列に移動した移動体Tがあると判定する。また、上記したように、B列(前データ)において、1つ隣の検出ポイントP(B列2又はB列4)(図8C、D参照)で移動体Tを検出していたときにも、B列からC列に移動体Tが斜行等して移動したと判定する。一方、それら以外の離れた位置の検出ポイントP(例えばB列1)(図8E参照)で移動体Tを検出していたときには、B列からC列に移動した移動体Tは無いと判定する。
FIG. 8 is a schematic diagram for explaining the comparison process between the detection point rows and the in-data detection point P. When the moving body T moves from the A row toward the C row in the down direction, FIG. An example is shown.
Here, the
その後、画像処理部20は、B列からC列に移動した移動体Tがあると判定したときには、その移動体Tに関する移動データ(図8Aと同じデータ)と、A列インデータ(図示せず)とを同様に比較し、対応する検出ポイントP(A列2、A列3、A列4)で移動体Tを検出していたときに、A列からC列に移動した移動体Tがあると判定する。このようにして、計数対象領域Rを通過する移動体Tの有無を判定し、移動データと数変換テーブル(図4参照)から、ダウン方向に通過する移動体Tの数を判定する。また、この数を、A列インデータと数変換テーブルから判定した計数対象領域R内に入った移動体Tの数と比較し、それ以下のときには通過数としてカウントし、それよりも多いときには、検出ミスとして、A列インデータから判定した数を通過数としてカウントする。更に、画像処理部20は、カウント処理中である(通過数のカウントを既に行った)か否かを示すフラグ(以下、カウントフラグという)をオン(ON)する処理や、A列インデータから、カウント済みの移動体Tに対応する位置の検出ポイントPを、その移動体Tは既に通過したとしてクリアする処理を併せて実行する。
Thereafter, when the
以上のように、計数装置1は、計数処理装置10により計数に関する各処理を実行する各手段を構成し、所定のプログラムや条件等に基づき、計数処理装置10により制御や処理して、カメラ2から順次取得する計数対象領域Rの撮影画像Gから、後述する移動体Tの通過数の計数処理を実行する。また、計数処理装置10は、移動体Tが以上と逆方向、即ち、C列からA列に向かってアップ方向(図3B参照)に移動するときには、以上の演算処理を、A列とC列に関する各データを入れ替えて同様に行い、それぞれ通過数を順次カウントして、両方向に通過する移動体Tの数を各々計数する。
As described above, the
次に、この計数装置1による移動体Tの計数処理について詳細に説明する。
図9は、計数装置1による計数処理手順の一部を示すフローチャートであり、A列からC列に向かってダウン方向に通過する移動体Tの計数処理の流れを示している。一方、図10は、計数処理の具体例を、図6〜図8と同様にブロックで示す模式図であり、順次撮影した撮影画像G(フレーム画像)からの各データを、上から下に向かって順に示している。また、図10では、左から順に、A〜C列の検出データ、A列変化データ(上段)とA列インデータ(下段)、及びC列変化データ(上段)とC列インデータ(下段)を、撮影画像G毎に示している。
Next, the counting process of the moving body T by the
FIG. 9 is a flowchart showing a part of the counting process procedure by the
計数処理時に、本実施形態では、図9に示すように、A列の検出データから計数対象領域R内に入ってくる移動体Tを監視するため、計数処理装置10により、上記したA列変化データとA列インデータを、既に説明した各演算式により順次算出し、レジスタ等に記憶する(S101)。図10に示す例では、2フレーム目(図10B)のA列3で初めに移動体Tを検出し、次に、4フレーム目(図10D)のA列2で新たに移動体Tを検出して7フレーム目(図10G)まで維持され、それに合わせてA列変化データとA列インデータが変化(図10A〜図10G参照)する。
In the present embodiment, in the present embodiment, as shown in FIG. 9, in order to monitor the moving body T that enters the counting target region R from the detection data of the A column, the above-described A column change is performed by the
また、計数装置1は、A列、B列、C列の全てで移動体Tの検出が無いか否かを判別し(S102)、移動体Tを検出したときには(S102、NO)、B列とC列で検出データに変化があるか否かを、それぞれ現データと1つ前のフレームの前データとを比較して判別する(S103)。その結果、少なくとも一方の列で変化がある(現データ≠前データ)ときには(S103、YES)、以上の処理と併せて順次演算したC列変化データから、C列で増加があるか否かを判別する(S104)。図10に示す例では、B列は、7フレーム目(図10G)で移動体Tを検出してB列2、B列3が変化し、C列は、10フレーム目(図10J)のC列2で移動体Tを検出し、その位置のC列変化データとC列インデータも変化してC列で増加が生じる。
Further, the
このように、C列が変化したときには(S104、YES)、計数装置1は、移動体TのB列からC列への移動があるか否かを判別する(S105)。この判別は、上記(図8参照)したように、現在のC列変化データと、過去のB列の検出データ(B列前データ)とを比較し、ここでは、B列前データの移動体Tの検出位置又は、その両側位置のいずれかと、C列変化データの変化位置が一致するときに、移動体Tが移動したと判別する。具体的には、B列前データと、その移動体Tの検出位置を1つ隣りにそれぞれシフトさせた2つの前データとの論理和(OR)を演算し、その結果とC列変化データとの論理積(AND)を演算(C列変化データ AND (B列前データ OR B列前データ>>1 OR B列前データ<<1))する。その演算結果(以下、移動データという)が0でないときに移動ありと判別する(S105、YES)。図10に示す例では、10フレーム目(図10J)のC列変化データと、9フレーム目(図10I)のB列の検出データとを比較し、B列の算出位置(B列1、B列2、B列3、B列4)にC列の変化位置(C列2)が含まれるので、移動データが0にならず移動体Tありと判別される。
Thus, when the C column has changed (S104, YES), the
続いて、この移動データと現在のA列インデータとを同様に比較(図8参照)して演算(移動データ AND (A列インデータ OR A列インデータ>>1 OR A列インデータ<<1))し、A列インデータに対応する検出があるか否かを判別する(S106)。その結果、対応する検出があるときには(S106、YES)、計数対象領域Rをダウン方向に移動して通過する移動体Tがあると判定し、そのカウント処理を開始する(S107)。図10に示す例では、移動データの検出位置(C列2)と、A列インデータ(図10J)の算出位置(A列1、A列2、A列3、A列4)とを比較し、A列インデータに対応する位置の検出があるため、通過する移動体Tありと判定されてカウント処理が開始される。
Subsequently, the movement data is compared with the current A column in data in the same manner (see FIG. 8) and operated (movement data AND (A column in data OR A column in data >> 1 OR A column in data << 1)), and it is determined whether or not there is a detection corresponding to the A column in-data (S106). As a result, when there is a corresponding detection (S106, YES), it is determined that there is a moving body T that moves through the counting target region R in the down direction, and the counting process is started (S107). In the example shown in FIG. 10, the detection position of the movement data (C column 2) and the calculation position (A
図11は、計数装置1によるカウント処理の手順を示すフローチャートである。
カウント処理では、図示のように、まず、上記したカウントフラグがオフ(OFF)か否かを確認して(S201)、初めてのカウントでオフのときには(S201、YES)、A列インデータから、数変換テーブル(図4参照)をサーチして、通過予定の移動体Tの数(以下、数Aという)を判定する(S202)。次に、移動データから、同様に数変換テーブルをサーチして、通過する移動体Tの数(以下、数Bという)を判定し(S203)、それらを比較する(S204)。その結果、数Bが数Aよりも大きい(数B>数A)ときには(S204、YES)、移動データから判定した数Bは採用せずに、A列インデータから判定した数Aをカウントする(S205)。一方、数Bが数A以下(数B≦数A)のときには(S204、NO)、移動データから判定した数Bをカウントする(S206)。図10に示す例では、移動データ(図10J参照)から判定した数Bは1であるのに対し、A列インデータから判定した数Aも1であり、数Bの1がカウントされる。
FIG. 11 is a flowchart showing the procedure of the counting process performed by the
In the count process, as shown in the figure, first, it is confirmed whether or not the count flag is off (OFF) (S201). When the count is off for the first time (S201, YES), The number conversion table (see FIG. 4) is searched to determine the number of moving bodies T scheduled to pass (hereinafter referred to as number A) (S202). Next, the number conversion table is similarly searched from the movement data to determine the number of moving bodies T (hereinafter referred to as number B) that pass through (S203), and these are compared (S204). As a result, when the number B is larger than the number A (number B> number A) (S204, YES), the number A determined from the in-column A data is counted without adopting the number B determined from the moving data. (S205). On the other hand, when the number B is equal to or less than the number A (number B ≦ number A) (S204, NO), the number B determined from the movement data is counted (S206). In the example shown in FIG. 10, the number B determined from the movement data (see FIG. 10J) is 1, whereas the number A determined from the A column in data is also 1, and 1 of the number B is counted.
次に、計数装置1は、カウントフラグをオンにして(S207)、カウントした移動体Tの数(累計)(以下、カウント数という)と、その際のカウント処理した移動データ(以下、カウントデータという)を保存する(S208)。また、A列インデータの、カウントした移動体Tに対応する位置のデータをクリアして0にし(S209)、続いて、アップ方向に移動する移動体Tの計数処理へ進む(S210)。ここでは、このクリアの処理を、移動データの補数(NOT)とA列インデータとの論理積(AND)を演算(A列インデータ AND (NOT 移動データ))して行い、その結果を新たなA列インデータとして以後使用する。図10に示す例では、クリア前のA列インデータ(図10J)から、移動データに対応する位置のA列2がクリアされて、A列3のみが検出位置である新たなA列インデータ(図10K)が演算される。
Next, the
これに対し、カウントフラグがオンであり、続けてカウントを行うときには(S201、NO)、まず、上記と同様に数変換テーブルをサーチして、A列インデータから数Aを判定する(S211)。また、今回の移動データと、前回のカウント時に保存(S208)したカウントデータの論理和(移動データ OR カウントデータ)から、新たなカウントデータを演算し、このカウントデータからも数(以下、数Cという)を判定する(S212)。次に、数Cと現在のカウント数とを比較し(S213)、数Cがカウント数以下(数C≦カウント数)のときには(S213、NO)、新たなカウントは行わずにS208へ進む。一方、数Cがカウント数よりも大きい(数C>カウント数)ときには(S213、YES)、数Cからカウント数を引いて差分を算出し(S214)、この差分と数Aを比較する(S215)。その結果、この差分が数Aよりも大きい(差分>数A)ときには(S215、YES)、差分を採用せずにA列インデータから判定した数Aをカウントし(S216)、差分が数A以下(差分≦数A)のときには(S215、NO)、差分を新たにカウントする(S217)。その後、S208に進んで、上記と同様に各ステップを実行してアップ方向の計数処理へ進む(S208〜S210)。 On the other hand, when the count flag is on and counting is continued (S201, NO), first, the number conversion table is searched in the same manner as described above, and the number A is determined from the A column in-data (S211). . In addition, new count data is calculated from the logical sum of the current movement data and the count data stored at the previous count (S208) (movement data OR count data). (S212). Next, the number C is compared with the current count number (S213). When the number C is equal to or less than the count number (number C ≦ count number) (S213, NO), the process proceeds to S208 without performing a new count. On the other hand, when the number C is larger than the count number (number C> count number) (S213, YES), a difference is calculated by subtracting the count number from the number C (S214), and the difference is compared with the number A (S215). ). As a result, when the difference is larger than the number A (difference> number A) (S215, YES), the number A determined from the A column in-data without using the difference is counted (S216). Below (difference ≦ number A) (S215, NO), the difference is newly counted (S217). Thereafter, the process proceeds to S208, and the respective steps are executed in the same manner as described above to proceed to the counting process in the up direction (S208 to S210).
図12は、このようにカウントフラグがオンのときの計数処理の例を、図10と同様にブロックで示す模式図である。
ここでは、図示のように、まず、1フレーム目(図12A)のA列3、A列4で初めに移動体Tを検出し、次に、2フレーム目(図12B)のA列1で新たに、かつ離れた位置に移動体Tを検出して、それらが6フレーム目(図12F)で全て消滅する。その間、A列変化データとA列インデータは、上記と同様に順次演算され、移動体Tの検出位置の変化に合わせて変化する(図12A〜図12F参照)。また、B列では、A列に入った移動体Tがダウン方向へ移動するのに伴い、3フレーム目(図12C)で初めて移動体Tを検出(B列4)した後、その検出位置が次第に増加する(図12C〜図12G参照)。
FIG. 12 is a schematic diagram showing an example of the counting process when the count flag is turned on as shown in FIG.
Here, as shown in the figure, first, the moving body T is detected first in the
一方、C列では、8フレーム目(図12H)で初めて移動体Tを検出(C列3)し、同位置のC列変化データとC列インデータも変化する。この変化を受けて、計数装置1は、上記と同様に移動体Tの計数処理を行い、移動体Tの数を判定する。ここでは、前フレームのB列(図12G)に、C列での検出位置C列3に対応する位置の検出(B列3)があり、かつA列インデータ(図12H)にも対応する検出(A列3)があるため、カウントフラグがオフのときのカウント処理が開始(S202)する。その際、A列インデータから判定される数Aが2であるのに対し、C列の移動データから判定される数Bは1であるため、より小さい数Bの1がカウントされて、カウントフラグもオンになる。また、A列インデータの、カウントした移動体Tに対応する位置(A列3)のデータがクリア(図12I)されてなくなる。
On the other hand, in the C column, the moving body T is detected for the first time in the eighth frame (FIG. 12H) (C column 3), and the C column change data and C column in data at the same position also change. In response to this change, the
続いて、11フレーム目(図12K)におけるC列での新たな移動体Tの検出(C列1)に伴い、同様に移動体Tの計数処理が行われ、上記したカウントフラグがオンのときのカウント処理が開始(S211)する。その際、ここでは、今回の移動データ(C列1)と前回保存したカウントデータ(C列3)とをOR処理した新たなカウントデータ(C列1、C列3)から、数Cは2と判定される。この数Cは、既にカウントしたカウント数の1よりも大きく、かつ、その差分1が、A列インデータから判定される数Aの2よりも小さいため、差分1が新たにカウントされてカウント数が2になる。その後は、A列インデータのクリアや、カウント数と新たなカウントデータの保存等、上記と同様の各処理が実行される。
Subsequently, when the new moving body T is detected in the C row in the 11th frame (FIG. 12K) (C row 1), the counting process of the moving body T is performed in the same manner, and the count flag is on. Count processing starts (S211). At this time, here, the number C is 2 from the new count data (
なお、本実施形態では、A列〜C列(図9参照)の全てで移動体Tの検出が無いときに(S102、YES)、この検出無しの状態が3フレーム連続した場合には、カウントフラグをクリアしてオフにするとともに、保存したカウントデータ等の所定のデータをクリアして(S108)、アップ方向の計数処理へ進む(S109)。これにより、それまでの条件をクリアして初期状態に戻し、次に移動体Tを検出したときに、新たに検出処理を再開する。また、上記した各ステップ(S103、S104、S105、S106)で、それぞれNOと判定されたときには、アップ方向の計数処理へ進み(S109)、各検出ポイント列での同一の検出データに基づき、アップ方向に通過する移動体Tの判定やカウント処理を行う。 In the present embodiment, when there is no detection of the moving object T in all of the columns A to C (see FIG. 9) (S102, YES), the counting is performed when this non-detection state continues for three frames. The flag is cleared and turned off, and predetermined data such as stored count data is cleared (S108), and the process proceeds to the counting process in the up direction (S109). Thereby, the conditions up to that time are cleared and returned to the initial state, and when the moving object T is next detected, the detection process is newly resumed. If it is determined NO in each of the above steps (S103, S104, S105, S106), the process proceeds to the counting process in the up direction (S109), and based on the same detection data in each detection point sequence The moving body T passing in the direction is determined and counted.
ただし、C列で増加がないと判定されたときには(S104、NO)、その前に移動体Tをカウントしたときに比べて、B列、C列で検出位置が減少したか否かを判定する(S110)。この判定は、カウント処理時に保存(S208)したカウントデータ及び、現在のB列、C列の検出データ(B列現データ、C列現データ)に基づき、カウントデータと、B列現データとC列現データの論理和(OR)との論理積(AND)を演算(カウントデータ AND (B列現データ OR C列現データ))して判定する。その結果、演算結果がカウントデータと一致しない(演算結果≠カウントデータ)ときには、B列、C列で減少が生じたと判定して(S110、YES)、カウントフラグやカウントデータ等を上記と同様にクリア(S111)してから、アップ方向の計数処理へ進む(S109)。一方、減少がないとき(演算結果=カウントデータ)には(S110、NO)、アップ方向の計数処理へ進み(S109)、C列からA列に向かって移動(図3B参照)して通過する移動体Tの計数処理を行う。 However, when it is determined that there is no increase in the C column (S104, NO), it is determined whether or not the detection position is decreased in the B column and the C column, compared to when the moving object T is counted before that. (S110). This determination is based on the count data saved at the time of the count processing (S208) and the detection data (B column current data, C column current data) of the current B column and C column. A logical product (AND) with the logical sum (OR) of the column current data is calculated (count data AND (B column current data OR C column current data)) and determined. As a result, if the calculation result does not match the count data (calculation result ≠ count data), it is determined that a decrease has occurred in the B and C columns (S110, YES), and the count flag, count data, etc. are set in the same manner as described above. After clearing (S111), the process proceeds to the counting process in the up direction (S109). On the other hand, when there is no decrease (calculation result = count data) (S110, NO), the process proceeds to the counting process in the up direction (S109), moves from the C column toward the A column (see FIG. 3B) and passes. The counting process of the moving body T is performed.
図13、図14は、この計数装置1によるアップ方向の計数処理手順の一部を示すフローチャートであり、図13はカウント処理前の手順を、図14はカウント処理の手順を、それぞれ示している。
このアップ方向の計数処理は、既に説明したダウン方向の処理(図9、図11参照)に対し、A列とC列に関する各データを入れ替えて同様の処理や演算により順次実行され、その後、再びダウン方向の処理へ進む。従って、これら図13、図14では、図9、図11の各ステップに対応するステップには、その末尾に「’」を付して例えばS101’、S201’等と示し、その説明は省略する。
FIGS. 13 and 14 are flowcharts showing a part of the counting process procedure in the up direction by the
The counting process in the up direction is sequentially executed by the same process or calculation by replacing each data related to the A column and the C column with respect to the down direction process (see FIGS. 9 and 11) described above, and then again. Proceed to processing in the down direction. Accordingly, in FIGS. 13 and 14, steps corresponding to the steps in FIGS. 9 and 11 are denoted by “′” at the end thereof, for example,
以上説明したように、本実施形態の計数装置1では、計数対象領域Rの撮影画像Gに、複数の検出ポイント列(検出ポイントP)を設定し、それらにより移動体Tを検出して、ビット演算により、移動体Tの通過の有無を判定して通過数をカウントする。そのため、画素数が少ない撮影画像Gでも充分正確に移動体Tの通過を判定してカウントでき、低画素の画像を撮影するカメラ2が使用可能で、かつ簡易に計数処理を行うことができる。また、撮影画像Gの全体を画像処理する必要がなく、その一部のみを使用して計数処理を行うため、そのアルゴリズムも比較的簡単になり、移動体Tの計数に要する計算量も減少して、処理負荷を軽減することもできる。これに伴い、処理速度が遅い低価格のCPUを使用でき、必要なメモリの容量も少なくてすむため、装置全体のコストを低減できる。
As described above, in the
また、移動体Tを検出した検出ポイントPの位置を検出ポイント列間で比較して、互いの対応する位置の検出ポイントPでの検出の有無等から移動する移動体Tを判別するため、移動体Tの移動方向や計数対象領域Rの通過を、正確、確実に判別して、その通過数のカウントを精度よく行うことができる。更に、この計数装置1では、所定の検出ポイント列間の移動体Tを検出した検出ポイントPを相互に比較し、対応する位置の検出ポイントPや両隣の検出ポイントPとの比較結果等から、その移動体Tの通過方向に沿う位置の変化を把握する。このようにして得た検出ポイント列間の位置の変化に基づき、通過方向に移動する移動体Tを判別するため、その判別精度を、比較的簡単な処理で効果的に高めることができる。併せて、検出ポイント列の各検出結果に基づき、その検出ポイント列で検出した移動体Tの数を判定して取得するため、移動体Tの通過数のカウントも正確に行うことができる。その際、ここでは、数変換テーブル(図4参照)を使用して、移動体Tの数を判定するため、その判定処理を容易に行うことができる。
Further, the position of the detection point P at which the moving body T is detected is compared between the detection point sequences, and the moving body T is determined based on the presence or absence of detection at the detection point P at the corresponding position. The movement direction of the body T and the passage of the counting target region R can be accurately and reliably discriminated, and the number of passages can be accurately counted. Furthermore, in this
従って、本実施形態によれば、簡易な構成で計数対象領域Rを通過する移動体Tを精度よく計数でき、移動体Tの計数時の計算量を減少させて処理負荷を軽減できるとともに、計数装置1のコストを低減させることができる。また、この計数装置1では、計数対象領域Rを互いに逆方向に通過する移動体Tをそれぞれカウントするため、両方向の通過数を把握でき、計数装置1の利便性を確保することができる。その際、ここでは、両方向のカウントを、それぞれ同様に検出や演算したデータを使用して同様に演算処理して行うため、計算量やデータ量の増加を抑制して、比較的簡易な処理により実施できる。加えて、この計数装置1では、所定数の撮影画像Gで連続して移動体Tが検出されないときには、カウントフラグ等をクリアし、初期状態に戻して移動体Tの通過の有無の判定等を再開するため、それ以前の不要なデータ等をクリアして、それらが計数処理に影響を及ぼすのを防止することができる。これに伴い、移動体Tの検出ミスの発生や、計数処理中の不要データの累積等に対処でき、計数精度の低下を抑制することができる。
Therefore, according to the present embodiment, it is possible to accurately count the moving body T passing through the counting target region R with a simple configuration, reduce the calculation amount when counting the moving body T, and reduce the processing load. The cost of the
ここで、本実施形態では、少なくとも3つの検出ポイント列(A列、B列、C列)を設定するとともに、上記のように、各検出ポイント列の検出結果やその比較結果等から、移動体Tやその移動及び通過を判別するため、それらを漏れなく確実に把握して、所定方向への通過数を正確にカウントすることができる。ただし、検出ポイント列は、移動体Tの通過方向に沿って4つ又は5つ設定する等、他の数を設定し、それらの全て、又は任意の位置の検出ポイント列の検出結果を使用して、移動体Tの通過の判定やカウント処理を行うようにしてもよい。 Here, in the present embodiment, at least three detection point columns (A column, B column, C column) are set, and as described above, from the detection result of each detection point column and the comparison result thereof, the mobile object Since T and its movement and passage are discriminated, they can be surely grasped without omission and the number of passages in a predetermined direction can be accurately counted. However, the detection point sequence is set to other numbers such as 4 or 5 along the passing direction of the moving object T, and all of them or the detection result of the detection point sequence at an arbitrary position is used. Thus, the passage of the moving body T may be determined and count processing may be performed.
なお、各検出ポイント列の検出ポイントPは、計数対象領域Rや撮影画像Gの大きさやカメラ2の設置高さ、又は要求される計数精度等に応じて、適宜必要な数を必要な位置に設定すればよい。その際、8つ以内の数を設定する場合には、各検出ポイント列や演算した各データ(図6参照)を1バイト(8ビット)で処理可能で、各処理や演算を、8ビットのCPUを使用して容易に行えるため、各検出ポイント列の検出ポイントPは、8つ以内の数を設定するのが望ましい。また、各検出ポイント列の複数の検出ポイントPは、計数対象領域Rの状態や移動体Tの移動態様等に応じて、移動体Tの通過方向に直行する方向以外に、ある程度斜交する方向に設定し、又は湾曲するように配列させる等、通過方向に交差する他の方向に設定してもよい。
It should be noted that the detection points P of each detection point sequence are appropriately provided in necessary positions according to the size of the counting target region R, the size of the captured image G, the installation height of the
更に、本実施形態では、検出ポイント列の検出ポイントPの数を一定にして、移動体Tの検出や計数処理を行ったが、検出ポイントPの設定数は、各計数時における移動体Tの計数結果等に応じて、変更可能に構成してもよい。この場合には、例えば単位時間あたりのカウント数と、予め設定されたカウント数の閾値とを比較し、その比較結果から移動体Tの通過状況等を判断して、各状況に応じて、検出ポイント列の検出ポイントPの数を変化させて設定等する。 Further, in the present embodiment, the number of detection points P in the detection point row is fixed, and the mobile body T is detected and counted. However, the number of detection points P set is the number of mobile bodies T at each count. It may be configured to be changeable according to the counting result or the like. In this case, for example, the number of counts per unit time is compared with a preset threshold value of the number of counts, and the passing situation of the mobile unit T is judged from the comparison result, and detection is performed according to each situation. Setting is made by changing the number of detection points P in the point sequence.
以上、建物90のドア91付近にカメラ2を設置する場合を例に説明したが、この計数装置1は、例えば建物90の通路の途中を通過する移動体Tを計数したり、或いは、屋外の道路を通過する自動車や人を計数する等、他の位置にカメラ2を設置して、種々の計数対象領域Rを通過する移動体Tの計数に使用できる。また、本発明は、計数装置1のコンピュータを、計数装置1により実行する以上説明した各手段として機能させるためのプログラムとしても実現できる。
As described above, the case where the
1・・・計数装置、2・・・カメラ、10・・・計数処理装置、11・・・CPU、12・・・ROM、13・・・RAM、14・・・制御部、15・・・記憶部、16・・・設定部、17・・・カウント部、18・・・設定入力部、19・・・入出力部、20・・・画像処理部、21・・・検出部、22・・・数判定部、23・・・通過判定部、24・・・比較部、25・・・移動体判別部、90・・・建物、91・・・ドア、G・・・撮影画像、K・・・バス、P・・・検出ポイント、R・・・計数対象領域、T・・・移動体。
DESCRIPTION OF
Claims (9)
計数対象領域の撮影画像に、移動体の通過方向と交差する方向に配列された複数の検出ポイントからなる移動体の検出ポイント列を、前記通過方向に沿って複数設定する設定手段と、
計数対象領域の撮影画像から各検出ポイント列の検出ポイント毎に移動体を検出する検出手段と、
複数の検出ポイント列の各検出ポイントでの移動体の検出結果に基づき、計数対象領域を通過する移動体の有無を判定する通過判定手段と、
計数対象領域を前記通過方向に通過する移動体数をカウントするカウント手段と、
を備えたことを特徴とする移動体の計数装置。 A moving body counting apparatus that counts a moving body that is photographed from above by a camera and counts a moving body,
Setting means for setting a plurality of detection point sequences of the moving body composed of a plurality of detection points arranged in the direction intersecting the passing direction of the moving body in the captured image of the counting target region, along the passing direction;
Detection means for detecting a moving body for each detection point of each detection point sequence from the captured image of the counting target region;
Based on the detection result of the moving body at each detection point of the plurality of detection point rows, passage determination means for determining the presence or absence of the moving body that passes through the counting target region;
Counting means for counting the number of moving objects that pass through the counting target area in the passing direction;
A moving body counting apparatus comprising:
前記通過判定手段が、検出ポイント列間の移動体を検出した検出ポイントの位置を比較する比較手段と、該位置の比較結果に基づき、計数対象領域を前記通過方向へ移動する移動体を判別する判別手段とを有し、該判別結果に基づいて前記通過する移動体の有無を判定することを特徴とする移動体の計数装置。 In the moving body counting device according to claim 1,
The passage determination means compares the position of the detection point that detected the moving body between the detection point rows, and the moving body that moves the counting target area in the passing direction based on the comparison result of the position. A moving body counting apparatus comprising: a determination unit; and determining presence / absence of the passing moving body based on the determination result.
前記判別手段が、検出ポイント列間の移動体を検出した検出ポイントの前記通過方向に沿う位置の変化に基づき、前記通過方向に移動する移動体を判別することを特徴とする移動体の計数装置。 The mobile counting device according to claim 2, wherein
The moving body counting device characterized in that the discrimination means discriminates a moving body that moves in the passing direction based on a change in a position along the passing direction of a detection point that detects the moving body between detection point rows. .
各検出ポイント列の複数の検出ポイントでの各検出結果に基づき、該検出ポイント列で検出した移動体の数を判定する数判定手段を備えたことを特徴とする移動体の計数装置。 The moving body counting device according to any one of claims 1 to 3,
A moving body counting apparatus comprising: a number determining means for determining the number of moving bodies detected in a detection point sequence based on detection results at a plurality of detection points in each detection point sequence.
前記設定手段が、前記通過方向に沿って順に配置された第1、第2、第3検出ポイント列を少なくとも設定する手段であり、
前記通過判定手段が、第1、第2、第3検出ポイント列の各検出ポイントでの移動体の検出結果に基づき、前記通過する移動体の有無を判定することを特徴とする移動体の計数装置。 In the counting device of the mobile object according to any one of claims 1 to 4,
The setting means is means for setting at least first, second, and third detection point sequences arranged in order along the passing direction;
The moving object count, wherein the passage determining means determines the presence or absence of the moving object passing based on the detection result of the moving object at each detection point of the first, second, and third detection point sequences. apparatus.
第1検出ポイント列の検出ポイント毎の移動体の検出結果に基づき、計数対象領域内に入った移動体を判別する手段と、
第3検出ポイント列の検出ポイント毎の移動体の検出結果に基づき、計数対象領域外へ移動する移動体を判別する手段と、
第2及び第3検出ポイント列の移動体を検出した検出ポイント同士を比較して、前記通過方向へ移動する移動体を判別する手段と、
該移動体を判別する各手段の判別結果を比較する手段と、を備え、
該比較結果に基づき、前記通過判定手段が、前記通過する移動体の有無を判定することを特徴とする移動体の計数装置。 The mobile counting device according to claim 5,
Means for discriminating a moving body that has entered the counting target region based on the detection result of the moving body for each detection point of the first detection point sequence;
Means for discriminating a moving body moving out of the counting target region based on the detection result of the moving body for each detection point of the third detection point row;
Means for comparing the detection points where the moving bodies of the second and third detection point rows are detected and determining the moving body moving in the passing direction;
Means for comparing the determination results of each means for determining the moving body,
The moving body counting apparatus, wherein the passage determining means determines the presence or absence of the moving body passing through based on the comparison result.
前記カウント手段が、計数対象領域を互いに逆方向に通過する移動体をそれぞれカウントすることを特徴とする移動体の計数装置。 The mobile counting device according to any one of claims 1 to 6,
The counting device of the moving body, wherein the counting means counts each moving body that passes through the counting target region in opposite directions.
予め設定された数の撮影画像で連続して全ての検出ポイントで移動体が検出されないことを条件に、前記通過判定手段を判定処理開始時の初期状態に戻して判定を再開させる手段を備えたことを特徴とする移動体の計数装置。 The mobile counting device according to any one of claims 1 to 7,
Provided with means for returning the passage determination means to the initial state at the start of the determination process and restarting the determination on the condition that a moving body is not detected continuously at all detection points in a preset number of captured images. A moving body counting apparatus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008091163A JP2009245172A (en) | 2008-03-31 | 2008-03-31 | Counting device for moving object, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008091163A JP2009245172A (en) | 2008-03-31 | 2008-03-31 | Counting device for moving object, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009245172A true JP2009245172A (en) | 2009-10-22 |
Family
ID=41306977
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008091163A Pending JP2009245172A (en) | 2008-03-31 | 2008-03-31 | Counting device for moving object, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009245172A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011219235A (en) * | 2010-04-12 | 2011-11-04 | Takeda Kankyo:Kk | Waste recovery system and waste recovery vehicle |
WO2023276477A1 (en) * | 2021-06-29 | 2023-01-05 | パナソニックIpマネジメント株式会社 | Information processing device, information processing method, and program |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08123935A (en) * | 1994-08-31 | 1996-05-17 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for counting moving object by direction |
JP2004199623A (en) * | 2002-12-20 | 2004-07-15 | Minolta Co Ltd | Movable body counting method |
JP2006302167A (en) * | 2005-04-25 | 2006-11-02 | Nabtesco Corp | Passerby counting device and automatic door with counting function |
-
2008
- 2008-03-31 JP JP2008091163A patent/JP2009245172A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08123935A (en) * | 1994-08-31 | 1996-05-17 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for counting moving object by direction |
JP2004199623A (en) * | 2002-12-20 | 2004-07-15 | Minolta Co Ltd | Movable body counting method |
JP2006302167A (en) * | 2005-04-25 | 2006-11-02 | Nabtesco Corp | Passerby counting device and automatic door with counting function |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011219235A (en) * | 2010-04-12 | 2011-11-04 | Takeda Kankyo:Kk | Waste recovery system and waste recovery vehicle |
WO2023276477A1 (en) * | 2021-06-29 | 2023-01-05 | パナソニックIpマネジメント株式会社 | Information processing device, information processing method, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9390332B2 (en) | Information processing system, information processing method and program | |
JP4992618B2 (en) | Gesture recognition device and gesture recognition method | |
TWI363285B (en) | Method and apparatus for detecting motion of image in optical navigator | |
US8437504B2 (en) | Imaging system and imaging method | |
US10147287B2 (en) | Image processing apparatus to set a detection line used to count the passing number of moving objects | |
US9934576B2 (en) | Image processing system, image processing method, and recording medium | |
CN109508576B (en) | Abnormal driving behavior detection method and device and electronic equipment | |
JP5278576B2 (en) | Gesture recognition device, gesture recognition method and program thereof | |
JP4696991B2 (en) | Motion detection method and motion detection apparatus | |
JP2008250746A (en) | Mobile object tracking device | |
JP4801934B2 (en) | Moving object detection device | |
JP4963297B2 (en) | Person counting device and person counting method | |
JP6758834B2 (en) | Display device, display method and program | |
KR20160037480A (en) | Method for establishing region of interest in intelligent video analytics and video analysis apparatus using the same | |
JP4717445B2 (en) | Image processing system, image processing device, game device, program, information storage medium, and image processing method | |
JP2009245172A (en) | Counting device for moving object, and program | |
JP2007219603A (en) | Person tracking device, person tracking method and person tracking program | |
JP6591349B2 (en) | Motion detection system and motion detection method | |
KR101015646B1 (en) | Face detecting apparatus and face detection using the same | |
JP5587068B2 (en) | Driving support apparatus and method | |
JP4842301B2 (en) | Pedestrian detection device and program | |
JPH04345396A (en) | Traveling object tracing method | |
JP6304473B2 (en) | Image processing system, image processing method, and program | |
JP2007004726A (en) | Moving object detecting device using image | |
US10593045B2 (en) | Information processing apparatus and method of controlling the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20101227 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120312 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120418 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120608 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120625 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130207 |