JP3816994B2 - Edge region extraction method and apparatus - Google Patents

Edge region extraction method and apparatus Download PDF

Info

Publication number
JP3816994B2
JP3816994B2 JP26837596A JP26837596A JP3816994B2 JP 3816994 B2 JP3816994 B2 JP 3816994B2 JP 26837596 A JP26837596 A JP 26837596A JP 26837596 A JP26837596 A JP 26837596A JP 3816994 B2 JP3816994 B2 JP 3816994B2
Authority
JP
Japan
Prior art keywords
edge
edge region
pixels
pixel
width
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP26837596A
Other languages
Japanese (ja)
Other versions
JPH10116344A (en
Inventor
博 佐藤
英人 坂田
添田  正彦
林  謙太
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP26837596A priority Critical patent/JP3816994B2/en
Priority to PCT/JP1997/003611 priority patent/WO1998015919A1/en
Priority to US09/077,553 priority patent/US6366358B1/en
Priority to EP97943155A priority patent/EP0872810A4/en
Publication of JPH10116344A publication Critical patent/JPH10116344A/en
Application granted granted Critical
Publication of JP3816994B2 publication Critical patent/JP3816994B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Inking, Control Or Cleaning Of Printing Machines (AREA)
  • Image Analysis (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、エッジ領域抽出方法及び装置、特に、印刷物に発生している微細な筋状の欠陥を検出する際の画像処理に適用して好適な、エッジ領域抽出方法及び装置に関する。
【0002】
【従来の技術】
一般に、グラビア輪転印刷機では、回転する版胴とニップロールとの間に原反を通過させながら、該版胴に付着されたインキをその原反に転写することにより、連続的な印刷が行われている。
【0003】
このような連続的な印刷を可能とするために、上記版胴の一部がインキ溜めに浸漬されており、その回転に伴なって該版胴にインキが付着されると共に、過剰に付着したインキは、回転方向近傍に付設されているドクターブレードによって掻き落され、絵柄部分にのみインキが残るようになっている。
【0004】
ところが、何等かの理由でドクターブレードに微小な欠けが生じたりすると、その欠け部分が接触している版胴には、極めて僅かではあるが常時インキが残ることになるため、原反の印刷面には、いわゆるドクター筋と呼ばれる、微細ではあるが連続した筋状の印刷欠陥が発生することになる。
【0005】
従来、印刷物の検査には、CCDカメラ等の撮像手段で印刷絵柄を画像入力し、その入力画像を画像処理することにより印刷欠陥を検出することが行われている。
【0006】
このような印刷欠陥検出に用いられる画像処理の1つに、入力画像から画像の濃淡の境界であるエッジを検出するためのエッジ抽出がある。このエッジ抽出は、入力画像の各画素値からなる画像データに対して各種の微分オペレータ等を適用することにより実行されるが、そのようなオペレータとしては、例えば、1次微分ではPrewittのオペレータ、Sobelのオペレータ、2次微分ではラプラシアン・オペレータ等がある。
【0007】
【発明が解決しようとする課題】
しかしながら、前記のような従来の画像処理によるエッジ検出方法は、入力された画像中にある絵柄部分の全てについてエッジを抽出してしまうため、入力画像に基づいて行う印刷欠陥の検査等に用いる場合には、誤判定の原因となる。
【0008】
即ち、入力された検査画像からエッジ部を除外するためのマスクを作成し、該マスクを検査画像に適用して印刷欠陥のみを検出できるようにするために、該マスクの作成処理に前記オペレータを用いた場合、その検査画像に前述したドクター筋等の筋状の欠陥が含まれている場合には、その欠陥をも絵柄と同様に処理することになるので、作成されたマスクを該検査画像に適用すると、通常の絵柄のエッジと共に、筋をもマスクしてしまうので、筋状の欠陥を検出することはできない。
【0009】
これを、従来のマスク作成方法の場合を例に具体的に説明する。
【0010】
今、カメラにより入力された検査画像が、図28に絵柄を模式的に示した(A)である場合を考える。この図には幅がa〜dの4種類の絵柄がそれぞれeの間隔をおいて並んだ画像に相当し、1番細いdの幅の線がドクター筋に相当する。又、図28の(B)は、同図(A)の水平方向の各画素の階調値を示したものである。
【0011】
先ず、図29に、上記(A)の検査画像と共に、(C)として示すように、該画像にラプラシアン・オペレータ等を適用してエッジを抽出し、そのエッジ位置を中心に左右数画素分をエッジ領域とする。
【0012】
次いで、ノイズ除去等のために、図30に上記(C)の各エッジ領域と共に示すように、これら領域を、その両側それぞれに数画素分拡大する膨張処理を行って(D)の状態にする。その後、上記(C)と同一の画素数の状態に戻す収縮処理を行い、それをマスク画像とする。その際、図28の画像(A)でcの幅の絵柄の場合のように、膨張処理した結果、2つのエッジ領域が図30の(D)に示すように繋ってしまったときには、その部分は収縮の対象にならない。図31の(E)は、以上のようにして作成したマスク画像を上記図28の(A)の検査画像に重ねた状態を示したものである。
【0013】
この図31からわかるように、従来のエッジ抽出方法を用いて作成したマスク画像を検査画像に適用して、絵柄のエッジが検出されないようにすると、上記図28の(A)でdの幅のドクター筋の場合は、図29に示した(C)のエッジ領域が、該ドクター筋の部分を完全に含んでしまうため、ドクター筋を検出することができないことになる。
【0014】
本発明は、前記従来の問題点を解決するべくなされたもので、印刷絵柄等を画像入力した画像の中から、絵柄等に対応する画像信号の平坦部が所定の幅以下の場合にのみ、そのエッジが、抽出されるエッジ領域に含まれないようにすることができるエッジ領域抽出方法及び装置を提供することを課題とする。
【0015】
【課題を解決するための手段】
本発明は、入力画像の水平方向及び垂直方向の少なくとも一方について、画素値が急激に変化するエッジに基づいてエッジ領域を抽出するエッジ領域抽出方法において、画素値の変化が無いか又は小さい平坦部の幅が所定値以下の場合には、該平坦部の両端に位置するエッジが、エッジ領域に含まれないようにし、それ以外の場合は、エッジがエッジ領域に含まれるようにエッジ領域を抽出する際に、パラメータとして、少なくとも画素値を比較する位置を規定するための画素数Lと、エッジがエッジ領域に含まれないようにする平坦部の最大幅を規定するためのエッジ間画素数Wとを設定するステップと、注目画素を中心としてそれぞれ反対方向にL画素離れた位置の画素値を比較し、その差が、所定の閾値を超えている場合の該注目画素をエッジ領域として抽出するステップと、前記エッジ間画素数Wの幅の平坦部について抽出された一対のエッジ領域の幅を、それぞれ画素単位で膨張させた場合に、該両エッジ領域が繋ることのない膨張画素数Nを計算するステップと、膨張後のエッジ領域を収縮させる収縮画素数Pを計算するステップと、入力画像から抽出された全てのエッジ領域の幅を、その両側でN画素ずつ膨張させるステップと、膨張させたエッジ領域の幅を、その両側でP画素ずつ収縮させるステップと、を含むようにすることにより、前記課題を解決したものである。
【0016】
本発明は、又、入力画像の水平方向及び垂直方向の少なくとも一方について、画素値が急激に変化するエッジに基づいてエッジ領域を抽出するエッジ領域抽出装置において、対象物に関する画像を入力する手段と、入力画像からエッジ領域を抽出する際に、パラメータとして、少なくとも画素値を比較する位置を規定するための画素数Lと、エッジがエッジ領域に含まれないようにする平坦部の最大幅を規定するためのエッジ間画素数Wとを設定する手段と、注目画素を中心としてそれぞれ反対方向にL画素離れた位置の画素値を比較し、その差が、所定の閾値を超えている場合の該注目画素をエッジ領域として抽出する手段と、前記エッジ間画素数Wの幅の平坦部について抽出された一対のエッジ領域の幅を、それぞれ画素単位で膨張させた場合に、該両エッジ領域が繋ることのない膨張画素数Nを計算すると共に、膨張後のエッジ領域を収縮させる収縮画素数Pを計算する手段と、入力画像から抽出された全てのエッジ領域の幅を、その両側でN画素ずつ膨張させる手段と、膨張させたエッジ領域の幅を、その両側でP画素ずつ収縮させる手段と、を備えたことにより、前記エッジ領域抽出方法を確実に実行できるようにしたものである。
【0017】
即ち、本発明においては、図1に示すように、画像入力を行い、その画像についてエッジ領域の抽出処理を行い、結果として得られたエッジ領域を含む抽出画像を出力する。
【0018】
本発明の対象となる入力画像は、2値画像、多値モノクロ画像、カラー画像のいずれでもよい。又、上記エッジ領域抽出処理には、(A)垂直方向エッジのみを抽出、(B)水平方向エッジのみを抽出、(C)水平・垂直両方向エッジを同時抽出、の3通りがある。更に、上記出力画像としては、2次元の2値画像で、エッジ領域とそれ以外を、例えばエッジ領域は1(又はON)、それ以外は0(又はOFF)にする、若しくはその逆にする等により区別して出力する。
【0019】
又、本発明により抽出するエッジ領域と、入力画像との関係の概略を、図2に示すように、画像信号が水平方向の1次元の画素値(階調値)からなる場合を例に説明しておく。
【0020】
図2(A)は、暗い背景に、垂直方向に明るい線分が表示されてる画像の場合に当り、同図(B)は、その逆の場合に当る。いずれの場合も、画素値が急激に変化する位置に当る画素がエッジであり、該エッジは画素値が余り変化しない平坦部が、明るさの異なる別の平坦部と接する場合、その境界に存在する。
【0021】
本発明では、両エッジ間の画素数がWより大きいときは、この図2に網掛で示すように、エッジ領域がエッジを内側に含んだ位置に抽出されるが、逆にW以下の場合は、後に詳述するように、エッジ領域はエッジを含まない位置に抽出されるか、もしくはエッジ領域は全く抽出されない。
【0022】
その結果、ドクター筋等の非常に細い線と、それ以外の線を含む通常の絵柄とは明確に区別することが可能となり、抽出したエッジ領域を基にマスク画像を作成し、それを印刷検査に利用することにより、例えばドクター筋を確実に検出することが可能となる。
【0023】
上記図2は図3(A)に示すような垂直方向のエッジを抽出していることに当るが、処理方向を90°変えれば、同図(B)に示すような水平方向のエッジを抽出でき、更に、垂直方向と水平方向の処理を同時に行えば、水平、垂直両方向のエッジ領域を同時抽出できる。
【0024】
【発明の実施の形態】
以下、図面を参照して、本発明の実施の形態を詳細に説明する。
【0025】
図4は、本発明に係る一実施形態の概略構成を示すブロック図である。
【0026】
本実施形態のエッジ領域抽出装置は、視野寸法が、例えば30mm×30mmからなるCCDエリアセンサカメラ(図示せず)により、印刷物の絵柄を入力した画像を記憶する入力画像記憶部10と、該記憶部10から読み出される入力画像に対して、以下に詳述する各処理を実行可能とするためのパラメータ記憶部12、エッジ領域抽出部14、膨張・収縮回数算出部18、エッジ膨張部20、エッジ収縮部24と共に、エッジ領域抽出部14、エッジ膨張部20、及びエッジ収縮部24でそれぞれ処理した結果を記憶するエッジ領域記憶部16、エッジ膨張記憶部22、及び出力画像記憶部26を備えている。
【0027】
上記パラメータ記憶部12は、入力画像記憶部10から読み出される入力画像から、エッジ領域を抽出する際に画素値を比較する位置を規定するための画素数L及び判定に使用する閾値Tと、エッジをエッジ領域から除外する平坦部の最大幅を規定するためのエッジ間画素数Wとをパラメータとして設定する手段であり、これらパラメータの値は、例えばキーボード等により予め入力しておく。但し、これらパラメータには次の制約があり、ドクター筋の場合は、例えば、W=10画素とすることができる。
【0028】
W≧1 L≧W 0≦T≦最大画素値
【0029】
なお、上記閾値Tは、マスク画像を作成する場合は等号は必要ないが、本実施形態を検査装置に適用する場合を考慮し、ここでは等号を含めておく。即ち、実際の検査装置で、例えば全面マスクにして検査装置を止めることなく検査作業を事実停止する場合は、T=0とし、又、平坦部の幅に関係なくエッジを全て検査対象にしたい場合、あるいはエッジがない絵柄を検査するような場合は、T=最大画素値とすることにより対応できるようにしてある。
【0030】
前記エッジ領域抽出部14は、垂直方向のエッジ領域を抽出する場合を、図5に模式的に示すように、上記パラメータ記憶部12から読み込んだパラメータLとTを用い、●の注目画素Pn,m を中心としてそれぞれ反対方向にL画素離れた位置にある、同じく●で示した、Pn-L,m とPn+L,m の画素値を比較し、その差が閾値T以上である場合の該注目画素をエッジ領域として判定し、抽出する手段である。このエッジ領域抽出部14で抽出されたエッジ領域は、一旦その記憶部16に記憶される。なお、水平方向、水平・垂直両方向のエッジ領域の場合も、同様の計算原理に基づいて抽出できる。
【0031】
前記膨張・収縮回数算出部18は、前記パラメータ記憶部12からパラメータWを入力すると共に、エッジ間画素数がWの平坦部について抽出された一対のエッジ領域の幅をそれぞれ画素単位で膨張させた場合に該両エッジ領域が接しない膨張画素数Nを膨張回数として計算し、且つ、膨張後のエッジ領域を収縮させる収縮画素数Pを収縮回数として計算する手段である。
【0032】
図6は、上記算出部18で算出される膨張回数Nの意味を概念的に示したものであり、この図に示されるように、回数N=NA +NB であり、NA =L−W、NB =(W−1)/2である。
【0033】
上記NA は、上記図6(B)に示すように、エッジから、上記方法で抽出したエッジ領域までの平坦部の長さ(画素数)であり、図中左右いずれのエッジ領域についても同一である。ここでは便宜上左のエッジ領域のみについて説明するが、該エッジ領域の右端から高階調値の平坦部の右端までの画素数は、上記図5に示した抽出原理からLであるため、NA =L−Wで与えられる。
【0034】
上記NB は、左右両エッジ領域から画素数Nだけ膨張させた場合に、該両エッジ領域が接しないようにするために、図6(A)に示すように、少なくとも中心に一画素残すことができる画素数にする必要があることから、(W−1)/2とする。但し、中心に残す画素数は1に限らず例えば2としてもよく、その場合は、NB =(W−2)/2とする。なお、このNB に端数が出た場合は切り捨てる。
【0035】
このように、回数Nを設定することにより、エッジ間の幅が画素数W以下の筋状の場合は、左右のエッジ領域に対してN画素の膨張を行っても、絶対に両エッジ領域が繋ることがないのに対し、Wを超える幅の場合は繋ってしまう。
【0036】
又、上記計算部18では、上記N画素分を膨張させた後のエッジ領域を収縮させる収縮画素数P1 の計算も行う。この実施形態では、次式のようにP1 =Nとする。
【0037】
P1 =N=L−W+(W−1)/2 …(1)
【0038】
前記エッジ膨張部20では、前記エッジ領域記憶部16から読み込んだエッジ領域抽出画像に対して、上記算出部18で求められた膨張回数Nの画素数だけ幅を拡げる膨張処理を行う。この膨張処理を、エッジ領域を水平方向に一画素だけ膨張させる(回数N=1)場合を、1次元的な信号について図7に模式的に示した。
【0039】
この図7に示されるように、●がエッジ領域であり、一回の膨張は、該エッジ領域を水平方向の両側にそれぞれ一画素だけ幅を拡張することを意味する。
【0040】
上記エッジ膨張部20で膨張処理された画像データは、エッジ膨張記憶部22に記憶された後、エッジ収縮部24に読み出され、エッジ膨張部20で膨張したと同数のP1 (=N)画素分だけ縮める収縮処理が行われる。
【0041】
図8には、上記図7で膨張処理したエッジ領域に対する収縮処理を概念的に示した。この図に示されるように、本実施形態で実行する収縮処理は、膨張したと同数のN画素を膨張後のエッジ領域の両側から減らすことを意味し、膨張した結果、両側のエッジ領域が繋ってしまった場合を除き、膨張前のエッジ領域に戻すことになる。この収縮後のエッジ領域画像は出力画像記憶部26に記憶される。
【0042】
次に、本実施形態の作用を説明する。
【0043】
本実施形態においては、パラメータL、W及びTとして所定の数値を入力すると共に、入力画像に対して、前述した原理に従ってエッジ領域の抽出、膨張、収縮の各処理を行うことにより、エッジ間画素数がW以下の平坦部(微小筋に当る)の場合は、エッジを含まない位置にエッジ領域を抽出でき、逆にWを超えているときはエッジを含む領域にエッジ領域を抽出できる。
【0044】
これを、W=3、L=5で、膨張回数N及び収縮回数P1 が共に、前記(1)式からL−W+(W−1)/2=5−3+(3−1)/2=3の場合について、図9〜11を参照しながら具体的に説明する。
【0045】
図9は、幅(エッジ間画素数)2の線のエッジはエッジ領域とされない場合の例に当る。1次元の入力画像信号が、図9(A)に●に示すように、幅が2画素の場合、前記図5に示した原理に従って、注目画素から左右にそれぞれ5画素離れた位置の画素値を比較し、その値が閾値T以上である場合の該注目画素をエッジ領域とする処理を行うと、2つの●の両側にそれぞれ網掛の丸で示した2つの画素からなるエッジ領域が抽出された図9(B)に示す画像が得られる。
【0046】
次いで、上記2つのエッジ領域それぞれに対して、左右の幅方向にそれぞれ3画素(N=3)分拡げる膨張処理を行って図9(C)の状態にし、その後、同じく3画素分減らす収縮を行い、最終的なエッジ領域抽出画像として同図(D)を得る。
【0047】
この例では、上記図9(C)から判るように、網掛の二重丸で示した膨張処理後のエッジ領域が、互い繋っていないため、各エッジ領域とも両側で収縮処理が行われる。その結果、最終的に、図9(D)に示すように、線の両側のエッジに当る●から離れた位置にエッジ領域が抽出される。
【0048】
これに対して、W=3より大きい幅4の線の場合の処理結果は、上記図9に対応する図10に示すように、同図(C)に示される膨張処理後の状態が、2つのエッジ領域が繋って1つの大きなエッジ領域となっている。
【0049】
このように、2つのエッジ領域が1つに繋がった場合には、その部分では収縮処理が行われないようになっているため、収縮後のエッジ領域は図10(D)のように、同図(B)で抽出された左側エッジ領域の左端から右側エッジ領域の右端まで連続したものになり、この収縮後のエッジ領域の内側に入力画像の同図(A)に示される線に相当する4つの●の画素が完全に潰されて含まれているため、エッジも当然含まれていることになる。
【0050】
又、前記図9(A)の入力画像の線に比べ十分に幅が広い17画素の場合は、前記図9、図10より簡略化した図11に示すように、同図(B)の段階でエッジを中心とする2L(5×2=10)の幅のエッジ領域が抽出され、このエッジ領域に対して、N=3の膨張処理を行っても、同図(C)に示すように左右両エッジ領域は内側で繋がることがないため、次の収縮処理では各エッジ領域とも両側でN=3で収縮され、同図(D)に示すように、上記(B)の場合と同一のエッジ領域に戻る。この場合は、左右のエッジがそれぞれ対応する左右のエッジ領域(網掛範囲)に完全に含まれることになる。
【0051】
本実施形態によるエッジ領域抽出方法を、前記図28に示した(A)の入力画像に適用すると、前記図29〜31に相当する図12〜14に、エッジ領域抽出、膨張、収縮の各処理結果(F)〜(H)をそれぞれ前の処理結果と併せて示したように、パラメータW以下の細い線に当るdの幅の場合のみ、該線から離れた位置にその線の幅に応じた幅のエッジ領域が抽出される。その結果、上記図14から判るように、前記幅dの線の場合のみ、そのエッジが収縮後のエッジ領域に含まれず、それ以外の幅の広いものは、全てエッジがエッジ領域に含まれることになる。
【0052】
従って、本実施形態によれば、画像中の垂直方向のエッジに基づいてエッジ領域を抽出できるが、エッジに挾まれた平端部の幅が一定(=W)以下のときは、そのエッジをエッジ領域として抽出しないようにできることから、細い線を除き、Wを超える太さの線や通常の絵柄についてはそのエッジ部分を含むエッジ領域を抽出することができる。
【0053】
従って、画像処理により欠陥検査を行う際に、入力した検査画像に対して本実施形態を適用することにより、平坦部及び細い筋状の欠陥を残したまま、絵柄のエッジのみを除外するためのマスク画像を作成することが可能となる。
【0054】
これを、印刷絵柄を画像入力して得られた原画像が、図15にイメージを示すように、太線のリングRと色模様Fからなる通常の絵柄と共に、微細なドクター筋Dを含んでいる場合に、該原画像に対して本発明方法を適用して得られる最終的な収縮処理後のエッジ領域画像は、図16に示すイメージのようになる。即ち、前記図14の場合と同様に、通常の絵柄部分は、エッジを中心とするその近傍がエッジ領域ER(斜線部で示す)として抽出されるが、ドクター筋Dの部分はエッジ領域ERに含まれないことになる。これに対して従来の一般的な方法を適用すれば、図17に示すようにドクター筋はエッジ領域に含まれてしまう。
【0055】
従って、上記図16のエッジ抽出画像をマスク画像として使用することにより、通常は検出されないような、印刷のドクター筋等の筋状欠陥を確実に検出することができる。
【0056】
次に、本発明に係る第2実施形態について説明する。
【0057】
本実施形態は、前記図4の膨張・収縮回数計算部18で、収縮回数(画素数)P2 を、次の(2)式で計算するようにした以外は、前記第1実施形態と実質上同一である。
【0058】

Figure 0003816994
【0059】
本実施形態においては、上記(2)式より明らかなように、前記(1)式で示した第1実施形態の収縮画素数P1 (=N)よりも(W+1)/2画素分だけ更に収縮させる。これを、図18、図19を用いて以下に説明する。
【0060】
図18は、幅W以下の平坦部からなる入力画像に対して、前記図9(A)〜(D)と同様の処理を施してエッジ領域を抽出した画像を模式的に示したものである。即ち、この図18は、図9(C)に相当するN回膨張した画像から、前記第1実施形態の場合と同様にP1 (=N)回収縮した、同図(D)の状態に相当する。
【0061】
本実施形態では、第1実施形態によれば、上記図18に示した幅W以下の平坦部の左右近傍に抽出されるエッジ領域ERを、更に(W+1)/2画素分収縮させることにより、図19に示すように消減させるようにしている。
【0062】
即ち、第1実施形態の場合よりも多くする追加収縮回数(W+1)/2の計算根拠は、図18に示されるエッジ領域ERの最大幅は、前記図5に示した抽出原理からWであることから、これを両側から1画素ずつ収縮させて消滅させるためにはW/2で足りるが、Wが奇数の場合を考慮して(W+1)/2としていることにある。但し、この場合、端数は切り捨てる。
【0063】
以上詳述した本実施形態によれば、前記第1実施形態に比較して、幅がW以下の筋状の入力画像について、その両側に抽出されたエッジ領域を消滅させることができる。
【0064】
従って、本実施形態により抽出したエッジ領域を用いてマスク画像を作成する場合には、第1実施形態の作用を示した前記図14(H)に相当する図20と前記図16に相当する図21にそれぞれ示すように、ドクター筋Dの両側には、エッジ領域が抽出されないようにできることから、それだけ被検査画像において検査の対象となる領域を広く取り、検査の信頼性を高めることが可能となる。
【0065】
次に、本発明に係る第3実施形態について説明する。
【0066】
本実施形態は、前記図4の膨張・収縮回数計算部18で、収縮回数(画素数)P3 を、次の(3)式で計算するようにした以外は、前記第1実施形態と実質上同一である。
【0067】
Figure 0003816994
【0068】
本実施形態においては、上記(3)式より明らかなように、前記(1)式で示した第1実施形態の収縮画素数P1 (=N)よりも(L−1)画素分だけ更に収縮させる。これを、図22、図23を用いて以下に説明する。
【0069】
図22(A)は、幅W以下の平坦部からなる入力画像に対して、前記図9(A)〜(D)と同様の処理を施してエッジ領域ERを抽出した画像を模式的に示した、前記図18と同一である。又、図22(B)は、平坦部の幅がWより大きい入力画像について、前記図10(A)〜(D)と実質上同一の処理を施した同図(D)に相当し、図22(C)は、平坦部の幅がWより十分に大きい入力画像について前記図11(A)〜(D)と実質上同一の処理を施した同図(D)に相当する。
【0070】
本実施形態では、前記第1実施形態でP1 回の収縮を行った状態に当る図22(A)〜(D)のそれぞれのエッジ領域ERに対して、前記(3)式で示したように、更に(L−1)画素分の収縮を行うことにより、対応する図23(A)〜(C)の状態にする。本実施形態で採用する追加収縮回数(L−1)は、エッジ領域を平坦部のエッジに対してぎりぎりまで小さくする収縮画素数に当る。
【0071】
本実施形態のように、前記第1実施形態のP1 より(L−1)回だけ余分に収縮させる場合には、前記第2実施形態の場合と同様に、幅がW以下の平坦部については、W≦Lであることから、図23(A)のようにエッジ領域ERを消滅させることができる。又、図22(B)のように、平坦部の幅がWを超えている場合、図23(B)に示すように、膨張処理した結果1つに繋ったエッジ領域ERの左右端それぞれをエッジより1画素目まで収縮させることができるため、エッジ領域をエッジをカバーできる最小の大きさにすることができる。又、図22(C)のように、平坦部の幅がWより十分に大きい場合は、図23(C)に示すように、エッジの前後1画素の部分にのみエッジ領域が抽出されるようにできる。
【0072】
一般に、抽出したエッジ領域を用いてマスク画像を作成する場合、エッジ領域(マスク部分)は、被検査画像において検査対象から除外する領域を意味するため、検査対象となる領域を広くして検査の信頼性を高めるためには、エッジ領域は被検査画像中のエッジをきちんとマスクした上で可能な限り(その面積が)狭いことが理想的である。
【0073】
従って、本実施形態は、一般的なエッジ抽出方法として最もふさわしく、本実施形態により抽出したエッジ領域を用いることにより、理想的な検査用のマスク画像を作成することができる。
【0074】
その結果、本実施形態によれば、前記第2実施形態の場合の前記図20及び図21にそれぞ相当する図24及び図25に示すように、幅W以下のドクター筋Dについては、前記第2実施形態と同様にエッジ領域は抽出されず、幅W以上の通常の絵柄については、前記第2実施形態より一段と狭いエッジ領域ERを抽出することが可能となる。
【0075】
図26は、本発明に係る第4実施形態のエッジ領域抽出装置の概略構成を示すブロック図である。
【0076】
本実施形態は、入力画像がカラーの場合に適用されるものであり、前記図4に示した1つのエッジ領域抽出部14及びエッジ領域記憶部16が、入力画像記憶部10から入力されるR、G、Bの各画像に対応する14A〜14Cで示す3つのエッジ領域抽出部と、各抽出画像を記憶する16A〜16Cで示す3つのエッジ領域記憶部に増設されていると共に、該記憶部16A〜16Cから入力されるR、G、Bの各抽出画像を合成するエッジ合成部28を付設した以外は、前記第1〜3実施形態と実質的に同一である。
【0077】
この実施形態によれば、R、G、Bの各画像毎にエッジ抽出処理ができるため、対象の入力画像がカラーの場合でも、迅速且つ正確に、前記第1〜3実施形態の場合と同様にエッジ領域の抽出を行うことができる。
【0078】
図27は、本発明に係る第5実施形態のエッジ領域抽出装置の概略構成を示すブロック図である。
【0079】
本実施形態は、上記第4実施形態と同様にカラー画像に適用されるものであり、ここでは、エッジ領域抽出部14A〜14C、エッジ領域記憶部16A〜16Cと共に、20A〜20C、22A〜22C、24A〜24C、26A〜26Cの符号でそれぞれ示したように、エッジ膨張部、エッジ膨張記憶部、エッジ収縮部、出力画像記憶部の全てをR、G、Bの各画像に対応させて増設し、最終的に得られる収縮画像を合成するためのエッジ合成部28を付設した以外は、前記第4実施形態と実質的に同一である。
【0080】
本実施形態によれば、各R、G、Bの画像毎に全ての画像処理を行うことができるため、前記第4実施形態より更に高精度でエッジ領域を抽出することができる。
【0081】
以上、本発明について具体的に説明したが、本発明は、前記実施形態に示したものに限られるものでなく、その要旨を逸脱しない範囲で種々変更可能である。
【0082】
例えば、前記実施形態では、パラメータとしてW=3、L=5の場合を示したが、これに限定される場合でなく、対象とする画像毎に適切なパラメータを設定することができる。
【0083】
又、前記実施形態では垂直方向のエッジについて説明したが、水平方向のエッジでも、又両方のエッジでもよいことは言うまでもない。
【0084】
【発明の効果】
以上説明したとおり、本発明によれば、例えば印刷絵柄を画像入力した検査画像等の入力画像の中から、画像信号の平坦部が所定の幅以下の場合にのみ、そのエッジが含まれないエッジ領域を抽出することができる。
【図面の簡単な説明】
【図1】本発明における処理手順の概略を示すフローチャート
【図2】画像信号とエッジ領域との関係を概念的に示す線図
【図3】垂直方向、水平方向のエッジを模式的に示す説明図
【図4】本発明に係る第1実施形態のエッジ領域抽出装置の概略構成を示すブロック図
【図5】エッジ領域の抽出原理を模式的に示す説明図
【図6】膨張・収縮回数の計算方法を示す説明図
【図7】エッジ領域の膨張処理の原理を示す説明図
【図8】エッジ領域の収縮処理の原理を示す説明図
【図9】細線に対するエッジ領域抽出の処理手順を示す説明図
【図10】中線に対するエッジ領域抽出の処理手順を示す説明図
【図11】太線に対するエッジ領域抽出の処理手順を示す説明図
【図12】入力画像と、本発明によるエッジ領域の抽出画像を示す説明図
【図13】上記抽出画像と、その膨張処理画像を示す説明図
【図14】上記膨張処理画像と、その収縮処理画像を示す説明図
【図15】印刷絵柄を画像入力して得られた原画像を模式的に示す説明図
【図16】上記原画像から本発明により抽出したエッジ領域を概念的に示す説明図
【図17】上記原画像から従来法により抽出したエッジ領域を概念的に示す説明図
【図18】幅W以下の平坦部について抽出されたエッジ領域のP1 回収縮後の状態を示す説明図
【図19】第2実施形態の作用を示す説明図
【図20】第2実施形態の効果を示す説明図
【図21】第2実施形態の効果を示す他の説明図
【図22】幅が異なる平坦部について抽出されたエッジ領域のP1 回収縮後の状態を示す説明図
【図23】第3実施形態の作用を示す説明図
【図24】第3実施形態の効果を示す説明図
【図25】第3実施形態の効果を示す他の説明図
【図26】本発明に係る第4実施形態のエッジ領域抽出装置の概略構成を示すブロック図
【図27】本発明に係る第5実施形態のエッジ領域抽出装置の概略構成を示すブロック図
【図28】入力画像の一例と、その1次元の画像入力信号を模式的に示す説明図
【図29】上記入力画像と、従来法によるエッジ領域抽出画像を示す説明図
【図30】上記抽出画像とその膨張処理画像を示す説明図
【図31】上記膨張処理画像と、その収縮処理画像を示す説明図
【符号の説明】
10…入力画像記憶部
12…パラメータ記憶部
14…エッジ領域抽出部
16…エッジ領域記憶部
18…膨張・収縮回数算出部
20…エッジ膨張部
22…エッジ膨張記憶部
24…エッジ収縮部
26…出力画像記憶部
D…ドクター筋
ER…エッジ領域[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an edge area extraction method and apparatus, and more particularly to an edge area extraction method and apparatus suitable for application to image processing when detecting fine streak defects generated in printed matter.
[0002]
[Prior art]
In general, in a gravure rotary printing machine, continuous printing is performed by transferring ink adhered to a plate cylinder while passing the original between a rotating plate cylinder and a nip roll. ing.
[0003]
In order to enable such continuous printing, a part of the plate cylinder is immersed in an ink reservoir, and ink is attached to the plate cylinder along with its rotation and excessively attached. The ink is scraped off by a doctor blade attached in the vicinity of the rotation direction so that the ink remains only in the pattern portion.
[0004]
However, if there is a minute chipping on the doctor blade for some reason, a very small amount of ink will always remain on the plate cylinder in contact with the chipping part. In this case, fine but continuous streak-like print defects called so-called doctor streaks occur.
[0005]
2. Description of the Related Art Conventionally, for printed matter inspection, a print defect is detected by inputting a printed pattern image with an imaging means such as a CCD camera and processing the input image.
[0006]
One of the image processes used for such print defect detection is edge extraction for detecting an edge that is a light / dark boundary of an image from an input image. This edge extraction is performed by applying various differential operators or the like to the image data composed of the pixel values of the input image. Examples of such operators include Prewitt's operator in the first differential, There are Sobel operators, Laplacian operators, etc. for the second derivative.
[0007]
[Problems to be solved by the invention]
However, since the edge detection method by the conventional image processing as described above extracts edges for all the pattern portions in the input image, the edge detection method is used for inspection of a print defect performed based on the input image. It causes misjudgment.
[0008]
That is, in order to create a mask for excluding the edge portion from the input inspection image and apply the mask to the inspection image so that only print defects can be detected, the operator is used in the mask creation processing. When used, if the inspection image contains a streak defect such as the doctor streaks described above, the defect is also processed in the same manner as the picture, so the created mask is used for the inspection image. If it is applied to, the streak defect is not detected because the streak is masked together with the edge of the normal pattern.
[0009]
This will be specifically described with reference to an example of a conventional mask creation method.
[0010]
Consider a case where the inspection image input by the camera is (A) schematically showing a pattern in FIG. This figure corresponds to an image in which four types of patterns having a width of a to d are arranged at intervals of e, and the thinnest line of width d corresponds to a doctor line. FIG. 28B shows the gradation value of each pixel in the horizontal direction of FIG.
[0011]
First, as shown in FIG. 29 together with the inspection image of (A) above, as shown in (C), an edge is extracted by applying a Laplacian operator or the like to the image, and several pixels left and right are centered on the edge position. Edge region.
[0012]
Next, in order to remove noise and the like, as shown together with the edge regions in (C) in FIG. 30, these regions are expanded to several pixels on both sides to be in the state of (D). . Thereafter, a contraction process for returning to the same number of pixels as in (C) is performed, and this is used as a mask image. At that time, when the two edge regions are connected as shown in (D) of FIG. 30 as a result of the expansion processing as in the case of the image of width c in the image (A) of FIG. The part is not subject to contraction. FIG. 31E shows a state in which the mask image created as described above is superimposed on the inspection image of FIG.
[0013]
As can be seen from FIG. 31, when the mask image created using the conventional edge extraction method is applied to the inspection image so that the edge of the pattern is not detected, the width of d in FIG. In the case of the doctor muscle, the edge region of (C) shown in FIG. 29 completely includes the doctor muscle portion, and therefore the doctor muscle cannot be detected.
[0014]
The present invention has been made to solve the above-described conventional problems, and only when the flat portion of the image signal corresponding to the pattern or the like is equal to or less than a predetermined width from the image into which the printed pattern or the like is input. It is an object of the present invention to provide an edge region extraction method and apparatus capable of preventing the edge from being included in the extracted edge region.
[0015]
[Means for Solving the Problems]
The present invention relates to an edge region extraction method for extracting an edge region based on an edge in which a pixel value changes rapidly in at least one of a horizontal direction and a vertical direction of an input image. When the width is less than the predetermined value, the edges located at both ends of the flat part are not included in the edge region. Otherwise, the edges are included in the edge region. When extracting the edge region, as parameters, at least the number of pixels L for defining the position where the pixel value is compared and the edge for defining the maximum width of the flat portion that prevents the edge from being included in the edge region The step of setting the number of inter-pixels W is compared with the pixel values at positions separated by L pixels in the opposite directions centering on the target pixel, and the target pixel when the difference exceeds a predetermined threshold When the width of the pair of edge regions extracted for the step of extracting as a region and the pair of edge regions extracted for the flat portion having the width W between the edges is expanded in units of pixels, the two edge regions are not connected. A step of calculating the number N of expansion pixels, a step of calculating the number P of contraction pixels for contracting the edge region after expansion, and the widths of all the edge regions extracted from the input image on both sides Comprising the steps of inflating each element, the width of the inflated edge region, the steps of shrinking by P pixels in both sides, the By doing so, the above-mentioned problems are solved.
[0016]
The present invention also provides means for inputting an image relating to an object in an edge region extraction apparatus that extracts an edge region based on an edge whose pixel value changes rapidly in at least one of a horizontal direction and a vertical direction of an input image. When extracting the edge region from the input image, the number of pixels L for defining at least the position where the pixel value is compared and the maximum width of the flat part that prevents the edge from being included in the edge region are defined as parameters. And a pixel value at a position that is L pixels away from each other in the opposite direction with the pixel of interest as the center, and the difference exceeds a predetermined threshold value. The means for extracting the pixel of interest as an edge region and the width of the pair of edge regions extracted for the flat portion having the width W between the edges are expanded in units of pixels. In this case, means for calculating the number N of dilated pixels that do not connect the two edge areas and calculating the number P of dilated pixels for shrinking the edge area after dilation, and all edge areas extracted from the input image The edge region extraction method is reliably executed by providing means for expanding the width of each pixel by N pixels on both sides and means for contracting the width of the expanded edge region by P pixels on both sides thereof. It is something that can be done.
[0017]
That is, in the present invention, as shown in FIG. 1, image input is performed, edge region extraction processing is performed on the image, and an extracted image including the resulting edge region is output.
[0018]
The input image that is the subject of the present invention may be a binary image, a multi-value monochrome image, or a color image. The edge region extraction processing includes three types: (A) extracting only vertical edges, (B) extracting only horizontal edges, and (C) extracting both horizontal and vertical edges simultaneously. Further, the output image is a two-dimensional binary image, and the edge region and other regions are set, for example, the edge region is set to 1 (or ON), and the others are set to 0 (or OFF), or vice versa. Are distinguished and output.
[0019]
Further, the outline of the relationship between the edge region extracted by the present invention and the input image will be described by taking an example in which the image signal is composed of a one-dimensional pixel value (gradation value) in the horizontal direction as shown in FIG. Keep it.
[0020]
In FIG. 2A, a bright line segment is displayed in the vertical direction on a dark background. No In the case of an image, (B) in FIG. In any case, when the pixel corresponding to the position where the pixel value changes abruptly is an edge, and the flat part where the pixel value does not change much touches another flat part with different brightness, it exists at the boundary. To do.
[0021]
In the present invention, when the number of pixels between the two edges is larger than W, the edge region is extracted at a position including the edge inside as shown by the shaded area in FIG. As will be described later in detail, the edge region is extracted at a position that does not include the edge, or the edge region is not extracted at all.
[0022]
As a result, it is possible to clearly distinguish very thin lines such as doctor streaks from normal patterns including other lines, and create a mask image based on the extracted edge area and print it. For example, doctor muscles can be reliably detected.
[0023]
2 corresponds to extracting vertical edges as shown in FIG. 3A. If the processing direction is changed by 90 °, horizontal edges as shown in FIG. 3B are extracted. In addition, if the processing in the vertical direction and the horizontal direction are performed simultaneously, edge regions in both the horizontal and vertical directions can be extracted simultaneously.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0025]
FIG. 4 is a block diagram showing a schematic configuration of an embodiment according to the present invention.
[0026]
The edge region extraction apparatus of the present embodiment includes an input image storage unit 10 that stores an image in which a pattern of a printed matter is input by a CCD area sensor camera (not shown) having a visual field size of, for example, 30 mm × 30 mm, and the storage A parameter storage unit 12, an edge region extraction unit 14, an expansion / contraction count calculation unit 18, an edge expansion unit 20, an edge for enabling each process described below to be executed on the input image read from the unit 10 In addition to the contraction unit 24, the edge region extraction unit 14, the edge expansion unit 20, and the edge region storage unit 16 that stores the results processed by the edge contraction unit 24, the edge expansion storage unit 22, and the output image storage unit 26 are provided. Yes.
[0027]
The parameter storage unit 12 includes the number L of pixels for defining a position where pixel values are compared when an edge region is extracted from an input image read from the input image storage unit 10, a threshold T used for determination, an edge Is a means for setting, as a parameter, the number of pixels W between the edges for defining the maximum width of the flat portion excluding the edge region from the edge region, and the values of these parameters are input in advance using, for example, a keyboard. However, these parameters have the following restrictions. In the case of a doctor line, for example, W = 10 pixels.
[0028]
W ≧ 1 L ≧ W 0 ≦ T ≦ maximum pixel value
[0029]
Note that the threshold T does not need an equal sign when creating a mask image, but the equal sign is included here in consideration of the case where the present embodiment is applied to an inspection apparatus. In other words, when the inspection operation is actually stopped without actually stopping the inspection apparatus using, for example, a full-scale mask with an actual inspection apparatus, T = 0 is set and all edges are to be inspected regardless of the width of the flat portion. In the case where a pattern having no edge is inspected, T = maximum pixel value can be coped with.
[0030]
The edge region extraction unit 14 uses the parameters L and T read from the parameter storage unit 12 to extract the vertical edge region, as schematically shown in FIG. n, m P, also indicated by ●, which are L pixels away from each other in the opposite direction. nL, m And P n + L, m The pixel values are compared, and when the difference is equal to or greater than the threshold value T, the target pixel is determined as an edge region and extracted. The edge region extracted by the edge region extraction unit 14 is temporarily stored in the storage unit 16. Note that edge regions in the horizontal direction and both horizontal and vertical directions can be extracted based on the same calculation principle.
[0031]
The expansion / contraction frequency calculation unit 18 inputs the parameter W from the parameter storage unit 12 and expands the width of the pair of edge regions extracted for the flat portion having the inter-edge pixel number W in units of pixels. In this case, the number N of expansion pixels that the two edge regions do not contact is calculated as the number of expansions, and the number P of contraction pixels that contracts the edge region after expansion is calculated as the number of contractions.
[0032]
FIG. 6 conceptually shows the meaning of the number of expansions N calculated by the calculation unit 18, and as shown in this figure, the number N = N A + N B And N A = L-W, N B = (W-1) / 2.
[0033]
N above A As shown in FIG. 6B, the length (number of pixels) of the flat portion from the edge to the edge region extracted by the above method is the same for both the left and right edge regions in the figure. Here, only the left edge region will be described for convenience, but the number of pixels from the right end of the edge region to the right end of the flat portion of the high gradation value is L from the extraction principle shown in FIG. A = L−W.
[0034]
N above B Is a pixel that can leave at least one pixel at the center, as shown in FIG. 6A, in order to prevent the edge regions from coming into contact with each other when the number of pixels is expanded from both the left and right edge regions. Since it needs to be a number, it is set to (W-1) / 2. However, the number of pixels left in the center is not limited to 1, but may be, for example, 2. In this case, N B = (W-2) / 2. This N B If there are fractions, round down.
[0035]
In this way, by setting the number of times N, if the width between the edges is a streak that is equal to or less than the number of pixels W, even if N pixels are expanded to the left and right edge regions, both edge regions are absolutely In the case of a width exceeding W, it will be connected.
[0036]
Further, the calculation unit 18 also calculates the contracted pixel number P1 for contracting the edge region after expanding the N pixels. In this embodiment, P1 = N as shown in the following equation.
[0037]
P1 = N = L-W + (W-1) / 2 (1)
[0038]
The edge expansion unit 20 performs expansion processing on the edge region extracted image read from the edge region storage unit 16 to expand the width by the number of pixels of the number of expansions N obtained by the calculation unit 18. FIG. 7 schematically shows a one-dimensional signal when the expansion process is performed by expanding the edge region by one pixel in the horizontal direction (number of times N = 1).
[0039]
As shown in FIG. 7, ● is an edge region, and one expansion means that the width of the edge region is expanded by one pixel on both sides in the horizontal direction.
[0040]
The image data expanded by the edge expansion unit 20 is stored in the edge expansion storage unit 22, read out to the edge contraction unit 24, and the same number of P 1 (= N) pixels as expanded by the edge expansion unit 20. A contraction process is performed to reduce the size by the amount.
[0041]
FIG. 8 conceptually shows contraction processing for the edge region expanded in FIG. As shown in this figure, the contraction processing executed in the present embodiment means that the same number of N pixels as expanded is reduced from both sides of the expanded edge region. As a result of expansion, the edge regions on both sides are connected. Except for the case where it has fallen, it returns to the edge region before expansion. The contracted edge region image is stored in the output image storage unit 26.
[0042]
Next, the operation of this embodiment will be described.
[0043]
In the present embodiment, predetermined numerical values are input as the parameters L, W, and T, and edge region extraction, expansion, and contraction processing is performed on the input image according to the above-described principle, thereby performing inter-edge pixel processing. In the case of a flat portion (corresponds to a minute streak) having a number of W or less, an edge region can be extracted at a position not including an edge, and conversely when the number exceeds W, the edge region can be extracted into a region including an edge.
[0044]
When W = 3 and L = 5, the number of expansions N and the number of contractions P1 are both LW + (W−1) / 2 = 5−3 + (3-1) / 2 = The case 3 will be specifically described with reference to FIGS.
[0045]
FIG. 9 shows an example in which the edge of a line having a width (number of pixels between edges) of 2 is not an edge region. When the one-dimensional input image signal has a width of 2 pixels as shown by ● in FIG. 9A, the pixel value at a position 5 pixels away from the target pixel on the left and right according to the principle shown in FIG. , And when the pixel of interest when the value is equal to or greater than the threshold value T is processed as an edge region, an edge region consisting of two pixels indicated by shaded circles is extracted on both sides of the two ● The image shown in FIG. 9B is obtained.
[0046]
Next, expansion processing is performed on each of the two edge regions by expanding each pixel by 3 pixels (N = 3) in the left-right width direction to obtain the state shown in FIG. 9C. (D) is obtained as a final edge region extraction image.
[0047]
In this example, as can be seen from FIG. 9C, the edge regions after the expansion process indicated by the shaded double circles are mutually connected. In Since they are not connected, contraction processing is performed on both sides of each edge region. As a result, finally, as shown in FIG. 9D, an edge region is extracted at a position away from ● which hits the edges on both sides of the line.
[0048]
On the other hand, as shown in FIG. 10 corresponding to FIG. 9, the processing result in the case of the line of width 4 larger than W = 3 is 2 after the expansion processing shown in FIG. Two edge regions are connected to form one large edge region.
[0049]
In this way, when two edge regions are connected to one, the contraction process is not performed in that portion, so the edge region after contraction is the same as shown in FIG. It is continuous from the left edge of the left edge area extracted in FIG. (B) to the right edge of the right edge area, and corresponds to the line shown in FIG. Since the four black pixels are completely crushed and included, the edge is naturally included.
[0050]
Further, in the case of 17 pixels that are sufficiently wider than the line of the input image in FIG. 9A, as shown in FIG. 11 simplified from FIGS. 9 and 10, the stage of FIG. As shown in FIG. 3C, even if an edge region having a width of 2L (5 × 2 = 10) centered on the edge is extracted and N = 3 expansion processing is performed on this edge region. Since the left and right edge regions are not connected on the inner side, in the next contraction process, both edge regions are contracted at N = 3 on both sides, and as shown in FIG. Return to the edge area. In this case, the left and right edges are completely included in the corresponding left and right edge regions (shaded areas).
[0051]
When the edge region extraction method according to the present embodiment is applied to the input image (A) shown in FIG. 28, the edge region extraction, expansion, and contraction processes are shown in FIGS. 12 to 14 corresponding to FIGS. As shown in each of the results (F) to (H) together with the previous processing result, only in the case of the width of d that hits a thin line of the parameter W or less, the distance from the line is changed according to the width of the line. An edge region having a different width is extracted. As a result, as can be seen from FIG. 14, the edge is not included in the edge region after contraction only in the case of the line having the width d, and the edges of all other wide widths are included in the edge region. become.
[0052]
Therefore, according to the present embodiment, the edge region can be extracted based on the vertical edge in the image. However, when the width of the flat end portion sandwiched between the edges is equal to or less than a constant (= W), the edge is converted into the edge. Since it is possible not to extract as a region, it is possible to extract an edge region including an edge portion of a line having a thickness exceeding W or a normal pattern except for a thin line.
[0053]
Therefore, when performing defect inspection by image processing, by applying this embodiment to the input inspection image, it is possible to exclude only the edge of the pattern while leaving the flat portion and the thin streak-like defect. A mask image can be created.
[0054]
As shown in FIG. 15, the original image obtained by inputting the print pattern image includes a fine doctor stripe D together with a normal pattern composed of a thick ring R and a color pattern F. In this case, the final edge region image after shrinkage processing obtained by applying the method of the present invention to the original image is as shown in FIG. That is, as in the case of FIG. 14, the normal pattern portion is extracted as an edge region ER (indicated by a hatched portion) in the vicinity of the edge, but the portion of the doctor streak D is in the edge region ER. It will not be included. On the other hand, if a conventional general method is applied, the doctor stripes are included in the edge region as shown in FIG.
[0055]
Therefore, by using the edge extracted image of FIG. 16 as a mask image, it is possible to reliably detect a streak defect such as a doctor's streak of printing which is not normally detected.
[0056]
Next, a second embodiment according to the present invention will be described.
[0057]
This embodiment is substantially the same as the first embodiment except that the expansion / contraction count calculation unit 18 of FIG. 4 calculates the contraction count (number of pixels) P2 by the following equation (2). Are the same.
[0058]
Figure 0003816994
[0059]
In the present embodiment, as is clear from the above equation (2), the contraction is further reduced by (W + 1) / 2 pixels from the contraction pixel number P1 (= N) of the first embodiment shown in the equation (1). Let This will be described below with reference to FIGS.
[0060]
FIG. 18 schematically shows an image in which edge regions are extracted by performing the same processing as in FIGS. 9A to 9D on an input image composed of a flat portion having a width W or less. . That is, FIG. 18 corresponds to the state of FIG. 9D, in which the image expanded N times corresponding to FIG. 9C is contracted P1 (= N) times as in the first embodiment. To do.
[0061]
In the present embodiment, according to the first embodiment, the edge region ER extracted in the vicinity of the left and right of the flat portion having the width W or less shown in FIG. 18 is further contracted by (W + 1) / 2 pixels. As shown in FIG. 19, it is made to disappear.
[0062]
That is, the basis for calculating the number of additional contractions (W + 1) / 2 that is greater than in the first embodiment is that the maximum width of the edge region ER shown in FIG. 18 is W from the extraction principle shown in FIG. For this reason, W / 2 is sufficient to cause the pixel to contract and disappear from each side, but it is (W + 1) / 2 in consideration of the case where W is an odd number. However, in this case, the fraction is rounded down.
[0063]
According to the present embodiment described in detail above, edge regions extracted on both sides of a streak-like input image having a width of W or less can be eliminated as compared with the first embodiment.
[0064]
Therefore, when creating a mask image using the edge region extracted according to the present embodiment, FIG. 20 corresponding to FIG. 14 (H) showing the operation of the first embodiment, and FIG. 16 corresponding to FIG. As shown in FIG. 21, since the edge regions can be prevented from being extracted on both sides of the doctor muscle D, it is possible to increase the inspection reliability in the image to be inspected and to increase the reliability of the inspection. Become.
[0065]
Next, a third embodiment according to the present invention will be described.
[0066]
In the present embodiment, the number of contractions (number of pixels) P3 is calculated by the following equation (3) by the expansion / contraction count calculation unit 18 of FIG. Do Except as described above, the second embodiment is substantially the same as the first embodiment.
[0067]
Figure 0003816994
[0068]
In this embodiment, as is clear from the above expression (3), the contraction is further reduced by (L-1) pixels than the contraction pixel number P1 (= N) of the first embodiment shown in the expression (1). Let This will be described below with reference to FIGS.
[0069]
FIG. 22A schematically shows an image obtained by extracting the edge region ER by performing the same processing as in FIGS. 9A to 9D on the input image formed of a flat portion having a width W or less. This is the same as FIG. FIG. 22B corresponds to FIG. 22D in which the input image having the flat portion width larger than W is subjected to substantially the same processing as in FIGS. 10A to 10D. 22 (C) corresponds to FIG. 11 (D) in which an input image having a flat portion whose width is sufficiently larger than W is subjected to substantially the same processing as in FIGS. 11 (A) to 11 (D).
[0070]
In the present embodiment, as shown in the equation (3) for each edge region ER in FIGS. 22A to 22D that corresponds to the state in which P1 contraction is performed in the first embodiment. Further, by performing contraction for (L-1) pixels, the states shown in FIGS. 23A to 23C are obtained. The number of additional contractions (L-1) employed in the present embodiment corresponds to the number of contracted pixels that makes the edge region as small as possible with respect to the edge of the flat portion.
[0071]
As in this embodiment, when shrinking extra (L-1) times than P1 in the first embodiment, as in the case of the second embodiment, the flat portion having a width of W or less is used. Since W ≦ L, the edge region ER can be eliminated as shown in FIG. Also, as shown in FIG. 22B, when the width of the flat portion exceeds W, as shown in FIG. 23B, the left and right ends of the edge region ER connected to one as a result of the expansion processing, respectively. Can be shrunk to the first pixel from the edge, so that the edge region can be made the smallest size that can cover the edge. Further, as shown in FIG. 22C, when the width of the flat portion is sufficiently larger than W, the edge region is extracted only in the portion of one pixel before and after the edge as shown in FIG. Can be.
[0072]
Generally, when a mask image is created using the extracted edge region, the edge region (mask portion) means a region that is excluded from the inspection target in the image to be inspected. In order to increase the reliability, it is ideal that the edge region is as narrow as possible (its area) after the edges in the image to be inspected are properly masked.
[0073]
Therefore, the present embodiment is most suitable as a general edge extraction method, and an ideal inspection mask image can be created by using the edge region extracted by the present embodiment.
[0074]
As a result, according to the present embodiment, as shown in FIG. 24 and FIG. 25 corresponding to FIG. 20 and FIG. 21 in the case of the second embodiment, As in the second embodiment, an edge region is not extracted, and an edge region ER that is narrower than that in the second embodiment can be extracted for a normal pattern having a width W or more.
[0075]
FIG. 26 is a block diagram showing a schematic configuration of an edge region extraction apparatus according to the fourth embodiment of the present invention.
[0076]
The present embodiment is applied when the input image is in color, and one edge region extraction unit 14 and edge region storage unit 16 shown in FIG. 4 are input from the input image storage unit 10. , G, and B correspond to the three edge region extraction units indicated by 14A to 14C and the three edge region storage units indicated by 16A to 16C that store the extracted images. The third embodiment is substantially the same as the first to third embodiments except that an edge synthesis unit 28 for synthesizing each of R, G, and B extracted images input from 16A to 16C is added.
[0077]
According to this embodiment, edge extraction processing can be performed for each of the R, G, and B images. Therefore, even when the target input image is a color, the same as in the first to third embodiments. The edge region can be extracted.
[0078]
FIG. 27 is a block diagram showing a schematic configuration of an edge region extraction apparatus according to the fifth embodiment of the present invention.
[0079]
The present embodiment is applied to a color image in the same manner as the fourth embodiment. Here, the edge area extraction units 14A to 14C and the edge area storage units 16A to 16C are combined with 20A to 20C and 22A to 22C. 24A-24C, 26A-26C, as indicated by the reference numerals, the edge expansion unit, the edge expansion storage unit, the edge contraction unit, and the output image storage unit are all added to correspond to the R, G, and B images. In addition, this embodiment is substantially the same as the fourth embodiment except that an edge synthesis unit 28 for synthesizing the finally obtained contracted image is added.
[0080]
According to the present embodiment, since all image processing can be performed for each R, G, B image, an edge region can be extracted with higher accuracy than in the fourth embodiment.
[0081]
Although the present invention has been specifically described above, the present invention is not limited to that shown in the above embodiment, and various modifications can be made without departing from the scope of the invention.
[0082]
For example, in the above-described embodiment, the case where W = 3 and L = 5 are shown as parameters. However, the present invention is not limited to this, and an appropriate parameter can be set for each target image.
[0083]
In the above embodiment, the vertical edge has been described. Needless to say, the horizontal edge or both edges may be used.
[0084]
【The invention's effect】
As described above, according to the present invention, for example, from an input image such as an inspection image obtained by inputting a print pattern, an edge that does not include the edge only when the flat portion of the image signal is a predetermined width or less. Regions can be extracted.
[Brief description of the drawings]
FIG. 1 is a flowchart showing an outline of a processing procedure in the present invention.
FIG. 2 is a diagram conceptually showing the relationship between an image signal and an edge region.
FIG. 3 is an explanatory diagram schematically showing vertical and horizontal edges.
FIG. 4 is a block diagram showing a schematic configuration of the edge region extraction apparatus according to the first embodiment of the present invention.
FIG. 5 is an explanatory diagram schematically showing the principle of edge region extraction.
FIG. 6 is an explanatory diagram showing a method for calculating the number of expansions / contractions
FIG. 7 is an explanatory view showing the principle of edge region expansion processing;
FIG. 8 is an explanatory diagram showing the principle of edge area shrinkage processing;
FIG. 9 is an explanatory diagram showing an edge region extraction processing procedure for a fine line;
FIG. 10 is an explanatory diagram showing an edge area extraction processing procedure for a middle line;
FIG. 11 is an explanatory diagram showing an edge area extraction processing procedure for a thick line;
FIG. 12 is an explanatory diagram showing an input image and an edge region extraction image according to the present invention;
FIG. 13 is an explanatory diagram showing the extracted image and its expansion processing image.
FIG. 14 is an explanatory diagram showing the expansion processing image and its contraction processing image.
FIG. 15 is an explanatory diagram schematically showing an original image obtained by inputting a print pattern as an image.
FIG. 16 is an explanatory diagram conceptually showing an edge region extracted from the original image according to the present invention.
FIG. 17 is an explanatory diagram conceptually showing an edge region extracted from the original image by a conventional method.
FIG. 18 is an explanatory diagram showing a state after the P1 contraction of an edge region extracted for a flat portion having a width W or less.
FIG. 19 is an explanatory diagram showing the operation of the second embodiment.
FIG. 20 is an explanatory diagram showing effects of the second embodiment.
FIG. 21 is another explanatory diagram showing the effect of the second embodiment.
FIG. 22 is an explanatory diagram illustrating a state after the P1 contraction of the edge region extracted for flat portions having different widths;
FIG. 23 is an explanatory diagram showing the operation of the third embodiment.
FIG. 24 is an explanatory diagram showing the effect of the third embodiment.
FIG. 25 is another explanatory diagram showing the effect of the third embodiment.
FIG. 26 is a block diagram showing a schematic configuration of an edge region extraction apparatus according to a fourth embodiment of the present invention.
FIG. 27 is a block diagram showing a schematic configuration of an edge region extraction apparatus according to a fifth embodiment of the present invention.
FIG. 28 is an explanatory diagram schematically showing an example of an input image and its one-dimensional image input signal.
FIG. 29 is an explanatory diagram showing the input image and an edge region extraction image according to a conventional method.
FIG. 30 is an explanatory diagram showing the extracted image and its expanded image.
FIG. 31 is an explanatory diagram showing the expansion processing image and the contraction processing image thereof.
[Explanation of symbols]
10: Input image storage unit
12 ... Parameter storage unit
14. Edge region extraction unit
16. Edge region storage unit
18 ... Expansion / contraction count calculation unit
20 ... Edge expansion part
22. Edge expansion storage unit
24 ... Edge shrinkage
26. Output image storage unit
D ... Doctor muscle
ER ... Edge area

Claims (7)

入力画像の水平方向及び垂直方向の少なくとも一方について、画素値が急激に変化するエッジに基づいてエッジ領域を抽出するエッジ領域抽出方法において、
画素値の変化が無いか又は小さい平坦部の幅が所定値以下の場合には、該平坦部の両端に位置するエッジが、エッジ領域に含まれないようにし、
それ以外の場合は、エッジがエッジ領域に含まれるようにエッジ領域を抽出する際に、
パラメータとして、少なくとも画素値を比較する位置を規定するための画素数Lと、エッジがエッジ領域に含まれないようにする平坦部の最大幅を規定するためのエッジ間画素数Wとを設定するステップと、
注目画素を中心としてそれぞれ反対方向にL画素離れた位置の画素値を比較し、その差が、所定の閾値を超えている場合の該注目画素をエッジ領域として抽出するステップと、
前記エッジ間画素数Wの幅の平坦部について抽出された一対のエッジ領域の幅を、それぞれ画素単位で膨張させた場合に、該両エッジ領域が繋ることのない膨張画素数Nを計算するステップと、
膨張後のエッジ領域を収縮させる収縮画素数Pを計算するステップと、
入力画像から抽出された全てのエッジ領域の幅を、その両側でN画素ずつ膨張させるステップと、
膨張させたエッジ領域の幅を、その両側でP画素ずつ収縮させるステップと、を含むことを特徴とするエッジ領域抽出方法。
In an edge region extraction method for extracting an edge region based on an edge in which a pixel value rapidly changes for at least one of a horizontal direction and a vertical direction of an input image,
When there is no change in the pixel value or the width of the small flat portion is equal to or smaller than a predetermined value, the edges located at both ends of the flat portion are not included in the edge region,
Otherwise, when extracting the edge region so that the edge is included in the edge region,
As parameters, the number of pixels L for defining at least the position where pixel values are compared and the number of pixels between edges W for defining the maximum width of the flat portion that prevents the edge from being included in the edge region are set. Steps,
Comparing pixel values at positions separated by L pixels in opposite directions around the pixel of interest, and extracting the pixel of interest when the difference exceeds a predetermined threshold as an edge region;
When the width of the pair of edge regions extracted for the flat portion having the width of the inter-edge pixel number W is expanded in units of pixels, the expanded pixel number N that does not connect the two edge regions is calculated. Steps,
Calculating a contraction pixel number P for contracting the edge region after expansion;
Expanding the width of all edge regions extracted from the input image by N pixels on both sides thereof;
Shrinking the width of the expanded edge region by P pixels on both sides of the expanded edge region.
請求項において、
前記収縮画素数Pを、前記膨張画素数Nと等しくすることを特徴とするエッジ領域抽出方法。
In claim 1 ,
An edge area extracting method, wherein the contraction pixel number P is made equal to the expansion pixel number N.
請求項において、
前記収縮画素数Pを、前記膨張画素数Nと(W+1)/2の和にすることを特徴とするエッジ領域抽出方法。
In claim 1 ,
The edge area extraction method, wherein the contraction pixel number P is the sum of the expansion pixel number N and (W + 1) / 2.
請求項において、
前記収縮画素数Pを、前記膨張画素数Nと(L−1)の和にすることを特徴とするエッジ領域抽出方法。
In claim 1 ,
The edge area extraction method, wherein the contraction pixel number P is the sum of the expansion pixel number N and (L-1).
入力画像の水平方向及び垂直方向の少なくとも一方について、画素値が急激に変化するエッジに基づいてエッジ領域を抽出するエッジ領域抽出装置において、
対象物に関する画像を入力する手段と、
入力画像からエッジ領域を抽出する際に、パラメータとして、少なくとも画素値を比較する位置を規定するための画素数Lと、エッジがエッジ領域に含まれないようにする平坦部の最大幅を規定するためのエッジ間画素数Wとを設定する手段と、
注目画素を中心としてそれぞれ反対方向にL画素離れた位置の画素値を比較し、その差が、所定の閾値を超えている場合の該注目画素をエッジ領域として抽出する手段と、
前記エッジ間画素数Wの幅の平坦部について抽出された一対のエッジ領域の幅を、それぞれ画素単位で膨張させた場合に、該両エッジ領域が繋ることのない膨張画素数Nを計算すると共に、膨張後のエッジ領域を収縮させる収縮画素数Pを計算する手段と、
入力画像から抽出された全てのエッジ領域の幅を、その両側でN画素ずつ膨張させる手段と、
膨張させたエッジ領域の幅を、その両側でP画素ずつ収縮させる手段と、を備えたこと
を特徴とするエッジ領域抽出装置。
In an edge region extraction device that extracts an edge region based on an edge in which a pixel value rapidly changes for at least one of a horizontal direction and a vertical direction of an input image,
Means for inputting an image relating to the object;
When extracting the edge region from the input image, the number of pixels L for defining at least the position where the pixel value is compared and the maximum width of the flat part that prevents the edge from being included in the edge region are defined as parameters. Means for setting the inter-edge pixel count W for
Means for comparing pixel values at positions separated by L pixels in opposite directions around the target pixel, and extracting the target pixel as an edge region when the difference exceeds a predetermined threshold;
When the width of the pair of edge regions extracted for the flat portion having the width of the inter-edge pixel number W is expanded in units of pixels, the expanded pixel number N that does not connect the two edge regions is calculated. And means for calculating the contraction pixel number P for contracting the edge region after expansion,
Means for expanding the width of all edge regions extracted from the input image by N pixels on both sides thereof;
Means for contracting the width of the expanded edge region by P pixels on both sides of the expanded edge region.
請求項において、
入力画像がカラー画像である場合、エッジ領域を抽出する手段がR、G、Bの各画像毎に設けられ、且つ、
R、G、Bの各画像毎に抽出されたエッジ領域を合成する手段が設けられていることを特徴とするエッジ領域抽出装置。
In claim 5 ,
When the input image is a color image, means for extracting an edge region is provided for each of the R, G, and B images, and
An edge region extraction apparatus comprising means for combining edge regions extracted for each of R, G, and B images.
請求項において、
入力画像がカラー画像である場合、エッジ領域を抽出する手段、エッジ領域の幅を膨張させる手段、及び、膨張させたエッジ領域を収縮させる手段が、それぞれR、G、Bの各画像毎に設けられ、且つ、
R、G、Bの各画像毎に、収縮されたエッジ領域を合成する手段が設けられていることを特徴とするエッジ領域抽出装置。
In claim 5 ,
When the input image is a color image, means for extracting an edge area, means for expanding the width of the edge area, and means for contracting the expanded edge area are provided for each of the R, G, and B images. And
An edge area extracting apparatus characterized in that means for synthesizing contracted edge areas is provided for each of R, G, and B images.
JP26837596A 1996-10-09 1996-10-09 Edge region extraction method and apparatus Expired - Fee Related JP3816994B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP26837596A JP3816994B2 (en) 1996-10-09 1996-10-09 Edge region extraction method and apparatus
PCT/JP1997/003611 WO1998015919A1 (en) 1996-10-09 1997-10-08 Method and apparatus for detecting stripe defects of printed matter
US09/077,553 US6366358B1 (en) 1996-10-09 1997-10-08 Method and apparatus for detecting stripe defects of printed matter
EP97943155A EP0872810A4 (en) 1996-10-09 1997-10-08 METHOD AND APPARATUS FOR DETECTING STRIPE DEFECTS On PRINTED MATTER

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26837596A JP3816994B2 (en) 1996-10-09 1996-10-09 Edge region extraction method and apparatus

Publications (2)

Publication Number Publication Date
JPH10116344A JPH10116344A (en) 1998-05-06
JP3816994B2 true JP3816994B2 (en) 2006-08-30

Family

ID=17457628

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26837596A Expired - Fee Related JP3816994B2 (en) 1996-10-09 1996-10-09 Edge region extraction method and apparatus

Country Status (1)

Country Link
JP (1) JP3816994B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4431923B2 (en) 2000-07-13 2010-03-17 ソニー株式会社 Video signal recording / reproducing apparatus and method, and recording medium
JP4989768B2 (en) 2011-02-24 2012-08-01 任天堂株式会社 Image processing program, image processing apparatus, image processing system, and image processing method
JP2011134343A (en) 2011-02-24 2011-07-07 Nintendo Co Ltd Image processing program, image processing apparatus, image processing system, and image processing method
JP5026604B2 (en) 2011-02-24 2012-09-12 任天堂株式会社 Image recognition program, image recognition apparatus, image recognition system, and image recognition method
JP5178860B2 (en) 2011-02-24 2013-04-10 任天堂株式会社 Image recognition program, image recognition apparatus, image recognition system, and image recognition method
JP5016723B2 (en) 2011-02-24 2012-09-05 任天堂株式会社 Image recognition program, image recognition apparatus, image recognition system, and image recognition method
JP4967065B2 (en) 2011-02-24 2012-07-04 任天堂株式会社 Image processing program, image processing apparatus, image processing system, and image processing method
JP6465765B2 (en) * 2015-07-01 2019-02-06 キヤノン株式会社 Image processing apparatus and image processing method
JP7248943B2 (en) * 2018-09-28 2023-03-30 ブラザー工業株式会社 Image processing device and computer program

Also Published As

Publication number Publication date
JPH10116344A (en) 1998-05-06

Similar Documents

Publication Publication Date Title
WO1998015919A1 (en) Method and apparatus for detecting stripe defects of printed matter
CN110648349A (en) Weld defect segmentation method based on background subtraction and connected region algorithm
JP3816994B2 (en) Edge region extraction method and apparatus
JPH0957201A (en) Specific color region extracting system and specific color region removing system
JP2000184202A (en) Image processing system for removing pattern arranged in vertical direction on image generated by scanning
WO2012082132A1 (en) Method and system for determining void pantograph settings
JPH09185676A (en) Ruled line elimination method
JP2011076204A (en) Method and apparatus for inspecting printed matter
JP3902823B2 (en) Streak defect inspection method and apparatus
JP4249966B2 (en) Printed wiring board inspection method and inspection apparatus
JP4507523B2 (en) Printed matter inspection apparatus and printed matter inspection program
CN116402771A (en) Defect detection method and device and model training method and device
JP3253752B2 (en) Pattern evaluation method
JP3207931B2 (en) Image inspection equipment
JPH0915168A (en) Inspecting equipment of printed matter
JP5157575B2 (en) Defect detection method
JP2002008029A (en) Image inspection device
JP3835898B2 (en) Binary image creation method and apparatus, and streak defect inspection method and apparatus
JPH09131951A (en) Printing quality judging device
JPH1148457A (en) Method and apparatus for inspecting stripe like defect
JPH0624014B2 (en) Gray image processing method
JP3998758B2 (en) Image inspection method and apparatus
JP2004246110A (en) Plate inspection apparatus, printing system, method for inspecting printed data on plate, and program
JP2000182114A (en) Watermark inspecting device
JP2004276476A (en) Printed matter inspecting device, printed matter inspecting method, printed matter inspecting processing program and recording medium having program thereon

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060314

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060511

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: 20060606

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060609

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090616

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100616

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110616

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110616

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120616

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120616

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130616

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees