JP2004280697A - Image processor and program - Google Patents

Image processor and program Download PDF

Info

Publication number
JP2004280697A
JP2004280697A JP2003074114A JP2003074114A JP2004280697A JP 2004280697 A JP2004280697 A JP 2004280697A JP 2003074114 A JP2003074114 A JP 2003074114A JP 2003074114 A JP2003074114 A JP 2003074114A JP 2004280697 A JP2004280697 A JP 2004280697A
Authority
JP
Japan
Prior art keywords
image
area
image data
difference
luminance
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.)
Withdrawn
Application number
JP2003074114A
Other languages
Japanese (ja)
Inventor
Yoshiaki Hashimoto
良昭 橋本
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2003074114A priority Critical patent/JP2004280697A/en
Publication of JP2004280697A publication Critical patent/JP2004280697A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor and program capable of efficiently detecting only a necessary change. <P>SOLUTION: This image processor 10 comprises means 40 and 50 for dividing first image data and second image data into a plurality of areas with the same dividing pattern, and tabulating pixel values related to the color or luminance of pixels belonging to each area, with respect to the first image data and second image data, to compute an area pixel value; a threshold storage means 80 for storing a threshold used for differential determination of the area pixel value of each area in association with each area divided by the dividing pattern; and a means 60 for performing an image change detection processing. The means 60 computes the difference between the area pixel values of the corresponding areas of the first image data and second image data, compares the difference with the threshold stored in the threshold storage means in association with the area to determine whether or not the difference is within the threshold range, and detects the presence of a change when it is out of the range. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理装置及びプログラムに関する。
【0002】
【従来の技術】
防犯システムに用いる画像処理装置においては、監視カメラで監視すべき場所の画像を取り込み、画像処理によりフレーム間の変化を検出して、あるレベルで変化があった場合に画像の保存を行っていた。
【0003】
【特許文献1】
特開平5−56432号公報
特開平6−176153号公報
【0004】
【発明が解決しようとする課題】
例えば特開平5−56432では画素の輝度の変化とその画像面積により判断する手法が開示されている。しかしこの手法によれば背景が一面草花のようなものの場合、風でそよいでしまっただけで輝度の変化した面積が大きく判断されてしまうという欠点がある。
【0005】
また例えば特開平6−176153ではある背景処理をして得られた2値画像をX軸、Y軸へ投影して得られたピークの違いにより判断画素の輝度の変化とその画像面積により判断する手法が開示されている。しかしこの手法によればピークが得られない画像の場合、画像の変化をとらえることが出来ない。
【0006】
本発明は、以上のような技術的課題に鑑みてなされたものであり、その目的とするところは、必要な変化のみを効率よく検出することが出来る画像処理装置及びプログラムを提供することにある。
【0007】
【課題を解決するための手段】
(1)本発明は、画像処理装置であって、
第1の画像データと第2の画像データを同一の分割パターンで複数のエリアに分割し、第1の画像データ及び第2の画像データについて、各エリアに属する画素の色又は輝度に関する画素値を集計してエリア画素値を演算する手段と、
第1の画像データと第2の画像データの対応するエリアのエリア画素値の差分を演算する手段と、
分割パターンによって分割される各エリアに関連づけて各エリアのエリア画素値の差分判定に用いるしきい値を記憶するしきい値記憶手段と、
前記差分と前記エリアに関連づけてしきい値記憶手段に記憶されたしきい値とを比較して、前記差分がしきい値の範囲内に収まっているか否か判断し、収まっていない場合に変化ありと検出する画像変化検出処理を行う手段と、
を含むことを特徴とする。
【0008】
各エリアに属する画素の色又は輝度に関する画素値とは例えば、カメラからの画像(デジタル画像又はデジタル変換された画像)の各画素の値の色情報や輝度情報である。例えば画像データがYUV形式の場合はそのYUV値又はYUVのいずれかの成分の値でもよいし、これらの値から演算により導かれる値でもよい。また例えば画像データがRGB形式の場合はそのRGB値又はRGBのいずれかの成分の値でもよいし、これらの値から演算により導かれる値でもよい。
【0009】
また例えば各画素の情報として、輝度情報と色差情報がくる場合には、それらの値でもよいし、それらの値から演算により導かれる値でもよい。
【0010】
また画素値を集計して得られるエリア画素値は、画素値の合計値でもよいし、画素値の平均値でもよいし、画素値を集計して値から所与の関数によって得られる値でもよい。
【0011】
本発明によれば画素単位ではなくエリア単位のエリア画素値で比較するため、例えば風などによって生じる微妙な揺らぎ等の変化を吸収して(このような微細な変化は検出せずに)、真に必要な変化(例えば人や物の侵入により生じた変化)のみを効率よく検出することが出来る。
【0012】
またエリア単位にエリア画素値で比較するため、演算負荷が少なくてすむ。
【0013】
(2)本発明の画像処理装置は、
前記画像変化検出処理に使用するしきい値の値を変更する手段を含むことを特徴とする。
【0014】
例えば外部入力に基づきしきい値記憶手段に記憶されているしきい値を変更することで、前記画像変化検出処理に使用するしきい値の値を変更するようにしてもよい。
【0015】
また例えば複数のしきい値テーブルを持たせておき、外部入力に基づき使用するしきい値テーブルを切り替える使用するようにすることで前記画像変化検出処理に使用するしきい値の値を変更するようにしてもよい。
【0016】
本発明によれば画像の内容に応じて最適なしきい値の設定を行うことが出来る。
【0017】
なお入力情報とは例えば外部入力でもよく、このようにするとユーザーが外部から入力することにより画像の内容に応じて最適なしきい値の設定を行うことが出来る。
【0018】
また入力情報とは例えば内部的にシステムが生成した入力情報でもよく、このようにするとシステムが所定の条件を検出することで自動的にしきい値の変更を行うことが出来る。
【0019】
(3)本発明は、画像処理装置であって、
第1の画像データと第2の画像データを同一の分割パターンで複数のエリアに分割し、第1の画像データ及び第2の画像データについて、各エリアに属する画素の色又は輝度に関する画素値を集計してエリア画素値を演算する手段と、
第1の画像データと第2の画像データの対応するエリアのエリア画素値の差分を演算する手段と、
エリア画素値の差分に基づき画像の変化の有無を判断する画像変化検出処理を行う手段と
を含むことを特徴とする。
【0020】
各エリアに属する画素の色又は輝度に関する画素値とは例えば、カメラからの画像(デジタル画像又はデジタル変換された画像)の各画素の値の色情報や輝度情報である。例えば画像データがYUV形式の場合はそのYUV値又はYUVのいずれかの成分の値でもよいし、これらの値から演算により導かれる値でもよい。また例えば画像データがRGB形式の場合はそのRGB値又はRGBのいずれかの成分の値でもよいし、これらの値から演算により導かれる値でもよい。
【0021】
また例えば各画素の情報として、輝度情報と色差情報がくる場合には、それらの値でもよいし、それらの値から演算により導かれる値でもよい。
【0022】
また画素値を集計して得られるエリア画素値は、画素値の合計値でもよいし、画素値の平均値でもよいし、画素値を集計して値から所与の関数によって得られる値でもよい。
【0023】
本発明によれば画素単位ではなくエリア単位のエリア画素値で比較するため、例えば風などによって生じる微妙な揺らぎ等の変化を吸収して(このような微細な変化は検出せずに)、真に必要な変化(例えば人や物の侵入により生じた変化)のみを効率よく検出することが出来る。
【0024】
またエリア単位にエリア画素値で比較するため、演算負荷が少なくてすむ。
【0025】
(4)本発明の画像処理装置は、
第1の画像データと第2の画像データを複数のエリアに分割するための分割パターンを変更する手段を含むことを特徴とする。
【0026】
例えば複数の分割パターンを用意しておいて、入力情報に基づき使用する分割パターンを切り替えることで第1の画像データと第2の画像データを複数のエリアに分割するための分割パターンを変更するようにしてもよい。
【0027】
本発明によれば画像の内容に応じて最適な分割パターンの設定を行うことが出来る。
【0028】
なお入力情報とは例えば外部入力でもよく、このようにするとユーザーが外部から入力することにより画像の内容に応じて最適な分割パターンの設定を行うことが出来る。
【0029】
また入力情報とは例えば内部的にシステムが生成した入力情報でもよく、このようにするとシステムが所定の条件を検出することで自動的に分割パターンの変更を行うことが出来る。
【0030】
例えば変化の検出状況に応じて、分割パターンを変更する手段をふくみ、
変化が検出されたらより分割数の高い分割パターンへ変更するようにしてもよい。このようにすると平常時は演算負荷の低い検出(検出精度もひくい)を行い、異常の疑いが有る場合のみ演算負荷の高いい検出(検出精度も高い)を行うように制御することが出来る。
【0031】
また例えば変化の検出状況に応じて、分割パターンを変更する手段をふくみ、
変化が検出されたらより分割数の低い分割パターンへ変更するようにしてもよい。このようにすると一旦変化を検出して画像を保存すると、それ以降はさらに大きな変化があった場合に再び変化を検出して画像を保存するように制御することが出来る。このため変化時に同じような画像が多数保存される事態を防ぐことが出来る。
【0032】
(5)本発明の画像処理装置は、
画像変化検出処理において変化の有無を判断する際の判断対象として使用するエリアの指定を行う手段をさらに含み、
指定されたエリアのエリア画素値の差分値に基づき画像の変化の有無を判断することを特徴とする。
【0033】
(6)本発明の画像処理装置は、
各エリアに属する画素の輝度値又は輝度成分を集計してエリア画素値を演算することを特徴とする。
【0034】
画素の輝度値又は輝度成分を使用することで、精度良く変化の検出を行うことが出来る。
【0035】
(7)本発明の画像処理装置は、
周期的に画像を取り込む画像取込手段をさらに含み、
第1の画像データとして基準画像データを使用し、第2の画像データとして周期的に取り込まれた画像データを使用することを特徴とする。
【0036】
このようにすることで取得画像(周期的に撮影された画像)が基準画像に対して変化した場合の変化を検出することができる。従って人工照明を使用した室内のように時間的に明るさ等が変化しない場所の画像の変化を検出する場合には、有効である。
【0037】
(8)本発明の画像処理装置は、
周期的に画像を取り込む画像取込手段をさらに含み、
第1の画像データ及び第2の画像データとして周期的に取り込まれた画像データを使用することを特徴とする。
【0038】
このように第1の画像と第2の画像がともに時間的に変化させることにより、例えば自然光のように時間的に変化する場所の画像の変化を検出する際にも、周囲の明るさの変化を反映して精度よく画像変化の検出を行うことが出来る。
【0039】
(9)本発明の画像処理装置は、
周期的に取り込まれた画像に対して、指定された間隔で変化検出の対象となる画像をピックアップする手段をさらに含むことを特徴とする。
【0040】
ピックアップする間隔の指定は、例えばフレーム数(何フレームに1回ピックアップするとか)で行うようにしてもよいし、時間間隔で行うようにしてもよい。 またピックアップした画像のみを比較用のバッファに格納することで比較用画像の取捨選択を行うようにしてもよいし、すべての画像を比較用バッファに格納するが、比較処理に使用しない画像が発生するようにしてもよい。例えば所定の時間間隔で比較処理が行われるように制御する場合には、所定の時間間隔より短い間隔で所得された画像は、比較処理に用いられないまま、次の取得画像で上書きされることになる。
【0041】
毎フレームごとに差分をとって比較をおこなうと、変化が少ないわりに演算負荷が増大する。本発明によれば、変化を見逃さない程度の間隔を設定することで、効率よく変化の検出を行うことが出来る。
【0042】
(10)本発明の画像処理装置は、
前記画像変化検出処理により第1の画像と第2の画像を比較して変化ありと判断した場合に時系列に後者の画像を保存用の記憶手段に保存する手段をふくむことを特徴とする。
【0043】
(11)本発明の画像処理装置は、
前記画像変化検出処理により第1の画像と第2の画像を比較して変化ありと判断した場合に時系列に後者の画像を印刷手段から印刷出力する手段をふくむことを特徴とする。
【0044】
(12)本発明は、コンピュータが実行可能なプログラムであって、
第1の画像データと第2の画像データを同一の分割パターンで複数のエリアに分割し、第1の画像データ及び第2の画像データについて、各エリアに属する画素の色又は輝度に関する画素値を集計してエリア画素値を演算する手段と、
第1の画像データと第2の画像データの対応するエリアのエリア画素値の差分を演算する手段と、
分割パターンによって分割される各エリアに関連づけて各エリアのエリア画素値の差分判定に用いるしきい値を記憶するしきい値記憶手段と、
前記差分と前記エリアに関連づけてしきい値記憶手段に記憶されたしきい値とを比較して、前記差分がしきい値の範囲内に収まっているか否か判断し、収まっていない場合に変化ありと検出する画像変化検出処理を行う手段と、
コンピュータに実現させることを特徴とする。
【0045】
(13)本発明のプログラムは、
前記画像変化検出処理に使用するしきい値の値を変更する手段を、
コンピュータに実現させることを特徴とする。
【0046】
(14)本発明は、コンピュータが実行可能なプログラムであって、
第1の画像データと第2の画像データを同一の分割パターンで複数のエリアに分割し、第1の画像データ及び第2の画像データについて、各エリアに属する画素の色又は輝度に関する画素値を集計してエリア画素値を演算する手段と、
第1の画像データと第2の画像データの対応するエリアのエリア画素値の差分を演算する手段と、
エリア画素値の差分に基づき画像の変化の有無を判断する画像変化検出処理を行う手段と
コンピュータに実現させることを特徴とする。
【0047】
(15)本発明のプログラムは、
第1の画像データと第2の画像データを複数のエリアに分割するための分割パターンを変更する手段をコンピュータに実現させることを特徴とする。
【0048】
(16)本発明のプログラムは、
画像変化検出処理において変化の有無を判断する際の判断対象として使用するエリアの指定を行う手段をコンピュータに実現させるプログラムをさらに含み、
指定されたエリアのエリア画素値の差分値に基づき画像の変化の有無を判断することを特徴とする。
【0049】
(17)本発明のプログラムは、
各エリアに属する画素の輝度値又は輝度成分を集計してエリア画素値を演算することを特徴とする。
【0050】
【発明の実施の形態】
以下、本発明の好適な実施の形態について図面を用いて詳細に説明する。なお、以下に説明する実施の形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また以下で説明される構成の全てが本発明の必須構成要件であるとは限らない。
【0051】
図1に、本の実施形態における画像処理システムのブロック図を示す。
【0052】
画像処理システム10は、第1の画像データが記憶されている第1の画像データ記憶部20を含む。第1の記憶部20の機能は、DRAM(Dynamic Random Access Memory)などの揮発性メモリや、SRAM(Static Random Access Memory)、フラッシュメモリ或いはROM(Read Only Memory)等の不揮発性メモリにより実現される。
【0053】
画像処理システム10は、第2の画像データが記憶されている第2の画像データ記憶部30を含む。第2の記憶部30の機能は、DRAM(Dynamic Random Access Memory)などの揮発性メモリや、SRAM(Static Random Access Memory)、フラッシュメモリ或いはROM(Read Only Memory)等の不揮発性メモリにより実現される。
【0054】
画像処理システム10は、第1の画像データエリア輝度(又は色)演算部40を含む。第1の画像データエリア輝度(又は色)演算部40は、第1の画像データを第2の画像データをと同一の分割パターンで複数のエリアに分割し、第1の画像データについて各エリア毎に、各エリアに属する画素の輝度(又は色)に関する画素値を集計してエリア輝度(又は色)値を演算する。ここでエリア輝度(又は色)値は、各エリアに属する画素の輝度(又は色)に関する画素値の合計値でもよいし、平均値でもよい。
【0055】
画像処理システム10は、第2の画像データエリア輝度(又は色)演算部50を含む。第2の画像データエリア輝度(又は色)演算部50は、第2の画像データを第1の画像データをと同一の分割パターンで複数のエリアに分割し、第2の画像データについて各エリア毎に、各エリアに属する画素の輝度(又は色)に関する画素値を集計してエリア輝度(又は色)値を演算する。ここでエリア輝度(又は色)値は、各エリアに属する画素の輝度(又は色)に関する画素値の合計値でもよいし、平均値でもよい。
【0056】
画像処理システム10は、分割パターン設定部70を含む。分割パターン設定部70は、第1の画像データ及び第2の画像データのエリア輝度(又は色)算出の単位となるエリア分割に関する情報を設定する。例えば1種類の分割パターンのみ設定されている場合でもよいし、複数の分割パターンについて切り替え可能に設定されている場合でもよい。
【0057】
画像処理システム10は、エリアしきい値情設定部80を含む。エリアしきい値情報記憶部80は、分割パターンによって分割される各エリアに関連づけて各エリアのエリア画素値の差分判定に用いるしきい値の設定を行う。
【0058】
画像処理システム10は、画像変化検出部60を含む。画像変化検出部60は、各エリア毎に第1の画像データのと第2の画像データのエリア輝度(又は色)値との差分を演算し、エリア毎に第1の画像データと第2の画像データのエリア輝度(又は色)値の差分と前記エリアに対応したしきい値とを比較して、差分がしきい値の範囲内に収まっているかいなか判断し、収まっていない場合に変化ありと判断し、変化検出信号62を出力する。
【0059】
ここでしきい値は、しきい値情報設定部80から対応するしきい値を読み出して使用するようにしてもよい。
【0060】
なお第1の画像データエリア輝度(又は色)演算部40、第2の画像データエリア輝度(又は色)演算部50、画像変化検出部60の機能は、特定用途向けIC(Application Specific Integrated Circuit:ASIC)や、CPU(Central Processing Unit)などのハードウェアをファームウェアやソフトウェア等により制御することで実現される。
【0061】
また分割パターン記憶部70、エリアしきい値情報記憶部80の機能は、DRAM(Dynamic Random Access Memory)などの揮発性メモリや、SRAM(Static Random Access Memory)、フラッシュメモリ或いはROM(Read Only Memory)等の不揮発性メモリにより実現される場合でもよいし、これらと特定用途向けIC(Application Specific Integrated Circuit:ASIC)や、CPU(Central Processing Unit)などのハードウェアをファームウェアやソフトウェア等の協働により実現される場合でもよい。
【0062】
図2は本実施の形態のエリア輝度について説明するための図である。
【0063】
110は第1の画像データ記憶部に記憶された第1の画像であり、210は第2の画像データ記憶部に記憶された第2の画像である。本実施の形態では、第1の画像110と第2の画像を同一の分割パターンでパターンで複数のエリアに分割する。
【0064】
第1の画像の所与のエリア120が例えばm1×m2=nの画素P1、P2・・・Pnで構成されており、各画素P1、P2・・・Pnの輝度(又は色)に関する画素値の値がa1,a2・・・anであるとする。この場合に、第1の画像の所与のエリアのエリア画素値をA1とすると、A1は例えば以下の式で表すことが出来る。
【0065】
A1=(a1+a2+・・・+an)/n
同様にして第2の画像の所与のエリア220が例えばm1×m2=nの画素P1、P2・・・Pnで構成されており、各画素P1、P2・・・Pnの輝度(又は色)に関する画素値の値がb1,b2・・・bnであるとする。この場合に、第2の画像の所与のエリアのエリア画素値をB1とすると、B1は例えば以下の式で表すことが出来る。
【0066】
B1=(b1+b2+・・・+bn)/n
なお図2では同一サイズの複数の長方形のエリアに分割しているがこれに限られない。例えば異なるサイズの長方形のエリアに分割する場合でもよいし、長方形以外の多角形に分割する場合でもよい。
【0067】
図3は本実施の形態の画像の変化を検出する処理の一例について説明するためのフローチャート図である。
【0068】
第1の画像データ及び第2の画像データを同一の分割パターンで複数のエリアに分割し、第1の画像データ及び第2の画像データについて各エリア毎に、各エリアに属する画素の色又は輝度に関する画素値を集計してエリア輝度(又は色)を演算する(ステップS10)。
【0069】
次に変数iを初期設定(i=1)する(ステップS20)。
【0070】
次に変数iをインクリメントする(i=i+1)(ステップS30)
次に第1の画像データと第2の画像データの第iのエリアのエリア輝度値の差分を演算する(ステップS40)。
【0071】
次に第iのエリアのしきい値情報を読み出して、第iのエリアのエリア輝度値の差分と比較する(ステップS50)。
【0072】
そして差分と対応するしきい値を比較して、差分がしきい値の範囲内に収まっているかいない判断し、収まっていない場合には変化ありと検出する(ステップS60、S70)。
【0073】
また差分がしきい値の範囲内に収まっている場合には、すべてのエリアについて比較処理が終了したか否か判断する(ステップS60、S80)。
【0074】
そして、すべてのエリアについて比較処理が終了していない場合には再びステップS30〜S80の処理を繰り返す(ステップS80、ステップS30〜S80)、すべてのエリアについて比較処理が終了した場合には変化なしと判断する(ステップS80、S90)。
【0075】
図4は、本実施の形態の画像処理システムを専用のハードウエアで実現する場合の回路構成の一例について説明するための図である。
【0076】
本実施の形態の画像処理システムは、制御回路310,平均輝度演算回路320、差分検出回路330、しきい値格納レジスタ340、奇数フレーム用エリア輝度格納レジスタ350、偶数フレーム用エリア輝度格納レジスタ360、第1のセレクタ370、第2のセレクタ380、第3のセレクタ390等を含む。
【0077】
しきい値格納レジスタ340には各エリアのしきい値が各エリアに関連づけて格納されている。
【0078】
奇数フレーム用エリア輝度格納レジスタ350には、奇数フレームの画像データの各エリアの集計値が各エリアに関連づけて格納される。
【0079】
偶数フレーム用エリア輝度格納レジスタ360には、偶数フレームの画像データの各エリアの集計値が各エリアに関連づけて格納される。
【0080】
制御回路310は、平均輝度計算回路320、第1のセレクタ370、第2のセレクタ380、第3のセレクタ390、差分検出回路330に向け各種制御信号312,314、316を出力し、これらの動作を制御する。また制御回路310はエリアサイズレジスタ311を含む。エリアサイズレジスタ312には、エリアの分割パターンに関する情報(例えばエリアサイズやエリア数やエリア座標等に関する情報)が記憶されている。
【0081】
平均輝度演算回路320は、制御回路310の輝度演算制御信号312に基づき、入力した画素値(第1の画像データ又は第2の画像データをの画素値)を当該画素が属するエリア輝度値の集計値(奇数フレーム用エリア輝度格納レジスタや偶数フレーム用エリア輝度格納レジスタの該当するエリアの領域に格納されている)に足し込み、足し込み後の集計値を奇数フレーム用エリア輝度格納レジスタ又は偶数フレーム用エリア輝度格納レジスタの該当する領域に格納する処理を行う。
【0082】
第1のセレクタ370は、制御回路310からの読み出し制御信号314に基づき、しきい値格納レジスタ340に格納されているしきい値を読み出し、読み出したしきい値372を差分検出回路330に向け出力する。
【0083】
第2のセレクタ380は、制御回路310からの読み出し制御信号314に基づき、奇数フレーム用エリア輝度格納レジスタ350に格納されているエリア輝度集計値を読み出し、読み出したエリア輝度集計値382を差分検出回路330又は平均輝度計算回路320に向け出力する。
【0084】
第3のセレクタ390は、制御回路310からの読み出し制御信号314に基づき、偶数フレーム用エリア輝度格納レジスタ360に格納されているエリア輝度集計値を読み出し、読み出したエリア輝度集計値392を差分検出回路330又は平均輝度計算回路320に向け出力する。
【0085】
差分検出回路330は、制御回路310からの読み出し制御信号316に基づき、奇数フレーム用エリア輝度格納レジスタ350に格納されているエリア輝度集計値及び偶数フレーム用エリア輝度格納レジスタ360に格納されているエリア輝度集計値及びしきい値格納レジスタ340に格納されているしきい値を入力し、奇数フレーム用エリア輝度格納レジスタ350に格納されているエリア輝度集計値及び偶数フレーム用エリア輝度格納レジスタ360に格納されているエリア輝度集計値の差分を演算し、当該差分と入力したしきい値とを比較し、差分がしきい値の範囲内に収まっていない場合(差分>しきい値又は差分≧しきい値)には、変化検出信号を出力する。
【0086】
図5、図6は、本実施の形態の画像処理システムを専用のハードウエアで実現する場合の処理の一例について説明するためのフローチャート図である。
【0087】
まず図5を用いて初期設定処理について説明する。
【0088】
分割パターンを特定するためのエリアの形状・サイズの設定を行う(ステップS110)。例えばエリアサイズレジスタにエリアの形状やサイズに関する情報を設定する。例えば外部から設定する場合でもよいし、システムが設定する場合でもよい。
【0089】
次に奇数フレーム用エリア輝度格納レジスタ及び偶数フレーム用エリア輝度格納レジスタをクリアする(ステップS120)。
【0090】
次に、しきい値格納レジスタに各エリアのしきい値を格納する(ステップS110)。例えば外部から設定する場合でもよいし、システムが設定する場合でもよい。
【0091】
次に図6を用いて変化検出処理について説明する。
【0092】
まず図5で説明したような初期設定処理を行う(ステップS210)。
【0093】
次に第1のフレームの各エリアのエリア輝度値を演算して、奇数フレーム用エリア輝度設定レジスタに格納する(ステップS220)。
【0094】
次に第2のフレームの各エリアのエリア輝度値を演算して、偶数フレーム用エリア輝度設定レジスタに格納する(ステップS230)。
【0095】
次に変数kに2を設定する(ステップS230)。
【0096】
次に奇数フレーム用エリア輝度値格納レジスタと偶数フレーム用エリア輝度値格納レジスタの各エリアの輝度値を順次比較し、しきい値格納レジスタの対応するエリアのしきい値以上の差分が有る場合変化検出信号を生成して出力する(ステップS250)。
【0097】
そして変化検出信号が出力された場合変化ありと判断する(ステップS260、S270)。
【0098】
また変化検出信号が出力されない場合には、すべてのエリアについて比較処理が終了したか否か判断する(ステップS260、S280)。
【0099】
そして、すべてのエリアについて比較処理が終了した場合には、変化なしと判断する(ステップS280、S290)。
【0100】
またすべてのエリアについて比較処理が終了していない場合には、変数kをインクリメントする(ステップS280、S300)。
【0101】
次にkが奇数か偶数か判断し、奇数の場合には奇数フレーム用エリア輝度値格納レジスタに格納し、偶数の場合には偶数フレーム用エリア輝度値格納レジスタに格納し、ステップS250〜S300の処理を繰り返す(ステップS310、S320、S330)。
【0102】
図7(A)〜(C)は、画像のエリア分割パターンについて説明するための図である。
【0103】
図7(A)は画像を14×11の長方形(小)エリアに分割する第1の分割パターンであり、図7(B)は画像を7×5の長方形(中)エリアに分割する第2の分割パターンであり、図7(C)は画像を4×3の長方形(大)エリアに分割する第3の分割パターンである。
【0104】
本実施の形態では、分割パターンを外部入力によって設定、変更出来るようにしても良い。
【0105】
エリア輝度の変化を検出して画像が変化したかいなか調べる場合には、よりこまかなエリアに分割した方が精度良く変化を検出することが出来るといえる。すなわち第1の分割パターン>第2の分割パターン>第3の分割パターンの順で精度良く変化を検出することが出来る。
【0106】
ただしよりこまかなエリアに分割すると、ソフトウエアでで実現する場合には演算量が増加し、またハードウエアで実現する場合には回路規模が増大する。
【0107】
従って検出対象となる画像の内容におうじて最適な分割パターンを設定することがこのましい。
【0108】
また例えば複数の分割パターンを用意しておいて分割パターンを切り替えることができるようにしてもよい。例えば外部からの設定によって切り替える場合でもよいし、システムが自動的に切り替える場合でもよい。
【0109】
例えば変化の検出状況に応じて、分割パターンを変更する手段をふくみ、
変化が検出されたらより分割数の高い分割パターン(例えば第3の分割パターン→第2の分割パターン→第1の分割パターン)に変更するようにしてもよいし、その逆でもよい。
【0110】
図8(A)(B)は、変化の有無の判断対象となるエリアの指定について説明するための図である。図8(A)の斜線部分410は、画像の変化検出エリアを表している。すなわち画像400は6×6の36個の長方形エリアに分割されているが、エリア画素値の比較による変化検出対象となるのは、変化検出エリア410に属する12個のエリアである。
【0111】
例えば入り口付近を監視するために固定的に設定された監視カメラの場合、特に人や物の出入りがない時は常に同じ風景が撮影されている。そして人や物の出入りによって変化が生じる領域というのも有る程度限られてくる。従って画像の変化の検出に必要なエリアのみで変化検出を行うようにしてもよい。
【0112】
このようにすると、すべてのエリアについて変化検出処理の対象とする場合に比べ、少ない処理負荷で変化の検出を行うことが出来る。
【0113】
図8(B)は、図8(A)とは異なる画像の場合の変化検出エリアの一例である。図8(B)の画像420は、引き戸付近を監視する監視カメラの画像である。同画像の場合は引き戸の開く部分の変化を検出することが効率よい。したがって図8(B)に示すように引き戸の開く部分(斜線領域)を変化検出エリアとして設定するとよい。
【0114】
なお変化設定エリアについては、外部入力により設定可能にしておく、設定されたエリアについてエリア輝度値の差分としきい値の比較による変化検出を行うようにしてもよい。
【0115】
図9に、第1の画像データとして基準画像の画像データを用いる構成の画像処理装置500の機能ブロック図を示す。
【0116】
画像処理装置500は、画像取込部522、第1の記憶部524、画像変化検出部526、第2の記憶部528、送信部530を含む。
【0117】
画像取込部522は、周期的に画像を取り込む。画像取込部522の機能は、CCDカメラ等により実現される。
【0118】
第1の記憶画像データ部524は、基準画像の画像データである基準画像データを記憶する。第1の記憶部524の機能は、DRAM(Dynamic Random Access Memory)などの揮発性メモリや、SRAM(Static Random Access Memory)、フラッシュメモリ或いはROM(Read Only Memory)等の不揮発性メモリにより実現される。
【0119】
なお基準画像の画像データとしては、初期設定時に画像取り込み部522から取り込んだ画像を第1の画像データ記憶部524に記憶させるようにしてもよい。
【0120】
画像変化検出部526は、画像取込部522によって取り込まれた取得画像の画像データである取得画像データを一時記憶メモリ(ワークメモリ)である第2の画像データ記憶部528に記憶させ、第2の画像データ記憶部528に記憶された第2の画像データ(取得画像データ)と、第1の画像データ記憶部524に記憶された第1の画像データ(基準画像データ)を比較する。
【0121】
そして画像変化検出部526は、その比較結果により、基準画像(第1の画像)を基準として取得画像(第2の画像)が変化したか否かを検出する。画像変化検出部526は、取得画像が変化したことを検出したとき、画像変化検出信号530を出力する(変化させる)。画像変化検出部526は、取得画像が変化したことを検出しないとき、画像変化検出信号530を出力しない(変化させない)。画像変化検出部526の機能は、特定用途向けIC(Application Specific Integrated Circuit:ASIC)や、CPU(Central Processing Unit)などのハードウェアをファームウェアやソフトウェア等により制御することで実現される。
【0122】
また第2の画像データ記憶部528の機能は、DRAMなどの揮発性メモリや、SRAMやフラッシュメモリ等の不揮発性メモリにより実現される。
【0123】
保存用画像データ記憶部532は、画像変化検出部526によって取得画像が変化したことが検出されたことを条件として、取得画像データが格納される。保存用画像データ記憶部532の機能は、DRAMなどの揮発性メモリや、SRAMやフラッシュメモリ等の不揮発性メモリにより実現される。
【0124】
なお保存用画像データ記憶部532に保存された画像を、所定のタイミングで自動的に印刷部(例えばプリンター等)から出力(プリントアウト)するようにしてもよい。
【0125】
このような画像処理装置500は、CPU(図示せず)及びメモリ(図示せず)を有する。そして画像処理装置20500では、メモリに記憶されたプログラムにしたがって処理を行ったCPUにより、以下に示す制御が行われる。
【0126】
図10に、図9の画像処理装置の動作フローの一例を示す。
【0127】
画像処理装置500では、まず画像取込部522によって基準画像の取り込みをおこない、第1の画像データ記憶部に記憶させる(ステップS410)。
【0128】
これ以降、画像処理装置500では、画像取込部522により、周期的に画像の取り込みが行われる。
【0129】
まず、画像取込部522によって、周期的に撮影される画像(取得画像)を取り込み、第2の画像データ記憶部に記憶させる(ステップS420)。
【0130】
次に取得画像(第2の画像データ記憶部に記憶された第2の画像)と基準画像(第1の画像データ記憶部に記憶された第1の画像)について変化検出処理を行う(ステップS430)。変化検出処理は、図1から図8で説明した手法により行うことが出来る。
【0131】
変化有りの場合には変化検出信号を出力し、取得画像を保存用画像データ記憶部に保存する(ステップS440、S450、S460)。
【0132】
そして処理が終了ではないとき(ステップS470)、ステップS420にもどり、再びステップS420〜S470の処理を繰り返す。
【0133】
このようにすることで取得画像(周期的に撮影された画像)が基準画像に対して変化した場合の変化を検出することができる。従って人工照明を使用した室内のように時間的に明るさ等が変化しない場所の画像の変化を検出する場合には、有効である。
【0134】
第1の記憶部に保存される基準画像データは、所与の期間をおいて更新されるようにしてもよい。例えば第1の画像と第2の画像がともに周期的に取り込まれる時系列の画像で有る場合でもよい。
【0135】
図11に、第1の画像と第2の画像がともに周期的に取り込まれる時系列の画像で有る構成の画像処理装置の機能ブロック図を示す。ここで、図9に示す画像処理装置500と同一部分には同一符号を付し、適宜説明を省略する。
【0136】
本画像処理装置600が、図9に示す画像処理装置500と異なる点は、第1の画像データ記憶部524に、取得画像データが所与の周期で格納される点にある。ここで、画像処理装置600は、図9に示す画像変化検出部526と同様に、取得画像の変化を検出する画像変化検出部552を含む。
【0137】
画像処理装置600では、周期的的に取得される取得画像を第1の画像データ記憶部524と第2の画像データ記憶部528に交互に記憶させるようにしてもよい。また画像変化検出部552によって取得画像が変化しなかったことが検出されたことを条件として、画像取込部522によって取り込まれた取得画像データが基準画像データとして第1の記憶部524に格納されるようにしてもよい。また画像が取り込まれるたびに第1の記憶部524に取得画像データが格納されるようにしてもよいし、所与の期間を置いて第1の記憶部524に取得画像データが格納されるようにしてもよい。
【0138】
そして画像変化検出部552は、第1の画像データ記憶部に記憶された第1の画像と第2の画像データ記憶部に記憶された第2の画像とについて変化検出処理を行い変化を検出した場合には画像変化検出信号530を出力する。
【0139】
また変化を検出した場合には、第1の画像データ記憶部524又は第2の画像データ記憶部528に記憶された変化後の画像(時間的に後に撮影された画像)を保存用画像データ記憶部532に保存する。
【0140】
なお保存用画像データ記憶部532に保存された画像を、所定のタイミングで自動的に印刷部(例えばプリンター等)から出力(プリントアウト)するようにしてもよい。
【0141】
このように第1の画像と第2の画像がともに時間的に変化させることにより、例えば自然光のように時間的に変化する場所の画像の変化を検出する際にも、周囲の明るさの変化を反映して精度よく画像変化の検出を行うことが出来る。
【0142】
次に本実施の形態で使用する画素の輝度(又は色)情報について説明する。
【0143】
画素の輝度情報としては、例えば画素情報としてYUVデータを使用する場合には、各画素のY成分のデータを用いることが出来る。
【0144】
ここでは、画像取込部からの取得画像データがRGBフォーマットであるものとして説明するが、これに限定されるものではない。RGBフォーマットの画像データは、各画素がRGBの原色信号により表される。
【0145】
RGBフォーマットの取得画像データは、Y成分(輝度成分)、Cb成分及びCr成分からなる画像データに変換される。そして、画像変化検出部は、取得画像データのY成分と、基準画像データのY成分とを使用してエリア輝度値を算出して変化検出処理を行う。
【0146】
このように、輝度成分のみ抽出して輝度成分に基づき変化検出処理を行うことで、データ量の削減と処理負荷の軽減を図ることができる。
【0147】
次に、本実施形態を実現できるハードウェアの構成の一例について図13を用いて説明する。
【0148】
本実施の形態の画像処理装置は、CPU910,DMAC920,カメラモジュール930,メモリ(フレームメモリ等)940、画像変化検出部950,インタラプトコントローラ(INTC)960,周辺モジュール(システムとして必要な周辺モジュール等)970等を含み、これらがバス980で接続されている。
【0149】
ここで画像変化検出部950は、CPUが図示しない記憶媒体に格納されたプログラムを実行することによりソフトウエア的に実現される場合でもよいし、専用の回路によりハードウエア的に実現される場合でもよい。
【0150】
カメラモジュールによって周期的に撮影された画像の画像データはDMAC(Direct Memory Access Controller)920等によってバス980を使用してフレームメモリ940に格納される。
【0151】
画像変化検出部950は、フレームメモリ940に格納された画像をバス980とは別パス(942)で読み出すようにしてもよい。このようにすると、バストラフィックを軽減させることが出来る。
【0152】
そして画像の変化が検出された場合には、インタラプトコントローラ(INTC)960にむけ差分検出の割り込み信号952を出力すると、インタラプトコントローラ(INTC)960は、CPU910にむけ割り込み信号を出力し変化検出をCPU910に通知するようにしてもよい。
【0153】
なお、各手段は、ハードウェアのみにより実行してもよいし、情報記憶媒体に格納されるプログラムや通信インターフェースを介して配信されるプログラムのみにより実行してもよい。或いは、ハードウェアとプログラムの両方により実行してもよい。
【0154】
次に玄関に設置された監視カメラの画像の変化検出に用いるしきい値の設定を例にとり、しきい値設定方法について説明する。
【0155】
図14(A)〜(C)は、玄関に設置された監視カメラの画像の分割パターンとエリア輝度値について説明するための図である。
【0156】
図14(A)は、玄関に設置された監視カメラの画像を所定の分割パターンで複数のエリア(8×8の画素で構成されたエリア)に分割した様子を表したものである。
【0157】
ここで710は画像の右上端部のエリアであり、720は鴨居部分のエリアである。
【0158】
図14(B)は、右上端部のエリア(8×8の画素で構成されるエリア)に属する各画素の輝度値を表した表である。当該エリアに属する画素の平均輝度値(エリア輝度値)は138.86となる。
【0159】
また図14(C)は、鴨居部分のエリア(8×8の画素で構成されるエリア)に属する各画素の輝度値を表した表である。当該エリアに属する画素の平均輝度値(エリア輝度値)は193.75となる。
【0160】
一般に右上端部のエリアや鴨居部分のエリアは、検出対象外エリアである。なぜならば上記2つのエリアは侵入者の通過経路から外れた部分または、侵入初期において通過する経路ではないからである。
【0161】
従ってこのようなエリアについては、しきい値を大きくとること(この場合は例えば100程度)で、このエリアのエリア輝度値の輝度差の変化検出を防ぐことが出来る。
【0162】
図15(A)(B)及び図16(A)(B)は検出対象エリアのしきい値設定の一例について説明するための図である。
【0163】
図15(A)の730と図16(A)の740は、同位置のエリアであり、玄関の引き戸の閉開部分であり侵入経路にあたる部分でもある。
【0164】
図15(A)の画像は引き戸の開いた部分に猫が現れた時の画像であり、図15(B)はこのときのエリア730(8×8の画素で構成されるエリア)に属する各画素の輝度値を表した表である。当該エリアに属する画素の平均輝度値(エリア輝度値)は231.94となる。
【0165】
図16(A)の画像は引き戸の開いた部分に猫がいない状態の時の画像であり、図16(B)はこのときのエリア740(8×8の画素で構成されるエリア)に属する各画素の輝度値を表した表である。当該エリアに属する画素の平均輝度値(エリア輝度値)は177.69となる。
【0166】
このように画像に変化が生じた場合の当該エリアの平均輝度値(エリア輝度値)の差は54.25ある。従ってこの半分程度の値である25を当該エリアのしきい値として設定しておくことで、多少敏感に変化を検出できるようすることが出来る。
【0167】
図17(A)(B)及び図18(A)(B)は変化検出の一例について説明するための図である。
【0168】
図17(A)の750と図18(A)の760は、同位置のエリアであり、玄関の引き戸の閉開部分であり侵入経路にあたる部分でもある。
【0169】
図17(A)の画像は引き戸がしまった状態の時の画像であり、図17(B)はこのときのエリア750(8×8の画素で構成されるエリア)に属する各画素の輝度値を表した表である。当該エリアに属する画素の平均輝度値(エリア輝度値)は110となる。
【0170】
図18(A)の画像は引き戸が少し開いた状態の時の画像であり、図18(B)はこのときのエリア760(8×8の画素で構成されるエリア)に属する各画素の輝度値を表した表である。当該エリアに属する画素の平均輝度値(エリア輝度値)は157となる。
【0171】
かかる場合例えば当該エリアのエリア輝度の差が47あるので、しきい値が25で設定されている場合には変化ありが検出されることになる。
【0172】
なお、本発明は上述した実施の形態に限定されるものではなく、本発明の要旨の範囲内で種々の変形実施が可能である。
【0173】
また、本発明のうち従属請求項に係る発明においては、従属先の請求項の構成要件の一部を省略する構成とすることもできる。また、本発明の1の独立請求項に係る発明の要部を、他の独立請求項に従属させることもできる。
【図面の簡単な説明】
【図1】本の実施形態における画像処理システムのブロック図を示す。
【図2】本実施の形態のエリア輝度について説明するための図である。
【図3】本実施の形態の画像の変化を検出する処理の一例について説明するためのフローチャート図である。
【図4】本実施の形態の画像処理システムを専用のハードウエアで実現する場合の回路構成の一例について説明するための図である。
【図5】本実施の形態の画像処理システムを専用のハードウエアで実現する場合の処理の一例について説明するためのフローチャート図である。
【図6】本実施の形態の画像処理システムを専用のハードウエアで実現する場合の処理の一例について説明するためのフローチャート図である。
【図7】図7(A)〜(C)は、画像のエリア分割パターンについて説明するための図である。
【図8】図8(A)(B)は、変化の有無の判断対象となるエリアの指定について説明するための図である。
【図9】第1の画像データとして基準画像の画像データを用いる構成の画像処理装置500の機能ブロック図を示す。
【図10】図9の画像処理装置の動作フローの一例を示す。
【図11】第1の画像と第2の画像がともに周期的に取り込まれる時系列の画像で有る構成の画像処理装置の機能ブロック図である。
【図12】画素情報としてRGBデータを使用する場合の比較手法について説明するための図である。
【図13】本実施形態のハードウェアの構成の一例である。
【図14】図14(A)〜(C)は、玄関に設置された監視カメラの画像の分割パターンとエリア輝度値について説明するための図である。
【図15】図15(A)(B)は検出対象エリアのしきい値設定の一例について説明するための図である。
【図16】図16(A)(B)は検出対象エリアのしきい値設定の一例について説明するための図である。
【図17】図17(A)(B)は変化検出の一例について説明するための図である。
【図18】図18(A)(B)は変化検出の一例について説明するための図である。
【符号の説明】
10 画像処理システム、 20 第1の画像データ記憶部、 30 第2の画像データ記憶部、 40 第1の画像データエリア輝度(又は色)演算部、50 第2の画像データエリア輝度(又は色)演算部、 60 画像変化検出部、 62 変化検出信号、 70 分割パターン設定部、 80 エリアしきい値情報設定部、 300 画像処理システム、 310 制御部、 320 平均輝度演算部、 330 差分検出部、 340 しきい値レジスタ、 350奇数フレーム用エリア輝度値格納レジスタ、 360 偶数フレーム用エリア輝度値格納レジスタ、 370 第1のセレクタ、 380 第2のセレクタ、390 第3のセレクタ、
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing device and a program.
[0002]
[Prior art]
In an image processing device used in a security system, an image of a place to be monitored by a surveillance camera is captured, a change between frames is detected by image processing, and an image is saved when a change occurs at a certain level. .
[0003]
[Patent Document 1]
JP-A-5-56432
JP-A-6-176153
[0004]
[Problems to be solved by the invention]
For example, Japanese Patent Application Laid-Open No. 5-56432 discloses a method of making a judgment based on a change in the luminance of a pixel and its image area. However, according to this method, when the background is like a flower on one side, there is a drawback that the area where the luminance has changed is largely judged just because the wind is good.
[0005]
Further, for example, in Japanese Patent Laid-Open No. 6-176153, a binary image obtained by performing a certain background process is projected on the X-axis and the Y-axis to determine a difference based on a difference in luminance of a pixel and an image area thereof. An approach is disclosed. However, according to this method, in the case of an image for which no peak is obtained, a change in the image cannot be captured.
[0006]
The present invention has been made in view of the above technical problems, and an object of the present invention is to provide an image processing apparatus and a program capable of efficiently detecting only necessary changes. .
[0007]
[Means for Solving the Problems]
(1) The present invention relates to an image processing apparatus,
The first image data and the second image data are divided into a plurality of areas by the same division pattern, and the pixel values relating to the color or luminance of the pixels belonging to each area are determined for the first image data and the second image data. Means for counting and calculating an area pixel value;
Means for calculating the difference between the area pixel values of the corresponding areas of the first image data and the second image data;
Threshold value storage means for storing a threshold value used for determining a difference between area pixel values of each area in association with each area divided by the division pattern;
The difference is compared with a threshold value stored in a threshold value storage unit in association with the area, and it is determined whether or not the difference is within a threshold value range. Means for performing image change detection processing for detecting presence;
It is characterized by including.
[0008]
The pixel value relating to the color or luminance of a pixel belonging to each area is, for example, color information or luminance information of the value of each pixel of an image (digital image or digitally converted image) from a camera. For example, when the image data is in the YUV format, it may be a value of either the YUV value or the YUV component, or may be a value derived from these values by calculation. For example, when the image data is in the RGB format, it may be the RGB value or the value of any one of the RGB components, or a value derived from these values by calculation.
[0009]
Further, for example, when luminance information and color difference information come as information on each pixel, those values may be used, or values derived by calculation from these values may be used.
[0010]
The area pixel value obtained by summing up the pixel values may be a total value of the pixel values, an average value of the pixel values, or a value obtained by summing up the pixel values and obtaining a value from the value by a given function. .
[0011]
According to the present invention, since the comparison is made based on the area pixel value not in the pixel unit but in the area unit, for example, a change such as a subtle fluctuation caused by wind or the like is absorbed (without detecting such a minute change), and the true state is detected. (For example, a change caused by invasion of a person or an object) can be efficiently detected.
[0012]
In addition, since the comparison is performed using the area pixel value in units of area, the calculation load can be reduced.
[0013]
(2) The image processing device of the present invention
The image processing apparatus further includes means for changing a threshold value used in the image change detection processing.
[0014]
For example, the threshold value used in the image change detection process may be changed by changing the threshold value stored in the threshold value storage means based on an external input.
[0015]
Further, for example, a plurality of threshold tables are provided, and a threshold table used in the image change detection process is changed by switching the threshold table to be used based on an external input. It may be.
[0016]
According to the present invention, an optimum threshold value can be set according to the content of an image.
[0017]
The input information may be, for example, an external input. In this case, an optimal threshold value can be set according to the content of the image by the user inputting from the outside.
[0018]
The input information may be, for example, input information generated internally by the system. In this case, the threshold value can be automatically changed by the system detecting a predetermined condition.
[0019]
(3) The present invention relates to an image processing device,
The first image data and the second image data are divided into a plurality of areas by the same division pattern, and the pixel values relating to the color or luminance of the pixels belonging to each area are determined for the first image data and the second image data. Means for counting and calculating an area pixel value;
Means for calculating the difference between the area pixel values of the corresponding areas of the first image data and the second image data;
Means for performing image change detection processing for determining the presence or absence of an image change based on the difference between the area pixel values;
It is characterized by including.
[0020]
The pixel value relating to the color or luminance of a pixel belonging to each area is, for example, color information or luminance information of the value of each pixel of an image (digital image or digitally converted image) from a camera. For example, when the image data is in the YUV format, it may be a value of either the YUV value or the YUV component, or may be a value derived from these values by calculation. Further, for example, when the image data is in the RGB format, it may be an RGB value or a value of one of the RGB components, or a value derived from these values by calculation.
[0021]
Further, for example, when luminance information and color difference information come as information on each pixel, those values may be used, or values derived by calculation from these values may be used.
[0022]
The area pixel value obtained by summing up the pixel values may be a total value of the pixel values, an average value of the pixel values, or a value obtained by summing up the pixel values and obtaining a value from the value by a given function. .
[0023]
According to the present invention, since the comparison is made based on the area pixel value in the area unit instead of the pixel unit, for example, a change such as a subtle fluctuation caused by wind or the like is absorbed (without detecting such a minute change), and the true state is detected. (For example, a change caused by invasion of a person or an object) can be efficiently detected.
[0024]
In addition, since the comparison is performed using the area pixel value in units of area, the calculation load can be reduced.
[0025]
(4) The image processing apparatus of the present invention
The image processing apparatus further includes means for changing a division pattern for dividing the first image data and the second image data into a plurality of areas.
[0026]
For example, a plurality of division patterns are prepared, and a division pattern for dividing the first image data and the second image data into a plurality of areas is changed by switching a division pattern to be used based on input information. It may be.
[0027]
According to the present invention, an optimal division pattern can be set according to the content of an image.
[0028]
The input information may be, for example, an external input. In such a case, the user can input an external input to set an optimal division pattern according to the content of the image.
[0029]
The input information may be, for example, input information generated internally by the system. In this case, the system can automatically change the division pattern by detecting a predetermined condition.
[0030]
For example, including means for changing the division pattern according to the change detection situation,
When a change is detected, the division pattern may be changed to a division pattern having a higher division number. In this manner, it is possible to perform control so that detection with a low calculation load (low detection accuracy) is performed in normal times, and detection with a high calculation load (high detection accuracy) is performed only when there is a suspected abnormality.
[0031]
In addition, for example, in accordance with a change detection state, a means for changing a division pattern is included,
When a change is detected, the division pattern may be changed to a division pattern having a lower division number. In this way, once a change is detected and the image is stored, it is possible to perform control so as to detect the change again and save the image when there is a larger change thereafter. For this reason, it is possible to prevent a situation where many similar images are stored at the time of change.
[0032]
(5) The image processing apparatus of the present invention
The image change detection processing further includes means for specifying an area to be used as a determination target when determining the presence or absence of a change,
It is characterized in that the presence or absence of an image change is determined based on the difference between the area pixel values of the designated area.
[0033]
(6) The image processing apparatus of the present invention
It is characterized in that the area pixel value is calculated by summing up the luminance values or luminance components of the pixels belonging to each area.
[0034]
By using the luminance value or luminance component of a pixel, a change can be detected with high accuracy.
[0035]
(7) The image processing apparatus of the present invention
The image processing apparatus further includes image capturing means for periodically capturing an image,
It is characterized in that reference image data is used as the first image data, and image data periodically taken in is used as the second image data.
[0036]
By doing so, it is possible to detect a change in the case where the acquired image (the image captured periodically) changes with respect to the reference image. Therefore, it is effective when detecting a change in an image in a place where the brightness or the like does not change with time, such as in a room using artificial lighting.
[0037]
(8) The image processing apparatus of the present invention
The image processing apparatus further includes image capturing means for periodically capturing an image,
It is characterized in that image data periodically taken in is used as the first image data and the second image data.
[0038]
Since the first image and the second image are both temporally changed in this way, even when detecting a change in an image in a place that temporally changes, such as natural light, a change in the surrounding brightness is detected. And the image change can be detected with high accuracy.
[0039]
(9) The image processing apparatus of the present invention
The image processing apparatus further includes means for picking up an image to be subjected to change detection at a specified interval with respect to an image captured periodically.
[0040]
The specification of the pick-up interval may be performed by, for example, the number of frames (how many frames should be picked up once) or by the time interval. Also, the comparison images may be selected by storing only the picked-up images in the comparison buffer, or all images may be stored in the comparison buffer, but some images may not be used for the comparison process. You may make it. For example, when control is performed so that the comparison process is performed at a predetermined time interval, an image acquired at an interval shorter than the predetermined time interval may be overwritten with a next acquired image without being used for the comparison process. become.
[0041]
If the difference is obtained for each frame and the comparison is performed, the calculation load increases despite the small change. According to the present invention, a change can be detected efficiently by setting an interval at which a change is not overlooked.
[0042]
(10) The image processing apparatus of the present invention
When the first image and the second image are compared by the image change detection processing and it is determined that there is a change, means for storing the latter image in time-series storage means for storage is included.
[0043]
(11) The image processing apparatus of the present invention
When the first image and the second image are compared with each other in the image change detecting process and it is determined that there is a change, a means for printing and outputting the latter image from a printing unit in a time series is included.
[0044]
(12) The present invention is a computer-executable program,
The first image data and the second image data are divided into a plurality of areas by the same division pattern, and the pixel values relating to the color or luminance of the pixels belonging to each area are determined for the first image data and the second image data. Means for counting and calculating an area pixel value;
Means for calculating the difference between the area pixel values of the corresponding areas of the first image data and the second image data;
Threshold value storage means for storing a threshold value used for determining a difference between area pixel values of each area in association with each area divided by the division pattern;
The difference is compared with a threshold value stored in a threshold value storage unit in association with the area, and it is determined whether or not the difference is within a threshold value range. Means for performing image change detection processing for detecting presence;
It is realized by a computer.
[0045]
(13) The program of the present invention
Means for changing the value of the threshold used for the image change detection process,
It is realized by a computer.
[0046]
(14) The present invention is a computer-executable program,
The first image data and the second image data are divided into a plurality of areas by the same division pattern, and the pixel values relating to the color or luminance of the pixels belonging to each area are determined for the first image data and the second image data. Means for counting and calculating an area pixel value;
Means for calculating the difference between the area pixel values of the corresponding areas of the first image data and the second image data;
Means for performing image change detection processing for determining the presence or absence of an image change based on the difference between the area pixel values;
It is realized by a computer.
[0047]
(15) The program of the present invention comprises:
A computer is provided with means for changing a division pattern for dividing the first image data and the second image data into a plurality of areas.
[0048]
(16) The program of the present invention comprises:
The image change detection process further includes a program that causes a computer to implement means for designating an area to be used as a determination target when determining whether there is a change,
It is characterized in that the presence or absence of an image change is determined based on the difference between the area pixel values of the designated area.
[0049]
(17) The program of the present invention comprises:
It is characterized in that the area pixel value is calculated by summing up the luminance values or luminance components of the pixels belonging to each area.
[0050]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. The embodiments described below do not unduly limit the contents of the invention described in the claims. In addition, all of the configurations described below are not necessarily essential components of the invention.
[0051]
FIG. 1 shows a block diagram of an image processing system according to the present embodiment.
[0052]
The image processing system 10 includes a first image data storage unit 20 in which first image data is stored. The function of the first storage unit 20 is realized by a volatile memory such as a DRAM (Dynamic Random Access Memory), a nonvolatile memory such as an SRAM (Static Random Access Memory), a flash memory, or a ROM (Read Only Memory). .
[0053]
The image processing system 10 includes a second image data storage unit 30 in which second image data is stored. The function of the second storage unit 30 is realized by a volatile memory such as a DRAM (Dynamic Random Access Memory), a nonvolatile memory such as an SRAM (Static Random Access Memory), a flash memory, or a ROM (Read Only Memory). .
[0054]
The image processing system 10 includes a first image data area luminance (or color) calculation unit 40. The first image data area luminance (or color) calculation unit 40 divides the first image data into a plurality of areas according to the same division pattern as that of the second image data. Then, pixel values relating to the luminance (or color) of the pixels belonging to each area are totaled to calculate the area luminance (or color) value. Here, the area luminance (or color) value may be a total value or an average value of pixel values relating to luminance (or color) of pixels belonging to each area.
[0055]
The image processing system 10 includes a second image data area luminance (or color) calculation unit 50. The second image data area luminance (or color) calculation unit 50 divides the second image data into a plurality of areas according to the same division pattern as that of the first image data. Then, pixel values relating to the luminance (or color) of the pixels belonging to each area are totaled to calculate the area luminance (or color) value. Here, the area luminance (or color) value may be a total value or an average value of pixel values relating to luminance (or color) of pixels belonging to each area.
[0056]
The image processing system 10 includes a division pattern setting unit 70. The division pattern setting unit 70 sets information relating to area division, which is a unit for calculating area luminance (or color) of the first image data and the second image data. For example, only one type of division pattern may be set, or a plurality of division patterns may be set to be switchable.
[0057]
The image processing system 10 includes an area threshold information setting unit 80. The area threshold information storage unit 80 sets a threshold value used for determining a difference between area pixel values of each area in association with each area divided by the division pattern.
[0058]
The image processing system 10 includes an image change detection unit 60. The image change detection unit 60 calculates the difference between the first image data and the area luminance (or color) value of the second image data for each area, and calculates the first image data and the second image data for each area. By comparing the difference of the area luminance (or color) value of the image data with the threshold value corresponding to the area, it is determined whether or not the difference is within the range of the threshold value. And a change detection signal 62 is output.
[0059]
Here, as the threshold, a corresponding threshold may be read from the threshold information setting unit 80 and used.
[0060]
The functions of the first image data area luminance (or color) calculation unit 40, the second image data area luminance (or color) calculation unit 50, and the image change detection unit 60 are performed by an application-specific integrated circuit (IC) (Application Specific Integrated Circuit: It is realized by controlling hardware such as an ASIC) or a CPU (Central Processing Unit) with firmware or software.
[0061]
The functions of the division pattern storage unit 70 and the area threshold information storage unit 80 are as follows: volatile memory such as DRAM (Dynamic Random Access Memory), SRAM (Static Random Access Memory), flash memory or ROM (Read Only Memory). Or a hardware such as an application specific integrated circuit (ASIC) or a CPU (Central Processing Unit) such as a CPU or a Central Processing Unit (IC). May be done.
[0062]
FIG. 2 is a diagram for describing the area luminance according to the present embodiment.
[0063]
110 is the first image stored in the first image data storage unit, and 210 is the second image stored in the second image data storage unit. In the present embodiment, the first image 110 and the second image are divided into a plurality of areas by the same division pattern.
[0064]
A given area 120 of the first image is composed of, for example, m1 × m2 = n pixels P1, P2,... Pn, and pixel values relating to the luminance (or color) of each pixel P1, P2,. Are a1, a2,... An. In this case, assuming that the area pixel value of a given area of the first image is A1, A1 can be represented by the following equation, for example.
[0065]
A1 = (a1 + a2 +... + An) / n
Similarly, a given area 220 of the second image is composed of, for example, m1 × m2 = n pixels P1, P2,... Pn, and the luminance (or color) of each pixel P1, P2,. It is assumed that the pixel values of b1, b2,. In this case, assuming that the area pixel value of a given area of the second image is B1, B1 can be represented by the following equation, for example.
[0066]
B1 = (b1 + b2 +... + Bn) / n
In FIG. 2, the area is divided into a plurality of rectangular areas having the same size, but the invention is not limited to this. For example, it may be divided into rectangular areas of different sizes, or may be divided into polygons other than rectangles.
[0067]
FIG. 3 is a flowchart for explaining an example of a process of detecting a change in an image according to the present embodiment.
[0068]
The first image data and the second image data are divided into a plurality of areas by the same division pattern, and for each area of the first image data and the second image data, the color or luminance of a pixel belonging to each area Pixel luminance values are calculated by calculating the area luminance (or color) (step S10).
[0069]
Next, a variable i is initialized (i = 1) (step S20).
[0070]
Next, the variable i is incremented (i = i + 1) (step S30).
Next, a difference between the area luminance values of the i-th area of the first image data and the second image data is calculated (step S40).
[0071]
Next, the threshold information of the i-th area is read and compared with the difference between the area luminance values of the i-th area (step S50).
[0072]
Then, the difference is compared with the corresponding threshold value to determine whether the difference falls within the range of the threshold value. If not, it is detected that there is a change (steps S60, S70).
[0073]
If the difference is within the range of the threshold value, it is determined whether or not the comparison process has been completed for all the areas (steps S60 and S80).
[0074]
If the comparison processing has not been completed for all the areas, the processing of steps S30 to S80 is repeated again (step S80, steps S30 to S80). If the comparison processing has been completed for all the areas, there is no change. A judgment is made (steps S80, S90).
[0075]
FIG. 4 is a diagram for explaining an example of a circuit configuration when the image processing system of the present embodiment is realized by dedicated hardware.
[0076]
The image processing system according to the present embodiment includes a control circuit 310, an average luminance calculation circuit 320, a difference detection circuit 330, a threshold value storage register 340, an odd frame area luminance storage register 350, an even frame area luminance storage register 360, It includes a first selector 370, a second selector 380, a third selector 390, and the like.
[0077]
The threshold value storage register 340 stores the threshold value of each area in association with each area.
[0078]
In the odd frame area luminance storage register 350, a total value of each area of the odd frame image data is stored in association with each area.
[0079]
The even-number frame area luminance storage register 360 stores the total value of each area of the image data of the even-numbered frame in association with each area.
[0080]
The control circuit 310 outputs various control signals 312, 314, 316 to the average luminance calculation circuit 320, the first selector 370, the second selector 380, the third selector 390, and the difference detection circuit 330. Control. Control circuit 310 includes area size register 311. The area size register 312 stores information on area division patterns (for example, information on area size, number of areas, area coordinates, and the like).
[0081]
The average luminance calculation circuit 320 counts the input pixel values (the pixel values of the first image data or the second image data) based on the luminance calculation control signal 312 of the control circuit 310 to calculate the area luminance value to which the pixel belongs. Value (stored in the area of the corresponding area of the odd-numbered frame area brightness storage register or the even-numbered frame area brightness storage register), and the summed value after the addition is added to the odd-numbered frame area brightness storage register or the even-numbered frame. The processing for storing the data in the corresponding area of the area brightness storage register is performed.
[0082]
The first selector 370 reads the threshold stored in the threshold storage register 340 based on the read control signal 314 from the control circuit 310, and outputs the read threshold 372 to the difference detection circuit 330. I do.
[0083]
The second selector 380 reads the total area luminance value stored in the odd-numbered area luminance storage register 350 based on the read control signal 314 from the control circuit 310, and uses the read area luminance total value 382 as a difference detection circuit. Output to 330 or average luminance calculation circuit 320.
[0084]
The third selector 390 reads the total area luminance value stored in the area luminance storage register 360 for even-numbered frames based on the read control signal 314 from the control circuit 310, and converts the read total area luminance value 392 into a difference detection circuit. Output to 330 or average luminance calculation circuit 320.
[0085]
Based on the read control signal 316 from the control circuit 310, the difference detection circuit 330 calculates the area brightness total value stored in the odd frame area brightness storage register 350 and the area stored in the even frame area brightness storage register 360. The luminance sum value and the threshold value stored in the threshold value storage register 340 are input and stored in the area luminance sum value and the even frame area luminance storage register 360 stored in the odd frame area luminance storage register 350. Is calculated, and the difference is compared with the input threshold value. If the difference is not within the range of the threshold value (difference> threshold or difference ≧ threshold) Value), a change detection signal is output.
[0086]
FIG. 5 and FIG. 6 are flowcharts for explaining an example of processing when the image processing system of the present embodiment is realized by dedicated hardware.
[0087]
First, the initial setting process will be described with reference to FIG.
[0088]
The shape and size of an area for specifying the division pattern are set (step S110). For example, information on the shape and size of the area is set in the area size register. For example, the setting may be made from the outside or the system may make the setting.
[0089]
Next, the odd-numbered frame area luminance register and the even-numbered frame area luminance register are cleared (step S120).
[0090]
Next, the threshold of each area is stored in the threshold storage register (step S110). For example, the setting may be made from the outside or the system may make the setting.
[0091]
Next, the change detection processing will be described with reference to FIG.
[0092]
First, the initial setting process described with reference to FIG. 5 is performed (step S210).
[0093]
Next, the area luminance value of each area of the first frame is calculated and stored in the odd-numbered frame area luminance setting register (step S220).
[0094]
Next, the area brightness value of each area of the second frame is calculated and stored in the even frame area brightness setting register (step S230).
[0095]
Next, 2 is set to the variable k (step S230).
[0096]
Next, the luminance value of each area of the odd-numbered frame area luminance value storage register and the even-numbered frame area luminance value storage register are sequentially compared. A detection signal is generated and output (step S250).
[0097]
When the change detection signal is output, it is determined that there is a change (steps S260 and S270).
[0098]
If no change detection signal is output, it is determined whether the comparison process has been completed for all areas (steps S260 and S280).
[0099]
When the comparison process has been completed for all the areas, it is determined that there is no change (steps S280 and S290).
[0100]
If the comparison process has not been completed for all the areas, the variable k is incremented (steps S280 and S300).
[0101]
Next, it is determined whether k is an odd number or an even number. If k is an odd number, it is stored in an odd frame area luminance value storage register. If k is even, it is stored in an even frame area luminance value storage register. The process is repeated (steps S310, S320, S330).
[0102]
FIGS. 7A to 7C are diagrams for explaining an area division pattern of an image.
[0103]
FIG. 7A is a first division pattern for dividing an image into 14 × 11 rectangular (small) areas, and FIG. 7B is a second division pattern for dividing an image into 7 × 5 rectangular (medium) areas. FIG. 7C shows a third division pattern for dividing an image into 4 × 3 rectangular (large) areas.
[0104]
In the present embodiment, the division pattern may be set and changed by an external input.
[0105]
When detecting whether or not an image has changed by detecting a change in area luminance, it can be said that the change can be detected more accurately by dividing the image into more detailed areas. That is, a change can be detected with high accuracy in the order of the first divided pattern> the second divided pattern> the third divided pattern.
[0106]
However, if the area is divided into more detailed areas, the amount of computation increases when implemented by software, and the circuit scale increases when implemented by hardware.
[0107]
Therefore, it is preferable to set an optimal division pattern according to the content of the image to be detected.
[0108]
Further, for example, a plurality of division patterns may be prepared so that the division patterns can be switched. For example, the switching may be performed by an external setting, or the system may automatically switch.
[0109]
For example, including means for changing the division pattern according to the change detection situation,
When a change is detected, the division pattern may be changed to a division pattern having a higher division number (for example, a third division pattern → a second division pattern → a first division pattern), or vice versa.
[0110]
FIGS. 8A and 8B are diagrams for describing designation of an area to be determined whether there is a change. A hatched portion 410 in FIG. 8A represents an image change detection area. That is, the image 400 is divided into 36 rectangular areas of 6 × 6, and the change detection target based on the comparison of the area pixel values is the 12 areas belonging to the change detection area 410.
[0111]
For example, in the case of a surveillance camera fixedly set to monitor the vicinity of an entrance, the same scene is always photographed, especially when no people or objects enter or exit. In addition, an area where a change occurs due to the entry or exit of a person or an object is limited to some extent. Therefore, change detection may be performed only in an area necessary for detecting a change in an image.
[0112]
In this way, a change can be detected with a smaller processing load as compared with a case where all areas are subjected to the change detection processing.
[0113]
FIG. 8B is an example of a change detection area in the case of an image different from FIG. 8A. An image 420 in FIG. 8B is an image of a monitoring camera monitoring the vicinity of the sliding door. In the case of the same image, it is efficient to detect a change in a portion where the sliding door opens. Therefore, as shown in FIG. 8 (B), it is preferable to set an opening portion (shaded area) of the sliding door as a change detection area.
[0114]
The change setting area may be set by an external input, and the change detection may be performed on the set area by comparing a difference between area luminance values and a threshold value.
[0115]
FIG. 9 shows a functional block diagram of an image processing apparatus 500 configured to use the image data of the reference image as the first image data.
[0116]
The image processing device 500 includes an image capture unit 522, a first storage unit 524, an image change detection unit 526, a second storage unit 528, and a transmission unit 530.
[0117]
The image capturing unit 522 periodically captures an image. The function of the image capturing unit 522 is realized by a CCD camera or the like.
[0118]
The first storage image data unit 524 stores reference image data that is image data of the reference image. The function of the first storage unit 524 is realized by a volatile memory such as a DRAM (Dynamic Random Access Memory), a nonvolatile memory such as an SRAM (Static Random Access Memory), a flash memory, or a ROM (Read Only Memory). .
[0119]
Note that as the image data of the reference image, an image captured from the image capturing unit 522 at the time of initial setting may be stored in the first image data storage unit 524.
[0120]
The image change detection unit 526 causes the second image data storage unit 528, which is a temporary storage memory (work memory), to store the acquired image data, which is the image data of the acquired image acquired by the image acquisition unit 522, Then, the second image data (acquired image data) stored in the image data storage unit 528 is compared with the first image data (reference image data) stored in the first image data storage unit 524.
[0121]
Then, the image change detection unit 526 detects whether or not the acquired image (second image) has changed based on the reference image (first image) based on the comparison result. When detecting that the acquired image has changed, the image change detection unit 526 outputs (changes) an image change detection signal 530. The image change detection unit 526 does not output (does not change) the image change detection signal 530 when detecting that the acquired image has changed. The function of the image change detection unit 526 is realized by controlling hardware such as an application specific integrated circuit (ASIC) and a CPU (Central Processing Unit) by firmware or software.
[0122]
The function of the second image data storage unit 528 is realized by a volatile memory such as a DRAM or a nonvolatile memory such as an SRAM or a flash memory.
[0123]
The storage image data storage unit 532 stores the obtained image data on condition that the image change detection unit 526 detects that the obtained image has changed. The function of the storage image data storage unit 532 is realized by a volatile memory such as a DRAM or a nonvolatile memory such as an SRAM or a flash memory.
[0124]
The image stored in the storage image data storage unit 532 may be automatically output (printed out) from a printing unit (for example, a printer) at a predetermined timing.
[0125]
Such an image processing device 500 has a CPU (not shown) and a memory (not shown). In the image processing apparatus 20500, the following control is performed by the CPU that has performed the processing according to the program stored in the memory.
[0126]
FIG. 10 shows an example of an operation flow of the image processing apparatus of FIG.
[0127]
In the image processing apparatus 500, first, the reference image is captured by the image capturing unit 522, and is stored in the first image data storage unit (step S410).
[0128]
Thereafter, in the image processing device 500, the image capturing unit 522 periodically captures the image.
[0129]
First, an image (acquired image) that is periodically photographed is captured by the image capturing unit 522 and stored in the second image data storage unit (step S420).
[0130]
Next, a change detection process is performed on the acquired image (the second image stored in the second image data storage unit) and the reference image (the first image stored in the first image data storage unit) (step S430). ). The change detection process can be performed by the method described with reference to FIGS.
[0131]
If there is a change, a change detection signal is output, and the obtained image is stored in the storage image data storage unit (steps S440, S450, S460).
[0132]
When the process is not completed (step S470), the process returns to step S420, and the processes of steps S420 to S470 are repeated again.
[0133]
By doing so, it is possible to detect a change in the case where the acquired image (the image captured periodically) changes with respect to the reference image. Therefore, it is effective when detecting a change in an image in a place where the brightness or the like does not change with time, such as in a room using artificial lighting.
[0134]
The reference image data stored in the first storage unit may be updated after a given period. For example, the first image and the second image may be time-series images that are periodically captured.
[0135]
FIG. 11 shows a functional block diagram of an image processing apparatus having a configuration in which both the first image and the second image are time-series images that are periodically captured. Here, the same portions as those of the image processing apparatus 500 shown in FIG. 9 are denoted by the same reference numerals, and the description will be appropriately omitted.
[0136]
The image processing apparatus 600 differs from the image processing apparatus 500 shown in FIG. 9 in that acquired image data is stored in the first image data storage unit 524 at a given cycle. Here, the image processing device 600 includes an image change detection unit 552 that detects a change in the acquired image, similarly to the image change detection unit 526 illustrated in FIG.
[0137]
In the image processing apparatus 600, the acquired images periodically acquired may be alternately stored in the first image data storage unit 524 and the second image data storage unit 528. The acquired image data captured by the image capturing unit 522 is stored in the first storage unit 524 as reference image data, on condition that the image change detecting unit 552 detects that the acquired image has not changed. You may make it so. The acquired image data may be stored in the first storage unit 524 every time an image is captured, or the acquired image data may be stored in the first storage unit 524 after a given period. It may be.
[0138]
Then, the image change detection unit 552 detects a change by performing a change detection process on the first image stored in the first image data storage unit and the second image stored in the second image data storage unit. In this case, an image change detection signal 530 is output.
[0139]
When a change is detected, the image after the change (the image captured later in time) stored in the first image data storage unit 524 or the second image data storage unit 528 is stored in the storage image data storage. Stored in the unit 532.
[0140]
The image stored in the storage image data storage unit 532 may be automatically output (printed out) from a printing unit (for example, a printer) at a predetermined timing.
[0141]
Since the first image and the second image are both temporally changed in this way, even when detecting a change in an image in a place that temporally changes, such as natural light, a change in the surrounding brightness is detected. And the image change can be detected with high accuracy.
[0142]
Next, luminance (or color) information of a pixel used in the present embodiment will be described.
[0143]
When YUV data is used as the pixel information, for example, the Y component data of each pixel can be used as the pixel luminance information.
[0144]
Here, a description will be given assuming that the image data acquired from the image capturing unit is in the RGB format, but the present invention is not limited to this. In image data in the RGB format, each pixel is represented by an RGB primary color signal.
[0145]
The acquired image data in the RGB format is converted into image data including a Y component (luminance component), a Cb component, and a Cr component. Then, the image change detection unit performs a change detection process by calculating an area luminance value using the Y component of the acquired image data and the Y component of the reference image data.
[0146]
In this way, by extracting only the luminance component and performing the change detection processing based on the luminance component, it is possible to reduce the data amount and the processing load.
[0147]
Next, an example of a hardware configuration that can realize the present embodiment will be described with reference to FIG.
[0148]
The image processing apparatus according to the present embodiment includes a CPU 910, a DMAC 920, a camera module 930, a memory (frame memory or the like) 940, an image change detection unit 950, an interrupt controller (INTC) 960, and peripheral modules (peripheral modules required as a system). 970, etc., which are connected by a bus 980.
[0149]
Here, the image change detection unit 950 may be realized by software by a CPU executing a program stored in a storage medium (not shown), or may be realized by hardware by a dedicated circuit. Good.
[0150]
Image data of an image periodically captured by the camera module is stored in a frame memory 940 using a bus 980 by a DMAC (Direct Memory Access Controller) 920 or the like.
[0151]
The image change detection unit 950 may read out the image stored in the frame memory 940 by a different path (942) from the bus 980. In this way, bus traffic can be reduced.
[0152]
When a change in the image is detected, an interrupt signal 952 for detecting the difference is output to an interrupt controller (INTC) 960. May be notified.
[0153]
Each unit may be executed only by hardware, or may be executed only by a program stored in an information storage medium or a program distributed through a communication interface. Alternatively, it may be executed by both hardware and a program.
[0154]
Next, a method of setting a threshold used for detecting a change in the image of the monitoring camera installed at the entrance will be described as an example.
[0155]
FIGS. 14A to 14C are diagrams for explaining the division pattern and the area luminance value of the image of the monitoring camera installed at the entrance.
[0156]
FIG. 14A shows a state in which the image of the surveillance camera installed at the entrance is divided into a plurality of areas (areas composed of 8 × 8 pixels) in a predetermined division pattern.
[0157]
Here, reference numeral 710 is an area at the upper right end of the image, and 720 is an area of the Kamoi portion.
[0158]
FIG. 14B is a table showing the luminance values of the pixels belonging to the upper right end area (area composed of 8 × 8 pixels). The average luminance value (area luminance value) of the pixels belonging to the area is 138.86.
[0159]
FIG. 14C is a table showing the luminance value of each pixel belonging to the area of the Kamoi part (area composed of 8 × 8 pixels). The average luminance value (area luminance value) of the pixels belonging to the area is 193.75.
[0160]
In general, the area at the upper right end and the area of the Kamoi section are areas not to be detected. The reason is that the two areas are not a part deviating from the passage route of the intruder or a route passing in the early stage of the intrusion.
[0161]
Therefore, for such an area, by setting a large threshold value (for example, about 100 in this case), it is possible to prevent the detection of a change in the luminance difference of the area luminance value of this area.
[0162]
FIGS. 15A and 15B and FIGS. 16A and 16B are diagrams for explaining an example of threshold setting of the detection target area.
[0163]
Reference numeral 730 in FIG. 15A and 740 in FIG. 16A are areas at the same position, which are a portion of the entrance door that is closed and opened, and a portion that corresponds to an intrusion route.
[0164]
The image in FIG. 15A is an image when a cat appears in a portion where the sliding door is open, and FIG. 5 is a table showing luminance values of pixels. The average luminance value (area luminance value) of the pixels belonging to the area is 231.94.
[0165]
The image in FIG. 16A is an image when there is no cat in the part where the sliding door is open, and FIG. 16B belongs to the area 740 (area composed of 8 × 8 pixels) at this time. It is a table showing the luminance value of each pixel. The average luminance value (area luminance value) of the pixels belonging to the area is 177.69.
[0166]
The difference between the average luminance value (area luminance value) of the area when the image changes in this way is 54.25. Therefore, by setting about 25, which is about half of this value, as the threshold value of the area, it is possible to detect a change somewhat more sensitively.
[0167]
FIGS. 17A and 17B and FIGS. 18A and 18B are diagrams for explaining an example of change detection.
[0168]
Reference numeral 750 in FIG. 17A and 760 in FIG. 18A are areas at the same position, which are a part of the entrance door that is closed and opened, and also a part corresponding to an intrusion route.
[0169]
The image in FIG. 17A is an image when the sliding door is closed, and FIG. 17B is a diagram illustrating the luminance value of each pixel belonging to the area 750 (area composed of 8 × 8 pixels) at this time. FIG. The average luminance value (area luminance value) of the pixels belonging to the area is 110.
[0170]
The image of FIG. 18A is an image when the sliding door is slightly opened, and FIG. 18B is the image of each pixel belonging to the area 760 (area composed of 8 × 8 pixels) at this time. It is a table showing values. The average luminance value (area luminance value) of the pixels belonging to the area is 157.
[0171]
In such a case, for example, since there is a 47 difference in area luminance between the areas, if the threshold value is set to 25, a change is detected.
[0172]
Note that the present invention is not limited to the above-described embodiment, and various modifications can be made within the scope of the present invention.
[0173]
Further, in the invention according to the dependent claims of the present invention, a configuration in which some of the constituent elements of the dependent claims are omitted may be adopted. In addition, a main part of the invention according to one independent claim of the present invention can be made dependent on another independent claim.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating an image processing system according to an embodiment.
FIG. 2 is a diagram for describing area luminance according to the present embodiment.
FIG. 3 is a flowchart illustrating an example of a process of detecting a change in an image according to the embodiment;
FIG. 4 is a diagram illustrating an example of a circuit configuration when the image processing system according to the present embodiment is realized by dedicated hardware;
FIG. 5 is a flowchart illustrating an example of a process when the image processing system according to the present embodiment is realized by dedicated hardware;
FIG. 6 is a flowchart illustrating an example of a process when the image processing system according to the present embodiment is realized by dedicated hardware;
FIGS. 7A to 7C are diagrams for explaining an area division pattern of an image; FIGS.
FIGS. 8A and 8B are diagrams for explaining designation of an area to be determined whether or not there is a change; FIG.
FIG. 9 is a functional block diagram of an image processing apparatus 500 configured to use image data of a reference image as first image data.
FIG. 10 illustrates an example of an operation flow of the image processing apparatus in FIG. 9;
FIG. 11 is a functional block diagram of an image processing apparatus having a configuration in which both a first image and a second image are time-series images periodically captured.
FIG. 12 is a diagram illustrating a comparison method when RGB data is used as pixel information.
FIG. 13 is an example of a hardware configuration according to the embodiment;
FIGS. 14A to 14C are diagrams for explaining a division pattern and an area luminance value of an image of a surveillance camera installed at the entrance.
FIGS. 15A and 15B are diagrams for explaining an example of threshold setting of a detection target area.
FIGS. 16A and 16B are diagrams for explaining an example of threshold setting of a detection target area.
FIGS. 17A and 17B are diagrams for explaining an example of change detection; FIG.
FIGS. 18A and 18B are diagrams for explaining an example of change detection.
[Explanation of symbols]
Reference Signs List 10 image processing system, 20 first image data storage unit, 30 second image data storage unit, 40 first image data area luminance (or color) calculation unit, 50 second image data area luminance (or color) Calculation section, 60 image change detection section, 62 change detection signal, 70 division pattern setting section, 80 area threshold information setting section, 300 image processing system, 310 control section, 320 average luminance calculation section, 330 difference detection section, 340 Threshold register, 350 odd-frame area brightness value storage register, 360 even-frame area brightness value storage register, 370 first selector, 380 second selector, 390 third selector,

Claims (17)

画像処理装置であって、
第1の画像データと第2の画像データを同一の分割パターンで複数のエリアに分割し、第1の画像データ及び第2の画像データについて、各エリアに属する画素の色又は輝度に関する画素値を集計してエリア画素値を演算する手段と、
第1の画像データと第2の画像データの対応するエリアのエリア画素値の差分を演算する手段と、
分割パターンによって分割される各エリアに関連づけて各エリアのエリア画素値の差分判定に用いるしきい値を記憶するしきい値記憶手段と、
前記差分と前記エリアに関連づけてしきい値記憶手段に記憶されたしきい値とを比較して、前記差分がしきい値の範囲内に収まっているか否か判断し、収まっていない場合に変化ありと検出する画像変化検出処理を行う手段と、
を含むことを特徴とする画像処理装置。
An image processing device,
The first image data and the second image data are divided into a plurality of areas by the same division pattern, and the pixel values relating to the color or luminance of the pixels belonging to each area are determined for the first image data and the second image data. Means for counting and calculating an area pixel value;
Means for calculating the difference between the area pixel values of the corresponding areas of the first image data and the second image data;
Threshold value storage means for storing a threshold value used for determining a difference between area pixel values of each area in association with each area divided by the division pattern;
The difference is compared with a threshold value stored in a threshold value storage unit in association with the area, and it is determined whether or not the difference is within a threshold value range. Means for performing image change detection processing for detecting presence;
An image processing apparatus comprising:
請求項1において、
前記画像変化検出処理に使用するしきい値の値を変更する手段を含むことを特徴とする画像処理装置。
In claim 1,
An image processing apparatus comprising means for changing a threshold value used in the image change detection processing.
画像処理装置であって、
第1の画像データと第2の画像データを同一の分割パターンで複数のエリアに分割し、第1の画像データ及び第2の画像データについて、各エリアに属する画素の色又は輝度に関する画素値を集計してエリア画素値を演算する手段と、
第1の画像データと第2の画像データの対応するエリアのエリア画素値の差分を演算する手段と、
エリア画素値の差分に基づき画像の変化の有無を判断する画像変化検出処理を行う手段と
を含むことを特徴とする画像処理装置。
An image processing device,
The first image data and the second image data are divided into a plurality of areas by the same division pattern, and the pixel values relating to the color or luminance of the pixels belonging to each area are determined for the first image data and the second image data. Means for counting and calculating an area pixel value;
Means for calculating the difference between the area pixel values of the corresponding areas of the first image data and the second image data;
Means for performing an image change detection process of determining the presence or absence of an image change based on a difference between area pixel values.
請求項1乃至3のいずれかにおいて、
第1の画像データと第2の画像データを複数のエリアに分割するための分割パターンを変更する手段を含むことを特徴とする画像処理装置。
In any one of claims 1 to 3,
An image processing apparatus comprising: means for changing a division pattern for dividing first image data and second image data into a plurality of areas.
請求項1乃至4のいずれかにおいて、
画像変化検出処理において変化の有無を判断する際の判断対象として使用するエリアの指定を行う手段をさらに含み、
指定されたエリアのエリア画素値の差分値に基づき画像の変化の有無を判断することを特徴とする画像処理装置。
In any one of claims 1 to 4,
The image change detection processing further includes means for specifying an area to be used as a determination target when determining the presence or absence of a change,
An image processing apparatus for determining the presence or absence of an image change based on a difference between area pixel values of a designated area.
請求項1乃至5のいずれかにおいて、
各エリアに属する画素の輝度値又は輝度成分を集計してエリア画素値を演算することを特徴とする画像処理装置。
In any one of claims 1 to 5,
An image processing apparatus for calculating an area pixel value by summing luminance values or luminance components of pixels belonging to each area.
請求項1乃至6のいずれかにおいて、
周期的に画像を取り込む画像取込手段をさらに含み、
第1の画像データとして基準画像データを使用し、第2の画像データとして周期的に取り込まれた画像データを使用することを特徴とする画像処理装置。
In any one of claims 1 to 6,
The image processing apparatus further includes image capturing means for periodically capturing an image,
An image processing apparatus, wherein reference image data is used as first image data, and image data periodically taken in is used as second image data.
請求項1乃至6のいずれかにおいて、
周期的に画像を取り込む画像取込手段をさらに含み、
第1の画像データ及び第2の画像データとして周期的に取り込まれた画像データを使用することを特徴とする画像処理装置。
In any one of claims 1 to 6,
The image processing apparatus further includes image capturing means for periodically capturing an image,
An image processing apparatus using image data periodically captured as first image data and second image data.
請求項7乃至8のいずれかにおいて、
周期的に取り込まれた画像に対して、指定された間隔で変化検出の対象となる画像をピックアップする手段をさらに含むことを特徴とする画像処理装置。
In any one of claims 7 and 8,
An image processing apparatus further comprising means for picking up an image to be subjected to change detection at a specified interval from an image captured periodically.
請求項1乃至9のいずれかにおいて、
前記画像変化検出処理により第1の画像と第2の画像を比較して変化ありと判断した場合に時系列に後者の画像を保存用の記憶手段に保存する手段をふくむことを特徴とする画像処理装置。
In any one of claims 1 to 9,
An image storing means for storing the latter image in a storage means in a time series when it is determined that there is a change by comparing the first image and the second image by the image change detection processing; Processing equipment.
請求項1乃至10のいずれかにおいて、
前記画像変化検出処理により第1の画像と第2の画像を比較して変化ありと判断した場合に時系列に後者の画像を印刷手段から印刷出力する手段をふくむことを特徴とする画像処理装置。
In any one of claims 1 to 10,
An image processing apparatus, comprising: means for comparing the first image and the second image by the image change detection processing to print out the latter image from a printing unit in a time series when it is determined that there is a change. .
コンピュータが実行可能なプログラムであって、
第1の画像データと第2の画像データを同一の分割パターンで複数のエリアに分割し、第1の画像データ及び第2の画像データについて、各エリアに属する画素の色又は輝度に関する画素値を集計してエリア画素値を演算する手段と、
第1の画像データと第2の画像データの対応するエリアのエリア画素値の差分を演算する手段と、
分割パターンによって分割される各エリアに関連づけて各エリアのエリア画素値の差分判定に用いるしきい値を記憶するしきい値記憶手段と、
前記差分と前記エリアに関連づけてしきい値記憶手段に記憶されたしきい値とを比較して、前記差分がしきい値の範囲内に収まっているか否か判断し、収まっていない場合に変化ありと検出する画像変化検出処理を行う手段と、
コンピュータに実現させることを特徴とするプログラム。
A computer-executable program,
The first image data and the second image data are divided into a plurality of areas by the same division pattern, and the pixel values relating to the color or luminance of the pixels belonging to each area are determined for the first image data and the second image data. Means for counting and calculating an area pixel value;
Means for calculating the difference between the area pixel values of the corresponding areas of the first image data and the second image data;
Threshold value storage means for storing a threshold value used for determining a difference between area pixel values of each area in association with each area divided by the division pattern;
The difference is compared with a threshold value stored in a threshold value storage unit in association with the area, and it is determined whether or not the difference is within a threshold value range. Means for performing image change detection processing for detecting presence;
A program that is realized by a computer.
請求項12において、
前記画像変化検出処理に使用するしきい値の値を変更する手段を、
コンピュータに実現させることを特徴とするプログラム。
In claim 12,
Means for changing the value of the threshold used for the image change detection process,
A program that is realized by a computer.
コンピュータが実行可能なプログラムであって、
第1の画像データと第2の画像データを同一の分割パターンで複数のエリアに分割し、第1の画像データ及び第2の画像データについて、各エリアに属する画素の色又は輝度に関する画素値を集計してエリア画素値を演算する手段と、
第1の画像データと第2の画像データの対応するエリアのエリア画素値の差分を演算する手段と、
エリア画素値の差分に基づき画像の変化の有無を判断する画像変化検出処理を行う手段と
コンピュータに実現させることを特徴とするプログラム。
A computer-executable program,
The first image data and the second image data are divided into a plurality of areas by the same division pattern, and the pixel values relating to the color or luminance of the pixels belonging to each area are determined for the first image data and the second image data. Means for counting and calculating an area pixel value;
Means for calculating the difference between the area pixel values of the corresponding areas of the first image data and the second image data;
A program for causing a computer to execute image change detection processing for determining whether or not an image has changed based on a difference between area pixel values, and a program to be realized by a computer.
請求項12乃至14のいずれかにおいて、
第1の画像データと第2の画像データを複数のエリアに分割するための分割パターンを変更する手段をコンピュータに実現させることを特徴とするプログラム。
In any one of claims 12 to 14,
A program for causing a computer to implement means for changing a division pattern for dividing first image data and second image data into a plurality of areas.
請求項12乃至15のいずれかにおいて、
画像変化検出処理において変化の有無を判断する際の判断対象として使用するエリアの指定を行う手段をコンピュータに実現させるプログラムをさらに含み、
指定されたエリアのエリア画素値の差分値に基づき画像の変化の有無を判断することを特徴とするプログラム。
In any one of claims 12 to 15,
The image change detection process further includes a program that causes a computer to implement means for designating an area to be used as a determination target when determining whether there is a change,
A program for determining whether an image has changed based on a difference value between area pixel values of a designated area.
請求項12乃至16のいずれかにおいて、
各エリアに属する画素の輝度値又は輝度成分を集計してエリア画素値を演算することを特徴とするプログラム。
In any one of claims 12 to 16,
A program for calculating an area pixel value by summing luminance values or luminance components of pixels belonging to each area.
JP2003074114A 2003-03-18 2003-03-18 Image processor and program Withdrawn JP2004280697A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003074114A JP2004280697A (en) 2003-03-18 2003-03-18 Image processor and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003074114A JP2004280697A (en) 2003-03-18 2003-03-18 Image processor and program

Publications (1)

Publication Number Publication Date
JP2004280697A true JP2004280697A (en) 2004-10-07

Family

ID=33289844

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003074114A Withdrawn JP2004280697A (en) 2003-03-18 2003-03-18 Image processor and program

Country Status (1)

Country Link
JP (1) JP2004280697A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008191793A (en) * 2007-02-01 2008-08-21 Megachips System Solutions Inc Passage monitoring system
JP2009157540A (en) * 2007-12-25 2009-07-16 Fuji Xerox Co Ltd Image recording device, image recording and reproducing device, screen recording and reproducing system, image recording program, and image recording and reproduction program
JP2014167711A (en) * 2013-02-28 2014-09-11 Nippon Telegr & Teleph Corp <Ntt> Screen change detector, and method and program therefor
CN108922114A (en) * 2018-06-22 2018-11-30 张小勇 Security monitor method and system
KR20230011447A (en) * 2015-07-09 2023-01-20 한화테크윈 주식회사 Method and apparatus for detecting event using color temperature

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008191793A (en) * 2007-02-01 2008-08-21 Megachips System Solutions Inc Passage monitoring system
JP2009157540A (en) * 2007-12-25 2009-07-16 Fuji Xerox Co Ltd Image recording device, image recording and reproducing device, screen recording and reproducing system, image recording program, and image recording and reproduction program
JP2014167711A (en) * 2013-02-28 2014-09-11 Nippon Telegr & Teleph Corp <Ntt> Screen change detector, and method and program therefor
KR20230011447A (en) * 2015-07-09 2023-01-20 한화테크윈 주식회사 Method and apparatus for detecting event using color temperature
KR102565419B1 (en) * 2015-07-09 2023-08-09 한화비전 주식회사 Method and apparatus for detecting event using color temperature
CN108922114A (en) * 2018-06-22 2018-11-30 张小勇 Security monitor method and system
CN108922114B (en) * 2018-06-22 2020-11-17 张小勇 Security monitoring method and system

Similar Documents

Publication Publication Date Title
US7283164B2 (en) Method for detecting and correcting defective pixels in a digital image sensor
CN101605209B (en) Image pick up device and image reproduction device
US8233094B2 (en) Methods, systems and apparatuses for motion detection using auto-focus statistics
US7181092B2 (en) Imaging apparatus
JP2004157979A (en) Image motion detection apparatus and computer program
JPH07203303A (en) Method and apparatus for supplying data
US20080075354A1 (en) Removing singlet and couplet defects from images
US20060245652A1 (en) Method for recognizing objects in an image without recording the image in its entirety
JP5395650B2 (en) Subject area extraction device and control method thereof, subject tracking device, and program
JP5575567B2 (en) Imaging signal processing circuit and imaging signal processing method
JP2004280697A (en) Image processor and program
US7502492B2 (en) Integrated circuit device and microcomputer
KR19990070854A (en) Surveillance System and Monitoring Method Using Personal Computer
JP2001189925A (en) Mobile object monitoring system
JP2987353B2 (en) Video surveillance method
JP4461629B2 (en) Digital still camera
NL1013983C2 (en) Device and method for automatically controlling exposure time in a CMOS image sensor.
JP2677224B2 (en) Image capture device
JP4898895B2 (en) Image processing apparatus and congestion detection processing program
JP5629562B2 (en) Image processing apparatus, control method therefor, and program
WO2022168667A1 (en) Image processing device and image processing method
JP2012119993A (en) Image processing system, control method of the same, and program
KR20120045812A (en) Method for detecting flicker using motion compensation and apparatus for performing the same
JP2000013780A (en) Object identifying device
CN113989323A (en) Moving target detection method and device and terminal equipment

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060606