JPS605040B2 - pattern processing device - Google Patents
pattern processing deviceInfo
- Publication number
- JPS605040B2 JPS605040B2 JP53107117A JP10711778A JPS605040B2 JP S605040 B2 JPS605040 B2 JP S605040B2 JP 53107117 A JP53107117 A JP 53107117A JP 10711778 A JP10711778 A JP 10711778A JP S605040 B2 JPS605040 B2 JP S605040B2
- Authority
- JP
- Japan
- Prior art keywords
- pattern
- data
- pixel data
- matching
- 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
Links
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Description
【発明の詳細な説明】
この発明は2次元パターンデータから所定のパターンを
抽出あるいは、パターン処理方式に関するものである。DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a method for extracting or processing a predetermined pattern from two-dimensional pattern data.
従来のこの種のパターン処理の処理手順を第1図に沿っ
て説明する。ここでは第1図Aに示すように2値化され
た原パターンに論理い1″ あるいはい0″の小領域ノ
イズが重畳されている場合においてこのノイズパターン
を除去する手順について述べる。先ず、第1図Bに示す
走査マスクdを第1図Aの原パターンのパターン上を走
査させる。すなわち、原パターンにおいて処理対象とな
る画素に隣接する3×3ビット(画素)の正方形格子の
各画素データa,b,c,d,e,f,g.h,i、の
間にて論理積演算をほどこし、この演算結果をあらため
てiの画素データとする。この3×3ビットの論理積演
算をほどこす走査「マスクdをパターン全体にわたって
順次走査させると、第1図Bの如く論理“1″の部分が
拡大され、論理い0″の部分か縮少されことによって、
白パターン、、1″の中の黒ノイズい0″が除去される
。A conventional processing procedure for this type of pattern processing will be explained with reference to FIG. Here, as shown in FIG. 1A, when a small area noise of logic 1" or logic 0" is superimposed on the binarized original pattern, a procedure for removing this noise pattern will be described. First, the scanning mask d shown in FIG. 1B is scanned over the original pattern shown in FIG. 1A. That is, each pixel data a, b, c, d, e, f, g, . A logical product operation is performed between h and i, and the result of this operation is used as the pixel data of i. When the mask d is sequentially scanned over the entire pattern by performing this 3 x 3 bit logical product operation, the logic "1" part is enlarged, and the logic "0" part is reduced, as shown in Figure 1B. By being
The black noise 0'' in the white pattern, 1'' is removed.
次に、第1図Cの走査マスク3を第1図Bのパターンに
対し画面全体にわたって順次走査させる。すなわち、3
×3のビットの正方形に隣接する画素間の論理和をあが
ためてiの画素データとする。以上の処理によって第1
図Cの如く論理い1″の部分が縦少され、論理−へ0″
の部分が拡大され、第1図Aのパターンのサイズにもど
る。しかし、以上の手順の処理では、まだ、黒パターン
(”0″)の中の白ノイズ(い1″)は残されたままで
ある。これを除去するには、再び、第1図Cのパターン
に走査マスク8をかけ、次に走査マスクQをかける手順
が必要である。この発明はこれらの欠点を解するために
なされたもので、多種類の特定パターンの抽出・除去等
が1回の処理で、しかも高速にできるパターン処理装置
を提供するものである。以下第2図に示すこの発明によ
る処理装置の一実施例について説明する。なお第3図は
第2図の主要部を詳細化したものである。第2図中、2
01は転送クロックに同期して入力される原パターンの
画素データを3ライン分蓄えると共にそれを順次シフト
させる3ラインシフトレジスタで、この中に蓄わえられ
る画素iの周辺画素データi,k,1,m,n,p,q
,sは、第1図の走査マスク/ぐターンa,b,c,d
,e,f,g,hの各画素位置にそれぞげ対応している
。202は処理される画素データjに隣接する8ビット
の周辺画素データj,k,1,m,n,p,q,s、と
照合するためのマスクパターンデータa,b,c,d,
e,f,g,h、をセットする照合用パターンレジス夕
、203は3ラインシフトレジスタ201の周辺画素デ
ータi,k,1,m’n’p,q,s、と照合用パター
ンレジスタ202にあらかじめ設定されたマスクパター
ンデータa,b,c,d,e,f,g,h、とを各画素
毎に照合し、一致した個数を計数して得られた計数値(
相関度)と外部から設定した相関度閥値を比較し、その
比較結果を2値の論理出力にて出力する相関回路、20
4は相関回路203の出力と原パターンの画素データi
との論理和および論理積の論理演算をほどこし、そのい
づれを抽出するかを判定する判定回路である。Next, the scanning mask 3 of FIG. 1C is sequentially scanned over the entire screen with respect to the pattern of FIG. 1B. That is, 3
The logical sum between pixels adjacent to the ×3 bit square is determined as pixel data for i. By the above processing, the first
As shown in figure C, the logic 1" part is vertically reduced and becomes logic -0".
The area is enlarged and returns to the size of the pattern in FIG. 1A. However, in the process described above, the white noise (1'') in the black pattern (0'') still remains. It is necessary to apply a scanning mask 8 to the image, and then apply a scanning mask Q.This invention was made to solve these drawbacks, and the extraction and removal of many types of specific patterns can be done in one step. The object of the present invention is to provide a pattern processing device that can perform high-speed processing.An embodiment of the processing device according to the present invention shown in FIG. 2 will be described below.FIG. 3 shows the main parts of FIG. 2 in detail. In Figure 2, 2
01 is a 3-line shift register that stores 3 lines of pixel data of the original pattern input in synchronization with the transfer clock and sequentially shifts it, and surrounding pixel data of pixel i stored in this register 1, m, n, p, q
, s are the scanning mask/g turns a, b, c, d in FIG.
, e, f, g, and h, respectively. 202 is mask pattern data a, b, c, d, for matching with 8-bit peripheral pixel data j, k, 1, m, n, p, q, s adjacent to pixel data j to be processed;
A matching pattern register 203 sets peripheral pixel data i, k, 1, m'n'p, q, s of the 3-line shift register 201 and matching pattern register 202 for setting e, f, g, h. The mask pattern data a, b, c, d, e, f, g, h, set in advance in
a correlation circuit that compares a correlation degree) with an externally set correlation degree threshold value and outputs the comparison result as a binary logic output;
4 is the output of the correlation circuit 203 and the pixel data i of the original pattern
This is a determination circuit that performs logical operations such as logical sum and logical product and determines which one to extract.
第3図は第2図の相関回路203および判定回路204
の構成を詳細に示したものである。第3図中、301は
原パターンの画素データiの周辺画素データj,k,1
,m,n’P’q’s、と照合用マスクパターンデータ
a,b,c,d,e,f,g,h、とをそれぞれ対応す
る画素毎に照合し、一致した場合、論理、、1″の信号
を出力する並列8ビットの照合回路、302は照合回路
301の各画素毎の一致信号個数を計数し、その計数値
すなわち8ビットの周辺パターンの相関度を出力する相
関度抽出回路、303は相関度抽出回路302の相関度
出力計数値と、設定した相関度閥値Nとの大、小、等号
関係を比較し、その比較結果に応じた2値の論理出力を
出力する比較回路304および305は比較回路303
の論理出力と画素データiそのものとの論理積および論
理和を求めるAND回路およびOR回路、306は、A
ND回路304又はOR回路305のいづれかの出力を
選択し、それを出力する選択回路である。FIG. 3 shows the correlation circuit 203 and determination circuit 204 in FIG.
This figure shows the detailed configuration of . In FIG. 3, 301 is peripheral pixel data j, k, 1 of pixel data i of the original pattern.
, m, n'P'q's, and the matching mask pattern data a, b, c, d, e, f, g, h, respectively, for each corresponding pixel, and if they match, the logical , 1'' signal, and 302 is a correlation degree extraction circuit that counts the number of matching signals for each pixel of the verification circuit 301 and outputs the counted value, that is, the correlation degree of the 8-bit peripheral pattern. A circuit 303 compares the correlation degree output count value of the correlation degree extraction circuit 302 and the set correlation degree threshold value N in terms of magnitude, smallness, and equality, and outputs a binary logical output according to the comparison result. The comparison circuits 304 and 305 are the comparison circuit 303
An AND circuit and an OR circuit 306 are A
This is a selection circuit that selects the output of either the ND circuit 304 or the OR circuit 305 and outputs it.
次に動作について説明する。Next, the operation will be explained.
今、原パターンの画素データが順次3ラインシフトレジ
スタ201に入力され、画素データ転送クロツクに同期
して順次シフトされているものとする。It is now assumed that the pixel data of the original pattern is sequentially input to the 3-line shift register 201 and sequentially shifted in synchronization with the pixel data transfer clock.
この際3ラインシフトレジスタ201に2次元配列され
る原パターンの所定領域すなわち第2図に示す3×3ビ
ットの正方形格子をなす画素データiの周辺画素データ
i,k,1,m’n’p,q,s、を3ラインシフトレ
ジスタ201から転送1クロック毎に引出し、パターン
抽出あるいは除去したいパターンに合せてあらかじめ照
合用パターンレジスタ202にセットされた照合用マス
ク/ぐターンデータa,b,c,d,e,f,g,h、
とを各画素毎にそれぞげ照合回路301にて論理積をと
る。すなわち、照合したい位置の画素データのみマスク
によって抽出する。この照合回路301の出力は、原パ
ターンの周辺画素データのマスキングデータである。相
関度抽出回路302は画素データiの周辺画素データか
らマスキング抽出されたものの個数(すなわち論理”1
″の個数)を計数し、計数値を相関度として出力する。
この相関度とパターン抽出したいパターンに合せてあら
かじめ設定しておいた相関度闇値とを比較回路303に
て比較して、この闇値より大きい、小さい、あるいは等
しいのいづれかの場合に論理値い1″ を出力するかを
MODEIにて指定する。この比較後の出力(画素iの
周辺分布状況データ)と画素データiとの論理積および
論理和をとり、この世力のいづれかを選択回路306に
て選択しこれを新たな処理後の画素データiとして出力
する。以上の動作を原パターン全体すなわち入力される
画素データすべてについてほどこす。このように照合用
マスクパターンデー夕、相関度閥値、MODE1(比較
出力セレクト)、MODE2(演算モードセレクト)を
所用パターンに応じて設定あるいは指定すれば、原パタ
ーンから所定のパターンを抽出あるいは除去することが
できる。次に例としてこのパタ−ン処理装置をノイズ処
理に用いた場合を第4図に紹介する。At this time, peripheral pixel data i, k, 1, m'n' of pixel data i forming a 3 x 3 bit square grid shown in FIG. p, q, s are transferred from the 3-line shift register 201 every clock, and matching mask/g turn data a, b, c, d, e, f, g, h,
A matching circuit 301 performs a logical product for each pixel. That is, only the pixel data at the position to be compared is extracted by masking. The output of this matching circuit 301 is masking data of peripheral pixel data of the original pattern. The correlation degree extraction circuit 302 calculates the number of items masked and extracted from peripheral pixel data of pixel data i (i.e., logic "1").
'') and output the counted value as the degree of correlation.
A comparator circuit 303 compares this degree of correlation with a dark correlation value set in advance according to the pattern to be extracted, and if the dark value is greater than, smaller than, or equal to the dark value, a logical value is determined. 1" is specified by MODEI. The output after this comparison (peripheral distribution status data of pixel i) and the pixel data i are ANDed and ORed, and one of the outputs is sent to the selection circuit 306. This is selected and output as new processed pixel data i.The above operations are performed for the entire original pattern, that is, all input pixel data.In this way, the matching mask pattern data, correlation degree threshold, By setting or specifying MODE1 (comparison output select) and MODE2 (calculation mode select) according to the desired pattern, it is possible to extract or remove a predetermined pattern from the original pattern. Figure 4 shows a case in which this is used for noise processing.
今、照合用マスクパターンデータa,b,c,d,e,
f,g,h=(0,1,0,1,0,1,0,1)とし
て、画素データiの左右上下の画素データ(b,d,f
,h)のみ抽出し、この画素の論理、、1″の個数を計
数する。Now, the matching mask pattern data a, b, c, d, e,
As f, g, h = (0, 1, 0, 1, 0, 1, 0, 1), pixel data (b, d, f
, h), and count the number of logics, , 1'' of this pixel.
この計数値(相関度)をMとする。相関度閥値Nとし、
M>Nならば、比較回路303の論理出力t=い1″,
MミNならばt= 、、0″ とするようにMODEI
を指定する。この画素データiの上下左右の周辺分布状
況によって決定された論理出力tと画素データiについ
て、画素データi=ぃ0″のときはtとiの論理和をま
たi=い1″のときはtとiの論理積を判定回路306
によって選択し(この場合MODE2の指定にiの論理
を用いている)これを新たな処理後の画素データiの論
理データとして採用する。以上の処理を第4図Aのパタ
ーンにわたってほどこすと、白パターン中の黒ノイズお
よび黒パ夕−ン中の白ノイズが1回の処理で除去される
(第4図B)。以上の如く、照合マスクパターンに方向
性マスク抽出機能を持たせると共に相関度を抽出するこ
とにより、各画素の周辺分布状況を把握し、これによっ
て各画素の取るべき正しい論理値を決定することにより
、任意の隔適性に富んだパターン処理が1回の処理にて
可能となる。なお、第4図では、ノイズ処理(これは面
の抽出でもある)について述べたが、設定する各パラメ
ータを適当にえらべば線分又は曲線の抽出等の機能も実
現できる。それ故、第2図に示す2次元パターン処理部
を演算子として画像処理用計算機に挿入することができ
る。以上は、3×3ビットの領域の処理について述べた
がM×M(Mは整数)の領域について同様なパターン処
理がほどこせるのは勿論であるMが大きくなると、角、
曲面および端点等の検出も可能である。以上のようにこ
の発明に係るパターン処理装置によれば、任意に設定し
た照合マスクパターンと相関度にて、各画素位置の周辺
分布状況を求め、このデータと各画素のデータと論理演
算にて、真の画素データの論理値を決定しているので、
原パターンの中から所定のパターンを1回の処理で、し
かも高速で抽出あるいは除去できる効果を有する。Let this count value (correlation degree) be M. Let the correlation degree threshold be N,
If M>N, the logic output of the comparison circuit 303 t=1'',
If MmiN, MODEI so that t= ,,0''
Specify. Regarding the logical output t and pixel data i determined by the upper, lower, left, and right peripheral distribution conditions of this pixel data i, when pixel data i = 0'', the logical sum of t and i, and when i = 1'', Circuit 306 that determines the logical product of t and i
(in this case, the logic of i is used to specify MODE2) and is adopted as the logic data of the new processed pixel data i. When the above processing is applied to the pattern shown in FIG. 4A, black noise in the white pattern and white noise in the black pattern are removed in one process (FIG. 4B). As described above, by providing the matching mask pattern with a directional mask extraction function and extracting the degree of correlation, the surrounding distribution situation of each pixel can be grasped, and from this, the correct logical value that each pixel should take can be determined. , it is possible to process a pattern rich in arbitrary spatial aptitude in one process. In FIG. 4, noise processing (which is also surface extraction) has been described, but functions such as line segment or curve extraction can also be realized by appropriately selecting each parameter to be set. Therefore, the two-dimensional pattern processing section shown in FIG. 2 can be inserted into the image processing computer as an operator. The above has described processing of a 3 x 3 bit area, but it goes without saying that similar pattern processing can be applied to an M x M (M is an integer) area.
It is also possible to detect curved surfaces and end points. As described above, according to the pattern processing device according to the present invention, the peripheral distribution situation of each pixel position is obtained using an arbitrarily set matching mask pattern and correlation degree, and this data and the data of each pixel are used in a logical operation. , since we are determining the logical value of the true pixel data,
This has the effect of allowing a predetermined pattern to be extracted or removed from the original pattern in one process and at high speed.
第1図は従来のパターン処理方式の手順を説明する説明
図、第2図は本発明の一実施例を示す回路構成図、第3
図は第2図の主要部を示す要部回路構成図、第4図は第
2図および第3図の動作を説明するための動作説明図で
ある。
図中201は3ラインデータシフトレジスタ、202は
照合パターンレジスタ、203は相関回路、204は判
定回路、301は照合回路、302は相関度抽出回路、
303は比較回路、304はAND回路、305はOR
回路「 306は選択回路である。
なお図中、同一あるいは相当部分には同一符号を付して
示してある。第2図
第1図
第3図
第4図FIG. 1 is an explanatory diagram explaining the procedure of a conventional pattern processing method, FIG. 2 is a circuit configuration diagram showing an embodiment of the present invention, and FIG.
This figure is a circuit configuration diagram showing the main part of FIG. 2, and FIG. 4 is an operation explanatory diagram for explaining the operations of FIGS. 2 and 3. In the figure, 201 is a 3-line data shift register, 202 is a matching pattern register, 203 is a correlation circuit, 204 is a judgment circuit, 301 is a matching circuit, 302 is a correlation degree extraction circuit,
303 is a comparison circuit, 304 is an AND circuit, and 305 is an OR circuit.
Circuit 306 is a selection circuit. In the figures, the same or corresponding parts are designated by the same reference numerals.
Claims (1)
タを処理するものにおいて、処理される画素の周辺画素
データとこの周辺画素に対応してあらかじめそのデータ
値が設定された照合用マスクパターンデータを対応画素
毎に照合し、その照合結果に応じてそれぞれ一致信号を
出力する照合部、この照合部の一致信号数を計数し、そ
の計数値(相関度)を出力する相関計数部、この相関計
数部の計数値とあらかじめ設定された相関度閾値を比較
し、その比較結果に応じた論理信号を出力する比較部、
この比較部の論理信号と上記処理される画素データを所
定モードで論理演算し、この演算出力を処理画素データ
として出力する演算部を備えたことを特徴とするパター
ン処理装置。 2 演算部の論理演算モードを処理される画素データの
データ値に応じてモード指定(選択)するようにしたこ
とを特徴とする特許請求の範囲第1項記載のパターン処
理装置。[Claims] 1. In a device that processes pattern data in which binarized pixels are two-dimensionally arranged, peripheral pixel data of the pixel to be processed and data values are set in advance in correspondence with the peripheral pixels. A matching section that matches the matched matching mask pattern data for each corresponding pixel and outputs matching signals according to the matching results, and counts the number of matching signals of this matching section and outputs the counted value (degree of correlation). a correlation counting unit; a comparison unit that compares the count value of the correlation counting unit with a preset correlation degree threshold and outputs a logic signal according to the comparison result;
A pattern processing device comprising: a calculation unit that performs a logical operation on the logic signal of the comparison unit and the pixel data to be processed in a predetermined mode, and outputs the output of the calculation as processed pixel data. 2. The pattern processing device according to claim 1, wherein the logical operation mode of the arithmetic unit is designated (selected) according to the data value of the pixel data to be processed.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP53107117A JPS605040B2 (en) | 1978-08-31 | 1978-08-31 | pattern processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP53107117A JPS605040B2 (en) | 1978-08-31 | 1978-08-31 | pattern processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5534723A JPS5534723A (en) | 1980-03-11 |
| JPS605040B2 true JPS605040B2 (en) | 1985-02-07 |
Family
ID=14450900
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP53107117A Expired JPS605040B2 (en) | 1978-08-31 | 1978-08-31 | pattern processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS605040B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2683008B2 (en) * | 1988-02-16 | 1997-11-26 | 株式会社リコー | Rectangle shape internal filling method |
| JPH01296385A (en) * | 1988-05-25 | 1989-11-29 | Okuma Mach Works Ltd | Method for improving picture quality of binary picture data |
-
1978
- 1978-08-31 JP JP53107117A patent/JPS605040B2/en not_active Expired
Also Published As
| Publication number | Publication date |
|---|---|
| JPS5534723A (en) | 1980-03-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5247583A (en) | Image segmentation method and apparatus therefor | |
| JPH04332089A (en) | Method for registering finger print data | |
| CN108805023A (en) | A kind of image detecting method, device, computer equipment and storage medium | |
| US20030169941A1 (en) | Edge enhancement method and apparatus in digital image scalar-up circuit | |
| JPH11167455A (en) | Hand shape recognition device and monochrome object shape recognition device | |
| JPS605040B2 (en) | pattern processing device | |
| JPH03102579A (en) | Noise removal system for image data | |
| JP3585143B2 (en) | Character string extraction method and device | |
| JP3748248B2 (en) | Image processing apparatus and image processing method | |
| JPH08212354A (en) | Object recognition method | |
| JPH06292014A (en) | Picture processor | |
| JPH056431A (en) | Detector for feature point of contour line | |
| JP2674083B2 (en) | Image area identification device | |
| JPH0877355A (en) | Weighted pattern matching method | |
| JPS58158761A (en) | Pattern position detecting method | |
| JPS595945B2 (en) | Pattern recognition method | |
| JP3302855B2 (en) | Region extraction method and apparatus | |
| JPH0225989A (en) | Moving object extracting method | |
| JP3969593B2 (en) | Image processing apparatus and image processing method | |
| JPH04157577A (en) | Positioning device | |
| JPH0385984A (en) | Picture recognition device | |
| JPH0684013A (en) | Method for recognizing pattern | |
| JPH0721392A (en) | Method for extracting contour line of input picture | |
| JPH05181969A (en) | Method and device for detecting edge | |
| JPH0122953B2 (en) |