JP3597387B2 - Image defect detection method, image defect repair method, image defect detection device, and computer-readable recording medium - Google Patents

Image defect detection method, image defect repair method, image defect detection device, and computer-readable recording medium Download PDF

Info

Publication number
JP3597387B2
JP3597387B2 JP18069198A JP18069198A JP3597387B2 JP 3597387 B2 JP3597387 B2 JP 3597387B2 JP 18069198 A JP18069198 A JP 18069198A JP 18069198 A JP18069198 A JP 18069198A JP 3597387 B2 JP3597387 B2 JP 3597387B2
Authority
JP
Japan
Prior art keywords
image
defect
display
line break
thinning
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
JP18069198A
Other languages
Japanese (ja)
Other versions
JP2000020717A (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.)
Screen Holdings Co Ltd
Dainippon Screen Manufacturing Co Ltd
Original Assignee
Screen Holdings Co Ltd
Dainippon Screen Manufacturing 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 Screen Holdings Co Ltd, Dainippon Screen Manufacturing Co Ltd filed Critical Screen Holdings Co Ltd
Priority to JP18069198A priority Critical patent/JP3597387B2/en
Publication of JP2000020717A publication Critical patent/JP2000020717A/en
Application granted granted Critical
Publication of JP3597387B2 publication Critical patent/JP3597387B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Preparing Plates And Mask In Photomechanical Process (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、画像中の線切れ欠陥を検出して修復する技術に関する。
【0002】
【従来の技術】
画像において線等により囲まれた閉領域を塗りつぶす(塗り分ける)際に線切れが発生していると、線切れ箇所から色が漏れ出して意図しない領域まで塗りつぶし処理が及んでしまう。例えば、版下用の画像を準備する際に原画をスキャナから読み取ると、細い線がかすれたりゴミの影響を受けて線切れが生じる場合がある。このような線切れ欠陥による意図しない塗りつぶし処理を防止するために、従来より予めオペレータが塗りつぶす閉領域を拡大して表示しながら線切れ箇所を見つけだして修復する作業が行われている。
【0003】
一方、特開平4−153889号公報に示される技術のように線切れ箇所の検出を自動的に行う方法についても研究が進められている。特開平4−153889号公報に示される技術では、検査対象である線画に細線化処理を施して端点を抽出し、端点近傍にて線が延びる方向の所定範囲内で他の端点を探し、他の端点が検出された場合には端点間の隙間を線切れ欠陥として検出する。
【0004】
また、線切れ欠陥が検出された場合には元の線画に線を太らせる処理を施し、さらに線を細らせる処理を行って線切れ欠陥を修復することも考えられる。
【0005】
【発明が解決しようとする課題】
ところで、特開平4−153889号公報に示される技術では線切れ欠陥として検出する端点間の距離を予め設定する必要がある。このような設定は画像の種類により変更する必要があり、効率よく行うためにはAI的な技術が必要となる。しかし、画像の種類に応じたAI的な設定を行ったとしてもあらゆる画像の線切れ欠陥の検出には対応できない。その結果、オペレータは線切れ欠陥を発見するとその都度、欠陥部分を拡大して修復しなければならない。
【0006】
また、修復処理においても同様の問題が生じている。すなわち、線画中の線に対して太らせ処理を行う場合には太らせ幅を設定する必要があるが、適切な太らせ幅は画像の種類によって様々であり、AI的な処理を行ったとしてもあらゆる画像に適した太らせ処理を行うのは不可能である。また、線切れ欠陥の修復に適した太らせ幅が設定できたとしても、太らせた線同士が接触してしまって新たな欠陥が生じてしまう可能性もある。したがって、オペレータは不具合を発見する度に拡大して修復しなければならない。
【0007】
この発明は上記課題に鑑みなされたものであり、塗りつぶし作業等において必要な線切れ欠陥のみを検出し、オペレータの作業負担を軽減することを目的としている。
【0008】
【課題を解決するための手段】
請求項1の発明は、対象画像中の線切れ欠陥を検出する画像欠陥検出方法であって、(a)表示部における表示用に前記対象画像を間引いて表示用画像を生成する工程と、(b)前記対象画像中の線切れ欠陥の検出対象となる色の部分である有意部以外の部分である無意部の連結性を保存しつつ前記対象画像から参照用画像を生成する工程と、(c)前記表示用画像と前記参照用画像とを比較して前記対象画像中の有意部における線切れ欠陥を検出する工程とを有する。
【0009】
請求項2の発明は、請求項1に記載の画像欠陥検出方法であって、前記工程(b)が、無意部の連結性を保存しつつ前記対象画像を間引く工程を有する。
【0010】
請求項3の発明は、請求項1または2に記載の画像欠陥検出方法であって、前記工程(b)が、前記参照用画像における無意部に細線化処理を施す工程を有し、前記工程(c)が、前記表示用画像中の有意部と前記参照用画像中の細線化部との双方に対応する前記対象画像中の位置を線切れ欠陥の存在位置として求める工程を有する。
【0011】
請求項4の発明は、請求項1または2に記載の画像欠陥検出方法であって、前記工程(a)が、前記表示用画像の有意部に細線化処理を施す工程を有し、前記工程(b)が、前記参照用画像の有意部にエッジ抽出処理を施す工程を有し、前記工程(c)が、前記表示用画像中の細線化部と前記参照用画像中のエッジ部との双方に対応する前記対象画像中の位置を線切れ欠陥の存在位置として求める工程を有する。
【0012】
請求項5の発明は、請求項1ないし4のいずれかに記載の画像欠陥検出方法により検出された線切れ欠陥を修復する画像欠陥修復方法であって、前記対象画像において検出された線切れ欠陥の存在位置の近傍の画像を検出領域画像として抽出する工程と、前記検出領域画像における有意部にラベリングを施す工程と、前記検出領域画像を表示用に間引くことにより、間引きによる前記有意部の連結関係を求める工程と、前記間引きにより連結する前記検出領域画像中の有意部間を連結する工程とを有する。
【0013】
請求項6の発明は、対象画像中の線切れ欠陥を検出する画像欠陥検出装置であって、表示部における表示用に前記対象画像を間引いて表示用画像を生成する手段と、前記対象画像中の線切れ欠陥の検出対象となる色の部分である有意部以外の部分である無意部の連結性を保存しつつ前記対象画像から参照用画像を生成する手段と、前記表示用画像と前記参照用画像とを比較して前記対象画像中の有意部における線切れ欠陥を検出する手段とを備える。
【0014】
請求項7の発明は、コンピュータによって対象画像中の線切れ欠陥を検出するためのプログラムを記録したコンピュータ読み取り可能な記録媒体であって、前記プログラムはコンピュータに、表示部における表示用に前記対象画像を間引いて表示用画像を生成する工程と、前記対象画像中の線切れ欠陥の検出対象となる色の部分である有意部以外の部分である無意部の連結性を保存しつつ前記対象画像から参照用画像を生成する工程と、前記表示用画像と前記参照用画像とを比較して前記対象画像中の有意部における線切れ欠陥を検出する工程とを少なくとも実行させる。
【0015】
【発明の実施の形態】
<1. 発明の原理>
図1はこの発明における線切れ欠陥の検出の原理を示す図である。図1において符号10は線切れ欠陥の検出対象である対象画像を示している。対象画像10において符号11を付す平行斜線を施した部分は線切れ欠陥の検出対象となる色の部分(以下、「有意部」という。)を示しており、符号12を付すその他の部分は背景となる部分(以下、「無意部」という。)を示している。例えば、白地に黒い線で図柄が描かれた線画では、黒い線の部分が有意部となり、白地の部分が無意部となる。
【0016】
また、符号13は有意部11の線切れ欠陥を示している。したがって、図1に示す対象画像10に対して略矩形の有意部11により囲まれる領域の塗りつぶし処理を行うと線切れ欠陥13から塗りつぶし処理が漏れ出して略矩形の有意部11の外部にまで塗りつぶし処理が及ぶこととなる。
【0017】
符号20は対象画像10をディスプレイ等の表示部に表示するために間引いた表示用画像を示している。対象画像10が印刷用等の精細な画像である場合には対象画像10の全体を表示することができないため、対象画像10を表示用に間引いた上で表示が行われる。例えば、対象画像10中の2×2画素を1つの画素(例えば、左上隅の1画素)に置き換えて表示用画像20が生成される。オペレータによる塗りつぶし処理等の指示はこの表示用画像20に基づいて行われる。
【0018】
図1に示す表示用画像20において平行斜線を施した部分は対象画像10中の有意部11に対応する有意部21を示しており、その他の部分は対象画像10中の無意部12に対応する無意部22を示している。図1に示すように表示用の間引き処理は単純な間引き処理であることから、僅かな間隙である線切れ欠陥13が間引き処理により消滅し、表示用画像20には現れない。すなわち、表示用画像20からではオペレータは線切れ欠陥13を認識することができない。
【0019】
そこで、この発明は表示用画像20と対象画像10(あるいは、対象画像10から生成される後述の参照用画像30)とを比較してオペレータが把握することができない線切れ欠陥のみを検出するようにしている。これにより、必要な線切れ欠陥のみを検出してオペレータの作業負担の軽減を実現している。
【0020】
以上のようにこの発明は対象画像10と表示用画像20とを比較することを基本としているが、対象画像10が印刷用等の高精細な画像である場合には比較を合理的かつ適切に行うために対象画像10中の線切れ欠陥13を保存した状態で間引き処理を行った参照用画像30を準備することが好ましい。
【0021】
図1において符号30は対象画像10中の線切れ欠陥13を保存した状態で間引き処理を行った参照用画像を示している。線切れ欠陥13を保存した状態で間引き処理を行うには無意部12の連結性を保存した状態で間引き処理を行うことにより実現される。ここで、「連結性を保存した状態で間引き処理を行う」とは、連結性が保存される領域が間引き処理により分割されないことをいい、2つの領域が接続してしまうか否かを問わない間引き処理をいう。以下の説明においても同様の意味で用いる。
【0022】
連結性が保存される間引き処理の具体例としては、例えば、無意部の連結性を保持するには2×2画素中において無意部の画素が1つでも存在する場合にはこの2×2画素を無意部を示す1画素に置換する間引き処理がある。これにより、無意部が分割されることなく間引き処理を行うことができる。
【0023】
図1の参照用画像30において符号31は対象画像10中の有意部11に対応する有意部を示し、符号32は対象画像10中の無意部12に対応する無意部を示し、符号33は対象画像10中の線切れ欠陥13に対応する線切れ欠陥を示している。
【0024】
対象画像10から表示用画像20および参照用画像30とが生成されると、これらの画像が比較されて相違箇所が線切れ欠陥の検出位置として求められる。すなわち、表示用画像20のある位置が有意部21に含まれるがこれに対応する参照用画像30の位置が無意部32に含まれる場合にはこの位置が線切れ欠陥の検出位置として求められる。
【0025】
例えば、参照用画像30が表示用画像20と同一のサイズとなるように求められている場合には、表示用画像20と参照用画像30との排他的論理和画像40が求められ、排他的論理和画像40中に両画像の相違として示される黒色部の位置が欠陥検出位置41となる。
【0026】
なお、既述のように無意部の連結性を保存した間引き処理は表示用画像20と参照用画像30との比較を容易に行うための処理であって、表示用画像20の間引き率(縮小率)を参照することにより、表示用画像20の各画素が対象画像10のどの位置に対応するかを求めることができるので、対象画像10をそのまま参照用画像30として利用することも可能である。
【0027】
<2. 装置の構成>
図2はこの発明に係る線切れ欠陥の検出および修復を行う装置100の構成を示す図である。図2に示すように装置100は通常のコンピュータ・システム(以下、「コンピュータ」という。)を利用する構成となっており、各種演算命令を実行するCPU101、欠陥検出対象である対象画像を格納する専用の画像データ格納メモリ102、データやプログラムの格納領域となるメモリ103、記録媒体141からプログラム等を読み出す読取部104、オペレータからの入力を受け付けるキーボードやマウス等の入力部105、オペレータに画像等を表示する表示部106、表示部106の表示動作を制御するインターフェイスである表示制御部161、表示部106に表示される画像を記憶する表示用メモリ107、および対象画像をランレングス等の形式の画像データ181として格納する固定ディスク108を適宜インターフェイス(I/F)を介する等してバスライン100Bに接続するようにして有している。
【0028】
メモリ103はさらに、欠陥位置を線切れデータとして格納する線切れデータ格納メモリ131、画像に対する演算領域となる画像演算用メモリ132、および装置100の動作内容であるプログラム134を格納するプログラム格納メモリ133に分割されている。
【0029】
プログラム134は予め記録媒体141から読取部104を介して一度固定ディスク108に格納された後、必要に応じてプログラム格納メモリ133に読み込まれるようになっている。なお、プログラム134は別途設けられた通信装置等を介してコンピュータに取り込まれるようになっていてもよい。
【0030】
図3は動作の面から捉えた装置100の構成を示すブロック図である。図3では図2に示す構成と同様の構成については同様の符号を付している。これらの構成のうち、表示部106における画像の表示内容を生成する画像表示部135、線切れ検出を行う線切れ検出部136、欠陥の検出位置に指示図形を表示させる線切れ指示図形表示部137、および線切れ欠陥の修復を行う線切れ修復部138はCPU101がプログラム134に従って演算命令を実行することにより実現される動作示す構成であり、これらの構成は専用の電気的回路により実現されていてもよい。
【0031】
<3. 全体動作>
次に、図3に示す構成を参照しながら装置100の全体動作の概要について説明する。
【0032】
図4および図5は装置100の全体動作の流れを示す流れ図である。装置100では、まず前提動作として固定ディスク108内の画像データ181を画像データ格納メモリ102に読み込む(図4:ステップS11)。これにより、画像データ格納メモリ102内に画像データ181が展開されて高精細な多色の対象画像が準備される。なお、画像データ181の展開は必要に応じて随時行われるようになっていてもよい。
【0033】
対象画像が準備されると次に対象画像を表示部106の表示用に画像表示部135が間引いて表示用多色画像を生成する(ステップS12)。表示用の間引きとしては既述のように2×2画素をいずれかの1画素で単純に置き換える処理が行われる。そして、生成された表示用多色画像は表示制御部161を介して表示部106に表示されるとともに表示用メモリ107に格納される(ステップS13)。
【0034】
表示用多色画像が生成されると装置100はオペレータからの線切れ欠陥の検出領域および線切れ欠陥の対象色の入力を受け付ける(ステップS14)。線切れ欠陥の対象色とは、例えば、多色の画像に対して赤色の部分を枠として塗りつぶし処理を行う場合において赤色を対象色として指定すると、赤色の部分が欠陥検出対象である有意部とされ、その他の色の部分が欠陥検出対象でない無意部とされる。対象色の入力は、コンピュータが表示部106に画像に用いられているカラーパレットを表示し、オペレータがマウス等の入力部105を介してカラーパレットから対象色を選択指示することにより行われる。
【0035】
なお、装置100の後述する処理では原則として有意部の画素値が1(黒色)であり、無意部の画素値が0(白色)である2値画像として対象色の指定を受けた画像を取り扱う。
【0036】
オペレータからの入力を受け付けると対象色である有意部の線切れ欠陥の検出が行われる(ステップS15)。線切れ欠陥の検出は画像データ格納メモリ102中の対象画像および表示用メモリ107中の表示用多色画像に基づいて画像演算用メモリ132および線切れ検出部136により行われ、さらに、線切れ欠陥の位置は線切れデータ格納メモリ131に記憶されるが、動作の詳細については後述する。
【0037】
線切れ欠陥が検出された場合には線切れ指示図形表示部137が表示部106に表示されている画像に重ねて線切れ欠陥の位置を示す図形を表示する(ステップS16、S17)。線切れ指示図形としては、「線切れ」という文字と欠陥位置とを引き出し線により結ぶ図形であってもよく、単に「×」印が欠陥位置に表示されるようになっていてもよい。線切れ欠陥が検出されなかった場合には処理は終了する。
【0038】
次に、オペレータは表示部106に表示された線切れ欠陥指示図形を参照しながら欠陥位置の修復を行うか否かを判断し(図5:ステップS21)、修復を行う場合には自動修復もしくは手動修復の別を入力する(ステップS22)。自動修復が行われる場合には線切れ修復部138が線切れデータ格納メモリ131の内容を参照しながら後述する自動修復を行い(ステップS23)、手動修復の場合にはオペレータが線切れ欠陥位置に線分を描画して塗りつぶし領域を閉領域に修復する(ステップS24)。
【0039】
各線切れ欠陥の検出位置について修復の要否および必要な修復の完了が確認されると装置100の動作が完了する(ステップS25)。
【0040】
<4. 検出動作例1>
次に、図4中のステップS15における検出動作について説明する。図6は検出動作の様子を示す概念図であり、図7および図8は検出動作の流れを示す流れ図である。
【0041】
線切れ検出部136における検出動作では、まず表示用多色画像の対象色の領域を画素値が1である有意部とし、その他の領域を画素値が0である無意部とする2値化処理が行われ、表示用2値画像が生成される(図7:ステップS31)。一方、高精細な対象画像においても同様の2値化処理が行われ、対象2値画像が生成される(ステップS32)。なお、表示用2値画像は対象2値画像を表示用に間引いて生成されてもよい(ステップS33)。
【0042】
図6中、符号201は対象2値画像を示しており、符号202は表示用2値画像を示している。
【0043】
次に、対象2値画像201を白黒反転して反転画像を生成する(ステップS34)。図6中、符号203は反転画像を示している。これにより、有意部が画素値0の白色部となり、無意部が画素値1の黒色部となる。
【0044】
反転画像203が生成されると、反転画像203の無意部(黒色部)に対して細線化処理が施される(ステップS35)。図6中、符号204は細線化後の画像を例示している。そして、画像204中の黒色部である細線化部の連結性を保存しながら間引き処理を行い、表示用2値画像202と同サイズの参照用画像205が生成される(ステップS36)。
【0045】
表示用2値画像202および参照用画像205が生成されると、これらの画像の論理和画像206が求められ(図8:ステップS41)、論理和画像206中の画素値が1の画素の集合領域が欠陥の検出位置とされる(ステップS42)。このようにして検出された欠陥位置に間引き率を乗じることにより、対象画像中の線切れ欠陥の座標が求められ、後述する修復作業で利用するために線切れデータ格納メモリ131に線切れ欠陥の座標が保存される。
【0046】
なお、参照用画像205を表示用2値画像202と同一のサイズに生成しない場合であっても、双方の画像に対応する位置において論理和を求めることにより論理和画像206を生成することができる。さらには、ステップS36を省略して表示用2値画像202と細線化後の画像204とを間引き率を参照しながら比較して論理和画像206を生成してもよい。
【0047】
図6に示す欠陥検出動作では、対象2値画像201中の無意部に対して細線化処理を施すとともに細線化された無意部の連結性を保存しながら間引き処理が行われるようになっている。すなわち、これらの処理は図1に示した参照用画像30の生成処理に相当するものであり、反転処理後の論理和画像の生成は図1における排他的論理和画像40の生成に相当する。なお、細線化処理が行われるのは表示用間引き処理と無意部の連結性保存間引き処理とのアルゴリズムの相違による有意部の変形の影響を取り除くことを目的としている。
【0048】
また、図6に示す動作では細線化後に連結性を保存した間引き処理を行うようにしているが(ステップS35、S36)、無意部の連結性を保存した間引き処理の後に無意部の細線化処理を行うようにしてもよい
【0049】
また、ステップS35における細線化は幅1画素のスケルトン画像となるまで処理を行う必要はない。
【0050】
以上説明した欠陥検出動作により、表示用の画像において消滅してしまう線切れ欠陥を的確に検出することができる。これにより、オペレータは表示部106には現れない線切れ欠陥を考慮することなく対象画像の全体を表示部106を介して把握しながら欠陥修復作業を行うことができる。その結果、欠陥を探し出すための拡大作業が不要となり、オペレータの作業負担の大幅な低減を図ることができる。
【0051】
<5. 検出動作例2>
次に、図4中のステップS15における検出動作の他の例について説明する。図9は検出動作の様子を示す概念図であり、図10および既出の図8は検出動作の流れを示す流れ図である。
【0052】
図9に示す検出動作では、まず、表示用多色画像の有意部の画素値を1とし、無意部の画素値を0とする2値化を行って表示用2値画像を生成し(図10:ステップS51)、対象画像においても有意部の画素値を1として無意部の画素値を0とする2値化を行って対象2値画像を生成する(ステップS52)。なお、表示用2値画像は対象2値画像を表示用に間引いて生成されてもよい(ステップS53)。図9中、符号301および符号302はそれぞれ対象2値画像および表示用2値画像を示している。
【0053】
次に、表示用2値画像302の有意部(黒色部)に対して細線化処理を施して画像303を生成する(ステップS54)。図9に示す例では、表示用2値画像302において線切れ欠陥が消滅しているので細線化後の画像303には矩形の線となる細線化部(黒色部)が存在する状態となる。
【0054】
一方、対象2値画像301に対しては、有意部の各画素の8近傍内に存在する画素の画素値を1とする8近傍1画素膨張処理が施されて画像304が生成され(ステップS55)、元の対象2値画像301と膨張処理が施された画像304との排他的論理和の画像を求めることにより有意部のエッジ画像305が生成される(ステップS56)。そして、このエッジ画像305におけるエッジ部(黒色部)の連結性を保存しながら間引き処理を行うことにより表示用の画像と同サイズの参照用画像306が生成される(ステップS57)。
【0055】
その後、図8に示した処理とほぼ同様に表示用2値画像302に細線化処理を施した画像303と参照用画像306との論理和画像307が求められ(ステップS41)、論理和画像中の黒色部、すなわち、画像303中の細線化部および参照用画像306中のエッジ部に対応する位置が線切れ欠陥の位置として求められる(ステップS42)。
【0056】
このようにして検出された欠陥位置に間引き率を乗じることにより、対象画像中の線切れ欠陥の座標が求められ、後述する修復作業で利用するために線切れデータ格納メモリ131に線切れ欠陥の座標が保存される。
【0057】
以上の動作において、細線化後の画像303では対象画像から表示用2値画像302を生成する際に線切れ欠陥が消滅することによる有意部の連結性が保存されている。また、エッジ画像305は対象2値画像301中の無意部の連結性を示すものであることから、参照用画像306の生成は図1中の無意部の連結性を保存した間引き処理に相当する。したがって、画像303と参照用画像306との論理和画像307を求めることにより図1に示した表示用画像20と参照用画像30との比較と同様の処理が行われることになり、線切れ欠陥の検出が実現される。
【0058】
ここで、エッジ画像305を求めるようにしているのはエッジ部(無意部に相当)の連結性保存間引き処理を簡潔に行うことを目的としており、細線化された画像303を求めるのは間引き処理のアルゴリズムの相違による表示用2値画像302中の輪郭の形状と参照用画像306中のエッジ部の形状の微差の影響を取り除くことを目的としている。
【0059】
なお、図6に示した例と同様に、参照用画像306は表示用画像302や細線化後の画像303と同一のサイズに必ずしも間引きされる必要はなく、画像303と参照用画像306との双方の対応する位置にて論理和を求めて論理和画像307を求めてもよい。さらには、ステップS57を省略して表示用2値画像を細線化した画像303とエッジ画像305とに基づいて間引き率を参照しながら直接論理和画像307を求めてもよい。
【0060】
また、ステップS56とステップS57との順序は逆であってもよく、対象2値画像301の無意部の連結性を保存したまま間引き処理を行った後にエッジ抽出処理を行って最終的な参照用画像306を生成してもよい
【0061】
さらに、ステップS56におけるエッジ抽出の方法は上記方法に限定されるものではなく、様々な手法が利用されてよいし、ステップS54における細線化処理も幅1画素のスケルトン画像にまで細線化を行う必要はない。
【0062】
以上説明した欠陥検出動作においても、表示用の画像において消滅してしまう線切れ欠陥を的確に検出することができる。これにより、オペレータは表示部106には現れない線切れ欠陥を考慮することなく対象画像の全体を表示部106を介して捉えながら後述する欠陥修復処理を行うことができる。その結果、欠陥を探し出すための拡大作業が不要となり、オペレータの作業負担の大幅な低減を図ることができる。
【0063】
<6. 自動修復動作>
次に、図5中のステップS23における線切れ欠陥の自動修復動作について説明する。図11は自動修復動作の様子を示す図であり、図12は自動修復動作の流れを示す流れ図である。
【0064】
自動修復動作では、まず、線切れデータ格納メモリ131から線切れ欠陥の位置の座標が読み出され、対象2値画像から線切れ欠陥近傍の所定範囲の画像が検出領域画像として抽出される(図12:ステップS61)。図11中、符号401および符号402はそれぞれ元の対象2値画像および検出領域画像を示している。対象画像と表示用の画像とのサイズの比から線切れ欠陥の幅がおおよそ判明するので、線切れ欠陥の幅の2〜5倍程度の範囲で検出領域画像の抽出が行われる。
【0065】
また、検出領域画像402中の有意部(黒色部)の各領域に対してラベリングが行われる(ステップS62)。図11に示す有意部領域402a、402b、402cにはそれぞれラベル1、2、3が付されるものとする。なお、ラベリングは検出領域画像402中において独立して存在する有意部領域のそれぞれに対して行われ、検出領域画像402外にて各有意部領域がどのように連結しているかは問わない。
【0066】
次に、検出領域画像402に対して表示用の間引きと同様の間引きが施される(ステップS63)。線切れ欠陥としては表示用の間引き処理により消滅するものだけが検出されているので、表示用の間引きにより検出領域画像402中の線切れ欠陥は消滅する。したがって、間引き後の画像403では有意部領域402a、402b、402cのうち少なくとも2つが連結することとなる。図11中に示す間引き後の画像403では有意部領域402a、402b、402cがそれぞれ互いに連結する場合を例に示している。これにより、表示部106には現れない線切れ欠陥がどのように存在しているのか、すなわち、各有意部領域をどのように連結すべきかが求められ、連結関係が連結テーブル404に保存される(ステップS64)。
【0067】
なお、表示用の間引きによる各有意部領域の連結関係は、間引き後の画像403上を2×2画素のウィンドウを走査させることにより求められる。すなわち、ウィンドウ内に異なる有意部領域に対応する画素が同時に含まれる状態が存在する場合にこれらの有意部領域が間引きにより連結すると判断される。
【0068】
図11に示す連結テーブル404ではラベル1が付された有意部領域402aがラベル2およびラベル3が付された有意部領域402b、402cと連結すべき旨が記憶される様子を示している。なお、図11に示す連結テーブル404ではラベル2およびラベル3が付された有意部領域402b、402cの連結関係の記憶はラベル1の連結関係と直接的あるいは間接的に重複した内容となるので連結関係が記憶されないようになっている。
【0069】
各有意部領域の連結関係が求められると、検出領域画像402の有意部のエッジ抽出が行われて検出領域エッジ画像405が生成され(ステップS65)、連結テーブル404および検出領域エッジ画像405を参照しながら連結すべき有意部領域間の最短距離となる位置に線分を描画する(ステップS66、S67)。
【0070】
ここで、検出領域エッジ画像405が用いられるのは、連結すべき有意部領域間を最短距離で結ぶ線分の描画位置を簡潔に求めるためである。また、図11中、符号406は修復後の検出領域画像406を示しており、符号461および符号462はそれぞれ有意部領域402a、402b間に描画された線分、および有意部領域402a、402c間に描画された線分を示している。
【0071】
以上のような自動修復動作により、表示部106には現れない線切れ欠陥を適切に修復することができる。これにより、オペレータは表示部106に表示される表示用に間引きされた表示用多色画像を参照しながら、すなわち対象画像の全体を把握しながら線切れ欠陥の修復を行うことができ、線切れ欠陥位置を拡大表示するという作業を必ずしも行う必要がなくなる(ただし、オペレータの確認用に検出領域画像が拡大表示されるようになっていてもよい)。その結果、オペレータの作業負担を大幅に軽減することができ、線切れ欠陥の修復後の対象画像の塗りつぶし(塗り分け)処理へと円滑に移行することができる。
【0072】
以上、この発明に係る線切れ欠陥の検出および修復を行う装置100について説明したが、装置100では対象画像を表示する際の間引き処理によりオペレータが把握しにくい線切れ欠陥のみを検出して修復するようになっている。すなわち、「線切れ欠陥」を表示上には現れない線切れの欠陥として位置づけて取り扱うようになっている。これにより、オペレータの拡大処理等の作業負担を低減し、作業時間の短縮を図ることができる。
【0073】
また、表示上把握することができない線切れ欠陥のみを検出することから、従来のような線切れ欠陥検出用の数値の設定が不要となり、画像の種類に応じた煩雑な設定やAI的判断が不要となる。また、線画の端点等の線切れ欠陥の形状に基づかない検出動作となっていることから、線切れ欠陥の形状に依存することなく線切れ欠陥を検出することができる。
【0074】
なお、装置100では多色の対象画像に対して線切れ欠陥検出の対象となる有意部とその他の無意部とを区別して処理を行っているので、多色画像に対しても柔軟に対応することができるようにされている。
【0075】
<7. 変形例>
以上、この発明に係る装置100について説明してきたが、この発明は上記実施の形態に限定されるものではなく、様々な変形が可能である。
【0076】
例えば、上記実施の形態では対象画像として多色の高精細な画像を用いているが、対象画像が2値画像であってもよい。
【0077】
また、表示用の間引き処理はどのような間引き処理であってもよい。例えば、4×4画素の画素値の平均値を画素値として有する1画素に間引くようにしてもよい。
【0078】
また、上記実施の形態における検出動作は具体的な例示であり、発明の原理に沿って様々な変形が可能である。例えば、図6に示す例において無意部の細線化や細線化部の連結性を保存した間引き処理を省略することも可能である。図9に示す例においてもエッジ抽出処理や有意部の細線化を必要に応じて省略することも可能である。
【0079】
また、図11に示す修復動作例では、有意部領域のエッジ抽出処理を省略することも可能である。
【0080】
さらに、細線化処理の要する時間を短縮するために、各工程における細線化処理は数画素分でもよい。
【0081】
【発明の効果】
請求項1ないし7に記載の発明では、表示用画像からでは把握できない線切れ欠陥を検出することができるので、オペレータに必要な線切れ欠陥のみを検出することができる。これにより、オペレータの作業負担が軽減される。
【0082】
また、請求項2に記載の発明では、参照用画像の生成に際して間引きを行うので、表示用画像と参照用画像とを容易に比較することができる。
【0083】
また、請求項3および4に記載の発明では、線切れ欠陥を的確に検出することができる。
【0084】
また、請求項5に記載の発明では、表示用画像からでは把握できない線切れ欠陥を適切に修復することができる。
【図面の簡単な説明】
【図1】発明の原理を示す概念図である。
【図2】この発明に係る装置の構成を示すブロック図である。
【図3】動作から捉えた装置の構成を示すブロック図である。
【図4】全体動作の流れを示す流れ図である。
【図5】全体動作の流れを示す流れ図である。
【図6】検出動作の様子を示す概念図である。
【図7】検出動作の流れを示す流れ図である。
【図8】検出動作の流れを示す流れ図である。
【図9】検出動作の他の例の様子を示す概念図である。
【図10】検出動作の他の例における動作の流れを示す流れ図である。
【図11】修復動作の様子を示す概念図である。
【図12】修復動作の流れを示す流れ図である。
【符号の説明】
10、201、301、401 対象2値画像
11 有意部
12 無意部
13 線切れ欠陥
20、202、302 表示用画像
30、205、306 参照用画像
100 装置
101 CPU
103 メモリ
106 表示部
108 固定ディスク
132 画像演算用メモリ
134 プログラム
135 画像表示部
136 線切れ検出部
141 記録媒体
402 検出領域画像
S12、S31〜S36、S41、S42、S51〜S57、S61〜S67ステップ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a technique for detecting and repairing a line break defect in an image.
[0002]
[Prior art]
When a closed area surrounded by a line or the like in an image is filled (separated), if a line break occurs, a color leaks out from the line break point and the unpainted area extends to an unintended area. For example, when an original image is read from a scanner when preparing an image for a composition, a thin line may be blurred or a line may be broken due to the influence of dust. In order to prevent unintentional filling processing due to such a line break defect, conventionally, an operator has previously performed an operation of finding and repairing a line break while enlarging and displaying a closed area to be filled.
[0003]
On the other hand, research is also being conducted on a method for automatically detecting a broken line portion, such as the technique disclosed in Japanese Patent Application Laid-Open No. 4-153889. In the technique disclosed in Japanese Patent Application Laid-Open No. 4-153889, a line drawing to be inspected is subjected to thinning processing to extract an end point, and another end point is searched for in a predetermined range in the direction in which the line extends in the vicinity of the end point. Is detected, the gap between the end points is detected as a line break defect.
[0004]
Further, when a line break defect is detected, it is conceivable to perform a process of thickening the line on the original line drawing, and further perform a process of thinning the line to repair the line break defect.
[0005]
[Problems to be solved by the invention]
By the way, in the technique disclosed in Japanese Patent Application Laid-Open No. 4-153889, it is necessary to set in advance the distance between end points to be detected as line break defects. Such settings need to be changed depending on the type of image, and an AI-like technique is required to perform the setting efficiently. However, even if an AI-like setting according to the type of image is performed, detection of line break defects in all images cannot be performed. As a result, each time an operator finds a broken line defect, the operator must enlarge and repair the defective portion.
[0006]
A similar problem also occurs in the restoration process. That is, when performing a fattening process on a line in a line drawing, it is necessary to set a fattening width. However, an appropriate fattening width varies depending on the type of an image. However, it is impossible to perform a fattening process suitable for any image. Further, even if a thickening width suitable for repairing a broken line defect can be set, the thickened lines may come into contact with each other to generate a new defect. Therefore, every time an operator finds a defect, it must expand and repair it.
[0007]
SUMMARY OF THE INVENTION The present invention has been made in consideration of the above problems, and has as its object to detect only a line break defect necessary for a painting operation or the like and reduce an operator's work load.
[0008]
[Means for Solving the Problems]
The invention according to claim 1 is an image defect detection method for detecting a line break defect in a target image, wherein (a) generating a display image by thinning out the target image for display on a display unit; b) becomes a detection target of a line break defect in the target imagecolorA step of generating a reference image from the target image while preserving the connectivity of the insignificant part that is a part other than the significant part that is a part, and (c) comparing the display image and the reference image with each other. Detecting a line break defect in a significant portion in the target image.
[0009]
The invention according to claim 2 is the image defect detection method according to claim 1, wherein the step (b) includes a step of thinning out the target image while preserving the connectivity of the insignificant part.
[0010]
The invention according to claim 3 is the image defect detection method according to claim 1 or 2, wherein the step (b) is performed by using an insignificant part in the reference image.ThinA step of performing a linearization process, wherein the step (c) cuts off a position in the target image corresponding to both a significant portion in the display image and a thinning portion in the reference image. A step of obtaining the position as a defect.
[0011]
The invention according to claim 4 is the image defect detection method according to claim 1 or 2, wherein the step (a) includes a step of performing a thinning process on a significant part of the display image. (b) is a significant part of the reference imageTo dA step of performing edge extraction processing, wherein the step (c) draws a position in the target image corresponding to both a thinned portion in the display image and an edge portion in the reference image. A step of obtaining the position of the cut defect.
[0012]
According to a fifth aspect of the present invention, there is provided an image defect repairing method for repairing a line defect detected by the image defect detecting method according to any one of the first to fourth aspects, wherein the line defect detected in the target image is provided. Extracting an image in the vicinity of the existence position as a detection region image, labeling a significant portion in the detection region image, and thinning out the detection region image for display, thereby connecting the significant portion by thinning. A step of obtaining a relationship; and a step of connecting significant parts in the detection area image connected by the thinning.
[0013]
The invention according to claim 6 is an image defect detection device that detects a line break defect in a target image, wherein the unit generates a display image by thinning out the target image for display on a display unit; Of wire break defectscolorMeans for generating a reference image from the target image while preserving the connectivity of the insignificant part that is a part other than the significant part that is a part, and comparing the display image and the reference image with each other in the target image. Means for detecting a line break defect in a significant portion of
[0014]
8. The computer-readable recording medium according to claim 7, wherein said computer-readable recording medium stores a program for detecting a line break defect in a target image by a computer, said program being stored on a computer for display on a display unit. Generating a display image by thinning out, and detecting a line break defect in the target image.colorA step of generating a reference image from the target image while preserving the connectivity of the insignificant part that is a part other than the significant part that is a part, and comparing the display image and the reference image with each other in the target image The step of detecting a line break defect in a significant portion.
[0015]
BEST MODE FOR CARRYING OUT THE INVENTION
<1. Principle of the Invention>
FIG. 1 is a diagram showing the principle of detecting a line break defect in the present invention. In FIG. 1, reference numeral 10 indicates a target image from which a line break defect is to be detected. In the target image 10, a portion indicated by a parallel oblique line denoted by reference numeral 11 indicates a color portion (hereinafter, referred to as a “significant portion”) to be detected as a line break defect, and the other portions denoted by reference numeral 12 are backgrounds. (Hereinafter, referred to as “insignificant part”). For example, in a line drawing in which a pattern is drawn with a black line on a white background, a black line portion becomes a significant portion, and a white background portion becomes an insignificant portion.
[0016]
Reference numeral 13 indicates a line break defect in the significant portion 11. Therefore, when the filling process of the region surrounded by the substantially rectangular significant portion 11 is performed on the target image 10 shown in FIG. Processing will be extended.
[0017]
Reference numeral 20 denotes a display image thinned out to display the target image 10 on a display unit such as a display. When the target image 10 is a fine image for printing or the like, the entire target image 10 cannot be displayed. Therefore, the display is performed after the target image 10 is thinned out for display. For example, the display image 20 is generated by replacing 2 × 2 pixels in the target image 10 with one pixel (for example, one pixel at the upper left corner). An instruction of the filling process or the like by the operator is performed based on the display image 20.
[0018]
In the display image 20 shown in FIG. 1, the portions shaded in parallel indicate significant portions 21 corresponding to the significant portions 11 in the target image 10, and the other portions correspond to the insignificant portions 12 in the target image 10. The insignificant part 22 is shown. As shown in FIG. 1, the display thinning process is a simple thinning process. Therefore, the line break defect 13 which is a small gap disappears by the thinning process and does not appear in the display image 20. That is, the operator cannot recognize the line break defect 13 from the display image 20.
[0019]
Therefore, the present invention compares the display image 20 with the target image 10 (or a later-described reference image 30 generated from the target image 10) and detects only line break defects that cannot be grasped by the operator. I have to. As a result, only the necessary line break defect is detected to reduce the work load of the operator.
[0020]
As described above, the present invention is based on comparing the target image 10 with the display image 20. However, when the target image 10 is a high-definition image for printing or the like, the comparison is rationally and appropriately performed. In order to perform this, it is preferable to prepare a reference image 30 that has been subjected to the thinning process in a state where the line break defect 13 in the target image 10 is stored.
[0021]
In FIG. 1, reference numeral 30 denotes a reference image that has been subjected to a thinning process in a state where the line break defect 13 in the target image 10 is stored. The thinning-out processing in a state where the line break defect 13 is stored is realized by performing the thinning-out processing in a state where the connectivity of the insignificant part 12 is stored. Here, “perform the thinning process with the connectivity preserved” means that the area in which the connectivity is preserved is not divided by the thinning process, and it does not matter whether the two areas are connected or not. Refers to thinning processing. In the following description, the same meaning is used.
[0022]
As a specific example of the thinning process in which the connectivity is preserved, for example, in order to maintain the connectivity of the insignificant part, if at least one pixel of the insignificant part exists in 2 × 2 pixels, the 2 × 2 pixel Is replaced with one pixel indicating an insignificant part. Thus, the thinning process can be performed without dividing the insignificant part.
[0023]
In the reference image 30 of FIG. 1, reference numeral 31 denotes a significant part corresponding to the significant part 11 in the target image 10, reference numeral 32 denotes an insignificant part corresponding to the insignificant part 12 in the target image 10, and reference numeral 33 denotes the target. A line break defect corresponding to the line break defect 13 in the image 10 is shown.
[0024]
When the display image 20 and the reference image 30 are generated from the target image 10, these images are compared, and the difference is determined as a line break defect detection position. That is, when a certain position of the display image 20 is included in the significant part 21 and a corresponding position of the reference image 30 is included in the insignificant part 32, this position is obtained as the detection position of the line break defect.
[0025]
For example, when the reference image 30 is required to be the same size as the display image 20, an exclusive OR image 40 of the display image 20 and the reference image 30 is determined, and the exclusive OR image 40 is obtained. The position of the black portion indicated as the difference between the two images in the logical sum image 40 is the defect detection position 41.
[0026]
As described above, the thinning process in which the connectivity of the insignificant part is stored is a process for easily comparing the display image 20 and the reference image 30, and the thinning rate (reduction) of the display image 20 is reduced. By referring to the (ratio), it is possible to determine to which position of the target image 10 each pixel of the display image 20 corresponds, so that the target image 10 can be used as it is as the reference image 30. .
[0027]
<2. Device configuration>
FIG. 2 is a diagram showing a configuration of an apparatus 100 for detecting and repairing a line break defect according to the present invention. As shown in FIG. 2, the apparatus 100 is configured to use a normal computer system (hereinafter, referred to as a “computer”), which executes a variety of arithmetic instructions, and stores a target image to be detected. A dedicated image data storage memory 102, a memory 103 serving as a storage area for data and programs, a reading unit 104 for reading programs and the like from a recording medium 141, an input unit 105 such as a keyboard and a mouse for receiving input from an operator, an image for an operator, etc. , A display control unit 161 which is an interface for controlling the display operation of the display unit 106, a display memory 107 for storing an image displayed on the display unit 106, and a target image in a format such as a run length. The fixed disk 108 stored as the image data 181 is appropriately Such as via a Eisu (I / F) has be connected to the bus line 100B.
[0028]
The memory 103 further includes a line break data storage memory 131 for storing a defect position as line break data, an image calculation memory 132 serving as a calculation area for an image, and a program storage memory 133 for storing a program 134 which is an operation content of the apparatus 100. Is divided into
[0029]
The program 134 is once stored in the fixed disk 108 from the recording medium 141 via the reading unit 104 in advance, and then read into the program storage memory 133 as needed. Note that the program 134 may be loaded into a computer via a separately provided communication device or the like.
[0030]
FIG. 3 is a block diagram showing the configuration of the device 100 viewed from the operation aspect. 3, the same components as those shown in FIG. 2 are denoted by the same reference numerals. Among these components, an image display unit 135 that generates display contents of an image on the display unit 106, a line break detection unit 136 that detects line breaks, and a line break instruction figure display unit 137 that displays an instruction figure at a defect detection position. , And a line break repairing unit 138 that repairs a line break defect has a configuration indicating an operation realized by the CPU 101 executing an operation command according to the program 134, and these configurations are realized by a dedicated electric circuit. Is also good.
[0031]
<3. Overall operation>
Next, an overview of the overall operation of the device 100 will be described with reference to the configuration shown in FIG.
[0032]
4 and 5 are flowcharts showing the flow of the entire operation of the apparatus 100. The apparatus 100 first reads the image data 181 in the fixed disk 108 into the image data storage memory 102 as a prerequisite operation (FIG. 4: step S11). As a result, the image data 181 is expanded in the image data storage memory 102, and a high-definition multicolor target image is prepared. The development of the image data 181 may be performed at any time as needed.
[0033]
When the target image is prepared, the image display unit 135 thins out the target image for display on the display unit 106 to generate a display multicolor image (step S12). As described above, a process of simply replacing 2 × 2 pixels with any one pixel is performed as the display thinning. Then, the generated display multicolor image is displayed on the display unit 106 via the display control unit 161 and stored in the display memory 107 (step S13).
[0034]
When the multicolor image for display is generated, the apparatus 100 receives an input of a detection area of a line break defect and a target color of the line break defect from the operator (step S14). The target color of the line break defect is, for example, when performing a filling process using a red portion as a frame for a multicolor image, if red is specified as a target color, the red portion is regarded as a significant portion that is a defect detection target. The other color portions are regarded as insignificant portions which are not the defect detection targets. The input of the target color is performed by the computer displaying the color palette used for the image on the display unit 106 and the operator selecting and instructing the target color from the color palette via the input unit 105 such as a mouse.
[0035]
Note that, in the processing described below of the apparatus 100, an image in which the target color is specified is handled as a binary image in which the pixel value of the significant part is 1 (black) and the pixel value of the insignificant part is 0 (white) in principle. .
[0036]
When an input from the operator is received, a line break defect of a significant portion which is a target color is detected (step S15). The detection of the line break defect is performed by the image calculation memory 132 and the line break detection unit 136 based on the target image in the image data storage memory 102 and the display multicolor image in the display memory 107. Is stored in the line break data storage memory 131, and details of the operation will be described later.
[0037]
If a line break defect is detected, the line break instruction graphic display unit 137 displays a figure indicating the position of the line break defect on the image displayed on the display unit 106 (steps S16 and S17). The line break instruction figure may be a figure connecting the character “line break” and the defect position by a leader line, or a simple “X” mark may be displayed at the defect position. If no line break defect is detected, the process ends.
[0038]
Next, the operator judges whether or not to repair the defect position while referring to the line break defect designating graphic displayed on the display unit 106 (FIG. 5: step S21). Another type of manual restoration is input (step S22). When the automatic repair is performed, the line break repairing unit 138 performs the automatic repair described below with reference to the contents of the line break data storage memory 131 (step S23). The line segment is drawn to restore the filled area to a closed area (step S24).
[0039]
The operation of the apparatus 100 is completed when the necessity of the restoration and the completion of the necessary restoration are confirmed for the detection position of each line break defect (step S25).
[0040]
<4. Detection operation example 1>
Next, the detection operation in step S15 in FIG. 4 will be described. FIG. 6 is a conceptual diagram showing the state of the detection operation, and FIGS. 7 and 8 are flowcharts showing the flow of the detection operation.
[0041]
In the detection operation of the line break detection unit 136, first, a binarization process in which a region of a target color of the display multicolor image is a significant portion having a pixel value of 1 and other regions are insignificant portions having a pixel value of 0 is performed. Is performed to generate a binary image for display (FIG. 7: step S31). On the other hand, the same binarization processing is performed on a high-definition target image to generate a target binary image (step S32). The display binary image may be generated by thinning out the target binary image for display (step S33).
[0042]
In FIG. 6, reference numeral 201 denotes a target binary image, and reference numeral 202 denotes a display binary image.
[0043]
Next, the target binary image 201 is inverted in black and white to generate an inverted image (step S34). In FIG. 6, reference numeral 203 denotes an inverted image. As a result, the significant portion becomes a white portion having a pixel value of 0, and the insignificant portion becomes a black portion having a pixel value of 1.
[0044]
When the inverted image 203 is generated, the insignificant part (black part) of the inverted image 203 is subjected to thinning processing (step S35). In FIG. 6, reference numeral 204 illustrates an image after thinning. Then, the thinning process is performed while preserving the connectivity of the thinned portion which is the black portion in the image 204, and the reference image 205 having the same size as the display binary image 202 is generated (step S36).
[0045]
When the display binary image 202 and the reference image 205 are generated, a logical sum image 206 of these images is obtained (FIG. 8: step S41), and a set of pixels whose pixel values in the logical sum image 206 are 1 The area is set as a defect detection position (step S42). By multiplying the defect position detected in this way by the thinning rate, the coordinates of the line-break defect in the target image are obtained, and the line-break data storage memory 131 stores the coordinates of the line-break defect in the repair work described later. The coordinates are saved.
[0046]
Note that, even when the reference image 205 is not generated in the same size as the display binary image 202, the logical sum image 206 can be generated by calculating the logical sum at the position corresponding to both images. . Further, the logical sum image 206 may be generated by comparing the binary image for display 202 and the image 204 after thinning with reference to the thinning rate by omitting step S36.
[0047]
In the defect detection operation shown in FIG. 6, thinning processing is performed on the insignificant part in the target binary image 201, and thinning processing is performed while preserving the connectivity of the thinned insignificant part. . That is, these processes correspond to the generation process of the reference image 30 shown in FIG. 1, and the generation of the OR image after the inversion process corresponds to the generation of the exclusive OR image 40 in FIG. The purpose of performing the thinning processing is to remove the influence of the deformation of the significant part due to the difference in algorithm between the display thinning processing and the insignificant part connectivity preserving thinning processing.
[0048]
Further, in the operation shown in FIG. 6, the thinning processing in which the connectivity is preserved after the thinning is performed (steps S35 and S36), but the thinning processing of the insignificant part is performed after the thinning processing in which the connectivity of the insignificant part is preserved. May be performed.
[0049]
Further, it is not necessary to perform the thinning in step S35 until a skeleton image having a width of one pixel is obtained.
[0050]
With the above-described defect detection operation, a line break defect that disappears in the display image can be accurately detected. Accordingly, the operator can perform the defect repair work while grasping the entire target image via the display unit 106 without considering a line break defect that does not appear on the display unit 106. As a result, it is not necessary to perform an enlarging operation for searching for a defect, and it is possible to significantly reduce an operator's work load.
[0051]
<5. Detection operation example 2>
Next, another example of the detection operation in step S15 in FIG. 4 will be described. FIG. 9 is a conceptual diagram showing a state of the detection operation, and FIG. 10 and the above-mentioned FIG. 8 are flowcharts showing the flow of the detection operation.
[0052]
In the detection operation illustrated in FIG. 9, first, the binarization is performed by setting the pixel value of the significant part of the multicolor image for display to 1 and the pixel value of the insignificant part to 0 to generate a binary image for display. 10: Step S51) Also in the target image, binarization is performed by setting the pixel value of the significant part to 1 and the pixel value of the insignificant part to 0 to generate a target binary image (Step S52). The display binary image may be generated by thinning out the target binary image for display (step S53). In FIG. 9, reference numerals 301 and 302 indicate a target binary image and a display binary image, respectively.
[0053]
Next, a thinning process is performed on a significant portion (black portion) of the display binary image 302 to generate an image 303 (step S54). In the example shown in FIG. 9, since the line break defect has disappeared in the display binary image 302, the thinned image 303 has a thinned portion (black portion) that is a rectangular line.
[0054]
On the other hand, the target binary image 301 is subjected to 8-neighbor one-pixel expansion processing in which the pixel values of the pixels existing in the eight neighborhoods of each pixel of the significant part are set to 1, and an image 304 is generated (step S55). ), An image of the exclusive OR of the original target binary image 301 and the image 304 subjected to the dilation processing is obtained to generate the edge image 305 of the significant part (step S56). The reference image 306 having the same size as the display image is generated by performing the thinning process while preserving the connectivity of the edge portion (black portion) in the edge image 305 (step S57).
[0055]
Thereafter, a logical sum image 307 of the image 303 obtained by performing the thinning processing on the display binary image 302 and the reference image 306 is obtained in substantially the same manner as the processing shown in FIG. 8 (step S41). , That is, the positions corresponding to the thinned portion in the image 303 and the edge portion in the reference image 306 are obtained as the position of the line break defect (step S42).
[0056]
By multiplying the defect position detected in this way by the thinning rate, the coordinates of the line-break defect in the target image are obtained, and the line-break data storage memory 131 stores the coordinates of the line-break defect in the repair work described later. The coordinates are saved.
[0057]
In the above operation, in the image 303 after the thinning, the connectivity of the significant part due to disappearance of the line break defect when generating the display binary image 302 from the target image is preserved. Further, since the edge image 305 indicates the connectivity of the insignificant part in the target binary image 301, the generation of the reference image 306 corresponds to the thinning processing in which the connectivity of the insignificant part in FIG. . Therefore, by obtaining the logical sum image 307 of the image 303 and the reference image 306, the same processing as the comparison between the display image 20 and the reference image 30 shown in FIG. Is detected.
[0058]
Here, the purpose of obtaining the edge image 305 is to simplify the connectivity preserving thinning processing of the edge part (corresponding to the insignificant part), and the purpose of obtaining the thinned image 303 is the thinning processing. The purpose of the present invention is to eliminate the influence of the slight difference between the shape of the contour in the binary image for display 302 and the shape of the edge portion in the image for reference 306 due to the difference in the algorithm.
[0059]
Note that, similarly to the example shown in FIG. 6, the reference image 306 does not necessarily need to be thinned out to the same size as the display image 302 or the image 303 after thinning. The logical sum may be obtained at both corresponding positions to obtain the logical sum image 307. Further, step S57 may be omitted, and the logical sum image 307 may be directly obtained by referring to the thinning rate based on the image 303 obtained by thinning the display binary image and the edge image 305.
[0060]
In addition, the order of step S56 and step S57 may be reversed, and the edge extraction process is performed after the thinning process is performed while the connectivity of the insignificant part of the target binary image 301 is preserved, and the final reference Image 306 may be generated.
[0061]
Further, the method of edge extraction in step S56 is not limited to the above-described method, and various methods may be used, and the thinning processing in step S54 also needs to perform thinning to a skeleton image having a width of one pixel. There is no.
[0062]
Also in the defect detection operation described above, it is possible to accurately detect a line break defect that disappears in a display image. This allows the operator to perform a later-described defect repair process while capturing the entire target image via the display unit 106 without considering line break defects that do not appear on the display unit 106. As a result, it is not necessary to perform an enlarging operation for searching for a defect, and it is possible to significantly reduce an operator's work load.
[0063]
<6. Automatic repair operation>
Next, the automatic repair operation of the line break defect in step S23 in FIG. 5 will be described. FIG. 11 is a diagram showing a state of the automatic restoration operation, and FIG. 12 is a flowchart showing a flow of the automatic restoration operation.
[0064]
In the automatic repair operation, first, the coordinates of the position of the line break defect are read from the line break data storage memory 131, and an image in a predetermined range near the line break defect is extracted from the target binary image as a detection area image (FIG. 12: Step S61). In FIG. 11, reference numerals 401 and 402 indicate the original target binary image and the detection area image, respectively. Since the width of the line break defect is approximately determined from the ratio of the size of the target image to the size of the display image, the detection region image is extracted within a range of about 2 to 5 times the width of the line break defect.
[0065]
Further, labeling is performed on each region of the significant portion (black portion) in the detection region image 402 (step S62). It is assumed that the significant part areas 402a, 402b, and 402c shown in FIG. Note that the labeling is performed on each of the significant portion regions that exist independently in the detection region image 402, and it does not matter how the significant portion regions are connected outside the detection region image 402.
[0066]
Next, thinning similar to thinning for display is performed on the detection area image 402 (step S63). Since only line defects that disappear by the display thinning process are detected, the line defect in the detection area image 402 disappears by the display thinning. Therefore, in the thinned image 403, at least two of the significant part regions 402a, 402b, and 402c are connected. In the image 403 after thinning shown in FIG. 11, an example is shown in which significant part regions 402a, 402b, and 402c are connected to each other. Thus, it is determined how the line break defect that does not appear in the display unit 106 exists, that is, how to link the significant part regions, and the connection relation is stored in the connection table 404. (Step S64).
[0067]
Note that the connection relationship between the significant regions by the display thinning is obtained by scanning a 2 × 2 pixel window on the image 403 after the thinning. That is, when there is a state in which pixels corresponding to different significant part areas are simultaneously included in the window, it is determined that these significant part areas are connected by thinning.
[0068]
The connection table 404 shown in FIG. 11 shows that the significant area 402a labeled 1 is to be connected to the significant areas 402b and 402c labeled 2 and 3, respectively. Note that in the connection table 404 shown in FIG. 11, the storage of the connection relationship between the significant part regions 402b and 402c to which the labels 2 and 3 are attached is directly or indirectly overlapped with the connection relationship of the label 1 so that the connection is performed. Relationships are not remembered.
[0069]
When the connection relation of each significant part area is obtained, the edge of the significant part of the detection area image 402 is extracted to generate the detection area edge image 405 (step S65), and refer to the connection table 404 and the detection area edge image 405. While drawing, a line segment is drawn at a position that is the shortest distance between the significant part areas to be connected (steps S66 and S67).
[0070]
Here, the detection area edge image 405 is used to simply obtain the drawing position of a line segment connecting the significant part areas to be connected with the shortest distance. Also, in FIG. 11, reference numeral 406 denotes the restored detection area image 406, and reference numerals 461 and 462 denote line segments drawn between the significant part areas 402a and 402b and between the significant part areas 402a and 402c, respectively. Shows the line segment drawn in the.
[0071]
With the automatic repair operation as described above, a line break defect that does not appear on the display unit 106 can be properly repaired. Accordingly, the operator can repair the line break defect while referring to the display multicolor image thinned out for display displayed on the display unit 106, that is, while grasping the entire target image. It is not always necessary to perform the operation of enlarging and displaying the defect position (however, the detection area image may be enlarged and displayed for the operator's confirmation). As a result, the work load on the operator can be greatly reduced, and the process can be smoothly shifted to the process of filling (separating) the target image after the repair of the line break defect.
[0072]
The apparatus 100 for detecting and repairing a line break defect according to the present invention has been described above. However, the apparatus 100 detects and repairs only a line break defect that is difficult for an operator to grasp by thinning processing when displaying a target image. It has become. That is, the "line break defect" is treated as being positioned as a line break defect that does not appear on the display. As a result, it is possible to reduce the work load of the operator for the enlargement processing and the like, and to shorten the work time.
[0073]
Further, since only line break defects that cannot be grasped on the display are detected, it is not necessary to set a numerical value for detecting a line break defect as in the related art, and complicated setting and AI determination according to the type of image can be performed. It becomes unnecessary. Further, since the detection operation is not based on the shape of the line break defect such as the end point of the line drawing, the line break defect can be detected without depending on the shape of the line break defect.
[0074]
In addition, since the apparatus 100 performs processing on a multicolor target image by distinguishing a significant part to be subjected to line break defect detection from other insignificant parts, the apparatus 100 flexibly supports a multicolor image. Have been able to be.
[0075]
<7. Modification>
Although the apparatus 100 according to the present invention has been described above, the present invention is not limited to the above embodiment, and various modifications are possible.
[0076]
For example, in the above embodiment, a multicolor high-definition image is used as the target image, but the target image may be a binary image.
[0077]
Further, the thinning process for display may be any thinning process. For example, the pixel value may be thinned out to one pixel having the average value of the pixel values of 4 × 4 pixels as the pixel value.
[0078]
Further, the detection operation in the above embodiment is a specific example, and various modifications can be made in accordance with the principle of the invention. For example, in the example shown in FIG. 6, it is also possible to omit the thinning processing of the insignificant part and the thinning processing in which the connectivity of the thinning part is stored. In the example shown in FIG. 9 as well, the edge extraction processing and thinning of the significant part can be omitted as necessary.
[0079]
Further, in the example of the restoration operation shown in FIG. 11, the edge extraction processing of the significant part area can be omitted.
[0080]
Further, in order to reduce the time required for the thinning processing, the thinning processing in each step may be performed for several pixels.
[0081]
【The invention's effect】
According to the first to seventh aspects of the present invention, a line break defect that cannot be grasped from the display image can be detected, so that only a line break defect necessary for the operator can be detected. Thereby, the work load of the operator is reduced.
[0082]
According to the second aspect of the present invention, since the thinning is performed when the reference image is generated, the display image and the reference image can be easily compared.
[0083]
Further, according to the third and fourth aspects of the present invention, line break defects can be accurately detected.
[0084]
Further, according to the fifth aspect of the present invention, it is possible to appropriately repair a line break defect that cannot be grasped from a display image.
[Brief description of the drawings]
FIG. 1 is a conceptual diagram showing the principle of the invention.
FIG. 2 is a block diagram showing a configuration of an apparatus according to the present invention.
FIG. 3 is a block diagram showing the configuration of the device as viewed from the operation.
FIG. 4 is a flowchart showing a flow of an overall operation.
FIG. 5 is a flowchart showing a flow of an overall operation.
FIG. 6 is a conceptual diagram showing a state of a detection operation.
FIG. 7 is a flowchart showing a flow of a detection operation.
FIG. 8 is a flowchart showing a flow of a detection operation.
FIG. 9 is a conceptual diagram showing a state of another example of the detection operation.
FIG. 10 is a flowchart showing an operation flow in another example of the detection operation.
FIG. 11 is a conceptual diagram showing a state of a repair operation.
FIG. 12 is a flowchart showing a flow of a repair operation.
[Explanation of symbols]
10, 201, 301, 401 Target binary image
11 significant part
12 Insignificant part
13 Line break defect
20, 202, 302 Display image
30, 205, 306 Reference image
100 devices
101 CPU
103 memory
106 Display
108 fixed disk
132 Image calculation memory
134 programs
135 Image display section
136 Line break detector
141 Recording Medium
402 Detection area image
S12, S31 to S36, S41, S42, S51 to S57, S61 to S67 steps

Claims (7)

対象画像中の線切れ欠陥を検出する画像欠陥検出方法であって、
(a) 表示部における表示用に前記対象画像を間引いて表示用画像を生成する工程と、
(b) 前記対象画像中の線切れ欠陥の検出対象となる色の部分である有意部以外の部分である無意部の連結性を保存しつつ前記対象画像から参照用画像を生成する工程と、
(c) 前記表示用画像と前記参照用画像とを比較して前記対象画像中の有意部における線切れ欠陥を検出する工程と、
を有することを特徴とする画像欠陥検出方法。
An image defect detection method for detecting a line break defect in a target image,
(a) generating a display image by thinning the target image for display on a display unit,
(b) generating a reference image from the target image while preserving the connectivity of the insignificant part that is a part other than the significant part that is a part of the color to be detected for a line break defect in the target image,
(c) comparing the display image and the reference image to detect a line break defect in a significant portion in the target image,
An image defect detection method, comprising:
請求項1に記載の画像欠陥検出方法であって、
前記工程(b)が、
無意部の連結性を保存しつつ前記対象画像を間引く工程、
を有することを特徴とする画像欠陥検出方法。
The image defect detection method according to claim 1,
The step (b),
Thinning the target image while preserving the connectivity of the insignificant part,
An image defect detection method, comprising:
請求項1または2に記載の画像欠陥検出方法であって、
前記工程(b)が、
前記参照用画像における無意部に細線化処理を施す工程、
を有し、
前記工程(c)が、
前記表示用画像中の有意部と前記参照用画像中の細線化部との双方に対応する前記対象画像中の位置を線切れ欠陥の存在位置として求める工程、
を有することを特徴とする画像欠陥検出方法。
The image defect detection method according to claim 1 or 2,
The step (b),
Performing thinning processing on the insignificant part in the reference image,
Has,
The step (c) comprises:
A step of obtaining a position in the target image corresponding to both the significant portion in the display image and the thinned portion in the reference image as a position where a line break defect exists,
An image defect detection method, comprising:
請求項1または2に記載の画像欠陥検出方法であって、
前記工程(a)が、
前記表示用画像の有意部に細線化処理を施す工程、
を有し、
前記工程(b)が、
前記参照用画像の有意部にエッジ抽出処理を施す工程、
を有し、
前記工程(c)が、
前記表示用画像中の細線化部と前記参照用画像中のエッジ部との双方に対応する前記対象画像中の位置を線切れ欠陥の存在位置として求める工程、
を有することを特徴とする画像欠陥検出方法。
The image defect detection method according to claim 1 or 2,
The step (a),
Performing a thinning process on a significant portion of the display image,
Has,
The step (b),
Performing an edge extraction process on a significant portion of the reference image,
Has,
The step (c) comprises:
A step of obtaining a position in the target image corresponding to both the thinned portion in the display image and the edge portion in the reference image as a position where a line break defect exists,
An image defect detection method, comprising:
請求項1ないし4のいずれかに記載の画像欠陥検出方法により検出された線切れ欠陥を修復する画像欠陥修復方法であって、
前記対象画像において検出された線切れ欠陥の存在位置の近傍の画像を検出領域画像として抽出する工程と、
前記検出領域画像における有意部にラベリングを施す工程と、
前記検出領域画像を表示用に間引くことにより、間引きによる前記有意部の連結関係を求める工程と、
前記間引きにより連結する前記検出領域画像中の有意部間を連結する工程と、
を有することを特徴とする画像欠陥修復方法。
An image defect repairing method for repairing a line break defect detected by the image defect detecting method according to claim 1,
Extracting an image near the position of the line break defect detected in the target image as a detection region image,
Labeling a significant part in the detection area image;
By thinning the detection area image for display, a step of determining the connection relationship of the significant part by thinning,
Connecting between significant parts in the detection area image connected by the thinning,
A method for repairing an image defect, comprising:
対象画像中の線切れ欠陥を検出する画像欠陥検出装置であって、
表示部における表示用に前記対象画像を間引いて表示用画像を生成する手段と、
前記対象画像中の線切れ欠陥の検出対象となる色の部分である有意部以外の部分である無意部の連結性を保存しつつ前記対象画像から参照用画像を生成する手段と、
前記表示用画像と前記参照用画像とを比較して前記対象画像中の有意部における線切れ欠陥を検出する手段と、
を備えることを特徴とする画像欠陥検出装置。
An image defect detection device that detects a line break defect in a target image,
Means for generating a display image by thinning the target image for display on a display unit,
Means for generating a reference image from the target image while preserving the connectivity of the insignificant part that is a part other than the significant part that is the color part to be detected for the line break defect in the target image,
Means for comparing the display image and the reference image to detect a line break defect in a significant portion in the target image,
An image defect detection device comprising:
コンピュータによって対象画像中の線切れ欠陥を検出するためのプログラムを記録したコンピュータ読み取り可能な記録媒体であって、前記プログラムはコンピュータに、
表示部における表示用に前記対象画像を間引いて表示用画像を生成する工程と、
前記対象画像中の線切れ欠陥の検出対象となる色の部分である有意部以外の部分である無意部の連結性を保存しつつ前記対象画像から参照用画像を生成する工程と、
前記表示用画像と前記参照用画像とを比較して前記対象画像中の有意部における線切れ欠陥を検出する工程と、
を少なくとも実行させることを特徴とするコンピュータ読み取り可能な記録媒体。
A computer-readable recording medium recording a program for detecting a line break defect in a target image by a computer, wherein the program stores
Generating a display image by thinning out the target image for display on a display unit;
A step of generating a reference image from the target image while preserving the connectivity of an insignificant part that is a part other than a significant part that is a part of a color to be detected for a line break defect in the target image,
A step of comparing the display image and the reference image to detect a line break defect in a significant portion in the target image,
And a computer-readable recording medium for executing at least the following.
JP18069198A 1998-06-26 1998-06-26 Image defect detection method, image defect repair method, image defect detection device, and computer-readable recording medium Expired - Fee Related JP3597387B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18069198A JP3597387B2 (en) 1998-06-26 1998-06-26 Image defect detection method, image defect repair method, image defect detection device, and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18069198A JP3597387B2 (en) 1998-06-26 1998-06-26 Image defect detection method, image defect repair method, image defect detection device, and computer-readable recording medium

Publications (2)

Publication Number Publication Date
JP2000020717A JP2000020717A (en) 2000-01-21
JP3597387B2 true JP3597387B2 (en) 2004-12-08

Family

ID=16087628

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18069198A Expired - Fee Related JP3597387B2 (en) 1998-06-26 1998-06-26 Image defect detection method, image defect repair method, image defect detection device, and computer-readable recording medium

Country Status (1)

Country Link
JP (1) JP3597387B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7092549B2 (en) * 2001-04-19 2006-08-15 Koninklijke Philips Electronics N.V. Method and apparatus for removing defects in an image sequence
JP5103955B2 (en) * 2007-03-09 2012-12-19 富士通株式会社 Image search method, apparatus and program

Also Published As

Publication number Publication date
JP2000020717A (en) 2000-01-21

Similar Documents

Publication Publication Date Title
JP4206723B2 (en) Image processing method and image processing apparatus
JPH05256796A (en) Inspecting system
JP2010071951A (en) Visual inspection device and visual inspection method
JP3597387B2 (en) Image defect detection method, image defect repair method, image defect detection device, and computer-readable recording medium
JP4093426B2 (en) Inspection device, inspection method
JP2710527B2 (en) Inspection equipment for periodic patterns
JPH1049688A (en) Method for partial erasing method and partial detection method for picture data
JP4253265B2 (en) Shadow detection apparatus, shadow detection method and shadow detection program, image processing apparatus using shadow detection apparatus, image processing method using shadow detection method, and image processing program using shadow detection program
JP2006035505A (en) Method and device for inspecting printed matter
JP2004276476A (en) Printed matter inspecting device, printed matter inspecting method, printed matter inspecting processing program and recording medium having program thereon
JP2988403B2 (en) Image segmentation device
JPH04255080A (en) Image input device
JP5035443B2 (en) Image processing apparatus, image processing method, and computer program
JP4215459B2 (en) Image data comparison device, program and recording medium
JP2770637B2 (en) Pattern inspection equipment
JP2940419B2 (en) Image processing device
JP4121628B2 (en) Screen inspection method and apparatus
JP5505953B2 (en) Image discrimination system, method and program
JP4784299B2 (en) Image processing apparatus, image processing method, and computer program
JP2005205748A (en) Printed matter inspecting apparatus and printed matter inspecting method
JP2966448B2 (en) Image processing device
JPH1196355A (en) Method and device for labeling image
JPH09185683A (en) Method and device for processing image for character checking device
JP2853219B2 (en) Vehicle detection device
JPH1125219A (en) Device and method for recognizing character and recording medium

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040127

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040324

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040601

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040616

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040908

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20080917

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090917

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090917

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090917

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100917

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100917

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110917

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110917

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120917

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120917

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130917

Year of fee payment: 9

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees