[go: up one dir, main page]

JP2010204704A - Image processing apparatus and program for threshold value setting processing - Google Patents

Image processing apparatus and program for threshold value setting processing Download PDF

Info

Publication number
JP2010204704A
JP2010204704A JP2009046207A JP2009046207A JP2010204704A JP 2010204704 A JP2010204704 A JP 2010204704A JP 2009046207 A JP2009046207 A JP 2009046207A JP 2009046207 A JP2009046207 A JP 2009046207A JP 2010204704 A JP2010204704 A JP 2010204704A
Authority
JP
Japan
Prior art keywords
threshold
standard deviation
pixel
image
calculated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009046207A
Other languages
Japanese (ja)
Other versions
JP4719800B2 (en
Inventor
Akira Wada
亮 和田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Teli Corp
Original Assignee
Toshiba Teli Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Teli Corp filed Critical Toshiba Teli Corp
Priority to JP2009046207A priority Critical patent/JP4719800B2/en
Publication of JP2010204704A publication Critical patent/JP2010204704A/en
Application granted granted Critical
Publication of JP4719800B2 publication Critical patent/JP4719800B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Closed-Circuit Television Systems (AREA)
  • Image Analysis (AREA)

Abstract

【課題】単眼カメラで撮影した画像から変化画素を含む矩形の領域を抽出する領域抽出処理機能を有する画像処理装置において、波の揺らぎや波への西日の反射、木の揺れに順応し、揺らぎがない安定した画素での安定的対象物の検知が可能な閾値の自動設定機能を実現する。
【解決手段】環境適応型自動閾値算出処理部20Aは、算出した現在の注目画素の標準偏差σと一定期間内の最古画像を最も軽く最新画像を最も重く重み付けした注目画素の移動平均(加重移動平均)をもとに(3σの加重移動平均)−(3σの標準偏差)の値を算出し、この値を、変化画素を抽出するための、対応する画素(注目画素)の閾値として設定する。
【選択図】 図1
In an image processing apparatus having an area extraction processing function for extracting a rectangular area including a change pixel from an image photographed by a monocular camera, adapting to wave fluctuations, reflection of the sun on the waves, and tree fluctuations, An automatic threshold value setting function capable of detecting a stable object with a stable pixel without fluctuation is realized.
An environment-adaptive automatic threshold calculation processing unit 20A calculates a standard deviation σ of a current pixel of interest and a moving average (weighting) of a pixel of interest weighted the lightest oldest image within a fixed period and the latest image most heavily. Based on (moving average), a value of (3σ weighted moving average) − (3σ standard deviation) is calculated, and this value is set as a threshold value of the corresponding pixel (target pixel) for extracting the change pixel. To do.
[Selection] Figure 1

Description

本発明は、カメラで撮影した時系列の複数の画像から変化画素を含む領域を抽出する領域抽出処理機能を有する画像処理装置、および領域抽出処理機能を実現する閾値設定処理プログラムに関する。   The present invention relates to an image processing apparatus having a region extraction processing function for extracting a region including a change pixel from a plurality of time-series images taken by a camera, and a threshold setting processing program for realizing the region extraction processing function.

単眼カメラ(一つのカメラ)で撮影した時系列の複数の画像から変化画素を含む矩形の領域を抽出する領域抽出処理機能を有する画像処理装置においては、安定した精度の高い変化画素領域の抽出を可能にするための閾値設定手段が要求される。この要求に応えるため、従来では、上記変化画素を抽出するための閾値の設定を、画像処理エキスパートの経験や勘に頼って行っていた。または膨大な映像ソースを利用して閾値を変更して評価を実施し、最も良い閾値を選定することにより行っていた。   In an image processing apparatus having an area extraction processing function for extracting a rectangular area including a change pixel from a plurality of time-series images taken by a monocular camera (single camera), stable and highly accurate change pixel area extraction is performed. A threshold setting means is required to enable this. In order to meet this requirement, conventionally, the setting of the threshold value for extracting the change pixel has been performed depending on the experience and intuition of an image processing expert. Alternatively, the evaluation is performed by changing the threshold using a huge video source, and the best threshold is selected.

画像処理において、閾値を自動的に設定するための技術として、従来では、カレントフレームの更新毎にリファレンスフレームとカレントフレームとの画像情報の差分に応じてマスク抽出用閾値を決定する手段を有した監視システムが存在する(例えば、特許文献1参照)。この特許文献1のシステムでは、フレーム差分のヒストグラムを作成し、その累積頻度を、移動物体領域として抽出するための指標である固定の閾値でフィルタリング処理して、マスク抽出用閾値を得ている。また、入力画像と設定された背景画像との間で輝度の絶対差分値を求め、この輝度の絶対差分値に対して閾値処理を行い、この閾値を超える画素を255、超えない画素を0とする二値化処理技術が存在する(例えば、特許文献2参照)。また、画像のノイズ除去に関して、2枚の画像の差分をとり、その差画像から求めた標準偏差の値を参照して、画質改善のための閾値を算出する技術が存在する(例えば、特許文献3参照)。これらの技術に対して、本願発明者は、一定期間の連続画像を利用して、画素当りの輝度変動(平均値と標準偏差)を求め、その標準偏差を、変化画素を抽出するための画素あたりの閾値に設定する自動閾値の設定処理技術を確立した(特許文献4参照)。しかしながら、この標準偏差を利用した閾値設定においては、波の揺らぎや、波に反射する西日の影響、木の激しい揺れ、木の影の揺れ等に対しても、これらの対応画素を変化画素として判定(抽出)してまう過剰検知が見受けられ、上記した輝度の揺らぎに追従する安定した動作性能に問題があった。   As a technique for automatically setting a threshold in image processing, conventionally, there is a means for determining a mask extraction threshold according to the difference in image information between a reference frame and the current frame every time the current frame is updated. There is a monitoring system (see, for example, Patent Document 1). In the system of Patent Document 1, a histogram of frame differences is created, and the cumulative frequency is filtered with a fixed threshold value that is an index for extracting as a moving object region, thereby obtaining a mask extraction threshold value. Further, an absolute difference value of luminance is obtained between the input image and the set background image, threshold processing is performed on the absolute difference value of luminance, and pixels exceeding this threshold are set to 255, and pixels not exceeding are set to 0. There exists a binarization processing technique to perform (see, for example, Patent Document 2). In addition, there is a technique for calculating a threshold value for improving image quality by taking a difference between two images and removing a difference between two images with reference to a standard deviation value obtained from the difference image (for example, Patent Documents). 3). In contrast to these techniques, the inventor of the present application uses a continuous image for a certain period to obtain luminance fluctuations per pixel (average value and standard deviation), and uses the standard deviation as a pixel for extracting a change pixel. An automatic threshold value setting technique for setting a per-threshold value has been established (see Patent Document 4). However, in the threshold setting using this standard deviation, these corresponding pixels are also changed pixels for wave fluctuations, the influence of the western sun reflected in the waves, intense tree fluctuations, tree shadow fluctuations, etc. As a result, there is a problem in the stable operation performance following the fluctuation of the luminance described above.

特開2001−325672号公報JP 2001-325672 A 特開2001−160146号公報JP 2001-160146 A 特開平11−187288号公報JP-A-11-187288 特開2008−250892号公報JP 2008-250892 A

上述したように、単眼カメラで撮影した画像から変化画素を含む矩形の領域を抽出する領域抽出処理機能を有する画像処理装置において、従来では、安定した精度の高い変化画素領域の抽出を可能にする閾値の自動設定手段に性能上の課題が存在した。   As described above, in an image processing apparatus having an area extraction processing function for extracting a rectangular area including a change pixel from an image photographed by a monocular camera, conventionally, it is possible to stably extract a change pixel area with high accuracy. There was a performance problem in the automatic threshold setting means.

本発明は上記実情に鑑みなされたもので、安定した精度の高い変化画素領域の抽出が可能な閾値の自動設定機能を実現した画像処理装置および閾値設定処理プログラムを提供することを目的とする。   The present invention has been made in view of the above circumstances, and an object thereof is to provide an image processing apparatus and a threshold setting processing program that realizes an automatic threshold setting function capable of extracting a stable and highly accurate changed pixel region.

本発明は、カメラで撮影した画像を順次入力し、入力した現在画像と過去画像から変化画素を含む領域を抽出する領域抽出処理手段を備えた画像処理装置において、前記領域抽出処理手段に、
前記入力した一定期間内の複数の画像を対象に、画素あたりの輝度平均値と標準偏差を算出する標準偏差算出手段と、前記標準偏差を算出した画素について、前記算出した標準偏差と前記複数の過去画像の対応する各画素の閾値の加重移動平均とをもとに閾値を算出する閾値算出手段と、前記閾値算出手段で算出した閾値を前記標準偏差を算出した画素の前記変化画素を抽出するための閾値として設定する閾値設定手段とを具備したことを特徴とする。
The present invention is directed to an image processing apparatus including a region extraction processing unit that sequentially inputs images captured by a camera and extracts a region including a change pixel from the input current image and a past image.
For a plurality of images within the input fixed period, standard deviation calculating means for calculating a luminance average value and a standard deviation per pixel, and for the pixel for which the standard deviation is calculated, the calculated standard deviation and the plurality of Threshold calculation means for calculating a threshold based on a weighted moving average of threshold values of corresponding pixels of the past image, and the change pixel of the pixel for which the standard deviation is calculated from the threshold calculated by the threshold calculation means. And a threshold value setting means for setting as a threshold value.

また本発明は、カメラで撮影した画像を順次入力し、入力した現在画像と過去画像から変化画素を含む領域を抽出する領域抽出処理手段を備えた画像処理装置において、前記領域抽出処理手段に、前記入力した一定期間内の複数の画像を対象に、画素あたりの輝度平均値と標準偏差を算出する標準偏差算出手段と、前記標準偏差を算出した画素について、前記算出した標準偏差と前記複数の過去画像の対応する各画素の閾値の加重移動平均とをもとに閾値を算出する閾値算出手段と、前記標準偏差算出手段で算出した標準偏差を前記変化画素を抽出するための閾値として設定するか、または前記閾値算出手段で算出した閾値を前記変化画素を抽出するための閾値として設定するかを設定する外部設定手段と、前記外部設定手段の設定に従い、前記標準偏差算出手段で算出した標準偏差、または前記閾値算出手段で算出した閾値を、前記標準偏差を算出した画素の前記変化画素を抽出するための閾値として設定する閾値設定手段とを具備したことを特徴とする。   The present invention is also directed to an image processing apparatus comprising region extraction processing means for sequentially inputting images captured by a camera and extracting a region including a change pixel from the input current image and past image. For a plurality of images within the input fixed period, standard deviation calculating means for calculating a luminance average value and a standard deviation per pixel, and for the pixel for which the standard deviation is calculated, the calculated standard deviation and the plurality of A threshold calculation unit that calculates a threshold based on a weighted moving average of thresholds of corresponding pixels of the past image, and a standard deviation calculated by the standard deviation calculation unit are set as a threshold for extracting the change pixel. Or an external setting means for setting whether to set the threshold value calculated by the threshold value calculation means as a threshold value for extracting the change pixel, and according to the setting of the external setting means, Threshold value setting means for setting the standard deviation calculated by the standard deviation calculation means or the threshold value calculated by the threshold value calculation means as a threshold value for extracting the change pixel of the pixel for which the standard deviation has been calculated. It is characterized by.

また本発明は、カメラで撮影した画像を順次入力し、入力した現在画像と過去画像から変化画素を含む矩形の領域を抽出する領域抽出処理機能を備えた画像処理装置としてコンピュータを機能させるための、前記変化画素の抽出に用いる閾値を画素毎に設定する閾値設定処理プログラムであって、前記入力した一定期間内の複数の画像を対象に、画素あたりの輝度平均値と標準偏差を算出する標準偏差算出機能と、前記標準偏差を算出した画素について、前記算出した標準偏差と前記複数の過去画像の対応する各画素の閾値の加重移動平均とをもとに閾値を算出する閾値算出機能と、前記閾値算出機能が算出した閾値を前記標準偏差を算出した画素の前記変化画素を抽出するための閾値として設定する閾値設定機能とを前記コンピュータに実現させることを特徴とする。   In addition, the present invention is a method for causing a computer to function as an image processing apparatus having an area extraction processing function for sequentially inputting images captured by a camera and extracting a rectangular area including a change pixel from the input current image and past image. A threshold value setting processing program for setting a threshold value used for extraction of the change pixel for each pixel, and a standard for calculating a luminance average value and a standard deviation per pixel for the plurality of inputted images within a predetermined period. A threshold calculation function that calculates a deviation based on a weighted moving average of the calculated standard deviation and a threshold value of each corresponding pixel of the plurality of past images, with respect to a pixel for which the standard deviation has been calculated; A threshold value setting function for setting the threshold value calculated by the threshold value calculation function as a threshold value for extracting the change pixel of the pixel for which the standard deviation has been calculated; Characterized in that to.

また本発明は、カメラで撮影した画像を順次入力し、入力した現在画像と過去画像から変化画素を含む矩形の領域を抽出する領域抽出処理機能を備えた画像処理装置としてコンピュータを機能させるための、前記変化画素の抽出に用いる閾値を画素毎に設定する閾値設定処理プログラムであって、前記入力した一定期間内の複数の画像を対象に、画素あたりの輝度平均値と標準偏差を算出する標準偏差算出機能と、前記標準偏差を算出した画素について、前記算出した標準偏差と前記複数の過去画像の対応する各画素の閾値の加重移動平均とをもとに閾値を算出する閾値算出機能と、前記標準偏差算出機能が算出した標準偏差を前記変化画素を抽出するための閾値として設定するか、または前記閾値算出手段で算出した閾値を前記変化画素を抽出するための閾値として設定するかの外部指示を受け、この指示に従い、前記標準偏差算出手段で算出した標準偏差、または前記閾値算出手段で算出した閾値を、前記標準偏差を算出した画素の前記変化画素を抽出するための閾値として設定する閾値設定機能とを前記コンピュータに実現させることを特徴とする。   In addition, the present invention is a method for causing a computer to function as an image processing apparatus having an area extraction processing function for sequentially inputting images captured by a camera and extracting a rectangular area including a change pixel from the input current image and past image. A threshold value setting processing program for setting a threshold value used for extraction of the change pixel for each pixel, and a standard for calculating a luminance average value and a standard deviation per pixel for the plurality of inputted images within a predetermined period. A threshold calculation function that calculates a deviation based on a weighted moving average of the calculated standard deviation and a threshold value of each corresponding pixel of the plurality of past images, with respect to a pixel for which the standard deviation has been calculated; The standard deviation calculated by the standard deviation calculation function is set as a threshold for extracting the change pixel, or the threshold calculated by the threshold calculation means is set as the change pixel. In response to an external instruction on whether to set as a threshold value for output, according to this instruction, the standard deviation calculated by the standard deviation calculating means, or the threshold value calculated by the threshold calculating means, the pixel of which the standard deviation is calculated A threshold value setting function for setting a threshold value for extracting a change pixel is realized in the computer.

本発明によれば、単眼カメラで撮影した画像から変化画素を含む矩形の領域を抽出する領域抽出処理機能を有する画像処理装置において、安定した精度の高い変化画素領域の抽出が可能な閾値の自動設定機能を実現できる。特に、波の揺らぎや波への西日の反射、木の揺れに順応し、揺らぎがない安定した画素での安定的対象物の検知が可能な閾値の自動設定機能を実現できる。これにより、カメラの設置条件、使用条件、撮影条件等の諸条件に対して安定した精度の高い変化画素領域の抽出を可能にした画像処理装置および閾値設定処理プログラムが提供できる。   According to the present invention, in an image processing apparatus having an area extraction processing function for extracting a rectangular area including a change pixel from an image photographed by a monocular camera, automatic threshold value extraction that enables stable and highly accurate change pixel area extraction is possible. A setting function can be realized. In particular, it is possible to realize an automatic threshold setting function that can adapt to wave fluctuations, reflections of the western sun on the waves, and tree fluctuations, and can detect a stable object with stable pixels without fluctuations. Accordingly, it is possible to provide an image processing apparatus and a threshold setting processing program that enable extraction of a stable and highly accurate changed pixel region with respect to various conditions such as camera installation conditions, use conditions, and imaging conditions.

本発明の実施形態における画像処理装置の構成を示すブロック図。1 is a block diagram illustrating a configuration of an image processing apparatus according to an embodiment of the present invention. 上記実施形態における画像処理記憶部に格納された自動閾値設定処理機能を実現する構成要素を示す図。The figure which shows the component which implement | achieves the automatic threshold value setting process function stored in the image processing memory | storage part in the said embodiment. 上記実施形態における標準偏差を用いた閾値の設定概念を示す図。The figure which shows the setting concept of the threshold value using the standard deviation in the said embodiment. 上記実施形態における処理の手順を示すフローチャート。The flowchart which shows the procedure of the process in the said embodiment. 上記実施形態における処理の手順を示すフローチャート。The flowchart which shows the procedure of the process in the said embodiment. 上記実施形態における処理の手順を示すフローチャート。The flowchart which shows the procedure of the process in the said embodiment. 上記実施形態における処理の手順を示すフローチャート。The flowchart which shows the procedure of the process in the said embodiment. 上記実施形態における処理の手順を示すフローチャート。The flowchart which shows the procedure of the process in the said embodiment. 上記実施形態における処理の手順を示すフローチャート。The flowchart which shows the procedure of the process in the said embodiment. 上記実施形態における処理の手順を示すフローチャート。The flowchart which shows the procedure of the process in the said embodiment.

以下図面を参照して本発明の実施形態を説明する。
本発明の実施形態を説明するに際し、本発明の実施形態に係る画像処理装置における自動閾値の算出処理について、その動作概念を図3を参照して説明する。
Embodiments of the present invention will be described below with reference to the drawings.
In describing an embodiment of the present invention, an operation concept of an automatic threshold value calculation process in an image processing apparatus according to an embodiment of the present invention will be described with reference to FIG.

本発明の実施形態に係る画像処理装置に入力される映像は、単眼カメラ(単一のカメラ)で撮影したカメラ映像であり、周囲の明るさや撮像されている構造物、映像条件(ノイズの重畳状況、自動絞りの動作等)に応じて画面全体の輝度変動が発生する。固定閾値での設定のみとした場合には、昼間と夜間の明るさが変動する中で対象物のみを正確に抽出することは困難であり、閾値の決定は人間系によるものとなり、経験と勘など不確定要素によるところが大きくなる。そこで、本願発明者は、図3に示すように、QVGA(320×240画素)の全画素について、1画素当りで、nフレーム(例;30フレーム)の輝度(エッジ強度)集合の平均(μ:輝度平均)と、標準偏差(σ)を求め、この標準偏差(σ)を閾値に設定する自動閾値設定技術を確立した。この自動閾値設定手段は、上述したように、波の揺らぎや、波に反射する西日の影響、木の激しい揺れ、木の影の揺れ等に対して変化画素として判定してしまう過剰検知が見受けられた。   The video input to the image processing apparatus according to the embodiment of the present invention is a camera video shot by a monocular camera (single camera), and the ambient brightness, the structure being imaged, video conditions (noise superposition) Depending on the situation, the operation of the automatic iris, etc., the luminance variation of the entire screen occurs. If only a fixed threshold is set, it is difficult to accurately extract only the target in the daytime and nighttime fluctuations, and the threshold is determined by the human system. The place due to uncertain factors such as Therefore, as shown in FIG. 3, the inventor of the present application, for all pixels of QVGA (320 × 240 pixels), the average (μ) of luminance (edge intensity) set of n frames (for example, 30 frames) per pixel. : Brightness average) and standard deviation (σ) were determined, and an automatic threshold setting technique was established to set this standard deviation (σ) as a threshold. As described above, this automatic threshold value setting means detects over-detection that is determined as a change pixel with respect to wave fluctuation, the influence of the western sun reflected in the wave, intense tree fluctuation, tree shadow fluctuation, and the like. It was seen.

揺らぎのある画素とそうでない画素の特徴を調査した結果、揺らぎのある画素は、自動閾値の設定で利用する輝度の分散が大きく、そうでない画素は分散が極端に小さいことが分かった。   As a result of investigating the characteristics of the pixels with and without fluctuation, it was found that the pixels with fluctuation had a large variance in luminance used for setting the automatic threshold, and the pixels with no fluctuation had an extremely small variance.

そこで、輝度の標準偏差(σ)を利用して閾値を設定する場合、上記の特徴から、輝度の標準偏差の2以上の整数倍を閾値として設定することを考えた。例えば輝度の標準偏差の3倍(3σ)を閾値として設定することを考えた。これにより、変動の大きい画素の閾値がより大きく(変動の小さな画素の閾値がより小さな値で安定して)設定されるように変更した。   Therefore, in the case where the threshold value is set using the luminance standard deviation (σ), an integer multiple of 2 or more of the luminance standard deviation is set as the threshold value from the above characteristics. For example, it is considered that three times the standard deviation of luminance (3σ) is set as the threshold value. As a result, the threshold value of the pixel having a large variation is set to be larger (the threshold value of the pixel having a small variation is stably set to a smaller value).

この3σを閾値に利用した場合、時間軸で一定して、この閾値(3σ)が連続的に大きい画素を、揺らぎ画素と判断することができるため、移動平均にて最終閾値を決定することとした。なお、移動平均を利用した場合、閾値への反映にタイムラグを伴う(過去のデータから現在を予測するため)。そこで、その影響を極力少なくするために、重みを付けた移動平均(加重移動平均)を利用し、直近(最新)の算出結果の影響が大きい結果を得られるようにした。また、常時、揺らいでいる画素のみならず、動体が存在した画素も一時的にではあるが、輝度の標準偏差が増大する。そこで、下式のように、閾値(3σ)を仮の閾値として加重移動平均から閾値(3σ)の加重移動標準偏差を減算することで、その影響を極力少なくする工夫を実施した。なお、ここでは最小輝度値を0、最大輝度値を255としている。   When this 3σ is used as a threshold value, a pixel that is constant on the time axis and has a continuously large threshold value (3σ) can be determined as a fluctuation pixel. Therefore, the final threshold value is determined by moving average. did. In addition, when using a moving average, a time lag is accompanied by the reflection to a threshold value (in order to estimate the present from the past data). Therefore, in order to reduce the influence as much as possible, a weighted moving average (weighted moving average) is used to obtain a result in which the influence of the latest (latest) calculation result is large. Further, not only the pixels that are constantly fluctuating, but also the pixels where the moving object is present temporarily, but the standard deviation of the luminance increases. Therefore, as shown in the following equation, the threshold (3σ) is used as a temporary threshold, and the weighted moving standard deviation of the threshold (3σ) is subtracted from the weighted moving average to reduce the influence as much as possible. Here, the minimum luminance value is 0 and the maximum luminance value is 255.

輝度分散V=1/N×Σ(輝度) − (1/N×Σ輝度)
仮閾値(3σ)=3*sqrt(V)、ただし、255超過の場合は、255とする sqrt:平方根
閾値=ΣWn×(3σ)/ΣWi − Sqrt(1/N×Σ(3σ) −1/N×Σ(3σ))
:(3σの加重移動平均)−(3σの標準偏差)
この結果、波の揺らぎや波への西日の反射、木の揺れに順応し、揺らぎがない安定した画素での安定的対象物の検知が可能になった。またダイナミックに変化する周囲の明るさに追従することが可能になった。この閾値の自動設定は、差分をとる対象画像が原画像、エッジ画像(空間微分画像、輪郭画像)のいずれにおいても適用できる。
Luminance variance V = 1 / N × Σ (luminance) 2 − (1 / N × Σ luminance) 2
Temporary threshold value (3σ) = 3 * sqrt (V), but when 255 exceeds 255, sqrt: square root threshold value = ΣWn × (3σ) / ΣWi−Sqrt (1 / N × Σ (3σ) 2 −1 / N × Σ (3σ)) 2 )
: (3σ weighted moving average)-(3σ standard deviation)
As a result, it has become possible to detect a stable object with stable pixels that are free from fluctuations, adapting to wave fluctuations, reflections of the western sun on the waves, and tree fluctuations. It is also possible to follow the dynamic brightness of the surroundings. This automatic setting of the threshold value can be applied to any of the original image and the edge image (spatial differential image, contour image) as the target image for which the difference is taken.

以下、図1乃至図10を参照して本発明の実施形態を説明する。
本発明の実施形態に係る画像処理装置全体の構成を図1に示す。なお、この実施形態では、カメラ(単眼カメラ)から取り込んだ1フレーム(1画面)分の画像データを、単に画像若しくは画面上の画像若しくは一画面分の画像と称している。
Hereinafter, embodiments of the present invention will be described with reference to FIGS.
FIG. 1 shows the overall configuration of an image processing apparatus according to an embodiment of the present invention. In this embodiment, image data for one frame (one screen) captured from a camera (monocular camera) is simply referred to as an image, an image on the screen, or an image for one screen.

本発明の実施形態に係る画像処理装置は、図1に示すように、カメラ11と、キャプチャ部12と、画像処理記憶部13と、画像処理部14と、表示部15とを具備して構成される。   As shown in FIG. 1, the image processing apparatus according to the embodiment of the present invention includes a camera 11, a capture unit 12, an image processing storage unit 13, an image processing unit 14, and a display unit 15. Is done.

カメラ11は、レンズユニットとレンズユニットの結像位置に設けられた撮像素子(例えばCCD固体撮像素子、若しくはCMOSイメージセンサ)とを具備して、屋外若しくは屋内の動きを伴う被写体(動物体)を対象に、撮像した一画面分の画像を所定の画素単位(例えば1フレーム320×240画素=QVGA)で出力する。   The camera 11 includes a lens unit and an image pickup device (for example, a CCD solid-state image pickup device or a CMOS image sensor) provided at an image forming position of the lens unit, so that a subject (animal body) that moves outdoors or indoors can be used. A captured image for one screen is output to a target in a predetermined pixel unit (for example, one frame 320 × 240 pixels = QVGA).

キャプチャ部12は、カメラ11が撮像したフレーム単位の画像を画像処理部14の処理対象画像(入力画像)として取り込み、画像処理記憶部13内の画像バッファに保持する処理機能をもつ。この画像バッファに取り込む画面上の入力画像は、ここでは原画像とするが、エッジ画像であってもよい。   The capture unit 12 has a processing function of capturing an image in frame units captured by the camera 11 as a processing target image (input image) of the image processing unit 14 and holding it in an image buffer in the image processing storage unit 13. The input image on the screen captured in the image buffer is an original image here, but may be an edge image.

画像処理記憶部13は、キャプチャ部12が取り込んだ入力画像および画像処理部14によって画像処理される途中/結果の各画像を含む各種画像データを記憶する。この画像処理記憶部13には、画像処理部14の制御の下で、キャプチャ部12が取り込んだフレーム単位の画像のうち、今回取り込んだ一画面分の画像(現在画像)と、前回取り込んだ複数画面分の画像(過去画像)をそれぞれ処理対象画像として保持する画像バッファ(リングバッファ)を構成する領域が確保されるとともに、画像処理部14の処理に用いられる画像領域が確保される。ここでは、1フレーム(1画像)を240×320画素(高さ方向の画素数(IMG HEIGHT)×幅方向の画素数(IMG WIDTH))とした30フレーム分の画像バッファ(リングバッファ)領域が確保される。さらに画像処理記憶部13には、画像処理部14の処理に供される各種のパラメータおよび制御データを記憶する記憶領域、確定および未確定オブジェクトの登録、並びに追跡処理に於いて生成若しくは取得される各種情報の記憶領域等も確保される。この画像処理記憶部13における、変化画素を抽出するための閾値の自動設定機能を実現するデータ要素については、図2を参照して後述する。 The image processing storage unit 13 stores various image data including the input image captured by the capture unit 12 and each image that is being processed / resulted by the image processing unit 14. In the image processing storage unit 13, under the control of the image processing unit 14, among the frame-unit images captured by the capture unit 12, an image for one screen (current image) captured this time and a plurality of images captured last time are stored. An area constituting an image buffer (ring buffer) that holds images for the screen (past images) as processing target images is secured, and an image area used for processing by the image processing unit 14 is secured. Here, one frame (one image) is 240 × 320 pixels (number of pixels in the height direction (IMG HEIGHT) x number of pixels in the width direction (IMG WIDTH)) is reserved as an image buffer (ring buffer) area for 30 frames. Further, the image processing storage unit 13 generates or obtains a storage area for storing various parameters and control data used for the processing of the image processing unit 14, registration of confirmed and unconfirmed objects, and tracking processing. A storage area for various information is also secured. Data elements for realizing the automatic threshold setting function for extracting the changed pixels in the image processing storage unit 13 will be described later with reference to FIG.

画像処理部14は、画像処理記憶部13の画像バッファに保持された過去画像と現在画像を差分処理して二値化した差分二値化画像を生成し、この差分二値化画像に含まれるノイズを除去して、このノイズが除去された差分二値化画像から変化画素を含む矩形の領域を抽出し、この抽出した矩形の領域を処理対象に領域を追跡する、一連の画像処理を行う。この画像処理部14は、前処理部141、差分処理部142、二値化処理部143、ノイズ除去フィルタ144、領域化処理部145、領域追跡処理部146等を具備して構成される。   The image processing unit 14 generates a difference binarized image obtained by binarizing the past image and the current image held in the image buffer of the image processing storage unit 13, and is included in the difference binarized image. A series of image processing is performed to remove noise, extract a rectangular area including a change pixel from the difference binarized image from which the noise has been removed, and trace the extracted rectangular area as a processing target. . The image processing unit 14 includes a preprocessing unit 141, a difference processing unit 142, a binarization processing unit 143, a noise removal filter 144, an area processing unit 145, an area tracking processing unit 146, and the like.

上記した画像処理部14の各構成要素のうち、前処理部141は、画像処理記憶部13の画像バッファに貯えた過去画像と現在画像との比較(変化画素領域を抽出するための差分処理)に際し、キャプチャ部12が取り込んだ一画面分の入力画像に対して予め定められた前処理(平滑化処理、エッジ処理等)を実行する。   Among the components of the image processing unit 14 described above, the preprocessing unit 141 compares the past image stored in the image buffer of the image processing storage unit 13 with the current image (difference processing for extracting a changed pixel region). At this time, predetermined preprocessing (smoothing processing, edge processing, etc.) is executed on the input image for one screen captured by the capture unit 12.

差分処理部142は、前処理部141を介した過去画像と現在画像とを画素単位で比較して差分領域を抽出するもので、差分画像を生成する。この差分画像は、画像処理記憶部13に予め確保した領域(差分画像領域)に記憶される。この変化画素の抽出に、本発明の実施形態に係る閾値の自動算出処理機能が適用される。   The difference processing unit 142 compares the past image and the current image that have passed through the preprocessing unit 141 in pixel units, and extracts a difference region, and generates a difference image. This difference image is stored in an area (difference image area) secured in advance in the image processing storage unit 13. The threshold automatic calculation processing function according to the embodiment of the present invention is applied to this change pixel extraction.

この閾値の自動算出処理機能を実現する処理手段として、この実施形態では、環境適応型自動閾値算出処理部20Aと、標準偏差設定型自動閾値算出処理部20Bを用意し、そのいずれか一方の自動閾値算出処理部を外部からの指示(設定)により選択的に用いる構成としている。これら環境適応型自動閾値算出処理部20A、および標準偏差設定型自動閾値算出処理部20Bの処理の概要を図3に示している。   As processing means for realizing this threshold automatic calculation processing function, in this embodiment, an environment adaptive automatic threshold calculation processing unit 20A and a standard deviation setting type automatic threshold calculation processing unit 20B are prepared, and either one of them The threshold value calculation processing unit is selectively used by an instruction (setting) from the outside. An overview of the processing of the environment adaptive automatic threshold calculation processing unit 20A and the standard deviation setting type automatic threshold calculation processing unit 20B is shown in FIG.

標準偏差設定型自動閾値算出処理部20Bによる標準偏差設定型自動閾値算出処理では、図3に示すように、入力した一定期間内の複数の画像を対象に、画素あたりの輝度平均値と標準偏差σを算出し、この標準偏差σを、変化画素を抽出するための、対応する画素(注目画素)の閾値として設定する。この閾値算出処理の詳細は同一出願人により既に出願された特開2008−250892号公報に記載されている。環境適応型自動閾値算出処理部20Aによる環境適応型自動閾値算出処理では、図3に示すように、上記算出した現在の注目画素の標準偏差σと上記一定期間内の最古画像を最も軽く最新画像を最も重く重み付けした上記注目画素の移動平均(加重移動平均)をもとに(3σの加重移動平均)−(3σの標準偏差)の値を算出し、この値を、変化画素を抽出するための、対応する画素(注目画素)の閾値として設定する。この環境適応型自動閾値算出処理部20Aの処理手順については図4乃至図10のフローチャートを参照して後述する。   In the standard deviation setting type automatic threshold value calculation processing by the standard deviation setting type automatic threshold value calculation processing unit 20B, as shown in FIG. 3, the average luminance value and standard deviation per pixel for a plurality of input images within a certain period are input. σ is calculated, and this standard deviation σ is set as a threshold value of the corresponding pixel (target pixel) for extracting the change pixel. Details of the threshold calculation processing are described in Japanese Patent Application Laid-Open No. 2008-250892 filed by the same applicant. In the environment adaptive automatic threshold calculation processing by the environment adaptive automatic threshold calculation processing unit 20A, as shown in FIG. 3, the calculated standard deviation σ of the current pixel of interest and the oldest image within the predetermined period are the lightest and latest. A value of (3σ weighted moving average) − (3σ standard deviation) is calculated based on the moving average (weighted moving average) of the pixel of interest weighted most heavily on the image, and this value is used to extract a change pixel. Therefore, it is set as a threshold value for the corresponding pixel (target pixel). The processing procedure of the environment adaptive automatic threshold value calculation processing unit 20A will be described later with reference to the flowcharts of FIGS.

二値化処理部143は、差分処理部142で差分処理した画像を二値化処理して、差分二値化画像を生成する。この差分二値化画像は、画像処理記憶部13に予め確保した領域(差分二値化画像領域)に記憶される。この差分二値化画像の作成に、上述した閾値の自動算出処理機能が適用される。   The binarization processing unit 143 binarizes the image subjected to the difference processing by the difference processing unit 142 to generate a difference binarized image. The difference binarized image is stored in an area (difference binarized image area) secured in advance in the image processing storage unit 13. The threshold value automatic calculation processing function described above is applied to the creation of the difference binary image.

ノイズ除去フィルタ144は、拡散フィルタと収縮フィルタとを有して構成され、上記差分二値化画像から動物体領域の抽出に不要なノイズ(ごま塩状の変化画素)を除去する。このうち拡散フィルタは、上記差分二値化画像の最外周を除く各画素に対して注目画素を順次設定し、設定した注目画素に隣接する斜め方向の画素中(4画素中)に変化画素が存在するとき、その注目画素を変化画素とする拡散フィルタリング処理を行う。また収縮フィルタは、上記拡散フィルタで処理した画像に対して、上記注目画素に隣接する周囲8画素、若しくは4画素をもとに収縮フィルタリング処理を行う。このノイズ除去フィルタ144でノイズ除去したフレーム(画面)毎の差分二値化画像は、画像処理記憶部13の画像領域に記憶される。   The noise removal filter 144 is configured to include a diffusion filter and a contraction filter, and removes noise (sesame salt-like change pixels) unnecessary for extraction of the moving body region from the difference binary image. Among these, the diffusion filter sequentially sets a target pixel for each pixel except the outermost periphery of the difference binarized image, and a change pixel is present in a diagonal pixel (in four pixels) adjacent to the set target pixel. When it exists, the diffusion filtering process using the target pixel as the change pixel is performed. The contraction filter performs contraction filtering processing on the image processed by the diffusion filter based on the surrounding 8 pixels or 4 pixels adjacent to the target pixel. The difference binarized image for each frame (screen) from which noise has been removed by the noise removal filter 144 is stored in the image area of the image processing storage unit 13.

領域化処理部145は、上記ノイズ除去フィルタ144でノイズ除去した差分二値化画像を画面上の矩形の領域に領域化する処理を行う。この領域化処理では、差分二値化画像として抽出された変化画素領域を矩形で囲い、画面上からこの矩形の領域を抽出することによって、差分二値化画像を画面上の矩形の領域に領域化する。領域化処理部145は、この矩形の画面上の位置及び大きさを現す左上(x0,y0)および右下(x1,y1)の座標データを、矩形の領域情報として領域追跡処理部146に送出する。   The area processing unit 145 performs a process for converting the difference binarized image from which noise has been removed by the noise removal filter 144 into a rectangular area on the screen. In this area conversion processing, the change pixel area extracted as the difference binarized image is surrounded by a rectangle, and the rectangle area is extracted from the screen, so that the difference binarized image is displayed in the rectangle area on the screen. Turn into. The region processing unit 145 sends the upper left (x0, y0) and lower right (x1, y1) coordinate data representing the position and size of the rectangular screen to the region tracking processing unit 146 as rectangular region information. To do.

領域追跡処理部146は、領域化処理部145から受けた矩形の領域情報をもとに、矩形の領域を追跡する処理を行う。領域追跡処理部146は、領域化処理部145が矩形の領域を抽出する都度、抽出した矩形の領域を追跡処理対象オブジェクトとして追跡処理する。   The area tracking processing unit 146 performs processing for tracking a rectangular area based on the rectangular area information received from the area processing unit 145. Each time the area processing unit 145 extracts a rectangular area, the area tracking processing unit 146 performs a tracking process on the extracted rectangular area as a tracking process target object.

表示部15は、上記画像処理部14で画像処理された動物体領域を表示出力する。   The display unit 15 displays and outputs the moving object region image-processed by the image processing unit 14.

画像処理記憶部13には、図2に示すような、変化画素を抽出するための閾値の自動設定機能を実現する構成要素並びにデータ要素が格納される。画像処理記憶部13には、図2に示すように、画像処理部14の制御を司る画像処理プログラム内に、変化画素を抽出するための閾値の自動設定機能を実現する構成要素として、環境適応型自動閾値算出処理部20Aおよび標準偏差設定型自動閾値算出処理部20Bを実現する自動閾値設定処理プログラムが格納される。この自動閾値設定処理プログラムの処理手順については、図4乃至図10を参照して後述する。さらに画像処理記憶部13には、自動閾値設定処理を実現するための情報として、2組の画像バッファ131,132、閾値バッファ133、閾値統計量バッファ134、外部パラメータ設定ファイル135等が格納される。   The image processing storage unit 13 stores components and data elements that realize an automatic threshold setting function for extracting changed pixels as shown in FIG. As shown in FIG. 2, the image processing storage unit 13 includes an environment adaptation as a component that realizes an automatic threshold setting function for extracting a change pixel in an image processing program that controls the image processing unit 14. An automatic threshold setting processing program for realizing the type automatic threshold calculation processing unit 20A and the standard deviation setting type automatic threshold calculation processing unit 20B is stored. The processing procedure of this automatic threshold setting processing program will be described later with reference to FIGS. Further, the image processing storage unit 13 stores two sets of image buffers 131 and 132, a threshold buffer 133, a threshold statistic buffer 134, an external parameter setting file 135, and the like as information for realizing the automatic threshold setting process. .

2組の画像バッファ131,132は、それぞれ、リングバッファにより構成され、カメラ11で撮影した、現在画像を含む、例えば最大30フレーム分の時系列画像を貯える領域を有している。このうち、画像バッファ131には、カメラ11で撮影した30フレーム分の原画像(空間微分画像)が時系列に順次貯えられる。また画像バッファ132には、同じく30フレーム分のエッジ画像(輪郭画像)が時系列に順次貯えられる。   Each of the two sets of image buffers 131 and 132 is configured by a ring buffer, and has an area for storing, for example, a maximum of 30 frames of time-series images including the current image taken by the camera 11. Of these, 30 frames of original images (spatial differential images) captured by the camera 11 are sequentially stored in the image buffer 131 in time series. Similarly, 30 frames of edge images (contour images) are sequentially stored in the image buffer 132 in time series.

さらに画像バッファ131,132は、上記した画像の他に、画像サイズ、バッファの現在の要素番号、バッファ識別情報等の記憶領域を有している。画像バッファ131は、アクセス時において入力画像バッファポインタ(図示せず)により先頭アドレスが指定される。画像バッファ132は、アクセス時においてエッジ画像バッファポインタ(図示せず)により先頭アドレスが指定される。   Further, the image buffers 131 and 132 have storage areas such as an image size, a current element number of the buffer, and buffer identification information in addition to the above-described images. The image buffer 131 is designated at the head address by an input image buffer pointer (not shown) at the time of access. The image buffer 132 is designated at the head address by an edge image buffer pointer (not shown) at the time of access.

閾値バッファ133は、リングバッファにより構成され、上記画像バッファ131(または画像バッファ132)が記憶可能なフレーム数以内の所定数を最大値として、設定された複数枚分の時系列のフレームを閾値演算の処理対象として貯える領域と、取り込んだ画像全体の画素あたりの標準偏差(σ)を閾値として貯える領域とを有して構成される。さらに、取り込んだ画像の輝度値、輝度値の二乗、輝度値二乗の総和、固定閾値、閾値上下限値、バッファの現在の要素番号、画像バッファ識別情報等の記憶領域を有して構成される。閾値バッファ133は、上記画像バッファ131(または画像バッファ132)に貯えられた画像から、設定したフレーム数の画像を取り込み、取り込んだ画像すべての画素(ピクセル)あたりの閾値の算出並びに設定後に、1画像単位で先入先出法による画像の更新(最古の画像を棄て最新の画像を取り込む画像の差し替え処理)、並びに、この画像の更新に伴う、加重移動平均を算出するための重み付けの更新処理等が実施される。   The threshold buffer 133 is configured by a ring buffer, and a threshold calculation is performed on a set number of time-series frames with a predetermined number within the number of frames that can be stored in the image buffer 131 (or the image buffer 132) as a maximum value. And an area for storing the standard deviation (σ) per pixel of the entire captured image as a threshold value. Furthermore, it has a storage area for the brightness value of the captured image, the square of the brightness value, the sum of the squares of the brightness value, a fixed threshold, the upper and lower threshold values, the current element number of the buffer, the image buffer identification information, and the like . The threshold buffer 133 captures an image having a set number of frames from the image stored in the image buffer 131 (or the image buffer 132), and after calculating and setting the threshold per pixel of all the captured images, Image update by first-in first-out method for each image (image replacement processing for discarding the oldest image and capturing the latest image), and weight update processing for calculating a weighted moving average associated with this image update Etc. are implemented.

この閾値バッファ133上に展開されたn画像に対する画素あたりの閾値の算出処理概念を図3に示している。ここでは、30フレーム分の画像を貯えるバッファ構成(n=30)を例に示している。   FIG. 3 shows a concept of processing for calculating a threshold value per pixel for n images developed on the threshold buffer 133. Here, a buffer configuration (n = 30) for storing images for 30 frames is shown as an example.

閾値統計量バッファ134は環境適応型自動閾値算出処理に用いられる加重移動平均算出用のバッファであり、図3に示した加重移動平均の演算処理に適用されるもので、画像バッファ(リングバッファ)に貯えられた画像の画素あたりの閾値情報を記憶している。   The threshold statistic buffer 134 is a buffer for calculating the weighted moving average used for the environment-adaptive automatic threshold calculation processing, and is applied to the weighted moving average calculation processing shown in FIG. 3, and is an image buffer (ring buffer). The threshold value information per pixel of the image stored in is stored.

外部パラメータ設定ファイル135には、差分処理の画像タイプ(例えば、1;原画像(ORIGINAL)、2;エッジ画像(EDGE))、自動閾値を計算するための参照フレーム数(n;図3に示す例は、n=30)、原画像用の最低閾値上下限値、エッジ画像用の最低閾値上下限値等、各種の設定情報が記憶される。なお、この実施形態では、1画面分の画像(1画像)について、動物体の追跡処理を行わない領域を任意の矩形領域で指定可能であり、この指定されたマスク領域についても外部パラメータとしてパラメータ設定ファイル135に記憶される。   The external parameter setting file 135 includes a difference processing image type (for example, 1; original image (ORIGINAL), 2; edge image (EDGE)), the number of reference frames for calculating an automatic threshold (n; shown in FIG. 3). In the example, n = 30), various setting information such as the minimum threshold upper and lower limit values for the original image and the minimum threshold upper and lower limit values for the edge image are stored. In this embodiment, for an image (one image) for one screen, it is possible to specify an area where the tracking of the moving object is not performed as an arbitrary rectangular area, and the specified mask area is also set as a parameter as an external parameter. It is stored in the setting file 135.

上記画像処理記憶部13に格納された、環境適応型自動閾値算出処理部20Aを実現する自動閾値設定処理プログラムの処理手順を図4乃至図10に示している。なお、標準偏差設定型自動閾値算出処理部20Bの処理については、その処理手順の詳細を割愛している。   The processing procedure of the automatic threshold setting processing program for realizing the environment adaptive automatic threshold calculation processing unit 20A stored in the image processing storage unit 13 is shown in FIGS. Note that details of the processing procedure are omitted for the processing of the standard deviation setting type automatic threshold value calculation processing unit 20B.

ここで、環境適応型自動閾値算出処理部20Aの処理手順を図4乃至図10に示すフローチャートを参照して説明する。なお、このフローチャートでは乗算記号を*で表している。   Here, the processing procedure of the environment adaptive automatic threshold value calculation processing unit 20A will be described with reference to the flowcharts shown in FIGS. In this flowchart, the multiplication symbol is represented by *.

この実施形態は、カメラで撮影した画像を順次入力し、入力した現在画像と過去画像から変化画素を含む領域を抽出する領域抽出処理手段を備えた画像処理装置において、領域抽出処理手段で適用する閾値の設定処理について、標準偏差設定型自動閾値算出処理と、環境適応型自動閾値算出処理とを選択対象に、そのいずれかの閾値算出処理手段を選択可能にしている(図4ステップS1)。   This embodiment is applied by an area extraction processing unit in an image processing apparatus including an area extraction processing unit that sequentially inputs images captured by a camera and extracts an area including a change pixel from the input current image and past image. With respect to the threshold setting process, any one of the threshold calculation processing means can be selected by selecting a standard deviation setting type automatic threshold calculation process and an environment adaptive type automatic threshold calculation process (step S1 in FIG. 4).

ここで標準偏差設定型自動閾値算出処理が選択(設定)されているときは、標準偏差設定型自動閾値算出処理部20Bにより、注目画素に対して変化画素領域を抽出するための閾値が算出され設定される。この標準偏差設定型自動閾値算出処理部20Bによる標準偏差設定型自動閾値算出処理では、図3に示すように、入力した一定期間内の複数の画像を対象に、画素あたりの輝度平均値と標準偏差σを算出し、この標準偏差σを、変化画素を抽出するための、対応する画素(注目画素)の閾値として設定する(図4ステップS2)。   Here, when the standard deviation setting type automatic threshold value calculation process is selected (set), the standard deviation setting type automatic threshold value calculation processing unit 20B calculates a threshold value for extracting the change pixel region for the target pixel. Is set. In the standard deviation setting type automatic threshold value calculation processing by the standard deviation setting type automatic threshold value calculation processing unit 20B, as shown in FIG. 3, the average luminance value per pixel and the standard value for a plurality of inputted images within a certain period of time are used. The deviation σ is calculated, and this standard deviation σ is set as a threshold value of the corresponding pixel (target pixel) for extracting the changed pixel (step S2 in FIG. 4).

また、環境適応型自動閾値算出処理が選択(設定)されているときは、環境適応型自動閾値算出処理部20Aにより、注目画素に対して変化画素領域を抽出するための閾値が算出され設定される。この環境適応型自動閾値算出処理部20Aによる環境適応型自動閾値算出処理では、図3に示すように、上記算出した現在の注目画素の標準偏差σと上記一定期間内の最古画像を最も軽く最新画像を最も重く重み付けした上記注目画素の移動平均(加重移動平均)をもとに(3σの加重移動平均)−(3σの標準偏差)の値を算出し、この値を、変化画素を抽出するための、対応する画素(注目画素)の閾値として設定する。   When the environment adaptive automatic threshold value calculation process is selected (set), the environment adaptive type automatic threshold value calculation processing unit 20A calculates and sets a threshold value for extracting a change pixel region for the target pixel. The In the environment adaptive automatic threshold calculation processing by the environment adaptive automatic threshold calculation processing unit 20A, as shown in FIG. 3, the calculated standard deviation σ of the current pixel of interest and the oldest image within the predetermined period are the lightest. Calculate the value of (3σ weighted moving average) – (3σ standard deviation) based on the moving average (weighted moving average) of the pixel of interest weighted most heavily on the latest image, and extract the changed pixels from this value Therefore, the threshold value is set as the threshold value of the corresponding pixel (target pixel).

この環境適応型自動閾値算出処理部20Aによる自動閾値算出処理手順を図4ステップS11乃至図10ステップS77に示している。この処理動作は、画像バッファにn枚フレーム分の画像が貯えられていることを前提とする。   The automatic threshold value calculation processing procedure by the environment adaptive automatic threshold value calculation processing unit 20A is shown in step S11 to step S77 in FIG. This processing operation is based on the assumption that images for n frames are stored in the image buffer.

この環境適応型自動閾値算出処理では、先ず、画像要素番号や閾値バッファ要素番号等のメンバ変数を初期化し(図4ステップS11)、画像バッファ131(または132)内の処理対象となる現在の画像要素番号を取得し(図4ステップS12)、閾値バッファ133内の処理対象となる現在の閾値バッファ要素番号を取得した(図ステップS13)後、差分処理の対象となる画像が、原画像(ORIGINAL)であるかエッジ画像(EDGE)であるかを判断する(図4ステップS14)。   In this environment adaptive automatic threshold value calculation process, first, member variables such as an image element number and a threshold buffer element number are initialized (step S11 in FIG. 4), and the current image to be processed in the image buffer 131 (or 132) is initialized. After obtaining the element number (step S12 in FIG. 4) and obtaining the current threshold buffer element number to be processed in the threshold buffer 133 (step S13 in FIG. 4), the image to be subjected to difference processing is the original image (ORIGINAL ) Or edge image (EDGE) (step S14 in FIG. 4).

ここで、処理対象画像が「原画像」であると判定したき(図4ステップS14 原画像)、原画像バッファポインタに従い画像バッファ131をアクセスし、外部パラメータで与えられる原画像用の最低閾値上下限値を閾値バッファ133に設定する(図4ステップS15,S16)。また処理対象画像が「エッジ画像」であると判定したき(図4ステップS14 エッジ画像)、エッジ画像バッファポインタに従い画像バッファ132をアクセスし、外部パラメータで与えられるエッジ画像用の最低閾値上下限値を閾値バッファ133に設定する(図4ステップS17、S18)。   Here, when it is determined that the processing target image is the “original image” (step S14 in FIG. 4), the image buffer 131 is accessed according to the original image buffer pointer, and the minimum threshold for the original image given by the external parameter is exceeded. The lower limit value is set in the threshold buffer 133 (steps S15 and S16 in FIG. 4). When it is determined that the processing target image is an “edge image” (step S14 in FIG. 4), the image buffer 132 is accessed according to the edge image buffer pointer, and the minimum threshold value for the edge image given by the external parameter is set. Is set in the threshold buffer 133 (steps S17 and S18 in FIG. 4).

次に、処理対象となる入力画像のうち、処理の対象から外されたマスク領域を除くの各画素(ピクセル)について、変化画素を抽出するための閾値の算出処理、次画面の閾値を取得するための各種算出処理を実施する(図5ステップS19,S20〜図7ステップS50,S51)。ここでは入力された1画面分の画像について各画素を一定の方向に順次走査し(高さ方向のjループ(0〜IMG HEIGHT)と幅方向のkループ(0〜IMG WIDTH)とによる画像サイズ分(240×320画素)のループ処理により各画素を走査し)、処理の対象から外されたマスク領域を除くの各画素(ピクセル)について、変化画素を抽出するための閾値の算出処理、次画面の閾値算出のための画像の更新(最古の画像を棄て最新の画像を取り込む画像の差し替え)に伴う加重閾値総和の更新、並びにこの更新に伴う各種値(標準偏差、二乗標準偏差、輝度値、輝度値二乗等)の算出処理等を実施する。 Next, for each pixel (pixel) excluding the mask area excluded from the processing target in the input image to be processed, a threshold value calculation process for extracting a change pixel, and a threshold value for the next screen are acquired. Various calculation processes are performed (steps S19 and S20 in FIG. 5 to steps S50 and S51 in FIG. 7). Here, each pixel is sequentially scanned in a certain direction with respect to the input image for one screen (j loop in the height direction (0 to IMG HEIGHT) and k-loops in the width direction (0 to IMG) WIDTH) is used to extract a change pixel for each pixel (pixel) except for a mask area excluded from the processing target by scanning each pixel by a loop process of image size (240 × 320 pixels). Threshold calculation processing, update of image for threshold calculation of next screen (replacement of image that discards oldest image and imports latest image), update of weighted threshold sum, and various values (standard deviation) associated with this update , Square standard deviation, luminance value, luminance value square, etc.) are calculated.

この処理では、まず現在注目画素番号を算出し、その注目画素がマスク画素であるか否か(予め設定されたマスク領域の画素であるか否か)をチェックする(図5ステップS21,S22)。   In this process, first, the current target pixel number is calculated, and it is checked whether or not the target pixel is a mask pixel (whether or not it is a pixel in a preset mask area) (steps S21 and S22 in FIG. 5). .

ここで、注目画素がマスク画素であるときは、以降の図5ステップS23乃至図7ステップS49の処理をスキップする。また、注目画素がマスク画素でない(自動閾値算出対象画素である)場合は、画像バッファの画像要素番号をインクリメント(+1)して(図5ステップS23)、入力画像の輝度値と、輝度値の二乗を算出した結果をそれぞれ所定のバッファ(閾値バッファ133内の輝度値バッファ、輝度値二乗バッファ)に格納する(図5ステップS24)。   Here, when the target pixel is a mask pixel, the processing from step S23 to step S49 in FIG. 5 is skipped. When the target pixel is not a mask pixel (automatic threshold calculation target pixel), the image element number of the image buffer is incremented (+1) (step S23 in FIG. 5), and the luminance value of the input image and the luminance value The results of calculating the squares are stored in predetermined buffers (luminance value buffer and luminance value square buffer in threshold buffer 133), respectively (step S24 in FIG. 5).

次に、注目画素の輝度値二乗の総和を求め、その総和から輝度値二乗の平均値を算出する(図5ステップS25)。同じく、注目画素の輝度値の総和を求め、その総和から輝度値の平均値を算出する(図5ステップS26)。そして、この2つの平均値をもとに、注目画素の標準偏差を求める(図5ステップS27)。   Next, the sum of the squares of the luminance values of the target pixel is obtained, and the average value of the squares of the luminance values is calculated from the sum (step S25 in FIG. 5). Similarly, the sum of the luminance values of the target pixel is obtained, and the average value of the luminance values is calculated from the sum (step S26 in FIG. 5). Based on these two average values, the standard deviation of the target pixel is obtained (step S27 in FIG. 5).

上記注目画素の閾値バッファ番号(画像バッファの画像要素番号)を取得し(図6ステップS28)、既に求めた閾値の加重総和、閾値の総和、閾値2乗の総和を用いて、設定する閾値を算出する(図6ステップS29〜S32)。ここでは、既に算出している閾値2乗総和を利用して、閾値2乗平均値(thresholdSqMean)を算出し(図6ステップS29)、既に算出している閾値総和を利用して、閾値平均値(thresholdMean)を算出し、既に算出している加重閾値総和を利用して、加重閾値平均値(weightThresholdMean)を算出し、この閾値2乗平均値(thresholdSqMean)と閾値平均値(thresholdMean)と加重閾値平均値(weightThresholdMean)とを用いて設定する閾値(tempThreshold)を算出する。   The threshold buffer number (image element number of the image buffer) of the pixel of interest is acquired (step S28 in FIG. 6), and the threshold to be set is set using the already obtained weighted sum of thresholds, sum of thresholds, and sum of threshold squares. Calculate (Steps S29 to S32 in FIG. 6). Here, the threshold square average value (thresholdSqMean) is calculated using the already calculated threshold sum of squares (step S29 in FIG. 6), and the threshold average value is calculated using the already calculated threshold sum. (ThresholdMean) is calculated, the weighted threshold average value (weightThresholdMean) is calculated using the already calculated weighted threshold sum, the threshold squared average value (thresholdSqMean), the threshold average value (thresholdMean) and the weighted threshold A threshold (tempThreshold) to be set is calculated using the average value (weightThresholdMean).

次に算出した設定閾値の最小、最大チェックを行い、適正な値にする(図6ステップS33〜S37)。ここでは算出した閾値が輝度最小値(輝度値0)より小さいとき(Tempthreshold<BRIGHTNESS_MIN)、算出した閾値を輝度最小値に置換し(m_ThreBufSet.threshold[i]=BRIGHTNESS_MIN)、算出した閾値が輝度最大値(輝度値255)より大きいとき(Tempthreshold>BRIGHTNESS_MAX)、算出した閾値を輝度最大値に置換して(m_ThreBufSet.threshold[i]=BRIGHTNESS_MAX)、算出した閾値を輝度値0〜255の範囲内に収めて設定し、それ以外のときは、算出した閾値をそのまま設定する(m_ThreBufSet.threshold[i]=tempThreshold)。   Next, the minimum and maximum of the calculated setting threshold are checked and set to appropriate values (steps S33 to S37 in FIG. 6). Here, when the calculated threshold value is smaller than the minimum luminance value (luminance value 0) (Tempthreshold <BRIGHTNESS_MIN), the calculated threshold value is replaced with the minimum luminance value (m_ThreBufSet.threshold [i] = BRIGHTNESS_MIN), and the calculated threshold value is the maximum luminance value When the value (brightness value 255) is greater (Tempthreshold> BRIGHTNESS_MAX), the calculated threshold value is replaced with the maximum luminance value (m_ThreBufSet.threshold [i] = BRIGHTNESS_MAX), and the calculated threshold value is within the range of the brightness value 0-255. Otherwise, set the calculated threshold value as it is (m_ThreBufSet.threshold [i] = tempThreshold).

次に、輝度の標準偏差(σ)から3σを求め、次の画像の閾値を算出するための処理を行う。   Next, 3σ is obtained from the standard deviation (σ) of luminance, and processing for calculating the threshold value of the next image is performed.

この処理では、上記標準偏差(σ)を3倍した値(3σ)を現在閾値(calcThreshold)として求め、求めた現在閾値が最大輝度以上の場合は、最大輝度に変更して(図7ステップS41)、求めた現在閾値の2乗を求める(図7ステップS42)。   In this process, a value (3σ) obtained by multiplying the standard deviation (σ) by 3 is obtained as the current threshold (calcThreshold). If the obtained current threshold is equal to or greater than the maximum luminance, the value is changed to the maximum luminance (step S41 in FIG. 7). ), The square of the obtained current threshold is obtained (step S42 in FIG. 7).

次に、画像の更新(最古の画像を棄て最新の画像を取り込む画像の差し替え)に伴う処理として、過去加重閾値データの合計から過去閾値合計を減算し、現在閾値に重みを乗じた値を加算して、総和を求め(図7ステップS43)、注目画素の閾値合計を求め、注目画素の閾値の2乗合計を求める(図7ステップS44)。算出した現在閾値をバッファに格納し、算出した現在閾値2乗をバッファに格納して(図7ステップS45)、算出閾値格納先バッファを更新する(図7ステップS46)。   Next, as a process associated with image update (replacement of the image that discards the oldest image and captures the latest image), the past threshold total is subtracted from the total of the past weighted threshold data, and the value obtained by multiplying the current threshold by the weight is calculated. Addition is performed to obtain the sum (step S43 in FIG. 7), the total threshold value of the target pixel is determined, and the square sum of the threshold value of the target pixel is determined (step S44 in FIG. 7). The calculated current threshold is stored in the buffer, the calculated current threshold square is stored in the buffer (step S45 in FIG. 7), and the calculated threshold storage buffer is updated (step S46 in FIG. 7).

次に、自動閾値を算出した画像サイズ分の標準偏差の総和と二乗標準偏差の総和を求め(図7ステップS47)、既にある総和に対して、バッファに存在する最も古い(現在の要素番号にある)輝度値、輝度値二乗を減算し、図5ステップS2う算出した輝度値、輝度値二乗の値を加算(総和の計算)して(図7ステップS48)、この輝度値、輝度値二乗をバッファへ格納する(図7ステップS49)。   Next, the sum of the standard deviation and the square standard deviation for the image size for which the automatic threshold is calculated is obtained (step S47 in FIG. 7), and the oldest existing in the buffer (the current element number is set to the existing sum). The luminance value and luminance value square are subtracted, and the luminance value and luminance value square value calculated in step S2 in FIG. 5 are added (summation calculation) (step S48 in FIG. 7). Is stored in the buffer (step S49 in FIG. 7).

上記した処理が1画面分の画像について実施される(図7ステップS50,S51)。   The above-described processing is performed on the image for one screen (steps S50 and S51 in FIG. 7).

上記処理の後、自動閾値算出画素が0に達したか否かを調べ、自動閾値算出画素が0より大きい場合は、以下の図8ステップS53乃至図9ステップS71の処理を実行し、自動閾値算出画素が0に達した場合は、図8ステップS53乃至図9ステップS71の処理を実行しない(図8ステップS52)。   After the above process, it is checked whether or not the automatic threshold value calculation pixel has reached 0. If the automatic threshold value calculation pixel is greater than 0, the following processes in FIG. 8 step S53 to FIG. When the calculated pixel reaches 0, the processing from step S53 to step S71 in FIG. 8 is not executed (step S52 in FIG. 8).

自動閾値算出画素が0より大きい場合、自動閾値算出画素分の標準偏差を算出していることから、標準偏差の平均値と二乗標準偏差の平均値を求め、自動閾値算出画素分の標準偏差の標準偏差を求め(図8ステップS53)、ここで求めたデータを用いて、平均値+3σを求め、仮の最低閾値Aとして格納する。(tempLowerLimitByStdev)(図8ステップS54)。さらに、ここで求めた最低閾値が輝度階調内に入っているかをチェックし、入っていない場合は、輝度階調内の値に置換する。すなわち、最低閾値が輝度最小値より小さいときは輝度最小値に置換し、最低閾値が輝度最大値より大きいときは輝度最大値に置換する(図8ステップS55)。標準偏差の平均値に感度を乗じた値を仮の最低閾値Bとして格納する。(tempLowerLimitByMean)(図8ステップS56)。ここで求めた最低閾値が輝度階調内に入っているかをチェックし、入っていない場合は、上記した図8ステップS55と同様に輝度階調内の値(輝度最小値、輝度最大値)に置換する(図8ステップS57)。   When the automatic threshold value calculation pixel is larger than 0, the standard deviation for the automatic threshold value calculation pixel is calculated. Therefore, the average value of the standard deviation and the average value of the square standard deviation are obtained, and the standard deviation of the automatic threshold value calculation pixel is calculated. A standard deviation is obtained (step S53 in FIG. 8), and using the obtained data, an average value + 3σ is obtained and stored as a temporary minimum threshold A. (TempLowerLimitByStdev) (step S54 in FIG. 8). Further, it is checked whether or not the minimum threshold obtained here is within the luminance gradation. If not, the value is replaced with a value within the luminance gradation. That is, when the minimum threshold value is smaller than the minimum luminance value, it is replaced with the minimum luminance value, and when the minimum threshold value is higher than the maximum luminance value, it is replaced with the maximum luminance value (step S55 in FIG. 8). A value obtained by multiplying the average value of the standard deviation by the sensitivity is stored as a temporary minimum threshold value B. (TempLowerLimitByMean) (step S56 in FIG. 8). It is checked whether or not the minimum threshold value obtained here falls within the luminance gradation. If not, the values within the luminance gradation (the luminance minimum value and the luminance maximum value) are set as in step S55 in FIG. Replace (step S57 in FIG. 8).

上記の最低閾値A、Bを比較し、大きい方を最低閾値(LowerLimit)として採用する(図8ステップS58,S59,S60)。セットした最低閾値が、下限閾値より小さい場合は、下限閾値をセットし、上限閾値より大きい場合は上限閾値をセットする(図9ステップS61〜S64)。   The lowest threshold values A and B are compared, and the larger one is adopted as the lowest threshold value (LowerLimit) (steps S58, S59, and S60 in FIG. 8). If the set minimum threshold value is smaller than the lower limit threshold value, the lower limit threshold value is set, and if it is larger than the upper limit threshold value, the upper limit threshold value is set (steps S61 to S64 in FIG. 9).

次に画像サイズ分ループし(図9ステップS65〜S71)、当該画素の閾値が最低閾値を下回った閾値設定となっている場合は、最低閾値で置換する(図9ステップS67〜S69)。   Next, a loop is performed for the image size (steps S65 to S71 in FIG. 9), and if the threshold value of the pixel is lower than the minimum threshold value, the threshold value is replaced (steps S67 to S69 in FIG. 9).

その後、閾値ブロック内現在参照番号に1加算し(図10ステップS72)、閾値ブロック内参照番号最大値に達したか否かをチェックして(図10ステップS73)、達している場合は0で初期化し(図10ステップS74)、現在要素番号に1加算し(図10ステップS75)、その要素番号が最大値を超えたか否かをチェックして(図10ステップS76)、超えた場合は0で初期化する(図10ステップS77)。   Thereafter, 1 is added to the current reference number in the threshold block (step S72 in FIG. 10), and it is checked whether or not the maximum reference number in the threshold block has been reached (step S73 in FIG. 10). Initialization (step S74 in FIG. 10), 1 is added to the current element number (step S75 in FIG. 10), and it is checked whether the element number exceeds the maximum value (step S76 in FIG. 10). (Step S77 in FIG. 10).

上記した一連の処理により、単眼カメラで撮影した画像から変化画素を含む矩形の領域を抽出する領域抽出処理機能を有する画像処理装置において、波の揺らぎや波への西日の反射、木の揺れに順応し、揺らぎがない安定した画素での安定的対象物の検知が可能な閾値の自動設定機能を実現できる。これにより、カメラの設置条件、使用条件、撮影条件等の諸条件に対して安定した精度の高い変化画素領域の抽出を可能にした画像処理装置が提供できる。   In the image processing apparatus having an area extraction processing function for extracting a rectangular area including a change pixel from an image photographed by a monocular camera by the series of processes described above, the wave fluctuation, the reflection of the western sun on the wave, the tree shake It is possible to realize an automatic threshold value setting function that can detect a stable object with a stable pixel that does not fluctuate. Accordingly, it is possible to provide an image processing apparatus that can extract a variable pixel region that is stable and accurate with respect to various conditions such as camera installation conditions, use conditions, and imaging conditions.

上述した図4乃至図10に示す処理手順を有する自動閾値設定処理プログラムは、画像処理装置に常駐する形で固定的に組み込まれる構成であってもよいし、プログラム単体で必要に応じて取り扱われる構成であってもよい。   The automatic threshold setting processing program having the processing procedure shown in FIGS. 4 to 10 described above may be configured to be fixedly incorporated in a form resident in the image processing apparatus, or may be handled as needed by the program alone. It may be a configuration.

また、上記した実施形態では、注目画素の標準偏差σと一定期間内の最古画像を最も軽く最新画像を最も重く重み付けした注目画素の移動平均(加重移動平均)をもとに(3σの加重移動平均)−(3σの標準偏差)の値を算出し、この値を、変化画素を抽出するための、対応する画素(注目画素)の閾値として設定したが、ここでの閾値は3σに限らず、例えば2σ、4σ、5σ等のいずれであってもよく、要は抽出(検出)対象に最も適合した標準偏差値を設定すればよい。   Further, in the above-described embodiment, based on the standard deviation σ of the target pixel and the moving average (weighted moving average) of the target pixel weighted with the lightest oldest image within the fixed period and the latest image most heavily weighted (weight of 3σ) The value of (moving average) − (standard deviation of 3σ) is calculated, and this value is set as the threshold value of the corresponding pixel (target pixel) for extracting the change pixel. However, the threshold value here is limited to 3σ. For example, any of 2σ, 4σ, 5σ, and the like may be used. In short, a standard deviation value most suitable for an extraction (detection) target may be set.

11…カメラ、12…キャプチャ部、13…画像処理記憶部、14…画像処理部、15…表示部、20A…環境適応型自動閾値算出処理部、20B…標準偏差設定型自動閾値算出処理部、131,132…画像バッファ、133…閾値バッファ、134…閾値統計量バッファ、135…外部パラメータ設定ファイル、141…前処理部、142…差分処理部、143…二値化処理部、144…ノイズ除去フィルタ、145…領域化処理部、146…領域追跡処理部。   DESCRIPTION OF SYMBOLS 11 ... Camera, 12 ... Capture part, 13 ... Image processing memory | storage part, 14 ... Image processing part, 15 ... Display part, 20A ... Environment adaptive type automatic threshold value calculation processing part, 20B ... Standard deviation setting type automatic threshold value calculation processing part, 131, 132 ... Image buffer, 133 ... Threshold buffer, 134 ... Threshold statistics buffer, 135 ... External parameter setting file, 141 ... Pre-processing unit, 142 ... Difference processing unit, 143 ... Binarization processing unit, 144 ... Noise removal Filter, 145... Region processing unit, 146.

Claims (6)

カメラで撮影した画像を順次入力し、入力した現在画像と過去画像から変化画素を含む領域を抽出する領域抽出処理手段を備えた画像処理装置において、
前記領域抽出処理手段に、
前記入力した一定期間内の複数の画像を対象に、画素あたりの輝度平均値と標準偏差を算出する標準偏差算出手段と、
前記標準偏差を算出した画素について、前記算出した標準偏差と前記複数の過去画像の対応する各画素の閾値の加重移動平均とをもとに閾値を算出する閾値算出手段と、
前記閾値算出手段で算出した閾値を前記標準偏差を算出した画素の前記変化画素を抽出するための閾値として設定する閾値設定手段と、
を具備したことを特徴とする画像処理装置。
In an image processing apparatus comprising region extraction processing means for sequentially inputting images taken by a camera and extracting a region including a change pixel from the input current image and past image,
In the region extraction processing means,
Standard deviation calculation means for calculating a luminance average value and standard deviation per pixel for a plurality of images within the input fixed period;
Threshold calculation means for calculating a threshold based on the calculated standard deviation and a weighted moving average of the threshold values of the corresponding pixels of the plurality of past images for the pixel for which the standard deviation has been calculated;
Threshold setting means for setting the threshold calculated by the threshold calculation means as a threshold for extracting the change pixel of the pixel for which the standard deviation has been calculated;
An image processing apparatus comprising:
カメラで撮影した画像を順次入力し、入力した現在画像と過去画像から変化画素を含む領域を抽出する領域抽出処理手段を備えた画像処理装置において、
前記領域抽出処理手段に、
前記入力した一定期間内の複数の画像を対象に、画素あたりの輝度平均値と標準偏差を算出する標準偏差算出手段と、
前記標準偏差を算出した画素について、前記算出した標準偏差と前記複数の過去画像の対応する各画素の閾値の加重移動平均とをもとに閾値を算出する閾値算出手段と、
前記標準偏差算出手段で算出した標準偏差を前記変化画素を抽出するための閾値として設定するか、または前記閾値算出手段で算出した閾値を前記変化画素を抽出するための閾値として設定するかを設定する外部設定手段と、
前記外部設定手段の設定に従い、前記標準偏差算出手段で算出した標準偏差、または前記閾値算出手段で算出した閾値を、前記標準偏差を算出した画素の前記変化画素を抽出するための閾値として設定する閾値設定手段と、
を具備したことを特徴とする画像処理装置。
In an image processing apparatus comprising region extraction processing means for sequentially inputting images taken by a camera and extracting a region including a change pixel from the input current image and past image,
In the region extraction processing means,
Standard deviation calculation means for calculating a luminance average value and standard deviation per pixel for a plurality of images within the input fixed period;
Threshold calculation means for calculating a threshold based on the calculated standard deviation and a weighted moving average of the threshold values of the corresponding pixels of the plurality of past images for the pixel for which the standard deviation has been calculated;
Sets whether the standard deviation calculated by the standard deviation calculation means is set as a threshold for extracting the change pixel, or whether the threshold calculated by the threshold calculation means is set as a threshold for extracting the change pixel External setting means to
According to the setting of the external setting means, the standard deviation calculated by the standard deviation calculating means or the threshold calculated by the threshold calculating means is set as a threshold for extracting the change pixel of the pixel for which the standard deviation has been calculated. Threshold setting means;
An image processing apparatus comprising:
前記閾値算出手段は、前記標準偏差(σ)を3倍した仮閾値(3σ)の加重移動平均から仮閾値(3σ)の加重移動標準偏差を減じて前記変化画素を抽出するための閾値を算出することを特徴とする請求項1または2に記載の画像処理装置。   The threshold calculation means calculates a threshold for extracting the change pixel by subtracting the weighted moving standard deviation of the temporary threshold (3σ) from the weighted moving average of the temporary threshold (3σ) that is three times the standard deviation (σ). The image processing apparatus according to claim 1, wherein: カメラで撮影した画像を順次入力し、入力した現在画像と過去画像から変化画素を含む矩形の領域を抽出する領域抽出処理機能を備えた画像処理装置としてコンピュータを機能させるための、前記変化画素の抽出に用いる閾値を画素毎に設定する閾値設定処理プログラムであって、
前記入力した一定期間内の複数の画像を対象に、画素あたりの輝度平均値と標準偏差を算出する標準偏差算出機能と、
前記標準偏差を算出した画素について、前記算出した標準偏差と前記複数の過去画像の対応する各画素の閾値の加重移動平均とをもとに閾値を算出する閾値算出機能と、
前記閾値算出機能が算出した閾値を前記標準偏差を算出した画素の前記変化画素を抽出するための閾値として設定する閾値設定機能と、
を前記コンピュータに実現させるための閾値設定処理プログラム。
The change pixels for causing the computer to function as an image processing apparatus having a region extraction processing function for sequentially inputting images captured by the camera and extracting a rectangular region including the change pixels from the input current image and past image. A threshold value setting processing program for setting a threshold value used for extraction for each pixel,
A standard deviation calculation function for calculating a luminance average value and a standard deviation per pixel for a plurality of images within the input fixed period;
A threshold calculation function for calculating a threshold for the pixel for which the standard deviation has been calculated, based on the calculated standard deviation and a weighted moving average of the thresholds of the corresponding pixels of the plurality of past images;
A threshold setting function for setting the threshold calculated by the threshold calculation function as a threshold for extracting the change pixel of the pixel for which the standard deviation is calculated;
A threshold setting processing program for causing the computer to realize the above.
カメラで撮影した画像を順次入力し、入力した現在画像と過去画像から変化画素を含む矩形の領域を抽出する領域抽出処理機能を備えた画像処理装置としてコンピュータを機能させるための、前記変化画素の抽出に用いる閾値を画素毎に設定する閾値設定処理プログラムであって、
前記入力した一定期間内の複数の画像を対象に、画素あたりの輝度平均値と標準偏差を算出する標準偏差算出機能と、
前記標準偏差を算出した画素について、前記算出した標準偏差と前記複数の過去画像の対応する各画素の閾値の加重移動平均とをもとに閾値を算出する閾値算出機能と、
前記標準偏差算出機能が算出した標準偏差を前記変化画素を抽出するための閾値として設定するか、または前記閾値算出手段で算出した閾値を前記変化画素を抽出するための閾値として設定するかの外部指示を受け、この指示に従い、前記標準偏差算出手段で算出した標準偏差、または前記閾値算出手段で算出した閾値を、前記標準偏差を算出した画素の前記変化画素を抽出するための閾値として設定する閾値設定機能と、
を前記コンピュータに実現させるための閾値設定処理プログラム。
The change pixels for causing the computer to function as an image processing apparatus having a region extraction processing function for sequentially inputting images captured by the camera and extracting a rectangular region including the change pixels from the input current image and past image. A threshold value setting processing program for setting a threshold value used for extraction for each pixel,
A standard deviation calculation function for calculating a luminance average value and a standard deviation per pixel for a plurality of images within the input fixed period;
A threshold calculation function for calculating a threshold for the pixel for which the standard deviation has been calculated, based on the calculated standard deviation and a weighted moving average of the thresholds of the corresponding pixels of the plurality of past images;
Whether the standard deviation calculated by the standard deviation calculation function is set as a threshold for extracting the change pixel, or the threshold calculated by the threshold calculation means is set as a threshold for extracting the change pixel In response to the instruction, in accordance with the instruction, the standard deviation calculated by the standard deviation calculating unit or the threshold calculated by the threshold calculating unit is set as a threshold for extracting the change pixel of the pixel for which the standard deviation is calculated. A threshold setting function;
A threshold setting processing program for causing the computer to realize the above.
前記閾値算出機能は、前記標準偏差(σ)を3倍した仮閾値(3σ)の加重移動平均から仮閾値(3σ)の加重移動標準偏差を減じて前記変化画素を抽出するための閾値を算出することを特徴とする請求項4または5に記載の閾値設定処理プログラム。   The threshold calculation function calculates a threshold for extracting the change pixel by subtracting the weighted moving standard deviation of the temporary threshold (3σ) from the weighted moving average of the temporary threshold (3σ) obtained by multiplying the standard deviation (σ) by three. The threshold value setting processing program according to claim 4 or 5, characterized in that:
JP2009046207A 2009-02-27 2009-02-27 Image processing apparatus and threshold setting processing program Active JP4719800B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009046207A JP4719800B2 (en) 2009-02-27 2009-02-27 Image processing apparatus and threshold setting processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009046207A JP4719800B2 (en) 2009-02-27 2009-02-27 Image processing apparatus and threshold setting processing program

Publications (2)

Publication Number Publication Date
JP2010204704A true JP2010204704A (en) 2010-09-16
JP4719800B2 JP4719800B2 (en) 2011-07-06

Family

ID=42966163

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009046207A Active JP4719800B2 (en) 2009-02-27 2009-02-27 Image processing apparatus and threshold setting processing program

Country Status (1)

Country Link
JP (1) JP4719800B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013051559A1 (en) * 2011-10-03 2013-04-11 株式会社Ihi Centrifugal compressor machine and method for preventing surge therein
JP2018174463A (en) * 2017-03-31 2018-11-08 セコム株式会社 Surveillance camera device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5616989B2 (en) * 2013-02-14 2014-10-29 東芝テリー株式会社 Image processing apparatus and threshold setting processing program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007314041A (en) * 2006-05-25 2007-12-06 Toshiba Corp Aircraft detection processing equipment for stop line lights
JP2008250892A (en) * 2007-03-30 2008-10-16 Toshiba Teli Corp Image processing apparatus and image processing program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007314041A (en) * 2006-05-25 2007-12-06 Toshiba Corp Aircraft detection processing equipment for stop line lights
JP2008250892A (en) * 2007-03-30 2008-10-16 Toshiba Teli Corp Image processing apparatus and image processing program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013051559A1 (en) * 2011-10-03 2013-04-11 株式会社Ihi Centrifugal compressor machine and method for preventing surge therein
JP2013079586A (en) * 2011-10-03 2013-05-02 Ihi Corp Centrifugal compression facility and method for preventing surging therein
KR101670710B1 (en) * 2011-10-03 2016-10-31 가부시키가이샤 아이에이치아이 Centrifugal compressor apparatus and method for preventing surge therein
US10202980B2 (en) 2011-10-03 2019-02-12 Ihi Rotating Machinery Engineering Co., Ltd. Centrifugal compressor apparatus and method for preventing surge therein
JP2018174463A (en) * 2017-03-31 2018-11-08 セコム株式会社 Surveillance camera device

Also Published As

Publication number Publication date
JP4719800B2 (en) 2011-07-06

Similar Documents

Publication Publication Date Title
EP3798975B1 (en) Method and apparatus for detecting subject, electronic device, and computer readable storage medium
US9330446B2 (en) Method and apparatus for processing image
CN110536068B (en) Focusing method and device, electronic equipment and computer readable storage medium
US8509496B2 (en) Real-time face tracking with reference images
US10452922B2 (en) IR or thermal image enhancement method based on background information for video analysis
WO2004102474A2 (en) A method and device for sensor level image distortion abatement
CN110349163A (en) Image processing method and apparatus, electronic device, computer-readable storage medium
CN113055657A (en) Image acquisition method and system based on power grid line inspection
JP2004005384A (en) Image processing method, image processing device, program and recording medium, automatic trimming device, and portrait photographing device
JP2009123081A (en) Face detection method and photographing apparatus
CN110490196A (en) Subject detection method and apparatus, electronic equipment, computer readable storage medium
JP4719800B2 (en) Image processing apparatus and threshold setting processing program
JP5616989B2 (en) Image processing apparatus and threshold setting processing program
CN110365897B (en) Image correction method and device, electronic equipment and computer readable storage medium
JP4571656B2 (en) Image processing apparatus and image processing program
JP2020154552A (en) Behavior recognition device, behavior recognition method and program
KR102452192B1 (en) Method for filtering image of object for identifying animal and apparatus thereof
CN113596315A (en) Photographing method for dynamic scene compensation and camera device
JP5537995B2 (en) Image processing apparatus and image processing program
WO2024226097A1 (en) System and method for self-supervised training of image restoration networks
JP6739955B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium
JP2019215661A (en) Image quality adjustment system and image quality adjustment method
JP2022043633A (en) Information processing apparatus, method, program, and storage medium
CN119540879B (en) Port equipment monitoring method and system based on image processing
CN118735816B (en) A method for removing star images from all-day medium and high orbit telescope images

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110228

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110308

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110404

R150 Certificate of patent or registration of utility model

Ref document number: 4719800

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140408

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250