JP3820649B2 - Image processing apparatus and image processing method - Google Patents
Image processing apparatus and image processing method Download PDFInfo
- Publication number
- JP3820649B2 JP3820649B2 JP29957396A JP29957396A JP3820649B2 JP 3820649 B2 JP3820649 B2 JP 3820649B2 JP 29957396 A JP29957396 A JP 29957396A JP 29957396 A JP29957396 A JP 29957396A JP 3820649 B2 JP3820649 B2 JP 3820649B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- case
- block
- images
- cases
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Analysis (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、複数の処理対象、例えばコンパクトディスクを収容した複数のケースを配列した状態で、これらの複数の処理対象の数を正確にカウントするための画像処理装置及び画像処理方法に関するものである。
【0002】
【従来の技術】
画像処理をする処理対象として、例えばコンパクトディスクを収容するケースを取り上げて説明する。コンパクトディスク(以下CDという)を収容する透明のプラスチック製のケースは、そのCDが記録している情報の内容を表示する表示ラベルが収容されている。このラベルは、紙製やその他の材料で作られているが、その印刷色は様々である。製造工場内においては、ある特定の種類のケースが複数集められて一つの箱に箱詰めされる。この箱詰めされた状態でこれらのケースの数量をカウントする必要がある。
【0003】
従来このように箱詰めされたケースの数量のカウントは、作業員が目視で行ったり、あるいは次のような電気的な処理により行っている。つまり、図14で示すように、箱Bの中に収容された製品である複数のケースCがY方向に配列されている。この時に、複数のケースCをカメラで撮像して、その配列されたケースCの輝度を得る。図14(A)は、そのカメラに入力された入力画面を示しており、図14(B)はY方向に関する輝度の振れを示している。輝度はY方向に沿って変化しており、この波形のエッジからケースCの個数を判定している。
【0004】
【発明が解決しようとする課題】
ところが、隣接するケースC,Cの間には、すき間Dが存在している場合がある。しかもケースCに収容されているラベルの色が灰色であったり黒であったりあるいは紺色であったりする場合には、カメラで捕らえた入力画面においては、ケースCの輝度とすき間Dの輝度の差が出にくいので、ケースCのカウント数に誤差が生じてしまうという問題がある。
そこで本発明は上記課題を解消し、複数の処理対象を配列した状態でこれらの処理対象の数を確実にカウントすることができる画像処理装置及び画像処理方法を提供することを目的としている。
【0005】
【課題を解決するための手段】
上記目的は、本発明にあっては、複数のケースを配列した状態で、これらの複数のケースの数をカウントするための画像処理装置であり、複数のケースの画像を得る撮像装置と、撮像装置で得られた複数のケースの画像を、ケースが配列されている第1方向と交差する第2方向に分けて複数のブロック画像毎に所定の1つのケースからマスター画像を作成し、各ブロック画像内における所定のケースから輝度の分散量を比較して分散量に応じて所定のブロック画像を選択し、選択されたブロック画像内における複数のケースの画像とマスター画像とを順次比較してマスター画像とブロック画像内における各ケースの画像との相関量を求め、得られた相関量に基づいて、複数のケースの数をカウントするカウント手段と、を備える画像処理装置により、達成される。
【0006】
本発明では、撮像装置は複数のケースの画像を得る。カウント手段は、撮像装置で得られた複数のケースの画像を、ケースが配列されている第1方向と交差する第2方向に分けて複数のブロック画像毎に所定の1つのケースからマスター画像を作成する。そしてカウント手段は各ブロック画像内における所定のケースから輝度の分散量を比較して分散量に応じて所定のブロック画像を選択し、選択されたブロック画像内における複数のケースの画像とマスター画像とを順次比較する。
これにより、カウント手段は、マスター画像とブロック画像内における各ケースの画像との相関量を求めて、得られた相関量に基づいて複数のケースの数を確実にカウントしていく。
この場合に、ケースの間にすき間がある場合や、ケースとそのすき間の区別が付きにくい場合であっても、確実にケースの数をカウントしていくことができる。
【0007】
【発明の実施の形態】
以下、本発明の好適な実施の形態を添付図面に基づいて詳細に説明する。
なお、以下に述べる実施の形態は、本発明の好適な具体例であるから、技術的に好ましい種々の限定が付されているが、本発明の範囲は、以下の説明において特に本発明を限定する旨の記載がない限り、これらの形態に限られるものではない。
【0008】
図1は、本発明の画像処理装置10と処理対象であるケースの一例を示している。この画像処理装置10は、撮像装置としてのカメラ12とカウント手段14を備えている。
カメラ12は、例えばCCD(電荷結合素子カメラ、固体撮像素子カメラ)を採用することができる。
ケースCは、Y方向に配列されており、複数のケースCはケース群CGを構成している。このケース群CGは、収容するための箱Bの中に収容されている。この箱Bは、CDを製造してケースCに収める製造工場で用いられるものである。
カメラ12は、このケース群CGと箱Bを撮像して、画像信号GSをカウント手段14に送るようになっている。
この画像処理装置10では、カメラ12で得られた画像信号GSに基づいて、カウント手段14が、ケース群CGを構成しているケースCの数量を正確にカウントするようになっている。
【0009】
図2(A)は、カメラ12が箱B内のケースCのケース群CGを撮像した時の、Y方向における輝度の分布例を示している。この場合に、各ケースCに対応して輝度の凸部16が形成されている。しかし単純にこの様な輝度の分布を取っただけでは、ケースCの輝度とケースCとケースCの間に形成されているすき間Dの輝度がほぼ同じである場合には、すき間Dも1つのケースCとカウントしてしまいケースCのカウント数に誤差が生じてしまう恐れがある。
本発明の実施の形態は、ケースC内のこの様なケースCの数量のカウントの誤差を防ぐものである。
【0010】
図3は図1で示した画像処理装置10の詳しい構成を示している。
すでに述べたように画像処理装置10は、概略カメラ12とカウント手段14等を有しており、更にそれ以外の要素も有している。
カウント手段14は、画像処理ボード22内に配置されており、画像処理ボード22は、カウント手段14とD/A変換器(デジタル/アナログ変換器)27を有している。画像処理ボード22は、画像処理装置10の本体30に属しており、本体30は、画像処理ボード22と、ホストCPU(中央演算処理装置)31、プログラムメモリ40を有している。
【0011】
カメラ12の画像信号GS(アナログ信号)は、画像処理ボード22内のカウント手段14のA/D変換器(アナログ/デジタル変換器)24に入力される。カウント手段14は、変換器24、画像メモリ15A、画像メモリ15B、画像プロセッサ16、画像CPU(中央演算処理装置)18を備えている。
A/D変換器24でアナログ信号からデジタル信号に変換された画像信号GSDは、画像メモリ15Aに送られる。この画像信号GSDは、図1のケース群CGと箱Bを撮像したビデオ信号であり、画像メモリ15Aはこの画像信号GSDを記憶する。
【0012】
画像メモリ15Aは、D/A変換器27と画像プロセッサ16に接続されている。従って画像メモリ15Aに記録された画像信号GSDは、D/A変換器27でデジタル/アナログ変換されて、画像処理モニタ9に表示することができる。つまり、画像処理モニタ9はケース群CGと箱Bの上からみた画像(図2参照)を表示する。
また画像メモリ15Aに記憶された画像信号GSDは、画像プロセッサ16に送ることができる。
画像プロセッサ16は、たとえば図11に例示するように画像メモリ15Aに記憶されている画像信号GSDにおけるケースC(処理対象)が配列されている第1方向(Y方向)と交差する第2方向(X方向)によって複数のブロック画像(L1〜L6)を作成し、各ブロック画像内における所定の処理対象からマスター画像(MR1〜MR6)を得る。画像メモリ15Bは、各ブロック画像(L1〜L6)におけるマスター画像(MR1〜MR6)を記憶しておく。
これにより画像プロセッサ16は、画像メモリ15Aに記憶されている各ブロック画像(L1〜L6)におけるケース群CGの各ケースCの画像とマスター画像(MR1〜MR6)と順次比較して行く。
【0013】
画像CPU18は、マスター画像(MR1〜MR6)とブロック画像(L1〜L6)内における各ケースCの画像との相関量を求めて、得られた相関量に基づいて、複数の処理対象の数をカウントする。
また画像CPU18は、画像プロセッサ16が行っている動作を、D/A変換器27を通して画像処理モニタ9に表示する機能を有しており、画像処理モニタ9は例えば図12のような相関値のグラフを表示する。
【0014】
ホストCPU31は、プログラムメモリ40、プログラムモニタ42、ポインティングデバイスであるマウス43及びキーボード44に接続されている。ホストCPU31は、プログラムメモリ40内のプログラムを、画像CPU18に伝えて、ユーザの命令を伝える。このユーザの命令とは、上記プログラムの他に、規格値、検査領域等のデータやプログラムの一時停止命令のようなものである。またホストCPU31は、画像CPUから上述したようなケースCの数をカウントした結果等の処理データを受け取り、プリンタ31aでプリントアウトできる。
プログラムモニタ42は、規格値設定や検査領域設定のための表示、また、ブロックごと、ポイントごとの詳細データ(分散値、相関値)の表示を行うためのものである。
【0015】
キーボード44は、ユーザが規格値設定を行うものである。またマウス43は、検査領域設定するため、具体的には、検査領域の始点(左上の点)をクリックし、その後、終点(右下の点)クリックを行うものである。
【0016】
次に、一例として図10を参照して、図1のカメラ12がケース群CGの画像を取り込む取り込み方式について説明する。
図10において箱Bの中には、合計9個のケースCと別の1個のケースCがY方向に配列されている。つまりケースCの長方形状の部分は、CDを収容する図1に示すようなケースCの背C1の部分に相当している。カセットCの蓋C2が矢印方向に開くと、ラベルRを収容することができる。このケースCは透明のプラスチックで作られており、ラベルRが収容され、かつCDを収容できる。ラベルRは表示部PR1をケースCの背C1の内部に位置させることで、内部のCDに記録されている情報の内容(タイトルなど)を文字や色等の任意の表現方法で表示できる。
【0017】
図10に戻って、配列されたケースCの内の9本のケースCにはラベルR1が収められているが、別の1本のケースC(ほぼ中央部に位置している)の内部にはラベルR2が収容されている。このラベルR2とラベルR1は異なる表示内容を示している。しかも箱BとケースCの間にはすき間B1,B2,B3が存在している。
【0018】
このような箱Bとそれに収容された複数の処理対象であるケースCの状態において、図1のカメラ12が撮像するケース群CGの画像信号GSは、図3の画像メモリ15Aに記憶された後に、画像プロセッサ16に取り込まれる。
画像プロセッサ16は、図11に例示するようにブロック画像L1〜L6に分割する。しかも、画像プロセッサ16は各ブロック画像L1〜L6において、マスター画像MR1,MR2,MR3,MR4,MR5,MR6を任意に設定する。このようにマスター画像MR1〜MR6は、画像メモリ15Bに記憶しておく。
画像プロセッサ16は、例えばブロック画像L1において、マスター画像MR1と、各ケースCの画像を順次比較していって、マスター画像MR1と、ブロック画像L1内の各ケースCの画像との相関量をY方向に沿って順次求めていき、得られた相関量に基づいてブロック画像L1内における複数のケースCの数をカウントするようになっている。
【0019】
ここで、図4〜図6を参照して、マスター画像とブロック画像内におけるケースの画像との相関量について説明する。
図4においてマスター画像が左側のケースCから右側のケースCへ移っていく場合に輝度の相関を取っている例を示す。右側のケースCと左側のケースCには黒丸のマーカCMが形成されている。このマーカCMは図1のラベルRの表示部R1に形成されているものである。
【0020】
図4の左側のケースCにおいてマスター画像の領域を順次Y方向に移動していくと、図5(A)〜図5(K)のように移動していく。このようにすることで、図5(A)では左側のケースCにおけるマーカCMに関する相関量は最大となり、順次領域を1単位ずつずらしていくことにより図5(B)〜(J)のように相関量が変化していく。そして図5(K)のように右側のケースのマークCMに関して相関量が再び最大となる。
相関量(係数)の式は、図6に示している。基準となるケースCを参照領域とし、対象とするケースCを部分領域とすれば、(X1,Y1)を起点とする参照領域のN個のデータMiと、(U,V)を起点とするN個のデータからなる部分領域Iiとを比較する場合に、その相関量(相関係数)R(U,V)は、図6のように表わすことができる。
【0021】
次に、図7,図8及び図9〜図12を参照して、画像処理方法について説明する。
図7は、図10のようなケース群CGのケースCに全体としての特徴があるかどうかによって、後で行う処理方法が異なっていることを示している。
図8は、図7における通常処理SSの内容を示している。
図9は、製品(ケースC)全体として特徴がでる場合の製品例と、製品全体として特徴が出ない場合の製品例を示している。
図9(A)において、製品全体として特徴が出る場合の製品例としては、ケースCのラベルR1が、タイトル名TRと、すでに述べた黒丸のマークCMを備えている。
【0022】
これに対して図9(B−1)〜(B−3)において、製品全体として特徴が出ない場合の製品例としては、図9(B−1)のように1つのマークCMがケースC(ラベルR1)の全体に渡って形成されている場合や図9(B−2)のようにマークCMがケースC(ラベルR1)の全体に渡って複数個形成されている場合である。また別の例としては図9(B−2)のようにケースC(ラベルR1)の全体に渡って図12に示すようなすき間B1〜B3と同様の輝度程度を有している色が塗られた部分TSや極小さなタイトル名TR1を有している例等がある。
【0023】
図10は、図9の(A)のケースC(ラベルR1)が、箱Bに配列されている例を示している。
図11は、図9(B−1)のケースC(ラベルR1)が箱B内に配列されている例を示している。
図12は、図9(B)の黒丸のマークCMが複数個形成されているケースC(ラベルR1)が箱B内に配列されている例を示している。
図13は、図9(B−3)の部分TS及びタイトル名TR1を有しているケースC(ラベルR1)が箱Bに配列されている例を示している。
【0024】
図7おいて、ステップST1では、製品全体(ケースC)として特徴が出るか出ないかを判断する。この判断は作業者が行う。これにより、製品全体として特徴が出る場合にはステップST2に移り、図10に例示するような製品(ケースC)全体のマスター画像MR1(マスター波形)を取る。この上述した製品全体のマスター画像MR1とは、例えば一番端にあるケースCの全体の画像のことである。このマスター画像MR1は図3の画像メモリ15Bにメモリされる。そして通常処理SSに移る。
図10のケースCのラベルR1は、マークCMとタイトル名TRを有しているので、ラベルR1の全体の輝度は、すき間B1,B2,B3の輝度と大きく差が出る例である。
通常処理SSは図8に示しており、まず図1のカメラ12がケース群CGの画像を取り込む(ステップSS1)。そしてたとえば1番端にあるケースCのスタートエッジSE1を図3の画像プロセッサ16が抽出する(ステップSS2)。
【0025】
次に、一番端にあるスタートのケースCの相関を取る(ステップSS3)。画像プロセッサ16は、マスター画像MR1をY方向にずらしていくことによりマスター画像MR1と画像メモリ15Aにおける各ケースCの全体画像を比較して、画像CPU18が、スタートのケースCと、Y方向に沿って配列された複数のケースCの画像の相関を計算する(ステップSS4,SS5)。
【0026】
そして画像の比較がスタートのケースCから最後のケースCまで行なわれると(ステップSS6)、図3の画像CPU18は、ステップSS7に示すようにY方向の位置に対する相関値の変化を検出する。
この相関値の変化がある場合には、画像CPU18がステップSS8,SS9に示すように図10において所定のしきい値をこえた相関値の出現CC1〜CC9をカウントしていきそのカウント作業を終了する。そうでなく、ステップSS8において変化がない場合には、ステップSS10のようにカウントせずに終了する。
このようにすることで、図7のステップST2と図8の通常処理SSにより、ケースC全体のマスター画像と各ケースCの画像とを画像プロセッサ16が比較し、そして画像CPU18がこれらの相関を取ってカウントしていくことにより、確実にケースCの数量をカウントすることができる。
【0027】
次に、図7のステップST1において、ケースCの全体として特徴が出ない場合、すなわち図9(B−1),(B−2),(B−3)のような例の場合には、図7のステップST3以降の処理を行う。
尚図9(B−1),(B−2),(B−3)のような特徴の出ない場合とは、各々のケースCの全体の輝度とすき間B1,B2,B3の輝度に差がほとんど生じない場合である。
【0028】
すなわち、図11〜図13に示すように、図3の画像プロセッサ16がケース群CGを、例えばブロック画像L1〜L6に分ける(ステップST3)。そしてブロック画像(L1〜L6)毎にマスター画像(MR1〜MR6)を取る(ステップST4)。図11の例では、マスター画像MR1がブロック画像L1の1つのケースCから得て、またマスター画像MR2は次のブロック画像L2から得て、更にマスター画像MR3はブロック画像L3から得て、というようにして各ブロック画像L1〜L6からそれぞれマスター画像MR1〜MR6を得ることができる。これらのマスター画像MR1は、画像プロセッサ16が画像メモリ15Bに記憶させる。
【0029】
そして図3の画像プロセッサ16が、図11〜図13に示すようなブロック画像L1〜L6における輝度の分散量の比較を行って、分散量が極端に低いブロック画像がある場合かどうかを判断する(ステップST5)。
この輝度の分散量とは、図6に示すような式で表わされる量で、領域内データのバラツキの度合いを表わす量のことをいう。
例えば図11の場合にはブロック画像L1〜L6間における分散量の比較をすると分散量が極端に低いブロック画像があるのでステップST5,ステップST8に移る。つまり、図11の場合には図11(B)(C)のようにブロック画像L2〜L6はブロック画像L1に比べて輝度の分散量が極端に小さい。これに対して図12,図13の例では、ブロック画像L1〜L6間における分散量に関して極端に低いブロック画像がないと考えられるので、ステップST5からST6に移る。
【0030】
まず図11の例では、ステップST5からST8に移り、ブロック画像間での分散量に差があるかどうかを画像CPU18が判断する。図11の例では、ブロック画像間での輝度の分散量に差があるので、すなわちブロック画像L1では、黒丸のマークCMを有しているので、他のブロック画像L2〜L6とは異なり、ブロック画像L1は輝度の分散量が高いブロック画像である。従って、このステップST10において、分散量の高いブロック画像L1を1つ選択して、図8の通常処理SSに移る。
【0031】
すなわち、図8のステップSS1において画像を取り込むことにより、画像メモリ15Aにはブロック画像L1〜L6が記憶され、画像プロセッサ16は画像メモリ15Bに対してブロック画像L1のマスター画像MR1等を記憶する。そして画像プロセッサ16は、図8のステップSS2において、図11のスタートエッジSEを抽出し、ステップSS3においてスタートのケースCとマスター画像MR1の画像の相関を取る。そして画像プロセッサ16は、順次ブロック画像L1の各ケースCに対応する画像とマスター画像MR1を比較して、すなわちY方向にマスター画像MR1を順次ずらしていくことにより、対応するケースCの画像とマスター画像MR1の相関を計算する(ステップSS4,SS5)。
【0032】
そしてY方向への画像の比較が終了したら(ステップSS6)、図11に示すようなY方向に関する相関値の変化を画像CPU18が検出する。そして図11(B)に示すように相関値に変化がある場合には、画像CPU18は、カウントする(ステップSS8,SS9)。このカウント例としては、図11(B)に示すようにカウント値CC1,CC2,CC3,・・・CC8という様にカウントする。
【0033】
もしも図12の例でステップSS10において、画像CPU18が相関値の変化を検出しない場合、図11においては上述したようにすき間B1,B2,B3及び異なる種類のケースC(ラベルR2)の位置P1,P2,P3,P4ではカウントしない(ステップSS10)。
図11の例においては、右から6つ目のケースCのラベルR2が他のケースCのラベルR1とは異なりマークCM1があることから、相関値はある閾値に達せずに、カウントされない。またすき間B1,B2,B3も相関値が閾値まで達しないのでカウントされない。
従って、異なる種類のケースC(ラベルR2)を除いて、合計9つのケースC(ラベルR1)の個数を正しくカウントすることができる。
【0034】
次に、図7のステップST8に戻り、図12や図13に示すようにブロック画像L1〜L6間での輝度分散量に差がない場合について考える。
この場合にはステップST9及び通常処理SS及びステップST7に移ることになる。この例としては、図12のような例が考えられる。この場合には、ブロック画像L1〜L6の例えば全てについてカウントすることになる。その後通常処理SSを上述のような要領で行い、ブロック画像L1〜L6において一番多く出たカウント数を、ケース群CGのケースCのカウント値として採用する。
【0035】
次に、図7ステップST5において、分散量の極端に低いブロック画像がある場合には、ステップST6,ステップST7を行う。この例としては図13の例が考えられる。この例においては、輝度の分散量の極端に低いのはブロック画像L1,L2,L5,L6であり分散量の比較的高いブロック画像を数個選択する。例えば図13ではブロック画像L3,L4を選択して、図8の通常処理SSを行い、一番多く出たカウント数を、ケース群CGのケースCのカウント値として採用することになる。
以上のようにして、ケースCのラベルR1やR2のようにケース間にすき間があったとしても、ケースの数を確実にカウントしていくことができる。
【0036】
このように相関量を採用してケースCの数量をカウントする方式は、人間がケースCの背(背面)のデザインを頼りにカウントする要領に似ている。その相関量の変化を見ることで、人間と同様な方式で確実にケースの数量をカウントしていくことができる。つまり指定された領域のマスター画像(マスター領域波形ともいう)と、予め取ってあるブロック画像(ブロック領域波形ともいう)から相互の相関量を求めて、その作業をY方向に沿って行うことで、相関値の変化を図10〜図13のようにしてグラフ化(図式化)する。
【0037】
そしてケースCのY方向の幅を考慮しながら、相関値のピーク位置(例えば図11ではカウント位置CC1,CC2・・・)を求めて図3の画像CPU18がケースCの数量をカウントしていく。またはその波形の周期性を利用してカウントしていく。
そしてケースC間のすき間が一様でなく、製品のロッドですき間の大きさが異なる場合であっても、すき間の部分は例えば図10に示すようにカウントすることがないので、ケースCの数量を確実にカウントすることができる。
【0038】
ところで本発明は上記実施の形態に限定されない。
上述した実施の形態では、コンパクトディスク(CD)とその内容を表示するためのラベルを収容するケースCを用いて説明しているが、これに限らず他の種類のケース、例えば直径が8cmのCD、ミニディスク(MD)、その他の光磁気ディスク、フロッピーディスク、その他ディスク状の高密度記録媒体、等に用いるケースをカウントする場合にも用いることができる。
またこのような分野以外に、他の分野におけるケース、例えばカセットテープのケース、あるいは更に別の分野におけるケースに限らず他の種類の製品を配列した状態においても、その製品のカウントを行うのに適用することが考えられる。
【0039】
【発明の効果】
以上説明したように、本発明によれば、マスター画像とブロック画像内における各ケースの画像との相関量を求め、得られた相関量に基づき、複数のケースを配列した状態でこれらのケースの数を確実にカウントすることができる。
【図面の簡単な説明】
【図1】本発明の画像処理装置の好ましい実施の形態及び処理対象を示す図。
【図2】図1の画像処理装置で得られる画像及びその輝度との一例を示す図。
【図3】図1の画像処理装置の詳しい構成を示す図。
【図4】マスター画像と対象となる画像との輝度の相関を取るための領域の移動を説明する図。
【図5】図4における領域を移動した時の相関量の変化を示す図。
【図6】相関量(相関係数)の式の一例を示す図。
【図7】本発明における画像処理方法の好ましい実施の形態を示すフロー図。
【図8】図7における通常処理の一例を示すフロー図。
【図9】製品例を示す図。
【図10】製品例が配列された状態を示すとともに、その製品例の配列における相関値の出力例を示す図。
【図11】製品例が配列された状態を示すとともに、その製品例の配列における相関値の出力例を示す図。
【図12】製品例が配列された状態を示すとともに、その製品例の配列における相関値の出力例を示す図。
【図13】製品例が配列された状態を示すとともに、その製品例の配列における相関値の出力例を示す図。
【図14】従来の画像処理例を示す図。
【符号の説明】
10・・・画像処理装置、12・・・カメラ(撮像装置)、14・・・カウント手段、L1〜L6・・・ブロック画像、MR・・・マスター画像、C・・・ケース(製品処理対象)、R1,R2・・・ラベル、CG・・・ケース群(処理対象)、B・・・箱[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus and an image processing method for accurately counting the number of processing objects in a state where a plurality of processing objects, for example, a plurality of cases containing compact discs are arranged. .
[0002]
[Prior art]
As a processing target for image processing, for example, a case for accommodating a compact disc will be described. A transparent plastic case that accommodates a compact disc (hereinafter referred to as a CD) contains a display label that displays the contents of information recorded on the CD. This label is made of paper or other materials, but the printing colors vary. In a manufacturing factory, a plurality of cases of a specific type are collected and packed in one box. It is necessary to count the quantity of these cases in this boxed state.
[0003]
Conventionally, the number of cases packaged in this way is counted visually by an operator or by the following electrical process. That is, as shown in FIG. 14, a plurality of cases C that are products housed in the box B are arranged in the Y direction. At this time, a plurality of cases C are imaged by the camera, and the brightness of the arranged cases C is obtained. FIG. 14A shows an input screen input to the camera, and FIG. 14B shows luminance fluctuation in the Y direction. The luminance changes along the Y direction, and the number of cases C is determined from the edge of this waveform.
[0004]
[Problems to be solved by the invention]
However, there may be a gap D between adjacent cases C and C. In addition, when the color of the label accommodated in the case C is gray, black, or amber, the difference between the luminance of the case C and the luminance of the gap D on the input screen captured by the camera. Has a problem that an error occurs in the count number of case C.
Accordingly, an object of the present invention is to provide an image processing apparatus and an image processing method capable of solving the above-described problems and reliably counting the number of processing objects in a state where a plurality of processing objects are arranged.
[0005]
[Means for Solving the Problems]
In the present invention, the above object is a plurality of Case In an array of these multiple Case Is an image processing device for counting the number of Case An imaging device that obtains a plurality of images, and a plurality of images obtained by the imaging device Case Images of Case For each of a plurality of block images divided in a second direction intersecting the first direction From one given case Create a master image and create a predetermined image within each block image. Case Compare the amount of luminance dispersion from the predetermined amount according to the amount of dispersion block Select an image and select multiple images within the selected block image. Case Each image in the master image and block image Case The amount of correlation with the image is calculated, and based on the obtained amount of correlation, a plurality of Case This is achieved by an image processing device comprising a counting means for counting the number of
[0006]
In the present invention, the imaging device includes a plurality of Case Get the image. The counting means includes a plurality of counts obtained by the imaging device. Case Images of Case For each of a plurality of block images divided in a second direction intersecting the first direction From one given case Create a master image. The counting means is a predetermined unit in each block image. Case The luminance dispersion amount is compared, a predetermined block image is selected according to the dispersion amount, and a plurality of blocks in the selected block image are selected. Case Are sequentially compared with the master image.
As a result, the counting means is configured so that each of the master image and the block image Case The amount of correlation with the image of Case We will count the number of
In this case, Case If there is a gap between Case Even if it is difficult to distinguish between Case The number of can be counted.
[0007]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described in detail with reference to the accompanying drawings.
The embodiment described below is a preferred specific example of the present invention, and thus various technically preferable limitations are given. However, the scope of the present invention is particularly limited in the following description. Unless otherwise stated, the present invention is not limited to these forms.
[0008]
FIG. 1 shows an example of an image processing apparatus 10 according to the present invention and a case to be processed. The image processing apparatus 10 includes a
As the
Cases C are arranged in the Y direction, and the plurality of cases C constitute a case group CG. The case group CG is accommodated in a box B for accommodating. This box B is used in a manufacturing factory for manufacturing a CD and storing it in a case C.
The
In the image processing apparatus 10, the counting means 14 accurately counts the number of cases C constituting the case group CG based on the image signal GS obtained by the
[0009]
FIG. 2A illustrates an example of luminance distribution in the Y direction when the
The embodiment of the present invention prevents such an error in counting the quantity of the case C in the case C.
[0010]
FIG. 3 shows a detailed configuration of the image processing apparatus 10 shown in FIG.
As described above, the image processing apparatus 10 includes the
The
[0011]
An image signal GS (analog signal) of the
The image signal GSD converted from an analog signal to a digital signal by the A /
[0012]
The image memory 15 </ b> A is connected to the D /
The image signal GSD stored in the
For example, as illustrated in FIG. 11, the
As a result, the
[0013]
The
The
[0014]
The
The program monitor 42 is used for display for setting standard values and inspection areas, and for displaying detailed data (dispersion values, correlation values) for each block and each point.
[0015]
The
[0016]
Next, referring to FIG. 10 as an example, a capturing method in which the
In FIG. 10, in the box B, a total of nine cases C and one other case C are arranged in the Y direction. That is, the rectangular portion of the case C corresponds to the back C1 portion of the case C as shown in FIG. When the lid C2 of the cassette C is opened in the direction of the arrow, the label R can be accommodated. The case C is made of a transparent plastic, accommodates a label R, and can accommodate a CD. The label R has the display part PR1 positioned inside the back C1 of the case C, so that the contents of information (title and the like) recorded on the internal CD can be displayed by any expression method such as characters and colors.
[0017]
Returning to FIG. 10, the label R1 is stored in the nine cases C of the arranged cases C, but inside the other case C (which is substantially located at the center). Contains a label R2. The label R2 and the label R1 indicate different display contents. In addition, gaps B1, B2, and B3 exist between the box B and the case C.
[0018]
The image signal GS of the case group CG captured by the
The
For example, in the block image L1, the
[0019]
Here, the correlation amount between the master image and the case image in the block image will be described with reference to FIGS.
FIG. 4 shows an example in which the luminance correlation is taken when the master image moves from the left case C to the right case C. A black circle marker CM is formed on the right case C and the left case C. This marker CM is formed on the display portion R1 of the label R in FIG.
[0020]
In the case C on the left side of FIG. 4, when the area of the master image is sequentially moved in the Y direction, it moves as shown in FIGS. 5 (A) to 5 (K). In this way, in FIG. 5A, the correlation amount regarding the marker CM in the case C on the left side is maximized, and the regions are sequentially shifted by one unit as shown in FIGS. 5B to 5J. The amount of correlation changes. As shown in FIG. 5K, the correlation amount is maximized again for the mark CM in the right case.
The expression of the correlation amount (coefficient) is shown in FIG. If the reference case C is a reference region and the target case C is a partial region, N data Mi of the reference region starting from (X1, Y1) and (U, V) are the starting points. When comparing a partial area Ii composed of N pieces of data, the correlation amount (correlation coefficient) R (U, V) can be expressed as shown in FIG.
[0021]
Next, the image processing method will be described with reference to FIGS. 7, 8 and 9 to 12.
FIG. 7 shows that the processing method to be performed later differs depending on whether or not the case C of the case group CG as shown in FIG.
FIG. 8 shows the contents of the normal process SS in FIG.
FIG. 9 shows an example of a product in the case where the feature appears as a whole product (case C) and an example of a product in which no feature appears as the whole product.
In FIG. 9A, as an example of a product in which features as a whole product appear, the label R1 of the case C includes the title name TR and the already described black circle mark CM.
[0022]
On the other hand, in FIGS. 9 (B-1) to (B-3), as an example of a product in which no feature appears as a whole product, one mark CM is a case C as shown in FIG. 9 (B-1). This is the case where it is formed over the entire (label R1) or the case where a plurality of marks CM are formed over the entire case C (label R1) as shown in FIG. 9B-2. As another example, as shown in FIG. 9B-2, a color having the same brightness level as the gaps B1 to B3 as shown in FIG. 12 is applied over the entire case C (label R1). There is an example in which the portion TS and the extremely small title name TR1 are included.
[0023]
FIG. 10 shows an example in which the case C (label R1) of FIG.
FIG. 11 shows an example in which the case C (label R1) of FIG.
FIG. 12 shows an example in which a case C (label R1) in which a plurality of black circle marks CM of FIG.
FIG. 13 shows an example in which the case C (label R1) having the part TS and the title name TR1 in FIG.
[0024]
In FIG. 7, in step ST <b> 1, it is determined whether or not a feature appears as the entire product (case C). This determination is made by the operator. As a result, when the characteristics of the entire product appear, the process proceeds to step ST2, and a master image MR1 (master waveform) of the entire product (case C) illustrated in FIG. 10 is taken. The above-mentioned master image MR1 of the entire product is, for example, the entire image of the case C at the extreme end. This master image MR1 is stored in the image memory 15B of FIG. Then, the process proceeds to the normal process SS.
Since the label R1 of the case C in FIG. 10 has the mark CM and the title name TR, the overall luminance of the label R1 is an example in which there is a large difference from the luminance of the gaps B1, B2, and B3.
The normal process SS is shown in FIG. 8, and first, the
[0025]
Next, the start case C at the end is correlated (step SS3). The
[0026]
When image comparison is performed from the start case C to the last case C (step SS6), the
If there is a change in the correlation value, the
In this way, the
[0027]
Next, in step ST1 of FIG. 7, in the case where no feature appears as a whole of case C, that is, in the case of the example as shown in FIGS. 9B-1, B-2, and B-3, The process after step ST3 of FIG. 7 is performed.
9B-1), B-2, and B-3 are different from the case where the entire luminance of each case C and the luminance of the gaps B1, B2, and B3 are different. This is a case where almost no occurs.
[0028]
That is, as shown in FIGS. 11 to 13, the
[0029]
The
The luminance dispersion amount is an amount represented by an expression as shown in FIG. 6 and is an amount representing the degree of variation in the data in the region.
For example, in the case of FIG. 11, when the amount of dispersion between the block images L1 to L6 is compared, there is a block image with an extremely low amount of dispersion, so the process proceeds to steps ST5 and ST8. That is, in the case of FIG. 11, as shown in FIGS. 11B and 11C, the block images L <b> 2 to L <b> 6 have extremely small luminance dispersion amounts compared to the block image L <b> 1. On the other hand, in the examples of FIGS. 12 and 13, since it is considered that there is no extremely low block image with respect to the amount of dispersion between the block images L1 to L6, the process proceeds from step ST5 to ST6.
[0030]
First, in the example of FIG. 11, the process proceeds from step ST5 to ST8, and the
[0031]
That is, by capturing an image in step SS1 of FIG. 8, block images L1 to L6 are stored in the
[0032]
When the comparison of the images in the Y direction is completed (step SS6), the
[0033]
If the
In the example of FIG. 11, since the label R2 of the sixth case C from the right is different from the label R1 of the other case C and has the mark CM1, the correlation value does not reach a certain threshold and is not counted. Also, the gaps B1, B2, and B3 are not counted because the correlation value does not reach the threshold value.
Therefore, the number of a total of nine cases C (label R1) can be correctly counted except for different types of cases C (label R2).
[0034]
Next, returning to step ST8 in FIG. 7, a case is considered in which there is no difference in the luminance dispersion amount between the block images L1 to L6 as shown in FIG. 12 and FIG.
In this case, the process proceeds to step ST9, normal process SS, and step ST7. As this example, an example as shown in FIG. 12 can be considered. In this case, for example, all the block images L1 to L6 are counted. Thereafter, the normal process SS is performed in the manner as described above, and the most frequently counted number in the block images L1 to L6 is adopted as the count value of case C of the case group CG.
[0035]
Next, in step ST5 of FIG. 7, if there is a block image with an extremely low dispersion amount, steps ST6 and ST7 are performed. As an example of this, the example of FIG. 13 can be considered. In this example, the block images L1, L2, L5, and L6 have extremely low luminance dispersion amounts, and several block images with relatively high dispersion amounts are selected. For example, in FIG. 13, the block images L3 and L4 are selected, the normal process SS of FIG. 8 is performed, and the most frequently counted number is adopted as the count value of case C of the case group CG.
As described above, even if there is a gap between the cases as in the labels R1 and R2 of the case C, the number of cases can be reliably counted.
[0036]
The method of counting the number of cases C using the correlation amount in this way is similar to the way that a person counts by relying on the design of the back (back) of the case C. By observing the change in the correlation amount, the number of cases can be counted reliably in the same manner as a human being. In other words, by calculating the amount of correlation between the master image of the specified area (also referred to as the master area waveform) and the block image (also referred to as the block area waveform) taken in advance, the work is performed along the Y direction. The change of the correlation value is graphed (schematically) as shown in FIGS.
[0037]
Then, the peak position of the correlation value (for example, the count positions CC1, CC2,... In FIG. 11) is obtained while considering the width of the case C in the Y direction, and the
Even if the gaps between the cases C are not uniform and the sizes of the gaps of the product rods are different, the gaps are not counted, for example, as shown in FIG. Can be counted reliably.
[0038]
By the way, the present invention is not limited to the above embodiment.
In the above-described embodiment, the description has been given using the case C that accommodates a compact disc (CD) and a label for displaying the contents. However, the present invention is not limited to this, and other types of cases such as a diameter of 8 cm are used. It can also be used for counting cases used for CDs, mini-discs (MD), other magneto-optical discs, floppy discs, and other disc-shaped high-density recording media.
In addition to such fields, cases in other fields, such as cassette tape cases, or cases in other fields, are also used to count products of other types. It is possible to apply.
[0039]
【The invention's effect】
As described above, according to the present invention, each of the master image and the block image Case The amount of correlation with the image of Case With these arranged Case Can be counted reliably.
[Brief description of the drawings]
FIG. 1 is a diagram showing a preferred embodiment and an object to be processed of an image processing apparatus according to the present invention.
2 is a diagram illustrating an example of an image obtained by the image processing apparatus of FIG. 1 and its luminance.
FIG. 3 is a diagram showing a detailed configuration of the image processing apparatus in FIG. 1;
FIG. 4 is a diagram for explaining movement of a region for obtaining a correlation between luminances of a master image and a target image.
FIG. 5 is a diagram showing a change in correlation amount when the region in FIG. 4 is moved.
FIG. 6 is a diagram illustrating an example of an expression of a correlation amount (correlation coefficient).
FIG. 7 is a flowchart showing a preferred embodiment of an image processing method according to the present invention.
FIG. 8 is a flowchart showing an example of normal processing in FIG.
FIG. 9 is a diagram showing an example of a product.
FIG. 10 is a diagram illustrating a state in which product examples are arranged, and an example of output of correlation values in the arrangement of the product examples.
FIG. 11 is a diagram illustrating a state in which product examples are arranged, and an example of outputting correlation values in the arrangement of the product examples.
FIG. 12 is a diagram illustrating a state in which product examples are arranged and an example of output of correlation values in the arrangement of the product examples.
FIG. 13 is a diagram illustrating a state in which product examples are arranged, and an example of output of correlation values in the arrangement of the product examples.
FIG. 14 is a diagram illustrating an example of conventional image processing.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 ... Image processing apparatus, 12 ... Camera (imaging apparatus), 14 ... Count means, L1-L6 ... Block image, MR ... Master image, C ... Case (product processing object) ), R1, R2 ... label, CG ... case group (processing object), B ... box
Claims (4)
複数のケースの画像を得る撮像装置と、
撮像装置で得られた複数のケースの画像を、ケースが配列されている第1方向と交差する第2方向に分けて複数のブロック画像毎に所定の1つのケースからマスター画像を作成し、各ブロック画像内における所定のケースから輝度の分散量を比較して分散量に応じて所定のブロック画像を選択し、選択されたブロック画像内における複数のケースの画像とマスター画像とを順次比較してマスター画像とブロック画像内における各ケースの画像との相関量を求め、得られた相関量に基づいて、複数のケースの数をカウントするカウント手段と、を備えることを特徴とする画像処理装置。An image processing device for counting the number of cases in a state where a plurality of cases are arranged,
An imaging device for obtaining images of a plurality of cases ;
A plurality of case images obtained by the imaging device are divided into a second direction that intersects the first direction in which the cases are arranged, and a master image is created from a predetermined one case for each of a plurality of block images. Compare the amount of luminance dispersion from a given case in the block image, select a given block image according to the amount of dispersion, and sequentially compare the images of multiple cases and the master image in the selected block image An image processing apparatus comprising: a count unit that obtains a correlation amount between a master image and an image of each case in a block image, and counts the number of a plurality of cases based on the obtained correlation amount.
複数のケースの画像を得て、
複数のケースの画像を、ケースが配列されている第1方向と交差する第2方向に分けて複数のブロック画像毎に所定の1つのケースからマスター画像を作成し、
各ブロック画像内における所定のケースから輝度の分散量を比較して分散量に応じて所定のブロック画像を選択し、選択されたブロック画像内における複数のケースの画像とマスター画像とを順次比較してマスター画像とブロック画像内における各ケースの画像との相関量を求め、
得られた相関量に基づいて、複数のケースの数をカウントする、
ことを特徴とする画像処理方法。An image processing method for counting the number of multiple cases in a state where multiple cases are arranged,
Get multiple case images,
Images of a plurality of cases, to create a master image from a predetermined one case for each of a plurality of block image is divided in a second direction the case intersects the first direction are arranged,
Compares the amount of luminance dispersion from a given case within each block image, selects a given block image according to the amount of dispersion, and sequentially compares the images of multiple cases within the selected block image with the master image. The amount of correlation between the master image and the image of each case in the block image is obtained,
Based on the obtained correlation amount, count the number of multiple cases ,
An image processing method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP29957396A JP3820649B2 (en) | 1996-10-24 | 1996-10-24 | Image processing apparatus and image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP29957396A JP3820649B2 (en) | 1996-10-24 | 1996-10-24 | Image processing apparatus and image processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH10124644A JPH10124644A (en) | 1998-05-15 |
| JP3820649B2 true JP3820649B2 (en) | 2006-09-13 |
Family
ID=17874387
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP29957396A Expired - Fee Related JP3820649B2 (en) | 1996-10-24 | 1996-10-24 | Image processing apparatus and image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3820649B2 (en) |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH02168372A (en) * | 1988-12-22 | 1990-06-28 | Toshiba Corp | Bundle number detector |
| JPH03278195A (en) * | 1990-03-27 | 1991-12-09 | Mitsutoyo Corp | Number of sheets measuring instrument |
| JPH0448249A (en) * | 1990-06-18 | 1992-02-18 | Fujitsu Ltd | Device and method for body inspection |
| JPH05197851A (en) * | 1992-01-17 | 1993-08-06 | Sony Corp | Laminated sheet number counting device |
| JP2787151B2 (en) * | 1993-03-29 | 1998-08-13 | 日立エンジニアリング株式会社 | Article quantity inspection method and device |
| JPH09218934A (en) * | 1996-02-13 | 1997-08-19 | Omron Corp | Method and apparatus for counting the number of objects |
-
1996
- 1996-10-24 JP JP29957396A patent/JP3820649B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH10124644A (en) | 1998-05-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Klinger | Image processing with LabVIEW and IMAQ Vision | |
| US8860811B2 (en) | System and method for capturing, storing, analyzing and displaying data related to the movements of objects | |
| US5371842A (en) | System for real-time display of the waveshape of an incoming stream of digital data samples | |
| US9094588B2 (en) | Human machine-interface and method for manipulating data in a machine vision system | |
| TW200501706A (en) | Camera equipped with communication function, image data memory method, and computer program | |
| CN1586069A (en) | Identification and evaluation of audience exposure to logos in a broadcast event | |
| KR20180038241A (en) | Apparatus and method for providing image | |
| EP0636994B1 (en) | Method of and apparatus for retrieving dynamic images and method of and apparatus for managing images | |
| JP3820649B2 (en) | Image processing apparatus and image processing method | |
| US11100365B2 (en) | Apparatus and method for interactively viewing and clustering data segments from long data recordings | |
| US5844603A (en) | Image data processing apparatus having functions of dividing the image data, and method of processing image data | |
| WO2009017879A2 (en) | Image portion identification methods, image parsing methods, image parsing systems, and articles of manufacture | |
| CN109916435A (en) | The acquisition method and system of laboratory testing data | |
| CN115937686B (en) | Leaf vegetable seed precision seedling raising and sowing performance detection system and construction method thereof | |
| Kang et al. | To learn representativeness of video frames | |
| CN1735137B (en) | Digital camera | |
| US7461204B2 (en) | Method to store and retrieve memory card usage information | |
| JP7619427B2 (en) | Processing device, processing method, and program | |
| JP3858268B2 (en) | Content recording apparatus and remaining amount display method | |
| JP3209673B2 (en) | Inspection method of particle aggregation pattern of reacted sample in clinical test | |
| US6748099B1 (en) | Computer-aided image diagnosis system | |
| Paulsson et al. | A real-time color image processing system for forensic fiber investigations | |
| JP3943471B2 (en) | Image management apparatus and image management program | |
| Ayers et al. | Color, motion analysis and biological imaging | |
| WO2014009776A1 (en) | A method for determining of selected properties of a selected object by analyzing selected parameters of an electronically accessible image |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050901 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050927 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20051128 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060214 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060413 |
|
| 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: 20060530 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060612 |
|
| LAPS | Cancellation because of no payment of annual fees |