JP2018088206A - Circle detection method, circle detection device, program and storage medium - Google Patents

Circle detection method, circle detection device, program and storage medium Download PDF

Info

Publication number
JP2018088206A
JP2018088206A JP2016231975A JP2016231975A JP2018088206A JP 2018088206 A JP2018088206 A JP 2018088206A JP 2016231975 A JP2016231975 A JP 2016231975A JP 2016231975 A JP2016231975 A JP 2016231975A JP 2018088206 A JP2018088206 A JP 2018088206A
Authority
JP
Japan
Prior art keywords
circle
contour
area
pixel
detected
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
JP2016231975A
Other languages
Japanese (ja)
Other versions
JP6343648B2 (en
Inventor
賢治 伊藤
Kenji Ito
賢治 伊藤
嶺 藤村
Mine Fujimura
嶺 藤村
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.)
INOTECH KK
Inotech Co Ltd
Original Assignee
INOTECH KK
Inotech Co 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 INOTECH KK, Inotech Co Ltd filed Critical INOTECH KK
Priority to JP2016231975A priority Critical patent/JP6343648B2/en
Publication of JP2018088206A publication Critical patent/JP2018088206A/en
Application granted granted Critical
Publication of JP6343648B2 publication Critical patent/JP6343648B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a circle detection method, a device, a program thereof and a storage medium capable of detecting a circle in a short time.SOLUTION: A circle detection method 1 comprises a binarization step generating a binarization image in a detection target area and a detection target outside area, a labeling step labeling each binarized detection target area, a contour extraction step extracting a contour of a figure for each binarized detection target area, and a circle area securing step in which for each detection of a contour pixel forming a contour by scanning in extracted contour data, the contour pixel is regarded as a point located on a circumference of a circle, a pixel position in a predetermined direction detecting a presence of a circle and separated by a length corresponding to a radius of a predetermined circle desired to be detected is regarded as a center of the circle desired to be detected, if a plurality of coordinates in predetermined positions suitable for checking whether they are the same label within a range surrounded by the radius are all the same label, determining as a circle, and if a center of the circle desired to be detected is not present within the already secured circle area, securing as an area of a new circle.SELECTED DRAWING: Figure 1

Description

本発明は、画像処理技術のうちの画像中の円検出方法、円検出装置、円検出プログラム及び円検出プログラムを記憶した記憶媒体に関する。   The present invention relates to a circle detection method, a circle detection device, a circle detection program, and a storage medium storing a circle detection program in an image among image processing techniques.

特許文献1には、画像データで表示される、他の円と大きさが異なる円を含む複数の円に対して、各円の中心位置を検出する画像処理方法であって、複数の円のうち最も大きな円である大円を含む領域を特定する大円領域特定ステップと、大円領域内のエッジ画素を検出し、検出したエッジ画素を大円の円周を構成する大円周候補画素として検出する大円周候補画素検出ステップと、検出された大円周候補画素に対して多段階の円近似を行い、大円の中心位置および半径を検出する大円検出ステップと、検出された中心位置および半径に基づき大円エッジを含まないよう大円内でラベリングし、1つの小円を含む領域を1または複数特定する小円領域特定ステップと、小円領域内のエッジ画素を検出し、検出したエッジ画素を小円の円周を構成する小円周候補点画素として検出する小円周候補画素検出ステップと、検出された小円周候補画素に対して多段階の円近似を行い、小円の中心位置および半径を出する小円検出ステップとを有する画像処理方法が開示されている。   Patent Document 1 discloses an image processing method for detecting a center position of each circle with respect to a plurality of circles including a circle having a size different from that of other circles displayed as image data. A great circle region identifying step for identifying a region including the largest circle, which is the largest circle, and an edge pixel in the great circle region, and a large circle candidate pixel that constitutes the circumference of the great circle by detecting the edge pixel in the great circle region A large circle candidate pixel detecting step for detecting the large circle candidate pixel, a large circle detecting step for detecting the center position and radius of the great circle by performing multi-stage circle approximation on the detected large circle candidate pixel, and Labeling within the great circle so as not to include the great circle edge based on the center position and radius, a small circle region identifying step for identifying one or more regions including one small circle, and detecting edge pixels in the small circle region The detected edge pixel is composed of a small circle. A small circle candidate pixel detecting step for detecting as a small circle candidate point pixel to be detected, and a small circle for performing a multi-stage circle approximation on the detected small circle candidate pixel to obtain a center position and a radius of the small circle An image processing method having a detection step is disclosed.

特許文献2には、画像撮影手段によって撮影された計器の画像を処理して前記計器を分類する画像処理方法であって、前記計器の画像を入力する画像入力ステップと、前記入力された計器の画像からエッジを抽出し、エッジが抽出された画像に対して2値化処理を行い、2値化処理された画像に対して細線化処理を行って、前記計器の表示盤の輪郭線を抽出する輪郭線抽出ステップと、前記抽出された輪郭線に基づいて、ハフ変換を用いて、円形状の仮想輪郭線を作成する仮想輪郭線作成ステップと、前記輪郭線抽出ステップによって抽出された輪郭線の画像を膨張処理し、膨張処理後の前記輪郭線の画像と、前記仮想輪郭線作成ステップによって作成された仮想輪郭線の画像との一致度が、予め定めた閾値より大きい場合に、前記計器を丸型計器に分類する計器分類ステップとを有し、前記輪郭線抽出ステップは、前記計器分類ステップによって前記計器が丸型計器に分類されない場合に、前記画像入力ステップにおいて入力された計器の画像に対して、前記計器の表示盤領域の外部の画像を黒画素に変更する背景除去処理を行い、背景除去処理後の前記表示盤領域の画像に対して平滑化処理、2値化処理を順次行い、2値化処理された画像中の図形画素の各連結成分の中で面積が最大な領域を最大領域として選択し、前記選択された最大領域の輪郭線を、前記計器の表示盤の輪郭線として抽出し、前記仮想輪郭線作成ステップは、前記輪郭線抽出ステップによって抽出された輪郭線の画像を膨張処理し、膨張処理された前記輪郭線の画像から、前記表示盤の形状である四角形の輪郭線を仮想輪郭線として抽出し、前記計器分類ステップは、前記膨張処理後の前記輪郭線の画像と、前記仮想輪郭線作成ステップによって作成された、前記表示盤の形状である四角形の輪郭線の画像との一致度が、予め定めた閾値より大きい場合に、前記計器を角型計器に分類する画像処理方法が開示されている。   Patent Document 2 discloses an image processing method for classifying an instrument by processing an image of an instrument photographed by an image photographing means, an image input step for inputting an image of the instrument, and an input of the input instrument Edges are extracted from the image, binarization processing is performed on the image from which the edges have been extracted, thinning processing is performed on the binarized image, and the contour line of the display panel of the instrument is extracted A contour extracting step, a virtual contour creating step for creating a circular virtual contour using Hough transform based on the extracted contour, and a contour extracted by the contour extracting step When the degree of coincidence between the image of the contour line after the expansion processing and the image of the virtual contour line created by the virtual contour line creating step is larger than a predetermined threshold value, the instrument The circle An instrument classification step for classifying into an instrument, wherein the contour extraction step is performed on the instrument image input in the image input step when the instrument classification step does not classify the instrument as a round instrument. A background removal process for changing an image outside the display panel area of the instrument to a black pixel is performed, and a smoothing process and a binarization process are sequentially performed on the image of the display panel area after the background removal process. The region having the largest area is selected as the largest region among the connected components of the graphic pixels in the image subjected to the value processing, and the contour line of the selected largest region is extracted as the contour line of the display panel of the instrument. The virtual contour line creating step expands the contour line image extracted by the contour line extracting step, and from the contour line image subjected to the expansion processing, a quadrangular shape that is the shape of the display board A contour line is extracted as a virtual contour line, and the instrument classification step includes an image of the contour line after the expansion process and a quadrangular contour line created by the virtual contour line creation step and having a shape of the display panel An image processing method for classifying the instrument into a square instrument when the degree of coincidence with the image is greater than a predetermined threshold is disclosed.

特許文献3には、車両に搭載される撮像装置で前記車両の前方を撮像した撮像画像から円を検出する円検出部を備える画像認識装置であって、前記撮像画像のうち、前記円検出部で検出した円に内接する内接四角形の内部領域、および前記内接四角形と前記円検出部で検出した円に外接する外接四角形との間の所定領域のうちの少なくともいずれかの領域である比率判断領域の色の比率をもとに、円形標識を認識する標識認識手段を備える画像認識装置が開示されている。   Patent Document 3 discloses an image recognition device including a circle detection unit that detects a circle from a captured image obtained by capturing an image of the front of the vehicle with an imaging device mounted on a vehicle, and includes the circle detection unit among the captured images. A ratio that is at least one of an inner area of an inscribed rectangle inscribed in the circle detected in step 1 and a predetermined area between the inscribed rectangle and the circumscribed rectangle inscribed on the circle detected by the circle detection unit An image recognizing device including a sign recognizing unit for recognizing a circular sign based on a color ratio of a determination area is disclosed.

特開2004−220370号公報JP 2004-220370 A 特許第3799407号公報Japanese Patent No. 3799407 特許第5370375号公報Japanese Patent No. 5370375

特許文献1に記載の発明は、大円の中心位置および半径を検出するときに大円周候補画素に対して多段階の円近似を行い、さらに小円の中心位置および半径を検出するときに小円周候補画素に対して多段階の円近似を行い、円の中心位置及び半径を検出する技術であり、画面中から短時間で早く円を検出する技術ではないため、画面中に多数の円が存する場合には円検出後にさらに円の中心位置と半径を求めることにより画像中の円検出の処理時間が長くなるという問題があった。   In the invention described in Patent Document 1, when detecting the center position and radius of the great circle, multi-stage circle approximation is performed on the large circle candidate pixels, and when the center position and radius of the small circle are further detected. It is a technology that performs multi-stage circle approximation on small circle candidate pixels and detects the center position and radius of the circle, and is not a technology that detects a circle quickly in the screen, so there are many In the case where a circle exists, there is a problem that the processing time for detecting a circle in an image becomes longer by further obtaining the center position and radius of the circle after the circle is detected.

特許文献2に記載の発明は、細線化処理、膨張化処理、ハフ変換を用いるために、画像中の円を検索する処理時間を多大に要するという問題があった。   The invention described in Patent Document 2 has a problem that it takes a lot of processing time to search for a circle in an image because it uses thinning processing, expansion processing, and Hough transform.

特許文献3の発明は、引用文献3の段落[0028]や[0029]に記載されているように円検出にハフ変換を用いるために、画像中の円を検索する処理時間を多大に要するという問題があった。   As described in paragraphs [0028] and [0029] of cited document 3, the invention of Patent Document 3 uses a Hough transform for circle detection, and therefore requires a long processing time for searching for a circle in an image. There was a problem.

本発明はこうした問題に鑑み創案されたもので、一般的に円検出に用いられているハフ変換を用いずに、極めて短時間で円検出可能な円検出方法、円検出装置、そのプログラム及び記憶媒体を提供することを課題とする。   The present invention has been devised in view of these problems, and a circle detection method, a circle detection device, a program thereof, and a memory capable of detecting a circle in an extremely short time without using the Hough transform generally used for circle detection It is an object to provide a medium.

請求項1に記載の円検出方法1は、画像データに基づいて画像3内の円を検出する円検出方法1であって、前記画像3に対して、検出対象領域4と検出対象外領域5の2値化画像を生成する2値化工程11と、前記2値化した前記検出対象領域4ごとにラベル付けを行うラベリング工程12と、前記2値化した前記検出対象領域4ごとに前記図形の輪郭9を抽出する輪郭抽出工程13と、前記抽出した輪郭データにおいて、前記輪郭データのy軸の1画素ごとにx軸方向7の一方から又はx軸の1画素ごとにy軸方向8の一方から走査して輪郭9を形成する輪郭画素6を検出するごとに、前記輪郭画素6を円の円周部分に位置する点として、円の存在を検出する所定の方向でかつ検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心とし、前記半径で囲まれた範囲内の同一ラベルか否かを確認するに適する所定の位置40の複数の座標がすべて同一のラベルである場合に円として判定し、前記検出したい円の中心41が既に確保された円の領域内に存しない場合に新たな円の領域として確保する円領域確保工程14と、を備えることを特徴とする。   A circle detection method 1 according to claim 1 is a circle detection method 1 for detecting a circle in an image 3 based on image data, and a detection target region 4 and a non-detection target region 5 with respect to the image 3. A binarization step 11 for generating the binarized image, a labeling step 12 for labeling each binarized detection target region 4, and the figure for each binarized detection target region 4 In the contour extraction step 13 for extracting the contour 9, and in the extracted contour data, the y-axis direction 8 is detected from one of the x-axis directions 7 for each pixel of the y-axis of the contour data or for each pixel of the x-axis. Each time a contour pixel 6 that scans from one side to form a contour 9 is detected, the contour pixel 6 is positioned at a circumferential portion of the circle, and is detected in a predetermined direction for detecting the presence of a circle and a predetermined target to be detected. The pixel position separated by the length of the radius of the circle is It is determined as a circle when a plurality of coordinates at a predetermined position 40, which are suitable for confirming whether or not they are the same label within the range surrounded by the radius, are the same label as the center of the circle to be extracted, and the detection And a circle area securing step 14 for securing a new circle area when the center 41 of the desired circle does not exist within the already secured circle area.

請求項2に記載の円検出方法1は、請求項1において、複数の大きさの円を検出する場合には、前記複数の円のうちで半径の大きさを最大値から順次縮小させて最小値まで前記円領域確保工程14を繰り返して行わせ、順次縮小された円を判定し順次縮小された円の領域を確保していくことを特徴とする。   In the circle detection method 1 according to claim 2, in the case of detecting a plurality of size circles according to claim 1, the size of the radius is sequentially reduced from the maximum value among the plurality of circles to minimize the circle. The circle area securing step 14 is repeatedly performed up to a value, and the sequentially reduced circles are determined, and the sequentially reduced circle areas are secured.

請求項3に記載の円検出装置2は、画像データに基づいて画像3内の円を検出する円検出装置2であって、前記画像3に対して、検出対象領域4と検出対象外領域5の2値化画像を生成する2値化手段と、前記2値化した前記検出対象領域4ごとにラベル付けを行うラベリング手段と、前記2値化した前記検出対象領域4ごとに前記図形の輪郭9を抽出する輪郭抽出手段と、前記抽出した輪郭データにおいて、前記輪郭データのy軸の1画素ごとにx軸方向7の一方から又はx軸の1画素ごとにy軸方向8の一方から走査して輪郭9を形成する輪郭画素6を検出するごとに、前記輪郭画素6を円の円周部分に位置する点として、円の存在を検出する所定の方向でかつ検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心とし、前記半径で囲まれた範囲内の同一ラベルか否かを確認するに適する所定の位置40の複数の座標がすべて同一のラベルである場合に円として判定し、前記検出したい円の中心41が既に確保された円の領域内に存しない場合に新たな円の領域として確保する円領域確保手段と、を備えることを特徴とする。   The circle detection device 2 according to claim 3 is a circle detection device 2 that detects a circle in the image 3 based on image data, and the detection target region 4 and the non-detection target region 5 with respect to the image 3. A binarizing unit that generates a binarized image, a labeling unit that performs labeling for each of the binarized detection target regions 4, and an outline of the figure for each of the binarized detection target regions 4 In the extracted contour data, scanning is performed from one of the x-axis directions 7 for each pixel of the y-axis or one of the y-axis directions 8 for each pixel of the x-axis in the extracted contour data. Each time the contour pixel 6 forming the contour 9 is detected, the contour pixel 6 is positioned at the circumferential portion of the circle, and the radius of the predetermined circle to be detected in a predetermined direction for detecting the presence of the circle is detected. The circle where the pixel position separated by the length of The center of the circle to be detected is determined as a circle when a plurality of coordinates at a predetermined position 40 suitable for checking whether or not the same label is within the range surrounded by the radius are the same label. And a circle area securing means for securing 41 as a new circle area when 41 does not exist within the already secured circle area.

請求項4に記載の円検出装置2は、請求項3において、複数の大きさの円を検出する場合には、前記複数の円のうちで半径の大きさを最大値から順次縮小させて最小値まで前記円領域確保手段を繰り返して行わせ、順次縮小された円を判定し順次縮小された円の領域を確保していくことを特徴とする。   When detecting a plurality of size circles, the circle detection device 2 according to claim 4 is the minimum of the plurality of circles by sequentially reducing the size of the radius from the maximum value. The circle area securing means is repeatedly performed up to a value, a circle that is sequentially reduced is determined, and an area of the circle that is sequentially reduced is secured.

請求項5に記載のプログラムは、請求項1又は2に記載の円検出方法1をコンピュータに実行させるためのプログラムである。   The program according to claim 5 is a program for causing a computer to execute the circle detection method 1 according to claim 1 or 2.

請求項6に記載の記憶媒体は、請求項5に記載のプログラムを記憶したコンピュータに読み取り可能な記憶媒体である。   A storage medium according to a sixth aspect is a computer-readable storage medium storing the program according to the fifth aspect.

本発明は画像3中からの円検出処理時間を著しく短縮できるという効果を奏する。画面3中から円検出を完了するまでの検索数をハフ変換の場合と本発明の場合とで比較すると、ハフ変換による円検出は、エッジ検出した後にその画素位置で行う、該画素位置を円の中心として所定の半径rを有する円(画素数2πr)を円周上のすべての画素(画素数2πr)ごとに描いて円であるか否かの検索するために、その検索数は(2πr)となるのに対して、本発明の場合は、エッジ検出した後にその画素位置で行う、該画素位置を円の円周上の1位置として所定の方向において所定の半径rの範囲内に所定数の画素位置を検索するだけなので、検索数は(所定の方向数×所定の検索位置数)であるので大きく検索数を大幅に減少させることができ、円検出処理速度を高め、円検出処理時間を大幅に短縮できるという効果を奏する。 The present invention has an effect that the processing time for detecting a circle from the image 3 can be remarkably shortened. Comparing the number of searches from the screen 3 until the circle detection is completed between the case of the Hough transform and the case of the present invention, the circle detection by the Hough transform is performed at the pixel position after detecting the edge. In order to search for a circle by drawing a circle having a predetermined radius r as the center (pixel number 2πr) for every pixel on the circumference (pixel number 2πr), the search number is (2πr). 2 ) In contrast, in the case of the present invention, the detection is performed at the pixel position after edge detection, and the pixel position is set to one position on the circumference of the circle within a predetermined radius r in a predetermined direction. Since only a predetermined number of pixel positions are searched, the number of searches is (predetermined number of directions × predetermined number of search positions), so the number of searches can be greatly reduced, the circle detection processing speed is increased, and circle detection is performed. Has the effect of significantly reducing processing time .

また、本発明は、重なった円が存する場合の円検出を行う場合には、求めたい円の大きさいの中で最も大きい円から順次小さい円を検出することにより、検出したい大きさの円を重なっていてもすべて検出できるという効果を奏する。   Further, in the present invention, when performing circle detection when overlapping circles exist, the circle having the size desired to be detected is detected by sequentially detecting the smallest circle from the largest circle among the size of the circle to be obtained. Even if it overlaps, there exists an effect that all can be detected.

本発明の円検出方法のフロー図である。It is a flowchart of the circle detection method of this invention. 本発明の円検出装置の構成を示すブロック図である。It is a block diagram which shows the structure of the circle | round | yen detection apparatus of this invention. 画像内の検出対象領域と検出対象外領域を説明する説明図である。It is explanatory drawing explaining the detection object area | region in an image, and a non-detection object area | region. 画像内に存在する円を示す画像図である。It is an image figure which shows the circle | round | yen which exists in an image. 2値化工程で画像の2値化を示す2値化図である。It is a binarization figure which shows the binarization of an image in a binarization process. ラベリング工程で2値化後の検出対象領域のラベルデータ説明図である。It is label data explanatory drawing of the detection object area | region after binarization by a labeling process. 輪郭抽出工程で2値化後の検出対象領域の輪郭を抽出した輪郭データ説明図である。It is outline data explanatory drawing which extracted the outline of the detection target area | region after binarization by the outline extraction process. 3つの円の検出をするときの輪郭データ、ラベルデータ、領域確保データの説明図である。It is explanatory drawing of outline data, label data, and area ensuring data when detecting three circles. 円領域確保工程で大円の検出の説明図である。It is explanatory drawing of the detection of a great circle in a circle area ensuring process. 大円抽出後の輪郭データ、ラベルデータ、領域確保データの説明図である。It is explanatory drawing of the outline data after extracting a great circle, label data, and area | region securing data. 大円確保後の小円の検出の説明図である。It is explanatory drawing of the detection of the small circle after securing a great circle. 大円検出後に小円を検出した後の輪郭データ、ラベルデータ、領域確保データの説明図である。It is explanatory drawing of the outline data after detecting a small circle after a great circle detection, label data, and area | region securing data. 3つの円の検出後の輪郭データ、ラベルデータ、領域確保データの説明図である。It is explanatory drawing of the outline data after detecting three circles, label data, and area | region securing data. 1つの円の検出をするときの輪郭データ、ラベルデータ、領域確保データの説明図である。It is explanatory drawing of the outline data, label data, and area ensuring data when detecting one circle. 1つの円を対象に輪郭画素検索の走査を説明する説明図である。It is explanatory drawing explaining the scanning of a contour pixel search for one circle. 1つの円の輪郭画素を基に円検出を行う円領域確保工程の説明図で、(a)が検索方向の説明図であり、(b)が検索領域範囲の説明図である。It is explanatory drawing of the circular area ensuring process of performing circle detection based on the outline pixel of one circle, (a) is explanatory drawing of a search direction, (b) is explanatory drawing of a search area range. 1つの円の輪郭画素を基に上方向の範囲の円検出の説明図である。It is explanatory drawing of the circle detection of the range of an upper direction based on the outline pixel of one circle. 1つの円の輪郭画素を基に右方向の範囲の円検出の説明図である。It is explanatory drawing of the circle detection of the range of the right direction based on the outline pixel of one circle. 1つの円の輪郭画素を基に下方向の範囲の円検出の説明図である。It is explanatory drawing of the circle detection of the range of a downward direction based on the outline pixel of one circle. 1つの円を検出した後の輪郭データ、ラベルデータ、領域確保データの説明図である。It is explanatory drawing of the outline data, label data, and area | region ensuring data after detecting one circle.

本発明の円検出方法1は、図1に示すように、画像データに基づいて画像3内の円を検出する円検出方法1であって、前記画像3に対して、検出対象領域4と検出対象外領域5の2値化画像を生成する2値化工程11と、前記2値化した前記検出対象領域4ごとにラベル付けを行うラベリング工程12と、前記2値化した前記検出対象領域4ごとに前記図形の輪郭9を抽出する輪郭抽出工程13と、前記抽出した輪郭データにおいて、前記輪郭データのy軸の1画素ごとにx軸方向7の一方から又はx軸の1画素ごとにy軸方向8の一方から走査して輪郭9を形成する輪郭画素6を検出するごとに、前記輪郭画素6を円の円周部分に位置する点として、円の存在を検出する所定の方向でかつ検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心とし、前記半径で囲まれた範囲内の同一ラベルか否かを確認するに適する所定の位置40の複数の座標がすべて同一のラベルである場合に円として判定し、前記検出したい円の中心41が既に確保された円の領域内に存しない場合に新たな円の領域として確保する円領域確保工程14と、を備える。   A circle detection method 1 according to the present invention is a circle detection method 1 for detecting a circle in an image 3 based on image data, as shown in FIG. A binarization step 11 for generating a binarized image of the non-target region 5, a labeling step 12 for labeling each binarized detection target region 4, and the binarized detection target region 4 In the contour extraction step 13 for extracting the contour 9 of the figure every time, and in the extracted contour data, y for each pixel of the y-axis of the contour data from one of the x-axis directions 7 or y for each pixel of the x-axis Each time the contour pixel 6 that scans from one of the axial directions 8 to form the contour 9 is detected, the contour pixel 6 is located at a circumferential portion of the circle in a predetermined direction for detecting the presence of the circle and Pixels separated by the length of the radius of the predetermined circle you want to detect If the position is the center of the circle to be detected and the coordinates of the predetermined position 40 suitable for confirming whether or not the same label is within the range surrounded by the radius are all the same label, it is determined as a circle. And a circle area securing step 14 for securing a new circle area when the center 41 of the circle to be detected does not exist within the already secured circle area.

輪郭抽出工程13では輪郭データを記憶し、ラベリング工程12ではラベルデータを記憶し、円領域確保工程14では領域確保データを記憶する。   The contour extraction process 13 stores the contour data, the labeling process 12 stores the label data, and the circle area securing process 14 stores the area securing data.

前記画像データは、撮影又は画像読み込みにより画像データを取得する画像取得工程10において取得する。   The image data is acquired in an image acquisition step 10 for acquiring image data by photographing or image reading.

まず、2値化工程11について説明する。検出対象領域4と検出対象外領域5は、例えば、図3において画像データ内に下地30の他に、円31、三角形32、四角形33の図形が存するときに、円31のみを検出した場合には、円31を検出対象領域4とし、下地30、三角形32及び四角形33を検出対象外領域5とし、検出対象領域4と検出対象外領域5を2値化する。また、例えば図4に示すように、円のみを検出対象領域4とした場合は、1つの小円の図形並びに小円と大円がともに一部が重なって欠けた図形が検出対象領域4となり、下地30部分が検出対象外領域5となった2値化が行われ、図5に示すような2値化画像を作成する。   First, the binarization step 11 will be described. The detection target region 4 and the non-detection target region 5 are, for example, when only the circle 31 is detected when a figure of a circle 31, a triangle 32, and a quadrangle 33 is present in the image data in FIG. Uses the circle 31 as the detection target region 4, the base 30, the triangle 32, and the quadrangle 33 as the non-detection target region 5, and binarizes the detection target region 4 and the non-detection target region 5. For example, as shown in FIG. 4, when only the circle is set as the detection target region 4, a single small circle figure and a figure in which both the small circle and the great circle partially overlap and become the detection target region 4 are used. The binarization in which the background 30 portion becomes the non-detection target region 5 is performed, and a binarized image as shown in FIG. 5 is created.

次に、2値化画像3に対して、ラベリング工程12及び輪郭抽出工程13を行う。ラベリング工程12について説明する。2値化画像3に示すように検出対象領域4が2ケ所検出された場合は、それぞれの領域別にA、Bのラベル付けを行い、座標との関連をとったラベルデータA、Bを記憶する。記憶されたラベルデータを図で示すと図6や図8のラベルデータ説明図61に示すように記憶される。   Next, a labeling step 12 and a contour extracting step 13 are performed on the binarized image 3. The labeling process 12 will be described. As shown in the binarized image 3, when two detection target areas 4 are detected, A and B are labeled for each area, and label data A and B associated with coordinates are stored. . When the stored label data is shown in the figure, it is stored as shown in the label data explanatory diagram 61 of FIGS.

輪郭抽出工程13について説明する。2値化画像3に示すように検出対象領域4が2ケ所検出された場合は、それぞれの領域別に輪郭を検出する。座標との関連をとった輪郭データを記憶する。記憶された輪郭データを図で示すと図7や図8の輪郭データ説明図60に示すように記憶される。   The contour extraction process 13 will be described. When two detection target areas 4 are detected as shown in the binarized image 3, the contour is detected for each area. Contour data associated with coordinates is stored. When the stored contour data is shown in the figure, it is stored as shown in the contour data explanatory diagram 60 of FIGS.

次に、円領域確保工程14について、説明する。予め検出したい所定の円の半径や、特定の画素位置(輪郭画素位置)6を基に円の存在を検出する所定の方向を設定しておく。所定の円の半径は1つの半径でもよく、複数の半径でもよく、画像3内で求めたい円の考えられる半径すべてでもよい。また、特定の画素位置(輪郭画素位置)6を基に円の存在を検出する所定の方向は、例えば図16(a)又は(b)に示すように90°間隔のx軸方向7の左右方向とy軸方向8の上下方向の90°間隔の4方向に設定してもよく、45°間隔の8方向でもよく、30°間隔の12方向でもよく、さらにはそれぞれの間隔がそれぞれ異なる角度の間隔でもよい。設定した間隔は円の検索中は一定であることが望ましい。   Next, the circle area securing step 14 will be described. A predetermined direction for detecting the presence of a circle is set based on the radius of a predetermined circle to be detected in advance or a specific pixel position (contour pixel position) 6. The radius of the predetermined circle may be one radius, a plurality of radii, or all possible radii of the circle to be obtained in the image 3. The predetermined direction for detecting the presence of a circle based on a specific pixel position (outline pixel position) 6 is, for example, left and right in the x-axis direction 7 at 90 ° intervals as shown in FIG. 16 (a) or (b). 4 directions of 90 ° intervals in the vertical direction and y-axis direction 8 may be set, 8 directions of 45 ° intervals, 12 directions of 30 ° intervals, and different angles may be used. An interval of It is desirable that the set interval be constant during the circle search.

輪郭データにおいて、図15に示すように前記輪郭データのy軸の1画素ごとにx軸方向7の一方から、又は、x軸の1画素ごとにy軸方向8の一方から走査して輪郭9を形成する輪郭画素6を検出していく。   In the contour data, as shown in FIG. 15, the contour 9 is scanned from one side in the x-axis direction 7 for each pixel on the y-axis of the contour data or from one side in the y-axis direction 8 for each pixel on the x-axis. Are detected.

検出した前記輪郭画素6において、前記輪郭画素6を円の円周部分に位置する点として、円の存在を検出する所定の方向でかつ検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心41とし、前記半径で囲まれた範囲内の任意で設定した同一ラベルか否かを確認するに適する所定の位置40の複数画素がすべて同一ラベルか否かを確認する。所定の位置40は、円であるか否かを判断できるために確認のための適する数や位置を設定する。例えば、図17〜図19においては所定の位置40を6カ所設定しているが、円周縁付近に所定の位置を数か所設定してもいいし、上下左右の周縁や中心近傍に所定の位置を数か所設定してもいい。   In the detected contour pixel 6, the pixel separated from the contour pixel 6 in the predetermined direction for detecting the presence of the circle and the radius of the predetermined circle to be detected, with the contour pixel 6 positioned at the circumferential portion of the circle The position is the center 41 of the circle to be detected, and it is confirmed whether or not a plurality of pixels at a predetermined position 40 suitable for confirming whether or not the same label is arbitrarily set within the range surrounded by the radius are the same label. To do. Since the predetermined position 40 can be determined as to whether or not it is a circle, a suitable number and position for confirmation are set. For example, in FIG. 17 to FIG. 19, six predetermined positions 40 are set. However, several predetermined positions may be set in the vicinity of the circumferential edge of the circle. You may set several positions.

ここで、円領域確保の一つの方法をわかりやすく説明するために、画像3内に1つの円が存する場合を取り上げその円の領域をラベルCとした場合を示す図14〜図20に基づいて説明する。円検出に入るときのデータは、輪郭データ及びラベルデータが得られ領域確保データはまだ得られていない。これを図に示すと図14に示すようになる。   Here, in order to explain one method of securing a circle area in an easy-to-understand manner, a case where one circle exists in the image 3 is taken up and a case where the area of the circle is used as a label C is shown based on FIGS. explain. As the data for entering circle detection, contour data and label data are obtained, but area securing data is not yet obtained. This is shown in FIG.

まず、輪郭データを使用して、例えば、図15に示すように画面3内をx軸方向7に走査して輪郭9上の輪郭画素6を検出すると、図16(a)に示すように、輪郭画素6を円の円周部分に位置する点として、円の存在を検出する所定の方向として90°間隔の4方向で、かつ図16(b)に示すように、検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心41とし、上方向の半径で囲まれた範囲50、右方向の半径で囲まれた範囲51、下方向の半径で囲まれた範囲52及び左方向の半径で囲まれた範囲53のそれぞれの範囲が求める円であるかを判定する。   First, using the contour data, for example, when the contour pixel 6 on the contour 9 is detected by scanning the screen 3 in the x-axis direction 7 as shown in FIG. 15, as shown in FIG. As the points where the contour pixels 6 are located in the circumferential portion of the circle, the predetermined directions for detecting the presence of the circle are four directions at intervals of 90 °, and as shown in FIG. The pixel position separated by the length of the radius is set as the center 41 of the circle to be detected, and the range 50 surrounded by the upper radius, the range 51 surrounded by the right radius, and the lower radius. It is determined whether each range of the range 52 and the range 53 surrounded by the radius in the left direction is a desired circle.

前記判定は、例えば図17に示すように、上方向の半径で囲まれた範囲50内の6カ所の×印の所定の位置40のすべての画素がすべて同一ラベルか否かを確認し、前記検出したい円の中心41が既に確保された円の領域内に存しないか否かを確認する。図17の場合は、すべての所定の位置40の画素がラベルC域の範囲外であるので円として判定しない。   For example, as shown in FIG. 17, the determination is made by checking whether all the pixels at the predetermined positions 40 of the six marks in the range 50 surrounded by the radius in the upward direction are all the same label, It is confirmed whether or not the center 41 of the circle to be detected does not exist within the already secured circle area. In the case of FIG. 17, since all the pixels at the predetermined position 40 are outside the range of the label C area, they are not determined as circles.

次に、同じ前記輪郭画素6において、図18に示すように、右方に検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心41とし、図18において点線で示した前記半径で囲まれた範囲51内において、例えば6カ所の×印の所定の位置40のすべての画素がすべて同一ラベルか否かを確認し、前記検出したい円の中心41が既に確保された円の領域内に存しないか否かを確認する。図18の場合は、1か所の画素がラベルCであるが他の5か所の画素は所定の位置40の画素がラベル域の範囲外であるので円として判定しない。   Next, in the same contour pixel 6, as shown in FIG. 18, the pixel position separated by the length of the radius of a predetermined circle to be detected to the right is set as the center 41 of the circle to be detected, and the dotted line in FIG. In the range 51 surrounded by the radius shown in (5), for example, it is confirmed whether all the pixels at the predetermined positions 40 of the six crosses are the same label, and the center 41 of the circle to be detected is already secured. Check if it is not within the circled area. In the case of FIG. 18, one pixel is a label C, but the other five pixels are not determined as circles because the pixel at a predetermined position 40 is outside the range of the label area.

次に、同じ前記輪郭画素6において、図19に示すように、下方に検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心41とし、図19において点線で示した前記半径で囲まれた範囲内(図15において点線は実線に重なっている。)において、例えば6カ所の×印の所定の位置40のすべての画素がすべて同一ラベルか否かを確認する。図19の場合は、すべての所定の位置40の座標がラベルCであるので円として判定する。   Next, in the same outline pixel 6, as shown in FIG. 19, the pixel position separated by the length of the radius of a predetermined circle to be detected downward is set as the center 41 of the circle to be detected, and the dotted line in FIG. In the range surrounded by the radius shown (in FIG. 15, the dotted line overlaps with the solid line), for example, it is confirmed whether all the pixels at the predetermined positions 40 of the six X marks are all the same label. . In the case of FIG. 19, since the coordinates of all the predetermined positions 40 are the label C, it is determined as a circle.

そして、前記検出したい円の中心41が既に確保された円の領域内に存しない場合に新たな円の領域として確保し、前記検出したい円の中心41が既に確保された円の領域内に存する場合に円の領域として確保しない。図19の場合は、前記判定した円の中心41が既に確保された円の領域内に存しない場合に該当するので、領域確保データに新たな円の領域として確保して、該円の識別をするための記号を決定し、確保した円の中心と半径を決定し、中心と半径(直径)やラベルを領域確保データとして記憶する。円の識別をするための記号を図で示すと図20に示す領域確保データ説明図62に示すように表される。   Then, when the circle center 41 to be detected does not exist in the already secured circle area, it is secured as a new circle area, and the circle center 41 to be detected exists in the already secured circle area. Do not secure as a circle area. In the case of FIG. 19, this corresponds to the case where the determined circle center 41 does not exist within the area of the already secured circle. Therefore, a new circle area is secured in the area securing data, and the circle is identified. The center and radius of the secured circle are determined, and the center, radius (diameter) and label are stored as area securing data. Symbols for identifying the circle are shown in the figure as shown in the area securing data explanatory diagram 62 shown in FIG.

次に、更に画像3内を走査して輪郭データにおいて輪郭画素6を検出するたびに、所定の方向として90°間隔の4方向で、上方向の半径で囲まれた範囲50、右方向の半径で囲まれた範囲51、下方向の半径で囲まれた範囲52及び左方向の半径で囲まれた範囲53のそれぞれの範囲が求める円であるかを判定し、円として判定したときは前記検出したい円の中心41が既に確保された円の領域内に存しない場合には円の領域として確保し、前記検出したい円の中心41が既に確保された円の領域内に存する場合には円の領域として確保しないという方法を画面3内の全画素を走査して行う。以上により1つの円を検出する方法を説明した。   Next, every time the image 3 is further scanned and the contour pixel 6 is detected in the contour data, the predetermined range of four directions at 90 ° intervals, the range 50 surrounded by the upper radius, and the right radius It is determined whether each of a range 51 surrounded by a circle, a range 52 surrounded by a lower radius, and a range 53 surrounded by a left radius is a circle to be obtained. If the center 41 of the circle to be detected does not exist within the area of the already secured circle, the area is secured as a circle area, and if the center 41 of the circle to be detected exists within the area of the already secured circle, A method of not securing the area is performed by scanning all the pixels in the screen 3. The method for detecting one circle has been described above.

次に、半径が異なる複数の円が重なっている場合を説明する。例えば、図4〜図13に示すように、1つの小円の図形の他に小円と大円の一部が重なった図形を検出対象領域4とした画像3の場合である。この場合の円領域確保の方法は、前記複数の円のうちで半径の大きさを最大値から順次縮小させて最小値まで前記円領域確保工程14を繰り返して、順次縮小された円を判定し順次縮小された円の領域を確保していく。すなわち、考えられる範囲内で最も大きい半径を有する円の検出を行い、順次半径の小さい円の検出を行う。   Next, a case where a plurality of circles having different radii are overlapped will be described. For example, as shown in FIGS. 4 to 13, in the case of an image 3 in which a small circle and a part of a large circle overlap in addition to one small circle, the detection target region 4 is used. In this case, the method for securing the circle area is to sequentially reduce the size of the radius from the maximum value among the plurality of circles, repeat the circle area securing step 14 to the minimum value, and determine the sequentially reduced circle. The area of the circle that is gradually reduced is secured. That is, the circle having the largest radius within the conceivable range is detected, and the circle having the smallest radius is sequentially detected.

円検出に入るときのデータは、輪郭データ及びラベルデータが得られ領域確保データはまだ得られていない。これを図に示すと図8に示すようになる。検出開始時には設定した半径を有する円が検出されなくても順次半径を小さくすることによって存在する円が検出される。円の検出は図9に示すように、例えば6カ所の×印の所定の位置40のすべての画素がすべて同一ラベルか否かを確認し、前記検出したい円の中心41が既に確保された円の領域内に存しないか否かを確認し、図9の場合は、6か所の画素がラベルAであり円の中心41が既に確保された円の領域内に存しないので円として領域確保をする。そして領域確保データに円の識別用記号A1、円の中心と半径(直径)を座標との関連をとって記憶する。これを図に示すと図10の領域確保データ説明図62にようになる。   As the data for entering circle detection, contour data and label data are obtained, but area securing data is not yet obtained. This is shown in FIG. Even when a circle having a set radius is not detected at the start of detection, existing circles are detected by sequentially reducing the radius. As shown in FIG. 9, the circle is detected by, for example, checking whether all the pixels at the predetermined positions 40 of the six X marks are the same label, and the center 41 of the circle to be detected is already secured. 9, in the case of FIG. 9, since the six pixels are labels A and the center 41 of the circle does not exist in the already secured circle area, the area is secured as a circle. do. Then, in the area securing data, the circle identification symbol A1, the center of the circle and the radius (diameter) are stored in association with the coordinates. This is shown in FIG. 62, which is an area reservation data explanatory diagram of FIG.

そして、図10に示す大円確保後に、小円の検索において前記円領域確保工程14を繰り返して円判定と円確保を行う。例えば、図11に示すように、輪郭データ上の輪郭画素6において、下方に検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心41とし、図11において点線で示した前記半径で囲まれた範囲内(図11において点線の大部分が実線に重なっている。)において、例えば7カ所の×印の所定の位置40のすべての画素がすべて同一ラベルか否かを確認する。図11の場合は、すべての画素がラベルデータでラベルAであるので円として判定する。   Then, after the large circle shown in FIG. 10 is secured, the circle area securing step 14 is repeated in the small circle search to perform circle determination and circle securing. For example, as shown in FIG. 11, in the contour pixel 6 on the contour data, the pixel position separated by the length of the radius of a predetermined circle to be detected below is set as the center 41 of the circle to be detected, and the dotted line in FIG. For example, in the range surrounded by the radius shown in FIG. 11 (most of the dotted lines overlap the solid line in FIG. 11), for example, all the pixels at the predetermined positions 40 of the seven X marks are all the same label. To check. In the case of FIG. 11, since all the pixels are label data and label A, it is determined as a circle.

そして、前記検出したい円の中心41が既に確保された円の領域内に存しない場合に該当するため、新たな円の領域として確保する。そして、新たに確保された小円を識別記号A2とし、小円の中心と半径(直径)を決定し、座標との関連をとって前記小円の中心と半径(直径)及び識別記号A2を領域確保データとして記憶する。これを図に示すと図12の領域確保データ説明図62にようになる。   Since this corresponds to the case where the center 41 of the circle to be detected does not exist within the area of the already secured circle, it is secured as a new circle area. Then, the newly secured small circle is set as the identification symbol A2, the center and radius (diameter) of the small circle are determined, and the center, radius (diameter) and identification symbol A2 of the small circle are determined in relation to the coordinates. Store as area reservation data. This is illustrated in the area securing data explanatory diagram 62 of FIG.

次は、同じようにラベルBの小円について行い画像3中のすべての円の検出を完了させることができる。これにより、ラベルBの識別記号B、小円の中心と半径(直径)を座標との関連をとって領域確保データとして記憶する。これを図に示すと図13の領域確保データ説明図62のようになる。   Next, it is possible to complete the detection of all the circles in the image 3 by similarly performing the small circle of the label B. Thereby, the identification symbol B of the label B, the center of the small circle, and the radius (diameter) are stored as area securing data in association with the coordinates. This is shown in an area securing data explanatory diagram 62 in FIG.

画面3中から円検出を完了するまでの検索数を、ハフ変換の場合に比べて本発明によって大幅に削減できたため、画像3からの円検出処理時間を著しく短縮できるという効果を奏する。   Since the number of searches from the screen 3 until the circle detection is completed can be greatly reduced by the present invention compared to the case of the Hough transform, the circle detection processing time from the image 3 can be significantly shortened.

円領域確保工程14においては、求めたい円の半径がわからないが画像3内の円をすべて求めたい場合には、予め半径として考えられる最大値と最小値を設定し、最大値の半径から最小値の半径まで順次縮小させて、それぞれの半径において前記円領域確保工程14を繰り返して行わせる。すべての半径について円判定及び円確保が完了すると、画像3内のすべての円検出が完了する。   In the circle area securing step 14, when the radius of the circle to be obtained is not known but all circles in the image 3 are to be obtained, a maximum value and a minimum value considered as the radius are set in advance, and the minimum value is determined from the radius of the maximum value. The circular area securing step 14 is repeatedly performed at each radius. When circle determination and circle reservation are completed for all radii, detection of all circles in the image 3 is completed.

次に、本発明の円検出装置2は、図2に示すように、2直化部21、ラベリング部22、輪郭抽出部23及び円領域確保部24を備える画像処理部55と、画像取得部20と、記憶部25と、表示部56と、操作部27と、電源部29とを備えている。円検出装置2には撮像装置26や表示装置56が接続されている。   Next, as shown in FIG. 2, the circle detection device 2 of the present invention includes an image processing unit 55 including a birectification unit 21, a labeling unit 22, a contour extraction unit 23, and a circular area securing unit 24, and an image acquisition unit. 20, a storage unit 25, a display unit 56, an operation unit 27, and a power supply unit 29. An imaging device 26 and a display device 56 are connected to the circle detection device 2.

画像取得部20は、被写体57をカメラ等の撮像装置26で撮像した画像データ、又は、画像データが記憶された記憶部25からの読み込まれた画像データを取得する。また、表示部28は画像処理部55で処理されている画像3をパソコン等の表示装置56に表示する。   The image acquisition unit 20 acquires image data obtained by imaging the subject 57 with the imaging device 26 such as a camera, or image data read from the storage unit 25 in which the image data is stored. The display unit 28 displays the image 3 processed by the image processing unit 55 on a display device 56 such as a personal computer.

次に、本発明の円検出装置2の画像処理部55は、画像データに基づいて画像3内の円を検出する円検出の処置をする手段であって、前記画像3に対して、検出対象領域4と検出対象外領域5の2値化画像を生成する2値化手段である2値化部21と、前記2値化した前記検出対象領域4ごとにラベル付けを行うラベリング手段であるラベリング部22と、前記2値化した前記検出対象領域4ごとに前記図形の輪郭9を抽出する輪郭抽出手段である輪郭抽出部23と、前記抽出した輪郭データにおいて、前記輪郭データのy軸の1画素ごとにx軸方向7の一方から又はx軸の1画素ごとにy軸方向8の一方から走査して輪郭9を形成する輪郭画素6を検出するごとに、前記輪郭画素6を円の円周部分に位置する点として、円の存在を検出する所定の方向でかつ検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心とし、前記半径で囲まれた範囲内の複数の同一ラベルか否かを確認する所定の位置40の画素がすべて同一のラベルである場合に円として判定し、前記検出したい円の中心が既に確保された円の領域内に存しない場合に新たな円の領域として確保する円領域確保手段である円領域確保部24と、を備える。   Next, the image processing unit 55 of the circle detection device 2 of the present invention is means for performing circle detection processing for detecting a circle in the image 3 based on the image data. A binarization unit 21 that is a binarization unit that generates a binarized image of the region 4 and the non-detection target region 5, and a labeling unit that performs labeling for each of the binarized detection target regions 4 A contour extracting unit 23 which is a contour extracting means for extracting the contour 9 of the figure for each binarized detection target region 4; and in the extracted contour data, 1 of the y-axis of the contour data Each time the contour pixel 6 forming the contour 9 is detected by scanning from one of the x-axis directions 7 for each pixel or from one of the y-axis directions 8 for each pixel of the x-axis, the contour pixel 6 is circled. Detect the presence of a circle as a point located in the circumference A pixel position separated in a predetermined direction and corresponding to the length of the radius of a predetermined circle to be detected is set as the center of the circle to be detected, and a predetermined number for confirming whether or not there are a plurality of identical labels within the range surrounded by the radius If the pixels at position 40 are all the same label, it is determined as a circle, and if the center of the circle to be detected does not exist within the already secured circle area, a new circle area is secured. And a circular area securing unit 24 as means.

そして、円検出装置2は、複数の大きさの円を検出する場合には、前記複数の円のうちで半径の大きさを最大値から順次縮小させて最小値まで前記円領域確保手段である円領域確保部24を繰り返して行わせ、順次縮小された円を判定し順次縮小された円の領域を確保していく。   Then, when detecting a plurality of size circles, the circle detection device 2 is the circle area securing unit that sequentially reduces the radius of the plurality of circles from the maximum value to the minimum value. The circle area securing unit 24 is repeatedly performed to determine a sequentially reduced circle and secure a sequentially reduced circle area.

また、本発明は以下の処理を実行することによっても実現される。前記円検出方法1をコンピュータで実行可能なプログラムであって、前記プログラムをネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータが前記プログラムを呼び出して実行する処置である。   The present invention can also be realized by executing the following processing. A program capable of executing the circle detection method 1 by a computer, the program being supplied to a system or apparatus via a network or a storage medium, and a computer of the system or apparatus calling and executing the program .

また、前記円検出方法1をコンピュータに実行させるプログラムを記憶した記憶媒体であって、コンピュータ読み取り可能な前記円検出方法を実現するプログラムを記憶した記憶媒体に記憶した前記プログラムを呼び出して実行する処置である。前記記憶媒体としては、CD−ROM、ハードディスク、フレキシブルディスク、磁気テープ、光磁気ディスクなどがある。   Also, a storage medium storing a program for causing a computer to execute the circle detection method 1, wherein the program stored in the storage medium storing the computer-readable program for realizing the circle detection method is called and executed It is. Examples of the storage medium include a CD-ROM, a hard disk, a flexible disk, a magnetic tape, and a magneto-optical disk.

1 円検出方法
2 円検出装置
3 画像
4 検出対象領域
5 検出対象外領域
6 輪郭画素
7 x軸方向
8 y軸方向
9 輪郭
10 画像取得工程
11 2値化工程
12 ラベリング工程
13 輪郭抽出工程
14 円領域確保工程
20 画像取得部
21 2値化部
22 ラベリング部
23 輪郭抽出部
24 円領域確保部
25 記憶部
26 撮像装置
27 操作部
28 表示部
29 電源部
30 下地
31 円
32 三角形
33 四角形
40 所定の位置
41 中心
50 範囲
51 範囲
52 範囲
53 範囲
55 画像処理部
56 表示装置
57 被写体
60 輪郭データ説明図
61 ラベルデータ説明図
62 領域確保データ説明図
1 circle detection method 2 circle detection device 3 image 4 detection target area 5 non-detection target area 6 contour pixel 7 x-axis direction 8 y-axis direction 9 contour 10 image acquisition process 11 binarization process 12 labeling process 13 contour extraction process 14 circle Area securing step 20 Image acquisition unit 21 Binarization unit 22 Labeling unit 23 Outline extraction unit 24 Circle region securing unit 25 Storage unit 26 Imaging device 27 Operation unit 28 Display unit 29 Power supply unit 30 Base 31 Circle 32 Triangle 33 Square 40 Predetermined Position 41 Center 50 Range 51 Range 52 Range 53 Range 55 Image processing unit 56 Display device 57 Subject 60 Outline data explanatory diagram 61 Label data explanatory diagram 62 Area reservation data explanatory diagram

請求項1に記載の円検出方法1は、画像データに基づいて画像3内の円を検出する円検出方法1であって、前記画像3に対して、検出対象領域4と検出対象外領域5の2値化画像を生成する2値化工程11と、前記2値化した前記検出対象領域4ごとにラベル付けを行うラベリング工程12と、前記2値化した前記検出対象領域4ごとに前記検出対象領域の図形の輪郭9を抽出する輪郭抽出工程13と、前記抽出した輪郭データにおいて、前記輪郭データのy軸の1画素ごとにx軸方向7の一方から又はx軸の1画素ごとにy軸方向8の一方から走査して輪郭9を形成する輪郭画素6を検出するごとに、前記輪郭画素6を円の円周部分に位置する点として、円の存在を検出する所定の方向でかつ検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心とし、前記半径で囲まれた範囲内の同一ラベルか否かを確認するに適する所定の位置40の複数の座標がすべて同一のラベルである場合に円として判定し、前記検出したい円の中心41が既に確保された円の領域内に存しない場合に新たな円の領域として確保する円領域確保工程14と、を備えることを特徴とする。
A circle detection method 1 according to claim 1 is a circle detection method 1 for detecting a circle in an image 3 based on image data, and a detection target region 4 and a non-detection target region 5 with respect to the image 3. A binarization step 11 for generating a binarized image, a labeling step 12 for labeling each binarized detection target region 4, and the detection for each binarized detection target region 4 In the contour extraction step 13 for extracting the contour 9 of the graphic of the target area, and in the extracted contour data, y for each pixel on the y-axis of the contour data from one of the x-axis directions 7 or for each pixel on the x-axis Each time the contour pixel 6 that scans from one of the axial directions 8 to form the contour 9 is detected, the contour pixel 6 is located at a circumferential portion of the circle in a predetermined direction for detecting the presence of the circle and Separated by the length of the radius of the circle you want to detect If the prime position is the center of the circle to be detected, and a plurality of coordinates at a predetermined position 40 suitable for checking whether or not the same label is within the range surrounded by the radius are all determined to be a circle And a circle area securing step 14 for securing a new circle area when the center 41 of the circle to be detected does not exist within the already secured circle area.

請求項3に記載の円検出装置2は、画像データに基づいて画像3内の円を検出する円検出装置2であって、前記画像3に対して、検出対象領域4と検出対象外領域5の2値化画像を生成する2値化手段と、前記2値化した前記検出対象領域4ごとにラベル付けを行うラベリング手段と、前記2値化した前記検出対象領域4ごとに前記検出対象領域の図形の輪郭9を抽出する輪郭抽出手段と、前記抽出した輪郭データにおいて、前記輪郭データのy軸の1画素ごとにx軸方向7の一方から又はx軸の1画素ごとにy軸方向8の一方から走査して輪郭9を形成する輪郭画素6を検出するごとに、前記輪郭画素6を円の円周部分に位置する点として、円の存在を検出する所定の方向でかつ検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心とし、前記半径で囲まれた範囲内の同一ラベルか否かを確認するに適する所定の位置40の複数の座標がすべて同一のラベルである場合に円として判定し、前記検出したい円の中心41が既に確保された円の領域内に存しない場合に新たな円の領域として確保する円領域確保手段と、を備えることを特徴とする。
The circle detection device 2 according to claim 3 is a circle detection device 2 that detects a circle in the image 3 based on image data, and the detection target region 4 and the non-detection target region 5 with respect to the image 3. Binarizing means for generating a binarized image, labeling means for labeling each binarized detection target area 4, and the detection target area for each binarized detection target area 4 A contour extracting means for extracting the contour 9 of the figure, and in the extracted contour data, the y-axis direction 8 from one of the x-axis directions 7 for each y-axis pixel of the contour data or for each pixel of the x-axis 8 Each time a contour pixel 6 forming a contour 9 by scanning from one side of the circle is detected, the contour pixel 6 is positioned at a circumferential portion of the circle in a predetermined direction for detecting the presence of a circle and a predetermined desired value to be detected. Before the pixel position separated by the length of the circle radius If the plurality of coordinates at a predetermined position 40, which are suitable for confirming whether or not they are the same label within the range surrounded by the radius, are the same label as the center of the circle to be detected, it is determined as a circle, and the detection And a circle area securing means for securing a new circle area when the center 41 of the desired circle does not exist within the already secured circle area.

Claims (6)

画像データに基づいて画像内の円を検出する円検出方法であって、
前記画像に対して、検出対象領域と検出対象外領域の2値化画像を生成する2値化工程と、
前記2値化した前記検出対象領域ごとにラベル付けを行うラベリング工程と、
前記2値化した前記検出対象領域ごとに前記図形の輪郭を抽出する輪郭抽出工程と、
前記抽出した輪郭データにおいて、前記輪郭データのy軸の1画素ごとにx軸方向の一方から又はx軸の1画素ごとにy軸方向の一方から走査して輪郭を形成する輪郭画素を検出するごとに、前記輪郭画素を円の円周部分に位置する点として、円の存在を検出する所定の方向でかつ検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心とし、前記半径で囲まれた範囲内の同一ラベルか否かを確認するに適する所定の位置の複数の座標がすべて同一のラベルである場合に円として判定し、前記検出したい円の中心が既に確保された円の領域内に存しない場合に新たな円の領域として確保する円領域確保工程と、を備えることを特徴とする円検出方法。
A circle detection method for detecting a circle in an image based on image data,
A binarization step for generating a binarized image of the detection target region and the non-detection target region for the image;
A labeling step of performing labeling for each of the binarized detection target regions;
A contour extracting step for extracting the contour of the figure for each binarized detection target region;
In the extracted contour data, a contour pixel that forms a contour is detected by scanning from one side in the x-axis direction for each pixel on the y-axis of the contour data or from one side in the y-axis direction for each pixel on the x-axis. Each of the circles to be detected is a pixel position separated in a predetermined direction for detecting the presence of the circle and corresponding to the length of the radius of the predetermined circle to be detected, with the contour pixel being positioned at the circumferential portion of the circle. The center of the circle to be detected is determined as a circle when a plurality of coordinates at a predetermined position suitable for checking whether or not they are the same label within the range surrounded by the radius are all the same label And a circle area securing step of securing a new circle area when the area does not exist within the already secured circle area.
複数の大きさの円を検出する場合には、前記複数の円のうちで半径の大きさを最大値から順次縮小させて最小値まで前記円領域確保工程を繰り返して行わせ、順次縮小された円を判定し順次縮小された円の領域を確保していくことを特徴とする請求項1に記載の円検出方法。   When detecting a plurality of size circles, the size of the radius is sequentially reduced from the maximum value among the plurality of circles, and the circle area securing step is repeatedly performed to the minimum value, and the circles are sequentially reduced. The circle detection method according to claim 1, wherein the circle is determined and a sequentially reduced circle area is secured. 画像データに基づいて画像内の円を検出する円検出装置であって、
前記画像に対して、検出対象領域と検出対象外領域の2値化画像を生成する2値化手段と、
前記2値化した前記検出対象領域ごとにラベル付けを行うラベリング手段と、
前記2値化した前記検出対象領域ごとに前記図形の輪郭を抽出する輪郭抽出手段と、
前記抽出した輪郭データにおいて、前記輪郭データのy軸の1画素ごとにx軸方向の一方から又はx軸の1画素ごとにy軸方向の一方から走査して輪郭を形成する輪郭画素を検出するごとに、前記輪郭画素を円の円周部分に位置する点として、円の存在を検出する所定の方向でかつ検出したい所定の円の半径の長さ相当分離れた画素位置を前記検出したい円の中心とし、前記半径で囲まれた範囲内の同一ラベルか否かを確認するに適する所定の位置の複数の座標がすべて同一のラベルである場合に円として判定し、前記検出したい円の中心が既に確保された円の領域内に存しない場合に新たな円の領域として確保する円領域確保手段と、を備えることを特徴とする円検出装置。
A circle detection device for detecting a circle in an image based on image data,
Binarization means for generating a binarized image of a detection target area and a non-detection target area for the image;
Labeling means for performing labeling for each of the binarized detection target areas;
Contour extraction means for extracting the contour of the figure for each binarized detection target area;
In the extracted contour data, a contour pixel that forms a contour is detected by scanning from one side in the x-axis direction for each pixel on the y-axis of the contour data or from one side in the y-axis direction for each pixel on the x-axis. Each of the circles to be detected is a pixel position separated in a predetermined direction for detecting the presence of the circle and corresponding to the length of the radius of the predetermined circle to be detected, with the contour pixel being positioned at the circumferential portion of the circle. The center of the circle to be detected is determined as a circle when a plurality of coordinates at a predetermined position suitable for checking whether or not they are the same label within the range surrounded by the radius are all the same label And a circle area securing means for securing a new circle area when the area does not exist within the already secured circle area.
複数の大きさの円を検出する場合には、前記複数の円のうちで半径の大きさを最大値から順次縮小させて最小値まで前記円領域確保手段を繰り返して行わせ、順次縮小された円を判定し順次縮小された円の領域を確保していくことを特徴とする請求項3に記載の円検出装置。   When detecting a plurality of sizes of circles, the size of the radius of the plurality of circles is sequentially reduced from the maximum value, and the circle area securing means is repeatedly performed to the minimum value, and the circles are sequentially reduced. The circle detection device according to claim 3, wherein the circle is determined and a sequentially reduced circle area is secured. 請求項1又は2に記載の円検出方法をコンピュータに実行させるためのプログラム。   A program for causing a computer to execute the circle detection method according to claim 1. 請求項5に記載のプログラムを記憶したコンピュータに読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 5.
JP2016231975A 2016-11-30 2016-11-30 Circle detection method, circle detection apparatus, program, and storage medium Active JP6343648B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016231975A JP6343648B2 (en) 2016-11-30 2016-11-30 Circle detection method, circle detection apparatus, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016231975A JP6343648B2 (en) 2016-11-30 2016-11-30 Circle detection method, circle detection apparatus, program, and storage medium

Publications (2)

Publication Number Publication Date
JP2018088206A true JP2018088206A (en) 2018-06-07
JP6343648B2 JP6343648B2 (en) 2018-06-13

Family

ID=62494615

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016231975A Active JP6343648B2 (en) 2016-11-30 2016-11-30 Circle detection method, circle detection apparatus, program, and storage medium

Country Status (1)

Country Link
JP (1) JP6343648B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020134109A1 (en) * 2018-12-28 2020-07-02 歌尔股份有限公司 Object detection method and device and storage medium
CN112184639A (en) * 2020-09-15 2021-01-05 佛山(华南)新材料研究院 Round hole detection method and device, electronic equipment and storage medium
CN112329576A (en) * 2020-10-27 2021-02-05 南京大学 Method for identifying position of coil spring of automobile safety belt
CN114441499A (en) * 2022-04-11 2022-05-06 天津美腾科技股份有限公司 Grade detection method and device, identification equipment, ore pulp grade instrument and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8992427B2 (en) 2012-09-07 2015-03-31 Gynesonics, Inc. Methods and systems for controlled deployment of needle structures in tissue
EP3673877A1 (en) 2013-10-18 2020-07-01 Ziva Medical, Inc. Systems for the treatment of polycystic ovary syndrome
JP7237829B2 (en) 2016-11-11 2023-03-13 ガイネソニックス, インコーポレイテッド Dynamic interaction of tissue controlled treatment with tissue and/or treatment data and their comparison

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08111817A (en) * 1994-10-13 1996-04-30 Toshiba Medical Eng Co Ltd Shadow detector
JP2015060299A (en) * 2013-09-17 2015-03-30 株式会社日立製作所 Multiple camera photographic image synthesizing device, and multiple camera photographic image synthesizing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08111817A (en) * 1994-10-13 1996-04-30 Toshiba Medical Eng Co Ltd Shadow detector
JP2015060299A (en) * 2013-09-17 2015-03-30 株式会社日立製作所 Multiple camera photographic image synthesizing device, and multiple camera photographic image synthesizing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
原井 孝輔,外3名: "認識処理に向けた円形道路標識の高精度な抽出手法", 映像情報メディア学会技術報告, vol. 第26巻第8号, JPN6017041719, 29 January 2002 (2002-01-29), JP, pages 61 - 66, ISSN: 0003673189 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020134109A1 (en) * 2018-12-28 2020-07-02 歌尔股份有限公司 Object detection method and device and storage medium
US11295467B2 (en) 2018-12-28 2022-04-05 Goertek Inc. Object detection method, object detection device and storage medium
CN112184639A (en) * 2020-09-15 2021-01-05 佛山(华南)新材料研究院 Round hole detection method and device, electronic equipment and storage medium
CN112184639B (en) * 2020-09-15 2024-03-29 佛山(华南)新材料研究院 Round hole detection method and device, electronic equipment and storage medium
CN112329576A (en) * 2020-10-27 2021-02-05 南京大学 Method for identifying position of coil spring of automobile safety belt
CN112329576B (en) * 2020-10-27 2023-11-28 南京大学 Method for identifying position of coil spring of automobile safety belt
CN114441499A (en) * 2022-04-11 2022-05-06 天津美腾科技股份有限公司 Grade detection method and device, identification equipment, ore pulp grade instrument and storage medium

Also Published As

Publication number Publication date
JP6343648B2 (en) 2018-06-13

Similar Documents

Publication Publication Date Title
JP6343648B2 (en) Circle detection method, circle detection apparatus, program, and storage medium
US9053361B2 (en) Identifying regions of text to merge in a natural image or video frame
JP5775225B2 (en) Text detection using multi-layer connected components with histograms
CN105303156B (en) Character detection device, method, and program
WO2014092979A1 (en) Method of perspective correction for devanagari text
JP2008217347A (en) License plate recognition device, its control method and computer program
Chiang et al. Recognition of multi-oriented, multi-sized, and curved text
JP2011014012A (en) Two-dimensional code reading method, two-dimensional code extraction method, two-dimensional code recognition method and two-dimensional code reader
CN104318568A (en) Method and system for image registration
JP2018096908A (en) Inspection device and inspection method
US7922087B2 (en) Image processing apparatus, image processing method, and computer program stored in storage medium
Ahmed et al. Traffic sign detection and recognition model using support vector machine and histogram of oriented gradient
CN116324911A (en) Method for extracting characters from a vehicle license plate and license plate character extraction device for performing the method
CN115546219B (en) Detection plate type generation method, plate card defect detection method, device and product
EP3955207A1 (en) Object detection device
JP5010627B2 (en) Character recognition device and character recognition method
CN112434632B (en) Pattern recognition method, intelligent terminal and storage medium
WO2017058252A1 (en) Detecting document objects
JP6468880B2 (en) Character area extraction apparatus and program
JP2005250786A (en) Image recognition method
JP5993100B2 (en) Image processing apparatus and specific figure detection method
CN111950538B (en) Label detection method and device and computer readable storage medium
US11275963B2 (en) Image identification apparatus, image identification method, and non-transitory computer-readable storage medium for storing image identification program
Bhirud et al. A modified SWT based text-image separation in natural scene images
JP5157963B2 (en) Object detection device

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180515

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180521

R150 Certificate of patent or registration of utility model

Ref document number: 6343648

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250