JPH04276887A - Image processor - Google Patents

Image processor

Info

Publication number
JPH04276887A
JPH04276887A JP3064086A JP6408691A JPH04276887A JP H04276887 A JPH04276887 A JP H04276887A JP 3064086 A JP3064086 A JP 3064086A JP 6408691 A JP6408691 A JP 6408691A JP H04276887 A JPH04276887 A JP H04276887A
Authority
JP
Japan
Prior art keywords
image
signal
illumination
grayscale image
preprocessing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3064086A
Other languages
Japanese (ja)
Inventor
Osamu Motooka
本岡 修
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP3064086A priority Critical patent/JPH04276887A/en
Publication of JPH04276887A publication Critical patent/JPH04276887A/en
Pending legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE:To make it possible to accurately carry out measuring feature quantity and pattern matching by emphasizing edge to eliminate the effect of illumination fluctuation and realizing preprocessing where noise component is not emphasized. CONSTITUTION:The present image processor 40 includes a preprocessing circuit 42 constituted of an A/D converter 47, a differentiating arithmetic section 48, a multiplier 49, a divider 50, and a adder 51. In the differentiating arithmetic section 48 a gradation image signal of digital variable is inputted, and the first order differentiating arithmetic section 52 calculates an absolute value of the first order differentiation and the second order differentiating arithmetic section 53 the second order differentiated value, respectively. The multiplier 49 carries out multiplication of each differentiation arithmetic output, the divider 50 divides a multiplication output by a constant, and the adder 51 adds the division output to the gradation image signal, thereby generating an output signal to a binarization circuit 43.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】この発明は、対象物を撮像して得
た濃淡画像信号を2値化処理し、その2値画像を用いて
特徴量の計測やパターンマッチングなどの各種処理を実
行する画像処理装置に関連し、殊にこの発明は,濃淡画
像信号を2値化処理するに先立ち、濃淡画像信号に所定
の前処理を施して2値化回路へ出力するための前処理回
路に関する。
[Industrial Application Field] This invention binarizes a grayscale image signal obtained by imaging an object, and uses the binarized image to perform various processes such as feature measurement and pattern matching. The present invention relates to an image processing device, and particularly relates to a preprocessing circuit that performs predetermined preprocessing on a grayscale image signal before binarizing the grayscale image signal and outputs the preprocessed signal to a binarization circuit.

【0002】0002

【従来の技術】一般に画像処理装置では、撮像装置によ
り対象物を撮像して得たアナログ量の濃淡画像信号をデ
ィジタル量の濃淡画像信号に変換した後、そのディジタ
ル量の濃淡画像信号を固定の2値化しきい値で2値化処
理して2値画像信号を生成している。
2. Description of the Related Art In general, an image processing device converts an analog grayscale image signal obtained by imaging an object using an imaging device into a digital grayscale image signal, and then converts the digital grayscale image signal into a fixed grayscale image signal. Binarization processing is performed using a binarization threshold to generate a binary image signal.

【0003】図14は、所定の照明下で文字「A」を撮
像して得た濃淡画像1を示すもので、図中、2が文字の
画像部分を、3が背景の画像部分を、それぞれ示してい
る。
[0003] FIG. 14 shows a gray scale image 1 obtained by imaging the letter "A" under predetermined illumination. It shows.

【0004】図15は、前記濃淡画像1の水平線4に沿
う明るさ分布5を示す。同図中、5a,5bで示す部分
は文字と背景の境界部分(以下「エッジ部分」という)
に対応しており、このエッジ部分の明るさ分布は撮像装
置の光学系の影響や対象物の状態などに起因して緩やか
に傾斜している。
FIG. 15 shows a brightness distribution 5 along the horizontal line 4 of the grayscale image 1. In the figure, the parts indicated by 5a and 5b are the boundary parts between the characters and the background (hereinafter referred to as "edge parts").
The brightness distribution at this edge portion is gently sloped due to the influence of the optical system of the imaging device and the state of the object.

【0005】また図15において、6は照明劣化により
撮像条件が変化したときの明るさ分布を示しており、適
正照明下での明るさ分布5に対し明るさレベルが全体的
に低くなっている。
Further, in FIG. 15, 6 shows the brightness distribution when the imaging conditions change due to illumination deterioration, and the brightness level is lower overall compared to the brightness distribution 5 under proper illumination. .

【0006】[0006]

【発明が解決しようとする課題】それぞれの濃淡画像を
例えば図15に示す2値化しきい値THで2値化すると
、水平線4に沿う2値化レベルは適正照明下では符号7
で示すようになり、また照明劣化時では符号8で示すよ
うになって、「0」のレベルの幅dが大きく相違する。
[Problem to be Solved by the Invention] When each grayscale image is binarized using the binarization threshold value TH shown in FIG.
When the illumination is degraded, the width d of the "0" level is greatly different, as shown by the reference numeral 8.

【0007】図16は、適正照明下での2値画像9と照
明劣化時の2値画像10とを対比して示してある。図中
、黒く塗り潰した部分が文字の画像部分11を表す黒画
素領域を、それ以外の部分が背景の画像部分12を表す
白画素領域を、それぞれ示す。同図によれば、照明劣化
時の2値画像10は適正照明下での2値画像9に比較し
て文字の画像部分11が極端に太くなっている。従って
これら2値画像9,10に所定のウィンドウ13を設定
し、そのウィンドウ13内の黒画素領域の面積を計測し
て形状認識などを行う場合、照明劣化時では面積の計測
値が変化し、誤認識を引き起こす結果とする。
FIG. 16 shows a binary image 9 under proper illumination and a binary image 10 under degraded illumination in comparison. In the figure, the blacked-out part shows a black pixel area representing the character image part 11, and the other parts show the white pixel area representing the background image part 12, respectively. According to the figure, in the binary image 10 when illumination has deteriorated, the character image portion 11 is extremely thick compared to the binary image 9 under proper illumination. Therefore, when a predetermined window 13 is set in these binary images 9 and 10 and the area of the black pixel area within the window 13 is measured to perform shape recognition, etc., the measured value of the area changes when the illumination deteriorates. This results in erroneous recognition.

【0008】図17は、適正照明下で文字「A」を撮像
して得た標準パターン14と、照明劣化時に認識対象物
を撮像して得た2値画像15とを、それぞれ示している
。この2値画像15は文字「A」についての画像である
が、この2値画像15を標準パターン14と照合してパ
ターンマッチングを行った場合、同図のマッチング画像
16に示されるように、不一致画素(図中、黒く塗り潰
した部分)が広範囲に生ずる結果となり、適正な認識が
困難である。
FIG. 17 shows a standard pattern 14 obtained by capturing an image of the letter "A" under proper illumination, and a binary image 15 obtained by capturing an image of a recognition object under degraded illumination. This binary image 15 is an image for the letter "A", but when pattern matching is performed by comparing this binary image 15 with the standard pattern 14, as shown in the matching image 16 in the same figure, a mismatch occurs. As a result, pixels (blacked out areas in the figure) occur over a wide range, making proper recognition difficult.

【0009】上記した問題は、濃淡画像のエッジ部分の
明るさ分布が緩やかに傾斜することに起因するもので、
この問題を解消するのに、濃淡画像のエッジ部分をラプ
ラシアン演算子などを用いてエッジ強調するという手法
を採用することも可能である。
The above-mentioned problem is caused by the gradual slope of the brightness distribution at the edge portion of the grayscale image.
To solve this problem, it is also possible to adopt a method of edge-emphasizing the edge portions of the grayscale image using a Laplacian operator or the like.

【0010】しかしながらこの手法を用いた場合に、濃
淡画像中に多数のノイズ成分が存在していると、エッジ
強調によりエッジ部分以外にノイズ成分も強調される結
果となる。このためエッジ強調後の濃淡画像から求めた
2値画像を用いて面積計測やパターンマッチングを行う
と、ノイズ成分の影響により面積の計測値が変化したり
、不一致画素数が増大したりして、同様に誤認識を招く
結果となる。
However, when this method is used, if a large number of noise components are present in the grayscale image, edge enhancement will result in noise components being emphasized in addition to the edge portions. For this reason, when area measurement or pattern matching is performed using a binary image obtained from a grayscale image after edge enhancement, the measured area value changes due to the influence of noise components, and the number of mismatched pixels increases. Similarly, this results in erroneous recognition.

【0011】図18は、所定の照明下で文字「A」を撮
像しかつエッジ強調を行って得た濃淡画像17を示すも
ので、図中、18が文字の画像部分を、19が背景の画
像部分を、それぞれ示している。この濃淡画像17には
文字や背景の各画像部分18,19に多数のノイズ成分
20が現れている。
FIG. 18 shows a grayscale image 17 obtained by imaging the letter "A" under predetermined illumination and performing edge enhancement. In the figure, 18 is the image portion of the letter, and 19 is the background Each image part is shown. In this grayscale image 17, a large number of noise components 20 appear in each image portion 18, 19 of characters and background.

【0012】図19は、前記濃淡画像17の水平線21
に沿う明るさ分布22を示している。この明るさ分布2
2を図15に示した明るさ分布5と比較すると、エッジ
部分22a,22bの傾斜が急峻になっている。
FIG. 19 shows the horizontal line 21 of the grayscale image 17.
A brightness distribution 22 along the . This brightness distribution 2
2 with the brightness distribution 5 shown in FIG. 15, the slopes of the edge portions 22a and 22b are steep.

【0013】また図19において、23は照明劣化によ
り撮像条件が変化したときの明るさ分布を示しており、
適正照明下での明るさ分布22に対し明るさレベルが全
体的に低くなっている。
Further, in FIG. 19, 23 indicates the brightness distribution when the imaging conditions change due to illumination deterioration.
The brightness level is lower overall than the brightness distribution 22 under proper illumination.

【0014】それぞれ濃淡画像を2値化しきい値THで
2値化した場合、水平線21に沿う2値化レベルは適正
照明下では符号24のようになり、照明劣化時では符号
25のようになって、「0」のレベルの幅dはほぼ一致
するが、エッジ強調によりノイズ成分も強調されている
ため、2値化レベルにノイズ部分26,27が随所に、
しかも適正照明下と照明劣化時とでは異なる位置に、ま
た異なる大きさで現れる結果となる。
When each grayscale image is binarized using the binarization threshold TH, the binarization level along the horizontal line 21 becomes 24 under proper illumination, and 25 when the illumination is degraded. The width d of the "0" level is almost the same, but since the noise component is also emphasized by edge emphasis, noise parts 26 and 27 are everywhere at the binarized level.
In addition, they appear in different positions and in different sizes under proper illumination and when illumination has degraded.

【0015】図20は、適正照明下での2値画像28と
照明劣化時の2値画像29とを対比して示してある。図
中、黒く塗り潰した部分が文字の画像部分30を表す黒
画素領域を、それ以外の部分が背景の画像部分31を表
す白画素領域を、また斑点がノイズの画像部分32,3
3を表す画素領域を、それぞれ示す。これら2値画像2
8,29に所定のウィンドウ34を設定し、そのウィン
ドウ34内の黒画素領域の面積を計測して形状認識など
を行うような場合、照明劣化時の2値画像29と適正照
明下での2値画像28とはノイズの画像部分32,33
の位置や面積が一致しないため、照明劣化時では面積の
計測値が変化し、誤認識を引き起こす結果となる。
FIG. 20 shows a binary image 28 under proper illumination and a binary image 29 under degraded illumination in comparison. In the figure, the blacked out area is the black pixel area representing the character image area 30, the other area is the white pixel area representing the background image area 31, and the spots are the noise image areas 32, 3.
Pixel areas representing 3 are shown respectively. These binary images 2
When a predetermined window 34 is set in the windows 8 and 29 and the area of the black pixel area within the window 34 is measured to perform shape recognition, etc., the binary image 29 under illumination degradation and the binary image under proper illumination are used. The value image 28 is the noise image portions 32 and 33.
Since the positions and areas of the two do not match, the measured value of the area changes when the illumination deteriorates, resulting in erroneous recognition.

【0016】図21は、適正照明下で文字「A」を撮像
して得た標準パターン35と、照明劣化時に認識対象物
を撮像して得た2値画像36とを、それぞれ示している
。この2値画像36は文字「A」についての画像である
が、この2値画像36を標準パターン35と照合してパ
ターンマッチングを行った場合、同図のマッチング画像
37に示されるように、位置および面積が異なるノイズ
の画像部分38,39の影響により不一致画素(図中、
黒で示す部分)が生ずる結果となり、適正な認識が困難
である。
FIG. 21 shows a standard pattern 35 obtained by capturing an image of the letter "A" under proper illumination, and a binary image 36 obtained by capturing an image of a recognition target under degraded illumination. This binary image 36 is an image for the letter "A", but when pattern matching is performed by comparing this binary image 36 with the standard pattern 35, the position is changed as shown in the matching image 37 of the same figure. and mismatched pixels (in the figure,
As a result, proper recognition is difficult.

【0017】この発明は、上記問題に着目してなされた
もので、エッジ強調により照明変動の影響をなくし、し
かもノイズ成分は強調されない前処理を実現し、もって
特徴量の計測やパターンマッチングを正確に行うことが
できる画像処理装置を提供することを目的とする。
[0017] The present invention was made with attention to the above problem, and it eliminates the influence of illumination fluctuations by edge emphasis, and also realizes preprocessing that does not emphasize noise components, thereby making it possible to accurately measure feature quantities and pattern matching. The object of the present invention is to provide an image processing device that can perform the following operations.

【0018】[0018]

【課題を解決するための手段】この発明の画像処理装置
は、対象物を撮像して得た濃淡画像信号を入力して前処
理を施す前処理回路と、前処理回路の出力信号を2値化
処理して2値画像信号を生成する2値化回路とを有し、
前記前処理回路には微分演算部と乗算部と加算部とが設
けてある。前記微分演算部は前記濃淡画像信号を入力し
て1次微分の絶対値と2次微分値とを算出し、1次微分
信号および2次微分信号を出力する。乗算部は前記微分
演算部より1次微分信号および2次微分信号を入力して
乗算処理する。加算部は前記濃淡画像信号に前記乗算部
による乗算出力信号を加算処理して前記2値化回路への
出力信号を生成する。
[Means for Solving the Problems] The image processing device of the present invention includes a preprocessing circuit that inputs a grayscale image signal obtained by imaging an object and performs preprocessing, and a binary output signal of the preprocessing circuit. and a binarization circuit that performs conversion processing to generate a binary image signal,
The preprocessing circuit is provided with a differential calculation section, a multiplication section, and an addition section. The differential calculation unit inputs the grayscale image signal, calculates the absolute value of the first-order differential and the second-order differential, and outputs a first-order differential signal and a second-order differential signal. The multiplication section receives the first-order differential signal and the second-order differential signal from the differential operation section and performs multiplication processing. The adder adds the multiplication output signal from the multiplier to the grayscale image signal to generate an output signal to the binarization circuit.

【0019】[0019]

【作用】微分演算部で算出した濃淡画像信号の1次微分
の絶対値と2次微分値とを乗算したものを濃淡画像信号
に加算するので、前記2次微分値が濃淡画像のエッジ部
分を強調するよう機能し、また前記1次微分の絶対値が
ノイズ部分が強調されるのを阻止するよう機能する。こ
のため濃淡画像のエッジ部分は強調されるがノイズ成分
は強調されない前処理が実現されるもので、照明変動の
影響がなくなり、正確な特徴量の計測やパターンマッチ
ングを行うことができる。
[Operation] Since the product of the absolute value of the first-order differential of the gray-scale image signal calculated by the differential calculation unit and the second-order differential value is added to the gray-scale image signal, the second-order differential value The absolute value of the first-order differential functions to prevent the noise portion from being emphasized. As a result, preprocessing is achieved in which the edge portions of the grayscale image are emphasized but the noise components are not. This eliminates the influence of illumination fluctuations and allows accurate measurement of feature quantities and pattern matching.

【0020】[0020]

【実施例】図1は、この発明が実施された画像処理シス
テムの概略構成を示すもので、カメラ41と画像処理装
置部40とを含んでいる。前記カメラ41は図示しない
照明装置による照明下で対象物(例えば文字など)を撮
像して、アナログ量の濃淡画像信号VDiを画像処理装
置40へ出力する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows a schematic configuration of an image processing system in which the present invention is implemented, and includes a camera 41 and an image processing unit 40. The camera 41 images an object (for example, characters) under illumination by an illumination device (not shown), and outputs an analog grayscale image signal VDi to the image processing device 40.

【0021】前記画像処理装置40は、前処理回路42
と2値化回路43と特徴計測部44とCPU45と同期
信号発生器46とを含んでおり、前記前処理回路42は
A/D変換器47,微分演算部48,乗算器49,除算
器50,加算器51などで構成されている。
The image processing device 40 includes a preprocessing circuit 42
The preprocessing circuit 42 includes an A/D converter 47, a differential operation section 48, a multiplier 49, and a divider 50. , an adder 51, and the like.

【0022】前記前処理回路42は、濃淡画像信号VD
iに所定の前処理を施して前記2値化回路へ出力するた
めのもので、A/D変換器47はアナログ量の濃淡画像
信号VDiをカメラ41より入力してA/D変換し、デ
ィジタル量の濃淡画像信号VDを微分演算部48および
加算器51へ出力する。
The preprocessing circuit 42 processes the grayscale image signal VD.
The A/D converter 47 inputs the analog grayscale image signal VDi from the camera 41, converts it from analog to digital, and converts it into a digital signal. The grayscale image signal VD of the amount is outputted to the differential calculation section 48 and the adder 51.

【0023】前記微分演算部48は1次微分演算部52
と2次微分演算部53とで構成される。前記1次微分演
算部52は濃淡画像信号VDを入力して1次微分の絶対
値を算出し、1次微分信号Jを乗算器49へ出力する。 また2次微分演算部53は濃淡画像信号VDを入力して
2次微分値を算出し、2次微分信号Kを乗算器49へ出
力する。
The differential calculation section 48 is a first-order differential calculation section 52.
and a second-order differential calculation section 53. The first-order differential calculation section 52 inputs the grayscale image signal VD, calculates the absolute value of the first-order differential, and outputs the first-order differential signal J to the multiplier 49. Further, the second-order differential calculation section 53 inputs the grayscale image signal VD, calculates a second-order differential value, and outputs the second-order differential signal K to the multiplier 49 .

【0024】前記2次微分演算部53は濃淡画像のエッ
ジ部を強調するためのもの、また1次微分演算部52は
エッジ強調によりノイズ成分が強調されるのを阻止する
ためのもので、図4に1次微分演算部52および2次微
分演算部53の原理が示してある。
The second-order differential calculation section 53 is for emphasizing the edge portion of the grayscale image, and the first-order differential calculation section 52 is for preventing noise components from being emphasized due to edge emphasis. 4 shows the principle of the first-order differential calculation section 52 and the second-order differential calculation section 53.

【0025】図4において、61は微分演算部48に入
力される濃淡画像を示すもので、この濃淡画像61に矩
形状のマスク62を設定して画像全体を矢印方向へ走査
する。このマスク62における各枡目は1画素に相当し
、eが中心の着目画素の画素データを、a〜dおよびf
〜iが周囲8方向の画素の画素データを、それぞれ示し
ている。
In FIG. 4, reference numeral 61 indicates a grayscale image input to the differential calculation section 48. A rectangular mask 62 is set on this grayscale image 61, and the entire image is scanned in the direction of the arrow. Each square in this mask 62 corresponds to one pixel, and the pixel data of the pixel of interest centered on e is stored in a to d and f.
~i indicates pixel data of pixels in eight surrounding directions, respectively.

【0026】前記1次微分演算部52としてノイズに強
いソーベル演算子が用いられ、マスク62を走査しつつ
各画素位置でつぎの■式による演算を実行して、1次微
分の絶対値を算出する。このソーベル演算子による場合
、■式から明らかなように、中心の着目画素に対し縦横
の各隣接画素の画素データの差分の絶対値を求めて足し
合わせるから、例えば着目画素にスパイクノイズが存在
していても、1次微分の絶対値にはなんら影響しない。
A Sobel operator that is resistant to noise is used as the first-order differential calculation section 52, and the absolute value of the first-order differential is calculated by performing the calculation according to the following formula (2) at each pixel position while scanning the mask 62. do. In the case of using this Sobel operator, as is clear from equation (2), the absolute value of the difference between the pixel data of each vertically and horizontally adjacent pixel to the center pixel of interest is calculated and added, so for example, spike noise may exist in the pixel of interest. Even if it is, it has no effect on the absolute value of the first derivative.

【0027】[0027]

【数1】[Math 1]

【0028】前記2次微分演算部53としてラプラシア
ン演算子が用いられ、マスク62を走査しつつ各画素位
置でつぎの■式による演算を実行して、2次微分値を算
出する。
A Laplacian operator is used as the second-order differential calculation unit 53, and while scanning the mask 62, a calculation according to the following equation (2) is executed at each pixel position to calculate a second-order differential value.

【0029】[0029]

【数2】[Math 2]

【0030】図5は、ある濃淡画像について所定の水平
線に沿う濃度分布63を示しており、図中、63aが対
象物の画像部分に、63bが背景の画像部分に、63c
が対象物のエッジ部分に、それぞれ対応する。
FIG. 5 shows a density distribution 63 along a predetermined horizontal line for a certain grayscale image. In the figure, 63a is an object image, 63b is a background image, and 63c is
correspond to the edge parts of the object, respectively.

【0031】図6は、図5の濃度分布63をもつ濃淡画
像信号を前記1次微分演算部52に入力したときの演算
出力を示すもので、1次微分の絶対値64は前記エッジ
部分63cの位置に対応して正方向へ突出している。
FIG. 6 shows the calculation output when the grayscale image signal having the density distribution 63 shown in FIG. It protrudes in the positive direction corresponding to the position of.

【0032】図7は、図5の濃度分布63をもつ濃淡画
像信号を前記2次微分演算部53に入力したときの演算
出力を示すもので、2次微分値65は前記エッジ部分6
3cの位置に対応して正負の方向に突出している。
FIG. 7 shows the calculation output when the grayscale image signal having the density distribution 63 shown in FIG.
It protrudes in the positive and negative directions corresponding to the position 3c.

【0033】図1に戻って、乗算器49は1次微分演算
部52より1次微分信号Jを、また2次微分演算部53
より2次微分信号Kを、それぞれ入力して乗算し、また
除算器50は前記乗算器49による乗算出力信号Lを所
定の定数(2のn乗)で割って除算出力信号Mを加算器
51へ出力する。
Returning to FIG. 1, the multiplier 49 receives the first-order differential signal J from the first-order differential calculation section 52, and also receives the first-order differential signal J from the first-order differential calculation section 53.
A divider 50 divides the multiplied output signal L from the multiplier 49 by a predetermined constant (2 to the nth power) and sends the divided output signal M to the adder 51. Output to.

【0034】前記加算器51は、A/D変換器47より
濃淡画像信号VDを、除算器50より除算出力信号Mを
、それぞれ入力して加算し、これにより2値化回路43
への出力信号Nを生成する。
The adder 51 inputs and adds the grayscale image signal VD from the A/D converter 47 and the division output signal M from the divider 50, and thereby adds the grayscale image signal VD from the A/D converter 47 to the binarization circuit 43.
generates an output signal N to the

【0035】図8は、図5の濃度分布63をもつ濃淡画
像信号を上記構成の前処理回路42で前処理して得た前
処理出力(2値化回路43への出力信号N)を示すもの
で、同図によれば、濃度分布66におけるエッジ部分6
6cは図5と比較してその傾斜が急峻となっている。
FIG. 8 shows a preprocessing output (output signal N to the binarization circuit 43) obtained by preprocessing the grayscale image signal having the density distribution 63 shown in FIG. 5 by the preprocessing circuit 42 having the above configuration. According to the figure, the edge portion 6 in the density distribution 66
6c has a steeper slope compared to FIG.

【0036】前記2値化回路43は加算器51の出力信
号Nを入力して所定の2値化しきい値で2値化し、その
2値画像信号を特徴計測部44へ出力する。特徴計測部
44では2値画像につき黒画素の面積を計測したり、パ
ターンマッチングを行ったりして対象物の形状などを認
識する。
The binarization circuit 43 inputs the output signal N of the adder 51, binarizes it using a predetermined binarization threshold, and outputs the binary image signal to the feature measuring section 44. The feature measurement unit 44 measures the area of black pixels in the binary image and performs pattern matching to recognize the shape of the object.

【0037】図2は、面積計測を実施する特徴計測部4
4の具体例を示すもので、領域判定部54とカウンタ5
5とレジスタ56とを含んでいる。領域判定部54は2
値画像に対して所定のウィンドウを設定し、そのウィン
ドウ内に含まれる2値画像の各構成画素が黒画素か否か
を順次判定し、黒画素であれば、「1」のレベルのパル
スをカウンタ55へ出力する。カウンタ55は領域判定
部54からのパルス入力を計数して対象物の画像部分の
面積を計測し、レジスタ56はカウンタ55の計測値を
ラッチしてCPU45へ出力する。
FIG. 2 shows the feature measuring section 4 that performs area measurement.
4, which shows a specific example of area determination section 54 and counter 5.
5 and a register 56. The area determination unit 54
A predetermined window is set for the value image, and it is sequentially determined whether each constituent pixel of the binary image included in the window is a black pixel, and if it is a black pixel, a pulse of level "1" is emitted. Output to counter 55. The counter 55 counts the pulse input from the area determining section 54 to measure the area of the image portion of the object, and the register 56 latches the measured value of the counter 55 and outputs it to the CPU 45.

【0038】図3は、パターンマッチングを実施する特
徴計測部44の具体例を示すもので、パターンメモタ5
7と一致判別回路58とカウンタ59とレジスタ60と
を含んでいる。パターンメモリ57には標準パターンが
登録され、一致判別回路58は対象物についての2値画
像信号とパターンメモリ57より読み出された標準パタ
ーンの2値画像信号とを入力して画素単位で照合し、各
画素データが不一致のとき、「1」のレベルの検出パル
スをカウンタ59へ出力する。カウンタ59は一致判別
回路58からの検出パルスを計数して不一致画素数を計
測し、レジスタ60はカウンタ59の計測値をラッチし
てCPU45へ出力する。
FIG. 3 shows a specific example of the feature measuring section 44 that performs pattern matching.
7, a match determination circuit 58, a counter 59, and a register 60. A standard pattern is registered in the pattern memory 57, and a match determination circuit 58 inputs the binary image signal of the object and the binary image signal of the standard pattern read out from the pattern memory 57, and compares them pixel by pixel. , when the respective pixel data do not match, outputs a detection pulse of level "1" to the counter 59. The counter 59 counts the detection pulses from the coincidence determination circuit 58 to measure the number of mismatched pixels, and the register 60 latches the measured value of the counter 59 and outputs it to the CPU 45.

【0039】図1に戻って、CPU45は画像処理にか
かわる各種演算を実行したり、上記の各構成の動作を制
御するためのものであり、また同期信号発生器46は同
期信号を発生してカメラ41および画像処理装置40の
回路各部へ与える。
Returning to FIG. 1, the CPU 45 executes various calculations related to image processing and controls the operations of each of the above components, and the synchronization signal generator 46 generates synchronization signals. It is applied to each circuit part of the camera 41 and the image processing device 40.

【0040】図9は、前記同期信号に同期して実行され
る画像処理装置40の処理手順を示す。まず同図のステ
ップ1(図中「ST1」で示す)では、画像処理装置4
0はカメラ41より濃淡画像信号VDiを入力し、つぎ
のステップ2で前処理回路42が濃淡画像信号VDiに
ついて前記した前処理を施す。つぎのステップ3で2値
化回路3が前処理回路42の出力信号を2値化して2値
画像を生成し、ステップ4で特徴抽出部44がその2値
画像につき特徴量の計測やパターンマッチングを実施す
る。
FIG. 9 shows a processing procedure of the image processing device 40 executed in synchronization with the synchronization signal. First, in step 1 (indicated by "ST1" in the diagram) of the same figure, the image processing device 4
0 inputs the grayscale image signal VDi from the camera 41, and in the next step 2, the preprocessing circuit 42 performs the above-described preprocessing on the grayscale image signal VDi. In the next step 3, the binarization circuit 3 binarizes the output signal of the preprocessing circuit 42 to generate a binary image, and in step 4, the feature extraction unit 44 measures the feature amount and performs pattern matching on the binary image. Implement.

【0041】図10は、前記前処理回路42による前処
理を経てエッジ強調された濃淡画像67を示すもので、
図中、68が文字の画像部分を、69が背景の画像部分
を、それぞれ示している。前記前処理回路42では、微
分演算部48で算出した濃淡画像信号VDの1次微分の
絶対値と2次微分値とを乗算したものを濃淡画像信号V
Dに加算するため、前記2次微分値が濃淡画像のエッジ
部分を強調するよう機能し、また前記1次微分の絶対値
がノイズ部分が強調されるのを阻止するよう機能する結
果、ノイズ成分は強調されず、しかもエッジ部分は強調
された望ましい濃淡画像67が得られる。
FIG. 10 shows a grayscale image 67 whose edges have been emphasized through preprocessing by the preprocessing circuit 42.
In the figure, 68 indicates an image portion of characters, and 69 indicates an image portion of a background. In the pre-processing circuit 42, the product obtained by multiplying the absolute value of the first-order differential of the gray-scale image signal VD calculated by the differential calculation unit 48 by the second-order differential value is used as the gray-scale image signal V.
In order to add the noise component to A desirable grayscale image 67 is obtained in which the edges are not emphasized and the edge portions are emphasized.

【0042】図11は、前記濃淡画像67の水平線70
に沿う明るさ分布71を示す。同図中、71a,71b
で示す部分はエッジ部分に対応しており、このエッジ部
分は傾斜が急峻になっている。
FIG. 11 shows the horizontal line 70 of the grayscale image 67.
A brightness distribution 71 along the . In the same figure, 71a, 71b
The part indicated by 2 corresponds to the edge part, and this edge part has a steep slope.

【0043】また図11において、72は照明劣化によ
り撮像条件が変化したときの明るさ分布を示しており、
適正照明下での明るさ分布71に対し明るさレベルが全
体的に低くなっている。
Further, in FIG. 11, 72 indicates the brightness distribution when the imaging conditions change due to illumination deterioration.
The brightness level is lower overall than the brightness distribution 71 under proper illumination.

【0044】それぞれの濃淡画像を例えば図11に示す
2値化しきい値THで2値化すると、水平線70に沿う
2値化レベルは適正照明下では符号73で示すようにな
り、また照明劣化時では符号74で示すようになって、
「0」のレベルの幅dはほぼ一致している。また同図の
2値化レベルには図19に示すようなノイズ部分は全く
現れていない。
When each grayscale image is binarized using the binarization threshold value TH shown in FIG. 11, for example, the binarization level along the horizontal line 70 becomes as shown by reference numeral 73 under proper illumination, and when the illumination deteriorates. Then, as shown by the symbol 74,
The widths d of the "0" level are almost the same. Further, the noise portion shown in FIG. 19 does not appear at all in the binarized level of the same figure.

【0045】図12は、適正照明下での2値画像75と
照明劣化時の2値画像76とを対比して示してある。図
中、黒く塗り潰した部分が文字の画像部分77を表す黒
画素領域を、それ以外の部分が背景の画像部分78を表
す白画素領域を、それぞれ示す。同図によれば、照明劣
化時の2値画像76と適正照明下での2値画像75とは
文字の画像部分77の太さがほぼ一致しており、従って
これら2値画像75,76に所定のウィンドウ79を設
定し、そのウィンドウ79内の黒画素領域の面積を計測
して形状認識などを行う場合、照明適正下と照明劣化時
とは面積の計測値がほぼ一致し、適正な認識が行われる
FIG. 12 shows a binary image 75 under proper illumination and a binary image 76 under degraded illumination in comparison. In the figure, the blacked-out part shows a black pixel area representing the character image part 77, and the other parts show the white pixel area representing the background image part 78, respectively. According to the figure, the thickness of the character image portion 77 in the binary image 76 under degraded illumination and the binary image 75 under proper illumination is almost the same, and therefore When a predetermined window 79 is set and the area of the black pixel area within the window 79 is measured to perform shape recognition, etc., the measured area values are almost the same under appropriate lighting and when illumination is degraded, and proper recognition is possible. will be held.

【0046】図13は、適正照明下で文字「A」を撮像
して得た標準パターン80と、照明劣化時に認識対象物
を撮像して得た2値画像81とを、それぞれ示している
。この2値画像81は標準パターン80とほぼ一致して
おり、この両者を照合してパターンマッチングを行った
場合、同図のマッチング画像82に示されるように、不
一致画素(図中、黒で示す部分)が殆ど生じず、適正な
認識が行われることになる。
FIG. 13 shows a standard pattern 80 obtained by capturing an image of the letter "A" under proper illumination, and a binary image 81 obtained by capturing an image of a recognition object under degraded illumination. This binary image 81 almost matches the standard pattern 80, and when pattern matching is performed by comparing the two, as shown in the matching image 82 in the same figure, mismatched pixels (shown in black in the figure) (part) will occur, and proper recognition will be made.

【0047】[0047]

【発明の効果】この発明は上記の如く、2値化回路に対
する前処理回路に微分演算部と乗算部と加算部とを設け
て、濃淡画像信号の1次微分の絶対値と2次微分値とを
乗算したものを濃淡画像信号に加算するようにしたから
、濃淡画像のエッジ部分は強調されるがノイズ成分は強
調されない前処理が実現される。このため照明変動が発
生しても正確な特徴量の計測やパターンマッチングを行
うことができるという、発明目的を達成した顕著な効果
を奏する。
Effects of the Invention As described above, the present invention provides a preprocessing circuit for a binarization circuit with a differential operation section, a multiplication section, and an addition section, and calculates the absolute value of the first differential and the second differential value of a grayscale image signal. Since the product obtained by multiplying by is added to the grayscale image signal, preprocessing is realized in which the edge portion of the grayscale image is emphasized but the noise component is not emphasized. Therefore, even if illumination fluctuations occur, it is possible to accurately measure feature quantities and perform pattern matching, which is a remarkable effect that achieves the purpose of the invention.

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

【図1】この発明にかかる画像処理装置が用いられた画
像処理システムの概略構成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of an image processing system using an image processing apparatus according to the present invention.

【図2】特徴計測部の具体例を示すブロック図である。FIG. 2 is a block diagram showing a specific example of a feature measurement unit.

【図3】特徴計測部の他の具体例を示すブロック図であ
る。
FIG. 3 is a block diagram showing another specific example of the feature measurement unit.

【図4】微分演算部の原理を示す説明図である。FIG. 4 is an explanatory diagram showing the principle of a differential calculation section.

【図5】濃淡画像の濃度分布を示す説明図である。FIG. 5 is an explanatory diagram showing the density distribution of a grayscale image.

【図6】1次微分演算部による演算出力を示す説明図で
ある。
FIG. 6 is an explanatory diagram showing calculation output by a first-order differential calculation section.

【図7】2次微分演算部による演算出力を示す説明図で
ある。
FIG. 7 is an explanatory diagram showing calculation output by a second-order differential calculation section.

【図8】前処理回路による前処理出力を示す説明図であ
る。
FIG. 8 is an explanatory diagram showing preprocessing output by a preprocessing circuit.

【図9】画像処理装置の処理手順を示すフローチャート
である。
FIG. 9 is a flowchart showing a processing procedure of the image processing device.

【図10】前処理を経てエッジ強調された濃淡画像を示
す説明図である。
FIG. 10 is an explanatory diagram showing a grayscale image whose edges have been enhanced through preprocessing.

【図11】図10の濃淡画像の所定の水平線に沿う明る
さ分布を示す説明図である。
FIG. 11 is an explanatory diagram showing the brightness distribution along a predetermined horizontal line of the grayscale image in FIG. 10;

【図12】適正照明下の2値画像と照明劣化時の2値画
像とを対比して示した説明図である。
FIG. 12 is an explanatory diagram showing a comparison between a binary image under proper illumination and a binary image under degraded illumination.

【図13】2値画像を標準パターンとパターンマッチン
グする状態を示す説明図である。
FIG. 13 is an explanatory diagram showing a state in which a binary image is pattern matched with a standard pattern.

【図14】画像処理装置に入力される濃淡画像を示す説
明図である。
FIG. 14 is an explanatory diagram showing a grayscale image input to an image processing device.

【図15】図14の濃淡画像の所定の水平線に沿う明る
さ分布を示す説明図である。
FIG. 15 is an explanatory diagram showing the brightness distribution along a predetermined horizontal line of the grayscale image in FIG. 14;

【図16】適正照明下の2値画像と照明劣化時の2値画
像とを対比して示した説明図である。
FIG. 16 is an explanatory diagram showing a comparison between a binary image under proper illumination and a binary image under degraded illumination.

【図17】2値画像を標準パターンとパターンマッチン
グした結果を示す説明図である。
FIG. 17 is an explanatory diagram showing the result of pattern matching a binary image with a standard pattern.

【図18】エッジ強調された濃淡画像を示す説明図であ
る。
FIG. 18 is an explanatory diagram showing a grayscale image with edge emphasis.

【図19】図18の濃淡画像の所定の水平線に沿う明る
さ分布を示す説明図である。
FIG. 19 is an explanatory diagram showing the brightness distribution along a predetermined horizontal line of the grayscale image in FIG. 18;

【図20】適正照明下の2値画像と照明劣化時の2値画
像とを対比して示した説明図である。
FIG. 20 is an explanatory diagram showing a comparison between a binary image under proper illumination and a binary image under degraded illumination.

【図21】2値画像を標準パターンとパターンマッチン
グする状態を示す説明図である。
FIG. 21 is an explanatory diagram showing a state in which a binary image is pattern matched with a standard pattern.

【符号の説明】[Explanation of symbols]

40  画像処理装置 42  前処理回路 43  2値化回路 45  CPU 48  微分演算部 49  乗算器 51  加算器 52  1次微分演算部 53  2次微分演算部 40 Image processing device 42 Pre-processing circuit 43 Binarization circuit 45 CPU 48 Differential operation section 49 Multiplier 51 Adder 52 First-order differential calculation section 53 Second-order differential operation section

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】対象物を撮像して得た濃淡画像信号を入力
して前処理を施す前処理回路と、前処理回路の出力信号
を2値化処理して2値画像信号を生成する2値化回路と
を有し、前記前処理回路は、前記濃淡画像信号を入力し
て1次微分の絶対値と2次微分値とを算出し、1次微分
信号および2次微分信号を出力する微分演算部と、前記
微分演算部より1次微分信号および2次微分信号を入力
して乗算処理する乗算部と、前記濃淡画像信号に前記乗
算部による乗算出力信号を加算処理して前記2値化回路
への出力信号を生成する加算部とを具備して成る画像処
理装置。
1. A preprocessing circuit that inputs a grayscale image signal obtained by imaging an object and performs preprocessing; and 2 that performs binarization processing on the output signal of the preprocessing circuit to generate a binary image signal. the preprocessing circuit inputs the grayscale image signal, calculates the absolute value of the first derivative and the second derivative, and outputs the first derivative signal and the second derivative signal. a differential calculation section; a multiplication section that receives and multiplies the first-order differential signal and second-order differential signal from the differential calculation section; and adds the multiplication output signal from the multiplication section to the grayscale image signal to generate the binary signal. An image processing device comprising: an addition section that generates an output signal to a conversion circuit.
JP3064086A 1991-03-04 1991-03-04 Image processor Pending JPH04276887A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3064086A JPH04276887A (en) 1991-03-04 1991-03-04 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3064086A JPH04276887A (en) 1991-03-04 1991-03-04 Image processor

Publications (1)

Publication Number Publication Date
JPH04276887A true JPH04276887A (en) 1992-10-01

Family

ID=13247920

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3064086A Pending JPH04276887A (en) 1991-03-04 1991-03-04 Image processor

Country Status (1)

Country Link
JP (1) JPH04276887A (en)

Similar Documents

Publication Publication Date Title
US5081689A (en) Apparatus and method for extracting edges and lines
EP0712094B1 (en) A multi-windowing technique for threshholding an image using local image properties
US5282061A (en) Programmable apparatus for determining document background level
US7359547B2 (en) Pseudo three dimensional image generating apparatus
US4817174A (en) Image processing apparatus
KR960006477A (en) Error diffusion method binarization method and device
US6577775B1 (en) Methods and apparatuses for normalizing the intensity of an image
JPH041866A (en) Method and device for image processing
JPH06308256A (en) Cloudy fog detecting method
JPH04276887A (en) Image processor
KR20220154345A (en) Contour detection device using gaussian-weighted least squares and contour detection method thereof
JPH01286084A (en) Picture evaluating device
JPH11250247A (en) Isolated area judging device
JPH0544725Y2 (en)
KR100212845B1 (en) Method for calculating direction of edge in digital image data
JP3175946B2 (en) Object position measuring method and device
JP3127087B2 (en) Method and apparatus for edge detection processing of gray image
JPH0683959A (en) Area division system for image
JP3004191B2 (en) Bolt box position detection method
CN116740057A (en) Cylindrical workpiece burr online detection method and system
JPS63219081A (en) Image binarizing system
KR980013264A (en) Edge detection method of edge emphasis error diffusion method
JPH0289187A (en) Picture signal correcting device
JPS6091484A (en) Picture processor
Palenichka Structure-Adaptive Evaluation of Noise in Images for Automatic Image Quality Control