JP2937098B2 - Area detection method and device - Google Patents

Area detection method and device

Info

Publication number
JP2937098B2
JP2937098B2 JP32203395A JP32203395A JP2937098B2 JP 2937098 B2 JP2937098 B2 JP 2937098B2 JP 32203395 A JP32203395 A JP 32203395A JP 32203395 A JP32203395 A JP 32203395A JP 2937098 B2 JP2937098 B2 JP 2937098B2
Authority
JP
Japan
Prior art keywords
image
pixel
moving object
background
height
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
JP32203395A
Other languages
Japanese (ja)
Other versions
JPH09161070A (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.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP32203395A priority Critical patent/JP2937098B2/en
Publication of JPH09161070A publication Critical patent/JPH09161070A/en
Application granted granted Critical
Publication of JP2937098B2 publication Critical patent/JP2937098B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、2値画像から領域
を検出する方法、および濃淡画像から移動物体を検出す
る方法、およびそれらを実現する装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for detecting a region from a binary image, a method for detecting a moving object from a grayscale image, and an apparatus for realizing the method.

【0002】[0002]

【従来の技術】まず、2値画像から領域を検出する従来
の技術について述べる。一例として、特開平1−128
171号公報記載の画像処理装置が用いている領域の連
結成分に関する外接枠の検出方法がある。この発明は、
小容量のメモリを用い、短時間で効率良く与えられた図
形から連結成分の外接枠情報を抽出する画像処理装置を
提供することを目的としており、垂直方向への投影で重
複するような連結成分間の構造が複雑に入り組んでいる
場合にも、各連結成分の外接枠を検出することが可能で
あるところに特徴がある。この発明は外接枠により領域
形状を近似することを目指したものではないため、検出
された外接枠をもとに詳しい領域形状を必ずしも得るこ
とはできない。特に、外接矩形が他の連結成分と全く重
複しないような連結成分については、この外接矩形が外
接枠として得られる場合があり、この連結成分の形状に
ついては垂直方向と水平方向の長さの情報しか得られな
い。
2. Description of the Related Art First, a conventional technique for detecting an area from a binary image will be described. As an example, see JP-A-1-128.
There is a method of detecting a circumscribed frame related to a connected component of a region used by the image processing apparatus described in Japanese Patent Application Publication No. 171/171. The present invention
The purpose of the present invention is to provide an image processing device that efficiently extracts circumscribed frame information of a connected component from a given figure in a short time and efficiently using a small-capacity memory. The feature is that the circumscribed frame of each connected component can be detected even when the structure between them is complicated. Since the present invention does not aim at approximating the region shape by the circumscribed frame, a detailed region shape cannot always be obtained based on the detected circumscribed frame. In particular, for a connected component whose circumscribed rectangle does not overlap at all with other connected components, this circumscribed rectangle may be obtained as a circumscribed frame. I can only get it.

【0003】次に、濃淡画像から移動物体を検出する従
来の技術について述べる。例えば、特開平5−2985
91号公報記載の物体認識装置では、移動物体を環境変
化や隠れなどに左右されないように抽出し、軌跡を正確
に求めることを目的としている。この発明では、以下に
述べる処理を行なっている。 1.入力画像から移動物体の特徴的部分を複数の濃淡の
テンプレート画像として切り出す。 2.その後の入力画像とテンプレート画像とで濃淡パタ
ーンマッチングすることにより前記特徴的部分を追跡す
る。 3.移動物体の形状変化に対応するためにテンプレート
画像を更新する。 4.軌跡の近似曲線の距離が近いテンプレートを統合す
る。 5.認識対象の知識を利用してテンプレートを統合す
る。 6.動態の近似度をもとにテンプレートの分離を行な
う。 従って、異なる移動物体が重なって撮影され入力画像内
の領域として連結している場合に、これらの移動物体を
個別に検出するためには、入力画像内における動態が明
確に異なることが必要である。
Next, a conventional technique for detecting a moving object from a grayscale image will be described. For example, Japanese Patent Application Laid-Open No. 5-2985
The object recognition device described in Japanese Patent Publication No. 91 aims to extract a moving object without being affected by environmental changes or hiding, and to accurately obtain a trajectory. In the present invention, the following processing is performed. 1. The characteristic part of the moving object is cut out from the input image as a plurality of shaded template images. 2. The characteristic portion is tracked by performing gray-scale pattern matching between the subsequent input image and the template image. 3. The template image is updated to correspond to the change in the shape of the moving object. 4. Integrate templates whose distances of the approximate curves of the trajectories are short. 5. Integrate templates using the knowledge to be recognized. 6. Separate templates based on the dynamics approximation. Therefore, when different moving objects are photographed overlapping and connected as an area in the input image, it is necessary that the dynamics in the input image be clearly different in order to individually detect these moving objects. .

【0004】[0004]

【発明が解決しようとする課題】まず、2値画像から領
域を検出する技術に関する課題について述べる。例え
ば、特開平1−128171号公報記載の画像処理装置
が用いている領域の連結成分に関する外接枠の検出方法
のように、従来の技術では領域の外接矩形や外接枠を求
めることによって領域を検出しているため、該領域の曖
昧な形状情報しか得られないという問題がある。
First, a problem relating to a technique for detecting a region from a binary image will be described. For example, as in a method of detecting a circumscribed frame related to a connected component of an area used by an image processing apparatus described in Japanese Patent Application Laid-Open No. 1-128171, the conventional technique detects an area by obtaining a circumscribed rectangle or a circumscribed frame of the area. Therefore, there is a problem that only ambiguous shape information of the area can be obtained.

【0005】次に、濃淡画像から移動物体を検出する技
術に関する課題について述べる。例えば、特開平5−2
98591号公報記載の物体認識装置では、異なる移動
物体が重複して撮影され画像内で連結領域をなしている
場合には、動態の相違をもとにこれらを分離している。
このように、従来の移動物体検出の技術では、異なる移
動物体が重複して撮影され画像内で連結領域をなしてい
る場合に、これらの移動物体の動態が明確に異ならなけ
れば個別に検出することは困難であるという問題点があ
る。
[0005] Next, a problem relating to a technique for detecting a moving object from a grayscale image will be described. For example, Japanese Patent Application Laid-Open No. Hei 5-2
In the object recognition device described in Japanese Patent No. 98591, when different moving objects are photographed repeatedly and form a connected region in an image, they are separated based on a difference in dynamic state.
As described above, in the conventional moving object detection technique, when different moving objects are photographed in an overlapping manner and form a connected region in an image, the moving objects are individually detected unless the dynamics of these moving objects are clearly different. There is a problem that it is difficult.

【0006】[0006]

【課題を解決するための手段】第1の発明の領域検出方
法は、0および1の画素値で構成される2値の入力画像
について、画素値1の各領域の下端に属する各画素の位
置を検出し、前記各画素について該画素を通る鉛直線と
該領域との交わりの該画素を含む連結成分の長さを該画
素上の領域の高さとして検出し、前記領域下端に属する
各画素の位置および該画素上の領域の高さで構成される
下端検出結果データを生成し、前記下端検出結果データ
を参照して領域の下端を線分群で近似することにより、
領域の下端を近似して得られる線分群に属する各画素の
位置および該画素上の領域の高さで構成される線分近似
結果データを生成し、前記線分近似結果データを参照し
て各領域を近似する矩形群を検出することにより、2値
の入力画像に含まれる各領域の形状を近似する矩形群を
出力することを特徴としている。
According to a first aspect of the present invention, there is provided a region detecting method for a binary input image composed of 0 and 1 pixel values, the position of each pixel belonging to the lower end of each region having a pixel value of 1; Is detected for each pixel, the length of a connected component including the pixel at the intersection of the vertical line passing through the pixel and the region is detected as the height of the region on the pixel, and each pixel belonging to the lower end of the region is detected. By generating the lower end detection result data composed of the position of the area and the height of the area on the pixel, by approximating the lower end of the area with a group of line segments with reference to the lower end detection result data,
Generate line segment approximation result data composed of the position of each pixel belonging to a line segment group obtained by approximating the lower end of the region and the height of the region on the pixel, and refer to the line segment approximation result data for each. By detecting a group of rectangles approximating the region, a group of rectangles approximating the shape of each region included in the binary input image is output.

【0007】第2の発明の移動物体検出方法は、入力画
像に対して移動物体を含まない背景のみから構成される
背景画像を予め用意し、各画素において前記入力画像と
前記背景画像の対応する画素値の差分の絶対値を画素値
とする背景差分画像を生成し、前記背景差分画像を参照
して0および1の画素値で構成される2値化画像を生成
し、前記2値化画像の画素値1で構成される領域の形状
を近似する矩形群を検出し、前記領域形状を近似する矩
形群を参照し、所定の条件に従って、矩形の消去、分割
による新たな矩形の生成、もしくは融合による新たな矩
形の生成を行うことで、前記矩形群の変更を行ない、
々の移動物体に対応する矩形を生成して移動物体検出結
果とすることにより、入力画像に含まれる移動物体を個
別に検出することを特徴としている。
In a moving object detection method according to a second aspect of the present invention, a background image consisting only of a background that does not include a moving object is prepared in advance in an input image, and each pixel corresponds to the input image and the background image. Generating a background difference image having an absolute value of a pixel value difference as a pixel value, generating a binary image including pixel values of 0 and 1 with reference to the background difference image, A rectangle group approximating the shape of the region constituted by the pixel values of 1 is detected, the rectangle group approximating the region shape is referred to, and the rectangle is erased and divided according to a predetermined condition.
To generate a new rectangle by fusion, or a new rectangle by fusion
By performing shape generation, the rectangle group is changed, and a rectangle corresponding to each moving object is generated and used as a moving object detection result, thereby individually detecting moving objects included in the input image. It is characterized by.

【0008】第3の発明の移動物体検出方法は、入力さ
れる入力画像に対して移動物体を含まない背景のみから
構成される背景画像を常に持ち、前記入力画像を参照し
て前記背景画像を更新し、各画素において前記入力画像
と前記背景画像の対応する画素値の差分の絶対値を画素
値とする背景差分画像を生成し、前記背景差分画像を参
照して0および1の画素値で構成される2値化画像を生
成し、前記2値化画像の画素値1で構成される領域の形
状を近似する矩形群を検出し、前記領域形状を近似する
矩形群を参照し、所定の条件に従って、矩形の消去、分
割による新たな矩形の生成、もしくは融合による新たな
矩形の生成を行うことで、前記矩形群の変更を行ない、
個々の移動物体に対応する矩形を生成して移動物体検出
結果とすることにより、入力画像に含まれる移動物体を
個別に検出することを特徴としている。
In a moving object detecting method according to a third aspect of the present invention, an input image to be inputted always has a background image consisting only of a background not including a moving object, and the background image is referred to by referring to the input image. Update, generate a background difference image having a pixel value of an absolute value of a difference between a corresponding pixel value of the input image and the background image at each pixel, and refer to the background difference image with pixel values of 0 and 1 generates a binary image composed, said detecting a rectangular group of approximating the shape of the region composed of the binary image pixel value 1, the reference to a rectangular group of approximating the area shape, predetermined Erase rectangle, minute according to conditions
Create a new rectangle by splitting, or a new one by fusing
By performing generation of a rectangle, the rectangle group is changed,
The method is characterized in that a moving object included in an input image is individually detected by generating a rectangle corresponding to each moving object and generating a moving object detection result.

【0009】第4の発明の領域検出装置は、0および1
の画素値で構成される2値の入力画像を記憶する入力画
像記憶手段と、後述の下端検出手段および線分近似手段
および矩形近似手段の動作を制御する制御手段と、前記
制御手段の制御のもとで第1に前記入力画像記憶手段に
記憶されている2値画像の画素値1の各領域の下端に属
する各画素の位置を検出し、第2に前記各画素について
該画素を通る鉛直線と該領域との交わりの該画素を含む
連結成分の長さを該画素上の領域の高さとして検出し、
第3に第1および第2の動作の結果得られた各画素の位
置および各画素上の領域の高さの情報を下端検出結果と
して後述の下端検出結果記憶手段に記憶させる下端検出
手段と、前記下端検出手段で検出された下端検出結果の
情報を記憶する下端検出結果記憶手段と、前記制御手段
の制御のもとで第1に前記下端検出結果記憶手段に記憶
されている下端検出結果の情報を参照して領域の下端を
線分群で近似し、第2に前記線分群に属する各画素の位
置および該画素上の領域の高さの情報を線分近似結果と
して後述の線分近似結果記憶手段に記憶させる線分近似
手段と、前記線分近似手段で近似して得られた線分近似
結果の情報を記憶する線分近似結果記憶手段と、前記制
御手段の制御のもとで前記線分近似結果記憶手段に記憶
されている線分近似結果の情報を参照して各領域を近似
する矩形群を検出して後述の領域検出結果記憶手段に記
憶させる矩形近似手段と、前記矩形近似手段で得られた
矩形群を記憶する領域検出結果記憶手段とを具備し、2
値の入力画像に含まれる各領域の形状を近似する矩形群
を出力することを特徴としている。
The region detecting apparatus according to a fourth aspect of the present invention comprises:
Input image storage means for storing a binary input image composed of the pixel values of the following, control means for controlling the operations of a lower end detection means, a line segment approximation means and a rectangle approximation means which will be described later, and control of the control means. First, the position of each pixel belonging to the lower end of each area of the pixel value 1 of the binary image stored in the input image storage unit is detected, and secondly, the vertical position of each pixel passing through the pixel is detected. Detecting the length of the connected component including the pixel at the intersection of the line and the region as the height of the region on the pixel;
Thirdly, a lower end detection unit that stores information on the position of each pixel and the height of an area on each pixel obtained as a result of the first and second operations as a lower end detection result in a lower end detection result storage unit described below; A lower end detection result storage unit for storing information on a lower end detection result detected by the lower end detection unit; and a first lower end detection result stored in the lower end detection result storage unit under control of the control unit. Second, the lower end of the region is approximated by a line segment group with reference to the information, and secondly, the information on the position of each pixel belonging to the line group and the height of the region on the pixel is obtained as a line segment approximation result, which will be described later. A line segment approximating unit to be stored in a storage unit; a line segment approximation result storing unit that stores information of a line segment approximation result obtained by approximation by the line segment approximating unit; Near the line segment stored in the line approximation result storage means A rectangle approximating unit that detects a rectangle group approximating each region with reference to the result information and stores the detected rectangle group in a region detection result storage unit described below, and a region detection result storage that stores the rectangle group obtained by the rectangle approximation unit Means, and 2
It is characterized in that a group of rectangles approximating the shape of each area included in the input image of the value is output.

【0010】第5の発明の移動物体検出装置は、入力画
像を記憶する入力画像記憶手段と、移動物体を含まない
背景だけで構成される背景画像を記憶する背景画像記憶
手段と、後述の背景差分手段および2値化手段および領
域検出手段および領域整形手段の動作を制御する制御手
段と、前記制御手段の制御のもとで各画素において前記
入力画像記憶手段が記憶している入力画像と前記背景画
像記憶手段が記憶している背景画像の対応する画素値の
差分の絶対値を対応する画素値とする背景差分結果画像
を生成して後述の背景差分結果記憶手段へ記憶させる背
景差分手段と、前記背景差分手段で得られた背景差分画
像を記憶する背景差分結果記憶手段と、前記制御手段の
制御のもとで前記背景差分結果記憶手段が記憶している
背景差分画像を参照して0および1の画素値で構成され
る2値化画像を生成して後述の2値化画像記憶手段へ記
憶させる2値化手段と、前記2値化手段で生成された2
値化画像を記憶する2値化画像記憶手段と、前記制御手
段の制御のもとで前記2値化画像記憶手段が記憶してい
る2値化画像の画素値1で構成される領域の形状を近似
する矩形群を検出して後述の領域検出結果記憶手段へ記
憶させる領域検出手段と、前記領域検出手段で得られた
領域形状を近似する矩形群を記憶する領域検出結果記憶
手段と、前記制御手段の制御のもとで前記領域検出結果
記憶手段が記憶している矩形群を参照し、所定の条件に
従って、矩形の消去、分割による新たな矩形の生成、も
しくは融合による新たな矩形の生成を行うことで、前記
矩形群の変更を行ない、個々の移動物体に対応する矩形
を生成して移動物体検出結果とし、後述の移動物体検出
結果記憶手段へ記憶させる移動物体検出手段と、前記移
動物体検出手段で得られた矩形群を記憶する移動物体検
出結果記憶手段とを具備し、入力画像に含まれる移動物
体を個別に検出することを特徴としている。
According to a fifth aspect of the present invention, there is provided a moving object detecting apparatus, comprising: an input image storing means for storing an input image; a background image storing means for storing a background image consisting only of a background not including a moving object; Control means for controlling the operation of the difference means, the binarization means, the area detection means and the area shaping means; and the input image stored in the input image storage means for each pixel under the control of the control means; A background difference means for generating a background difference result image having an absolute value of a difference between corresponding pixel values of the background image stored in the background image storage means as a corresponding pixel value and storing the image in a background difference result storage means described later; A background difference result storage unit for storing the background difference image obtained by the background difference unit, and a background difference image stored in the background difference result storage unit under the control of the control unit. And binarizing means for and storing to generate a binary image composed of 0 and 1 of the pixel value to the binary image storage unit described later, the generated in binarizing means 2
Binary image storage means for storing a binarized image, and a shape of an area composed of pixel values 1 of the binarized image stored in the binarized image storage means under the control of the control means Area detection means for detecting a group of rectangles approximating and storing them in an area detection result storage means described later; area detection result storage means for storing a group of rectangles approximating the area shape obtained by the area detection means; Under the control of the control means, reference is made to the group of rectangles stored in the area detection result storage means, and a predetermined condition is satisfied.
Therefore, erasure of a rectangle, generation of a new rectangle by division, and
Or by generating a new rectangle by fusing,
A group of rectangles is changed, and a rectangle corresponding to each moving object is generated as a moving object detection result, which is obtained by a moving object detection means to be stored in a moving object detection result storage means described later, and the moving object detection means. Moving object detection result storage means for storing the group of rectangles, wherein the moving objects included in the input image are individually detected.

【0011】第6の発明の移動物体検出装置は、入力画
像を記憶する入力画像記憶手段と、後述の背景画像更新
手段および背景差分手段および2値化手段および領域検
出手段および領域整形手段の動作を制御する制御手段
と、前記制御手段のもとで前記入力画像記憶手段が記憶
している入力画像と後述の背景画像記憶手段が記憶して
いる背景画像とを参照して新しい背景画像を生成し後述
の背景画像記憶手段に記憶させる背景画像生成手段と、
前記背景画像生成手段が出力する背景画像を記憶する背
景画像記憶手段と、前記制御手段の制御のもとで各画素
において前記入力画像記憶手段が記憶している入力画像
と前記背景画像記憶手段が記憶している背景画像の対応
する画素値の差分の絶対値を対応する画素値とする背景
差分結果画像を生成して後述の背景差分結果記憶手段へ
記憶させる背景差分手段と、前記背景差分手段で得られ
た背景差分画像を記憶する背景差分結果記憶手段と、前
記制御手段の制御のもとで前記背景差分結果記憶手段が
記憶している背景差分画像を参照して0および1の画素
値で構成される2値化画像を生成して後述の2値化画像
記憶手段へ記憶させる2値化手段と、前記2値化手段で
生成された2値化画像を記憶する2値化画像記憶手段
と、前記制御手段の制御のもとで前記2値化画像記憶手
段が記憶している2値化画像の画素値1で構成される領
域の形状を近似する矩形群を検出して後述の領域検出結
果記憶手段へ記憶させる領域検出手段と、前記領域検出
手段で得られた領域形状を近似する矩形群を記憶する領
域結果記憶手段と、前記制御手段の制御のもとで前記領
域検出結果記憶手段が記憶している領域形状を近似する
矩形群を参照し、所定の条件に従って、矩形の消去、分
割による新たな矩形の生成、もしくは融合による新たな
矩形の生成を行うことで、前記矩形群の変更を行ない、
個々の移動物体に対応する矩形を生成して移動物体検出
結果とし、後述の移動物体検出結果記憶手段へ記憶させ
る移動物体検出手段と、前記移動物体検出手段で得られ
た矩形群を記憶する移動物体検出結果記憶手段とを具備
し、入力画像に含まれる移動物体を個別に検出すること
を特徴としている。
A moving object detecting apparatus according to a sixth aspect of the present invention includes an input image storing means for storing an input image, and operation of a background image updating means, a background subtracting means, a binarizing means, an area detecting means and an area shaping means which will be described later. Generating a new background image by referring to an input image stored in the input image storage unit and a background image stored in a background image storage unit described below under the control unit. A background image generating means to be stored in a background image storing means described later;
A background image storage unit for storing a background image output by the background image generation unit; and an input image and the background image storage unit stored in the input image storage unit for each pixel under the control of the control unit. A background difference means for generating a background difference result image having an absolute value of a difference between corresponding pixel values of the stored background image as a corresponding pixel value and storing the image in a background difference result storage means described later; A background difference result storage means for storing the background difference image obtained in step 1; and a pixel value of 0 and 1 with reference to the background difference image stored in the background difference result storage means under the control of the control means. Binarization means for generating a binarized image composed of the following and storing the same in a binarized image storage means described later, and a binarized image storage for storing the binarized image generated by the binarization means Means and the control means Under the control, a group of rectangles approximating the shape of the area formed by the pixel value 1 of the binarized image stored in the binarized image storage is detected and stored in the area detection result storage described below. Area detecting means for storing, area result storing means for storing a group of rectangles approximating the area shape obtained by the area detecting means, and area detecting result storing means under the control of the control means. Referring to a group of rectangles approximating the region shape , erasing and dividing rectangles according to predetermined conditions.
Create a new rectangle by splitting, or a new one by fusing
By performing generation of a rectangle, the rectangle group is changed,
A moving object detecting unit that generates a rectangle corresponding to each moving object to be a moving object detection result and stores the moving object detection result in a moving object detection result storage unit described below; and a moving unit that stores a rectangle group obtained by the moving object detecting unit. Object detection result storage means for individually detecting moving objects included in the input image.

【0012】従来の領域の検出に関わる技術による領域
検出の結果では、外接矩形などのように曖昧な領域形状
情報しか得られなかったが、第1の発明の領域検出方法
および第4の発明の装置を利用すると、領域形状を近似
する矩形群を検出するため、領域検出の結果から細かい
領域形状を得ることが可能である。
As a result of area detection by a conventional technique relating to area detection, only ambiguous area shape information such as a circumscribed rectangle can be obtained. However, the area detection method according to the first invention and the area detection method according to the fourth invention have been described. When the apparatus is used, a group of rectangles approximating the region shape is detected, so that a fine region shape can be obtained from the result of the region detection.

【0013】また、従来の移動物体の検出に関わる技術
による移動物体検出の結果では、例えば、異なる移動物
体が重複して撮影されて対応する領域が連結した場合
に、これらの移動物体を個別に検出することは、動態に
明確な差がなければ困難であったが、第2あるいは第3
の発明の移動物体検出方法および第5あるいは第6の発
明の移動物体検出装置を利用すると、移動物体の動態を
調べなくても、これらの物体の形状特徴が該領域形状に
現れているならば、個別の矩形で近似して検出すること
が可能である。
In addition, according to the result of the moving object detection by the conventional technique relating to the detection of a moving object, for example, when different moving objects are photographed repeatedly and their corresponding regions are connected, these moving objects are individually identified. Detection was difficult without a clear difference in kinetics, but the second or third
Utilizing the moving object detection method of the invention and the moving object detection device of the fifth or sixth invention, if the shape characteristics of these objects appear in the region shape without investigating the dynamics of the moving objects , Can be detected by approximating individual rectangles.

【0014】[0014]

【発明の実施の形態】第1の発明は2値画像からの領域
検出方法に関するものであり、第2および第3の発明
は、第1の発明の領域検出方法を利用した移動物体検出
方法であり、第4および第5および第6の発明は、それ
ぞれ第1および第2および第3の発明を実現する装置で
ある。第2および第3の発明では、背景差分により得ら
れた画像から得られる2値画像に対して第1の発明の領
域検出方法を適用することにより、入力画像の背景画像
と異なる部分を領域検出している。特に、第2の発明は
終始一定の背景画像を利用することを特徴としており、
第3の発明は背景画像を逐次更新することを特徴として
いる。以下に各々の発明の実施例を説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The first invention relates to a method for detecting an area from a binary image. The second and third inventions relate to a method for detecting a moving object using the area detection method of the first invention. The fourth, fifth, and sixth inventions are apparatuses for realizing the first, second, and third inventions, respectively. In the second and third inventions, by applying the region detection method of the first invention to a binary image obtained from an image obtained by background subtraction, an area different from the background image of the input image is detected. doing. In particular, the second invention is characterized by using a constant background image throughout.
The third invention is characterized in that background images are sequentially updated. Hereinafter, embodiments of each invention will be described.

【0015】第1の発明は、画素値が0および1で構成
される2値画像から、画素値1の領域の領域形状を矩形
群で近似することを目的としている。
A first object of the present invention is to approximate a region shape of a region having a pixel value of 1 by a group of rectangles from a binary image having pixel values of 0 and 1.

【0016】第1の発明の領域検出方法の一実施例につ
いて、図1、図7、図8および図9を用いて説明する。
ここで、図1は本実施例を示す流れ図であり、101は
下端検出処理、102は線分近似処理、103は矩形近
似処理である。また、図7、図8および図9は、それぞ
れ下端検出処理101、線分近似処理102および矩形
近似処理103に関する説明図である。
An embodiment of the area detecting method according to the first invention will be described with reference to FIGS. 1, 7, 8 and 9.
Here, FIG. 1 is a flowchart showing the present embodiment, wherein 101 is a lower end detection process, 102 is a line segment approximation process, and 103 is a rectangle approximation process. FIGS. 7, 8, and 9 are explanatory diagrams of the lower end detection processing 101, the line segment approximation processing 102, and the rectangle approximation processing 103, respectively.

【0017】本実施例の説明において、入力画像をI、
下端検出処理で出力される高さ付き下端画像をU、線分
近似処理で出力される高さ付き下線データをL、矩形近
似処理で出力される矩形近似データをRで表す。また、
画像Φの座標(x,y)における画素および画素値をΦ
(x,y)で表し、画像Φの{Φ(x,y)|x=i}
なる画素の集合を、Φの第i列と呼ぶことにする。ま
た、入力画像Iの画像サイズをX×Yとし、tを線分近
似処理における近似許容幅、kをY/t以上の最小の整
数とする。このとき、本実施例では高さ付き下端画像U
の画像サイズはX×Y、高さ付き下線データLの画像サ
イズはX×2k、矩形近似データRのy軸方向のサイズ
は4でx軸方向は検出された矩形の数になる。ここで、
入力画像Iのサイズは有限であるから、矩形の検出数の
上限を見積もることが可能である。本実施例では、図1
に示すように、下端検出処理101、線分近似処理10
2、矩形近似処理103の順に処理する。
In the description of the present embodiment, the input image is I,
U represents the lower end image with height output in the lower end detection process, L represents underline data with height output in the line segment approximation process, and R represents rectangle approximate data output in the rectangle approximation process. Also,
The pixel and pixel value at the coordinates (x, y) of the image Φ are Φ
(X, y) and {Φ (x, y) | x = i} of image Φ
Will be referred to as the i-th column of Φ. Further, the image size of the input image I is X × Y, t is an approximate allowable width in the line segment approximation processing, and k is a minimum integer equal to or more than Y / t. At this time, in this embodiment, the height-added lower end image U
Is X × Y, the image size of the underlined data L with height is X × 2k, the size of the approximate rectangle data R in the y-axis direction is 4, and the number of detected rectangles in the x-axis direction. here,
Since the size of the input image I is finite, it is possible to estimate the upper limit of the number of detected rectangles. In this embodiment, FIG.
As shown in the figure, the lower end detection processing 101 and the line segment approximation processing 10
2. Processing is performed in the order of the rectangular approximation processing 103.

【0018】まず、下端検出処理101について説明す
る。入力画像Iでは、検出したい領域における画素値が
1、それ以外の領域における画素値が0である。本処理
は、2値の入力画像I内の画素値1の各領域の下端に相
当する各画素について該領域の該画素の縦方向における
高さを求め、該画素に対応する画素値を前記高さとし、
領域下端以外では画素値を0とする高さ付き下端画像U
を生成することを目的とする。ここで、領域下端に所属
する画素に対して、該領域の該画素の縦方向における高
さとは、y軸に平行な直線と該領域との交わりの該画素
を含む連結成分の長さを指している。以下に具体的に処
理を説明する。
First, the lower end detection processing 101 will be described. In the input image I, the pixel value in a region to be detected is 1 and the pixel value in other regions is 0. In this processing, for each pixel corresponding to the lower end of each area of the pixel value 1 in the binary input image I, the height in the vertical direction of the pixel in the area is obtained, and the pixel value corresponding to the pixel is calculated as the height. Satoshi,
Except for the lower end of the region, a lower end image U with height having a pixel value of 0
The goal is to generate Here, for a pixel belonging to the lower end of the region, the height of the pixel in the vertical direction of the region indicates the length of a connected component including the pixel at the intersection of a straight line parallel to the y-axis and the region. ing. The processing will be specifically described below.

【0019】予め、高さ付き下端画像Uの全画素を画素
値0でクリアしておく。本処理は入力画像Iの各列ごと
に独立に行なわれるので、一例として第i列に関する処
理を以下に述べる。入力画像Iの第i列を注目列とし、
注目列をその上端からy軸方向、すなわち下方向へ走査
し領域の高さをカウントする。高さカウントの初期値を
0とし、以下の処理を行なう。 (1)高さカウント値が0かつ注目画素値が0の場合、
何もしない。 (2)高さカウント値が0かつ注目画素値が1の場合、
領域上端を発見したと解釈し領域の高さカウント値を1
とする。 (3)高さカウントが0でなく注目画素値が1である場
合、高さカウント値を1増やす。 (4)高さカウントが0でなく注目画素値が0である場
合、注目画素の一つ上の画素が領域下端に相当している
と解釈し、該領域下端画素に対応する高さ付き上端画像
Uの画素に高さカウント値を書き込み、その後に高さカ
ウント値を0にクリアする。 (5)画像の下端に達していない場合、次の画素に進み
(1)〜(4)の操作を行なう。画像の下端に達してい
る場合には注目列に関する処理を終了する。 上記処理の一例を図7に示す。図7では、入力画像Iお
よび高さ付き下端画像Uの注目列のみを、それぞれ
(a)および(c)に表示している。また、入力画像I
の注目列の画素値は0≦y≦2については0、3≦y≦
8については1、9≦y≦11については0となってお
り、画素値1の部分の高さは6画素である。図7(b)
のカウンタの値は、各画素を走査するときの高さカウン
タの処理前後の値を示している。従って、出力される高
さ付き下端画像Uの注目列における画素値は、y=8の
画素のみ6で他は0となっている。
All pixels of the height-added lower end image U are cleared in advance with a pixel value of 0. Since this process is performed independently for each column of the input image I, the process for the i-th column will be described below as an example. Let the i-th column of the input image I be the column of interest,
The column of interest is scanned from its upper end in the y-axis direction, that is, downward, and the height of the region is counted. The initial value of the height count is set to 0, and the following processing is performed. (1) When the height count value is 0 and the target pixel value is 0,
do nothing. (2) When the height count value is 0 and the pixel value of interest is 1,
Interpret that the top of the area was found and set the height count value of the area to 1
And (3) If the height count is not 0 and the target pixel value is 1, the height count value is increased by 1. (4) When the height count is not 0 and the target pixel value is 0, it is interpreted that the pixel immediately above the target pixel corresponds to the lower end of the region, and the upper end with height corresponding to the lower end pixel of the region. The height count value is written to the pixels of the image U, and thereafter, the height count value is cleared to zero. (5) When the lower end of the image has not been reached, the process proceeds to the next pixel and the operations (1) to (4) are performed. If it has reached the lower end of the image, the processing for the column of interest ends. FIG. 7 shows an example of the above processing. In FIG. 7, only the target columns of the input image I and the lower end image U with height are displayed in (a) and (c), respectively. Also, the input image I
The pixel value of the column of interest is 0, 3 ≦ y ≦ for 0 ≦ y ≦ 2.
The value of 1 is 8 for 8 and 0 for 9 ≦ y ≦ 11, and the height of the pixel value 1 portion is 6 pixels. FIG. 7 (b)
The value of the counter indicates the value before and after the processing of the height counter when scanning each pixel. Therefore, the pixel value in the column of interest of the output lower end image U with height is 6 only for the pixel of y = 8 and 0 for the other pixels.

【0020】以上の処理を各列について行なうことによ
り、高さ付き下端画像Uの各画素では、入力画像の画素
値1の領域の下端に対応している画素はその領域の高さ
を画素値に持ち、それ以外の画素値は0となる。
By performing the above-described processing for each column, in each pixel of the lower end image U with height, the pixel corresponding to the lower end of the area of the input image having the pixel value 1 is set to the pixel value of the area. , And the other pixel values are 0.

【0021】次に、線分近似処理102について説明す
る。本処理は、高さ付き下端画像Uを所定のブロックに
分割し、各ブロックごとに高さ付き下端を線分で近似し
て得られる、下端の位置と領域の高さを表現する高さ付
き下線データLを生成すること目的とする。下端検出処
理101で検出された下端は、正確な線分ではなく上下
の変動を含んでいる。この変動を吸収し、下端を線分と
して認識するのが本処理の主旨である。図8を用いて本
処理の内容について説明する。
Next, the line segment approximation processing 102 will be described. This processing divides the lower end image U with height into predetermined blocks, and obtains the height of the lower end and the height of the area obtained by approximating the lower end with height for each block by a line segment. The purpose is to generate underline data L. The lower end detected by the lower end detection processing 101 includes not a precise line segment but a vertical fluctuation. The purpose of this processing is to absorb this fluctuation and recognize the lower end as a line segment. The contents of this processing will be described with reference to FIG.

【0022】前述のとおり、高さ付き下端画像Uのサイ
ズをX×Y、近似許容幅をt、Y/t以上の最小の整数
をkとする。図8(a)のように、高さ付き下端画像U
をX×tのブロックに分割する。すなわち、第jブロッ
クBj を{U(x,y)|jt≦y<(j+1)t}な
る画素の集合とする。ただし、Bk-1 ={U(x,y)
|(k−1)t≦y<Y}とする。このとき、ブロック
数はkである。
As described above, the size of the lower end image U with height is X × Y, the approximate allowable width is t, and the minimum integer equal to or larger than Y / t is k. As shown in FIG.
Is divided into X × t blocks. That is, the j-th block B j is a set of pixels satisfying {U (x, y) | jt ≦ y <(j + 1) t}. Where B k-1 = {U (x, y)
| (K−1) t ≦ y <Y}. At this time, the number of blocks is k.

【0023】同一ブロック内に含まれる連続する各高さ
付き下端片を、それぞれ一つの高さ付き線分で近似す
る。Bj 内の高さ付き下端片を高さ付き線分で近似する
処理について説明する。まず、それぞれサイズX×1の
高さデータhj 、位置データlj および平均位置データ
j を用意し、Bj の第i列に対応する高さデータおよ
び位置データおよび平均位置データの値を、それぞれh
j [i]およびlj [i]およびaj [i]で表す。検
索ウインドウ内で、各iについて、Bj の第i列を上か
ら下へ向かって走査し、hj [i]に画素値の総和を書
き込み、lj [i]に0でない画素値のラインアドレス
の最大値を書き込む。これにより、高さ付き下端片の高
さの情報が高さデータhj に記録され、位置が位置デー
タlj に記録される。以上の処理を図8(a)の検索ブ
ロックについて行なうと、図8(b)のようになる。
Each successive lower end piece with height included in the same block is approximated by one line segment with height. The process of approximating the lower end piece with height in B j by a line segment with height will be described. First, height data h j , position data l j and average position data a j of size X × 1 are prepared, and the values of the height data, the position data and the average position data corresponding to the i-th column of B j are calculated. , Each h
j [i], l j [i] and a j [i]. In the search window, for each i, scan the ith column of B j from top to bottom, write the sum of pixel values in h j [i], and write a line of non-zero pixel values in l j [i] Write the maximum value of the address. Accordingly, the height of the height information with lower piece is recorded in the height data h j, the position is recorded in the position data l j. When the above processing is performed for the search block in FIG. 8A, the result is as shown in FIG. 8B.

【0024】次に、hj [i]>0なるiに対して、h
j [i]が所属する高さデータhjの正値なる連結成分
における位置データの平均値をaj [i]に書き込む。
また、高さ付き下端の位置を線分で近似することにより
生じる高さのずれを補正するため、aj [i]−l
j [i]をhj [i]に加算する。上記処理を図8
(b)の高さデータおよび位置データに適用すると、図
8(c)のようになる。そして、L[i][2j]=h
j [i]、L[i][2j+1]=aj [i]とするこ
とにより、図8(d)のような高さ付き下端データを生
成する。
Next, for i where h j [i]> 0, h
The average value of the position data in the connected component having a positive value of the height data h j to which j [i] belongs is written to a j [i].
Further, in order to correct a height shift caused by approximating the position of the lower end with height by a line segment, a j [i] −1
j [i] is added to hj [i]. The above processing is shown in FIG.
When applied to the height data and the position data of (b), the result is as shown in FIG. Then, L [i] [2j] = h
By setting j [i] and L [i] [2j + 1] = aj [i], lower end data with height as shown in FIG. 8D is generated.

【0025】次に、矩形近似処理103について説明す
る。前記線分検出処理102で得られた高さ付き下線デ
ータLから、同じ下線上のほぼ等しいセグメントを一つ
の矩形の下辺であると判断することにより矩形近似を行
ない、矩形近似データRを生成する。図9を用いて本処
理の内容について説明する。
Next, the rectangle approximation processing 103 will be described. From the underlined data L with height obtained in the line segment detection processing 102, a rectangle approximation is performed by determining a substantially equal segment on the same underline as the lower side of one rectangle to generate rectangle approximate data R. . The contents of this processing will be described with reference to FIG.

【0026】まず、高さ付き下線データLを高さ情報に
応じて細分する。高さ付き下線データLに記憶されてい
る各高さ付き下線を順番に参照する。L内の高さデータ
において、隣接画素間の高さの差分を高さのステップと
呼ぶことにし、高さのステップに関する閾値Tを用意す
る。各高さ付き下線を、高さのステップがT以上のとこ
ろで高さ付き下線片に細分割する。
First, the underlined data L with height is subdivided according to the height information. Each underline with height stored in the underline data with height L is sequentially referred to. In the height data in L, the difference in height between adjacent pixels is referred to as a height step, and a threshold T relating to the height step is prepared. Each underline with height is subdivided into underlined pieces with height where the height step is greater than or equal to T.

【0027】次に、各高さ付き下線片をもとに、矩形近
似データRを生成する。k番目に得られた高さ付き下線
片lk が、高さ付き下線データLにおいて、L[i]
[j](αk ≦i≦βk ,2nk ≦j≦2nk +1)で
表現されていた場合、xk =αk、yk =L[ak
[2nk +1]、wk =βk −αk +1、
Next, rectangular approximation data R is generated based on each underlined piece with height. The underlined piece l k with height obtained at the k-th is L [i] in the underlined data L with height.
[J] (α k ≦ i ≦ β k , 2n k ≦ j ≦ 2n k +1), x k = α k , y k = L [ ak ]
[2n k +1], w k = β k −α k +1,

【0028】[0028]

【数1】 (Equation 1)

【0029】とすれば、(xk ,yk )が矩形の左下の
頂点の座標、wk が矩形の幅、hk が矩形の高さを表し
ている。以上の処理を各高さ付き下線ごとに行ない、矩
形近似データRを、R[k][0]=xk 、R[k]
[1]=yk 、R[k][2]=wk 、R[k][3]
=hk とすることにより生成する。
Then, (x k , y k ) represents the coordinates of the lower left vertex of the rectangle, w k represents the width of the rectangle, and h k represents the height of the rectangle. The above processing is performed for each underline with height, and the rectangle approximate data R is obtained as R [k] [0] = x k , R [k]
[1] = y k , R [k] [2] = w k , R [k] [3]
= It is generated by the h k.

【0030】一例として、図9(a)の高さ付き下線デ
ータLを用いて、本処理の動作を説明する。ただし、高
さのステップに関する閾値をT=5とする。まず第1の
高さ付き下線のデータは、20≦x≦21、0≦y≦1
の位置にあり、高さのステップが5以上となる箇所はな
いので、一つの矩形で近似し、下線左端座標x0 =20
およびy0 =2、幅w0 =2、高さh0 =3を得る。次
に第2の高さ付き下線のデータは、6≦x≦16、3≦
y≦4の位置にあり、x=10とx=11の間の一箇所
だけで高さのステップがTを越える。従って、第2の高
さ付き下線のデータは、6≦x≦10と11≦x≦16
の部分に2分され、左側の高さ付き下線片に対して下線
左端座標x1 =6およびy1 =6、幅w1 =5、高さh
1 =10が得られ、右側の高さ付き下線片に対して下線
左端座標x2 =11およびy2 =6、幅w2 =6、高さ
2 =21を得る。第3の高さ付き下線のデータに対し
ても同様にして、下線左端座標x3 =0およびy3
9、幅w3 =4、高さh3 =9を得る。これらの結果か
ら図9(b)に示す矩形近似データRが生成される。
As an example, the operation of this processing will be described using underlined data L with height in FIG. Note that the threshold value for the height step is T = 5. First, the first underlined data with height is 20 ≦ x ≦ 21, 0 ≦ y ≦ 1
, And there is no place where the height step is 5 or more, so it is approximated by one rectangle, and the underlined left end coordinate x 0 = 20
And y 0 = 2, width w 0 = 2, and height h 0 = 3. Next, the data of the second underline with height is 6 ≦ x ≦ 16, 3 ≦
The height step exceeds T at only one location between x = 10 and x = 11 at y ≦ 4. Therefore, the data of the second underline with height is 6 ≦ x ≦ 10 and 11 ≦ x ≦ 16
, And the underlined left end coordinates x 1 = 6 and y 1 = 6, width w 1 = 5, height h with respect to the left underlined piece with height
1 = 10 is obtained, and the underlined left end coordinates x 2 = 11 and y 2 = 6, width w 2 = 6, and height h 2 = 21 are obtained for the right underlined piece with height. Similarly, for the data of the third underline with height, the underline left end coordinates x 3 = 0 and y 3 =
9, a width w 3 = 4 and a height h 3 = 9 are obtained. From these results, rectangular approximation data R shown in FIG. 9B is generated.

【0031】第2の発明の移動物体検出方法は、背景か
らの変動領域を2値化し第1の発明の領域検出方法を適
用することにより、移動物体を領域形状に忠実に検出す
ることを目的としている。本発明の一実施例について、
図2および図10を用いて説明する。ここで、図2は第
2の発明の移動物体検出方法の一実施例を示す流れ図で
あり、201は背景差分処理、202は2値化処理、2
03は領域検出処理、204は移動物体検出処理であ
る。また、図10は道路画像から車両を検出する場合を
例にとり、本実施例の動作を説明するための説明図であ
る。
A second object of the present invention is to detect a moving object faithfully in an area shape by binarizing a fluctuation area from the background and applying the area detection method of the first invention. And For one embodiment of the present invention,
This will be described with reference to FIGS. Here, FIG. 2 is a flowchart showing one embodiment of the moving object detection method according to the second invention, wherein 201 is a background difference process, 202 is a binarization process,
03 is an area detection process, and 204 is a moving object detection process. FIG. 10 is an explanatory diagram for explaining the operation of this embodiment, taking a case where a vehicle is detected from a road image as an example.

【0032】本実施例において、入力画像をI、背景画
像をB、背景差分画像をS、2値化画像をC、領域検出
データをRで表す。
In this embodiment, the input image is represented by I, the background image is represented by B, the background difference image is represented by S, the binarized image is represented by C, and the area detection data is represented by R.

【0033】本実施例では、移動物体を含まず背景のみ
から構成される背景画像Bを予め用意しておく。図10
(a)および図10(b)にそれぞれ入力画像Iおよび
背景画像Bの例を示す。
In this embodiment, a background image B which does not include a moving object and includes only a background is prepared in advance. FIG.
10A and 10B show examples of the input image I and the background image B, respectively.

【0034】まず、背景差分処理201について説明す
る。背景差分処理では、各画素において前記入力画像I
と前記背景画像Bの対応する画素値の差分の絶対値を対
応する画素値とする背景差分画像Sを生成する。図10
(a)の入力画像と図10(b)の背景画像を用いた場
合、背景差分画像は図10(c)のようになる。
First, the background difference processing 201 will be described. In the background subtraction processing, the input image I
And a background difference image S having an absolute value of a difference between corresponding pixel values of the background image B and a corresponding pixel value. FIG.
When the input image of (a) and the background image of FIG. 10B are used, the background difference image is as shown in FIG. 10C.

【0035】次に、2値化処理202では、前記背景差
分画像Sを参照して0および1の画素値で構成される2
値化画像Cを生成する。例えば、画素値に関する閾値T
を用意し、背景差分画像Sの各画素値がT以上かT未満
かに応じて、それぞれ対応する画素値を1あるいは0に
することにより、2値化画像Cを生成できる。図10
(c)の背景差分画像を2値化して得られる2値化画像
を図10(d)に示す。
Next, in the binarization process 202, a binary image comprising 0 and 1 pixel values is referred to the background difference image S.
Generate a digitized image C. For example, a threshold value T for a pixel value
Is prepared, and the corresponding pixel value is set to 1 or 0 in accordance with whether each pixel value of the background difference image S is equal to or greater than T or less than T, so that the binarized image C can be generated. FIG.
FIG. 10D shows a binarized image obtained by binarizing the background difference image of FIG.

【0036】次に、領域検出処理203では、前記2値
化画像の画素値1で構成される領域を、第1の発明の領
域検出方法により領域形状を近似する矩形群として検出
する。従って、本処理の一実施例として、第1の発明の
領域検出方法の実施例を採用できる。図10(d)の2
値化画像に第1の発明の領域検出方法を適用して得られ
る矩形群を、画像空間に再現したものを図10(e)に
示す。
Next, in the area detection processing 203, the area constituted by the pixel value 1 of the binarized image is detected as a group of rectangles approximating the area shape by the area detection method of the first invention. Therefore, the embodiment of the area detecting method of the first invention can be adopted as one embodiment of the present processing. 2 in FIG. 10 (d)
FIG. 10E shows a rectangle group obtained by applying the area detection method of the first invention to the quantified image in an image space.

【0037】そして、移動物体検出処理204では、前
記領域形状を近似する矩形群を参照し、所定の操作に従
い矩形群の変更を行ない、個々の移動物体に対応する領
域を生成して移動物体検出結果とする。矩形群の変更
作の例を以下にあげる。 (1)高さが閾値未満の矩形を消去する。 (2)矩形Aと矩形Bが下記3条件を満たす場合には、
矩形Aと矩形Bを消去し、これらの外接矩形Cを生成す
る。
In the moving object detecting process 204, the group of rectangles is changed according to a predetermined operation with reference to a group of rectangles approximating the region shape, and a region corresponding to each moving object is generated to detect the moving object. Result. An example of a change operation of a rectangle group is described below. (1) A rectangle whose height is less than the threshold is deleted. (2) When the rectangles A and B satisfy the following three conditions,
The rectangle A and the rectangle B are deleted, and the circumscribed rectangle C is generated.

【0038】(a)矩形Aの右端のx座標と矩形Bの左
端のx座標との差が閾値未満である。
(A) The difference between the x coordinate of the right end of rectangle A and the x coordinate of the left end of rectangle B is less than the threshold value.

【0039】(b)矩形Aおよび矩形Bの下端のy座標
の差が閾値未満である。
(B) The difference between the y-coordinates of the lower ends of the rectangles A and B is less than the threshold value.

【0040】(c)矩形Aおよび矩形Bの高さの差が閾
値未満である。 (3)矩形A、矩形Bおよび矩形Cが下記条件を満たす
場合、矩形Bを上下に二等分して得られる上側の矩形B
1 および下側の矩形B2 を生成し、矩形Bを消去し、矩
形Aと矩形B1 、および矩形B2 と矩形Cに対して
(2)の融合操作を行なう。
(C) The difference between the heights of the rectangles A and B is less than the threshold value. (3) When rectangles A, B, and C satisfy the following conditions, upper rectangle B obtained by bisecting rectangle B up and down
1 and generates a rectangular B 2 lower, erasing the rectangle B, performed rectangle A and the rectangle B 1, and the rectangular B 2 and with respect to the rectangular C fusion operations (2).

【0041】(a)矩形Aの右端のx座標と矩形Bの左
端のx座標との差が閾値未満である。
(A) The difference between the x coordinate of the right end of rectangle A and the x coordinate of the left end of rectangle B is less than the threshold value.

【0042】(b)矩形Bの右端のx座標と矩形Cの左
端のx座標との差が閾値未満である。
(B) The difference between the x coordinate of the right end of the rectangle B and the x coordinate of the left end of the rectangle C is less than the threshold value.

【0043】(c)矩形Aおよび矩形Bの上端のy座標
の差が閾値未満である。
(C) The difference between the y-coordinates of the upper ends of the rectangles A and B is less than the threshold value.

【0044】(d)矩形Bおよび矩形Cの下端のy座標
の差が閾値未満である。 図10(e)の矩形群に対して、上記3操作をもとに移
動物体検出処理を行ない、検出された移動物体を図10
(f)に示す。
(D) The difference between the y-coordinates of the lower ends of the rectangles B and C is less than the threshold value. A moving object detection process is performed on the rectangle group of FIG. 10E based on the above three operations, and the detected moving object is
(F).

【0045】第3の発明の移動物体検出方法は、動画像
からの移動物体の検出において、背景が安定しない場合
にも第2の発明と同じ効果を得るために、背景画像を生
成しつつ移動物体を検出することを目指した発明であ
る。また、第2の発明と同様に、第1の発明の領域検出
方法を利用することにより、移動物体の検出を領域形状
に忠実に行なうことを可能にしている。
In the moving object detection method according to the third aspect of the present invention, in the detection of a moving object from a moving image, even if the background is not stable, the moving object is detected while generating the background image so as to obtain the same effect as in the second aspect. This is an invention aimed at detecting an object. Further, similarly to the second aspect, by using the area detection method of the first aspect, it is possible to detect a moving object faithfully according to the area shape.

【0046】第3の発明の移動物体検出方法の一実施例
について、図3を用いて説明する。ここで、図3は第3
の発明の移動物体検出方法の一実施例を示す流れ図であ
り、301は背景生成処理、302は背景差分処理、3
03は2値化処理、304は領域検出処理、305は移
動物体検出処理である。
An embodiment of the moving object detecting method according to the third invention will be described with reference to FIG. Here, FIG.
3 is a flowchart showing an embodiment of a moving object detection method according to the present invention, wherein 301 is a background generation process, 302 is a background difference process,
03 is a binarization process, 304 is an area detection process, and 305 is a moving object detection process.

【0047】まず、図3の301の背景生成処理には、
一例として、特願平6−66950号に記載の「背景画
像生成方法および装置」にある背景画像の生成方法を利
用できる。
First, in the background generation processing of 301 in FIG.
As an example, the background image generation method described in “Background Image Generation Method and Apparatus” described in Japanese Patent Application No. 6-66950 can be used.

【0048】また図3の302、303、304、30
5の背景差分処理、2値化処理、領域検出処理、移動物
体検出処理に関しては、一例として前記第2の発明の実
施例と同様の手法を利用できる。
Further, 302, 303, 304, 30 in FIG.
Regarding the background subtraction processing, binarization processing, area detection processing, and moving object detection processing of 5, the same method as that of the embodiment of the second invention can be used as an example.

【0049】第4の発明の領域検出装置の一実施例につ
いて、図4、図7、図8および図9を用いて説明する。
ここで、図4は本実施例の構成図であり、401は入力
画像記憶手段、402は制御手段、403は下端検出手
段、404は下端検出結果記憶手段、405は線分近似
手段、406は線分近似結果記憶手段、407は矩形近
似手段、408は領域検出結果記憶手段である。また、
図7、図8および図9は、それぞれ図4に記載の下端検
出手段、線分近似手段および矩形近似手段の動作に関す
る説明図である。
An embodiment of the region detecting apparatus according to the fourth invention will be described with reference to FIGS. 4, 7, 8 and 9.
Here, FIG. 4 is a configuration diagram of the present embodiment, where 401 is input image storage means, 402 is control means, 403 is lower end detection means, 404 is lower end detection result storage means, 405 is line segment approximation means, and 406 is Line segment approximation result storage means, 407 is a rectangle approximation means, and 408 is an area detection result storage means. Also,
FIGS. 7, 8 and 9 are explanatory diagrams relating to the operations of the lower end detecting means, the line segment approximating means and the rectangular approximating means shown in FIG. 4, respectively.

【0050】本実施例の説明において、入力画像記憶手
段401が記憶する入力画像をI、下端検出結果記憶手
段が記憶する高さ付き下端画像をU、線分近似結果記憶
手段が記憶する高さ付き下線データをL、矩形近似結果
記憶手段が記憶する矩形近似データをRで表す。また、
画像Φの座標(x,y)における画素および画素値をΦ
(x,y)で表し、画像Φの{Φ(x,y)|x=i}
なる画素の集合を、Φの第i列と呼ぶことにする。本実
施例では入力画像Iの画像サイズをX×Yとし、tを線
分近似手段の動作で用いる近似許容幅、kをY/t以上
の最小の整数とする。このとき、高さ付き下線画像Uの
画像サイズはX×Y、高さ付き下線データLの画像サイ
ズはX×2k、矩形近似データRのy軸方向のサイズは
4でx軸方向は検出された矩形の数になる。入力画像I
のサイズは有限であるから、矩形の検出数の上限を見積
もることが可能である。
In the description of the present embodiment, the input image stored in the input image storage means 401 is I, the lower end image with height stored in the lower end detection result storage means is U, and the height stored in the line segment approximation result storage means. L represents the underlined data, and R represents the rectangular approximation data stored in the rectangular approximation result storage means. Also,
The pixel and pixel value at the coordinates (x, y) of the image Φ are Φ
(X, y) and {Φ (x, y) | x = i} of image Φ
Will be referred to as the i-th column of Φ. In this embodiment, the image size of the input image I is X × Y, t is an approximate allowable width used in the operation of the line segment approximating means, and k is a minimum integer equal to or more than Y / t. At this time, the image size of the underlined image with height U is X × Y, the image size of the underlined data L with height is X × 2k, the size of the approximate rectangle data R in the y-axis direction is 4, and the x-axis direction is detected. Number of rectangles. Input image I
Is finite, it is possible to estimate the upper limit of the number of detected rectangles.

【0051】まず、制御手段402の動作について説明
する。本実施例では、図4に示すように、制御手段40
2が下端検出手段403、線分近似手段405および矩
形近似手段407を制御し、各処理の順序を決定してい
る。すなわち制御手段402は、最初に下端検出手段4
03に起動信号を送信し、下端検出手段403からの終
了信号を受けたら線分近似手段405に起動信号を送信
し、線分近似手段405からの終了信号を受けたら矩形
近似手段407に起動信号を送信し、最後に矩形近似手
段407からの終了信号を受けたら全処理を終了する。
First, the operation of the control means 402 will be described. In this embodiment, as shown in FIG.
2 controls the lower end detection means 403, the line segment approximation means 405, and the rectangle approximation means 407, and determines the order of each processing. That is, the control means 402 first starts the lower end detection means 4
03, the start signal is transmitted to the line segment approximation unit 405 when the end signal is received from the lower end detection unit 403, and the start signal is transmitted to the rectangle approximation unit 407 when the end signal is received from the line segment approximation unit 405. Is transmitted, and when the end signal is finally received from the rectangle approximating means 407, the entire process is terminated.

【0052】次に、下端検出手段403の動作について
説明する。本手段は制御手段402からの起動信号を受
けて処理を開始し、入力画像記憶手段401が記憶して
いる入力画像Iを参照する。入力画像Iでは、検出した
い領域における画素値が1、それ以外の領域における画
素値が0であることが前提になっている。下端検出手段
403における処理は、2値の入力画像I内の画素値1
の各領域の下端に相当する各画素について該領域の該画
素の縦方向における高さを求め、該下端に対応する画素
には該領域の高さを画素値とし、それ以外は画素値を0
とする高さ付き下端画像を生成することを目的とする。
ここで、領域下端に所属する画素に対して、該領域の該
画素の縦方向における高さとは、y軸に平行な直線と該
領域との交わりの該画素を含む連結成分の長さを指して
いる。以下に具体的に処理を説明する。
Next, the operation of the lower end detecting means 403 will be described. This unit starts processing in response to a start signal from the control unit 402, and refers to the input image I stored in the input image storage unit 401. In the input image I, it is assumed that the pixel value in an area to be detected is 1 and the pixel value in other areas is 0. The processing in the lower end detecting means 403 is performed by using the pixel value 1 in the binary input image I.
For each pixel corresponding to the lower end of each area, the height of the pixel in the vertical direction of the area is determined, and for the pixel corresponding to the lower end, the height of the area is used as the pixel value.
It is an object to generate a height-added lower end image.
Here, for a pixel belonging to the lower end of the region, the height of the pixel in the vertical direction of the region indicates the length of a connected component including the pixel at the intersection of a straight line parallel to the y-axis and the region. ing. The processing will be specifically described below.

【0053】予め、下端検出結果記憶手段404の内容
である高さ付き下端画像Uの全画素を画素値0でクリア
しておく。本処理は入力画像Iの各列ごとに独立に行な
われるので、一例として第i列に関する処理を以下に述
べる。入力画像Iの第i列を注目列とし、注目列をその
上端からy軸方向、すなわち下方向へ走査し領域の高さ
をカウントする。高さカウントの初期値を0とし、以下
の処理を行なう。 (1)高さカウント値が0かつ注目画素値が0の場合、
何もしない。 (2)高さカウント値が0かつ注目画素値が1の場合、
領域上端を発見したと解釈し領域の高さカウント値を1
とする。 (3)高さカウント値が0でなく注目画素値が1である
場合、高さカウント値を1増やす。 (4)高さカウント値が0でなく注目画素値が0である
場合、注目画素の一つ上の画素が領域下端に相当してい
ると解釈し、該領域下端画素に対応する高さ付き下端画
像Uの画素に高さカウント値を書き込み、その後に高さ
カウント値を0にクリアする。 (5)画像の下端に達していない場合、次の画素に進み
(1)〜(4)の操作を行なう。画像の下端に達してい
る場合には注目列に関する処理を終了する。
All the pixels of the lower end image U with height, which is the contents of the lower end detection result storage means 404, are cleared with a pixel value of 0 in advance. Since this process is performed independently for each column of the input image I, the process for the i-th column will be described below as an example. The i-th column of the input image I is set as the column of interest, and the column of interest is scanned from its upper end in the y-axis direction, that is, downward, and the height of the region is counted. The initial value of the height count is set to 0, and the following processing is performed. (1) When the height count value is 0 and the target pixel value is 0,
do nothing. (2) When the height count value is 0 and the pixel value of interest is 1,
Interpret that the top edge of the area was found and set the area height count value to 1.
And (3) If the height count value is not 0 and the pixel value of interest is 1, the height count value is increased by one. (4) If the height count value is not 0 and the pixel value of interest is 0, it is interpreted that the pixel immediately above the pixel of interest corresponds to the lower end of the region, and a height corresponding to the lower end pixel of the region is added. The height count value is written to the pixels of the lower end image U, and thereafter, the height count value is cleared to zero. (5) When the lower end of the image has not been reached, the process proceeds to the next pixel and the operations (1) to (4) are performed. If it has reached the lower end of the image, the processing for the column of interest ends.

【0054】上記処理の一例を図7に示す。図7では、
入力画像記憶手段401の内容である入力画像をI、お
よび下端検出結果記憶手段404の内容である高さ付き
下端画像Uの注目列のみを、それぞれ(a)および
(c)に表示している。また、画素値は0≦y≦2につ
いては0、3≦y≦8については1、9≦y≦11につ
いては0となっており、画素値1の部分の高さは6画素
である。図7(b)のカウンタの値は、各画素を走査す
るときの高さカウンタの処理前後の値を示している。従
って、出力される高さ付き下端画像Uの第i列における
画素値は、y=8の画素のみ6で他は0となっている。
FIG. 7 shows an example of the above processing. In FIG.
Only the input image as the content of the input image storage means 401 and the column of interest of the height-added lower image U as the content of the lower edge detection result storage means 404 are displayed in (a) and (c), respectively. . The pixel value is 0 for 0 ≦ y ≦ 2, 1 for 3 ≦ y ≦ 8, and 0 for 9 ≦ y ≦ 11, and the height of the pixel value 1 portion is 6 pixels. The value of the counter in FIG. 7B indicates the value before and after the processing of the height counter when scanning each pixel. Accordingly, the pixel value in the i-th column of the output lower end image U with height is 6 for only the pixel of y = 8 and 0 for the other pixels.

【0055】以上の処理を各列について行なうことによ
り、高さ付き下端画像Uの各画素では、入力画像の画素
値1の領域の下端に対応している画素はその領域の高さ
を画素値に持ち、それ以外の画素値は0となる。下端検
出手段403は以上の処理を終了したら、制御手段40
2に終了信号を送信する。
By performing the above processing for each column, in each pixel of the lower end image U with height, the pixel corresponding to the lower end of the area of the input image having the pixel value 1 is set to the pixel value of the area. , And the other pixel values are 0. When the above processing is completed, the lower end detecting means 403
2 is sent an end signal.

【0056】以上の下端検出手段403の動作におい
て、各列に関する処理は独立に行なわれるため、これら
の処理を並列に行なう構成とすることも可能である。
In the above operation of the lower end detecting means 403, the processing for each column is performed independently, so that it is possible to adopt a configuration in which these processings are performed in parallel.

【0057】次に、線分近似手段405の動作について
説明する。本手段は制御手段402からの起動信号を受
けて処理を開始する。本手段における処理は、下端検出
結果記憶手段404の内容である高さ付き下端画像Uを
所定のブロックに分割し、各ブロックごとに高さ付き下
端を線分で近似して得られる。下線の位置と領域の高さ
を表現する高さ付き下線データLを生成することを目的
とする。下端検出結果記憶手段404が記憶する高さ付
き下端画像U内の下端は、正確な線分ではなく上下の変
動を含んでいる。この変動を吸収し、下端を線分として
認識するのが本処理の主旨である。図8を用いて本処理
の内容について説明する。
Next, the operation of the line segment approximating means 405 will be described. This unit starts processing upon receiving a start signal from the control unit 402. The processing in this means is obtained by dividing the lower end image U with height, which is the content of the lower end detection result storage means 404, into predetermined blocks, and approximating the lower end with height for each block by a line segment. It is an object to generate underlined data L with height expressing the position of the underline and the height of the area. The lower end in the lower end image U with height stored by the lower end detection result storage unit 404 includes not a precise line segment but a vertical fluctuation. The purpose of this processing is to absorb this fluctuation and recognize the lower end as a line segment. The contents of this processing will be described with reference to FIG.

【0058】前述のとおり、高さ付き下端画像Uのサイ
ズをX×Y、近似許容幅をt、Y/t以上の最小の整数
をkとする。図8(a)のように、高さ付き下端画像U
をX×tのブロックに分割する。すなわち、第jブロッ
クBj を{U(x,y)|jt≦y<(j+1)t}な
る画素の集合とする。ただし、Bk-1 ={U(x,y)
|(k−1)t≦y≦Y}とする。このとき、ブロック
数はkである。
As described above, the size of the lower end image U with height is X × Y, the approximate allowable width is t, and the minimum integer equal to or larger than Y / t is k. As shown in FIG.
Is divided into X × t blocks. That is, the j-th block B j is a set of pixels satisfying {U (x, y) | jt ≦ y <(j + 1) t}. Where B k-1 = {U (x, y)
| (K-1) t ≦ y ≦ Y}. At this time, the number of blocks is k.

【0059】同一ブロック内に含まれる連続する各高さ
付き下線片を、それぞれ一つの高さ付き線分で近似す
る。Bj 内の高さ付き下線片を高さ付き線分で近似する
処理について説明する。まず、それぞれサイズX×1の
高さデータhj 、位置データlj および平均位置データ
j を用意し、Bj の第i列に対応する高さデータhj
および位置データlj および平均位置データaj の値
を、それぞれhj [i]およびlj [i]およびa
j [i]で表す。検索ウインドウ内で、各iについて、
j の第i列を上から下へ向かって走査し、hj [i]
に画素値の総和を書き込み、lj [i]内に0でない画
素値のラインアドレスの最大値を書き込む。これによ
り、高さ付き下端片の高さの情報が高さデータhj に記
録され、位置が位置データlj に記録される。以上の処
理を図8(a)の検索ブロックについて行なうと、図8
(b)のようになる。
Each successive underlined piece with height included in the same block is approximated by one line segment with height. The process of approximating the underlined piece with height in B j with a line segment with height will be described. First, height data h j , position data l j and average position data a j of size X × 1 are prepared, and height data h j corresponding to the ith column of B j are prepared.
And the values of the position data l j and the average position data a j are given by h j [i], l j [i] and a j , respectively.
j Represented by [i]. In the search window, for each i,
Scan the ith column of B j from top to bottom, h j [i]
And the maximum value of the line address of the pixel value other than 0 is written in l j [i]. Accordingly, the height of the height information with lower piece is recorded in the height data h j, the position is recorded in the position data l j. When the above processing is performed for the search block in FIG.
(B).

【0060】次に、hj [i]>0なるiに対して、h
j [i]が所属する高さデータの正値なる連結成分にお
ける位置データの平均値をaj [i]に書き込む。ま
た、高さ付き下端の位置を線分で近似することにより生
じる高さのずれを補正するため、aj [i]−l
j [i]をhj [i]に加算する。上記処理を図8
(b)の高さデータおよび位置データに適用すると、図
8(c)のようになる。そして、L[i][2n]=h
j [i]、L[i][2n+1]=aj [i]とするこ
とにより、図8(d)のような高さ付き下端データLを
生成する。
Next, for i where h j [i]> 0, h
The average value of the position data in the positive connected component of the height data to which j [i] belongs is written to a j [i]. Further, in order to correct a height shift caused by approximating the position of the lower end with height by a line segment, a j [i] −1
j [i] is added to hj [i]. The above processing is shown in FIG.
When applied to the height data and the position data of (b), the result is as shown in FIG. Then, L [i] [2n] = h
By setting j [i] and L [i] [2n + 1] = a j [i], lower end data L with height as shown in FIG. 8D is generated.

【0061】以上の処理が終了したら、線分近似手段4
05は制御手段402へ終了信号を送信する。
When the above processing is completed, the line segment approximating means 4
05 transmits an end signal to the control means 402.

【0062】以上の線分近似手段405における処理に
おいて、hj ,lj 、aj の各データを格納する記録領
域は、各ブロックごとに独立の領域を確保する構成が可
能だが、各ブロックごとの処理をブロック間で並列的に
ではなく順番に行なうならば、ブロック番号jによらず
同一の領域を利用する構成も可能である。
In the processing by the line segment approximating means 405, the recording area for storing the data of h j , l j , and a j can be configured to secure an independent area for each block. Are performed in order, not in parallel, between blocks, it is also possible to use the same area regardless of the block number j.

【0063】次に、矩形近似手段407の動作について
説明する。本手段は制御手段402からの起動信号を受
けて処理を開始する。線分検出結果記録手段406が記
憶する高さ付き下線データLから、同じ下線上の高さの
ほぼ等しいセグメントを一つの矩形の下辺であると判断
することにより矩形近似処理を行ない、矩形近似データ
Rを生成する。図9を用いて矩形近似処理の内容につい
て説明する。
Next, the operation of the rectangular approximation means 407 will be described. This unit starts processing upon receiving a start signal from the control unit 402. From the underlined data L with height stored in the line segment detection result recording unit 406, a rectangle approximation process is performed by determining that a segment having substantially the same height on the same underline is the lower side of one rectangle. Generate R. The details of the rectangle approximation processing will be described with reference to FIG.

【0064】まず、高さ付き下線データLを高さ情報に
応じて細分する。高さ付き下線データLに記憶されてい
る各高さ付き下線を順番に参照する。L内の高さデータ
において、隣接画素間の高さの差分を高さのステップと
呼ぶことにし、高さのステップに関する閾値Tを用意す
る。各高さ付き下線を、高さのステップがT以上のとこ
ろで高さ付き下線片に細分割する。
First, the underlined data L with height is subdivided according to the height information. Each underline with height stored in the underline data with height L is sequentially referred to. In the height data in L, the difference in height between adjacent pixels is referred to as a height step, and a threshold T relating to the height step is prepared. Each underline with height is subdivided into underlined pieces with height where the height step is greater than or equal to T.

【0065】次に、各高さ付き下線片をもとに、矩形近
似データRを生成する。k番目に得られた高さ付き下線
片lk が、高さ付き下線データLにおいて、L[i]
[j](αk ≦i≦βk ,2nk ≦j≦2nk +1)で
表現されていた場合、xk =αk 、yk =L[αk
[2nk +1]、wk =βk −αk +1、
Next, approximate rectangular data R is generated based on each underlined piece with height. The underlined piece l k with height obtained at the k-th is L [i] in the underlined data L with height.
[J] (α k ≦ i ≦ β k , 2n k ≦ j ≦ 2n k +1), x k = α k , y k = L [α k ]
[2n k +1], w k = β k −α k +1,

【0066】[0066]

【数2】 (Equation 2)

【0067】とすれば、(xk ,yk )が矩形の左下の
頂点の座標、wk が矩形の幅、hk が矩形の高さを表し
ている。以上の処理を各高さ付き下線ごとに行ない、矩
形近似データRを、R[k][0]=xk 、R[k]
[1]=yk 、R[k][2]=wk 、R[k][3]
=hk とすることにより生成する。
Then, (x k , y k ) represents the coordinates of the lower left vertex of the rectangle, w k represents the width of the rectangle, and h k represents the height of the rectangle. The above processing is performed for each underline with height, and the rectangle approximate data R is obtained as R [k] [0] = x k , R [k]
[1] = y k , R [k] [2] = w k , R [k] [3]
= It is generated by the h k.

【0068】一例として、図9(a)の高さ付き下線デ
ータLを用いて、本処理の動作を説明する。ただし、高
さのステップに関する閾値をT=5とする。まず第1の
高さ付き下線のデータは、20≦x≦21、0≦y≦1
の位置にあり、高さのステップが5以上となる箇所はな
いので、一つの矩形で近似し、下線左端座標x0 =20
およびy0 =2、幅w0 =2、高さh0 =3を得る。次
に第2の高さ付き下線のデータは、6≦x≦16、3≦
y≦4の位置にあり、x=10とx=11の間の一箇所
だけで高さのステップがTを越える。従って、第2の高
さ付き下線のデータは、6≦x≦10と11≦y≦16
の部分に2分され、左側の高さ付き下線片に対して下線
左端座標x1 =6およびy1 =6、幅w1 =5、高さh
1 =10が得られ、右側の高さ付き下線片に対して下線
左端座標x2 =11およびy2 =6、幅w2 =6、高さ
2 =21を得る。第3の高さ付き下線のデータに対し
ても同様にして、下線左端座標x3 =0およびy3
9、幅w3 =4、高さh3 =9を得る。これらの結果か
ら図9(b)に示す矩形近似データRが生成される。
As an example, the operation of this processing will be described using underlined data L with height in FIG. Note that the threshold value for the height step is T = 5. First, the first underlined data with height is 20 ≦ x ≦ 21, 0 ≦ y ≦ 1
, And there is no place where the height step is 5 or more, so it is approximated by one rectangle, and the underlined left end coordinate x 0 = 20
And y 0 = 2, width w 0 = 2, and height h 0 = 3. Next, the data of the second underline with height is 6 ≦ x ≦ 16, 3 ≦
The height step exceeds T at only one location between x = 10 and x = 11 at y ≦ 4. Therefore, the data of the second underline with height is 6 ≦ x ≦ 10 and 11 ≦ y ≦ 16
, And the underlined left end coordinates x 1 = 6 and y 1 = 6, width w 1 = 5, height h with respect to the left underlined piece with height
1 = 10 is obtained, and the underlined left end coordinates x 2 = 11 and y 2 = 6, width w 2 = 6, and height h 2 = 21 are obtained for the right underlined piece with height. Similarly, for the data of the third underline with height, the underline left end coordinates x 3 = 0 and y 3 =
9, a width w 3 = 4 and a height h 3 = 9 are obtained. From these results, rectangular approximation data R shown in FIG. 9B is generated.

【0069】以上により生成された矩形データRを領域
検出結果記憶手段408に記憶する。また、以上の全処
理を終了したら、矩形近似手段407は制御手段402
に終了信号を送信する。
The rectangular data R generated as described above is stored in the area detection result storage means 408. When all of the above processes have been completed, the rectangle approximating unit 407 returns to the control unit 402.
To send an end signal.

【0070】第5の発明の移動物体検出装置の一実施例
について、図5および図10を用いて説明する。ここ
で、図5は第5の発明の移動物体検出装置の一実施例を
示す構成図であり、501は入力画像記憶手段、502
は背景画像記憶手段、503は制御手段、504は背景
差分手段、505は背景差分結果記憶手段、506は2
値化手段、507は2値化画像記憶手段、508は領域
検出手段、509は領域検出結果記憶手段、510は移
動物体検出手段、511は移動物体検出結果記憶手段で
ある。また、図10は道路画像から車両を検出する場合
を例にとり、本実施例における移動物体検出装置の動作
を説明するための説明図である。
An embodiment of the moving object detecting apparatus according to the fifth invention will be described with reference to FIGS. Here, FIG. 5 is a configuration diagram showing an embodiment of the moving object detection device according to the fifth invention, wherein 501 is an input image storage means, 502
Is a background image storage means, 503 is a control means, 504 is a background difference means, 505 is a background difference result storage means, and 506 is 2
A binarizing unit, 507 is a binarized image storing unit, 508 is a region detecting unit, 509 is a region detecting result storing unit, 510 is a moving object detecting unit, and 511 is a moving object detecting result storing unit. FIG. 10 is an explanatory diagram for explaining the operation of the moving object detection device according to the present embodiment, taking as an example a case where a vehicle is detected from a road image.

【0071】本実施例の説明において、入力画像記憶手
段501が記憶する入力画像をI、背景画像記憶手段5
02が記憶する背景画像をB、背景差分結果記憶手段5
05が記憶する背景差分結果画像をS、2値化画像記憶
手段507が記憶する2値化画像をC、領域検出結果記
憶手段509が記憶する領域検出結果データをR、移動
物体検出結果記憶手段511が記憶する移動物体検出結
果データをMで表す。また、画像Φの座標(x,y)に
おける画素および画素値をΦ(x,y)で表し、本実施
例では入力画像Iの画像サイズをX×Yとする。このと
き、背景画像B、背景差分結果画像S、および2値化画
像Cの画像サイズは全てX×Yになる。また、領域検出
結果データRおよび移動物体検出結果データMの内容
は、これらの結果を表現する矩形の位置と大きさであ
り、これらのデータのy軸方向のサイズは4でx軸方向
は検出された矩形の数になる。
In the description of this embodiment, the input image stored in the input image storage means 501 is I, and the background image storage means 5
02 is B, the background difference result storage means 5
S, the background difference result image stored in the area 05 is C, the binarized image stored in the binarized image storage means 507 is C, the area detection result data stored in the area detection result storage means 509 is R, and the moving object detection result storage means. The moving object detection result data stored in 511 is represented by M. Further, a pixel and a pixel value at the coordinates (x, y) of the image Φ are represented by Φ (x, y), and in this embodiment, the image size of the input image I is X × Y. At this time, the image sizes of the background image B, the background difference result image S, and the binarized image C are all X × Y. The contents of the region detection result data R and the moving object detection result data M are the position and size of a rectangle expressing these results. The size of these data in the y-axis direction is 4 and the data in the x-axis direction is detected. Number of rectangles.

【0072】本実施例では、移動物体を全く含まず背景
のみから構成される画像を予め用意し、背景画像Bとし
て背景画像記憶手段502に記憶しておく。図10
(a)および図10(b)にそれぞれ入力画像記憶手段
501の内容である入力画像I、および背景画像記憶手
段502の内容である背景画像Bの例を示す。
In this embodiment, an image composed of only the background without any moving object is prepared in advance, and stored in the background image storage means 502 as the background image B. FIG.
10A and 10B show an example of an input image I as the content of the input image storage means 501 and an example of a background image B as the content of the background image storage means 502, respectively.

【0073】まず、制御手段503の動作について説明
する。本実施例では、図5に示すように、制御手段50
3が背景差分手段504、2値化手段506、領域検出
手段508および移動物体検出手段510を制御し、各
処理の順序を決定している。すなわち制御手段503
は、最初に背景差分手段504に起動信号を送信し、背
景差分手段504からの終了信号を受けたら2値化手段
506に起動信号を送信し、2値化手段506からの終
了信号を受けたら領域検出手段508に起動信号を送信
し、領域検出手段508からの終了信号を受けたら移動
物体検出手段510に起動信号を送信し、最後に移動物
体検出手段510からの終了信号を受けたら全処理を終
了する。
First, the operation of the control means 503 will be described. In the present embodiment, as shown in FIG.
3 controls the background subtraction unit 504, the binarization unit 506, the area detection unit 508, and the moving object detection unit 510, and determines the order of each processing. That is, the control means 503
Transmits an activation signal to the background subtraction means 504 first, transmits an activation signal to the binarization means 506 when receiving an end signal from the background subtraction means 504, and transmits an activation signal to the binarization means 506 when receiving an end signal from the binarization means 506. An activation signal is transmitted to the area detection means 508, and when an end signal is received from the area detection means 508, an activation signal is transmitted to the moving object detection means 510. When an end signal is finally received from the moving object detection means 510, all processes are performed. To end.

【0074】次に、背景差分手段504の動作について
説明する。本手段は制御手段503からの起動信号を受
けて処理を開始し、各画素(i,j)において、入力画
像記憶手段501に記憶されている入力画像Iの画素値
I(i,j)と背景画像記憶手段502に記憶されてい
る背景画像Bの画素値B(i,j)との差分の絶対値|
I(i,j)−B(i,j)|を対応する画素値S
(i,j)として背景差分画像Sを生成し、背景差分結
果記憶手段505に記憶する。図10(a)の入力画像
Iと図10(b)の背景画像Bを用いた場合、背景差分
画像Sは図10(c)のようになる。以上の処理が終了
したら、背景差分手段504は終了信号を制御手段50
3に送信する。
Next, the operation of the background subtraction means 504 will be described. This means starts processing in response to a start signal from the control means 503, and in each pixel (i, j), the pixel value I (i, j) of the input image I stored in the input image storage means 501 and Absolute value | of difference from pixel value B (i, j) of background image B stored in background image storage unit 502
I (i, j) -B (i, j) |
A background difference image S is generated as (i, j) and stored in the background difference result storage unit 505. When the input image I of FIG. 10A and the background image B of FIG. 10B are used, the background difference image S is as shown in FIG. When the above processing is completed, the background difference means 504 sends an end signal to the control means 50.
Send to 3.

【0075】以上の背景差分手段504における背景差
分処理では、各画素について独立の処理を行なうため、
各画素を走査しながら処理を順番に行なう構成も可能だ
が、各画素ごとの処理を並列に行なう構成も可能であ
る。
In the background subtraction processing by the background subtraction means 504, since independent processing is performed for each pixel,
While a configuration in which processing is performed sequentially while scanning each pixel is possible, a configuration in which processing for each pixel is performed in parallel is also possible.

【0076】次に、2値化手段506の動作について説
明する。本手段は制御手段503からの起動信号を受け
て処理を開始し、背景差分画像記憶手段505に記憶さ
れている背景差分画像Sを参照して0および1の画素値
で構成される2値化画像を生成し、2値化画像記憶手段
507に記憶する。例えば、画素値に関する閾値Tを用
意し、背景差分画像Sの各画素値S(i,j)がT以上
かT未満かに応じて、それぞれ対応する画素値C(i,
j)を1あるいは0にすることにより、2値化画像Cを
生成できる。すなわち、2値化画像Cは、背景差分値が
大きく移動物体が撮像されていると考えられる領域にお
いて画素値が1となっており、背景差分値が小さく背景
が撮像されていると考えられる領域において画素値が0
となっている画像である。図10(c)の背景差分画像
Sを2値化して得られる2値化画像Cを図10(d)に
示す。以上の処理が終了したら、2値化手段506は終
了信号を制御手段503に送信する。
Next, the operation of the binarizing means 506 will be described. This means starts the processing in response to the activation signal from the control means 503, and refers to the background difference image S stored in the background difference image storage means 505 to perform binarization comprising 0 and 1 pixel values. An image is generated and stored in the binarized image storage unit 507. For example, a threshold value T for a pixel value is prepared, and the corresponding pixel value C (i,
By setting j) to 1 or 0, a binary image C can be generated. That is, in the binarized image C, the pixel value is 1 in an area where the background difference value is large and the moving object is considered to be imaged, and the area where the background difference value is small and the background is considered to be imaged. Pixel value is 0 at
The image is FIG. 10D shows a binarized image C obtained by binarizing the background difference image S in FIG. 10C. When the above processing is completed, the binarizing unit 506 transmits an end signal to the control unit 503.

【0077】以上の2値化手段506における2値化処
理では、各画素について独立の処理を行なうため、各画
素を走査しながら処理を順番に行なう構成も可能だが、
各画素ごとの処理を並列に行なう構成も可能である。
In the above-described binarization processing by the binarization means 506, since independent processing is performed for each pixel, a configuration in which processing is performed sequentially while scanning each pixel is possible.
A configuration in which processing for each pixel is performed in parallel is also possible.

【0078】次に、領域検出手段508の動作について
説明する。本手段は制御手段503からの起動信号を受
けて処理を開始し、前記2値化画像記憶手段に記憶され
ている2値化画像Cの画素値1で構成される領域を、第
4の発明の領域検出装置を用いて領域形状を近似する矩
形群を検出し、領域検出結果データRとして領域検出結
果記憶手段509に記憶する。本手段の一実施例とし
て、第4の発明の領域検出装置の実施例を採用できる。
図10(d)の2値化画像に第4の発明の領域検出装置
を適用して得られる矩形群を、画像空間に再現したもの
を図10(e)に示す。以上の処理が終了したら、領域
検出手段508は終了信号を制御手段503に送信す
る。
Next, the operation of the area detecting means 508 will be described. The present means starts processing in response to a start signal from the control means 503, and stores the area constituted by the pixel value 1 of the binarized image C stored in the binarized image storage means in the fourth invention. A group of rectangles approximating the region shape is detected using the region detection device of (1), and is stored in the region detection result storage means 509 as region detection result data R. As one embodiment of the present means, the embodiment of the area detecting device of the fourth invention can be adopted.
FIG. 10E shows a rectangle group obtained by applying the region detection device of the fourth invention to the binarized image of FIG. 10D in an image space. When the above processing is completed, the area detecting means 508 sends an end signal to the control means 503.

【0079】次に、移動物体検出手段510の動作につ
いて説明する。本手段は制御手段503からの起動信号
を受けて処理を開始し、領域検出結果記憶手段509に
記憶されている領域検出結果データRに記述されている
領域形状を近似する矩形群を参照し、所定の操作に従い
矩形群の変更を行ない、個々の移動物体に対応する領域
を生成して移動物体検出結果データMとし、移動物体検
出結果記憶手段511に記憶する。矩形群の変更操作の
例を以下にあげる。 (1)高さが閾値未満の矩形を消去する。 (2)矩形Aと矩形Bが下記3条件を満たす場合には、
矩形Aと矩形Bを消去し、これらの外接矩形Cを生成す
る。
Next, the operation of the moving object detecting means 510 will be described. The present means starts processing in response to a start signal from the control means 503, and refers to a group of rectangles approximating the area shape described in the area detection result data R stored in the area detection result storage means 509, The rectangle group is changed in accordance with a predetermined operation, an area corresponding to each moving object is generated and stored as moving object detection result data M in the moving object detection result storage unit 511. An example of a change operation of a rectangle group is given below. (1) A rectangle whose height is less than the threshold is deleted. (2) When the rectangles A and B satisfy the following three conditions,
The rectangle A and the rectangle B are deleted, and the circumscribed rectangle C is generated.

【0080】(a)矩形Aの右端のx座標と矩形Bの左
端のx座標との差が閾値未満である。
(A) The difference between the x coordinate at the right end of rectangle A and the x coordinate at the left end of rectangle B is less than the threshold value.

【0081】(b)矩形Aおよび矩形Bの下端のy座標
の差が閾値未満である。
(B) The difference between the y coordinates of the lower ends of the rectangles A and B is less than the threshold value.

【0082】(c)矩形Aおよび矩形Bの高さの差が閾
値未満である。 (3)矩形A、矩形Bおよび矩形Cが下記条件を満たす
場合、矩形Bを上下に二等分して得られる上側の矩形B
1 および下側の矩形B2 を生成し、矩形Bを消去し、矩
形Aと矩形B1 、および矩形B2 と矩形Cに対して
(2)の融合操作を行なう。
(C) The difference between the heights of the rectangles A and B is less than the threshold value. (3) When rectangles A, B, and C satisfy the following conditions, upper rectangle B obtained by bisecting rectangle B up and down
1 and generates a rectangular B 2 lower, erasing the rectangle B, performed rectangle A and the rectangle B 1, and the rectangular B 2 and with respect to the rectangular C fusion operations (2).

【0083】(a)矩形Aの右端のx座標と矩形Bの左
端のx座標との差が閾値未満である。
(A) The difference between the x coordinate at the right end of rectangle A and the x coordinate at the left end of rectangle B is less than the threshold value.

【0084】(b)矩形Bの右端のx座標と矩形Cの左
端のx座標との差が閾値未満である。
(B) The difference between the x coordinate of the right end of rectangle B and the x coordinate of the left end of rectangle C is less than the threshold value.

【0085】(c)矩形Aおよび矩形Bの上端のy座標
の差が閾値未満である。
(C) The difference between the y-coordinates of the upper ends of the rectangles A and B is less than the threshold value.

【0086】(d)矩形Bおよび矩形Cの下短のy座標
の差が閾値未満である。 図10(e)に示す領域検出結果データRに相当する矩
形群に対して、上記3操作をもとに本手段により得られ
た移動物体検出データMに相当する矩形群を図10
(f)に示す。以上の処理が終了したら、移動物体検出
手段510は終了信号を制御手段503に送信する。
(D) The difference between the lower y coordinates of the rectangle B and the rectangle C is smaller than the threshold value. A rectangle group corresponding to the moving object detection data M obtained by the present means based on the above three operations is compared with a rectangle group corresponding to the area detection result data R shown in FIG.
(F). When the above processing is completed, the moving object detection unit 510 transmits an end signal to the control unit 503.

【0087】第6の発明の移動物体検出装置の一実施例
について、図6を用いて説明する。ここで、図6は第6
の発明の移動物体検出装置の一実施例を示す構成図であ
り、601は入力画像記憶手段、602は制御手段、6
03は背景画像生成手段、604は背景画像記憶手段、
605は背景差分手段、606は背景差分結果記憶手
段、607は2値化手段、608は2値化画像記憶手
段、609は領域検出手段、610は領域検出結果記憶
手段、611は移動物体検出手段、612は移動物体検
出結果記憶手段である。
An embodiment of the moving object detecting apparatus according to the sixth invention will be described with reference to FIG. Here, FIG.
1 is a configuration diagram showing an embodiment of a moving object detection device according to the present invention, wherein 601 is an input image storage unit, 602 is a control unit, and 6
03 is a background image generation means, 604 is a background image storage means,
605 is a background difference means, 606 is a background difference result storage means, 607 is a binarization means, 608 is a binarized image storage means, 609 is an area detection means, 610 is an area detection result storage means, and 611 is a moving object detection means , 612 are moving object detection result storage means.

【0088】まず、制御手段602の動作について説明
する。本実施例では、図6に示すように、制御手段60
2が背景画像生成手段603、背景差分手段605、2
値化手段607、領域検出手段609および移動物体検
出手段611を制御し、各処理の順序を決定している。
すなわち制御手段602は、最初に背景画像生成手段6
03に起動信号を送信し、背景画像生成手段603から
の終了信号を受けたら背景差分手段605に起動信号を
送信し、背景差分手段605からの終了信号を受けたら
2値化手段607に起動信号を送信し、2値化手段60
7からの終了信号を受けたら領域検出手段609に起動
信号を送信し、領域検出手段609からの終了信号を受
けたら移動物体検出手段611に起動信号を送信し、最
後に移動物体検出手段611からの終了信号を受けたら
全処理を終了する。
First, the operation of the control means 602 will be described. In the present embodiment, as shown in FIG.
2 is a background image generating means 603, a background subtracting means 605, 2
It controls the value conversion means 607, the area detection means 609, and the moving object detection means 611, and determines the order of each processing.
That is, the control unit 602 first sets the background image generation unit 6
03, the start signal is transmitted to the background subtraction unit 605 when the end signal is received from the background image generation unit 603, and the start signal is transmitted to the binarization unit 607 when the end signal is received from the background difference unit 605. And the binarizing means 60
7 receives an end signal from the area detecting means 609, receives an end signal from the area detecting means 609, transmits an activation signal to the moving object detecting means 611, and finally transmits a starting signal from the moving object detecting means 611. When the end signal is received, the entire process is terminated.

【0089】次に、背景画像生成手段603の動作につ
いて説明する。本手段は制御手段602からの起動信号
を受けて処理を開始し、入力画像記憶手段601が記憶
している入力画像および背景画像記憶手段604が記憶
している背景画像を参照し、新たな背景画像を生成して
背景画像記憶手段604に記憶する。ここで、背景画像
の生成方法の一例として、特願平6−66950号に記
載の「背景画像生成方法および装置」にある背景画像の
生成方法を利用できる。以上の処理が終了したら、背景
画像生成手段603は終了信号を制御手段602に送信
する。
Next, the operation of the background image generating means 603 will be described. The present means starts processing in response to a start signal from the control means 602, refers to the input image stored in the input image storage means 601 and the background image stored in the background image storage means 604, and creates a new background image. An image is generated and stored in the background image storage unit 604. Here, as an example of a background image generation method, a background image generation method described in “Background Image Generation Method and Apparatus” described in Japanese Patent Application No. 6-66950 can be used. When the above processing is completed, the background image generation unit 603 transmits an end signal to the control unit 602.

【0090】また、背景差分手段605、2値化手段6
07、領域検出手段609、移動物体検出手段611の
動作、および背景差分結果記憶手段606、2値化画像
記憶手段608、領域検出結果記憶手610、移動物体
検出結果記憶手段612の役割に関しては、前記第5の
発明の実施例と同様の手法を利用できる。
The background difference means 605 and the binarization means 6
07, the operation of the area detecting means 609, the operation of the moving object detecting means 611, and the roles of the background difference result storing means 606, the binarized image storing means 608, the area detecting result storing means 610, and the moving object detecting result storing means 612, The same method as that of the fifth embodiment can be used.

【0091】[0091]

【発明の効果】第1の発明の領域検出方法および第4の
発明の装置を利用すると、画素値0および1からなる2
値画像から、画素値1で構成される領域の形状を近似す
る矩形群を検出することが可能になるため、形状を表現
しつつ領域を検出することが可能である。
By using the area detection method of the first invention and the device of the fourth invention, two pixels consisting of pixel values 0 and 1 are used.
Since it is possible to detect, from the value image, a group of rectangles approximating the shape of the area formed by the pixel value 1, it is possible to detect the area while expressing the shape.

【0092】また、第2の発明の移動物体検出方法およ
び第5の発明の移動物体検出装置を利用すると、濃淡画
像の中に複数存在し得る移動物体に相当する領域形状
を、移動物体が重複して撮影されている場合にも、個別
の矩形で近似して検出することが可能である。
Further, when the moving object detecting method of the second invention and the moving object detecting device of the fifth invention are used, the moving object overlaps the region shape corresponding to a plurality of moving objects that can exist in the grayscale image. Even when the image is taken with the camera, it can be detected by approximating it with an individual rectangle.

【0093】また、第3の発明の移動物体検出方法およ
び第6の発明の移動物体検出装置を利用すると、背景画
像を生成しつつ第2の発明および第5の発明と同様にし
て移動物体の検出を行なうため、不安定な撮影条件で入
力された濃淡画像の中に、複数存在し得る移動物体に相
当する領域形状を、移動物体が重複して撮影されている
場合にも、個別の矩形で近似して検出することが可能で
ある。
Further, when the moving object detecting method of the third invention and the moving object detecting device of the sixth invention are used, a moving object can be detected in the same manner as in the second and fifth inventions while generating a background image. In order to perform detection, a region shape corresponding to a plurality of moving objects that may exist in a grayscale image input under unstable shooting conditions can be separated into individual rectangles even when the moving object is overlapped. Can be approximated and detected.

【図面の簡単な説明】[Brief description of the drawings]

【図1】第1の発明の領域検出方法の一実施例を示す流
れ図。
FIG. 1 is a flowchart showing an embodiment of a region detection method according to the first invention.

【図2】第2の発明の移動物体検出方法の一実施例を示
す流れ図。
FIG. 2 is a flowchart showing an embodiment of a moving object detection method according to the second invention.

【図3】第3の発明の移動物体検出方法の一実施例を示
す流れ図。
FIG. 3 is a flowchart showing an embodiment of a moving object detection method according to the third invention.

【図4】第4の発明の領域検出装置の一実施例を示すブ
ロック図。
FIG. 4 is a block diagram showing an embodiment of an area detecting device according to the fourth invention.

【図5】第5の発明の移動物体検出装置の一実施例を示
すブロック図。
FIG. 5 is a block diagram showing an embodiment of a moving object detection device according to the fifth invention.

【図6】第6の発明の移動物体検出装置の一実施例を示
すブロック図。
FIG. 6 is a block diagram showing an embodiment of a moving object detection device according to the sixth invention.

【図7】第1の発明の領域検出方法の一実施例および第
4の発明の領域検出装置の説明図。
FIG. 7 is an explanatory diagram of an embodiment of a region detection method according to the first invention and a region detection device according to a fourth invention;

【図8】第2の発明の移動物体検出方法の一実施例およ
び第5の発明の移動物体検出装置の説明図。
FIG. 8 is an explanatory view of an embodiment of a moving object detection method according to the second invention and a moving object detection device according to the fifth invention;

【図9】矩形近似処理103を説明するための図。FIG. 9 is a view for explaining a rectangle approximation process 103;

【図10】道路画像から車両を検出する動作を説明する
ための図。
FIG. 10 is a diagram illustrating an operation of detecting a vehicle from a road image.

【符号の説明】[Explanation of symbols]

101 下端検出処理 102 線分近似処理 103 矩形近似処理 201,302 背景差分処理 202,303 2値化処理 203,304 領域検出処理 204,305 移動物体検出処理 301 背景生成処理 401,501,601 入力画像記憶手段 402,503,602 制御手段 403 下端検出手段 404 下端検出結果記憶手段 405 線分近似手段 406 線分近似結果記憶手段 407 矩形近似手段 408 領域検出結果記憶手段 502,604 背景画像記憶手段 504,605 背景差分手段 505,606 背景差分結果記憶手段 506,607 2値化手段 507,608 2値化画像記憶手段 508,609 領域検出手段 509,610 領域検出結果記憶手段 510,611 移動物体検出手段 511,612 移動物体検出結果記憶手段 603 背景画像更新手段 101 Lower edge detection processing 102 Line segment approximation processing 103 Rectangle approximation processing 201, 302 Background difference processing 202, 303 Binarization processing 203, 304 Area detection processing 204, 305 Moving object detection processing 301 Background generation processing 401, 501, 601 Input image Storage means 402, 503, 602 Control means 403 Lower edge detection means 404 Lower edge detection result storage means 405 Line segment approximation means 406 Line segment approximation result storage means 407 Rectangular approximation means 408 Area detection result storage means 502, 604 Background image storage means 504, 605 Background difference means 505,606 Background difference result storage means 506,607 Binarization means 507,608 Binary image storage means 508,609 Area detection means 509,610 Area detection result storage means 510,611 Moving object detection means 511 , 612 Moving object Body detection result storage means 603 Background image update means

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】0および1の画素値で構成される2値の入
力画像について、画素値1の各領域の下端に属する各画
素の位置を検出し、前記各画素について該画素を通る鉛
直線と該領域との交わりの該画素を含む連結成分の長さ
を該画素上の領域の高さとして検出し、前記領域下端に
属する各画素の位置および該画素上の領域の高さで構成
される下端検出結果データを生成し、前記下端検出結果
データを参照して領域の下端を線分群で近似することに
より、領域の下端を近似して得られる線分群に属する各
画素の位置および該画素上の領域の高さで構成される線
分近似結果データを生成し、前記線分近似結果データを
参照して各領域を近似する矩形群を検出することによ
り、2値の入力画像に含まれる各領域の形状を近似する
矩形群を出力することを特徴とする領域検出方法。
A binary input image composed of pixel values of 0 and 1 detects a position of each pixel belonging to a lower end of each area of a pixel value of 1, and a vertical line passing through the pixel for each pixel. And the length of the connected component including the pixel at the intersection of the region is detected as the height of the region on the pixel, and is constituted by the position of each pixel belonging to the lower end of the region and the height of the region on the pixel. The lower end detection result data is generated, and the lower end of the region is approximated by a line segment group with reference to the lower end detection result data, whereby the position of each pixel belonging to the line segment group obtained by approximating the lower end of the region and the pixel By generating line segment approximation result data composed of the height of the upper region and detecting a group of rectangles approximating each region with reference to the line segment approximation result data, the data is included in the binary input image. Output a group of rectangles approximating the shape of each area. Region detection method according to claim.
【請求項2】入力画像に対して移動物体を含まない背景
のみから構成される背景画像を予め用意し、各画素にお
いて前記入力画像と前記背景画像の対応する画素値の差
分の絶対値を画素値とする背景差分画像を生成し、前記
背景差分画像を参照して0および1の画素値で構成され
る2値化画像を生成し、前記2値化画像の画素値1で構
成される領域の形状を近似する矩形群を検出し、前記領
域形状を近似する矩形群を参照し、所定の条件に従っ
て、矩形の消去、分割による新たな矩形の生成、もしく
は融合による新たな矩形の生成を行うことで、前記矩形
群の変更を行ない、個々の移動物体に対応する矩形を生
成して移動物体検出結果とすることにより、入力画像に
含まれる移動物体を個別に検出することを特徴とする移
動物体検出方法。
2. A background image comprising only a background not including a moving object with respect to an input image is prepared in advance, and an absolute value of a difference between a corresponding pixel value of the input image and a corresponding pixel value of the background image is determined for each pixel. Generating a background difference image as a value, generating a binarized image composed of pixel values of 0 and 1 with reference to the background difference image, and generating an area composed of a pixel value of 1 of the binarized image. A group of rectangles approximating the shape of the region is detected, and the group of rectangles approximating the shape of the region is referred to, and according to predetermined conditions.
To erase a rectangle, create a new rectangle by dividing,
Generates a new rectangle by fusing,
A moving object detection method, wherein a moving object included in an input image is individually detected by changing a group and generating a rectangle corresponding to each moving object to obtain a moving object detection result.
【請求項3】入力される入力画像に対して移動物体を含
まない背景のみから構成される背景画像を常に持ち、前
記入力画像を参照して前記背景画像を更新し、各画素に
おいて前記入力画像と前記背景画像の対応する画素値の
差分の絶対値を画素値とする背景差分画像を生成し、前
記背景差分画像を参照して0および1の画素値で構成さ
れる2値化画像を生成し、前記2値化画像の画素値1で
構成される領域の形状を近似する矩形群を検出し、前記
領域形状を近似する矩形群を参照し、所定の条件に従っ
て、矩形の消去、分割による新たな矩形の生成、もしく
は融合による新たな矩形の生成を行うことで、前記矩形
群の変更を行ない、個々の移動物体に対応する矩形を生
成して移動物体検出結果とすることにより、入力画像に
含まれる移動物体を個別に検出することを特徴とする移
動物体検出方法。
3. An input image that is input always has a background image composed of only a background that does not include a moving object, updates the background image with reference to the input image, and updates the input image at each pixel. And a background difference image having the absolute value of the difference between the corresponding pixel values of the background image as the pixel value, and generating a binarized image composed of 0 and 1 pixel values with reference to the background difference image. Then, a group of rectangles approximating the shape of the region formed by the pixel value 1 of the binarized image is detected, and the group of rectangles approximating the shape of the region is referred to, according to a predetermined condition.
To erase a rectangle, create a new rectangle by dividing,
Generates a new rectangle by fusing,
A moving object detection method, wherein a moving object included in an input image is individually detected by changing a group and generating a rectangle corresponding to each moving object to obtain a moving object detection result.
【請求項4】第1に0および1の画素値で構成される2
値の入力画像の画素値1の各領域の下端に属する各画素
の位置を検出し、第2に前記各画素について該画素を通
る鉛直線と該領域との交わりの該画素を含む連結成分の
長さを該画素上の領域の高さとして検出し、第3に第1
および第2の動作の結果得られた各画素の位置および各
画素上の領域の高さの情報を下端検出結果として出力す
る下端検出手段と、第1に前記下端検出結果の情報を参
照して領域の下端を線分群で近似し、第2に前記線分群
に属する各画素の位置および該画素上の領域の高さの情
報を線分近似結果として出力する線分近似手段と、前記
線分近似結果の情報を参照して各領域を近似する矩形群
を検出する矩形近似手段とを具備し、2値の入力画像に
含まれる各領域の形状を近似する矩形群を出力すること
を特徴とする領域検出装置。
4. First, a pixel having a pixel value of 0 and 1
Second, the position of each pixel belonging to the lower end of each area of the pixel value 1 of the input image of the value is detected, and secondly, for each of the pixels, a connected component including the pixel at the intersection of a vertical line passing through the pixel and the area The length is detected as the height of the area on the pixel,
And bottom edge detecting means for outputting information on the position of each pixel and the height of the area on each pixel obtained as a result of the second operation as a bottom edge detection result. First, referring to the information on the bottom edge detection result, Secondly, a line segment approximating means for approximating the lower end of the region with a line segment group and outputting information on the position of each pixel belonging to the line segment group and the height of the region on the pixel as a line segment approximation result; Rectangle approximation means for detecting a group of rectangles approximating each region with reference to the information of the approximation result, and outputting a group of rectangles approximating the shape of each region included in the binary input image. Area detection device.
【請求項5】各画素において入力画像と移動物体を含ま
ない背景だけで構成される背景画像の対応する画素値の
差分の絶対値を対応する画素値とする背景差分結果画像
を生成する背景差分手段と、前記背景差分結果画像を参
照して0および1の画素値で構成される2値化画像を生
成する2値化手段と、前記2値化画像の画素値1で構成
される領域の形状を近似する矩形群を検出する領域検出
手段と、前記矩形群を参照し、所定の条件に従って、矩
形の消去、分割による新たな矩形の生成、もしくは融合
による新たな矩形の生成を行うことで、前記矩形群の変
更を行ない、個々の移動物体に対応する矩形を生成して
移動物体検出結果として出力する移動物体検出手段とを
具備し、入力画像に含まれる移動物体を個別に検出する
ことを特徴とする移動物体検出装置。
5. A background difference generating unit which generates a background difference result image in which an absolute value of a difference between corresponding pixel values of a background image including only an input image and a background not including a moving object in each pixel is a corresponding pixel value. Means for generating a binary image composed of pixel values of 0 and 1 with reference to the background difference result image; An area detecting means for detecting a group of rectangles having an approximate shape, and referring to the group of rectangles, according to predetermined conditions,
Erasing shapes, creating new rectangles by splitting, or merging
The generation of a new rectangle by
Performs further, comprising a moving object detecting means for outputting a moving object detection result to generate a rectangle corresponding to each moving object, and detects separately the moving object included in the input image moves Object detection device.
【請求項6】入力画像と背景画像とを参照して新しい背
景画像を生成する背景画像生成手段と、各画素において
前記入力画像と前記背景画像の対応する画素値の差分の
絶対値を対応する画素値とする背景差分結果画像を生成
する背景差分手段と、前記背景差分結果画像を参照して
0および1の画素値で構成される2値化画像を生成する
2値化手段と、前記2値化画像の画素値1で構成される
領域の形状を近似する矩形群を検出する領域検出手段
と、前記矩形群を参照し、所定の条件 に従って、矩形の
消去、分割による新たな矩形の生成、もしくは融合によ
る新たな矩形の生成を行うことで、前記矩形群の変更を
行ない、個々の移動物体に対応する矩形を生成して移動
物体検出結果として出力する移動物体検出手段とを具備
し、入力画像に含まれる移動物体を個別に検出すること
を特徴とする移動物体検出装置。
6. A background image generating means for generating a new background image by referring to an input image and a background image, wherein each pixel corresponds to an absolute value of a difference between a corresponding pixel value between the input image and the background image. A background subtraction unit for generating a background difference result image having pixel values, a binarization unit for generating a binarized image composed of pixel values of 0 and 1 with reference to the background difference result image; a region detecting means for detecting a rectangular group of approximating the shape of the region formed by the pixel value 1 of binarized image, by referring to the rectangular group, according to a predetermined condition, rectangular
Create new rectangles by erasing or dividing, or by merging
By generating a new rectangle, the group of rectangles can be changed.
Deeds, comprising a moving object detecting means for outputting a moving object detection result to generate a rectangle corresponding to each moving object, the moving object detection and detecting separately the moving object included in the input image apparatus.
JP32203395A 1995-12-11 1995-12-11 Area detection method and device Expired - Fee Related JP2937098B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32203395A JP2937098B2 (en) 1995-12-11 1995-12-11 Area detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32203395A JP2937098B2 (en) 1995-12-11 1995-12-11 Area detection method and device

Publications (2)

Publication Number Publication Date
JPH09161070A JPH09161070A (en) 1997-06-20
JP2937098B2 true JP2937098B2 (en) 1999-08-23

Family

ID=18139181

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32203395A Expired - Fee Related JP2937098B2 (en) 1995-12-11 1995-12-11 Area detection method and device

Country Status (1)

Country Link
JP (1) JP2937098B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150544B (en) * 2020-09-24 2024-03-19 西门子(中国)有限公司 Hook in-place detection method, device and computer readable medium
CN112541896B (en) * 2020-12-14 2023-04-07 湖南镭目科技有限公司 Furnace mouth slag stacking condition identification method and system

Also Published As

Publication number Publication date
JPH09161070A (en) 1997-06-20

Similar Documents

Publication Publication Date Title
US8175806B2 (en) Car navigation system
JP4426436B2 (en) Vehicle detection device
US20150367781A1 (en) Lane boundary estimation device and lane boundary estimation method
JPH10208047A (en) On-vehicle traveling environment recognizing device
JP2002197444A (en) Run lane recognition device for vehicle
JP2007141052A (en) Road section line detector
CN114419098A (en) Moving target trajectory prediction method and device based on visual transformation
JP2008192060A (en) Image processing device and image processing method
US9558410B2 (en) Road environment recognizing apparatus
JP2004038624A (en) Vehicle recognition method, vehicle recognition device and vehicle recognition program
JP3936683B2 (en) Road position detection apparatus and program
JP2937098B2 (en) Area detection method and device
JP3254464B2 (en) Vehicle recognition device and moving object recognition method
JP2862199B2 (en) Vehicle recognition device
JPH09223218A (en) Method and device for detecting traveling route
JP5126124B2 (en) Image processing device
JP2000132692A (en) Method for extracting feature point of curve and recording medium recording the method
JP2667885B2 (en) Automatic tracking device for moving objects
JP2846486B2 (en) Image input device
Malik High-quality vehicle trajectory generation from video data based on vehicle detection and description
CN114779271B (en) Target detection method and device, electronic equipment and storage medium
JP3022330B2 (en) Moving image recognition device and moving image recognition method
JP2008013081A (en) Vehicle automatic traveling system
JPH07193716A (en) Edge emphasizing device
KR100533209B1 (en) Method for detecting image

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990511

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080611

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090611

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100611

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees