JP2612450B2 - Contour line extraction device - Google Patents

Contour line extraction device

Info

Publication number
JP2612450B2
JP2612450B2 JP62152001A JP15200187A JP2612450B2 JP 2612450 B2 JP2612450 B2 JP 2612450B2 JP 62152001 A JP62152001 A JP 62152001A JP 15200187 A JP15200187 A JP 15200187A JP 2612450 B2 JP2612450 B2 JP 2612450B2
Authority
JP
Japan
Prior art keywords
density gradient
magnitude
pixel
output
gradient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP62152001A
Other languages
Japanese (ja)
Other versions
JPH01271887A (en
Inventor
隆 鳥生
洋道 岩瀬
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP62152001A priority Critical patent/JP2612450B2/en
Priority to AU11276/88A priority patent/AU583202B2/en
Priority to EP88101696A priority patent/EP0279297B1/en
Priority to DE88101696T priority patent/DE3886560T2/en
Priority to US07/153,426 priority patent/US4908872A/en
Publication of JPH01271887A publication Critical patent/JPH01271887A/en
Application granted granted Critical
Publication of JP2612450B2 publication Critical patent/JP2612450B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】 〔概要〕 本発明は入力画像中の各画素の濃度勾配の大きさと方
向を算出し、勾配の方向がX,Y各軸から所定角度以内で
あり、濃度勾配の大きさが所定閾値以上である画素を抽
出する。そしてこの抽出された画素に対し左右,上下各
N個の画素の最大値,最小値と比較し、最大値に等し
く、最小値より大きい画素を抽出して輪郭線を設定して
行く。この方式により輪郭線を正確,迅速に検出するこ
とができる。
DETAILED DESCRIPTION OF THE INVENTION [Overview] The present invention calculates the magnitude and direction of a density gradient of each pixel in an input image, and determines that the gradient direction is within a predetermined angle from each of the X and Y axes. A pixel whose is equal to or larger than a predetermined threshold is extracted. Then, the extracted pixels are compared with the maximum value and the minimum value of each of the left, right, upper and lower N pixels, and pixels which are equal to the maximum value and larger than the minimum value are extracted and the contour is set. With this method, the contour can be detected accurately and quickly.

〔産業上の利用分野〕[Industrial applications]

本発明は入力画像中の各画素の濃度勾配の大きさと方
向から輪郭線を正確,迅速に検出できる輪郭線抽出装置
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a contour line extracting device capable of accurately and quickly detecting a contour line from the magnitude and direction of a density gradient of each pixel in an input image.

〔従来の技術〕[Conventional technology]

従来の入力画像に対し輪郭線を抽出する方式として
は、濃度勾配があらかじめ設定された所定の値より大き
い画素のうちその画素での濃度勾配が輪郭線に垂直な方
向に沿つた近傍の数画素のいずれの濃度勾配よりも小さ
くない画素を選択する方式があつた。具体的には、第3
図の従来例の要部の構成に示すように、まず各画素に濃
度勾配の大きさ算出部1と濃度勾配の方向算出部2によ
り、濃度勾配の大きさと方向を算出する。次に方向別濃
度勾配最大画素抽出部によりまず濃度勾配の大きさがあ
らかじめ設定されている所定の値より大きいような画素
を抽出し、その後、その画素での濃度勾配の大きさを濃
度勾配の方向に沿つた近傍数画素で検出した濃度勾配の
大きさと比較し、その画素での濃度勾配の大きさが最大
(他に、より大きな濃度勾配を持つ画素がない)となつ
ているときのみその画素の輪郭線の候補とする。
As a conventional method for extracting an outline from an input image, among pixels in which the density gradient is larger than a predetermined value set in advance, several pixels in the vicinity where the density gradient at the pixel is along a direction perpendicular to the outline are used. There is a method of selecting a pixel that is not smaller than any of the density gradients. Specifically, the third
As shown in the configuration of the main part of the conventional example, first, the magnitude and direction of the density gradient are calculated for each pixel by the density gradient magnitude calculator 1 and the density gradient direction calculator 2. Next, a pixel whose magnitude of the density gradient is larger than a predetermined value is extracted first by the density gradient maximum pixel extracting unit for each direction, and then, the magnitude of the density gradient at that pixel is calculated as the density gradient. Compared to the magnitude of the density gradient detected at several neighboring pixels along the direction, only when the magnitude of the density gradient at that pixel is the maximum (no other pixel having a larger density gradient) It is a candidate for a contour line of a pixel.

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

上述の輪郭線検出方式では、濃度勾配の方向に沿つた
濃度勾配の大きさの列において、同じ値がある一定個数
以上連続している場合、その方向に沿つて濃度勾配の大
きさが極大を示さない画素をも輪郭線の候補として検出
してしまい、不正確な輪郭線の検出をするという欠点が
あつた。
In the above-described contour line detection method, in a column of the magnitude of the density gradient along the direction of the density gradient, when the same value is continued for a certain number or more, the magnitude of the density gradient along the direction is maximized. Pixels that are not shown are also detected as contour line candidates, so that an inaccurate contour line is detected.

本発明の目的は濃度勾配の方向に対し濃度勾配の大き
さが極大である画素を正確に検出しうる輪郭線抽出装置
を提供することにある。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a contour line extracting device capable of accurately detecting a pixel having a maximum density gradient in the direction of the density gradient.

〔問題点を解決するための手段〕[Means for solving the problem]

前記目的を達成するため、入力画像中の各画素の濃度
勾配の大きさと方向を算出する演算部と、勾配の方向が
X,Y各軸から所定角度以内の所定閾値以上の画素を抽出
するX,Y濃度勾配抽出部と、この抽出された画素に対し
左右,上下各N個の画素の濃度勾配の大きさの最大値,
最小値と比較し、最大値に等しく最小値より大きい画素
を抽出して輪郭線を設定するX,Y側の手段を具え、何れ
かを出力する。
In order to achieve the above-mentioned object, an arithmetic unit that calculates the magnitude and direction of the density gradient of each pixel in the input image, and the direction of the gradient is
An X, Y density gradient extraction unit for extracting pixels having a predetermined threshold or more within a predetermined angle from each of the X and Y axes, and the maximum of the density gradient of each of the left, right, upper and lower N pixels with respect to the extracted pixels value,
X- and Y-side means for extracting a pixel equal to the maximum value and larger than the minimum value and comparing with the minimum value to set a contour line are provided, and one of them is output.

〔作用〕[Action]

上記構成により、第1図(a)〜(d)の原理説明図
に示すように、いま、同図(a)の画像4の輪郭線5に
直交すべき濃度勾配7を同図(c),(d)に示すX,Y
方向の空間フイルタを用いて演算検出する。そして、検
出された画素の濃度の大きさと方向に対し、その周辺状
態の検出を行なうため、同図(b)に示すように、対象
画素6に対してX,Y軸の濃度勾配の大きさと方向を検出
し、勾配の方向がX,Y軸から±αの範囲で所定閾値以上
の画素を抽出し、図示のように左右,上下N個の画素8
の濃度勾配の大きさの最大値,最小値を検出し、対象画
素6が最大値と等しく最小値より大きい場合は輪郭線上
の画素と判定するものである。
With the above configuration, as shown in the principle explanatory diagrams of FIGS. 1 (a) to 1 (d), the density gradient 7 which should be orthogonal to the contour line 5 of the image 4 of FIG. X, Y shown in (d)
Operation detection is performed using a spatial filter in the direction. Then, in order to detect the surrounding state with respect to the magnitude and direction of the density of the detected pixel, the magnitude of the density gradient of the X and Y axes with respect to the target pixel 6 is determined as shown in FIG. The direction is detected, and pixels whose gradient directions are equal to or larger than a predetermined threshold value within a range of ± α from the X and Y axes are extracted, and as shown in FIG.
The maximum value and the minimum value of the density gradient are detected, and if the target pixel 6 is equal to the maximum value and larger than the minimum value, it is determined that the pixel is on the contour line.

〔実施例〕〔Example〕

第2図は本発明の実施例の構成説明図である。同図に
おいて、入力部11はTVカメラで画像を入力し、512バイ
ト×512バイトのデジタル画像に変換し、微分演算部X
方向12Xと微分演算部Y方向12Yに送り、それぞれ画素毎
にX方向に微分値DX,Y方向の微分値DYを算出する。これ
らはそれぞれ第1図(c),(d)に示す空間フイルタ
を走査し比較検出することにより行なう。
FIG. 2 is an explanatory view of the configuration of the embodiment of the present invention. In the figure, an input unit 11 receives an image from a TV camera, converts the image into a 512-byte × 512-byte digital image,
Direction 12 X and sent to the differentiating unit Y-direction 12 Y, the differential value D X for each pixel in the X direction, and calculates the Y-direction of the differential value D Y. These operations are performed by scanning the spatial filters shown in FIGS. 1 (c) and 1 (d) for comparison and detection.

これらX,Y方向の微分演算部12X,12Yからの微分値DX,D
Yを濃度勾配の大きさ算出部13に入れ、濃度勾配の大き
を算出する。同様の微分値DX,DYを濃度勾配の方向算出
部14に入れ濃度勾配の大きさが予め設定される閾値以上
の画素に対して、ベクトルDX,DYの方向(0〜360゜)を
算出する。そしてそれ以外の画素に対しては除外するた
めのコード“9999"を出力する。
The differential values D X , D from the X, Y direction differential operation units 12 X , 12 Y
Y is entered into the density gradient magnitude calculator 13, and the magnitude of the density gradient is calculated. Is calculated. Similar differential value D X, with respect to the threshold or more pixels in size is preset gradient putting D Y in the direction calculation unit 14 of the concentration gradient vector D X, direction D Y (0 to 360 ° ) Is calculated. Then, a code “9999” for excluding other pixels is output.

濃度勾配の方向算出部14からの方向情報は閾値処理部
(1)15X,(2)15Yに送られる。
The direction information from the density gradient direction calculation unit 14 is sent to threshold processing units (1) 15 X and (2) 15 Y.

閾値処理部(1)15Xでは、濃度勾配の方向がX軸か
らα=±45゜以内の範囲にある画素に対しては“1",そ
うでない画素には“0"を出力する。
In the threshold processing unit (1) 15 X, for pixels in the range direction is within alpha = ± 45 ° from the X axis gradient "1", the pixel is not the case outputs a "0".

閾値処理部(2)15Yでは、濃度勾配の方向がY軸か
らα=±45゜以内の範囲にある画素に対しては“1",そ
うでない画素には“0"を出力する。
In the threshold processing unit (2) 15 Y, for pixels in the range direction is within alpha = ± 45 ° from the Y-axis of the gradient "1", the pixel is not the case outputs a "0".

閾値処理部(1)15X,(2)15Yの出力を前記濃度勾
配の大きさ抽出部13の対応する出力とともにそれぞれ積
演算部(1)16X,(2)16Yに入れ、積を求めることに
より、X軸から±45゜,Y軸から±45゜以内の範囲にある
画素のみが選択される。
Threshold processing unit (1) 15 X, (2) 15 Y corresponding respectively product unit with the output (1) 16 X of the output density gradient magnitude extractor 13 of, (2) placed in a 16 Y, the product Is obtained, only pixels within a range of ± 45 ° from the X axis and within ± 45 ° from the Y axis are selected.

積演算部(1)16Xから出力されるX軸から±45゜以
内の画素の積演算部の出力値を直接比較演算部(1)18
Xに入れるとともに、X方向の4つのフイルタ,左最大
値フイルタ17X1,左最小値フイルタ17X2,右最大値フイル
タ17X3,右最小値フイルタ17X4を介して比較演算部
(1)18Xに送る。
Product unit (1) 16 directly comparing unit output value of the AND operation of the pixel within ± 45 ° from the X axis output from the X (1) 18
In addition to X , four comparators in the X direction, a left maximum value filter 17 X1 , a left minimum value filter 17 X2 , a right maximum value filter 17 X3 , and a right minimum value filter 17 X4 , a comparison operation unit (1) 18 X Send to

これらのフイルタは対象画素の左側または右側のN個
たとえば第1図(b)に示すような3個の画素の積演算
部の出力値のうちの最大値または最小値を検出するフイ
ルタである。
These filters are for detecting the maximum value or the minimum value of the output values of the product operation unit of N pixels on the left or right side of the target pixel, for example, three pixels as shown in FIG. 1 (b).

そして比較演算部(1)18Xでは、積演算部(1)16X
の出力が左最大値フイルタ17X1,右最大値フイルタ17X3
のいずれの出力とも等しく、かつ左最小値フイルタ1
7X2,右最小値フイルタ17X4のいずれの出力よりも大きい
ときは“1"を出力し、そうでないとき“0"を出力する。
In the comparison operation unit (1) 18 X , the product operation unit (1) 16 X
The output of the left maximum value filter 17 X1 and the right maximum value filter 17 X3
Is equal to any output of, and left minimum filter 1
If it is larger than 7 X2 or the output of the right minimum value filter 17 X4 , it outputs “1”; otherwise, it outputs “0”.

積演算部(2)16Yから出力されるY軸から±45゜以
内の画素の積演算部の出力値も同様に直接比較演算部
(2)18Yに入れるとともに、Y方向の4つのフイル
タ,上最大値フイルタ17Y1,上最小値フイルタ17Y2,下最
大値フイルタ17Y3,下最小値フイルタ17Y4を介して比較
演算部(2)18Yに送る。これらY軸の上下フイルタの
機能は前記X軸の左右フイルタの機能と同様である。
Similarly, the output value of the product operation unit for pixels within ± 45 ° from the Y axis output from the product operation unit (2) 16 Y is also directly input to the comparison operation unit (2) 18 Y, and the four filters in the Y direction are also provided. , The upper maximum value filter 17 Y1 , the upper minimum value filter 17 Y2 , the lower maximum value filter 17 Y3 , and the lower minimum value filter 17 Y4 to the comparison operation unit (2) 18 Y. The functions of these Y-axis vertical filters are the same as those of the X-axis left and right filters.

そして、比較演算部(1)18X,(2)18Yの出力を論
理和算出部19を通しその論理和を出力する。
Then, the outputs of the comparison operation units (1) 18 X and (2) 18 Y are passed through a logical sum calculating unit 19 to output the logical sum.

〔発明の効果〕〔The invention's effect〕

以上説明したように、本発明によれば、第1図(b)
に図示したように、対象とする画素に対しある角度±α
以内で閾値以上の画素を考慮することにより、濃度勾配
の大きさが濃度勾配の方向に沿つて正確な極大値のみを
抽出することができ、輪郭線の正確かつ迅速な検出が可
能となるものである。
As described above, according to the present invention, FIG.
As shown in FIG.
By taking into account the pixels that are equal to or larger than the threshold value within the range, only the local maximum value of the density gradient along the direction of the density gradient can be extracted, and accurate and quick detection of the contour line becomes possible. It is.

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

第1図(a)〜(d)は本発明の原理説明図、第2図は
本発明の実施例の構成説明図、第3図は従来例の説明図
であり、図中、5は輪郭線、6は対象画素、7は濃度勾
配ベクトル、8は抽出画素、9,10は空間フイルタ、11は
入力部、12X,12Yは微分演算部、13は濃度勾配の大きさ
算出部、14は濃度勾配の方向算出部、15X,15Yは閾値処
理部、16X,16Yは積演算部、17X1,17X2,17X3,17X4は左右
の最大値,最小値フイルタ、17Y1,17Y2,17Y3,17Y4は上
下の最大値,最小値フイルタ、18X,18Yは比較演算部、1
9は論理和算出部を示す。
1 (a) to 1 (d) are explanatory diagrams of the principle of the present invention, FIG. 2 is an explanatory diagram of a configuration of an embodiment of the present invention, and FIG. 3 is an explanatory diagram of a conventional example. In FIG. Line, 6 is a target pixel, 7 is a density gradient vector, 8 is an extracted pixel, 9 and 10 are spatial filters, 11 is an input unit, 12 X and 12 Y are differential operation units, 13 is a density gradient magnitude calculation unit, 14 is a density gradient direction calculation unit, 15 X and 15 Y are threshold processing units, 16 X and 16 Y are product operation units, 17 X 1 , 17 X 2 , 17 X 3 , and 17 X 4 are left and right maximum and minimum value filters, 17 Y 1 , 17 Y 2 , 17 Y 3 , 17 Y 4 are upper and lower maximum and minimum value filters, 18 X , 18 Y are comparison operation units,
Reference numeral 9 denotes a logical sum calculator.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力画像中の各画素の濃度勾配の大きさと
方向を算出する演算部(12X,12Y,13,14)と、 前記勾配の方向がX,Y各軸から所定角度以内であり、か
つ濃度勾配の大きさが所定閾値以上である画素を抽出す
るそれぞれX,Y濃度勾配抽出部(15X,15Y,16X,16Yと、 前記X軸に関連し抽出された画素に対し該画素の左側ま
たは右側のN個の前記演算部から出力される前記濃度勾
配の大きさの最大値と最小値とを検出する第1の手段
(17X1〜17X4)と、 前記Y軸に関連し抽出された画素に対し該画素の上側ま
たは下側のN個の前記演算部から出力される前記濃度勾
配の大きさの最大値と最小値とを検出する第2の手段
(17Y1〜17Y4)と、 前記演算部から出力される前記濃度勾配の大きさと前記
第1の手段からの左右のそれぞれ最大値と最小値の4出
力とを比較し、前記X濃度勾配出力が左右のいずれの最
大値とも等しくかついずれの最小値よりも大きい画素を
出力する第3の手段(18x)と、 前記演算部から出力される前記濃度勾配の大きさと前記
第2の手段からの上下のそれぞれ最大値と最小値の4出
力とを比較し、前記Y濃度勾配出力が上下のいずれの最
大値とも等しくかついずれの最小値よりも大きい画素を
出力する第4の手段(18y)と、 前記第3の手段と第4の手段との論理和を出力する手段
(19)とを具えたことを特徴とする輪郭線抽出装置。
An arithmetic unit (12X, 12Y, 13, 14) for calculating the magnitude and direction of a density gradient of each pixel in an input image, wherein the direction of the gradient is within a predetermined angle from each of the X and Y axes. And X, Y density gradient extraction units (15X, 15Y, 16X, 16Y, respectively) that extract pixels whose magnitude of the density gradient is equal to or greater than a predetermined threshold, a first means for detecting the magnitude maximum value and the minimum value of the concentration gradient which is output from the left or right side of the N of the operational portion (17 X1 ~17 X4), in relation to the Y-axis extraction second means for detecting the magnitude maximum value and the minimum value of the concentration gradient which is output from the N of the operational portion of the upper or lower pixel to pixel, which is (17 Y1 ~17 Y4) And the magnitude gradient density output from the calculation unit and the four outputs of the left and right maximum and minimum values from the first means. A third means (18x) for comparing and outputting a pixel whose X density gradient output is equal to any of the left and right maximum values and larger than any of the minimum values; and a magnitude of the density gradient output from the arithmetic unit. And the upper and lower maximum and minimum outputs from the second means are compared, and a pixel whose Y density gradient output is equal to any of the upper and lower maximum values and larger than any of the minimum values is output. A contour line extracting device comprising: a fourth means (18y); and a means (19) for outputting a logical sum of the third means and the fourth means.
JP62152001A 1987-02-06 1987-06-18 Contour line extraction device Expired - Lifetime JP2612450B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP62152001A JP2612450B2 (en) 1987-06-18 1987-06-18 Contour line extraction device
AU11276/88A AU583202B2 (en) 1987-02-06 1988-02-04 Method and apparatus for extracting pattern contours in image processing
EP88101696A EP0279297B1 (en) 1987-02-06 1988-02-05 Pattern contours in image processing
DE88101696T DE3886560T2 (en) 1987-02-06 1988-02-05 Pattern contours in image processing.
US07/153,426 US4908872A (en) 1987-02-06 1988-02-05 Method and apparatus for extracting pattern contours in image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62152001A JP2612450B2 (en) 1987-06-18 1987-06-18 Contour line extraction device

Publications (2)

Publication Number Publication Date
JPH01271887A JPH01271887A (en) 1989-10-30
JP2612450B2 true JP2612450B2 (en) 1997-05-21

Family

ID=15530899

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62152001A Expired - Lifetime JP2612450B2 (en) 1987-02-06 1987-06-18 Contour line extraction device

Country Status (1)

Country Link
JP (1) JP2612450B2 (en)

Also Published As

Publication number Publication date
JPH01271887A (en) 1989-10-30

Similar Documents

Publication Publication Date Title
JP6557943B2 (en) Image collation device, image sensor, processing system, and image collation method
JP4725490B2 (en) Automatic tracking method
CN103218600A (en) Real-time face detection algorithm
JP2010205095A (en) Three-dimensional object recognition device, three-dimensional object recognition program, and computer readable recording medium having program recorded therein
WO2005096129A1 (en) Method and device for detecting directed position of image pickup device and program for detecting directed position of image pickup device
EP3291179B1 (en) Image processing device, image processing method, and image processing program
JP2612450B2 (en) Contour line extraction device
JP2009216480A (en) Three-dimensional position and attitude measuring method and system
JP2020161080A (en) Image processing device and program
JP6170696B2 (en) Image processing apparatus and image processing method
JPS63261481A (en) Pattern symmetry identification system in pattern recognizing device
JP2005293299A (en) Image processing method, system, and program
KR20100010011A (en) Method for detecting double touch of the image sensor touch screen
JP2017126254A (en) Information processor, information processing method, and program
JP2000180138A (en) Calibration plate and calibration system for visual sensor utilizing it
JPWO2016142965A1 (en) Video processing apparatus, video processing method, and recording medium for storing video processing program
JP2561954B2 (en) Graphic processing device
JP2018097563A (en) Image processing apparatus
JPH0991425A (en) Image processor
JPS62282379A (en) Graphic recognition device
JPS6284391A (en) Extraction system for narrow rectangle
JP2005173940A (en) Image processing method, image processor and computer program
JPS63238686A (en) Feature extracting system
JPH01214907A (en) Corner position recognizing device
JPS62217376A (en) Image processor