JPS6284391A - Long and thin rectangular extraction method - Google Patents
Long and thin rectangular extraction methodInfo
- Publication number
- JPS6284391A JPS6284391A JP22521385A JP22521385A JPS6284391A JP S6284391 A JPS6284391 A JP S6284391A JP 22521385 A JP22521385 A JP 22521385A JP 22521385 A JP22521385 A JP 22521385A JP S6284391 A JPS6284391 A JP S6284391A
- Authority
- JP
- Japan
- Prior art keywords
- line
- parallel
- unit
- straight line
- rectangle
- 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
Links
Landscapes
- Image Analysis (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
[概 要コ
画像処理装置において細長い矩形を抽出する方式であっ
て、各矩形の長い方の辺の線要素を抽出した後、平行線
内部領域を平行線に垂直な方向に投影゛し、その投影像
をもとにして短い方の辺の位置を検出するようにしたも
ので、これにより、細長い矩形が複数個存在する場合に
も正しく抽出することができる。[Detailed Description of the Invention] [Summary] This is a method for extracting elongated rectangles in an image processing device, in which after extracting line elements on the longer side of each rectangle, a parallel line internal region is extracted perpendicular to the parallel lines. This method detects the position of the shorter side based on the projected image.This allows accurate extraction even when a plurality of elongated rectangles exist.
[産業上の利用分野]
本発明は、画像処理装置における矩形抽出方式に係わり
、特に画像中に複数個の細長い矩形が存在するとき、そ
れらを総て抽出することのできる方式に関するものであ
る。[Industrial Field of Application] The present invention relates to a rectangle extraction method in an image processing device, and particularly to a method that can extract all of a plurality of elongated rectangles when they exist in an image.
[従来の技術]
画像中の細長い矩形を抽出する従来方式としては、矩形
の各辺を構成する線要素の候補を抽出した後、辺ごとに
直線を適合させることによって矩形の輪郭線を検出する
という方式がある。[Prior Art] A conventional method for extracting a long and thin rectangle in an image involves extracting candidate line elements that make up each side of the rectangle, and then detecting the outline of the rectangle by fitting straight lines to each side. There is a method called.
[発明が解決しようとする問題点]
上記の矩形抽出の従来方式では、矩形が細長いときには
、矩形の短い辺に相当する線要素が少ないために、辺の
抽出が容易でなく、さらに、長い方の辺においても、2
本の並行な辺のそれぞれの線要素が互いに接近している
ために、辺ごとに直線を適合させるのが容易でないとい
う問題点があった。[Problems to be Solved by the Invention] In the conventional rectangle extraction method described above, when the rectangle is long and thin, there are few line elements corresponding to the short sides of the rectangle, so it is difficult to extract the sides. Also on the side, 2
Since the line elements of the parallel sides of the book are close to each other, there is a problem in that it is not easy to fit straight lines for each side.
特に、画像中に複数個の矩形が存在する場合は、前記の
問題点はより深刻であった。In particular, when a plurality of rectangles exist in an image, the above problem becomes more serious.
本発明は、このような問題点を解消した新規な、細長い
矩形抽出方式を提供しようとするものである。The present invention aims to provide a novel elongated rectangle extraction method that solves these problems.
[問題点を解決するための手段]
第1図は本発明の細長い矩形抽出方式の原理ブロック図
を示す。[Means for Solving the Problems] FIG. 1 shows a block diagram of the principle of the elongated rectangle extraction method of the present invention.
第1図(a)は、本発明の細長い矩形抽出方式全体のブ
ロック図である。FIG. 1(a) is a block diagram of the entire elongated rectangle extraction method of the present invention.
第1図(a)において、1は入力画像中の各矩形の長い
方の線要素を抽出する線要素抽出部である。In FIG. 1(a), reference numeral 1 denotes a line element extraction unit that extracts the longer line element of each rectangle in the input image.
2は線要素抽出部1により抽出された線要素に対して、
それぞれの矩形ごとに幅の小さい平行線対を適合させる
平行線対検出部である。2 is for the line element extracted by the line element extraction unit 1,
This is a parallel line pair detection unit that matches a pair of parallel lines with a small width to each rectangle.
3は平行線対検出部2の検出した平行線対ごとに並行線
の内部領域を並行線に垂直の方向に投影する投影部であ
る。Reference numeral 3 denotes a projection unit that projects the internal region of the parallel lines in a direction perpendicular to the parallel lines for each pair of parallel lines detected by the parallel line pair detection unit 2.
4は投影部3により得られた投影像ごとに投影値の変化
の度合が大きい点を抽出する矩形端点検出部であり、こ
の矩形端点の検出により矩形が抽出される。Reference numeral 4 denotes a rectangular end point detection section that extracts points where the degree of change in projection value is large for each projection image obtained by the projection section 3, and a rectangle is extracted by detecting the rectangular end points.
線要素抽出部1は、第17山)に示すような構成によっ
て実現することができる。The line element extraction unit 1 can be realized by the configuration shown in the 17th mountain).
画像入力は、まず微分検出部11において各画素におけ
るX方向およびX方向の微分値を求め、微分の大きさと
微分の方向を検出する。To input an image, first, the differential value of each pixel in the X direction and in the X direction is obtained in the differential detection section 11, and the magnitude and direction of the differential are detected.
次いで、線要素候補検出部12において、微分の方向が
予め設定されている範囲内であり、且つ微分の大きさが
予め定められてる閾値以上である画素を、線要素候補と
して検出する。Next, the line element candidate detection unit 12 detects pixels whose differential direction is within a preset range and whose differential magnitude is greater than or equal to a preset threshold as line element candidates.
次に、非極大抑制部13において、検出された線要素候
補のうち、微分の方向に沿った直線上の定められた大き
さの近傍で、微分値が極大でないものを削除する。Next, the non-maximum suppression unit 13 deletes, among the detected line element candidates, those whose differential values are not maximal in the vicinity of a predetermined size on a straight line along the direction of differentiation.
これにより、濃度勾配の最大の画素のみ残して線要素と
して出力する。As a result, only the pixel with the maximum density gradient is left and output as a line element.
平行線対検出部2は、第1図(C)に示すような構成に
よって実現することができる。The parallel line pair detection section 2 can be realized by a configuration as shown in FIG. 1(C).
線要素抽出部1で抽出された線要素を構成する各画素に
ついて、Hough変換部21において、Hough変
換を施して直線パラメータのヒストグラムを作成する。A Hough transformation unit 21 performs Hough transformation on each pixel constituting the line element extracted by the line element extraction unit 1 to create a histogram of straight line parameters.
即ち、各画素についてその画素を通る可能な総ての直線
のパラメータを求め、そのパラメータに関するヒストグ
ラムを作成する。That is, for each pixel, the parameters of all possible straight lines passing through that pixel are determined, and a histogram regarding the parameters is created.
次いで、候補直線のパラメータ検出部22において、H
ough変換部21で作成された直線パラメータのヒス
トグラムについて、一定の大きさの近傍で度数が最大で
且つ予め定められた閾値以上である直線のパラメータを
求める。Next, in the candidate straight line parameter detection unit 22, H
Regarding the histogram of straight line parameters created by the ough conversion unit 21, a parameter of a straight line having the maximum frequency in the vicinity of a certain size and a predetermined threshold value or more is determined.
次に、平行線対のパラメータ検出部23において、候補
直線のパラメータ検出部22の検出したそれぞれの候補
直線に対して平行で且つヒストグラムにおける度数が近
傍で最大である直線のパラメータを検出する。Next, the parallel line pair parameter detection section 23 detects the parameters of a straight line that is parallel to each of the candidate straight lines detected by the candidate straight line parameter detection section 22 and that has the largest frequency in the histogram in the vicinity.
これにより細長い矩形の長い方の辺をなす平行線対のパ
ラメータができる。This creates the parameters of the pair of parallel lines that form the longer sides of the elongated rectangle.
[作用]
上記構成によって、画像中の各矩形の長い方の辺の線要
素を抽出した後、それぞれの矩形ごとに幅の小さい平行
線対を適合させ°、平行線対ごとに平行線の内部領域を
平行線に垂直な方向に投影し、その投影像をもとにして
矩形の短い方の辺の位置を検出するようにしたものであ
る。[Operation] With the above configuration, after extracting the line elements on the longer side of each rectangle in the image, a pair of parallel lines with a small width is fitted to each rectangle, and the interior of the parallel line is calculated for each pair of parallel lines. The area is projected in a direction perpendicular to parallel lines, and the position of the shorter side of the rectangle is detected based on the projected image.
また、平行線の検出にあたっては、まず矩形ごとに最も
確からしい直線を1本検出した後、その直線の近辺でそ
れに平行なもう1本の直線を検出するようにしたもので
ある。Further, in detecting parallel lines, first the most probable straight line is detected for each rectangle, and then another straight line parallel to that straight line is detected in the vicinity of that straight line.
これにより、画像中にある複数個の細長い矩形を総て正
しく抽出することができる。This makes it possible to correctly extract all of the plurality of elongated rectangles in the image.
[実施例]
以下第2図および第3図に示す実施例により、本発明を
さらに具体的に説明する。[Example] The present invention will be described in more detail below with reference to Examples shown in FIGS. 2 and 3.
第2図は本発明の実施例のブロック図である。FIG. 2 is a block diagram of an embodiment of the invention.
第2図に従って、本実施例の動作を説明する。The operation of this embodiment will be explained according to FIG.
(1)画像メモリ6は、入力画像データを保持する。(1) Image memory 6 holds input image data.
入力画像データは、512X512X8ビツトのディジ
タル画像データである。The input image data is 512x512x8 bit digital image data.
(2)x方向微分部111およびy方向微分部112は
、それぞれ第3図(a)および(b)に示す3×3の空
間フィルタを画像に走査する。この走査により、それぞ
れ第3図(C)および(d)に示すような微分値が得ら
れる。(2) The x-direction differentiator 111 and the y-direction differentiator 112 scan the image with a 3×3 spatial filter shown in FIGS. 3(a) and 3(b), respectively. Through this scanning, differential values as shown in FIGS. 3(C) and 3(d) are obtained, respectively.
(3)微分の大きさ検出部113は、X方向微分部11
1およびy方向微分部112により求めたX方向の微分
値とX方向の微分値の二乗和の平方根を算出する。微分
方向検出部114はX方向の微分値とX方向の微分値が
作るベクトルの方向を算出する。方向設定部115は細
長い矩形の長い方の辺の方向のおよその値を設定してお
く。(3) The differential magnitude detection unit 113 is the X-direction differentiator 11
1 and the square root of the sum of squares of the X-direction differential value and the X-direction differential value obtained by the y-direction differentiator 112. The differential direction detection unit 114 calculates the direction of the vector created by the differential value in the X direction and the differential value in the X direction. The direction setting unit 115 sets an approximate value of the direction of the longer side of the elongated rectangle.
(4)線要素候補検出部12は、微分方向検出部114
の検出した微分の方向が、方向設定部115で設定され
ている方向とほぼ垂直であり、且つ微分の大きさ検出部
113の算出した微分の大きさが予め定められた閾値以
上である画素を検出する。(4) The line element candidate detection unit 12 uses the differential direction detection unit 114
The direction of the detected differential is almost perpendicular to the direction set by the direction setting section 115, and the magnitude of the differential calculated by the differential magnitude detection section 113 is greater than or equal to a predetermined threshold. To detect.
(5)非極大抑制部13は、線要素候補のうち、微分の
方向に沿った直線上において、その画素を中心とする一
定の大きさの近傍で微分値が最大でない画素を削除する
。(5) Among the line element candidates, the non-maximum suppression unit 13 deletes a pixel whose differential value is not the maximum in the vicinity of a certain size centered on the pixel on a straight line along the direction of differentiation.
(6)Hough変換部21は、非極大抑制部I3にお
いて残存している線要素候補の各画素に対し、その画素
を通る可能な総ての直線パラメータ:A、B (Ax
+By=1)を求め、そのパラメータに関するヒストグ
ラムを作成する。(6) For each pixel of the remaining line element candidates in the non-maximum suppression unit I3, the Hough conversion unit 21 converts all possible straight line parameters passing through that pixel: A, B (Ax
+By=1) and create a histogram regarding that parameter.
(7)候補直線のパラメータ検出部22は、)loug
h変換部21の作成した直線パラメータのヒストグラム
において、ヒストグラムの度数が予め設定されている閾
値以上であって、且つそのパラメータを中心とする予め
定められた大きさの近傍で度数が最大となっている直線
のパラメータを検出する。この処理によって、矩形ごと
に最も確からしい直線が1本ずつ検出される。(7) The candidate straight line parameter detection unit 22 calculates
In the histogram of straight line parameters created by the h-conversion unit 21, the frequency of the histogram is greater than or equal to a preset threshold, and the frequency is maximum in the vicinity of a predetermined size centered on the parameter. Detect the parameters of the straight line. Through this process, the most probable straight line is detected one by one for each rectangle.
(8)平行線対のパラメータ検出部23は、候補直線の
パラメータ検出部22の検出したそれぞれの候補直線に
対して、それに平行で且つヒストグラムの度数が、予め
定められた大きさの近傍で最大となる直線のパラメータ
を検出する。(8) Parallel line pair parameter detection unit 23 detects a line that is parallel to each candidate straight line detected by candidate straight line parameter detection unit 22 and whose histogram frequency is maximum near a predetermined size. Detect the parameters of the straight line.
(9)投影部3は、平行線対のパラメータ検出部23で
検出したそれぞれの平行線対について、画像メモリ6か
らのデータによって、その内部領域を平行線に垂直な方
向に投影する。(9) For each parallel line pair detected by the parallel line pair parameter detection unit 23, the projection unit 3 projects the internal region thereof in a direction perpendicular to the parallel line based on the data from the image memory 6.
(10)矩形端点検出部4は、投影部3で投影した投影
像ごとに投影値の変化の度合が大きい点を抽出すること
によって矩形の短い方の辺の位置を検出する。(10) The rectangle end point detection unit 4 detects the position of the shorter side of the rectangle by extracting a point where the degree of change in projection value is large for each projection image projected by the projection unit 3.
(11)矩形のパラメータ検出部5は、平行線対のパラ
メータ検出部23で検出した平行線対のパラメータと、
矩形端点検出部4で検出した矩形の短い方の辺、の位置
からそれぞれの矩形のパラメータを検出する。(11) The rectangular parameter detection unit 5 detects the parameters of the parallel line pair detected by the parallel line pair parameter detection unit 23,
The parameters of each rectangle are detected from the position of the shorter side of the rectangle detected by the rectangle end point detection unit 4.
[発明の効果]
以上説明のように本発明によれば、細長い矩形が複数個
存在する場合でも、それらの矩形を正しく抽出すること
ができ、画像処理における効果はきわめて大きい。[Effects of the Invention] As described above, according to the present invention, even when a plurality of elongated rectangles exist, these rectangles can be correctly extracted, and the effect in image processing is extremely large.
第1図は本発明の原理ブロック図、
第2図は本発明の実施例のブロック図、第3図は微分処
理の説明図である。
図面において、
1は線要素抽出部、 2は平行線対検出部、3は投
影部、 4は矩形端点検出部、5は矩形の
パラメータ検出部、 6は画像メモリ、11は微分検
出部、 12は線要素候補検出部、13は非極大
抑制部、 21はHough変換部、22は候補直
線のパラメータ検出部、
23は平行線対のパラメータ検出部、
をそれぞれ示す。
典ヂ余人力
;〕コl〕2に矩jチブ〉
搗BM ”)’f 1”ブ’o−,,7[nギプテ二
1 〔モ3)
不 2 口
(C)
斂分刈理の
千 3
Cb)
戊期(2)
図FIG. 1 is a block diagram of the principle of the present invention, FIG. 2 is a block diagram of an embodiment of the present invention, and FIG. 3 is an explanatory diagram of differential processing. In the drawings, 1 is a line element extraction section, 2 is a parallel line pair detection section, 3 is a projection section, 4 is a rectangular end point detection section, 5 is a rectangular parameter detection section, 6 is an image memory, 11 is a differential detection section, 12 13 is a line element candidate detection unit, 13 is a non-maximum suppression unit, 21 is a Hough transformation unit, 22 is a candidate straight line parameter detection unit, and 23 is a parallel line pair parameter detection unit, respectively. Extra human power;〕kol〕2にsquare〉jchibu〉搗BM ”)'f 1”bu'o-,,7 1,000 3 Cb) Ekiji (2) Figure
Claims (3)
素を抽出する線要素抽出部(1)と、 該線要素抽出部(1)により抽出された線要素に対して
、それぞれの矩形ごとに幅の小さい平行線対を適合させ
る平行線対検出部(2)と、 該平行線対ごとに平行線の内部領域を平行線に垂直の方
向に投影する投影部(3)と、 該投影部(3)により得られた投影像ごとに投影値の変
化の度合が大きい点を抽出する矩形端点検出部(4)と
を備えるよう構成したことを特徴とする細長い矩形抽出
方式。(1) A line element extraction unit (1) that extracts line elements on the longer side of each rectangle in the input image; a parallel line pair detection unit (2) that fits a pair of parallel lines with a small width for each rectangle; a projection unit (3) that projects an internal region of the parallel line in a direction perpendicular to the parallel line for each pair of parallel lines; An elongated rectangle extraction method comprising: a rectangle end point detection section (4) for extracting points with a large degree of change in projection value for each projection image obtained by the projection section (3).
画素に対してHough変換を施し、直線パラメータの
ヒストグラムを作成するHough変換部(21)と、 該Hough変換部(21)により作成した直線パラメ
ータのヒストグラムにおいて、予め定められた大きさの
近傍で度数が最大で、且つその度数が予め定められた閾
値以上である直線のパラメータを求める候補直線のパラ
メータ検出部(22)と、該候補直線のパラメータ検出
部(22)の検出したそれぞれの候補直線に対して平行
で且つヒストグラムにおける度数が、予め定められた大
きさの近傍で最大である直線のパラメータを検出する平
行線対のパラメータ検出部(23)とを備えるよう構成
したことを特徴とする特許請求の範囲第1項記載の細長
い矩形抽出方式。(2) The parallel line pair detection unit (2) includes a Hough transformation unit (21) that performs Hough transformation on pixels constituting a line element and creates a histogram of straight line parameters; a candidate straight line parameter detection unit (22) for determining the parameters of a straight line that has a maximum frequency in the vicinity of a predetermined size and whose frequency is greater than or equal to a predetermined threshold value in the histogram of straight line parameters created by , parallel line pairs for detecting parameters of straight lines that are parallel to each candidate straight line detected by the candidate straight line parameter detection unit (22) and whose frequency in the histogram is maximum near a predetermined size. The elongated rectangle extraction method according to claim 1, characterized in that the elongated rectangle extraction method is configured to include a parameter detection section (23).
の大きさと微分の方向を検出する微分検出部(11)と
、 該微分の方向が予め設定されている範囲内であり、且つ
微分の大きさが予め定められている閾値以上である画素
を検出する線要素候補検出部(12)と、 該線要素候補検出部(12)で検出した線要素候補のう
ち、微分の方向に沿った直線上の一定の大きさの近傍で
微分値が極大でないものを除外する非極大制御部(13
)とを備えるよう構成したことを特徴とする特許請求の
範囲第1項記載の細長い矩形抽出方式。(3) The line element detecting unit (1) includes a differential detecting unit (11) that detects the magnitude and direction of the differential in each pixel, and the direction of the differential is within a preset range, and A line element candidate detection unit (12) detects pixels for which the magnitude of the differential is equal to or greater than a predetermined threshold; A non-maximum control unit (13
) The elongated rectangle extraction method according to claim 1, characterized in that it is configured to include the following.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP22521385A JPS6284391A (en) | 1985-10-09 | 1985-10-09 | Long and thin rectangular extraction method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP22521385A JPS6284391A (en) | 1985-10-09 | 1985-10-09 | Long and thin rectangular extraction method |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS6284391A true JPS6284391A (en) | 1987-04-17 |
Family
ID=16825756
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP22521385A Pending JPS6284391A (en) | 1985-10-09 | 1985-10-09 | Long and thin rectangular extraction method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6284391A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0742821U (en) * | 1993-12-31 | 1995-08-11 | 英夫 土井 | Deodorizing device for flush toilet |
JP2015181042A (en) * | 2010-12-20 | 2015-10-15 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | detection and tracking of moving objects |
US10270921B2 (en) | 2015-11-30 | 2019-04-23 | Brother Kogyo Kabushiki Kaisha | Image analyzing apparatus determining representation form of code image using distances of code elements |
-
1985
- 1985-10-09 JP JP22521385A patent/JPS6284391A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0742821U (en) * | 1993-12-31 | 1995-08-11 | 英夫 土井 | Deodorizing device for flush toilet |
JP2015181042A (en) * | 2010-12-20 | 2015-10-15 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | detection and tracking of moving objects |
US10270921B2 (en) | 2015-11-30 | 2019-04-23 | Brother Kogyo Kabushiki Kaisha | Image analyzing apparatus determining representation form of code image using distances of code elements |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110569699B (en) | Method and device for target sampling of pictures | |
JP2940936B2 (en) | Tablespace identification method | |
EP2833288B1 (en) | Face calibration method and system, and computer storage medium | |
CN110781877B (en) | Image recognition method, device and storage medium | |
CN109993086B (en) | Face detection method, device, system and terminal equipment | |
EP3550467B1 (en) | Image matching method, device and system, and storage medium | |
CN106097254A (en) | A kind of scanning document image method for correcting error | |
JPH0877334A (en) | Automatic feature extraction method for face images | |
EP3958208A1 (en) | Image processing device, image processing method, and image processing program | |
JP5971108B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JPH04198741A (en) | Shape defect detection device | |
JPH0418351B2 (en) | ||
JPS6284391A (en) | Long and thin rectangular extraction method | |
JPS60189084A (en) | Character area extracting circuit | |
CN112215784B (en) | Image decontamination method, image decontamination device, readable storage medium and computer equipment | |
JP3936039B2 (en) | Screened area extraction device | |
JPS63101983A (en) | String extraction method | |
JPH03160582A (en) | Method for separating ruled line and character in document picture data | |
JP2001109826A (en) | Form processing apparatus, form processing method, and computer-readable storage medium | |
JPH02294791A (en) | Character pattern segmenting device | |
JPH0462107B2 (en) | ||
CN114360016A (en) | A method, device, equipment and medium for determining eigenvalues | |
JP2004240500A (en) | Image processing apparatus, image processing program, and storage medium | |
JP2931041B2 (en) | Character recognition method in table | |
JPH02128292A (en) | Optical character reader |