JPH0118606B2 - - Google Patents

Info

Publication number
JPH0118606B2
JPH0118606B2 JP59118828A JP11882884A JPH0118606B2 JP H0118606 B2 JPH0118606 B2 JP H0118606B2 JP 59118828 A JP59118828 A JP 59118828A JP 11882884 A JP11882884 A JP 11882884A JP H0118606 B2 JPH0118606 B2 JP H0118606B2
Authority
JP
Japan
Prior art keywords
data
pixel group
black
run
point pixel
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
Application number
JP59118828A
Other languages
Japanese (ja)
Other versions
JPS60263528A (en
Inventor
Hisayuki Tsujinaka
Tetsuo Sano
Tetsuo Hoki
Eiji Kodama
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.)
Dainippon Screen Manufacturing Co Ltd
Original Assignee
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 Dainippon Screen Manufacturing Co Ltd filed Critical Dainippon Screen Manufacturing Co Ltd
Priority to JP59118828A priority Critical patent/JPS60263528A/en
Publication of JPS60263528A publication Critical patent/JPS60263528A/en
Publication of JPH0118606B2 publication Critical patent/JPH0118606B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Tests Of Electronic Circuits (AREA)
  • Image Processing (AREA)
  • Closed-Circuit Television Systems (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は2値画像データの圧縮方法に関し、
特に例えば、プリント配線板のパターン欠陥検査
システムにおいて、プリント配線板のパターンを
記憶させ、記憶内容と比較する検査システムにお
ける記憶時に好適なデータ圧縮方法に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a method for compressing binary image data.
In particular, the present invention relates to a data compression method suitable for storage in an inspection system that stores a printed wiring board pattern and compares it with the stored contents, for example, in a printed wiring board pattern defect inspection system.

〔技術的な背景〕[Technical background]

2値画像データの圧縮方法に関しては従来より
フアクシミリ等に係る各種方式が提案されている
が、プリント配線板(以下、PWBという)の検
査システム、特に多層PWBの内層検査などでは
パターンのエツジ情報が重要であり、フアクシミ
リ等におけるがごとき図形と文字の混在するデー
タ圧縮方法をそのまま適用することは困難であ
る。
Regarding the compression method of binary image data, various methods related to facsimile etc. have been proposed in the past, but in the inspection system of printed wiring board (hereinafter referred to as PWB), especially the inner layer inspection of multilayer PWB, the edge information of the pattern is This is important, and it is difficult to apply a data compression method that uses a mixture of graphics and characters, such as in facsimile, as is.

例えば、第2図にPWB検査の場合を示すよう
に、PWB1を走査し1つの撮像装置2から得ら
れる画像を2n個の画素に分解してデータ処理を行
うが、記憶すべき確定の画素データを得るために
まず撮像装置2からの2n個の画素のアナログ信号
をA/D変換器3でmビツトのデイジタル信号と
する。次に空間フイルタ処理2値化回路4におい
てそのデイジタル信号を例えば5×5の空間フイ
ルタ処理を施すことによりほぼ確定した黒白の2
値化データを得る。そして次の第2空間フイルタ
処理回路5において例えば3×3の量子化雑音除
去により1ビツトの凹凸の補正が行なわれ、確定
した黒白2値化データを得る。この2値化データ
を次のデータ圧縮回路6においてランレングス法
によつてデータ圧縮し、メモリ7に記憶させる。
For example, as shown in the case of PWB inspection in Figure 2, the image obtained from one imaging device 2 by scanning the PWB 1 is decomposed into 2n pixels and data processing is performed. To obtain data, first, the analog signal of 2 n pixels from the image pickup device 2 is converted into an m-bit digital signal by the A/D converter 3. Next, in the spatial filter processing binarization circuit 4, the digital signal is subjected to, for example, 5×5 spatial filter processing, thereby converting the digital signal into approximately determined black and white binary data.
Obtain valued data. Then, in the next second spatial filter processing circuit 5, 1-bit unevenness is corrected by removing 3×3 quantization noise, for example, to obtain definite black and white binary data. This binarized data is compressed by the run length method in the next data compression circuit 6 and stored in the memory 7.

そして、PWB1の2枚目を走査し前記の様に
処理された第2空間フイルタ処理回路5からの出
力信号(2値画像信号I)と、メモリ7から
PWB1の1枚目のデータ信号をデータ復元回路
16で復元した画素データとを比較するのであ
る。
Then, the output signal (binary image signal I) from the second spatial filter processing circuit 5 which scanned the second image of the PWB 1 and processed as described above, and the output signal from the memory 7.
The first data signal of PWB1 is compared with the pixel data restored by the data restoration circuit 16.

A/D変換器3、空間フイルタ処理2値化回路
4、第2空間フイルタ処理回路5、データ圧縮回
路6、メモリ7、データ復元回路16は、撮像装
置2の数だけ必要である。
The same number of A/D converters 3, spatial filter processing binarization circuits 4, second spatial filter processing circuits 5, data compression circuits 6, memories 7, and data restoration circuits 16 as there are imaging devices 2 are required.

ところで、データ圧縮回路6の前で、5×5の
2次元空間フイルタ処理を行い(ここで周辺2画
素が不確定となる)、かつ3×3の2次元空間フ
イルタ処理を行う(ここで周辺1画素が不確定と
なる)結果、第3図に示すように、黒白の確定し
た画素データ領域8に対し、主走査方向及び副走
査方向の周辺でそれぞれ3画素分の黒白不確定の
データエリア9,10,11,12が生じる。副
走査方向のデータ領域9,10はデータ処理を行
わないとして、主走査方向の不確定データエリア
11,12に着目すると、本来的にこれらデータ
11,12はデータとして不確定なものであるか
ら、データ圧縮から排除しメモリ7に記憶させな
いようにするのがデータ処理上もメモリの節約の
点でも一応好ましいと解せられる。しかし、撮像
装置2には、2nの累乗すなわち2ビツトのイメー
ジセンサ例えば211=2048ビツトの1次元CCDイ
メージセンサなどが使用されるので、不確定デー
タ11,12の処理如何によつてはタイミング等
に係るコントロールが複雑化し処理速度に影響を
及ぼすことが考えられる。そこで、この不確定デ
ータ11,12上記例では主走査方向の起点画素
群3ビツトと終点画素群3ビツトをどのように取
扱うかといつた問題が一方にある。他方では、デ
ータ圧縮のそもそもの目的であるメモリ7に必要
とされる容量を可能な限り削減できるようにする
こと、換言すれば、データ圧縮ブロツク6におけ
るデータ圧縮の手法を如何に工夫するかが問題と
なる。
By the way, in front of the data compression circuit 6, 5x5 two-dimensional spatial filter processing is performed (here, the surrounding two pixels become uncertain), and 3x3 two-dimensional spatial filter processing is performed (here, the surrounding two pixels are uncertain). As a result, as shown in FIG. 3, for the pixel data area 8 where black and white are determined, black and white data areas of 3 pixels each are created around the periphery in the main scanning direction and the sub-scanning direction. 9, 10, 11, 12 occur. Assuming that the data areas 9 and 10 in the sub-scanning direction are not subjected to data processing, and focusing on the uncertain data areas 11 and 12 in the main scanning direction, these data 11 and 12 are inherently uncertain as data. It can be seen that it is preferable to exclude the data from data compression and not to store it in the memory 7 from the viewpoint of data processing and memory saving. However, since the imaging device 2 uses a power of 2n , that is, a 2-bit image sensor, for example, a one-dimensional CCD image sensor with 2 11 = 2048 bits, the It is conceivable that control related to timing etc. becomes complicated and affects processing speed. Therefore, in the above example of the uncertain data 11 and 12, one of the problems is how to handle the 3 bits of the starting point pixel group and the 3 bits of the ending point pixel group in the main scanning direction. On the other hand, the original purpose of data compression is to reduce the capacity required for the memory 7 as much as possible, in other words, how to devise a data compression method in the data compression block 6. It becomes a problem.

〔発明の目的〕[Purpose of the invention]

本発明は上記背景のもとになされたものであつ
て、データ圧縮率を向上できると同時にデータの
処理速度を向上できる新規な2値画像データ圧縮
方法を提供することを基本の目的とする。なお、
フアクシミリに用いられている圧縮方法はこの発
明の対象とする画像の性質にはあわないことを付
言しておく。
The present invention has been made against the above background, and its basic object is to provide a novel binary image data compression method that can improve the data compression rate and at the same time improve the data processing speed. In addition,
It should be added that the compression method used in facsimile does not suit the nature of the image that is the subject of this invention.

〔発明の構成〕[Structure of the invention]

本発明は、2次元のフイルタ処理によつて生じ
た、不確定データとしての起点画素群に必要とさ
れるランレングス符号化データを転用して利用す
ることを本旨とし、起点画素群を黒または白のい
ずれか一方に強制することにより頭出しデータと
して本来「1」で始るか「0」で始めるかを示す
必要なデータの代りとする一方で、終点画素群を
この終点画素群の直前のデータと同等化して、こ
れら不確定データを確定データの続きのデータに
取扱いランレングス符号化データとすることによ
り終点画素群のためにだけに必要とされるランレ
ングス符号化データを不要とするようにしたこと
を基本的な特徴としている。
The main purpose of the present invention is to divert and utilize the run-length encoded data required for the starting pixel group as uncertain data generated by two-dimensional filter processing, and to change the starting pixel group to black or black. By forcing either white to replace the necessary data indicating whether to start with "1" or "0" as cue data, the end point pixel group is set immediately before this end point pixel group. By treating these uncertain data as continuation data of the definite data and making them run-length encoded data, run-length encoded data that is required only for the end point pixel group is unnecessary. The basic feature is that

尚、本明細書において「黒」というは2値レベ
ル信号のLレベルすなわち論理「0」に対応し、
他方、「白」というは2値レベル信号のHレベル
すなわち論理「1」に対応する。
In this specification, "black" corresponds to the L level of the binary level signal, that is, the logic "0",
On the other hand, "white" corresponds to the H level of the binary level signal, that is, logic "1".

〔実施例〕〔Example〕

以下、本発明を添付図面に示す実施例によつて
具体的に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be specifically described below with reference to embodiments shown in the accompanying drawings.

第1図は第2図と同等のPWB検査システムに
係る実施例の原理説明図である。第1図Aにおい
て、Sは起点画素群のデータ、Eは終点画素群の
データを示し、Vは確定データエリアにおける画
素データ「黒」「白」の連続パターンを示してい
る。この連続パターンは、黒だけの連続(同図
a−1)、白だけの連続(同図a−2)、黒白
黒白……の連続(同図a−3)、白黒白黒……
の連続(同図a−4)の4通りがある。この4通
りのいずれのパターンに対しても起点画素群Sを
すべて黒とする。すなわち、連続パターンを必ら
ず黒から始まるものと規定する。こうすると、黒
が終れば次は必ず白が続き、白を規定する必要が
ない。したがつて白/黒(1/0)のフラグが不
要でランレングス符号化だけであらわすことがで
きる。
FIG. 1 is an explanatory diagram of the principle of an embodiment of a PWB inspection system similar to FIG. 2. In FIG. 1A, S indicates data of the starting point pixel group, E indicates data of the end point pixel group, and V indicates a continuous pattern of "black" and "white" pixel data in the final data area. These continuous patterns include a series of only black (a-1 in the same figure), a series of only white (a-2 in the same figure), a series of black, black, white, white... (a-3 in the same figure), a series of black and white, black and white...
There are four consecutive ways (a-4 in the same figure). For any of these four patterns, the starting pixel group S is all black. In other words, a continuous pattern is defined as one that always starts with black. In this way, when black finishes, white will always follow, and there is no need to specify white. Therefore, white/black (1/0) flags are not necessary and can be expressed only by run-length encoding.

一方、終点画素群Eは、そのすべてが終点画素
群Eの直前の画素データと同等化される。直前の
画素データが黒であれば黒に、白であれば白とさ
れる。a−1の場合はもちろん黒、a−2の場合
は白、a−3の場合には黒、a−4の場合は白と
なる。a−3,a−4の場合で、直前の画素デー
タが黒白反対となる場合があるが、もちろん終点
画素群Eのすべてはその黒/白と同じにされる。
このように規定すると、終点画素群Eのデータの
ランレングス符号化データが、直前のデータのラ
ンレングス符号化データの記述に包含されること
となり、ワード数を減少させることができる。
On the other hand, all of the end point pixel group E is equalized to the pixel data immediately before the end point pixel group E. If the immediately preceding pixel data is black, it is treated as black, and if it is white, it is treated as white. Of course, in the case of a-1, the color is black, in the case of a-2, it is white, in the case of a-3, it is black, and in the case of a-4, it is white. In the case of a-3 and a-4, the immediately preceding pixel data may be opposite black and white, but of course all of the end point pixel group E are made the same black/white.
With this definition, the run-length encoded data of the data of the end point pixel group E is included in the description of the run-length encoded data of the immediately preceding data, and the number of words can be reduced.

また、a−1,a−3の場合において、起点画
素群Sのデータのランレングス符号化データがそ
れに続く黒のランレングス符号化データの中に包
含され、これによつてもワード数を減少させるこ
とができる。
In addition, in the cases of a-1 and a-3, the run-length encoded data of the data of the starting pixel group S is included in the subsequent black run-length encoded data, which also reduces the number of words. can be done.

第1図Bは本実施例に用いたランレングス符号
化記述のためのワード構造の模式図である。1ワ
ードは5ビツトで構成され、先頭の4ビツト(22
ビツト)がランレングス符号化記述用でLSBは
ターミネータTである。ターミネータTが「0」
である場合、そこでランレングスの記述が終了す
ることを表わし、「1」である場合、記述が続い
ていることを表わす。
FIG. 1B is a schematic diagram of the word structure for the run-length encoded description used in this embodiment. One word consists of 5 bits, the first 4 bits (2 2
The bits) are for run-length encoding description, and the LSB is the terminator T. Terminator T is "0"
If it is "1", it means that the run length description ends, and if it is "1", it means that the description continues.

実施例は211=2048ビツトの1次元イメージセ
ンサを用いているので、最長3ワードで表現で
き、3ワード構成の場合には第1図Bのb−3の
構造となる。これは例えば第1図Aのa−1を記
述する場合などにとられる構造である。3ワード
では、4096ビツトの画素データをランレングス符
号化することができる。
Since the embodiment uses a one-dimensional image sensor of 2 11 =2048 bits, it can be expressed with a maximum of three words, and in the case of a three-word configuration, it has the structure b-3 in FIG. 1B. This is a structure used, for example, when describing a-1 in FIG. 1A. With 3 words, 4096 bits of pixel data can be run-length encoded.

2ワードでは、同図b−2に示すように、先頭
ワードの4ビツトと次のワードの4ビツト合計8
ビツトで28=256の同一データまで表現できる。
同様に、1ワードでは同図b−1に示すように、
4ビツトまでの表現すなわち24=16までの同一デ
ータを表現できる。
For 2 words, as shown in Figure b-2, the 4 bits of the first word and the 4 bits of the next word total 8.
Bits can represent up to 28 = 256 pieces of identical data.
Similarly, for one word, as shown in b-1 of the same figure,
It can represent up to 4 bits, ie, up to 2 4 =16 identical data.

ターミネータTが「0」によつて区切られる1
ワード又は2ワードもしくは3ワードのランレン
グス符号化の記述が、黒又は白のランレングスの
記述となる。黒、白の区別はターミネータTの
「0」が1つのラインの開始から奇数番目である
か偶数番目かで判別できる。すなわち奇数番目の
ものは黒、偶数番目は白である。
1 terminator T separated by "0"
A word or two-word or three-word run-length encoding description becomes a black or white run-length description. The distinction between black and white can be determined by whether "0" of the terminator T is an odd number or an even number from the start of one line. That is, odd numbers are black and even numbers are white.

さて、このように5ビツトの固定ワードで3ワ
ードまでの4,8,12の可変長でランレングスを
表現すると、第1図Aa−1のパターンは同図B
のb−3となり(「11111 11111 01110」)、a−2
のパターンはb−1(「00100」)とb−3
(「11001 11111 01110」)の組合せ、a−3及びa
−4のパターンはb−1とb−2とb−3の組合
せとなる。
Now, if the run length is expressed as a variable length of 4, 8, or 12 up to 3 words using a 5-bit fixed word, then the pattern in Figure 1 Aa-1 becomes B in the same figure.
becomes b-3 ("11111 11111 01110"), a-2
The patterns are b-1 (“00100”) and b-3
(“11001 11111 01110”) combination a-3 and a
The pattern -4 is a combination of b-1, b-2, and b-3.

代表的な圧縮データを第1図Cに示す。同図c
−1は起点画素群に黒が続く場合でその黒が14画
素分以上ある場合(なお、起点画素群及び終点画
素群をそれぞれ3画素としたとき)であり、第1
図Aのa−1やa−3の場合に対応する。また、
13画素以下のときは同図c−2となる。同図c−
3は起点画素群3画素のあとに白が続く場合であ
り、第1図Aのa−2とa−4の場合に対応し、
先頭の1ワードによつて3画素分の黒が示されて
いる。
Typical compressed data is shown in FIG. 1C. Figure c
-1 is when black continues in the starting pixel group and the black is for 14 pixels or more (when the starting pixel group and the ending pixel group are each 3 pixels), and the first
This corresponds to cases a-1 and a-3 in Figure A. Also,
When the number of pixels is 13 or less, it becomes c-2 in the figure. Figure c-
3 is a case where white continues after 3 pixels in the starting pixel group, and corresponds to cases a-2 and a-4 in FIG. 1A,
The first word indicates black for three pixels.

尚、ここで留意すべきは長さ3を「0010」と表
現していることである。本実施例のような起点画
素群を黒に強制してしまう方式をとると、フアク
シミリ等で通常一般に行なわれている0の長さを
定義する必要がなく、数値表現はn−1の値で表
現できる。具体的には、長さ1は「0000」、長さ
2は「0001」、長さ3は「0010」,……,となる。
したがつて、長さ16を表現すると「10000」とな
るが、本方式によると「1111」となり4ビツトで
足りることとなる。
Note that length 3 is expressed as "0010" here. If a method is used in which the starting pixel group is forced to be black as in this embodiment, there is no need to define the length of 0, which is usually done in facsimile, and the numerical expression is the value of n-1. I can express it. Specifically, length 1 is "0000", length 2 is "0001", length 3 is "0010", etc.
Therefore, if the length 16 is expressed, it will be "10000", but according to this method, it will be "1111", and 4 bits will be sufficient.

又、上記実施例は、高密度PWBを検査するシ
ステムに特に適合する構成をとつている。2048ビ
ツトの1次元CCDイメージセンサで主走査方向
に32mmのエリアを撮像し、16×16μmの画素に分
解することを前提とすると、上記基板の線幅は
100〜200μmであつて線を横切る場合においてそ
の線の画素数は、16μm×16=256μmであるとこ
ろから16画素分未満で即ち4ビツトで表現するこ
とができる。したがつて、最悪、線を多数横切る
場合でもワード数を増大させることがない。
Furthermore, the above embodiment has a configuration particularly suited to a system for inspecting high-density PWB. Assuming that a 2048-bit one-dimensional CCD image sensor images an area of 32 mm in the main scanning direction and separates it into 16 x 16 μm pixels, the line width of the above board is
When the width is 100 to 200 .mu.m and it crosses a line, the number of pixels of the line is 16 .mu.m.times.16=256 .mu.m, so it can be expressed with less than 16 pixels, that is, with 4 bits. Therefore, in the worst case, even if a large number of lines are crossed, the number of words will not increase.

また、PWBの配線パターンに対し、基板ベー
ス部の方が圧倒的に広いので、起点画素群を黒す
なわち基板ベース部のデータ「0」に強制するよ
うにしている。確定データ(第1図Aの)が白
から始まる確率が低という性質から、上記のよう
にすれば、起点画素群のランレングス符号化を引
続く黒のランレングス符号化に吸収してしまう確
率が高くなり、それだけデータ圧縮の効率が高め
られる。このように、上記実施例では、PWBの
基本的な性質(標準基本格子に係る性質やマクロ
に外観した性質など)を巧みに利用して、データ
圧縮率を向上させている。なお、起点画素群を
「黒」に強制するほかに、撮像対象に応じて「白」
に強制してもよい場合があり、「黒」に限定され
るものではない。
Furthermore, since the substrate base portion is overwhelmingly wider than the PWB wiring pattern, the starting pixel group is forced to be black, that is, the data “0” in the substrate base portion. Due to the nature of the deterministic data (A in Figure 1) having a low probability of starting from white, if we do the above, the probability that the run-length encoding of the starting pixel group will be absorbed into the subsequent run-length encoding of black. becomes higher, and the efficiency of data compression increases accordingly. In this way, in the above embodiment, the data compression rate is improved by skillfully utilizing the basic properties of PWB (properties related to standard basic grids, macroscopic properties, etc.). In addition to forcing the starting pixel group to be "black", it can also be set to "white" depending on the imaging target.
In some cases, it may be forced to be ``black'', and is not limited to ``black''.

次に、上記データ圧縮方法を具体的に遂行する
回路の概要を第4図に示す。
Next, FIG. 4 shows an outline of a circuit specifically implementing the above data compression method.

第4図は、第2図に示すデータ圧縮回路6の詳
細を示す図であり、第5図は、そのタイミングチ
ヤートである。
FIG. 4 is a diagram showing details of the data compression circuit 6 shown in FIG. 2, and FIG. 5 is a timing chart thereof.

第4図において、21,23,24,25はア
ンドゲート、22はDフリツプフロツプ(D−
FF)、26はオアゲート、27はランレングス化
回路、28はスイツチである。
In FIG. 4, 21, 23, 24, 25 are AND gates, 22 is a D flip-flop (D-
FF), 26 is an OR gate, 27 is a run length conversion circuit, and 28 is a switch.

第5図に示す如く、起点画素群領域信号Sは3
個分、確定データ領域信号Vは2042個分、終点画
素群領域信号Eは3個分であり、合計2048(=
211)個の画素信号を得ようとする。
As shown in FIG. 5, the starting pixel group area signal S is 3
The final data area signal V is for 2042 pieces, and the end point pixel group area signal E is for 3 pieces, for a total of 2048 (=
2 11 ) pixel signals.

第4図において、スイツチ28を介して「0」
信号をアンドゲート23に与えると、アンドゲー
ト23のもう一つの入力起点画素群領域信号Sが
「1」であつても、アンドゲート23の出力は
「0」となり、確定データ領域信号V、終点画素
群領域信号Eも「0」であるので、アンドゲート
24,25の出力も「0」となり、オアゲート2
6の3入力は全て「0」であるので、オアゲート
26の出力は「0」となり、同期信号CKの立上
り時でかつ走査画素有効領域信号Rが「1」であ
るとき、ランレングス符号化回路27に、ランレ
ングス符号化されるデータが取り込まれる。
In FIG. 4, "0" is set via switch 28.
When a signal is given to the AND gate 23, even if the other input starting point pixel group area signal S of the AND gate 23 is "1", the output of the AND gate 23 becomes "0", and the final data area signal V and the end point Since the pixel group area signal E is also "0", the outputs of the AND gates 24 and 25 are also "0", and the OR gate 2
Since all three inputs of 6 are "0", the output of the OR gate 26 is "0", and when the synchronization signal CK rises and the scanning pixel effective area signal R is "1", the run length encoding circuit At 27, data to be run-length encoded is captured.

次に確定データ領域信号Vが「1」になると、
アンドゲート24を開き2値画像データIがアン
ドゲート24、オアゲート26を介してランレン
グス符号化回路27に入つてゆく。
Next, when the confirmed data area signal V becomes "1",
The AND gate 24 is opened and the binary image data I enters the run length encoding circuit 27 via the AND gate 24 and the OR gate 26.

D−FF22へは、アンドゲート21を介して
確定データ領域信号Vが「1」の間、同期信号
CKが入る。D−FF22への同期信号CKの立上
りで、D−FF22のD入力端子に入つている2
値画像信号I(「1」又は「0」)が、Q出力に保
持される。同期信号CKがD−FF22に入る度毎
にQ出力は新しい2値画像信号I(「1」又は
「0」)に入れ替る。
The synchronization signal is sent to the D-FF 22 via the AND gate 21 while the final data area signal V is "1".
CK enters. At the rise of the synchronization signal CK to the D-FF22, the 2 input to the D input terminal of the D-FF22
A value image signal I ('1' or '0') is held at the Q output. Every time the synchronization signal CK enters the D-FF 22, the Q output is replaced with a new binary image signal I ("1" or "0").

そして、確定データ領域信号Vが「0」になる
と、確定データ領域信号Vが「1」であつたとき
の2値画像信号Iの最終信号(「1」又は「0」)
がD−FF22に保持されている。次いで終点画
素群領域信号Eが「1」となり、アンドゲート2
5を開いて、D−FF22のQ出力がオアゲート
26を介してランレングス回路27に入力され
る。
Then, when the final data area signal V becomes "0", the final signal ("1" or "0") of the binary image signal I when the final data area signal V was "1"
is held in the D-FF22. Then, the end point pixel group area signal E becomes "1", and the AND gate 2
5 is opened, and the Q output of the D-FF 22 is input to the run length circuit 27 via the OR gate 26.

ランレングス回路27は、オアゲート26の出
力信号を走査画素有効領域信号Rが「1」のと
き、同期信号CKの立上りと共に、取り込みラン
レングス符号化を行う。第1図Bに示すランレン
グス符号化及びランレングス符号化された信号の
復元(第2図におけるデータ復元回路16)は公
知技術を用いればよいので詳述しない。
The run-length circuit 27 takes in the output signal of the OR gate 26 at the rising edge of the synchronization signal CK when the scanning pixel effective area signal R is "1" and performs run-length encoding. The run-length encoding shown in FIG. 1B and the restoration of the run-length encoded signal (the data restoration circuit 16 in FIG. 2) can be performed using known techniques, and therefore will not be described in detail.

第4図においてスイツチ28を介して「1」信
号をアンドゲートに与えると、起点画素群領域信
号Sが「1」のときにアンドゲート23、オアゲ
ート26を介して、ランレングス回路27に
「1」が3こ与えられることになる。
In FIG. 4, when a "1" signal is applied to the AND gate via the switch 28, when the starting pixel group area signal S is "1", the "1" signal is sent to the run length circuit 27 via the AND gate 23 and the OR gate 26. ” will be given three times.

この実施例では起点画素群数、終点画素群数を
3こで説明しているが空間フイルタの大きさの設
定により増減するものであり、この発明は3個に
限定されるものではないのはいうまでもない。
In this embodiment, the number of starting pixel groups and the number of ending pixel groups are explained as three, but they can be increased or decreased depending on the setting of the size of the spatial filter, and the present invention is not limited to three. Needless to say.

なお、未確定データとしての第1図Aの起点画
素群Sと終点画素群Eの部分のプリント配線板パ
ターンデータは、復りの副走査時に、第2図の撮
像ブロツク30を主走査方向に、この実施例では
32mm移動させ、撮像装置2が往きの副走査で起点
画素群Sから終点画素群Eに入つた部分を復りの
副走査では確定データ領域に入るように充分なオ
ーバラツプ(1mm単位)を行うようになつてい
る。両端にある2つの撮像装置2のオーバラツプ
しない起点画素群Sと反対側端にあるオーバラツ
プしない終点画素群Eには検査すべきプリント回
路部分は存在しないようにしてある。
Note that the printed wiring board pattern data of the starting point pixel group S and ending point pixel group E in FIG. , in this example
By moving the image by 32 mm, the imaging device 2 performs sufficient overlap (in units of 1 mm) so that the portion from the starting point pixel group S to the ending point pixel group E in the forward sub-scanning enters the fixed data area in the backward sub-scanning. It's getting old. There is no printed circuit portion to be inspected in the non-overlapping starting pixel group S of the two imaging devices 2 at both ends and the non-overlapping ending pixel group E at the opposite end.

このように、オーバラツプさせることにより検
査すべきプリント回路の全領域を走査できるので
あり、往復の副走査により撮像装置2は主走査方
向全幅に要する台数の1/2の台数でよいことにな
る。プリント回路板1は往復することにより出発
した位置に戻ることになり、往復による稼動率の
劣化はない。
In this way, by overlapping, it is possible to scan the entire area of the printed circuit to be inspected, and by performing back-and-forth sub-scanning, the number of imaging devices 2 required is half the number required for the full width in the main scanning direction. The printed circuit board 1 returns to the starting position by reciprocating, and there is no deterioration in operating efficiency due to the reciprocating.

〔作用効果〕[Effect]

ランレングス符号化された信号を復元すると
き、画素信号は2n個であることが望ましく、上記
実施例の如く、起点画素群、終点画素群の相当信
号を入れて、211=2048個にしておくことは、復
元するときの扱いが簡単になる。即ち、この発明
を用いず2042個の信号をランレングス化したの
ち、復元するとき、起点画素群、終点画素群相当
の信号を2n個の扱いにしている機器が汎用されて
いるため、2042個の信号の前と後に又は前又は後
に挿入して2048個とし、次段回路に渡さねばなら
ない。
When restoring a run-length encoded signal, it is desirable that the number of pixel signals is 2 n , and as in the above embodiment, the number of pixel signals is 2 11 = 2048 by including the corresponding signals of the starting point pixel group and the ending point pixel group. This will make it easier to handle when restoring. That is, when restoring 2042 signals after converting them into run lengths without using this invention, there is a commonly used device that treats the signals corresponding to the start pixel group and the end point pixel group as 2 n pieces. 2048 signals must be inserted before and after, or before and after, 2048 signals and passed to the next stage circuit.

2042個の信号はランレングス化されていて、ど
こに起点画素群、終点画素群相当の信号を挿入す
るかを判断又は検出する回路が必要であり、その
タイミングも必要となり、復元回路は複雑化す
る。
The 2042 signals are run-length, and a circuit is required to determine or detect where to insert the signals corresponding to the start pixel group and end point pixel group, and the timing is also required, making the restoration circuit complex. .

この発明は、ランレングス化に際して、起点画
素群、終点画素群の代りの信号を挿入しているの
でこのような問題は生じないのである。さらに、
2048個の次のデータ(2049個目)は、次の走査線
の起点画素データであり、黒に強制しているの
で、第3図に示すパターンは連続したランレング
ス符号化データとして扱える利点をも有してい
る。
In the present invention, such a problem does not occur because signals in place of the starting point pixel group and the ending point pixel group are inserted during run length conversion. moreover,
The next 2048 pieces of data (2049th piece) is the starting pixel data of the next scanning line and is forced to black, so the pattern shown in Figure 3 has the advantage of being treated as continuous run-length encoded data. It also has

〔発明の効果〕〔Effect of the invention〕

以上のように、本発明は2次元のフイルタ処理
によつて生じる不確定データとしての起点画素群
と終点画素群を確定データと同等に取扱うように
したので、2の累乗に基づいたデータ処理を簡易
に行え処理速度が向上するとともに、起点画素群
を黒(または白のいずれか一方)に強制するよう
にしたので、黒/白のフラグを要せず、また長さ
0を定義する必要がないことからワード数の増加
はなく、起点画素群の後のデータが黒があればワ
ード数が減少し、データ圧縮率が向上でき、さら
に、終点画素群を直前のデータと同じデータとし
たので高い確率で1ワード分のデータを削減でき
データ圧縮率を一段と向上させる効果がある。ま
た、起点画素群と終点画素群のデータを強制して
挿入することにより、ランレングス信号の復元の
取扱いが簡単になる効果もある。
As described above, the present invention handles the starting point pixel group and the ending point pixel group as uncertain data generated by two-dimensional filter processing in the same way as definite data, so data processing based on powers of 2 is performed. This is easy to do, improves processing speed, and forces the starting pixel group to be black (or white), so there is no need to use a black/white flag or define a length of 0. Since there is no data, there is no increase in the number of words, and if the data after the starting pixel group is black, the number of words can be reduced and the data compression rate can be improved.Furthermore, since the ending pixel group is the same data as the previous data This has the effect of reducing one word of data with a high probability and further improving the data compression rate. Furthermore, by forcibly inserting the data of the starting point pixel group and the ending point pixel group, there is an effect that the restoration of the run-length signal can be handled easily.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の実施例の説明図、第2図は実
施例に係るブロツク説明図、第3図は2次元のフ
イルタ処理に基づく不確定データ発生の説明図、
第4図は一実施例に適用される具体的な回路の構
成図、第5図は第4図のタイミングチヤートであ
る。 S,11……起点画素群、E,12……終点画
素群、V……確定データ、T……ターミネータ、
1……プリント配線板(PWB)、2……撮像装
置、3……A/D変換器、4……空間フイルタ処
理2値化回路、5……第2空間フイルタ処理回
路、6……データ圧縮回路、7……メモリ、2
1,23,24,25……アンドゲート、22…
…Dフリツプフロツプ(D−FF)、26……オア
ゲート、27……ランレングス符号化回路。
FIG. 1 is an explanatory diagram of an embodiment of the present invention, FIG. 2 is an explanatory diagram of a block according to the embodiment, and FIG. 3 is an explanatory diagram of generation of uncertain data based on two-dimensional filter processing.
FIG. 4 is a block diagram of a specific circuit applied to one embodiment, and FIG. 5 is a timing chart of FIG. 4. S, 11...Start pixel group, E, 12...End point pixel group, V...Fixed data, T...Terminator,
1... Printed wiring board (PWB), 2... Imaging device, 3... A/D converter, 4... Spatial filter processing binarization circuit, 5... Second spatial filter processing circuit, 6... Data Compression circuit, 7...Memory, 2
1, 23, 24, 25...and gate, 22...
...D flip-flop (D-FF), 26...OR gate, 27...Run length encoding circuit.

Claims (1)

【特許請求の範囲】 1 対象パターンを光電走査し、走査により得ら
れたアナログ画像入力信号を1ビツトの2値化信
号に変換し、その2値化信号のデータをランレン
グス符号化によりデータ圧縮する場合に、 前記アナログ画像入力信号を一旦mビツトに
A/D変換し、2次元のフイルタ処理を行なつた
後で2値化信号に変換するようにするとともに、
前記2次元のフイルタ処理によつて生じる不確定
データとしての起点画素群と終点画素群に対し、
起点画素群を黒または白のいずれか一方に強制す
るとともに、終点画素群を終点画素群の直前のデ
ータと同等化するようにランレングス符号化した
ことを特徴とする2値画像データ圧縮方法。
[Claims] 1. A target pattern is photoelectrically scanned, an analog image input signal obtained by scanning is converted into a 1-bit binary signal, and the data of the binary signal is data compressed by run-length encoding. In this case, the analog image input signal is first A/D converted to m bits, subjected to two-dimensional filter processing, and then converted to a binary signal, and
For the starting point pixel group and the ending point pixel group as uncertain data generated by the two-dimensional filter processing,
A binary image data compression method characterized by forcing a starting point pixel group to be either black or white, and performing run-length encoding so that an end point pixel group is equalized to data immediately before the end point pixel group.
JP59118828A 1984-06-09 1984-06-09 Compressing method of binary picture data Granted JPS60263528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59118828A JPS60263528A (en) 1984-06-09 1984-06-09 Compressing method of binary picture data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59118828A JPS60263528A (en) 1984-06-09 1984-06-09 Compressing method of binary picture data

Publications (2)

Publication Number Publication Date
JPS60263528A JPS60263528A (en) 1985-12-27
JPH0118606B2 true JPH0118606B2 (en) 1989-04-06

Family

ID=14746157

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59118828A Granted JPS60263528A (en) 1984-06-09 1984-06-09 Compressing method of binary picture data

Country Status (1)

Country Link
JP (1) JPS60263528A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008099502A1 (en) * 2007-02-16 2008-08-21 Advantest Corporation Tester

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2579919B2 (en) * 1986-11-21 1997-02-12 株式会社東芝 Image compression device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008099502A1 (en) * 2007-02-16 2008-08-21 Advantest Corporation Tester
JPWO2008099502A1 (en) * 2007-02-16 2010-05-27 株式会社アドバンテスト Test equipment
JP4472004B2 (en) * 2007-02-16 2010-06-02 株式会社アドバンテスト Test equipment

Also Published As

Publication number Publication date
JPS60263528A (en) 1985-12-27

Similar Documents

Publication Publication Date Title
JPS6198069A (en) Image processor
EP0142767B1 (en) Manipulation of graphics image data
CA1306296C (en) Image processing apparatus
JPS60229573A (en) Encoding and transmitting system for half-tone picture information
JPH06276392A (en) Picture processing unit
JPH0118606B2 (en)
JP3066154B2 (en) Selective binarization method
JP3227237B2 (en) Encoding device
JP3466655B2 (en) Image processing device
JP2621868B2 (en) Image feature extraction device
JPH06189141A (en) Dither image encoder
JP3135311B2 (en) Image processing device
JPS5820063A (en) Picture processor
KR940010477B1 (en) Half tone image data coding method of fax
JP2800250B2 (en) Data compression method
JP2755506B2 (en) Image forming device
JPS58168387A (en) Compressing system of picture signal
JPH0223067B2 (en)
JPH0470823B2 (en)
JP2009223893A (en) Image recognition apparatus and method, and image reader with image recognition apparatus
JPH0779426B2 (en) Dither image coding device
JPS6394781A (en) Encoding method for dither image
JPS6143078A (en) Processing system of original picture
JPH0446465A (en) Picture information encoding system
JPH10191051A (en) Image processor and its control method