JPH01158577A - Method for background erasing and binarization processing for line graphic picture and its device and picture processor for fingerprint picture - Google Patents

Method for background erasing and binarization processing for line graphic picture and its device and picture processor for fingerprint picture

Info

Publication number
JPH01158577A
JPH01158577A JP63234909A JP23490988A JPH01158577A JP H01158577 A JPH01158577 A JP H01158577A JP 63234909 A JP63234909 A JP 63234909A JP 23490988 A JP23490988 A JP 23490988A JP H01158577 A JPH01158577 A JP H01158577A
Authority
JP
Japan
Prior art keywords
image
line
background
local area
picture
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.)
Granted
Application number
JP63234909A
Other languages
Japanese (ja)
Other versions
JP2732608B2 (en
Inventor
Kazuya Asano
一哉 浅野
Satoshi Maruyama
智 丸山
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.)
JFE Steel Corp
Original Assignee
Kawasaki Steel Corp
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 Kawasaki Steel Corp filed Critical Kawasaki Steel Corp
Priority to JP63234909A priority Critical patent/JP2732608B2/en
Publication of JPH01158577A publication Critical patent/JPH01158577A/en
Application granted granted Critical
Publication of JP2732608B2 publication Critical patent/JP2732608B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Collating Specific Patterns (AREA)
  • Image Input (AREA)

Abstract

PURPOSE:To obtain a satisfactory binarization image in any case by dividing the whole picture into local areas in each of which line graphics can be regarded as parallel straight line groups and executing a specific processing for the whole picture. CONSTITUTION:After a picture is divided into the local areas in each of which the line graphics can be regarded as the parallel straight line groups, the direction of the line graphics is calculated for each local area, and a weighted mean value, the center of which is each picture element, is obtained for each local area using the mask pattern of each direction. Thereafter, a binarizing is executed by binarizing according to the comparison of the weighted mean value and a threshold, namely, by binarizing while judging whether the line graphics are continued in the direction or not using not only the information of the picture level of one picture element but also that of the picture levels of picture elements near the former picture element at the time of executing the binarizing. Thus, the binarizing processing can be executed which is resistant to a noise, and the satisfactory binary picture can be obtained even for a low-quality variable density picture.

Description

【発明の詳細な説明】 〔産業上の利用分野1 本発明は、線図形画像の2値化処理方法および装置に係
り、特に線図形の濃淡画像を線の連続性を損なうことな
く、2値化する際に採用するのに好適な線図形画像の2
値化処理方法および装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Field of Application 1] The present invention relates to a method and apparatus for binarizing a line graphic image, and in particular to a method and apparatus for binarizing a line graphic image, and particularly for converting a gray scale image of a line graphic into a binary value without impairing the continuity of the lines. 2 Line image images suitable for use when converting
The present invention relates to a value processing method and device.

〔従来の技術〕[Conventional technology]

一般に、ディジタル画像、すなわち画素と呼ばれる単位
の集合として画像を表し明暗に応じて各画素に離散的な
値(画像レベル)を与えた画像を2値化する場合、何ら
かの方法でしきい値を設定し、各画素の値がそのしきい
値を超えているか否かにより、2値の内の何れを与える
かを決める方法が取られているのが通常である。
Generally, when converting a digital image, that is, an image that is expressed as a set of units called pixels and gives each pixel a discrete value (image level) depending on its brightness, a threshold value is set in some way. However, a method is usually adopted in which one of the two values to be given is determined depending on whether or not the value of each pixel exceeds its threshold value.

しかしながら、線図形画像にこの方法を適用した場合、
線がかすれている部分では、画像レベルがしきい値以下
になり、2値画像ではその部分で線が途切れてしまうこ
とが生じる。逆に2本以上の線が近接している部分では
、線の間の部分の画像レベルがしきい値を超え、本来能
れている複数本の線が2値画像では1本につながってし
まうことも生じる。
However, when this method is applied to line figure images,
In areas where lines are blurred, the image level falls below the threshold, and in a binary image, lines may be interrupted at those areas. Conversely, in areas where two or more lines are close to each other, the image level in the area between the lines exceeds the threshold, and the normally possible multiple lines become one in a binary image. It also happens.

これに対して、例えば特開昭62−29267号公報に
おいて、低品質線図形画像の2値化方式が開示されてい
る。この特開昭62−29267号で提案される2値化
方式は、隣接する画素で囲まれた面を1つの局所平面と
して、各局所平面について、その濃淡の傾斜を求め、該
傾斜をラベル化したラベル画像を作成し、該ラベル画像
を利用して線図形候補画素を抽出し、抽出した線図形候
補画素をもとにしきい値を決定し、画像を2値化するも
のである。
In contrast, for example, Japanese Patent Laid-Open No. 62-29267 discloses a binarization method for low-quality line graphic images. The binarization method proposed in JP-A No. 62-29267 regards a surface surrounded by adjacent pixels as one local plane, calculates the slope of the shading for each local plane, and labels the slope. A label image is created, line figure candidate pixels are extracted using the label image, a threshold value is determined based on the extracted line figure candidate pixels, and the image is binarized.

すなわち、この発明は線図形を抽出してその画像レベル
に基づいてしきい値を決定し、得られたしきい値をその
近傍のみに適用して2値化することにより、汚れた画像
に対して良好な2値画像を得ようとするものである。
That is, this invention extracts a line figure, determines a threshold value based on its image level, applies the obtained threshold value only to the vicinity, and binarizes it, thereby processing a dirty image. The aim is to obtain a good binary image.

しかしながら、各画素の1つ1つに対してしきい値との
大小を比較しなから2値化を行うことは従来と変わらな
いため、線図形中にノイズのためのしきい値以下の部分
があれば、線は途切れてしまう。また、線と線との間に
ブリッジ状にしきい値以上の部分があれば本来能れてい
る線がつながってしまうことも起こり得る。さらに線図
形の品質が悪く、線が断続している場合には、このよう
な隣接画素同士の情報だけではノイズのために良好な線
図形抽出を行うことができず、良好な2値化処理を行う
ことができないという欠点を依然として含んでいた。
However, since binarization is performed without comparing the size of each pixel with the threshold value, it is still the same as in the past, so parts of the line figure that are below the threshold value due to noise If there is, the line will be broken. Furthermore, if there is a bridge-like portion between two lines that exceeds the threshold value, lines that should normally be possible may become connected. Furthermore, if the quality of the line figure is poor and the line is discontinuous, it is not possible to perform good line figure extraction with only information about adjacent pixels due to noise, and it is difficult to perform good binarization processing. It still had the drawback of not being able to do so.

線図形を含むディジタル化された濃淡画像を2値化する
場合、全画像に同じしきい値を適用するにせよ、局所的
に異なったしきい値を適用するにせよ、線がかすれてい
る部分では線が途切れてしまったり、逆に2本以上の線
が近接している部分では、本来能れている線がつながっ
てしまうことも生じる。
When binarizing a digitized grayscale image containing line figures, whether the same threshold is applied to the entire image or locally different thresholds are applied, areas where the lines are blurred In this case, lines may become disconnected, or conversely, in areas where two or more lines are close to each other, lines that should normally be connected may become connected.

また、線図形を含む画像に背景像が重畳している場合に
線図形の2値化像を得ようとする場合、先ず背景像を消
去して線図形を抽出した後、2値化処理を行う必要があ
る。
In addition, when trying to obtain a binarized image of a line figure when a background image is superimposed on an image containing a line figure, first erase the background image, extract the line figure, and then perform the binarization process. There is a need to do.

何らかの方法で顕在化を行った指紋をテレビカメラで撮
影する場合はその典型的な例であるが、従来上記の背景
消去および2値化処理を連続して行える装置はなく、撮
影した指紋を人がトレースしているのが現状である。
A typical example is when a fingerprint that has been revealed by some method is photographed using a television camera, but there is no device that can perform the background erasure and binarization processing described above continuously, and the photographed fingerprint cannot be photographed by a human being. The current situation is that it is being traced.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

本発明は上記のような事情に迄みてなされたものであっ
て、いかなる場合にも良好な2値化像を得ることを可能
とする線図形画像の2値化処理方法および装置を提供す
ることを目的とする。
The present invention has been made in view of the above circumstances, and it is an object of the present invention to provide a method and apparatus for binarizing a line figure image, which makes it possible to obtain a good binarized image in any case. With the goal.

【課題を解決するための手段1 本発明の第1の発明は、線図形を含むディジタル化され
たa製画像から線図形画像の2値画像を得る線図形画素
の2値化処理方法であって、次の工程から構成されてい
る。
[Means for Solving the Problems 1] The first aspect of the present invention is a method for binarizing line figure pixels to obtain a binary image of a line figure image from a digitized A-made image containing line figures. It consists of the following steps.

(a)  線図形がその領域内では平行な直線群とみな
し得る局所領域に全画像を分割すること。
(a) Divide the entire image into local regions where line figures can be regarded as a group of parallel straight lines within that region.

(b)  次いで前記各局所領域ごとに直線群とみなし
た線図形の方向を算出すること。
(b) Next, calculate the direction of the line figure regarded as a group of straight lines for each local area.

(c)  各方向ごとに定められたマスクパターンを用
いて各画素を中心とした重み付き平均値を求めること。
(c) Calculating a weighted average value centered on each pixel using a mask pattern determined for each direction.

(d)  これら重み付き平均値が予め設定しておいた
しきい値を超えているか否かにより、2値の内の何れか
を前記マスクパターンの中心となる画素に与え、この処
理を前記各局所領域ごとの全画素について行うこと。
(d) Depending on whether or not these weighted average values exceed a preset threshold, one of the two values is applied to the central pixel of the mask pattern, and this process is applied to each of the local areas. What to do for all pixels in each area.

次に本発明の第1の発明の好ましい具体的手段としては
、前記各局所領域ごとに線図形の方向の算出方法として
、各方向ごとに定められたマスクパターンを順次用いて
各画素を中心にしてそのマスクパターンと画素との積和
演算を行い、その結果が最大となるマスクパターンの方
向によってその画素近傍における線図形の方向を算出す
ることを全画素について行い、各局所領域ごとにそれに
含まれる画素について算出された方向の数を計算し、最
多となった方向をその局所領域における線図形の方向と
することである。
Next, as a preferred specific means of the first aspect of the present invention, as a method of calculating the direction of the line figure for each local area, a mask pattern determined for each direction is sequentially used to calculate the direction of the line figure at the center of each pixel. For all pixels, calculate the direction of the line figure in the vicinity of that pixel based on the direction of the mask pattern where the result is the maximum, and calculate the direction of the line figure in the vicinity of that pixel for each local area. The number of directions calculated for each pixel is calculated, and the direction with the largest number of directions is set as the direction of the line figure in that local area.

さらにある局所領域において、最多となった方向の数が
、各方向の数の平均値と比較し、その差が予め設定して
おいたしきい値以上でない時は、その局所領域は無方向
であり、線図形を含まない領域と判断しその局所領域内
の全画素について2値のうちの何れかを一様に与えるこ
とである。
Furthermore, in a certain local area, the maximum number of directions is compared with the average value of the number of each direction, and if the difference is not greater than a preset threshold, that local area is directionless. , it is determined that the area does not include a line figure, and one of the binary values is uniformly given to all pixels within that local area.

さらにこの場合、必要に応じ領域を分割して同様の繰返
しを行うとよい。
Furthermore, in this case, it is preferable to divide the area as necessary and repeat the same process.

例えば、指紋画像のように、場所によって線図形画像の
曲率が異なったり、分岐がある画像に対して、前記の局
所領域を、無方向と判断する2値処理方法を適用し、全
画像を−様な大きさの局所領域に分割し、その1つ1つ
の領域に線図形の方向を割当てようとすると、領域内で
線図形の方向が一定でなく、そのために最多となった方
向の数と各方向の数の平均値がしきい値を上まわらず、
そのためにその局所領域が無方向性と判断されてしまう
ことがある。
For example, for an image such as a fingerprint image in which the curvature of a linear image differs depending on the location or there are branches, the binary processing method that judges the local area as having no direction is applied, and the entire image is - If you divide the area into local areas of various sizes and try to assign the direction of the line figure to each area, the direction of the line figure is not constant within the area, and therefore the maximum number of directions and The average value of the number in each direction does not exceed the threshold,
Therefore, the local area may be determined to be non-directional.

第18図はこの様な場合の2値化処理手順をフローチャ
ートで示す。すなわち、線図形を含むディジタル化され
た濃淡画像から線図形画像の2値画像を得るに際し、 (a)  線図形がその領域内では平行な直線群とみな
し得る局所領域に全画像を分割し。
FIG. 18 shows a flowchart of the binarization processing procedure in such a case. That is, when obtaining a binary image of a line figure image from a digitized grayscale image containing a line figure, (a) the entire image is divided into local regions in which the line figure can be regarded as a group of parallel straight lines within that area;

(b)  各方向ごとに定められたマスクパターンを順
次用いて各画素を中心にしてそのマスクパターンと画素
との積和演算を行い、 (c)  その積和演算の結果が最大となるマスクパタ
ーンの方向によってその画素近傍における線図形の方向
を算出し、 (d)  前記各局所領域ごとに各画素について前記線
図形の方向の算出を行い、その結果を前記局所領域ごと
に集計し。
(b) Sequentially using mask patterns determined for each direction, perform a sum-of-products operation between the mask pattern and the pixel, centering on each pixel, (c) A mask pattern that maximizes the result of the sum-of-products operation. (d) calculate the direction of the line figure for each pixel for each local area, and aggregate the results for each local area;

(e)  その集計の結果、最多となった方向の数を各
方向の数の平均値と比較し、その差が予め設定しておい
たしきい値以上であれば、各方向ごとに定められたマス
クパターンを用いて各画素を中心とした重み付き平均値
を求め、 これら重み付き平均値が予め設定しておいたしきい値を
超えているか否かにより、2値のうちの何れかを前記マ
スクパターンの中心となる画素に与え、この処理を前記
各局所領域ごとの全画素について行い、前記最多となっ
た方向の数と各方向の数の平均値の差が、前記予め設定
しておいたしきい値以上でない場合はその局所領域をさ
らに小領域に分割し。
(e) As a result of the aggregation, compare the number of directions with the highest number with the average value of the number of each direction, and if the difference is greater than the preset threshold, the A weighted average value centered on each pixel is determined using a mask pattern, and depending on whether or not these weighted average values exceed a preset threshold value, one of the two values is applied to the mask. This process is applied to the pixel at the center of the pattern, and this process is performed for all pixels in each local area, and the difference between the maximum number of directions and the average value of the number of each direction is determined by the preset value. If it is not above the threshold, the local area is further divided into smaller areas.

(f)該分割した小領域ごとに前記局所領域に対して行
ったのと同様に、前記各画素ごとの線図形の算出結果の
集計を行い、最多となった方向の数が各方向の数の平均
値と比較し、その差が予め設定しておいたしきい値以上
であれば、該最多となった方向をその小領域における線
図形の方向とし、該方向のマスクパターンを用いて各画
素を中心とした重み付き平均値を求め、 (g)これら重み付き平均値が予め設定しておいたしき
い値を超えているか否かにより、2値のうちの何れかを
前記マスクパターンの中心となる画素に与え、 (h)前記最多となった方向の数が各方向の数の平均値
差が再びしきい値以下となった場合はその小領域をさら
に分割し、分割した領域について同様°の操作を14つ
ことを、分割した領域が方向を持つか、分割した領域の
大きさが予め設定しておいたしきい値以下になるまで繰
り返し行うこと、によって適正に処理することができる
(f) For each divided small region, the calculation results of the line figure for each pixel are aggregated in the same way as for the local region, and the maximum number of directions is the number of directions in each direction. If the difference is greater than or equal to a preset threshold, the direction with the highest frequency is set as the direction of the line figure in that small area, and each pixel is determined using the mask pattern in that direction. (g) Depending on whether these weighted average values exceed a preset threshold, one of the two values is determined as the center of the mask pattern. (h) If the average difference between the numbers in each direction becomes equal to or less than the threshold value again, the small area is further divided, and the same process is applied to the divided areas. Appropriate processing can be achieved by repeating the 14 operations described above until the divided region has a direction or the size of the divided region becomes less than or equal to a preset threshold.

本発明の第2の発明は、上記第1の発明を好適に実施す
ることができる装置であって、次の■〜[相]から構成
される装置である。
A second invention of the present invention is an apparatus that can suitably implement the first invention, and is comprised of the following phases 1 to 1.

■線図形を撮像する画像入力装置 ■この画像入力装置に入力された線図形の濃淡画像を格
納する第1の画像メモリ ■この濃淡画像を局所領域に分割し、領域ごとに線図形
の方向を算出する方向算出回路■この算出された方向を
記録する方向記録用メモリ ■この記録された方向を読み出して前記第1の画像メモ
リに格納された濃淡画像を2値化すZ2値化回路 ■この2値化信号を格納する第2の画像メモリ■前記し
た画像入力装置、第1の画像メモリおよび第2の画像メ
モリのそれぞれの出力信号を選択する出力切換回路 ■この選択された出力信号をアナログ信号に変換するD
/A変換器 [相]このアナログ信号を表示するモニタ次に本発明の
第3の発明について説明する。
■An image input device that captures an image of a line figure.■A first image memory that stores a grayscale image of a line figure input to this image input device.■This grayscale image is divided into local areas, and the direction of the line figure is determined for each area. Direction calculation circuit for calculation ■ Direction recording memory for recording this calculated direction ■ Z binarization circuit for reading out this recorded direction and binarizing the grayscale image stored in the first image memory ■ This 2 A second image memory that stores the digitized signal. An output switching circuit that selects the output signals of the image input device, the first image memory, and the second image memory. The selected output signal is converted into an analog signal. Convert to D
/A converter [phase] Monitor for displaying this analog signal Next, the third aspect of the present invention will be explained.

一般にCCD (charge coupled de
vice )カメラなどで物体に付着した物質が発する
蛍光を図形として捉えようとする時、必然的に付着して
いる物体表面の模様が背景として重畳する。
Generally, CCD (charge coupled de
vice) When trying to capture the fluorescence emitted by a substance attached to an object with a camera, etc., the pattern on the surface of the attached object is inevitably superimposed as a background.

例えば、レーザ光を指紋付着物体に照射し、指紋が発す
る蛍光により指紋を検出するレーザ蛍光法による指紋検
出装置では、指紋画像を撮影しようとすると、必然的に
指紋が付着している物体の模様も重畳して背景画像とし
て撮影されてしまう。
For example, in a fingerprint detection device using a laser fluorescence method, which irradiates a fingerprint-attached object with laser light and detects the fingerprint by the fluorescence emitted by the fingerprint, when trying to take a fingerprint image, the pattern of the fingerprint-attached object inevitably appears. will also be superimposed and photographed as a background image.

このように、関心のある線図形に背景画像が重畳してい
る場合には、上述の線図形画像の2値化処理方法あるい
は線図形画像の2値化処理装置を直ちに適用することは
できない。
In this way, when the background image is superimposed on the line figure of interest, the above-described line figure image binarization processing method or line figure image binarization processing apparatus cannot be immediately applied.

このような場合は背景画像を消去して、線図形画像を抽
出し、この抽出した線図形画像に対して上述の線図形画
像の2値化処理方法あるいは装置を適用する必要がある
In such a case, it is necessary to delete the background image, extract a line figure image, and apply the above-described line figure image binarization processing method or apparatus to the extracted line figure image.

本発明の第3の発明はこのような場合に適用して好適な
線図形画像の背景消去および2値化処理方法であって、
第19図にその手順をフローチャートで示すように、抽
出すべき線図形に背景が重畳している濃淡画像(以下画
像Aと表す)と、背景だけの濃淡画像(以下画像Bと表
す)とから、背景を消去して抽出すべき線図形だけを抽
出し、さらに該抽出した線図形の濃淡画像を2値化する
背景消去および2値化処理方法において、次の工程から
なるものである。
A third aspect of the present invention is a method for background erasing and binarizing a line graphic image suitable for application in such cases, comprising:
As shown in the flowchart of the procedure in FIG. 19, a grayscale image in which the background is superimposed on the line figure to be extracted (hereinafter referred to as image A) and a grayscale image with only the background (hereinafter referred to as image B) are extracted. , a background erasure and binarization processing method for erasing the background, extracting only the line figure to be extracted, and further binarizing the gray scale image of the extracted line figure, which consists of the following steps.

(イ)画像Aから背景画像の一部分画像を分離すること
(b) Separating a partial image of the background image from image A.

(ロ)分離した背景画像の部分画像から適当数の画素の
集合Cを抽出すること。
(b) Extracting a set C of an appropriate number of pixels from the separated partial image of the background image.

(ハ)画像Bで集合Cに対応する画素の集合りを抽出す
ること。
(c) Extracting a set of pixels corresponding to set C in image B.

(ニ)集合Cと集合りとで対応する画素の階調について
回帰分析を行い、その結果から画像Aの背景部分と画像
Bのそれに対応する部分の階調間の変換係数を求めるこ
と。
(d) Performing a regression analysis on the gradations of pixels corresponding to the set C and the set, and determining a conversion coefficient between the gradations of the background part of the image A and the corresponding part of the image B from the result.

(ホ)該変換係数を用いて画像Bを補正しつつ、画像A
から画像Bを減算し、線図形を抽出すること。
(E) While correcting image B using the conversion coefficient, image A
To subtract image B from and extract line figures.

(へ)線図形がその領域内では平行な直線群とみなし得
る局所領域に全画像を分割すること。
(f) Divide the entire image into local regions in which line figures can be regarded as a group of parallel straight lines within that region.

(ト)前記各局所領域ごとに直線群とみなした線図形の
方向を算出すること。
(g) Calculating the direction of a line figure regarded as a group of straight lines for each local area.

(チ)各方向ごとに定められたマスクパターンを用いて
各画素を中心とした重み付き平均値を求めること。
(H) Calculating a weighted average value centered on each pixel using a mask pattern determined for each direction.

(す)これら重み付き平均値が予め設定しておいたしき
い値を超えているか否かにより、2値のうちの何れかを
前記マスクパターンの中心となる画素に与え、この処理
を前記各局所領域ごとの全画素について行うこと。
(1) Depending on whether or not these weighted average values exceed a preset threshold, one of the two values is applied to the central pixel of the mask pattern, and this process is applied to each of the local areas. What to do for all pixels in each area.

ここで、前記画像Aから背景画像の部分画像を分離する
手段として画像レベルにしきい値を設定し、このしきい
値以下の部分を背景とすればよし)。
Here, as a means for separating a partial image of the background image from the image A, a threshold value may be set at the image level, and the portion below this threshold value may be used as the background).

また、前記画像Aから背景画像の部分画像を分離する手
段として線図形部分と背景部分のテキスチャの違いを利
用するのが好適である。
Furthermore, as a means for separating a partial image of the background image from the image A, it is preferable to utilize the difference in texture between the line figure part and the background part.

次に本発明の第4の発明は、上記第3の発明方法を好適
に実施することができる線図形画像の背景消去及び2値
化処理装置であって、次のi)〜xivlから構成され
ている。
Next, the fourth invention of the present invention is a background erasing and binarization processing device for line graphic images capable of suitably implementing the method of the third invention, which comprises the following i) to xivl. ing.

i) 画像を盪像する画像入力装置。i) An image input device that captures images.

li)  この画像入力装置に入力された線図形画像に
背景が重畳した画像(画像A)を格納する第1の画像メ
モリ。
li) A first image memory that stores an image (image A) in which a background is superimposed on a line figure image input to this image input device.

1ii1  画像入力装置に入力された背景だけの画像
(画像B)を格納する第2の画像メモリ。
1ii1 A second image memory that stores the background-only image (image B) input to the image input device.

iv)  画像Aの背景画像の部分画像を分離する手段
iv) means for separating partial images of the background image of image A;

■) この部分画像から適当数の画素の集合Cを抽出す
る手段。
(2) Means for extracting a set C of an appropriate number of pixels from this partial image.

vi)  画像Bで集合Cに対応する画素の集合りを抽
出する手段。
vi) means for extracting a set of pixels corresponding to set C in image B;

viil  集合Cと集合りで対応する画素の階調につ
いて回帰分析を行い、その結果から画像Aの背景部分と
画像Bのそれに対応する部分の階調間の変換係数を求め
る回帰分析回路。
viil A regression analysis circuit that performs regression analysis on the gradations of pixels corresponding to set C and the set, and calculates a conversion coefficient between the gradations of the background part of image A and the corresponding part of image B from the result.

viiil  変換係数を用いて画像Bを補正しつつ画
像Aから画像Bを減算する四則演算を行い、その結果を
第1の画像メモリまたは第2の画像メモリに格納する背
景画像減算回路。
viii A background image subtraction circuit that performs four arithmetic operations to subtract image B from image A while correcting image B using a conversion coefficient, and stores the result in a first image memory or a second image memory.

ix)  この背景消去を施された濃淡画像を局所領域
に分割し、領域ごとに線図形の方向を算出する方向算出
回路。
ix) A direction calculation circuit that divides this background-removed grayscale image into local regions and calculates the direction of a line figure for each region.

X) 算出された方向を記録する方向記録用メモリ。X) Direction recording memory that records the calculated direction.

xi)  この記録された方向を読み出して前記第1の
画像メモリあるいは第2の画像メモリに格納された濃淡
画像を2値化して、他方の画像メモリに格納する2値化
回路。
xi) A binarization circuit that reads out the recorded direction, binarizes the grayscale image stored in the first image memory or the second image memory, and stores it in the other image memory.

xii)  前記した画像入力装置、第1の画像メモリ
および第2の画像メモリのそれぞれの出力信号を選択す
る出力切換回路。
xii) An output switching circuit that selects the respective output signals of the image input device, the first image memory, and the second image memory.

xiii)  選択された出力信号をアナログ信号に変
換するD/A変換器。
xiii) A D/A converter that converts the selected output signal into an analog signal.

xivl  このアナログ信号を表示するモニタ6なお
、前述の本発明の第4の発明装置を指紋画像用画像処理
装置に応用する場合の装置は、線図形画像の背景消去お
よび2値化処理装置およびその周辺機器から構成される
装置の方向算出回路は、全画像を局所領域に分割する際
に、指紋画像の1本1本の線(隆線と称する)の曲率や
間隔を考慮し、分割した領域内で隆線が平行した直線群
となるようにした回路とし、局所領域の大きさを指紋画
像に適したものとする。
xivl Monitor 6 for displaying this analog signal Note that when the fourth inventive device of the present invention is applied to an image processing device for fingerprint images, the device includes a background erasing and binarization processing device for line figure images and its The direction calculation circuit of the device, which is composed of peripheral devices, takes into account the curvature and spacing of each line (referred to as a ridge) in the fingerprint image when dividing the entire image into local areas, and divides the entire image into local areas. The circuit is configured so that the ridges form a group of parallel straight lines within the area, and the size of the local area is made suitable for a fingerprint image.

〔作用1 以下に、本発明の構成を作用と共に具体的に説明する。[Effect 1 Below, the structure of the present invention will be specifically explained along with its operation.

第1図は、本発明の手順を示すフローチャートである。FIG. 1 is a flowchart showing the procedure of the present invention.

以下、その各項目について詳述する。Each item will be explained in detail below.

先ず、第2図に示すように、線図形がその領域内では、
平行な直線群とみなせるような局所領域に分割する。す
なわち、ここでは小さな矩形が1つの局所領域である。
First, as shown in Figure 2, within the area of the line figure,
Divide into local areas that can be regarded as a group of parallel straight lines. That is, here, a small rectangle is one local area.

線図形の曲率に注目し、それが大きい部分でも直線とみ
なせるような領域の大きさに分割すれば良い。
Pay attention to the curvature of the line figure and divide it into areas that can be considered straight lines even if the curvature is large.

次に各局所領域ごとに直線群とみなした線図形の方向を
算出する。方向算出には種々の公知の方法を採用するこ
ともできるが、線のとぎれ、かすれがあるような低品質
の画像に対しては以下に述べる方法が有効である。
Next, the direction of the line figure, which is regarded as a group of straight lines, is calculated for each local area. Although various known methods can be used to calculate the direction, the method described below is effective for low-quality images with broken lines or blurred lines.

先ず方向を第3図に示す如く4方向、あるいは第4図に
示す如く8方向に量子化する。ここでは、4方向に量子
化した場合について説明するが、8方向の場合について
も考え方は同様である。
First, the directions are quantized into four directions as shown in FIG. 3, or eight directions as shown in FIG. Here, a case will be described in which quantization is performed in four directions, but the concept is similar in the case of quantization in eight directions.

第3図の4方向に対して、例えば第5図に示すようにそ
れぞれ対応した4つのマスクパターンを作成する。なお
、マスクパターンの大きさや数値は線図形の線の太さ、
曲率、間隔によって適当に変えれば良い。そこで1局所
領域内の各画素に対し、4つのマスクパターンを用いて
加重和を求め、その絶対値が最大となった方向をその画
素近傍の線図形の方向とする。
For example, four mask patterns corresponding to the four directions shown in FIG. 3 are created as shown in FIG. 5, respectively. In addition, the size and numerical value of the mask pattern depend on the line thickness of the line shape,
It may be changed appropriately depending on the curvature and spacing. Therefore, for each pixel in one local area, a weighted sum is obtained using four mask patterns, and the direction in which the absolute value is the maximum is determined as the direction of the line figure in the vicinity of that pixel.

これをその局所領域内の全ての画素について行う。例え
ば、局所領域が゛縦16画素、横16画素の矩形領域と
すれば、計256画素について方向が算出される。4方
向のうち、最多となった方向をその局所領域における線
図形の方向とする。これを局所領域ごとに画面全体につ
いて行う。例えば、第2図の場合は第6図のようになる
。第6図において数値は算出された方向を表す。この場
合、最多となった方向の数と4方向の数の平均値との差
が予め設定しておいたしきい値以下であればその局所領
域は無方向であり、すなわち線図形を含まない領域と判
断することができる。
This is done for all pixels within that local area. For example, if the local area is a rectangular area with 16 pixels in the vertical direction and 16 pixels in the horizontal direction, the direction is calculated for a total of 256 pixels. Among the four directions, the direction that occurs the most is determined as the direction of the line figure in that local area. This is performed for the entire screen for each local area. For example, the case of FIG. 2 becomes as shown in FIG. 6. In FIG. 6, the numerical values represent the calculated directions. In this case, if the difference between the maximum number of directions and the average value of the number of four directions is less than a preset threshold, the local area is directionless, that is, it is an area that does not include a line figure. It can be determined that

ここで、前記の画素近傍の線図形の方向に第3図のO,
1,2,3の内の何れかを必ず割当てるのならば、前記
4方向の数の平均値は必ず局所領域内の画素数/4(こ
の場合は256/4 =64)になるが、画素近傍の線
図形の方向を判定する際に何らかの基準(例えば加重和
の絶対値が最大となった方向と最小になった方向とで、
その値が予め設定しておいたしきい値以下である等)を
用いて、画素無方向という属性を与え、その画素を前記
局所領域内で行う集計から除外するならば、局所領域内
の画素数/4にはならない。そこで4方向の数の平均値
という表現を用いた。
Here, in the direction of the line figure near the pixel, O,
If one of 1, 2, or 3 is always assigned, the average value of the numbers in the four directions will always be the number of pixels in the local area/4 (in this case, 256/4 = 64), but When determining the direction of neighboring line figures, some criteria (for example, the direction where the absolute value of the weighted sum is the maximum and the direction where the absolute value is the minimum,
If the value is less than a preset threshold value, etc.), and the pixel is given an attribute of no direction, and that pixel is excluded from the aggregation performed within the local area, then the number of pixels in the local area It will not be /4. Therefore, the expression "average value of numbers in four directions" was used.

また、指紋画像のように線図形の曲率が場所によって異
っていたり、分岐がある場合等は全画像を一様な大きさ
の局所領域に分割したのでは適当でない場合がある。例
えば第す図(a)の右下の領域では曲率が大きいために
、この領域内の線図形の方向を一つの方向で代表させる
ことは困難である。
Furthermore, in cases where the curvature of a line figure differs depending on the location, such as in a fingerprint image, or where there are branches, it may not be appropriate to divide the entire image into local areas of uniform size. For example, since the curvature is large in the lower right region of FIG.

このような場合は、前記最多となった方向の数と4方向
の数の平均値の差がしきい値以下となり、無方向と判定
されることより知ることができるから、第6図(b)の
ごとく、右下の局所領域mlさらに小領域に分割し、こ
の小領域内で前記各画素近傍の線図形の方向の集計を行
い、最多となった方向をその小領域の方向とし、小領域
を次の工程での処理単位とすることより、適切な領域の
大きさを自動的に選択することができる。また、小領域
に分割してもなお、領域が大き過ぎて無方向と判定され
た場合はさらに分割を進めてい(こともできる。その場
合、分割を停止する判断基準としては、分割した領域が
無方向でなくなるか、あるいは分割した領域の大きさが
予め設定したしきい値以下になったか、の何れかを用い
ることができる。
In such a case, the difference between the maximum number of directions and the average value of the number of four directions is less than the threshold value, and it can be determined that there is no direction. ), the lower right local area ml is further divided into small areas, and within this small area, the directions of the line figures near each pixel are totaled, and the direction with the largest number is taken as the direction of that small area. By using an area as a processing unit in the next step, an appropriate area size can be automatically selected. In addition, even if the area is divided into small areas, if it is determined that the area is too large and has no direction, the division will proceed further (in this case, the criterion for stopping the division is that the divided area is Either the direction is no longer present or the size of the divided area is less than or equal to a preset threshold value can be used.

次に、各方向ごとに作成したマスクパターンを用いて、
局所領域内の各画素に対し、その画素を中心とした重み
付き平均値を求め、それが予め設定しておいたしきい値
を超えているか否かにより2値のうちの何れかをその画
素の値として与えることを各領域ごとに全画素について
行う。
Next, using the mask patterns created for each direction,
For each pixel in the local area, a weighted average value centered around that pixel is calculated, and one of the two values is assigned to that pixel depending on whether or not it exceeds a preset threshold. The value given is performed for all pixels in each area.

その場合、前工程において、無方向と判断された領域に
ついては重み付き平均値を求める演算を行わず、2値の
うちの何れかを場合に応じて一様に与えることにより、
背景部分の雑音が2値画像に表われるのを防ぐことがで
きる。
In that case, in the previous step, for the region determined to have no direction, the calculation to obtain the weighted average value is not performed, and one of the two values is uniformly given depending on the case.
It is possible to prevent background noise from appearing in a binary image.

マスクパターンは、例えば4方向に方向を量子化した場
合には、第8図のものを用いることができる。これも線
図形の太さ、曲率、間隔によって適当に変えて用いるこ
とができる。数値も全てlと0である必要はなく、場合
に応じて他の数値を用いて重み付き平均値を求めれば良
い。
For example, when the directions are quantized in four directions, the mask pattern shown in FIG. 8 can be used. This can also be changed appropriately depending on the thickness, curvature, and spacing of the line figure. It is not necessary that all the numerical values are l and 0, and the weighted average value may be calculated using other numerical values depending on the case.

この平均値を求める操作は、ある画素を中心として、前
工程で求めた方向に線図形が続いているかを調べること
に相当し、そのために雑音に対して強い2値化処理方法
になっている。
The operation of calculating this average value is equivalent to checking whether a line figure continues in the direction determined in the previous step, centering on a certain pixel, and for this reason, it is a binarization processing method that is resistant to noise. .

また、2値化する時に用いるしきい値は局所領域ごとに
変えることもできるが、全画面で同じものを一様に用い
ても本発明を実施すれば十分な効果が得られ、むしろ−
様なしきい値の方がしきい値が場所によって異なること
による図形の途切れ、線の太さの段差などの発生を防ぐ
ことができる点で優れている。
Furthermore, although the threshold used for binarization can be changed for each local area, sufficient effects can be obtained by implementing the present invention even if the same threshold is uniformly used for the entire screen;
A different threshold value is better in that it can prevent interruptions in figures and differences in line thickness due to differences in threshold values depending on location.

[実施例] 以下に、本発明の実施例を図面に基づいて説明する。[Example] Embodiments of the present invention will be described below based on the drawings.

実施例1 第9図は、本発明を実施するのに好適な線図形画像の2
値化処理装置の構成の一例を示すブロック図である。
Example 1 FIG. 9 shows two line graphic images suitable for carrying out the present invention.
FIG. 2 is a block diagram showing an example of the configuration of a value conversion processing device.

第9図において、■は画像入力装置である。場合に応じ
て、CCD (charge Coupled Dev
ice )カメラあるいはドラムスキャナ等を用いるこ
とができる。入力された線図形の濃淡画像は第1の画像
メモリ2に格納される。
In FIG. 9, ■ is an image input device. Depending on the case, CCD (charge coupled dev
ice) A camera, drum scanner, etc. can be used. The input gray scale image of the line figure is stored in the first image memory 2.

方向算出回路7は、第1の画像メモリ2に格納された画
像を局所領域に分割し、領域ごとに線図形の方向を算出
する。算出された方向は方向記録用メモリ10に記録さ
れる。
The direction calculation circuit 7 divides the image stored in the first image memory 2 into local regions, and calculates the direction of a line figure for each region. The calculated direction is recorded in the direction recording memory 10.

2値化回路12は、算出された方向を方向記録用メモリ
10から読み出しつつ、第1の画像メモリ2の濃淡画像
を2値化し、その結果を第2の画像メモリ9に格納する
The binarization circuit 12 binarizes the grayscale image in the first image memory 2 while reading out the calculated direction from the direction recording memory 10, and stores the result in the second image memory 9.

出力切換回路3は画像入力装置l、第1の画像メモリ2
.第2の画像メモリ9からの信号を選択し、この信号は
D/A変換器4を経て、モニタ5に表示される。
The output switching circuit 3 connects the image input device 1 and the first image memory 2.
.. A signal from the second image memory 9 is selected, and this signal passes through the D/A converter 4 and is displayed on the monitor 5.

アドレス発生回路6は、前記した各回路の処理ごとに、
第1の画像メモリ2のデータを順序よく適切なタイミン
グをとって各回路に送り、また処理されたデータを第2
の画像メモリ9に格納し、第1の画像メモリ2あるいは
第2の画像メモリ9に格納されたデータを切換回路3に
送るためのものである。
The address generation circuit 6 performs the following for each process of each circuit described above.
The data in the first image memory 2 is sent to each circuit in an orderly and appropriate timing, and the processed data is sent to the second image memory 2.
The data stored in the first image memory 2 or the second image memory 9 is sent to the switching circuit 3.

タイミング・コントローラ8は、前記した各回路の処理
を順序よく行うために各回路に制御信号を送るためのも
のであり、操作スイッチ11の指令によって、操作する
ことができる。なお、これらの操作の結果はモニタ5で
見ることができる。
The timing controller 8 is for sending control signals to each circuit in order to perform the processing of each circuit in an orderly manner, and can be operated by commands from the operation switch 11. Note that the results of these operations can be viewed on the monitor 5.

実施例2 次に、本発明を実施して線図形の濃淡画像を2値化した
例を説明する。
Embodiment 2 Next, an example in which a grayscale image of a line figure is binarized by implementing the present invention will be described.

第1O図は、処理対象の画像の中から7×7画素を取り
出したものであり、それぞれの数値は256階調に量子
化された画像レベルを表す。この画素が含まれる局所領
域の方向は第3図の0であり、上から1.3.4.6.
7段目のレベルが高く、レベルが高い部分を図形とする
と横方向に3本の線図があることが分る。この画像では
画素(3,D)、画素(4,D)の画像レベルがノイズ
のために低下しており、しきい値をどのように選んでも
通常の処理では線の途切れを防ぐことはできない。なぜ
なら、途切れさせないためには2値化のしきい値を11
7以下にする必要があるが、そうすると、2段目にしき
い値以上となる画素(2,B)、(2,C)、(2,E
)、(2゜F)があり、2本の線がくっついてしまうか
らである。
FIG. 1O shows 7×7 pixels extracted from the image to be processed, and each numerical value represents an image level quantized into 256 gradations. The direction of the local area including this pixel is 0 in FIG. 3, and is 1.3.4.6 from the top.
The level of the seventh row is high, and if we use the high level part as a figure, we can see that there are three lines in the horizontal direction. In this image, the image level of pixels (3, D) and (4, D) has decreased due to noise, and no matter how you choose the threshold value, normal processing cannot prevent line breaks. . This is because in order to avoid interruptions, the binarization threshold must be set to 11.
7 or less, but in that case, pixels (2,B), (2,C), (2,E
) and (2°F), and the two lines will be attached to each other.

本発明を適用して、第8図の方向Oのマスクを用いて平
均値をとると、画素(3,D)は、(3,8)、(3,
C)、(3,D)、(3゜E)、(3,F、)の5画素
を平均して(132+130+118+128 + 13415) = 128.4  また1画素(4
゜D)は、(4,B)、(4,C)、(4,0)、(4
,E)、(4,F)の5画素を平均して、(133+1
30+118+132+ 13615= 129.8 となり、しきい値を128にしたとしても線は途切れる
ことなく2値化される。
Applying the present invention and taking the average value using the mask in the direction O shown in FIG.
The average of the 5 pixels C), (3,D), (3°E), (3,F,) is (132+130+118+128+13415) = 128.4 and 1 pixel (4
゜D) is (4,B), (4,C), (4,0), (4
,E), (4,F), (133+1
30+118+132+13615=129.8, and even if the threshold value is set to 128, the line will be binarized without interruption.

逆に、2段目、5段目にノイズによって画像レベルの高
い画素があっても、本発明を適用すれば、本来2本の線
をつなげることなく2値化することができる。
Conversely, even if there are pixels with high image levels due to noise in the second and fifth stages, by applying the present invention, it is possible to binarize them without connecting two lines.

実施例3 指紋画像に対し、線画像の背景゛消去および2値化方法
を適用した例を示す。
Embodiment 3 An example in which the line image background erasure and binarization method is applied to a fingerprint image will be shown.

第11図はレーザ蛍光法により写真に付着した指紋を検
出したものである。指紋にレーザ光を照射すると、指紋
成分が蛍光を発し、指紋像が撮影できるが、写真自体が
背景像として重畳する。
FIG. 11 shows a fingerprint attached to a photograph detected by the laser fluorescence method. When a fingerprint is irradiated with laser light, the fingerprint components emit fluorescence and a fingerprint image can be photographed, but the photograph itself is superimposed as a background image.

レーザ光の照射を止めると、第12図のように背景像だ
けが得られる。第11図と第12図から本発明による背
景消去を行うと第13図のように線図形(指紋像)だけ
が抽出できる。第13図に対して本発明による2値化処
理を行うと第14図のように良好な2値化像が得られる
When the laser beam irradiation is stopped, only the background image is obtained as shown in FIG. When background removal according to the present invention is performed from FIGS. 11 and 12, only line figures (fingerprint images) can be extracted as shown in FIG. 13. When FIG. 13 is subjected to the binarization process according to the present invention, a good binarized image as shown in FIG. 14 is obtained.

これに対し、第13図に対して一様なしきい値で2値化
を行うと、第15図のようになり、中央部ではつぶれ、
周辺部ではかすれてしまい、良い2値画像は得られない
。また、第11図に直ちに本発明を適用しても重畳して
いる背景像のために正しく線図形の方向を算出すること
ができず、第16図のようになり、良い2値画像は得ら
れない。これらから本発明の優れた効果が分る。
On the other hand, if we binarize Fig. 13 with a uniform threshold, we will get something like Fig. 15, where the central part is collapsed,
The edges are blurred and a good binary image cannot be obtained. Furthermore, even if the present invention is applied immediately to Fig. 11, the direction of the line figure cannot be calculated correctly due to the superimposed background image, resulting in a result as shown in Fig. 16, and a good binary image cannot be obtained. I can't. From these results, the excellent effects of the present invention can be seen.

実施例4 第17図は本発明の第5の発明を実施するのに好適な線
図形の背景消去および2値化処理装置の構成の一例を示
すブロック図である。
Embodiment 4 FIG. 17 is a block diagram showing an example of the configuration of a line figure background erasing and binarization processing apparatus suitable for carrying out the fifth aspect of the present invention.

第7図において、21は画像入力装置、41は入力切換
回路であり、先ず図形画像に背景が重畳した画像(画像
A)が第1の画像メモリ22に記録される。次に背景だ
けの画像(画像B)が第2゜の画像メモリ29に記録さ
れる。アドレス発生回路26は、シーケンシャルな書き
込みあるいは読み出しを行うときは、インクリメンタル
カウンタとして働く6 しきい値算出回路37は、画像Aから背景画像の部分画
像を分離するためのしきい値を算出する。しきい値は例
えば濃淡画像を2値化する時のしきい値設定法として公
知である大津の判別しきい傾注で算出されるものを用い
ることができる。
In FIG. 7, 21 is an image input device, 41 is an input switching circuit, and first, an image (image A) in which a background is superimposed on a graphic image is recorded in the first image memory 22. Next, an image containing only the background (image B) is recorded in the second image memory 29. The address generation circuit 26 functions as an incremental counter when performing sequential writing or reading.6 The threshold calculation circuit 37 calculates a threshold for separating a partial image of the background image from the image A. As the threshold value, for example, one calculated by Otsu's discrimination threshold tilt method, which is a well-known threshold setting method when binarizing a grayscale image, can be used.

算出されたしきい値しhは出力端Tから比較回路38に
送られる。
The calculated threshold value h is sent from the output terminal T to the comparator circuit 38.

乱数発生回路34で発生した乱数は、アドレス発生回路
26に送られ第1の画像メモリ22のアドレスをランダ
ムに発生させて、画像Aの画素を無作為に抽出する。
The random numbers generated by the random number generation circuit 34 are sent to the address generation circuit 26, which randomly generates addresses for the first image memory 22, and randomly extracts pixels of the image A.

抽出された画素の階調gaは比較回路38に送られ、g
aがthよりも小さければ背景部分であるとみなし、回
帰分析用データバッファ39にストアされ、また対応す
る画像Bの画素の階調gbデータバッファ39も19に
送られてストアされる。
The extracted pixel gradation ga is sent to the comparison circuit 38, and g
If a is smaller than th, it is regarded as a background part and stored in the regression analysis data buffer 39, and the gradation gb data buffer 39 of the corresponding pixel of image B is also sent to 19 and stored.

このようなデータの抽出はバッファ39が満たされるま
で行われる。データの抽出が終ると、回帰分析回路40
で回帰分析が行われる。
Such data extraction is performed until the buffer 39 is filled. After the data extraction is completed, the regression analysis circuit 40
Regression analysis is performed.

この例では3’=pX+qの形の関数を仮定してIおり
、画像Aの背景部分と画像Bの対応する部分との変換係
fip、qがそれぞれ出力端P、Qから乗算器35、加
算器36に送られる。次いで画像メモリ22i3よび2
9から逐次画素の階調を読み出し、メモリ29からの値
については乗算器35、加算器36で補正を行った後、
減算器33で減算処理を行い、背景を消去する。
In this example, a function of the form 3'=p It is sent to the container 36. Then the image memories 22i3 and 2
9, and the values from the memory 29 are corrected by a multiplier 35 and an adder 36.
A subtractor 33 performs subtraction processing to erase the background.

処理後の値は切換回路41を経由して第1の画像メモリ
22に記録される。
The processed value is recorded in the first image memory 22 via the switching circuit 41.

これで背景消去が行われた。続いて2値化処理を行う6 方向算出回路27は、第1の画像メモリ22に格納され
た背景消去後の画像を局所領域に分割し、領域ごとに線
図形の方向を算出する。算出された方向は方向記録用メ
モリ30に記録される。
The background has now been erased. Subsequently, the six direction calculation circuit 27 that performs the binarization process divides the background-erased image stored in the first image memory 22 into local regions, and calculates the direction of the line figure for each region. The calculated direction is recorded in the direction recording memory 30.

2値化回路32は、算出された方向を方向記録用メモリ
30から読み出しつつ、第1の画像メモリ22の濃淡画
像を2値化し、その結果を第2の画像メモリ29に格納
する。
The binarization circuit 32 binarizes the grayscale image in the first image memory 22 while reading the calculated direction from the direction recording memory 30, and stores the result in the second image memory 29.

出力切換え回路23は画像入力装置21、第1の画像メ
モリ22、第2の画像メモリ29からの信号を選択し、
この信号はD/A変換器24を経て、モニタ25に表示
される。
The output switching circuit 23 selects signals from the image input device 21, the first image memory 22, and the second image memory 29,
This signal passes through the D/A converter 24 and is displayed on the monitor 25.

アドレス発生回路26は、前記した各回路の処理ごとに
、第1の画像メモリ22のデータを順序よ(適切なタイ
ミングをとって各回路に送り、また処理されたデータを
第2の画像メモリ29に格納し、第1の画像メモリ22
あるいは第2の画像メモリ29に格納されたデータを切
換回路23に送るためのものである。
The address generation circuit 26 sends the data of the first image memory 22 to each circuit in order (with appropriate timing) for each process of each circuit described above, and also sends the processed data to the second image memory 29. stored in the first image memory 22
Alternatively, it is for sending data stored in the second image memory 29 to the switching circuit 23.

タイミング・コントローラ28は、前記した各回路の処
理を順序よく行うために各回路に制御信号を送るための
ものであり、操作スイッチ31の指令によって、操作す
ることができる。なお、これ“らの操作の結果はモニタ
25で見ることができる。
The timing controller 28 is for sending control signals to each circuit in order to perform the processing of each circuit in an orderly manner, and can be operated in response to a command from the operation switch 31. Note that the results of these operations can be viewed on the monitor 25.

以上は背景消去方法において、線図形画像に背景が重畳
している画像から背景画像の部分画像を分離する方法と
して、画像レベルにしきい値を設定する方法を採ってい
るが、図形部分と背景部分のテキスチャの違いを利用す
る方法を採ることももちろん可能である。
In the background removal method described above, a threshold is set at the image level as a method of separating a partial image of the background image from an image in which the background is superimposed on a line figure image. Of course, it is also possible to take advantage of the difference in texture between the two.

〔発明の効果] 以上説明したように、線図形の濃淡画像を2値化するに
あたり、線図形がその領域内では平行な直線群とみなせ
るような局所領域に画像を分割した後、各局所領域ごと
に線図形の方向を算出し、各方向ごとのマスクパターン
を用いて局所領域ごとに各画素を中心とした重み付平均
値を求め、それとしきい値とを比較して2値化を行うこ
とにより、すなわち2値化を行う場合にただ1つの画素
の画像レベルでなく、その近傍の画素の画像レベルの情
報も利用して線図形がその方向に続いているかを判断し
なから2値化を行うことにより、雑音に対して強い2値
化処理を行うことができ低品質の濃淡画像に対しても良
好な2値画像を得ることができる。
[Effects of the Invention] As explained above, in binarizing a grayscale image of a line figure, after dividing the image into local regions in which the line figure can be regarded as a group of parallel straight lines within that region, each local region is The direction of the line figure is calculated for each direction, the weighted average value centered on each pixel is determined for each local region using the mask pattern for each direction, and the weighted average value is compared with a threshold value to perform binarization. In other words, when performing binarization, we do not use the image level information of just one pixel, but also the image level information of neighboring pixels to determine whether the line figure continues in that direction. By performing the conversion, it is possible to perform binarization processing that is strong against noise, and it is possible to obtain a good binary image even for a low-quality grayscale image.

また上記線図形の2値化処理に当って、背景消去を行っ
て2値化処理を行うことができ、例えば指紋検出を適正
に処理することができる。
Further, in the binarization process of the line figure, the background can be removed and the binarization process can be performed, and, for example, fingerprint detection can be properly processed.

本発明の装置は、上記の効果を有する方法を好適に実施
することができる。
The apparatus of the present invention can suitably implement the method having the above effects.

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

第1図は本発明方法の手順を示すフローチャート、第2
図は線図形を含む画像を局所領域に分割した一例を示す
図、第3図は4方向に量子化した方向を示す図、第4図
は8方向に量子化した方向を示す図、第5図は線図形の
方向を算出するためのマスクパターンの一例を示す図、
第6図は第2図の線図形の方向を局所領域ごとに算出し
た一例を示す図、第7図は曲線の大きい領域を含む画像
の説明図、第8図は方向ごとに各画素を中心とした重み
付き平均値を算出するためのマスクパターンの一例を示
す図、第9図は本発明の実施に好適な線図形の2値化処
理装置の一例を示すブロック図、第1O図は本発明を実
施した濃淡画像の一例を示す図、第11図〜第16図は
指紋の写真、第17図は本発明の第5の発明のブロック
図、第18図は本発明の第3発明のフローチャート、第
19図は本発明の第4発明のフローチャートである。 l・・・画像入力装置 2・・・第1の画像メモリ 3・・・出力切換回路 4・・・D/A変換器 5・・・モニタ 6・・・アドレス発生回路 7・・・方向算出回路 8・・・タイミング・コントローラ 9・・・第2の画像メモリ 10・・・方向記録用メモリ 11・・・操作スイッチ 12・・・2値化回路 21・・・画像入力装置 22・・・第1の画像メモリ 23・・・出力切替回路 24・・・D/A変換器 25・・・モニター 26・・・アドレス発生回路 27・・・方向算出回路 28・・・タイミングコントローラ 29・・・第2の画像メモリ 30・−・方向記録用メモリ 31・・・操作スイッチ 32・・・2値化回路 33・・・減算器 34−−・乱数発生回路 35−・・乗算器 36・・・加算器 37・・・しきい値算出回路 38・−比較回路 39・・・回帰分析用データバッファ 40・・・回帰分析回路
FIG. 1 is a flowchart showing the procedure of the method of the present invention;
The figure shows an example of dividing an image containing line figures into local regions, Figure 3 shows the direction of quantization in four directions, Figure 4 shows the direction of quantization in eight directions, and Figure 5 shows the direction of quantization in eight directions. The figure shows an example of a mask pattern for calculating the direction of a line figure.
Figure 6 is a diagram showing an example of calculating the direction of the line figure in Figure 2 for each local region, Figure 7 is an explanatory diagram of an image including a region with a large curve, and Figure 8 is centered on each pixel for each direction. FIG. 9 is a block diagram showing an example of a line figure binarization processing device suitable for implementing the present invention, and FIG. 1O is a diagram showing an example of a mask pattern for calculating a weighted average value. Figures 11 to 16 are photographs of fingerprints, Figure 17 is a block diagram of the fifth invention of the present invention, and Figure 18 is a diagram of the third invention of the present invention. Flowchart FIG. 19 is a flowchart of the fourth invention of the present invention. l... Image input device 2... First image memory 3... Output switching circuit 4... D/A converter 5... Monitor 6... Address generation circuit 7... Direction calculation Circuit 8...timing controller 9...second image memory 10...direction recording memory 11...operation switch 12...binarization circuit 21...image input device 22... First image memory 23...Output switching circuit 24...D/A converter 25...Monitor 26...Address generation circuit 27...Direction calculation circuit 28...Timing controller 29... Second image memory 30 -- Direction recording memory 31 -- Operation switch 32 -- Binarization circuit 33 -- Subtractor 34 -- Random number generation circuit 35 -- Multiplier 36 -- Adder 37... Threshold calculation circuit 38 - Comparison circuit 39... Data buffer for regression analysis 40... Regression analysis circuit

Claims (1)

【特許請求の範囲】 1 線図形を含むディジタル化された濃淡画像から線図
形画像の2値画像を得るに際し、 (a)線図形がその領域内では平行な直線群とみなし得
る局所領域に全画像を分割し、 (b)次いで前記各局所領域ごとに直線群とみなした線
図形の方向を算出し、 (c)各方向ごとに定められたマスクパターンを用いて
各画素を中心とした重み付き平均値を求め、 (d)これら重み付き平均値が予め設定しておいたしき
い値を超えているか否かにより、2値の内の何れかを前
記マスクパターンの中心となる画素に与え、この処理を
前記各局所領域ごとの全画素について行うことを特徴と
する線図形画素の2値化処理方法。 2 前記各局所領域ごとに直線群とみなした線図形の方
向の算出方法が、 (イ)各方向ごとに定められたマスクパターンを順次用
いて各画素を中心にしてそのマスクパターンと画素との
積和演算を行い、 (ロ)その積和演算の結果が最大となるマスクパターン
の方向によってその画素近傍における線図形の方向を算
出し、 (ハ)前記各局所領域ごとに全画素について前記線図形
の方向の算出を行い、その結果を前記局所領域ごとに集
計して最多となった方向をその局所領域における線図形
の方向とすることを特徴とする請求項1記載の線図形画
像の2値化処理方法。 3 前記各局所領域ごとの全画素についてのしきい値を
もとにした2値の与え方がその近傍の線図形の方向の算
出を行った結果を局所領域ごとに集計し、最多となった
方向の数が、各方向の数の平均値と比較し、その差が予
め設定しておいたしきい値以上でない時は、その局所領
域は無方向であり、線図形を含まない領域と判断し、そ
の局所領域内の全画素について2値のうちの何れかを一
様に与えることを特徴とする請求項1もしくは2記載の
線図形画像の2値化処理方法。 4 請求項2において、各画素ごとに、線図形の方向の
算出を行った結果を局所領域ごとに集計し、最多となっ
た方向の数が、各方向の数の平均値と比較し、その差が
予め設定しておいたしきい値以上でない時は、その局所
領域をさらに小領域に分割し、該小領域ごとに前記各画
素ごとの線図形の算出結果の集計を行い、最多となった
方向の数が各方向の数の平均値と比較し、その差が予め
設定しておいたしきい値以上であれば、該最多となった
方向をその小領域における線図形の方向とし、該方向の
マスクパターンを用いて各画素を中心とした重み付き平
均値を求め、 これら重み付き平均値が予め設定しておい たしきい値を越えているか否かにより、2値のうちの何
れかを前記マスクパターンの中心となる画素に与え、前
記最多となった方向の数の平均値の差が再びしきい値以
下となつた場合は、その小領域をさらに分割し、分割し
た領域について同様の操作を行うことを、分割した領域
が方向を持つか、または分割した領域の大きさが予め設
定しておいたしきい値以下になるまで繰り返し行うこと
を特徴とする線図形画像の2値化処理方法。 5 線図形を撮像する画像入力装置と、この画像入力装
置に入力された線図形の濃淡画像を格納する第1の画像
メモリと、 この濃淡画像を局所領域に分割し、領域ご とに線図形の方向を算出する方向算出回路 と、 この算出された方向を記録する方向記録用 メモリと、 この記録された方向を読み出して前記第1 の画像メモリに格納された濃淡画像を2値化する2値化
回路と、 この2値化信号を格納する第2の画像メモ リと、前記した画像入力装置、第1の画像メモリおよび
第2の画像メモリのそれぞれの出力信号を選択する出力
切換回路と、 この選択された出力信号をアナログ信号に 変換するD/A変換器と、 このアナログ信号を表示するモニタと、 から構成されることを特徴とする線図形画像の2値化処
理装置。 6 抽出すべき線図形に背景が重畳している濃淡画像(
以下画像Aと表す)と、背景だけの濃淡画像(以下画像
Bと表す)とから、背景を消去して抽出すべき線図形だ
けを抽出し、該抽出した線図形を含む濃淡画像から線図
形の2値化画像を得るに際し、 (a)画像Aから背景画像の部分画像を分離し、 (b)該部分画像から適当数の画素の集合Cを抽出し、 (c)画像Bで集合Cに対応する画素の集合Dを抽出し
、 (d)集合Cと集合Dで対応する画素の階調について回
帰分析を行い、その結果から画像Aの背景部分と画像B
のそれに対応する部分の階調間の変換係数を求め、 (e)該変換係数を用いて画像Bを補正しつつ、画像A
から画像Bを減算することによ り、線図形の背景を消去して抽出すべき線図形だけを含
む画像を得、 (f)該抽出した線図形を含む濃淡画像に請求項1、2
、3もしくは4記載の線図形画像の2値化処理方法を施
すことを特徴とする線図形画像の背景消去および2値化
方法。 7 前記画像Aから背景画像の部分画像を分離する手段
が、画像レベルにしきい値を設定 し、該しきい値以下の部分を背景とすることである請求
項6記載の図形画像の背景消去および2値化処理方法。 8 前記画像Aから背景画像の部分画像を分離する手段
が、図形部分と背景部分のテキス チャの違いを利用することである請求項6記載の図形画
像の背景消去および2値化処理方法。 9 画像を撮像する画像入力装置と、 この画像入力装置に入力された線図形画像 に背景が重畳した画像(画像A)を格納する第1の画像
メモリと、 次いで画像入力装置に入力された背景だけ の画像(画像B)を格納する第2の画像メモリと、 画像Aの背景画像の部分画像を分離する手 段と、 該部分画像から適当数の画素の集合Cを抽 出する手段と、 画像Bで集合Cに対応する画素の集合Dを 抽出する手段と、 集合Cと集合Dで対応する画素の階調につ いて回帰分析を行い、その結果から画像Aの背景部分と
画像Bのそれに対応する部分の階調間の変換係数を求め
る回帰分析回路と、 該変換係数を用いて画像Bを補正しつつ画 像Aから画像Bを減算する四則演算を行い、その結果を
第1の画像メモリまたは第2の画像メモリに格納する背
景画像減算回路と、 該背景消去を施された濃淡画像を局所領域 に分割し、領域ごとに線図形の方向を算出する方向算出
回路と、 この算出された方向を記録する方向記録用 メモリと、 この記録された方向を読み出して前記第1 の画像メモリあるいは第2の画像メモリに格納された濃
淡画像を2値化して、他方の画像メモリに格納する2値
化回路と、 前記した画像入力装置、第1の画像メモリ および第2の画像メモリのそれぞれの出力信号を選択す
る出力切換回路と、 この選択された出力信号をアナログ信号に 変換するD/A変換器と、 このアナログ信号を表示するモニタと、 から構成されることを特徴とする線図形画像の背景消去
および2値化処理装置。 10 請求項5記載の線図形画像の2値化処理装置およ
びその周辺機器からなり、前記方向算出回路が、指紋画
像に適した大きさの領域になるように局所領域に分割す
る回路であることを特徴とする指紋画像用画像処理装置
。 11 請求項9記載の線図形画像の背景消去および2値
化処理装置およびその周辺機器からなり、前記方向算出
回路が、指紋画像に適した大きさの領域になるように局
所領域に分割する回路であることを特徴とする指紋画像
用画像処理装置。
[Scope of Claims] 1. When obtaining a binary image of a line figure image from a digitized grayscale image containing a line figure, (a) the line figure is entirely covered by a local area that can be regarded as a group of parallel straight lines within that area; Divide the image, (b) then calculate the direction of the line figure considered as a straight line group for each local area, and (c) calculate the weight centered on each pixel using a mask pattern determined for each direction. (d) Depending on whether these weighted average values exceed a preset threshold, one of the two values is given to the central pixel of the mask pattern; A method for binarizing line figure pixels, characterized in that this process is performed for all pixels in each local area. 2. The method of calculating the direction of the line figure, which is regarded as a group of straight lines for each local area, is as follows: (a) Using a mask pattern determined for each direction sequentially, and focusing on each pixel, the direction of the line figure is calculated by (b) Calculate the direction of the line figure in the vicinity of the pixel based on the direction of the mask pattern that maximizes the result of the product-sum operation; (c) Calculate the direction of the line figure in the vicinity of the pixel for each local area. 2. The line figure image according to claim 1, wherein the direction of the figure is calculated, the results are totaled for each local area, and the direction with the highest number is determined as the direction of the line figure in the local area. Value processing method. 3. The method of giving binary values based on the threshold values for all pixels for each local area is the highest value when the results of calculating the direction of the line figure in the vicinity are aggregated for each local area. The number of directions is compared with the average value of the number of each direction, and if the difference is not greater than a preset threshold, the local area is determined to be directionless and does not contain a line figure. 3. The method of binarizing a line graphic image according to claim 1, wherein one of the binary values is uniformly given to all pixels in the local area. 4. In claim 2, the results of calculating the direction of the line figure for each pixel are aggregated for each local area, and the maximum number of directions is compared with the average value of the number of each direction. If the difference is not greater than a preset threshold, the local area is further divided into smaller areas, and the calculation results of the line figures for each pixel are aggregated for each of the smaller areas to find the largest number. The number of directions is compared with the average value of the number of each direction, and if the difference is greater than or equal to a preset threshold, the direction with the largest number is set as the direction of the line figure in that small area, and the direction A weighted average value centered on each pixel is calculated using a mask pattern, and one of the two values is determined depending on whether or not these weighted average values exceed a preset threshold. If the difference in the average value of the number of directions applied to the center pixel of the mask pattern becomes less than the threshold value again, that small area is further divided and the same operation is performed on the divided area. A binarization processing method for a line figure image, characterized in that the steps described above are repeatedly performed until the divided regions have a direction or the size of the divided regions becomes equal to or less than a preset threshold value. . 5 an image input device for capturing an image of a line figure; a first image memory for storing a gray scale image of the line figure input to the image input device; A direction calculation circuit that calculates the direction, a direction recording memory that records the calculated direction, and a binary value that reads out the recorded direction and binarizes the grayscale image stored in the first image memory. a second image memory that stores the binarized signal, an output switching circuit that selects the respective output signals of the image input device, the first image memory, and the second image memory; A binarization processing device for a line graphic image, comprising: a D/A converter that converts a selected output signal into an analog signal; and a monitor that displays the analog signal. 6 A grayscale image in which the background is superimposed on the line figure to be extracted (
The background is erased and only the line figures to be extracted are extracted from the grayscale image (hereinafter referred to as image A) and the background only (hereinafter referred to as image B), and the line figures are extracted from the grayscale image containing the extracted line figures. To obtain a binarized image, (a) separate a partial image of the background image from image A, (b) extract a set C of an appropriate number of pixels from the partial image, and (c) extract a set C of pixels from image B. (d) Perform regression analysis on the gradation of corresponding pixels in set C and set D, and from the results, extract the background part of image A and image B.
(e) While correcting image B using the conversion coefficient, image A
By subtracting image B from , an image containing only the line figure to be extracted by erasing the background of the line figure is obtained, and (f) Claims 1 and 2 are added to the grayscale image containing the extracted line figure.
A method for background erasure and binarization of a line graphic image, characterized in that the method for binarizing a line graphic image described in , 3 or 4 is applied. 7. Background erasing of a graphic image according to claim 6, wherein the means for separating a partial image of the background image from the image A is to set a threshold at the image level and set a portion below the threshold as the background. Binarization processing method. 8. The background erasing and binarization processing method for a graphic image according to claim 6, wherein the means for separating the partial image of the background image from the image A is to utilize a difference in texture between the graphic part and the background part. 9 an image input device that captures an image; a first image memory that stores an image (image A) in which a background is superimposed on a line figure image that is input to the image input device; and a background that is then input to the image input device; means for separating a partial image of the background image of image A; means for extracting a set C of an appropriate number of pixels from the partial image; A means for extracting a set D of pixels corresponding to set C, and a regression analysis of the gradations of corresponding pixels in sets C and D, and from the results, the background part of image A and the corresponding part of image B are extracted. A regression analysis circuit that calculates a conversion coefficient between the gradations of a background image subtraction circuit that stores the background image in the image memory; a direction calculation circuit that divides the background-erased grayscale image into local regions and calculates the direction of the line figure for each region; and a direction calculation circuit that records the calculated direction. and a binarization circuit that reads out the recorded direction, binarizes the gray scale image stored in the first image memory or the second image memory, and stores it in the other image memory. and an output switching circuit that selects each output signal of the image input device, the first image memory, and the second image memory, and a D/A converter that converts the selected output signal into an analog signal. , a monitor for displaying the analog signal; and a line figure image background erasing and binarization processing device. 10. A device comprising the line graphic image binarization processing device according to claim 5 and its peripheral equipment, wherein the direction calculation circuit is a circuit that divides into local areas so that the area has a size suitable for a fingerprint image. An image processing device for fingerprint images, characterized by: 11. A circuit comprising the line figure image background erasing and binarization processing device according to claim 9 and its peripheral equipment, and in which the direction calculation circuit divides into local regions so that the region has a size suitable for a fingerprint image. An image processing device for fingerprint images, characterized in that:
JP63234909A 1987-09-21 1988-09-21 Background image erasing and binarization processing method for linear figure image and apparatus therefor Expired - Fee Related JP2732608B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63234909A JP2732608B2 (en) 1987-09-21 1988-09-21 Background image erasing and binarization processing method for linear figure image and apparatus therefor

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP62-234750 1987-09-21
JP23475087 1987-09-21
JP63234909A JP2732608B2 (en) 1987-09-21 1988-09-21 Background image erasing and binarization processing method for linear figure image and apparatus therefor

Publications (2)

Publication Number Publication Date
JPH01158577A true JPH01158577A (en) 1989-06-21
JP2732608B2 JP2732608B2 (en) 1998-03-30

Family

ID=26531739

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63234909A Expired - Fee Related JP2732608B2 (en) 1987-09-21 1988-09-21 Background image erasing and binarization processing method for linear figure image and apparatus therefor

Country Status (1)

Country Link
JP (1) JP2732608B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7697733B2 (en) 2005-09-28 2010-04-13 Sharp Kabushiki Kaisha Image collating apparatus, image collating method, image collating program product, and computer readable recording medium recording image collating program product
US8385612B2 (en) 2005-06-30 2013-02-26 Nec Corporation Fingerprint image background detection apparatus and detection method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8385612B2 (en) 2005-06-30 2013-02-26 Nec Corporation Fingerprint image background detection apparatus and detection method
US7697733B2 (en) 2005-09-28 2010-04-13 Sharp Kabushiki Kaisha Image collating apparatus, image collating method, image collating program product, and computer readable recording medium recording image collating program product

Also Published As

Publication number Publication date
JP2732608B2 (en) 1998-03-30

Similar Documents

Publication Publication Date Title
JP2686274B2 (en) Cell image processing method and apparatus
US7697723B2 (en) Image recognition device
JP2010525486A (en) Image segmentation and image enhancement
JPS62118676A (en) Picture processing system
JPH041866A (en) Method and device for image processing
JP4227238B2 (en) Image display method, image processing apparatus, and recording medium
JPH01158577A (en) Method for background erasing and binarization processing for line graphic picture and its device and picture processor for fingerprint picture
JPH10285399A (en) Binarization method for image
JP2993007B2 (en) Image area identification device
JP2956151B2 (en) Image processing method and apparatus
JP3223385B2 (en) Pattern matching device for grayscale images
JP5262877B2 (en) Noise component removal apparatus and medium on which noise component removal program is recorded
JP2001291056A (en) Document picture recognizing device and recording medium
JPS63301374A (en) Vanishing method for background of image
JP2773871B2 (en) Image data binarization method
JPS62297981A (en) Binarization system for image
JPH0353390A (en) Outline discriminating device for moving body
JPH0552767A (en) Image inspecting apparatus
JPH04184576A (en) Picture processor
JPH01319872A (en) Distortion measuring method and device by lattice picture
JP3025365B2 (en) Image binarization processing device
JP2003228691A (en) Slip read device and program for processing slip read
JPH0556329A (en) Image blur amount detector
JPS63288371A (en) Image processor
JPH07160858A (en) Moving object detecting method and device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees