JPH04152479A - Image inspecting system - Google Patents
Image inspecting systemInfo
- Publication number
- JPH04152479A JPH04152479A JP2276320A JP27632090A JPH04152479A JP H04152479 A JPH04152479 A JP H04152479A JP 2276320 A JP2276320 A JP 2276320A JP 27632090 A JP27632090 A JP 27632090A JP H04152479 A JPH04152479 A JP H04152479A
- Authority
- JP
- Japan
- Prior art keywords
- image
- signal
- circuit
- distance
- processing
- 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.)
- Pending
Links
- 230000007547 defect Effects 0.000 claims abstract description 24
- 238000007689 inspection Methods 0.000 claims abstract description 23
- 238000000034 method Methods 0.000 claims description 64
- 238000012217 deletion Methods 0.000 claims description 5
- 230000037430 deletion Effects 0.000 claims description 5
- 238000001514 detection method Methods 0.000 claims description 4
- 238000012545 processing Methods 0.000 abstract description 59
- 230000015654 memory Effects 0.000 abstract description 41
- 239000000872 buffer Substances 0.000 description 19
- 238000010586 diagram Methods 0.000 description 13
- 230000002950 deficient Effects 0.000 description 11
- 238000006243 chemical reaction Methods 0.000 description 9
- 230000002159 abnormal effect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000009499 grossing Methods 0.000 description 3
- 230000003936 working memory Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 102100039334 HAUS augmin-like complex subunit 1 Human genes 0.000 description 1
- 101100177185 Homo sapiens HAUS1 gene Proteins 0.000 description 1
- 101100014539 Neurospora crassa (strain ATCC 24698 / 74-OR23-1A / CBS 708.71 / DSM 1257 / FGSC 987) get-1 gene Proteins 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000005562 fading Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000000691 measurement method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Landscapes
- Accessory Devices And Overall Control Thereof (AREA)
- Inspection Of Paper Currency And Valuable Securities (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
【発明の詳細な説明】
[発明の目的]
(産業上の利用分野)
本発明は、画像検査方式に関し、特に、印刷物の不良を
検査する画像検査方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial Application Field) The present invention relates to an image inspection method, and particularly to an image inspection method for inspecting printed matter for defects.
(従来の技術)
画像の検査方式、特に印刷物の不良(かすれ等)の検査
技術としては、特公平1−20477号公報に記載され
たものがある。これに記載された技術によると、印刷物
の試料データを標準パターンと比較し、印刷物の良否を
判定していた。しかしながら、このような技術では、確
かに印刷物の良否は判定できるものの、印刷の欠陥の原
因を知ることが出来ないばかりか、標準パターンを検査
対象毎に作成する必要があった。(Prior Art) An image inspection method, particularly a technique for inspecting defects (fading, etc.) in printed matter, is described in Japanese Patent Publication No. 1-20477. According to the technology described in this publication, sample data of a printed matter is compared with a standard pattern to determine the quality of the printed matter. However, although such technology can certainly determine the quality of printed matter, it is not possible to know the cause of printing defects, and it is necessary to create a standard pattern for each inspection target.
一方、電子通信学会春季全国大会予稿集D−268「画
像ムラの評価アルゴリズム」 (弁上 他。On the other hand, IEICE Spring National Conference Proceedings D-268 "Evaluation algorithm for image unevenness" (Benjo et al.).
1989年)に示されるように画像の濃度情報の統計量
を調べるという技術も知られている。この技術では、欠
陥の発生している領域及び原因を詳細に検出するが出来
ないという欠点を有していた。A technique for examining the statistics of density information of an image is also known, as shown in (1989). This technique has the disadvantage that it is not possible to detect in detail the area and cause of the defect.
(発明が解決しようとする課題)
上記のように、従来の技術では、標準パターンが必要で
あったり、欠陥の発生している領域を詳細に検出するこ
とが出来ないという欠点があった。(Problems to be Solved by the Invention) As described above, the conventional techniques have the drawbacks that a standard pattern is required and that a region where a defect occurs cannot be detected in detail.
そこで、本発明は、上記欠点に鑑み、標準パターンを用
いることなく画像を検査し得る画像検査方式を提供する
ことを目的とする。SUMMARY OF THE INVENTION In view of the above drawbacks, it is an object of the present invention to provide an image inspection method capable of inspecting images without using a standard pattern.
更に、本発明は、画像の欠陥が発生している領域を詳細
に検出することが可能な画像検査方式を提供することを
目的とする。A further object of the present invention is to provide an image inspection method that can detect in detail areas where image defects have occurred.
[発明の構成]
(課題を解決するための手段)
上記目的を達成するために、第1の発明の画像検査方式
では、読取手段を含む。この読取手段は、前記画像を含
む被検査対象の表面を読取り、対応する信号に変換する
。この手段により変換された信号に対して、上記画像の
不良に起因する信号含んだ信号が分離抽出される。この
分離された信号に対応する画素から画像の輪郭又は境界
(印刷と非印刷の領域の境界)付近までの距離を求める
。この手段により得られた距離に基づき上記画像の検査
を行うことを特徴とする。[Structure of the Invention] (Means for Solving the Problem) In order to achieve the above object, the image inspection method of the first invention includes a reading means. The reading means reads the surface of the object to be inspected containing the image and converts it into a corresponding signal. From the signals converted by this means, signals including signals caused by the image defects are separated and extracted. The distance from the pixel corresponding to this separated signal to the vicinity of the outline or boundary of the image (boundary between printing and non-printing areas) is determined. The present invention is characterized in that the image is inspected based on the distance obtained by this means.
第2の発明出は、読み取った信号から、画像の不良に起
因する信号を含んだ信号を分離抽出する。The second aspect of the invention separates and extracts signals including signals caused by image defects from the read signals.
この信号(群)から画像の輪郭(又は境界)に対応する
信号を削除する。この削除の後、残像している信号から
前記画像の検査を行うものである。From this signal(s), signals corresponding to the contours (or boundaries) of the image are deleted. After this deletion, the image is inspected from the residual signal.
(作用)
読取手段により得られた信号は、被読取対象上の一像に
対応するものも含む。特に画像にかすれ、切れ等の欠陥
を含む場合、欠陥に対応する情報も上記信号に含まれて
いる。例えば、欠陥に対応する情報は、濃度の点で異常
であると共に、その発生位置が画像の輪郭又は境界(印
刷と非印刷の領域の境界)付近である点である。(Operation) The signals obtained by the reading means include those corresponding to one image on the object to be read. In particular, when the image includes defects such as blurring or cuts, information corresponding to the defects is also included in the signal. For example, the information corresponding to the defect is that the defect is abnormal in terms of density and that the position of occurrence is near the contour or boundary of the image (boundary between printed and non-printed areas).
そこで、上記読取信号から、正常ではない信号(含む欠
陥信号)を抽出する。そして、第1の発明ではこれらの
信号が境界からどの程度離間しているかを見る。欠陥信
号は、境界から離れて存在しててるので、正常な信号と
弁別が行える。Therefore, abnormal signals (including defective signals) are extracted from the read signal. Then, in the first invention, how far these signals are separated from the boundary is checked. Since defective signals exist far from the boundary, they can be distinguished from normal signals.
又、第2の発明出は、正常でない信号から境界に対応下
信号を削除するので残存した信号が、欠陥画素に対応し
た信号となる。Further, in the second aspect of the invention, since the lower signal corresponding to the boundary is deleted from the abnormal signal, the remaining signal becomes the signal corresponding to the defective pixel.
(実施例) 以下、本発明の実施例を図面に従って詳細に説明する。(Example) Embodiments of the present invention will be described in detail below with reference to the drawings.
第1図は、本実施例に係わる画像検査装置の構成を示す
図である。同図に示されるように、本画像検査装置は、
画像入力装置11を含む。この装置11は、例えばスキ
ャナーであって、そのうち部構成は図示しないが、光源
と、この光源から照射され被読取画像から反射された光
を受光し、対応する電気信号に変換する光電変換部とか
らなる。FIG. 1 is a diagram showing the configuration of an image inspection apparatus according to this embodiment. As shown in the figure, this image inspection device
It includes an image input device 11. This device 11 is, for example, a scanner, and includes a light source and a photoelectric conversion section that receives light emitted from the light source and reflected from the image to be read, and converts it into a corresponding electrical signal, although the components thereof are not shown. Consisting of
必要に応じ、この画像入力装置11は、カラー画像の読
取りが可能なカラー画像入力装置であっても良い。If necessary, the image input device 11 may be a color image input device capable of reading color images.
この画像入力装置llの出力は、濃度情報を保持した画
像信号であり、例えば、8ビツトの信号である。この信
号が、しきい値処理回路13に供給される。この回路1
3では、CPU15で設定される2つのしきい値を用い
て2値化が実行される。ただし、単純な2値化ではなく
、これら2つのしきい値の間に存在する信号に対してr
lJを与え、それ以外のものに「0」を与える。The output of this image input device 11 is an image signal holding density information, and is, for example, an 8-bit signal. This signal is supplied to the threshold processing circuit 13. This circuit 1
In step 3, binarization is executed using two threshold values set by the CPU 15. However, rather than simple binarization, r
Give lJ, and give "0" to everything else.
一方、このしきい値処理回路13から出力は、1ビツト
の信号であり、メモリ制御回路17の制御の下、第1の
2値画像メモリ19に記憶される。On the other hand, the output from the threshold processing circuit 13 is a 1-bit signal, which is stored in the first binary image memory 19 under the control of the memory control circuit 17.
尚、このメモリ制御回路17は、画像入力装置11から
の画像読取処理開始を示す信号を受取り、上記の第1の
2値画像メモリ19への記憶動作を制御する。この記憶
動作が終了した時点で、メモリ制御回路17は、終了を
示す信号をCPU15に出力L1以後、第1の2値画像
メモリ19は、CPU15の制御下に入り、信号処理に
利用される。Note that this memory control circuit 17 receives a signal indicating the start of image reading processing from the image input device 11 and controls the storage operation in the first binary image memory 19 described above. When this storage operation is completed, the memory control circuit 17 outputs a signal indicating completion to the CPU 15 L1, after which the first binary image memory 19 comes under the control of the CPU 15 and is used for signal processing.
CPU15で実行される信号処理は、プログラムメモリ
21に記憶されたプログラムに従ってなされる。このC
PU15での処理は後述するように、2値画像から、距
離画像への距離画像変換処理を含む。この変換処理によ
り得られた距離画像から、印刷かすれの画素を検出する
処理(以下かすれ検出処理と呼ぶ)を行う。尚、このか
すれ処理の際には、第2の2値画像メモリ22を利用さ
れる。Signal processing executed by the CPU 15 is performed according to a program stored in the program memory 21. This C
The processing in the PU 15 includes a distance image conversion process from a binary image to a distance image, as will be described later. From the distance image obtained through this conversion process, a process of detecting pixels with blurred printing (hereinafter referred to as blurring detection processing) is performed. Note that during this blurring process, the second binary image memory 22 is used.
距離画像に変換された画像信号は、距離画像メモリ23
に記憶される。検出された印刷かすれの画素についての
情報は、判定出力回路25に供され、外部に出力される
。上記の処理に際し、CPUI5は、作業用メモリ27
を利用して、その処理を実行する。尚、CPUI 5で
の処理に関わる構成要素(この実施例では、CPU15
、第1の21画像メモリ19、プログラムメモリ21、
距離画像メモリ23、判定出力回路25及び作業用メモ
リ27作業から成る)は、データバス29及びアドレス
バス31により接続されている。The image signal converted into a distance image is stored in the distance image memory 23.
is memorized. Information regarding the detected pixels with blurred printing is provided to the determination output circuit 25 and output to the outside. During the above processing, the CPU 5 uses the working memory 27
Execute the process using . Note that the components related to the processing in the CPU 5 (in this embodiment, the CPU 15
, first 21 image memory 19, program memory 21,
The distance image memory 23, the judgment output circuit 25, and the working memory 27 are connected by a data bus 29 and an address bus 31.
次に上記CPU15での処理について説明する。Next, the processing by the CPU 15 will be explained.
上記したように、CPU15での処理は、距離画像変換
処理、かすれ検出処理であるが、予備処理として、しき
い値処理回路13での2つのしきい値を求める処理を行
う。この2つのしきい値は、例えば、画像入力装置11
で得られた画像信号の濃度生起開度から求める方法があ
る。この方法では、濃度ヒストグラムを求め、この濃度
ヒストグラムトから2つのしきい値を設定するのである
。As described above, the processing performed by the CPU 15 is the distance image conversion processing and the blur detection processing, and as preliminary processing, the threshold processing circuit 13 performs processing for obtaining two threshold values. These two threshold values are, for example,
There is a method of determining the density occurrence opening degree of the image signal obtained in . In this method, a density histogram is obtained and two threshold values are set from this density histogram.
本実施例で濃度とは、読取対象から反射される光量に比
例した物理量を・指しており、ここでの濃度が低いとい
うことは、より黒色に近く、濃度が高いとは、より白色
に近いことを示している。又、この実施例では濃度を表
す画像信号を上記のように8ビツトで表現している。In this example, density refers to a physical quantity that is proportional to the amount of light reflected from the object to be read, where a low density means closer to black, and a higher density means closer to white. It is shown that. Further, in this embodiment, the image signal representing density is expressed in 8 bits as described above.
ここでのしきい値設定の方法について第2図を用いて説
明する。今、濃度ヒストグラムをh (x)で表現する
。これは、濃度Xのものがh (x)あることを示して
いる。尚、Xは、0〜255の値となっている。この濃
度ヒストグラムh (x)に対して、平滑化処理を施す
。ノイズ除去のためである。この平滑化処理は、単純加
算平均により実現され、平滑化処理後の濃度ヒストグラ
ムをha(X)とすると
ha (x)= (h (x−1) +2h (X)+
h (x+1) ) /4
と表現される。The method of setting the threshold value here will be explained using FIG. 2. Now, the density histogram is expressed by h(x). This shows that there are h (x) things of concentration X. Note that X has a value of 0 to 255. A smoothing process is performed on this density histogram h (x). This is for noise removal. This smoothing process is realized by simple averaging, and if the density histogram after the smoothing process is ha(X), ha (x)= (h (x-1) +2h (X)+
It is expressed as h (x+1) ) /4.
この濃度ヒストグラムha (x)に対して、最小の濃
度値X m l sと最大値X saヨの中間値である
(X、+、+X、、、)/2を境界に2つの領域Ra及
びRbとに分割する。それぞれの領域Ra及びRb内で
頻度値の最大値を与える濃度値(以後ピーり濃度PP及
びPBとと呼ぶ)を検出する。ここで、領域Raは、濃
度の低い信号の領域であり、画像部(印刷が施された領
域)に対応している。この領域Raを以下では印字領域
と呼ぶ。又、領域Rbは、背景部(上記の画像部以外の
領域を指す。)に対応している。ここでは、この領域R
bを背景領域と呼ぶ。For this density histogram ha (x), two areas Ra and Rb. Density values (hereinafter referred to as pealing densities PP and PB) that give the maximum frequency value within the respective regions Ra and Rb are detected. Here, the area Ra is a low-density signal area and corresponds to the image area (printed area). This area Ra is hereinafter referred to as a print area. Further, the region Rb corresponds to the background portion (referring to the region other than the above-mentioned image portion). Here, this area R
b is called the background area.
次に、濃度ヒストグラムから上記印字領域Ra及び背景
領域Rbの濃度頻度の標準偏差σ、及びσ、とを求める
。Next, standard deviations σ and σ of the density frequencies of the print area Ra and background area Rb are determined from the density histogram.
すると、
σ、−Σ (h(i)−^VEa) ” /Σ 1−
1 R−
a b −X (h (i ) AVEb
) 2/ Σまただし、
^VEa−Σ h(t)/Σ 1
AVEb−Σh (i) /E 1となる。Then, σ, −Σ (h(i)−^VEa) ” /Σ 1−
1 R- a b -X (h (i) AVEb
) 2/ Σ However, ^VEa-Σ h(t)/Σ 1 AVEb-Σh (i) /E 1.
このようなピーク濃度値PP及びPB並びに標準偏差σ
、及びσ、とから、2つのしきい値TL及びTIとを以
下のように決定する。Such peak concentration values PP and PB and standard deviation σ
, and σ, two threshold values TL and TI are determined as follows.
TL−PP+A*σ。TL-PP+A*σ.
TH−PB −B *σ。TH-PB-B*σ.
ここで定数A、Bは、実験的に求めることになるが、本
発明者の実験では、3乃至5の範囲が好ましいことがわ
かっている。上記のようにして、2つのしきり値TL
、 T)lが求まる。この2つのしきい値を求める他の
方法については、後述する。Here, the constants A and B are determined experimentally, and the inventor's experiments have shown that a range of 3 to 5 is preferable. As above, two threshold values TL
, T)l is found. Other methods for determining these two thresholds will be described later.
次に、処理の実際について、第3図に基づいて説明する
。まず、画像入力装置11の動作開始に伴い、メモリ制
御回路17の制御の下、2値画像が2値画像メモリ19
に順次記憶される(ステップ1)。上記したように、し
きい値回路13での2値化は、2つのしきい値TL及び
T)Iの間に存在する濃度の信号に「1」を与え、それ
以外のものに「0」を与える。例えば、14図(A)の
ような数字「0」を印刷したものを、点線りに沿って読
み取った場合、同図(B)中の曲線Cのような信号が得
られる。同図(B)では、横軸が位置で、縦軸が濃度で
ある。この信号に対して、しきい値TL及びTIが図示
の如く設定されている。よって、しきい値回路13にお
いて出力され、第1の2値画像メモリ19に記憶される
信号は、しきい値TL及びTHの間のものに対応してい
る。よって、第3図からもわかるように、しきり値回路
13の出力は、画像の輪郭に対応したものと、画像の欠
陥(と思われるもの)に対応したものとからなる。Next, the actual process will be explained based on FIG. 3. First, as the image input device 11 starts operating, a binary image is stored in the binary image memory 19 under the control of the memory control circuit 17.
(step 1). As described above, the binarization in the threshold circuit 13 gives "1" to the signal with a concentration existing between the two thresholds TL and T)I, and gives "0" to the other signals. give. For example, when a printed number "0" as shown in FIG. 14(A) is read along the dotted line, a signal such as curve C in FIG. 14(B) is obtained. In the same figure (B), the horizontal axis is the position, and the vertical axis is the density. Threshold values TL and TI are set for this signal as shown. Therefore, the signal output from the threshold circuit 13 and stored in the first binary image memory 19 corresponds to the signal between the threshold values TL and TH. Therefore, as can be seen from FIG. 3, the output of the threshold value circuit 13 consists of one that corresponds to the outline of the image and one that corresponds to (what appears to be) a defect in the image.
次に、ステップ1で得られた2値画像から距離画像への
変換が施される(ステップ2)。このステップ2の処理
は、後で詳述するが、原画像の境界(輪郭)からの距離
で、2値画像の各点を表現するものである。Next, the binary image obtained in step 1 is converted into a distance image (step 2). The process in step 2 will be described in detail later, but each point of the binary image is expressed by the distance from the boundary (contour) of the original image.
距離画像への変換の後、所定距離以上の距離値を有する
画素数を計数する(ステップ3)。この計数結果により
、原画像の境界から所定距離以上内部にある不良画素の
数が分かる。よって、この結果から印刷品質を判定する
(ステップ4)。これで全体の検査処理が終了する。After conversion to a distance image, the number of pixels having a distance value greater than or equal to a predetermined distance is counted (step 3). From this counting result, the number of defective pixels located within a predetermined distance or more from the boundary of the original image can be determined. Therefore, print quality is determined from this result (step 4). This completes the entire inspection process.
次に、ステップ2の距離画像への変換処理について第5
図に従って説明する。Next, regarding the conversion process to a distance image in step 2, the fifth
This will be explained according to the diagram.
処理の概要をまず説明する。上記したように、処理の対
象である2値画像(第1の2値画像メモリ19に記憶さ
れている)は、画像の輪郭に対応する信号と、画像の欠
陥に対応したものとからなる。これらの信号の内、画像
の輪郭に対応した信号は、「画像」を細めていけば、す
ぐに消滅する。First, an overview of the processing will be explained. As described above, the binary image to be processed (stored in the first binary image memory 19) consists of signals corresponding to the contours of the image and signals corresponding to defects in the image. Among these signals, the signal corresponding to the outline of the image disappears as soon as the "image" is narrowed.
これに対して、画像の欠陥に対応したものは、画像を細
めてもすぐには消滅しない。通常、画像の欠陥は、画像
の輪郭近傍に発生しているからである。ここで輪郭出は
印刷領域と非印刷領域の境界を意味する。このような特
性に着目し、以下の処理では、画像の細め処理を繰り返
し、残留する画素に対して、その細目処理の回数を記憶
し、この回数を距離画像値とする。On the other hand, defects in the image do not disappear immediately even if the image is narrowed down. This is because image defects usually occur near the outline of the image. Here, outline means the boundary between the printing area and the non-printing area. Focusing on such characteristics, in the following processing, the image narrowing process is repeated, and the number of times the narrowing process has been performed is stored for the remaining pixels, and this number is used as a distance image value.
上記のような処理を具体的に説明する。この処理で用い
る変数としては、1% Js距離画像d(i、j)を利
用する。ただし、
0 ≦ i < WIDTHO≦
j < HEIGHTである。ここで、W
IDTHは、画像入力装置11で読取った画像の幅を表
し、HEIGHTは、同画像の高さを表す。これらの情
報は、画像入力装置11から得られる。The above processing will be explained in detail. The 1% Js distance image d(i, j) is used as a variable in this process. However, 0≦i<WIDTHO≦
j < HEIGHT. Here, W
IDTH represents the width of the image read by the image input device 11, and HEIGHT represents the height of the image. This information is obtained from the image input device 11.
まず、ステップ2−1として、上記の距離画像d(i、
j)を初期化する。すなわち、d (i、 j) −
〇
と設定する。First, as step 2-1, the above distance image d(i,
Initialize j). That is, d (i, j) −
Set as 〇.
次に、変数「細め処理回数」nを1に設定する(ステッ
プ2−2)。次に、距離変換操作フラグfを0に設定す
る(ステップ2−3)。変換処理の対象となる画素を特
定するため、変数として画像垂直位置yを導入し、y−
1と設定する(ステップ2−4)。同様に、変数として
画像水平位置Xを導入し、X−1と設定する(ステップ
2−5)これらの設定の後、第1の2値画像メモリ19
に記憶された画像の値が、1か否かをチエツクする(ス
テップ2−6)。具体的には、第1の2値画像メモリ1
9に記憶された画素の内、変数(x。Next, the variable "narrowing processing number" n is set to 1 (step 2-2). Next, the distance conversion operation flag f is set to 0 (step 2-3). In order to identify the pixel to be subjected to the conversion process, we introduce the image vertical position y as a variable, and y−
1 (step 2-4). Similarly, the image horizontal position X is introduced as a variable and set to X-1 (step 2-5). After these settings, the first binary image memory 19
It is checked whether the value of the image stored in is 1 (step 2-6). Specifically, the first binary image memory 1
Among the pixels stored in 9, the variable (x.
’り−(1,1)で指定される画素の値を呼び出す。こ
の呼び出された画素の値が1であるか否かをチエツクす
る。チエツクの結果、第1の2値画像メモリ19に記憶
された画素の値が1でない場合、変換画像g (x、y
)を0に設定する(ステップ2−7)。この場合は、第
1の2値画像メモリ19に記憶された画素の値が0であ
るから、欠陥等が存在しないので、変換画像も0である
。' Recall the value of the pixel specified by (1, 1). Check whether the value of this called pixel is 1 or not. As a result of the check, if the value of the pixel stored in the first binary image memory 19 is not 1, the converted image g (x, y
) is set to 0 (step 2-7). In this case, since the value of the pixel stored in the first binary image memory 19 is 0, there is no defect or the like, so the converted image is also 0.
このステップ2−7の後、次の画素のチエツクに移行す
る。まず、変数Xに1を加算する(ステップ2−8)、
変数Xが、(WIDTH−1)より小さいか否かチエツ
クする(ステップ2−9)。After this step 2-7, the process moves on to checking the next pixel. First, add 1 to variable X (step 2-8),
Check whether variable X is smaller than (WIDTH-1) (step 2-9).
変数Xが、(WIDTH−1)より小さかったら、ステ
ップ2−6に飛び、ステップ2−8までを繰り返す。If the variable X is smaller than (WIDTH-1), the process jumps to step 2-6 and repeats steps 2-8.
ステップ2−9において、変数Xが、(WIDTH−1
)と等しいか又は大きくなった場合、変数yに1を加算
する(ステップ2−10)。ここで、yが(HE I
GET−1)より小さいか否かをチエツクする(ステッ
プ2−11)。yが(HE I GHT−1)より小さ
いかったら、ステップ2−5に戻り、ステップ2−10
までを繰り返し、yが(HE IGHT−1)と等しい
か大きくなった時に、ステップ2−12に移る。移った
時点で、読取画像全面に対する処理が終了することにな
る。In step 2-9, the variable X is (WIDTH-1
), 1 is added to the variable y (step 2-10). Here, y is (HE I
GET-1) is checked (step 2-11). If y is smaller than (HE I GHT-1), return to step 2-5 and step 2-10
Repeat the steps up to this point, and when y becomes equal to or larger than (HEIGHT-1), proceed to step 2-12. At this point, the processing for the entire read image ends.
一方、ステップ2−6において、参照した(呼び出した
)2値画像の値が「1」の場合、第6図に示されるよう
に、参照した画素の周囲の画素が「1」か否かをチエツ
クする(ステップ2−13)。すなわち、
f (x−1,)’) −1■
かつ f (x+1.V) −1■
かつ f (x、 y−1) −1■かつ f (x
、y+1)−1■
をチエツクする。上式を満足しない場合、注目画素の1
つ隣は、正常な画素ということになる。On the other hand, in step 2-6, if the value of the referenced (called) binary image is "1", as shown in FIG. Check (step 2-13). That is, f (x-1,)') -1■ and f (x+1.V) -1■ and f (x, y-1) -1■ and f (x
, y+1)-1■. If the above formula is not satisfied, 1 of the pixel of interest
The next pixel is a normal pixel.
逆にいえば、正常画素に濃度値0の画素が隣設している
ことになる。In other words, a pixel with a density value of 0 is adjacent to a normal pixel.
よって、この場合には、ステップ2−13に引き続き、
変換画像g (x、y)を0に設定する(ステップ2−
14)。このステップにより、第1の2値画像メモリ1
9内で「1」として記憶されていたものでも■〜■式全
て満足されなければ「0」に変換される。これは、細め
処理を実行した結果により、画像が削除されることを示
している。この結果は、第2の2値画像メモリ22に記
憶される。Therefore, in this case, following step 2-13,
Set the converted image g (x, y) to 0 (step 2-
14). Through this step, the first binary image memory 1
Even if the value is stored as ``1'' in 9, it will be converted to ``0'' if all formulas 1 to 2 are not satisfied. This indicates that the image will be deleted as a result of the narrowing process. This result is stored in the second binary image memory 22.
次に、距離画像d (x、y)として細め処理回数nを
割当てる(ステップ2−15)。これは、ステップ2−
13において、隣接する画素が「0」であることから、
細め処理により、注目画素(x。Next, the number of narrowing processes n is assigned as the distance image d (x, y) (step 2-15). This is step 2-
In 13, since the adjacent pixel is "0",
By narrowing processing, the pixel of interest (x.
y)の「1」が消滅するので、これまでの細め処理の回
数が、注目画素から正常な画素(しきい値処理回路13
により、明瞭に背景又は印刷部分であると判断された画
素)までの距離になる。続いて、操作フラグfを「1」
に設定する(ステップ2−16)。この後、ステップ2
−8に復帰する。y) disappears, the number of narrowing processes up to now is reduced from the pixel of interest to the normal pixel (threshold processing circuit 13).
This is the distance to a pixel that is clearly determined to be a background or printed part. Next, set the operation flag f to "1"
(Step 2-16). After this, step 2
Return to -8.
一方、ステップ2−13において、■乃至■までを満足
する場合、変換画像g (x、y)を「1」に設定する
(ステップ2−17)。これは、注目画素の周囲の画素
も「1」であるから、注目画素がこれまでの細め処理に
よって、2値画像の境界にはならないからである。この
場合には、変換画像g (x、y)を依然として「1」
としておくのである。このステップ2−17の後、やは
りステップ2−8に復帰する。On the other hand, in step 2-13, if conditions (1) to (2) are satisfied, the converted image g (x, y) is set to "1" (step 2-17). This is because the pixels surrounding the pixel of interest are also "1", so the pixel of interest does not become a boundary of the binary image due to the previous thinning process. In this case, the transformed image g (x, y) is still “1”
I'll leave it as that. After this step 2-17, the process returns to step 2-8.
ステップ2−12においては、変換画像g (x。In step 2-12, the converted image g (x.
y)の値をf (x、y)にコピーする(ステップ2−
12)。引き続き、距離画像に変換する場合、置換され
たf (x、y)が原画像となる。この後、細め処理回
数nに1を加算する(ステップ2−18)。更に、操作
フラグfが1であるか否かをチエツクする(ステップ2
−19)。操作フラグfが1の場合、ステップ2−3に
戻る。Copy the value of y) to f (x, y) (Step 2-
12). When subsequently converting to a distance image, the replaced f (x, y) becomes the original image. After that, 1 is added to the number of times n of narrowing processing (step 2-18). Furthermore, it is checked whether the operation flag f is 1 (step 2).
-19). If the operation flag f is 1, the process returns to step 2-3.
ステップ2−16についての説明で言及したように、操
作フラグfが1に設定されるのは、更に細め処理が続行
される場合であり、これは、今回の細め処理によっては
、2値画像の中の「1」が削除されないからである。As mentioned in the explanation of step 2-16, the operation flag f is set to 1 when the thinning process is continued, and this means that depending on the current thinning process, the binary image This is because the "1" inside is not deleted.
ステップ2−19において、操作フラグfが「1」でな
い場合、すなわち「0」の場合には、画像全面に渡って
、距離画像への変換が終了したことを示す。以上で、第
2図に示すステップ2の処理が終了した。In step 2-19, if the operation flag f is not "1", that is, if it is "0", this indicates that the entire image has been converted into a distance image. With this, the process of step 2 shown in FIG. 2 has been completed.
例えば、第7図のような入力画像の場合、2値画像メモ
リ19の内容は第8図のようになる。この2値画像に対
して、上記処理により、第9図のような距離画像が得ら
れる。第8図のような2値画像の場合、数字「0」の右
部分にかすれが発生している。これに対応して、第9図
では、距離画像「2」の部分が発生している。For example, in the case of an input image as shown in FIG. 7, the contents of the binary image memory 19 are as shown in FIG. By performing the above processing on this binary image, a distance image as shown in FIG. 9 is obtained. In the case of a binary image as shown in FIG. 8, blurring occurs on the right side of the number "0". Correspondingly, in FIG. 9, a portion of distance image "2" is generated.
この後、特定画素の計数処理に移る。第10図に示され
るように、まず、変数として、欠陥画素数pを「0」に
設定する(ステップ3−1)。次に、画像垂直位置yを
「1」に設定する(ステップ3−2)。画像水平位置X
を「1」に設定する(ステップ3−3)。After this, the process moves to counting specific pixels. As shown in FIG. 10, first, the number p of defective pixels is set to "0" as a variable (step 3-1). Next, the image vertical position y is set to "1" (step 3-2). Image horizontal position
is set to "1" (step 3-3).
ここで、上記のステップ2で求めた距MiifI像d(
x、y)が所定のしきいM T)IRと比較する(ステ
ップ3−4)。距離画像d (x、y)がしきい値TH
Rより大きい場合、上記変数pに1を加算する(ステッ
プ3−5)。このしきい値との比較により、画像の境界
より離れているものを選択する。Here, the distance MiifI image d(
x, y) are compared with a predetermined threshold MT)IR (step 3-4). The distance image d (x, y) is the threshold value TH
If it is larger than R, 1 is added to the variable p (step 3-5). By comparing with this threshold value, the one that is farther away from the image boundary is selected.
次に、上記画像垂直位置Xに「1」を加算する(ステッ
プ3−6)。一方、ステップ3−4に於いて、距離画像
d (x、y)がしきい値TIILと等しいか又は大き
い場合、このステップ3−6に直接移行する。上記第9
図の場合、しきい値TI(L −1と設定する。Next, "1" is added to the image vertical position X (step 3-6). On the other hand, if the distance image d (x, y) is equal to or larger than the threshold TIIL in step 3-4, the process directly proceeds to step 3-6. No. 9 above
In the case of the figure, the threshold value TI (L −1 is set).
この後、画像垂直位置Xが(VIDT)I−1)より小
さいか否かチエツクする(ステップ3−7)。Thereafter, it is checked whether the image vertical position X is smaller than (VIDT)I-1) (step 3-7).
Xが(WIDTH−1)より小さい場合、ステップ3−
4に戻り、以後のステップを繰り返す。これにより、対
象画像の水平部分の検査が完了する。If X is less than (WIDTH-1), step 3-
Return to step 4 and repeat the following steps. This completes the inspection of the horizontal portion of the target image.
ステップ3−7において、画像垂直位置XがVIDTI
I−1と等しいか大きい場合、今度は画像垂直位置yに
「1」を加算する(ステップ3−8)。In step 3-7, the image vertical position
If it is equal to or larger than I-1, then "1" is added to the image vertical position y (step 3-8).
そして、この画像垂直位置yが(HEIGHT −1)
より小さいか否かチエツクする(ステップ3−9)。画
像垂直位置yが(HEIC)IT −1)より小さい場
合、ステップ3−3に戻り、以後のステップを繰り返す
。ステップ3−9において、画像垂直位置yが()IP
IGHT〜1)と等しいか大きい場合、対象画像の垂直
方向の検査が終了したことになる。Then, this image vertical position y is (HEIGHT -1)
Check whether it is smaller (step 3-9). If the image vertical position y is smaller than (HEIC)IT -1), return to step 3-3 and repeat the subsequent steps. In step 3-9, the image vertical position y is set to ()IP
If it is equal to or greater than IGHT~1), then the vertical inspection of the target image has been completed.
続いてステップ4に移行する。まず、上記で得られた変
数pと判定値と比較する(ステップ4−1)。変数pが
判定値より大きい場合、すなわち、距離面@d (x、
y)が大きいものの数が判定値より大きい場合、欠陥画
素があると判定する(ステップ4−2)。すなわち、「
欠°陥」という判定出力をする。Next, the process moves to step 4. First, the variable p obtained above is compared with the determination value (step 4-1). When the variable p is larger than the judgment value, that is, the distance plane @d (x,
If the number of pixels with large y) is larger than the determination value, it is determined that there is a defective pixel (step 4-2). In other words, “
The judgment output is “defect”.
一方、ステップ4−1において、変数pが判定値より小
さいか等しい場合、欠陥画素がない、すなわち、「正常
」と判定出力する(ステップ4−3)。以上の処理によ
り、画像の検査が終了した。On the other hand, if the variable p is smaller than or equal to the determination value in step 4-1, a determination is made that there is no defective pixel, that is, "normal" (step 4-3). With the above processing, the image inspection has been completed.
他の実施例
次に、第11図に従って、第2の実施例について説明す
る。画像入力装置11からの入力画像は、マスク処理回
路101に供給される。画像入力装置11から出力され
る信号は、上記の実施例と同様に、濃淡画像を表した多
値信号で表ある。Other Embodiments Next, a second embodiment will be described with reference to FIG. An input image from the image input device 11 is supplied to a mask processing circuit 101 . The signal output from the image input device 11 is a multivalued signal representing a grayscale image, as in the above embodiment.
上記マスク処理回路101は、入力された画像信号に対
して、輪郭強調の処理が施される。具体的処理としては
、後述するように、ラプラシアン処理が施される。この
輪郭強調された画像信号に対して、第3のしきい値回路
103により、2値画像に変換され、順次2値画像メモ
リ105に記憶される。The mask processing circuit 101 performs contour enhancement processing on the input image signal. As specific processing, Laplacian processing is performed as described later. This edge-enhanced image signal is converted into a binary image by the third threshold circuit 103 and sequentially stored in the binary image memory 105.
一方、画像人力装置11から出力された多値信号は、第
4のしきい値回路107により、第1の実施例のしきい
値回路13と同様に、2つのしきい値TL及びTHによ
り、背景部分及び印刷部分とに含まれない画像を2値画
像として抽出する。この結果は、2値画像メモリ109
に記憶される。On the other hand, the multivalued signal output from the human-powered image device 11 is processed by the fourth threshold circuit 107 using two threshold values TL and TH, similar to the threshold circuit 13 of the first embodiment. Images that are not included in the background part and the printed part are extracted as binary images. This result is stored in the binary image memory 109
is memorized.
以上の処理に際して、タイミング等の制御は、メモリ制
御回路111により実行される。このメモリ制御回路1
11では、画像入力装置11の動作に伴い、制御クロッ
クを2値画像メモリ105および107に供給する。During the above processing, control such as timing is executed by the memory control circuit 111. This memory control circuit 1
11, a control clock is supplied to the binary image memories 105 and 107 as the image input device 11 operates.
一方、この本実施例の検査装置も、CPUll3を含む
。このCPU113は、プログラムメモリ115に記憶
されたプログラムに従って、後述する。所定の処理を実
行する。上記2値画像メモリ105及び109への2値
信号の収容が完了した時点で、画像入力に伴う処理から
CPU113での処理に移行する。CPU113の処理
に際しては、2値画像メモリ105及び107は、CP
U113の制御下に入る。又、CPUI 13の処理中
に、発生するデータ、信号は、作業用メモリ117に記
憶される。又、CPU113での特定処理の結果は、第
3の2値画像メモリ118に記憶される。そして、この
CPU113の処理の結果たる判定結果は、判定出力回
路119に供給され、外部に出力される。On the other hand, the inspection device of this embodiment also includes CPUll3. This CPU 113 will be described later in accordance with a program stored in the program memory 115. Execute predetermined processing. When the storage of the binary signals into the binary image memories 105 and 109 is completed, processing associated with image input is shifted to processing by the CPU 113. During processing by the CPU 113, the binary image memories 105 and 107 are
It comes under the control of U113. Further, data and signals generated during processing by the CPU 13 are stored in the working memory 117. Further, the results of the specific processing performed by the CPU 113 are stored in the third binary image memory 118. The determination result as a result of the processing by the CPU 113 is supplied to the determination output circuit 119 and output to the outside.
第12図に従って、マスク処理回路101の詳細につい
て説明する。画像入力装置11がら出力される多値画像
信号、例えば8ビツトのシリアル信号、がjラインバッ
ファ201に供給される。Details of the mask processing circuit 101 will be explained according to FIG. 12. A multivalued image signal, such as an 8-bit serial signal, output from the image input device 11 is supplied to a j-line buffer 201.
このjラインバッファ201は、3画素分の信号が記憶
される。例えば、注目画素として、jラインの3画素(
i、j)、(i−1,j)及び(i−2,j)を例とし
て上げると、3画素の信号f(i、j)、f (i−1
,j)、f (i−2,j)が同時に記憶されていく。This j-line buffer 201 stores signals for three pixels. For example, the 3 pixels on the j line (
Taking 3 pixel signals f (i, j), (i-1, j) and (i-2, j) as an example, f (i-1
, j) and f (i-2, j) are stored simultaneously.
一方、(j−1)ラインを構成する全信号は、上記jラ
イン目のデータ入力時には、既に画像入力装置11から
の出力が完了しており、これが(j−1)ラインバッフ
ァ203に記憶されている。このラインバッファ203
への書込み、読出し制御は、上記jラインバッファ20
1への書込み動作にリンクし、以下のようになされる。On the other hand, all the signals constituting the (j-1) line have already been output from the image input device 11 when the j-th line data is input, and are stored in the (j-1) line buffer 203. ing. This line buffer 203
Writing and reading control to the j-line buffer 20
1, and is done as follows.
すなわち、今、f (i、j)に対応する画素信号が、
入力装置11から供給される場合には、まず、その前タ
イミングで(j−1)ラインバッファ203から、画素
(i、j−1)に対応する画素信号f (i、 j−
1)が呼び出され、(j−1)ラインシフトレジスタ2
05及びラッチ回路207に書き込ま゛れる。(j−1
)ラインシフトレジスタ205には、データを順次右方
向にシフトさせながら書込みがなされる。ラッチ回路2
07に書き込まれたデータは、(j−2)ラインバッフ
ァ209に記憶される。That is, now the pixel signal corresponding to f (i, j) is
When supplied from the input device 11, the pixel signal f (i, j-
1) is called and (j-1) line shift register 2
05 and the latch circuit 207. (j-1
) Data is written to the line shift register 205 while being sequentially shifted to the right. Latch circuit 2
The data written in 07 is stored in the (j-2) line buffer 209.
以上のラインシフトレジスタ201.205及び211
に対して、特定のビット群、すなわち、バイト単位のデ
ータが読出される。すなわち、ラインシフトレジスタ2
01の2バイト目、(j−1)ラインシフトレジスタ2
05の1及び、3バイト目が、(j−2)ラインシフト
レジスタ211の2バイト目が、夫々、読み出され、加
算器213に供給される。この加算器213では、4つ
の入力が夫々加算され、その結果が出力される。Above line shift registers 201, 205 and 211
, a specific bit group, that is, data in byte units is read out. That is, line shift register 2
2nd byte of 01, (j-1) line shift register 2
The first and third bytes of 05 and the second byte of the (j-2) line shift register 211 are read out and supplied to the adder 213, respectively. This adder 213 adds the four inputs, and outputs the result.
この出力は、例えば11ビツトで表現される。This output is expressed, for example, in 11 bits.
この加算器213の出力は、加算器215において、オ
フセット、例えば128、との加算が施される。この加
算器215の出力は、12ビツトで表現される。一方、
(j−1)ラインシフトレジスタ205からは、2バイ
ト目のデータが、2ビツトシフト回路217を介して読
み出される。The output of this adder 213 is added with an offset, for example 128, in an adder 215. The output of this adder 215 is expressed in 12 bits. on the other hand,
(j-1) The second byte of data is read from the line shift register 205 via the 2-bit shift circuit 217.
この2ビツトシフト回路217により、(j−1)ライ
ンシフトレジスタ205の2バイト目のデータ、すなわ
ちf (i−1,j−1)に対応するブタは、4倍され
る。このデータは、減算器219にて、加算器215の
出力から減算される。この減算器219の出力は、12
ビツトで出力され、リミッタ221により、8ビツトデ
ータとして出力される。このリミッタ221では、入力
値と所定値、この場合、8ビツトの制限より255、と
比較され、小さいものを出力する。この出力画像が、(
i−1,j−1)の画素に対するラプラシアンとなる。By this 2-bit shift circuit 217, the data of the second byte of the (j-1) line shift register 205, that is, the data corresponding to f (i-1, j-1), is multiplied by four. This data is subtracted from the output of adder 215 in subtracter 219 . The output of this subtracter 219 is 12
The data is output in bits, and the limiter 221 outputs it as 8-bit data. This limiter 221 compares the input value with a predetermined value, in this case 255 due to the 8-bit limit, and outputs the smaller one. This output image is (
This is the Laplacian for the pixel i-1, j-1).
さて、上記処理の数学的表現を裏付けると、加算器21
3及215ならびに減算器219での処理は、
g (i−1,j−1)
−128+ (f (i−1,j−2)十f (i−
2,j−1)
十f(i、j−1)
+f (i−1,j) 1
−4f (i−1,j−1)
となる。尚、本実施例でのラプラシアン処理では、第1
3図に示されるように、3×3の画素群に対して、中央
の注目画素(上記の例では(i−1゜J−1)に対して
周囲の4画素の加算値とを比較する処理として実行され
る。Now, to support the mathematical expression of the above processing, the adder 21
3 and 215 and the subtractor 219 are g (i-1, j-1) -128+ (f (i-1, j-2) + f (i-
2, j-1) 10f(i, j-1) +f (i-1, j) 1 -4f (i-1, j-1). Note that in the Laplacian processing in this embodiment, the first
As shown in Figure 3, for a 3×3 pixel group, the central pixel of interest (in the above example, (i-1°J-1)) is compared with the sum of the four surrounding pixels. Executed as a process.
又、リミッタ221での処理は、
h (i−1,j−1)
−min (255,g (i−1,j−1))と表現
される。min (A、B)は、AとBのうち小さなも
のを選択する関数である。Further, the processing by the limiter 221 is expressed as h (i-1, j-1) -min (255, g (i-1, j-1)). min (A, B) is a function that selects the smaller one of A and B.
更に、3つのシフトレジスタ201.205及び211
及び2つのラインバッファ203及び209でのデータ
の記憶状態について第14図乃至第16図に基づいて説
明する。この制御を司るのが、後述するように制御回路
223である。第14図及び第15図は、シフトレジス
タ201,205及び211に記憶されるデータの画素
を表している。第14図は、読取対象上の座標を意識し
て作成した図であり、右に行けば行くほど、又下に行け
・ば行くほど、座標値が大きくなっている。Furthermore, three shift registers 201, 205 and 211
The storage state of data in the two line buffers 203 and 209 will be explained based on FIGS. 14 to 16. The control circuit 223 is in charge of this control, as will be described later. 14 and 15 represent pixels of data stored in shift registers 201, 205 and 211. FIG. 14 is a diagram created with the coordinates on the object to be read in mind, and the coordinate values become larger as you go to the right or down.
同図中、最下位行の(i−2,3)、(i−1゜j)、
(i、j)の画素に対応するデータは、jラインシフト
レジスタ205に記憶されている。In the figure, the lowest row (i-2, 3), (i-1゜j),
Data corresponding to the pixel (i, j) is stored in the j-line shift register 205.
同様に、中央の行は(j−1)ラインシフトレジスタ2
05、最上位行は(j−2)ラインシフトレジスタ21
1に、それぞれ記憶されている。シフトレジスタ201
.205.211のシフト方向に沿って書き直したもの
が、第15図である。Similarly, the center row is (j-1) line shift register 2
05, the top row is (j-2) line shift register 21
1, respectively. shift register 201
.. FIG. 15 is a redrawn version of 205.211 along the shift direction.
第14図及び第15図共に、内容は同一である。The contents of both FIG. 14 and FIG. 15 are the same.
次に、第16図に従って上記制御の内、(j−1)ライ
ンバッファ207の動作制御を中心に説明する。制御回
路223では、動作クロックとして、データ基準クロッ
ク及びこのデータ基準クロックの周波数の8倍の周波数
である8倍データ基準クロックを生成出力する。所定の
データ基準クロックの立上りに同期して、N−1)ライ
ンバッファ203に対するアドレスデータを、制御回路
223が供給出力する。注目画素を(i、j)とした場
合、このアドレスデータは、(1,J−1)に対応した
ものとなっている。Next, among the above controls, the operation control of the (j-1) line buffer 207 will be mainly explained according to FIG. The control circuit 223 generates and outputs, as an operating clock, a data reference clock and an 8x data reference clock having a frequency eight times the frequency of the data reference clock. The control circuit 223 supplies and outputs address data for the N-1) line buffer 203 in synchronization with the rise of a predetermined data reference clock. When the pixel of interest is (i, j), this address data corresponds to (1, J-1).
このアドレスデータに対して、制御回路223から(j
−1)ラインバッファ203に対して、読み出し信号を
供給する。これにより、(it j−1)に対応した
データが、ラインバッファ203から読み出され、(j
−1)ラインシフトレジスタ205及びラッチ回路20
8に供給される。For this address data, the control circuit 223 sends (j
-1) Supply a read signal to the line buffer 203. As a result, the data corresponding to (it j−1) is read from the line buffer 203, and the data corresponding to (j
-1) Line shift register 205 and latch circuit 20
8.
尚、(j−2)ラインバッファ209に対しては、上記
と同一タイミングで、(t、j−2)の画素に対応する
( j −2)ラインバッファ209内のアドレスが供
給されると共に、メモリ読み出し信号も(j−2)ライ
ンバッファ209に供給される。従って、第16図に示
される左端のデータ基準クロックの供給に対応して、(
j−1)及び(j−2)ラインバッファ203及び20
9からは、(i、j−1)、(f、j−2)に対応する
画素信号が夫々読み出された状態となる。ラッチ回路2
07には、(j−1)ラインバッファ203から読み出
された上記データがラッチされている。次に、左端のデ
ータ基準クロックに対して、5個目の8倍データ基準ク
ロックに同期して、次に書込むデータが(j−1)及び
(j−2)ラインバッファ203及び209並びにj、
(j−1)(j−2)ラインシフトレジスタ201.2
05及び211に供給される。具体的にいえば、(i、
j)に対応する画素信号が、jラインシフトレジスタ2
01及び(j−1)ラインシフトレジスタ203に供給
される。(j−2)ラインバッファ209に対しては、
ラッチ回路207を介して(i、j−1)に対応する画
素信号が供給される。(j−1)ラインシフトレジスタ
205に対しては、(j−1)ラインバッハア203か
ら、(i、j−1)に対応した画素信号が供給される。Note that the address in the (j-2) line buffer 209 corresponding to the pixel (t, j-2) is supplied to the (j-2) line buffer 209 at the same timing as above, and A memory read signal is also supplied to the (j-2) line buffer 209. Therefore, in response to the supply of the leftmost data reference clock shown in FIG.
j-1) and (j-2) line buffers 203 and 20
9, the pixel signals corresponding to (i, j-1) and (f, j-2) are respectively read out. Latch circuit 2
07, the above data read from the (j-1) line buffer 203 is latched. Next, in synchronization with the fifth 8x data reference clock with respect to the leftmost data reference clock, the data to be written next is written to (j-1) and (j-2) line buffers 203 and 209 and j ,
(j-1) (j-2) Line shift register 201.2
05 and 211. Specifically, (i,
The pixel signal corresponding to j) is sent to the j line shift register 2.
01 and (j-1) line shift registers 203. (j-2) For the line buffer 209,
A pixel signal corresponding to (i, j-1) is supplied via the latch circuit 207. The (j-1) line shift register 205 is supplied with a pixel signal corresponding to (i, j-1) from the (j-1) line buffer 203 .
(j−2)ラインシフトレジスタ211に対しては、(
j−2)ラインバッハア209から、(i。(j-2) For the line shift register 211, (
j-2) From Reinbacher 209, (i.
j−2)に対応する信号画素が供給される。A signal pixel corresponding to j-2) is supplied.
次に、制御回路223から、メモリ書込み信号がライン
バッハア203及び209、シフトレジスタ201.2
05及び211に供給される。これによって、シフトレ
ジスタ201.205及び211に第14図又は第15
図に示されるようにデータが記憶される。Next, a memory write signal is sent from the control circuit 223 to the line bachers 203 and 209, and the shift register 201.2.
05 and 211. This causes the shift registers 201, 205 and 211 to
Data is stored as shown.
次に、第17図に従って、装置全体の動作を、CPU1
13での処理を中心にして説明する。画像入力装置11
による画像入力に伴い、まず輪郭検出をし、その輪郭画
像を2値化する(ステップ21)。このステップ21の
処理には、マスク処理回路101が利用される。同回路
101において、上記のようにして入力画像の輪郭が検
出される。これに対して、第4のしきい値回路103に
おいてしきい値THRと比較が実行される。輪郭画像が
しきい値THRより大きい場合、第4のしきい値回路1
03は、例えば「1」を出力する。この2値信号(以下
、輪郭2値画像と呼ぶ)が、2値画像メモリ105に記
憶され、収集が終了する。Next, according to FIG. 17, the operation of the entire device is controlled by the CPU1.
The explanation will be centered on the processing in step 13. Image input device 11
When an image is input by , first, a contour is detected, and the contour image is binarized (step 21). The mask processing circuit 101 is used for the processing in step 21. In the same circuit 101, the outline of the input image is detected as described above. On the other hand, comparison with the threshold value THR is performed in the fourth threshold circuit 103. If the contour image is larger than the threshold THR, the fourth threshold circuit 1
03 outputs "1", for example. This binary signal (hereinafter referred to as a contour binary image) is stored in the binary image memory 105, and the collection is completed.
次に、背景領域(用紙の部分)と印刷領域の間の濃度値
を抽出する(ステップ22)。この抽出は、背景領域と
印刷領域との分別により実現される。この処理は、第1
の実施例と同一であり、2つのしきい値TL、 TIを
用いて実現される。この処理の結果は、2値画像メモリ
109に順次記憶される。以下、このように2値化され
た信号を中間濃度2値画像と呼ぶ。Next, the density value between the background area (paper portion) and the print area is extracted (step 22). This extraction is realized by separating the background area and the print area. This process
This is the same as the embodiment of , and is realized using two thresholds TL and TI. The results of this processing are sequentially stored in the binary image memory 109. Hereinafter, the signal binarized in this way will be referred to as an intermediate density binary image.
上記のような2N類の2値画像が得られたら、中間濃度
2値画像から、輪郭2値画像を削除する(ステップ23
)。この結果は、第3の2値画像メモリ11に記憶され
る。次に、このステップ5−3の削除処理を施した中間
濃度2値画素から、残留している画素、例えば「1」、
を計数する(ステップ24)。この計数結果に基づき、
印刷の不良を判定する(ステップ25)。この判定は、
計数した残留画像が、所定値以上の場合、印刷不良と判
定し、所定値より小さい場合、良好と判定する。 次に
、第18図及び第19図を参照して、上記処理のうち、
ステップ23以下の処理、すなわち、CPU113の処
理について説明する。Once the 2N type binary image as described above is obtained, the contour binary image is deleted from the intermediate density binary image (step 23).
). This result is stored in the third binary image memory 11. Next, from the intermediate density binary pixels subjected to the deletion process in step 5-3, the remaining pixels, for example "1",
is counted (step 24). Based on this counting result,
A printing defect is determined (step 25). This judgment is
If the counted residual image is greater than or equal to a predetermined value, it is determined that the printing is defective, and if it is smaller than the predetermined value, it is determined to be good. Next, with reference to FIGS. 18 and 19, among the above processes,
The processing from step 23 onwards, that is, the processing of the CPU 113 will be explained.
まず、変数として、11 jを用い、jを「0」(ステ
ップ22−1)、iを「0」と設定する(ステップ22
−2)。これらの変数は、座標設定のためのものである
。First, 11 j is used as a variable, and j is set to "0" (step 22-1) and i is set to "0" (step 22-1).
-2). These variables are for coordinate settings.
次に、輪郭2値画像の個々b+ (i、’j)に対し
て、中間濃度2値画像が「1」でをあるか否かをチエツ
クする(ステップ22−3)。これは、2つの2値画像
メモリ105及び109の比較により、容易に実現され
るが、当然h1 (11j)として呼び出すのは、輪郭
画像として「1」が設定されている画素に限られる。こ
のh+ (i、j)に対して、対応する座標の中間濃
度2値画像が「1」の場合、輪郭削除の作業に移る。Next, it is checked whether the intermediate density binary image is "1" for each b+(i,'j) of the contour binary image (step 22-3). This can be easily achieved by comparing the two binary image memories 105 and 109, but of course only pixels for which "1" is set as the contour image are called as h1 (11j). For this h+ (i, j), if the intermediate density binary image at the corresponding coordinates is "1", the process moves to outline deletion work.
このため変数kを「−2」に設定する(ステップ22−
4)。次に、変数1を「−2」に設定する(ステップ2
2−5)。次に、輪郭画像の内、対応する中間濃度2値
画像が「1」のものを、輪郭・欠陥2値画像hz (
m+ n)と表記する。するとここでは、h2 (i
+1.j+k)を「0」に設定する(ステップ22−6
)。Therefore, the variable k is set to "-2" (step 22-
4). Next, set variable 1 to “-2” (step 2
2-5). Next, among the contour images, those whose corresponding intermediate density binary images are "1" are converted into contour/defect binary images hz (
It is written as m+n). Then, here, h2 (i
+1. j+k) to "0" (step 22-6
).
そして、変数1に「1」を加算する(ステップ22−7
)。加算したlが「3」と等しいか否かチエツクする(
ステップ22−8)。1が「3」と等しくない場合、ス
テップ22−6に飛び、以後の処理が繰り返される。Then, "1" is added to variable 1 (step 22-7
). Check whether the added l is equal to "3" (
Step 22-8). If 1 is not equal to "3", the process jumps to step 22-6 and the subsequent processing is repeated.
一方、ステップ22−8において、変数1が「3」と等
しい場合、上記変数kに「1」が加算される(ステップ
22−9)。次に、変数kが「3」と等しいか否かチエ
ツクされる(ステップ22−10)。変数kが「3」に
達せず等しくない場合、ステップ22−5に戻り、以後
の処理を繰り返す。ステップ22−10において、変数
kが「3」と等しい場合、変数iに「1」を加算する(
ステップ22−11)。この加算されたiが、画像幅V
I DTHと等しいか否かチエツクする(ステップ2
2−12)。変数iが画像幅に等しくない場合、ステッ
プ22−3に戻り以後の処理を繰り返す。変数iが画像
幅に等しい場合、変数jに「1」を加算する(ステップ
22−13)。そして、加算された変数jを画像高さH
EIG)ITと比較する(ステップ22−14)。変数
jが画像高さ)IEIGHTに等しくない場合、ステッ
プ22−2に戻り、以後の処理が繰り返される。以上の
処理により、輪郭2値画像からの中間濃度2値画像が削
除される。On the other hand, if variable 1 is equal to "3" in step 22-8, "1" is added to the variable k (step 22-9). Next, it is checked whether the variable k is equal to "3" (step 22-10). If the variable k does not reach "3" and is not equal, the process returns to step 22-5 and the subsequent processing is repeated. In step 22-10, if variable k is equal to "3", "1" is added to variable i (
Step 22-11). This added i is the image width V
Check whether it is equal to IDTH (step 2
2-12). If the variable i is not equal to the image width, the process returns to step 22-3 and the subsequent processing is repeated. If the variable i is equal to the image width, "1" is added to the variable j (step 22-13). Then, the added variable j is the image height H
EIG) and IT (step 22-14). If the variable j is not equal to the image height (IEIGHT), the process returns to step 22-2 and the subsequent processing is repeated. Through the above processing, the intermediate density binary image is deleted from the contour binary image.
次に、残存輪郭2値画像を計数する処理に移行する。第
1図に示されるようにまず、変数として欠陥画素数Cを
導入し、「1」に設定する(ステップ24−1)。次に
、変数JSlを夫々「0」に設定する(ステップ24−
2.24−3)。Next, the process moves to counting the remaining contour binary images. As shown in FIG. 1, first, the number C of defective pixels is introduced as a variable and set to "1" (step 24-1). Next, each variable JSl is set to "0" (step 24-
2.24-3).
輪郭・欠陥2値画像h2 (i、j)が「1」か否かを
チエツクする(ステップ24−4)。h2(i、j)が
「1」の場合、変数Cに[]」を加算する(ステップ2
4−5)。又、h2 (i、j)と「1」に等しくない
場合、ステップ24−5を飛び越し、ステップ24−6
に移行する。このステップでは、変数iに「1」が加算
される。It is checked whether the contour/defect binary image h2 (i, j) is "1" (step 24-4). If h2 (i, j) is “1”, add []” to variable C (step 2
4-5). If h2 (i, j) is not equal to "1", skip step 24-5 and proceed to step 24-6.
to move to. In this step, "1" is added to the variable i.
加算されたlは、画像幅vIDTHと比較される(ステ
ップ24−7)。lが画像幅V I DT)lに等しく
ない場合、ステップ24−4に戻り、以後の処理が繰り
返される。iが画像幅V I DTHに等しい場合、変
数jに「1」が加算される(ステップ24−8)。加算
された変数jが画像高さHEIG)ITと比較される(
ステップ24−9)。変数jが画像高さIIEIGII
Tに等しくない場合、ステップ24−3に戻り以後の処
理が繰り返される。変数jが画像高さ](EIGHTに
等しい場合、残存画素の計数が終了し、印刷の良否判定
に移行する。The added l is compared with the image width vIDTH (step 24-7). If l is not equal to the image width V I DT)l, the process returns to step 24-4 and the subsequent processing is repeated. If i is equal to the image width V I DTH, "1" is added to the variable j (step 24-8). The added variable j is compared with the image height HEIG)IT (
Step 24-9). Variable j is image height IIEIGII
If it is not equal to T, the process returns to step 24-3 and the subsequent processes are repeated. If the variable j is equal to the image height] (EIGHT, the counting of remaining pixels is completed, and the process moves on to determining the quality of printing.
まず、上記で得られた変数Cが、基準値と等しいか否か
チツェックされる(ステップ25−1)。First, it is checked whether the variable C obtained above is equal to a reference value (step 25-1).
変数Cが基準値と等しく無い場合、正常印刷と判定し、
その旨の出力をする(ステップ25−2)。If variable C is not equal to the reference value, it is determined that printing is normal,
A message to that effect is output (step 25-2).
変数Cが、基準値と等しい場合、欠陥印刷が存在すると
判定し、その旨を出力する(ステップ25−3)。以上
で、検査処理が終了する。If the variable C is equal to the reference value, it is determined that defective printing exists, and a message to that effect is output (step 25-3). With this, the inspection process ends.
以上この発明の実施例について説明下が、この発明は上
記実施例について同等限定されない。例えば、読取手段
はカラー用のものでもよいし、利用 素子もCCD等何
等限定さりない。又、境界の検出、しきり値の選択も、
転意に実行される。Although the embodiments of the present invention have been described above, the present invention is not limited to the same extent as in the above embodiments. For example, the reading means may be a color one, and the device used is not limited to a CCD or the like. In addition, boundary detection and threshold selection are also possible.
Executed on a whim.
又、境界から欠陥画素を分離する方法も、距離を測定す
る方法、境界を順次削除していく等広い採用される。Furthermore, a wide variety of methods are used to separate defective pixels from boundaries, such as a distance measurement method and sequential deletion of boundaries.
[発明の効果コ
以上説明したように、本発明によれば、標準パターンを
用意することなく、印刷等の画像の検査が良好に実行可
能となる。[Effects of the Invention] As described above, according to the present invention, it is possible to successfully inspect images such as printed images without preparing a standard pattern.
第1図は画像検査装置の構成を示す図、第2図は第1図
に示されるしきい値の決定を説明するための図、第3図
は第1図に示される装置の主たる処理を説明するための
図、第4図は、第3図に示されるステップ中距離画像の
変換を説明するための図、第5図乃至第10図は第3図
に示される処理の詳細を説明するための図、第11図は
第2の実施例に係る装置の構成を示す図、第12図は第
11図に示されるマスク処理回路の詳細を示す図、第1
3図乃至第15図は第12図に示される回路の動作を説
明するための図、第16図は第12図に示される回路内
での信号波形を示す図、第17図乃至第1
9図は第1
1図に示される装置での処
理を示す図である。FIG. 1 is a diagram showing the configuration of an image inspection device, FIG. 2 is a diagram for explaining the determination of the threshold value shown in FIG. 1, and FIG. 3 is a diagram showing the main processing of the device shown in FIG. 1. 4 is a diagram for explaining the conversion of the step intermediate distance image shown in FIG. 3, and FIGS. 5 to 10 are diagrams for explaining the details of the process shown in FIG. 3. FIG. 11 is a diagram showing the configuration of the apparatus according to the second embodiment. FIG. 12 is a diagram showing details of the mask processing circuit shown in FIG.
3 through 15 are diagrams for explaining the operation of the circuit shown in FIG. 12, FIG. 16 is a diagram showing signal waveforms in the circuit shown in FIG. 12, and FIGS. 17 through 19. The figure is a diagram showing processing in the apparatus shown in FIG. 11.
Claims (2)
前記画像の状態を検査する画像検査方式において、 前記画像を含む被検査対象の表面を読取り、対応する信
号に変換する読取手段と、 この読取手段より読み取られた信号から、前記画像の不
良に起因する信号含んだ信号を分離抽出する手段と、 この手段により分離された信号に対応する画素から前記
画像の輪郭までの距離を求める手段と、この手段により
得られた距離に基づいて前記画像の検査を行うことを特
徴とする画像検査方式。(1) For the object to be inspected on which an image is provided,
An image inspection method for inspecting the condition of the image includes: a reading means for reading the surface of the object to be inspected including the image and converting it into a corresponding signal; means for separating and extracting a signal containing a signal; means for determining the distance from a pixel corresponding to the signal separated by this means to the outline of the image; and inspecting the image based on the distance obtained by this means. An image inspection method characterized by performing the following.
前記画像の状態を検査する画像検査方式において、 前記画像を含む被検査対象の表面を読取り、対応する信
号に変換する読取手段と、 この手段により変換された信号から前記画像の輪郭に対
応下輪郭信号を検出する検出手段と、この読取手段より
読み取られた信号から、前記画像の不良に起因する信号
含んだ信号を分離抽出する手段と、 この手段により分離された信号から前記検出手段により
検出された輪郭信号を削除する手段と、この手段による
削除の後、残存する信号に基づいて前記画像の検査を行
うことを特徴とする画像検査方式。(2) For the object to be inspected on which an image is provided,
The image inspection method for inspecting the state of the image includes: a reading means for reading the surface of the object to be inspected including the image and converting it into a corresponding signal; and a lower contour corresponding to the contour of the image from the signal converted by the means. a detection means for detecting a signal; a means for separating and extracting a signal including a signal caused by a defect in the image from the signal read by the reading means; 1. An image inspection method comprising means for deleting a contour signal, and inspecting said image based on the remaining signal after deletion by said means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2276320A JPH04152479A (en) | 1990-10-17 | 1990-10-17 | Image inspecting system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2276320A JPH04152479A (en) | 1990-10-17 | 1990-10-17 | Image inspecting system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH04152479A true JPH04152479A (en) | 1992-05-26 |
Family
ID=17567811
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2276320A Pending JPH04152479A (en) | 1990-10-17 | 1990-10-17 | Image inspecting system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH04152479A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001289792A (en) * | 2000-04-06 | 2001-10-19 | Nec Corp | Appearance inspection method and apparatus |
JP2002286655A (en) * | 2001-03-26 | 2002-10-03 | Shibuya Kogyo Co Ltd | Article inspection method |
WO2010013564A1 (en) * | 2008-07-28 | 2010-02-04 | 株式会社 日立ハイテクノロジーズ | Defect review device, defect review method, and defect review execution program |
-
1990
- 1990-10-17 JP JP2276320A patent/JPH04152479A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001289792A (en) * | 2000-04-06 | 2001-10-19 | Nec Corp | Appearance inspection method and apparatus |
JP2002286655A (en) * | 2001-03-26 | 2002-10-03 | Shibuya Kogyo Co Ltd | Article inspection method |
WO2010013564A1 (en) * | 2008-07-28 | 2010-02-04 | 株式会社 日立ハイテクノロジーズ | Defect review device, defect review method, and defect review execution program |
JP2010032308A (en) * | 2008-07-28 | 2010-02-12 | Hitachi High-Technologies Corp | Defect review device, defect review method, and defect review execution program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4008291B2 (en) | Pattern inspection apparatus, pattern inspection method, and program | |
US20090202172A1 (en) | Image Inspection Apparatus, Image Inspection Method and Computer Program | |
CN113673454B (en) | Relic detection method, related equipment and storage medium | |
US5315409A (en) | Method of and apparatus for obtaining binary image | |
JP2006067585A (en) | Method and apparatus for locating and extracting captions in digital images | |
JP6846232B2 (en) | Print data processing method, print data processing device, and print data processing program | |
JP4804382B2 (en) | Image processing method, image processing program, and image processing apparatus | |
JPH10294862A (en) | Image processor | |
JPH04152479A (en) | Image inspecting system | |
US7646892B2 (en) | Image inspecting apparatus, image inspecting method, control program and computer-readable storage medium | |
JP2001099625A (en) | Device and method for pattern inspection | |
JP3919505B2 (en) | Pattern inspection apparatus and method | |
JPH0735532A (en) | Method of measuring length of crack on road surface | |
JPH0718812B2 (en) | Foreign object detection method | |
JP2003203218A (en) | Appearance inspection apparatus and method | |
JP7570575B1 (en) | Determination device, learning device, determination method, learning method, determination program, and learning program | |
JP2710685B2 (en) | Defect detection method by visual inspection | |
JP4013695B2 (en) | Image processing method and image processing apparatus | |
JPH09288037A (en) | Inspection method for lcd panel | |
JPH06147855A (en) | Image inspection method | |
JP3267372B2 (en) | Method and apparatus for generating matching pattern signal in pattern matching inspection | |
JPH06161378A (en) | Inspecting device for liquid crystal display device | |
JP2800199B2 (en) | Image area identification device | |
JPH03296884A (en) | Device for extracting character image | |
JPH0922463A (en) | Article inspection method and device |