JP2001116534A - Circularity deciding method, circularity arithmetic unit, and recording medium - Google Patents

Circularity deciding method, circularity arithmetic unit, and recording medium

Info

Publication number
JP2001116534A
JP2001116534A JP29455099A JP29455099A JP2001116534A JP 2001116534 A JP2001116534 A JP 2001116534A JP 29455099 A JP29455099 A JP 29455099A JP 29455099 A JP29455099 A JP 29455099A JP 2001116534 A JP2001116534 A JP 2001116534A
Authority
JP
Japan
Prior art keywords
roundness
image
calculating
distance
object image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP29455099A
Other languages
Japanese (ja)
Inventor
Yoshiharu Takahashi
嘉治 高橋
Tomonobu Iga
友信 伊賀
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.)
Kubota Corp
Original Assignee
Kubota Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kubota Corp filed Critical Kubota Corp
Priority to JP29455099A priority Critical patent/JP2001116534A/en
Publication of JP2001116534A publication Critical patent/JP2001116534A/en
Pending legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a circularity deciding method for deciding the shape of a spherical object more accurately without making variation in the circumferential length of the object greatly affect a value of circularity, a circularity arithmetic unit which is used to implement its circularity operation, and a computer- readable recording medium where a program for the circularity operation is recorded. SOLUTION: An object image is extracted (S2) from a picked-up image of an object S by binarizing the picked-up image and the gravity center position of the extracted object image is calculated (S3); and an outline image is extracted (S4) from the extracted object image, circularity is calculated (S5) from the distance between the gravity center position and outline, and the shape of the object S is decided according to the arithmetic result.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、球状の青果物等の
対象物を撮像して得た画像に基づいて、対象物の真円度
を演算し、演算結果に基づいて対象物の形状を判定する
真円度判定方法、その真円度演算の実施に使用する真円
度演算装置、及び真円度演算のプログラムが記録してあ
るコンピュータ読み取り可能な記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention calculates the roundness of an object based on an image obtained by imaging the object such as a spherical fruit and vegetable, and determines the shape of the object based on the calculation result. The present invention relates to a roundness determination method, a roundness calculation device used for performing the roundness calculation, and a computer-readable recording medium storing a roundness calculation program.

【0002】[0002]

【従来の技術】例えば、予め定めた等級別に複数の青果
物を選別する選果場では、等級判定の一要素である真円
度を次のように演算している。蜜柑又は柿等の球状の複
数の青果物を所定間隔で一列にコンベア上に載置する。
コンベアの搬送方向の適宜位置には、青果物を撮像する
撮像装置、並びに直管ランプ及びリフレクタ等を備える
投光装置がコンベアの搬送領域に臨ませて配設してあ
り、撮像装置は、その撮像領域に青果物が搬送される都
度、それを撮像し、得られた画像をアナログ/ディジタ
ル変換器を介して形状判定装置へ与える。
2. Description of the Related Art For example, in a sorting place where a plurality of fruits and vegetables are sorted according to a predetermined grade, the roundness which is one element of the grade determination is calculated as follows. A plurality of spherical fruits and vegetables such as tangerines or persimmons are placed on a conveyor in a row at a predetermined interval.
At an appropriate position in the conveying direction of the conveyor, an imaging device for imaging fruits and vegetables, and a light emitting device including a straight tube lamp, a reflector, and the like are provided facing the conveying region of the conveyor, and the imaging device performs the imaging of the imaging device. Each time a fruit or vegetable is transported to the area, it is imaged and the resulting image is provided to a shape determination device via an analog / digital converter.

【0003】形状判定装置は、撮像装置から与えられた
画像を取り込んで記憶するとともに、それを2値化する
ことによって対象となる青果物の2値化画像を抽出す
る。形状判定装置は、抽出した2値化画像から青果物の
面積及び周囲長を演算し、演算した青果物の面積及び周
囲長に基づいて、真円度を求める次の如き式によって青
果物の真円度を算出する。
[0003] The shape judging device takes in and stores an image given from an image pickup device, and binarizes the image to extract a binarized image of a target fruit and vegetable. The shape judging device calculates the area and perimeter of the fruits and vegetables from the extracted binarized image and, based on the calculated area and perimeter of the fruits and vegetables, calculates the roundness of the fruits and vegetables by the following equation to obtain the roundness. calculate.

【0004】[0004]

【数1】 (Equation 1)

【0005】形状判定装置は、算出して得た真円度の値
が「1」に近ければ近い程、この青果物が所謂、「真
円」に近い形状をなしていると判定する。
The shape judging device judges that the closer the calculated circularity value is to "1", the closer the shape of the fruits and vegetables is to a so-called "roundness".

【0006】[0006]

【発明が解決しようとする課題】ところで、一般には、
青果物の表面には比較的に多くの大小に亘る凹凸が存在
するため、たとえ実際には真円に近い全体形状をなして
いる場合であっても周囲長は大きい値として算出される
ことになる。
By the way, in general,
Since there are relatively many irregularities on the surface of fruits and vegetables, the perimeter is calculated as a large value even if the whole shape is actually close to a perfect circle. .

【0007】ところが、前述した式(1)の真円度演算
においては、微小な周囲長の変動も2乗されることによ
って、結果として得られる真円度の値は極端に小さいも
のになるという問題があった。
However, in the roundness calculation of the above-mentioned equation (1), a small change in the perimeter is also squared, so that the resulting roundness value is extremely small. There was a problem.

【0008】本発明は斯かる事情に鑑みてなされたもの
であり、球状の対象物を撮像した画像を2値化すること
によって撮像画像から対象物像を抽出し、抽出した対象
物像の重心位置を演算するとともに、抽出した対象物像
から輪郭画像を抽出し、重心位置及び輪郭の間の距離に
基づいて真円度を演算することにより、周囲長の変動に
伴って真円度の値を極端に左右されることがなく、より
正確な対象物の形状判定を可能とする真円度判定方法、
その真円度演算の実施に使用する真円度演算装置、及び
真円度演算のプログラムが記録してあるコンピュータ読
み取り可能な記録媒体を提供することにある。
The present invention has been made in view of such circumstances, and an image of a spherical object is binarized to extract an image of the object from the captured image, and the center of gravity of the extracted image of the object is extracted. By calculating the position, extracting a contour image from the extracted target object image, and calculating the roundness based on the position of the center of gravity and the distance between the contours, the value of the roundness with the fluctuation of the perimeter is calculated. Is not greatly influenced by the roundness determination method that enables more accurate shape determination of the object,
It is an object of the present invention to provide a roundness calculating device used for performing the roundness calculation and a computer-readable recording medium on which a program for the roundness calculation is recorded.

【0009】[0009]

【課題を解決するための手段】第1発明に係る真円度判
定方法は、球状の対象物(S)を含む領域を撮像し、撮
像画像を2値化することによって対象物像を抽出し(S
2)、抽出結果に基づいて前記対象物像の真円度を演算
し、演算結果に基づいて前記対象物(S)の形状を判定
する真円度判定方法において、前記対象物像の重心位置
を演算する第1ステップ(S3)と、前記対象物像の輪
郭を抽出する第2ステップ(S4)と、前記重心位置及
び輪郭の間の距離に基づいて前記対象物像の真円度を演
算する第3ステップ(S6)と、前記真円度に基づいて
前記対象物(S)の形状を判定する第4ステップ(S
7)とを有することを特徴とする。
According to a first aspect of the present invention, there is provided a method for determining a roundness, wherein a region including a spherical object (S) is imaged, and the image of the object is extracted by binarizing the captured image. (S
2) In the roundness determination method for calculating the roundness of the target object image based on the extraction result and determining the shape of the target object (S) based on the calculation result, the position of the center of gravity of the target image , A second step (S4) of extracting the contour of the object image, and calculating the roundness of the object image based on the position of the center of gravity and the distance between the contours. A third step (S6), and a fourth step (S6) of determining the shape of the object (S) based on the roundness.
7).

【0010】第2発明に係る真円度判定方法は、第1発
明の真円度判定方法において、前記第3ステップ(S
6)における真円度を、前記距離の平均値に対する前記
距離の最大値及び最小値の差の割合に基づいて演算する
ことを特徴とする。
The roundness determining method according to the second invention is the roundness determining method according to the first invention, wherein the third step (S
The roundness in 6) is calculated based on the ratio of the difference between the maximum value and the minimum value of the distance to the average value of the distance.

【0011】第3発明に係る真円度演算装置(3,6)
は、撮像器(14)により撮像された球状の対象物
(S)を含む領域の撮像画像を2値化することによって
対象物像を抽出し(S2)、抽出結果に基づいて前記対
象物像の真円度を演算する真円度演算装置において、前
記対象物像の重心位置を演算する重心位置演算手段
(6)と、前記対象物像の輪郭を抽出する輪郭抽出手段
(6)と、前記重心位置及び輪郭の間の距離に基づいて
前記対象物像の真円度を演算する真円度演算手段(6)
とを備えることを特徴とする。
A roundness calculating device according to a third invention (3, 6).
Extracts a target image by binarizing a captured image of a region including a spherical target (S) captured by an imager (14) (S2), and based on the extraction result, extracts the target image. A center-of-gravity position calculating means (6) for calculating a center-of-gravity position of the object image; a contour extracting means (6) for extracting a contour of the object image; Roundness calculating means for calculating the roundness of the object image based on the distance between the position of the center of gravity and the contour (6)
And characterized in that:

【0012】第4発明に係る真円度演算装置(3,6)
は、第3発明の真円度演算装置(3,6)において、前
記真円度演算手段(6)が、前記距離の平均値に対する
前記距離の最大値及び最小値の差の割合に基づいて真円
度を演算すべくなしてあることを特徴とする。
A roundness calculating device according to a fourth invention (3, 6).
In the roundness calculating device (3, 6) of the third invention, the roundness calculating means (6) is configured to calculate the roundness based on a ratio of a difference between a maximum value and a minimum value of the distance to an average value of the distance. It is characterized in that the roundness is calculated.

【0013】第5発明に係る記録媒体(7,M)は、コ
ンピュータに、撮像器(14)により撮像された球状の
対象物(S)を含む領域の撮像画像を2値化することに
よって対象物像を抽出させるプログラムコード手段(S
2)と、抽出させた結果に基づいて前記対象物像の真円
度を演算させるプログラムコード手段とを含む真円度演
算のプログラムが記憶されているコンピュータでの読み
取りが可能な記録媒体において、コンピュータ(3,
6)に、前記対象物像の重心位置を演算させる第1プロ
グラムコード手段(S3)と、コンピュータ(3,6)
に、前記対象物像の輪郭を抽出させる第2プログラムコ
ード手段(S4)と、コンピュータ(3,6)に、前記
重心位置及び輪郭の間の距離に基づいて前記対象物像の
真円度を演算させる第3プログラムコード手段(S6)
とを含むプログラムが記録されていることを特徴とす
る。
[0013] A recording medium (7, M) according to a fifth aspect of the present invention provides a computer by binarizing a captured image of an area including a spherical object (S) captured by an imager (14). Program code means (S
2) and a computer-readable recording medium storing a program for calculating roundness including program code means for calculating the roundness of the object image based on the extracted result, Computer (3
6) first program code means (S3) for calculating the position of the center of gravity of the object image, and a computer (3, 6)
The second program code means (S4) for extracting the contour of the object image and the computer (3, 6) determine the roundness of the object image based on the position of the center of gravity and the distance between the contours. Third program code means for calculating (S6)
Is recorded.

【0014】第6発明に係る記録媒体(7,M)は、第
5発明の記録媒体(7,M)において、前記第3プログ
ラムコード手段(S6)が、前記距離の平均径に対する
前記距離の最大値及び最小値の差の割合に基づいて真円
度をコンピュータ(3,6)に演算させるべくなしてあ
ることを特徴とする。
A recording medium (7, M) according to a sixth aspect of the present invention is the recording medium (7, M) according to the fifth aspect, wherein the third program code means (S6) is arranged so that the third program code means (S6) sets the distance to the average diameter of the distance. The computer (3, 6) is adapted to calculate the roundness based on the ratio of the difference between the maximum value and the minimum value.

【0015】本発明にあっては、球状の対象物を含む領
域を撮像し、撮像画像を2値化することによって対象物
像を抽出し、抽出した対象物像の重心位置を演算する一
方で、抽出した対象物像の輪郭を抽出し、重心位置及び
輪郭の間の距離に基づいて対象物の真円度を演算する構
成、より詳しくは、前記真円度を、前記距離の平均値に
対する前記距離の最大値及び最小値の差の割合に基づい
て演算する構成としたので、周囲長の変動に伴って真円
度の値を極端に左右されることがなく、より正確な対象
物の形状判定が可能となる。なお、この真円度の演算
は、例えば次の如き式を用いて演算することが可能であ
る。
According to the present invention, an image of a region including a spherical object is taken, the object image is extracted by binarizing the taken image, and the position of the center of gravity of the extracted object image is calculated. A configuration for extracting the outline of the extracted object image and calculating the roundness of the object based on the distance between the position of the center of gravity and the outline, more specifically, the roundness is calculated based on the average value of the distance. Since the calculation is performed based on the ratio of the difference between the maximum value and the minimum value of the distance, the value of the roundness is not extremely influenced by the fluctuation of the perimeter, and a more accurate Shape determination becomes possible. The calculation of the roundness can be performed using, for example, the following equation.

【0016】[0016]

【数2】 (Equation 2)

【0017】なお、式(2)における最大及び最小径
は、重心位置及び輪郭の間の距離から求められる重心位
置を同心とする外接円及び内接円の径寸法と同一となる
ため、径寸法として示してある。また、平均径は、例え
ば重心位置と、輪郭を構成する各画素との間の画素数
(距離)の平均値であってもよく、さらに最小二乗法等
を用いて演算する構成としてもよい。
Since the maximum and minimum diameters in the equation (2) are the same as the diameters of the circumscribed circle and the inscribed circle having the center of gravity determined from the distance between the center of gravity and the contour, the diameters are the same. It is shown as The average diameter may be, for example, an average value of the number of pixels (distance) between the position of the center of gravity and each of the pixels forming the contour, or may be configured to be calculated using a least square method or the like.

【0018】また、式(2)からも明確なように、最大
径及び最小径の差が可及的に小さく所謂、球状に近い形
状であればある程、真円度として値は「1」に近くな
り、前記差の増大に伴って真円度の値は小さくなる。
Further, as is clear from equation (2), as the difference between the maximum diameter and the minimum diameter is as small as possible and the shape is closer to a so-called sphere, the value of the roundness is "1". And the value of the roundness decreases as the difference increases.

【0019】[0019]

【発明の実施の形態】以下、本発明の実施の形態を図面
に基づいて具体的に説明する。図1は、本発明に係る形
状判定装置の構成を示すブロック図である。図1におい
て、21はコンベアである。コンベア21上には複数の
トレイT,T,…が所定の間隔で載置され、各トレイT
上には蜜柑又は柿等の球状の対象物Sが夫々載置され
る。このような構成により、コンベア21は、各対象物
SをトレイTとともに矢符方向へ搬送するようになって
いる。
Embodiments of the present invention will be specifically described below with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration of a shape determination device according to the present invention. In FIG. 1, reference numeral 21 denotes a conveyor. On the conveyor 21, a plurality of trays T, T,...
A spherical object S such as tangerine or persimmon is placed on the top, respectively. With such a configuration, the conveyor 21 conveys each object S together with the tray T in the arrow direction.

【0020】対象物S,S,…の搬送領域には、対象物
Sの上部及び側部を撮像する第1撮像装置11及び第2
撮像装置12がコンベア21の搬送方向に適長離隔して
配置されている。第1撮像装置11及び第2撮像装置1
2は、コンベア21を挿通させる開口を設けてなる遮光
性の筐体18,18を夫々備えている。
In the transport area of the objects S, S,..., The first imaging device 11 and the second
The imaging device 12 is arranged at an appropriate distance in the transport direction of the conveyor 21. First imaging device 11 and second imaging device 1
2 includes light-shielding housings 18 and 18 each having an opening through which the conveyor 21 is inserted.

【0021】各筐体18内には、主に対象物Sの上部に
投光するための直管状のハロゲンランプ及びリフレクタ
を備える上部投光器15,15が、コンベア21の搬送
方向に適長離隔して、コンベア21の搬送方向と直交す
るように配置されている。また、これらの上部投光器1
5,15の中間上方には、対象物Sを撮像する撮像器と
してのカメラ14が設置されている。
In each housing 18, upper light projectors 15, 15 each having a straight tubular halogen lamp and a reflector for mainly projecting light to the upper part of the object S are separated by a suitable length in the conveying direction of the conveyor 21. And is arranged so as to be orthogonal to the conveying direction of the conveyor 21. In addition, these upper projectors 1
A camera 14 as an image pickup device for picking up an image of the object S is installed in the middle upper part between 5 and 15.

【0022】コンベア21の両側縁部より少し斜め上方
には、球状のハロゲンランプ及びリフレクタを備える4
つの側部投光器16,16,…が、コンベア21と平行
をなす正方形の各頂点に相当する位置に設けてあり、各
側部投光器16から対象物Sの両側部に投光される。ま
た、コンベア21の搬送方向に対をなす2対の側部投光
器16,16の中間には、対象物Sの各側部像をカメラ
14に結像させる反射鏡17,17が夫々設けられてい
る。
Slightly obliquely above the side edges of the conveyor 21, a spherical halogen lamp and a reflector 4 are provided.
Are provided at positions corresponding to the vertices of a square parallel to the conveyor 21, and are projected from both side projectors 16 to both sides of the object S. Reflecting mirrors 17, 17 for forming respective side images of the object S on the camera 14 are provided between the two pairs of side projectors 16, 16 paired in the transport direction of the conveyor 21. I have.

【0023】また、第1撮像装置11及び第2撮像装置
12の間の搬送位置には、回動装置13が配置されてお
り、回動装置13は、コンベア21によってトレイTが
所定位置まで搬送される都度、トレイTとともにその上
に載置されている対象物Sを白抜矢符方向へ90°回動
させる。これによって、対象物SのトレイTに対向する
部分以外の部分についての撮像を行うことができるよう
になっている。
A rotating device 13 is disposed at a transfer position between the first image pickup device 11 and the second image pickup device 12, and the turn device 13 transfers the tray T to a predetermined position by the conveyor 21. Each time the operation is performed, the object S placed on the tray T together with the tray T is rotated by 90 ° in the direction of the white arrow. Thereby, it is possible to capture an image of a portion other than the portion of the object S facing the tray T.

【0024】コンベア21によって対象物Sが第1撮像
装置11又は第2撮像装置12内の適宜位置まで搬送さ
れると、カメラ14は、トレイTとともに対象物Sの上
部を直接的に、並びに反射鏡17,17に映ったトレイ
Tとともに対象物Sの両側部を間接的に撮像し、得られ
た画像信号をアナログ/ディジタル(A/D)変換器
2,2へ夫々与える。各A/D変換器2は、カメラ14
から与えられた画像信号を所定階調にディジタル変換
し、第1撮像装置11側のカメラ14からの画像信号は
形状判定装置3の第1フレームメモリ4に、また、第2
撮像装置12側のカメラ14からの画像信号は第2フレ
ームメモリ5に夫々与えられて記憶される。
When the object S is conveyed to an appropriate position in the first imaging device 11 or the second imaging device 12 by the conveyor 21, the camera 14 directly and upwardly reflects the upper portion of the object S together with the tray T. Both sides of the object S are indirectly imaged together with the tray T reflected on the mirrors 17 and 17 and the obtained image signals are supplied to analog / digital (A / D) converters 2 and 2, respectively. Each A / D converter 2 includes a camera 14
From the camera 14 on the side of the first image pickup device 11 to the first frame memory 4 of the shape determination device 3 and to the second frame signal.
The image signal from the camera 14 of the imaging device 12 is given to the second frame memory 5 and stored.

【0025】第1フレームメモリ4又は第2フレームメ
モリ5に画像が記憶される都度、その画像は形状判定部
6に与えられるようになっており、形状判定部6は、与
えられた画像を内蔵メモリ6aに予め記憶された閾値で
2値化することによって対象物Sの画像(対象物像)を
抽出し、得られた2値化画像に基づいて、直接的に撮像
して得た対象物Sの上部像、及び間接的に撮像して得た
対象物Sの両側部像における対象物Sの重心位置を特定
するとともに、2値化画像に基づいて対象物Sの輪郭を
抽出する。形状判定部6は、抽出した輪郭を構成する各
画素と、重心位置の画素との間の画素数を計数すること
によって距離を演算し、この距離に基づいて対象物Sの
各画像における真円度を演算し、演算結果をメモリ6a
に記憶してある閾値と比較することによって形状判定を
行なうように構成されている。なお、判定結果は選別装
置等に出力して利用される。
Each time an image is stored in the first frame memory 4 or the second frame memory 5, the image is given to the shape judging section 6. The shape judging section 6 incorporates the given image. An image (object image) of the object S is extracted by binarizing with a threshold value stored in advance in the memory 6a, and an object obtained by directly imaging based on the obtained binarized image. The position of the center of gravity of the object S in the upper image of S and both side images of the object S obtained by indirect imaging is specified, and the contour of the object S is extracted based on the binarized image. The shape determining unit 6 calculates the distance by counting the number of pixels between each pixel constituting the extracted contour and the pixel at the position of the center of gravity, and based on this distance, a perfect circle in each image of the object S. Calculate the degree and store the calculation result in the memory 6a.
Is configured to perform shape determination by comparing with a threshold value stored in. The determination result is output to a sorting device or the like for use.

【0026】また、上述した如き形状判定部6の処理
は、形状判定装置3が備えるEPROM7に記憶されて
いるコンピュータプログラムに基づいて実行される。さ
らに、EPROM7に記憶されるコンピュータプログラ
ムは、同じく形状判定装置3が備えるROMドライブ装
置の如き外部記憶読取部8を介して、該外部記憶読取部
8にセットされる記録媒体Mからコンピュータプログラ
ムを読み取ることも可能となっている。
The processing of the shape judging section 6 as described above is executed based on a computer program stored in the EPROM 7 provided in the shape judging device 3. Further, the computer program stored in the EPROM 7 is read from a recording medium M set in the external storage reading unit 8 via an external storage reading unit 8 such as a ROM drive device included in the shape determination device 3. It is also possible.

【0027】次に、このようなコンピュータプログラム
に基づいた形状判定部6の処理内容について詳述する。
図2は、本発明に係る形状判定装置3の形状判定部6の
処理内容を示すフローチャートであり、図3は、図2に
示したフローチャートの各処理における画像の内容を示
す模式図である。なお、図3における2値化画像(図3
(b))以後の画像においては図示の都合上、実際の色
とは白黒を逆転して示してある。
Next, the processing contents of the shape judging section 6 based on such a computer program will be described in detail.
FIG. 2 is a flowchart showing the processing content of the shape determination unit 6 of the shape determination device 3 according to the present invention, and FIG. 3 is a schematic diagram showing the content of an image in each processing of the flowchart shown in FIG. Note that the binarized image in FIG.
(B)) In the following images, for convenience of illustration, black and white are reversed from the actual colors.

【0028】形状判定部6は、まず、第1フレームメモ
リ4又は第2フレームメモリ5に記憶されている図3
(a)の如き原画像を取り込み(ステップ1)、取り込
んだ原画像を図3(b)に示す如く2値化することによ
って、対象物像をトレイTを含む背景画像から抽出する
(ステップ2)。
First, the shape judging section 6 stores the first frame memory 4 or the second frame memory 5 shown in FIG.
An original image as shown in FIG. 3A is fetched (step 1), and the fetched original image is binarized as shown in FIG. 3B to extract a target object image from a background image including the tray T (step 2). ).

【0029】続いて、形状判定部6は、図3(c)に示
す如く、抽出した対象物像にXY直交座標系を設定し、
X及びYの各軸についての輝度分布に基づいて公知の手
法を用いて1次モーメント演算を行ない、2値化画像か
ら対象物Sの重心位置の座標値を演算する(ステップ
3)。また、形状判定部6は、同様にしてXY直交座標
系を設定した2値化画像から空間フィルタ等を利用して
1次微分演算を行ない、図3(d)の如き対象物Sの輪
郭画像を抽出する(ステップS4)。なお、ステップ3
及び4は逆の順番にて処理を行なう構成としてもよいこ
とは云うまでもない。
Subsequently, the shape judging section 6 sets an XY orthogonal coordinate system for the extracted object image as shown in FIG.
First moment calculation is performed using a known method based on the luminance distributions for the X and Y axes, and the coordinate value of the center of gravity of the object S is calculated from the binarized image (step 3). In addition, the shape determination unit 6 similarly performs a first derivative operation using a spatial filter or the like from the binarized image in which the XY orthogonal coordinate system is set, and obtains a contour image of the object S as shown in FIG. Is extracted (step S4). Step 3
It is needless to say that the processes 4 and 4 may be performed in the reverse order.

【0030】次に、ステップ3及び4にて得た重心位置
の座標値と、輪郭画像を構成する各画素の座標値との間
の画素数に基づいて、重心位置を中心とした輪郭画像に
対する外接円及び内接円に相当する各径寸法(最大径,
最小径)を演算するとともに、この径寸法の平均値(平
均径)を演算する(ステップ5)。なお、前述したよう
に、平均径は、例えば重心位置と、輪郭画像を構成する
各画素との間の画素数の単なる平均値であってもよく、
さらに最小二乗法等を用いて演算する構成としてもよ
い。
Next, based on the number of pixels between the coordinate value of the position of the center of gravity obtained in steps 3 and 4 and the coordinate value of each pixel constituting the outline image, the contour image centered on the position of the center of gravity is determined. Each diameter dimension corresponding to the circumscribed circle and the inscribed circle (maximum diameter,
In addition to calculating the minimum diameter, an average value (average diameter) of the diameters is calculated (step 5). Note that, as described above, the average diameter may be, for example, a mere average value of the number of pixels between the position of the center of gravity and each pixel forming the contour image,
Further, the configuration may be such that the calculation is performed using the least square method or the like.

【0031】そして、演算し最大径,最小径,及び平均
径を前述した式(2)に代入することによって真円度を
演算し(ステップ6)、演算結果をメモリ6aに記憶さ
れた閾値と比較することによって適宜に形状判定を行な
う(ステップ7)。
Then, the roundness is calculated by substituting the calculated maximum diameter, the minimum diameter, and the average diameter into the above-described equation (2) (step 6), and the calculation result is compared with the threshold value stored in the memory 6a. The shape is appropriately determined by comparing (Step 7).

【0032】[0032]

【実施例】図4は、実施例における真円度演算に用いた
3つの桃のサンプルの上部像(原画像)を示す模式図で
あり、図5は、図4に示したサンプルについての従来方
法及び本発明方法の真円度の演算結果を示す図表であ
る。
FIG. 4 is a schematic diagram showing an upper image (original image) of three peach samples used in the roundness calculation in the embodiment, and FIG. 5 shows a conventional example of the sample shown in FIG. 6 is a table showing calculation results of the roundness of the method and the method of the present invention.

【0033】図4にその上部像を夫々示した如く、3つ
の桃は様々な形状をなしていることがわかる。さて、こ
れらの桃について式(1)に基づく従来方法と、式
(2)に基づく本発明方法との真円度演算を実施し、こ
れらの演算結果をサンプル毎に(a),(b),及び
(c)と図4に対応付けて図5に示してある。
As can be seen from FIG. 4, the three peaches have various shapes as their upper images are shown. Now, for these peaches, the roundness calculation of the conventional method based on the formula (1) and the method of the present invention based on the formula (2) is performed, and the calculation results are calculated for each sample as (a) and (b). , And (c) are shown in FIG. 5 in association with FIG.

【0034】従来方法においては、面積が(a)から4
659画素,4234画素,及び4695画素、また、
周囲長は263画素,252画素,及び265画素とな
っており、原画像においては形状が非常に異なっている
にも拘わらず、各画素数に差がないことがわかる。この
ため、結果として算出された真円度も夫々0.84と同
一の値となってしまっている。
In the conventional method, the area is changed from (a) to 4
659 pixels, 4234 pixels, and 4695 pixels,
The perimeters are 263 pixels, 252 pixels, and 265 pixels, and it can be seen that there is no difference in the number of pixels between the original images despite their very different shapes. For this reason, the roundness calculated as a result has the same value as 0.84, respectively.

【0035】一方、本発明方法においては、最大径及び
最小径が(a)で39.5画素,36.5画素、(b)
で38.5画素,33.5画素、及び(c)で42.0
画素,33.5画素となっており、偏平した(c)のサ
ンプルが他のサンプルと大きく値が異なって算出されて
いる。このため、結果として算出された真円度は、
(a)から0.92,0.86,及び0.77と夫々な
り、(a),(b),及び(c)の順にて真円度が高
く、実際の外観に近い結果となることがわかる。
On the other hand, in the method of the present invention, the maximum diameter and the minimum diameter are 39.5 pixels, 36.5 pixels in (a), and (b)
38.5 pixels, 33.5 pixels, and (c) 42.0 pixels
Pixels are 33.5 pixels, and the value of the flat sample (c) is calculated to be significantly different from other samples. Therefore, the resulting roundness is
(A) becomes 0.92, 0.86, and 0.77, respectively, and the roundness is high in the order of (a), (b), and (c), and the result is close to the actual appearance. I understand.

【0036】なお、特許請求の範囲の項に図面との対照
を便利にするための参照符号を付してあるが、これによ
って本発明は添付図面の構成に限定されるものではな
い。
It should be noted that, although the claims are provided with reference numerals for convenience of comparison with the drawings, the present invention is not limited to the configuration of the accompanying drawings.

【0037】[0037]

【発明の効果】以上詳述した如く本発明に係る真円度判
定方法、その真円度演算の実施に使用する真円度演算装
置、及び真円度演算のプログラムが記録してあるコンピ
ュータ読み取り可能な記録媒体にあっては、球状の対象
物を含む領域を撮像し、撮像画像を2値化することによ
って対象物像を抽出し、抽出した対象物像の重心位置を
演算する一方で、抽出した対象物像の輪郭を抽出し、重
心位置及び輪郭の間の距離に基づいて対象物の真円度を
演算する構成、より詳しくは、前記真円度を、前記距離
の平均値に対する前記距離の最大値及び最小値の差の割
合に基づいて演算する構成としたので、周囲長の変動に
伴って真円度の値を極端に左右されることがなく、より
正確な対象物の形状判定が可能となる等、本発明は優れ
た効果を奏する。
As described in detail above, the roundness determination method according to the present invention, the roundness calculating device used for performing the roundness calculation, and the computer readout of the roundness calculation program are recorded. In a possible recording medium, a region including a spherical target is imaged, the target image is extracted by binarizing the captured image, and the position of the center of gravity of the extracted target image is calculated. A configuration for extracting the contour of the extracted object image and calculating the roundness of the object based on the center of gravity position and the distance between the contours, more specifically, the roundness is calculated based on an average value of the distance. Since the calculation is based on the ratio of the difference between the maximum value and the minimum value of the distance, the value of the roundness is not extremely affected by the fluctuation of the perimeter, and the shape of the object is more accurate. The present invention has excellent effects, for example, the determination can be made.

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

【図1】本発明に係る形状判定装置の構成を示すブロッ
ク図である。
FIG. 1 is a block diagram illustrating a configuration of a shape determination device according to the present invention.

【図2】本発明に係る形状判定装置の形状判定部の処理
内容を示すフローチャートである。
FIG. 2 is a flowchart illustrating processing performed by a shape determination unit of the shape determination device according to the present invention.

【図3】図2に示したフローチャートの各処理における
画像の内容を示す模式図である。
FIG. 3 is a schematic diagram showing the contents of an image in each process of the flowchart shown in FIG. 2;

【図4】実施例における真円度演算に用いた3つの桃の
サンプルの上部像(原画像)を示す模式図である。
FIG. 4 is a schematic diagram showing an upper image (original image) of three peach samples used for roundness calculation in the embodiment.

【図5】図4に示したサンプルについての従来方法及び
本発明方法の真円度の演算結果を示す図表である。
FIG. 5 is a table showing calculation results of roundness of the sample shown in FIG. 4 by the conventional method and the method of the present invention.

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

3 形状判定装置 6 形状判定部 7 EPROM 8 外部記憶読取部 14 カメラ M 記録媒体 S 対象物 Reference Signs List 3 shape determination device 6 shape determination unit 7 EPROM 8 external storage reading unit 14 camera M recording medium S target

フロントページの続き Fターム(参考) 2F065 AA17 AA26 AA48 AA52 BB05 BB15 DD03 FF01 GG02 HH02 HH13 JJ03 JJ09 JJ26 LL12 MM02 PP15 QQ04 QQ13 QQ21 QQ23 QQ33 TT01 TT03 2G051 AA05 AB20 BA01 BA20 CA04 CA07 DA01 DA06 DA08 EA08 EA11 EA12 EA14 EC03 ED07 ED23 Continued on the front page F-term (reference) 2F065 AA17 AA26 AA48 AA52 BB05 BB15 DD03 FF01 GG02 HH02 HH13 JJ03 JJ09 JJ26 LL12 MM02 PP15 QQ04 QQ13 QQ21 QQ23 QQ33 TT01 TT03 2G051 AA05 EA01 DA08 ED23

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 球状の対象物(S)を含む領域を撮像
し、撮像画像を2値化することによって対象物像を抽出
し(S2)、抽出結果に基づいて前記対象物像の真円度
を演算し、演算結果に基づいて前記対象物(S)の形状
を判定する真円度判定方法において、 前記対象物像の重心位置を演算する第1ステップ(S
3)と、前記対象物像の輪郭を抽出する第2ステップ
(S4)と、前記重心位置及び輪郭の間の距離に基づい
て前記対象物像の真円度を演算する第3ステップ(S
6)と、前記真円度に基づいて前記対象物(S)の形状
を判定する第4ステップ(S7)とを有することを特徴
とする真円度判定方法。
1. An image including an area including a spherical object (S) is imaged, an image of the object is extracted by binarizing the captured image (S2), and a perfect circle of the image of the object is extracted based on the extraction result. A roundness determination method for calculating the degree of the object and determining the shape of the object (S) based on the calculation result;
3), a second step (S4) of extracting the contour of the object image, and a third step (S4) of calculating the roundness of the object image based on the position of the center of gravity and the distance between the contours.
6) and a fourth step (S7) of determining the shape of the object (S) based on the roundness.
【請求項2】 前記第3ステップ(S6)における真円
度を、前記距離の平均値に対する前記距離の最大値及び
最小値の差の割合に基づいて演算する請求項1記載の真
円度判定方法。
2. The roundness determination according to claim 1, wherein the roundness in the third step (S6) is calculated based on a ratio of a difference between a maximum value and a minimum value of the distance to an average value of the distance. Method.
【請求項3】 撮像器(14)により撮像された球状の
対象物(S)を含む領域の撮像画像を2値化することに
よって対象物像を抽出し(S2)、抽出結果に基づいて
前記対象物像の真円度を演算する真円度演算装置におい
て、 前記対象物像の重心位置を演算する重心位置演算手段
(6)と、前記対象物像の輪郭を抽出する輪郭抽出手段
(6)と、前記重心位置及び輪郭の間の距離に基づいて
前記対象物像の真円度を演算する真円度演算手段(6)
とを備えることを特徴とする真円度演算装置(3,
6)。
3. An object image is extracted by binarizing a captured image of a region including a spherical object (S) captured by an imager (14) (S2), and based on the extraction result, A roundness calculating device for calculating a roundness of an object image, a center-of-gravity position calculating means (6) for calculating a center-of-gravity position of the object image, and a contour extracting means (6) for extracting a contour of the object image. ) And roundness calculating means (6) for calculating the roundness of the object image based on the distance between the position of the center of gravity and the contour.
And a roundness calculation device (3,
6).
【請求項4】 前記真円度演算手段(6)は、前記距離
の平均値に対する前記距離の最大値及び最小値の差の割
合に基づいて真円度を演算すべくなしてある請求項3記
載の真円度演算装置(3,6)。
4. The roundness calculating means (6) calculates roundness based on a ratio of a difference between a maximum value and a minimum value of the distance to an average value of the distance. The roundness calculation device (3, 6) described.
【請求項5】 コンピュータに、撮像器(14)により
撮像された球状の対象物(S)を含む領域の撮像画像を
2値化することによって対象物像を抽出させるプログラ
ムコード手段(S2)と、抽出させた結果に基づいて前
記対象物像の真円度を演算させるプログラムコード手段
とを含む真円度演算のプログラムが記憶されているコン
ピュータでの読み取りが可能な記録媒体において、 コンピュータ(3,6)に、前記対象物像の重心位置を
演算させる第1プログラムコード手段(S3)と、コン
ピュータ(3,6)に、前記対象物像の輪郭を抽出させ
る第2プログラムコード手段(S4)と、コンピュータ
(3,6)に、前記重心位置及び輪郭の間の距離に基づ
いて前記対象物像の真円度を演算させる第3プログラム
コード手段(S6)とを含むプログラムが記録されてい
ることを特徴とする記録媒体(7,M)。
5. A program code means (S2) for causing a computer to extract a target object image by binarizing a captured image of a region including the spherical target object (S) captured by the image pickup device (14). A program code means for calculating the roundness of the object image based on the extracted result; and a computer-readable recording medium storing a program for calculating the roundness. , 6), the first program code means (S3) for calculating the position of the center of gravity of the object image, and the second program code means (S4) for causing the computer (3, 6) to extract the contour of the object image. Third program code means (S6) for causing a computer (3, 6) to calculate the roundness of the object image based on the distance between the position of the center of gravity and the contour; Recording medium on which the program comprising is characterized in that it is recorded (7, M).
【請求項6】 前記第3プログラムコード手段(S6)
は、前記距離の平均径に対する前記距離の最大値及び最
小値の差の割合に基づいて真円度をコンピュータ(3,
6)に演算させるべくなしてある請求項5記載の記録媒
体(7,M)。
6. The third program code means (S6)
Calculates the circularity based on the ratio of the difference between the maximum value and the minimum value of the distance to the average diameter of the distance, using a computer (3,
6. The recording medium (7, M) according to claim 5, wherein said recording medium is adapted to be operated by (6).
JP29455099A 1999-10-15 1999-10-15 Circularity deciding method, circularity arithmetic unit, and recording medium Pending JP2001116534A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29455099A JP2001116534A (en) 1999-10-15 1999-10-15 Circularity deciding method, circularity arithmetic unit, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29455099A JP2001116534A (en) 1999-10-15 1999-10-15 Circularity deciding method, circularity arithmetic unit, and recording medium

Publications (1)

Publication Number Publication Date
JP2001116534A true JP2001116534A (en) 2001-04-27

Family

ID=17809252

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29455099A Pending JP2001116534A (en) 1999-10-15 1999-10-15 Circularity deciding method, circularity arithmetic unit, and recording medium

Country Status (1)

Country Link
JP (1) JP2001116534A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004108909A (en) * 2002-09-18 2004-04-08 Daihatsu Motor Co Ltd Paint testing apparatus
JP2007240457A (en) * 2006-03-10 2007-09-20 Oshikiri:Kk Shape determination device, and mixed compound molding system
JP2007532929A (en) * 2004-04-19 2007-11-15 シック アイヴィピー エービー Measuring device and method in distribution system
JP2008020347A (en) * 2006-07-13 2008-01-31 Akita Prefecture Legume discrimination structure
JP2009115526A (en) * 2007-11-05 2009-05-28 Daido Steel Co Ltd Roundness measuring method of inspection object
WO2016158719A1 (en) * 2015-03-31 2016-10-06 株式会社Screenホールディングス Image processing method, control program, and image processing device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004108909A (en) * 2002-09-18 2004-04-08 Daihatsu Motor Co Ltd Paint testing apparatus
JP2007532929A (en) * 2004-04-19 2007-11-15 シック アイヴィピー エービー Measuring device and method in distribution system
JP2007240457A (en) * 2006-03-10 2007-09-20 Oshikiri:Kk Shape determination device, and mixed compound molding system
JP2008020347A (en) * 2006-07-13 2008-01-31 Akita Prefecture Legume discrimination structure
JP2009115526A (en) * 2007-11-05 2009-05-28 Daido Steel Co Ltd Roundness measuring method of inspection object
WO2016158719A1 (en) * 2015-03-31 2016-10-06 株式会社Screenホールディングス Image processing method, control program, and image processing device

Similar Documents

Publication Publication Date Title
US20200134857A1 (en) Determining positions and orientations of objects
Huang et al. Real-time classification of green coffee beans by using a convolutional neural network
US20040037457A1 (en) Detecting and classifying blemishes on the transmissive surface of an image sensor package
US4513316A (en) Automatic surface inspection system
CA2053176A1 (en) Method of and apparatus for inspecting bottle or the like
US9628659B2 (en) Method and apparatus for inspecting an object employing machine vision
JP2001116534A (en) Circularity deciding method, circularity arithmetic unit, and recording medium
JP2000163579A (en) Appearance inspection method and device
JP3316400B2 (en) Container inspection by field programmable array logic
JPH10137696A (en) Separation method and its device
Lefcourt et al. Algorithms for parameterization of dynamics of inertia-based apple orientation
JP3653063B2 (en) Agricultural product quality judgment device and agricultural product quality judgment method
JPH04184573A (en) Visual device, such as fruit collecting machine or the like
JPH1038542A (en) Method and device for object recognition and recording medium
JPH09161056A (en) Inspecting method for inner surface of circular container
JP2006234519A (en) Inspection method of particulate body and inspection device using it
JP2000293666A (en) Method and device for detecting flaw and recording medium
JPH0723845B2 (en) Defect detection method
CN114354628B (en) Rhizome agricultural product defect detection method based on machine vision
JPH067171B2 (en) Moving object detection method
JP2006234518A (en) Inspection method of particlate body and inspection device using it
JPH09288068A (en) Appearance inspecting instrument
JP2003123077A5 (en)
JP2642185B2 (en) Angle detector
JPH08313580A (en) Method and device for inspecting printed pattern