JPH09293142A - Method for recognizing article - Google Patents

Method for recognizing article

Info

Publication number
JPH09293142A
JPH09293142A JP8105034A JP10503496A JPH09293142A JP H09293142 A JPH09293142 A JP H09293142A JP 8105034 A JP8105034 A JP 8105034A JP 10503496 A JP10503496 A JP 10503496A JP H09293142 A JPH09293142 A JP H09293142A
Authority
JP
Japan
Prior art keywords
color
tableware
article
vector
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
JP8105034A
Other languages
Japanese (ja)
Inventor
Takuya Haketa
卓哉 羽毛田
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.)
TEC CORP
Original Assignee
TEC 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 TEC CORP filed Critical TEC CORP
Priority to JP8105034A priority Critical patent/JPH09293142A/en
Publication of JPH09293142A publication Critical patent/JPH09293142A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To securely identify the color of an article even if the color of the center part of the article cannot be identified and to improve the precision of article recognition by means of adding it to the identification of an outline. SOLUTION: A partial outline side is expansion-processed (S31) and statistics on the AND picture of the saturation picture of tableware and the expanded side is taken (S32). When a low saturation part is not less than a threshold, it is judged to be an achromatic part (S33) and the AND picture of the lightness picture of tableware and the expanded partial outline side is generated (S34). Then, it is divided into a low lightness part and a high lightness part with the appropriate threshold, and statistics on the number of picture elements is taken (S34). When the low lightness part is not less than the threshold, the color of the partial outline side is made into black (S35 and S36). When the low lightness part does not exist for not less than the threshold, the color of the partial outline side is made into white (S37). When the low saturation part does not exist for not less than the threshold, it is judged to be the high saturation part (S33), and the AND picture of the color picture of tableware and the expanded partial outline side is generated (S38). It is color-divided by the appropriate threshold and statistics on the number of the picture elements in the respective color divisions is taken. Then, the division with the largest number of the picture elements is set to be the color of the partial outline side (S39).

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、食器等の物品の認
識方法にかかり、特に物品の輪郭とともに縁の色を識別
して物品を認識する物品の認識方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of recognizing an article such as tableware, and more particularly to a method of recognizing an article by identifying the contour color of the article and the color of the edge.

【0002】[0002]

【従来の技術】例えば、社員食堂などではトレー上に御
飯、味噌汁、おかずなどが入った各種食器を載せて社員
に手渡されるが、このような社員食堂において形状やサ
イズの異なる各種食器毎に盛り付けする料理と料金を決
めておき、トレー上に載せられた各種食器のパターンを
カメラで撮像して識別することでトレー上に載っている
各種料理の料金を自動的に精算する装置が知られてい
る。
2. Description of the Related Art For example, in an employee cafeteria, various dishes with rice, miso soup, side dishes, etc. are placed on a tray and handed to employees. In such an employee cafeteria, various dishes with different shapes and sizes are served. A device is known that automatically determines the price of various dishes on the tray by deciding the dishes to be served and the fee, and imaging the patterns of various tableware placed on the tray with a camera to identify them. There is.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、料理毎
に食器の形状や大きさを変えたのでは料理の種類が多く
なると、それに応じて形状や大きさの異なる多種類の食
器を用意しなければならず、食器の管理が面倒になる。
そこで、同一形状同一大きさであっても食器の色を変え
ることで異なる料理に対処することが考えられるが、し
かし、食器の場合は内部に料理の盛り付けが行われてい
るため、単に食器全体を撮像したのでは料理の色も撮像
することになり食器の色を識別することはできない。
However, if the shape and size of the tableware are changed for each dish and the number of kinds of dishes increases, it is necessary to prepare various types of tableware having different shapes and sizes accordingly. Not only that, the management of tableware becomes troublesome.
Therefore, it is possible to deal with different dishes by changing the color of the tableware even if they have the same shape and size, but in the case of tableware, the dishes are arranged inside the tableware, so the entire tableware is simply used. If the image of is taken, the color of the dish is also taken, and the color of the tableware cannot be identified.

【0004】そこで、請求項1記載の発明は、食器に料
理が盛り付けされている場合のように物品の中央部の色
が識別できない場合であっても物品の色を確実に識別で
き、物品の色の識別と輪郭の識別により物品認識の精度
を向上できる物品の認識方法を提供する。
Therefore, according to the first aspect of the present invention, even when the color of the central portion of the article cannot be identified such as when dishes are served on the tableware, the color of the article can be surely identified, and Provided is a method for recognizing an article, which can improve the accuracy of article recognition by identifying a color and an outline.

【0005】また、請求項2記載の発明は、中央部の色
が識別できない複数の物品が接触した状態にあっても各
物品の色を確実に識別でき、各物品の色の識別と輪郭の
識別により接触した物品認識の精度を向上できる物品の
認識方法を提供する。
According to the second aspect of the present invention, the color of each article can be surely identified even when a plurality of articles whose central portions cannot be identified are in contact with each other. Provided is a method of recognizing an article, which can improve the accuracy of recognizing an article contacted by identification.

【0006】[0006]

【課題を解決するための手段】請求項1記載の発明は、
物品を撮像カメラで撮像し、この撮像した物品の輪郭を
抽出して物品を認識するパターン認識方法において、抽
出した輪郭を膨脹させて作成した画像と物品の色の情報
を含む画像との論理積画像を作成し、この論理積画像の
統計をとることにより物品の縁の色を識別し、これによ
り物品を認識することにある。
According to the first aspect of the present invention,
In a pattern recognition method of recognizing an article by extracting an image of the article with an imaging camera and recognizing the contour of the article, a logical product of an image created by expanding the extracted contour and an image including color information of the article An image is created, and the color of the edge of the article is identified by taking statistics of the logical product image, thereby recognizing the article.

【0007】請求項2記載の発明は、複数の物品を撮像
カメラで撮像し、この撮像した各物品の輪郭を抽出して
各物品を認識するパターン認識方法において、抽出した
輪郭を部分輪郭辺に分割し、この各部分輪郭辺を膨脹さ
せて作成した画像と物品の色の情報を含む画像との論理
積画像をそれぞれ作成し、この各論理積画像の統計をと
ることにより各物品の縁の色を識別し、これにより各物
品を認識することにある。
According to a second aspect of the present invention, in a pattern recognition method in which a plurality of articles are picked up by an image pickup camera, the contours of the picked-up articles are extracted, and each article is recognized, the extracted contours are defined as partial contour sides. Divide and create a logical product image of the image created by expanding each partial contour side and the image containing the color information of the article, and by taking the statistics of each logical product image, the edge of each article The purpose is to identify the colors and thereby identify each item.

【0008】[0008]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して説明する。なお、この実施の形態は本発明を
食堂における料金自動精算装置に適用したものについて
述べる。図1は全体の構成を示すブロック図で、トレー
1に載せた各種食器2,2,…を撮像カメラ3で撮像
し、この撮像カメラ3からの画像信号を食器認識装置4
に供給している。
Embodiments of the present invention will be described below with reference to the drawings. In addition, this Embodiment describes what applied this invention to the automatic charge settlement device in a cafeteria. FIG. 1 is a block diagram showing the overall configuration. Various tableware 2, 2, ... Mounted on a tray 1 is imaged by an imaging camera 3, and an image signal from the imaging camera 3 is imaged by a tableware recognition device 4
To supply.

【0009】前記食器認識装置4は、食器画像取込部
5、食器画像分離部6、図形認識部7及び料金精算部8
からなり、前記食器画像取込部5が撮像カメラ3からの
画像信号を取込むと次段の食器画像分離部6に供給す
る。食器画像分離部6は画像から背景色を除去して食器
画像のみを分離し次段の図形認識部7に供給する。この
とき、食器の彩度、色相、明度の情報を有する画像を保
存する。前記図形認識部7は食器画像のパターンから図
形の形状、大きさ、色を認識し、それぞれの図形がどの
食器かを識別して前記料金精算部8に供給する。前記料
金精算部8には予め食器の形状、大きさ、色に応じて料
理の価格が設定されており、この料金精算部8は、図形
認識部7での食器の識別結果に基づいてトレー1の各種
食器2に載っている料理の合計金額を算出して表示器に
表示する。客は、この表示器に表示した合計金額に基づ
いて金銭支払いを行い精算を行うことになる。
The tableware recognizing device 4 includes a tableware image capturing section 5, a tableware image separating section 6, a figure recognizing section 7, and a charge settlement section 8.
When the tableware image capturing section 5 captures an image signal from the image pickup camera 3, the tableware image capturing section 5 supplies the image signal to the next tableware image separating section 6. The tableware image separation unit 6 removes the background color from the image, separates only the tableware image, and supplies it to the figure recognition unit 7 in the next stage. At this time, an image having information on the saturation, hue, and brightness of the tableware is saved. The figure recognition unit 7 recognizes the shape, size, and color of the figure from the pattern of the tableware image, identifies which tableware each figure is, and supplies it to the fee settlement unit 8. The price of the dish is set in advance in the fee settlement unit 8 according to the shape, size, and color of the tableware. The fee settlement unit 8 uses the tray 1 based on the tableware identification result of the figure recognition unit 7. The total price of the dishes on the tableware 2 is calculated and displayed on the display. The customer pays the money based on the total amount displayed on the display and pays the amount.

【0010】前記図形認識部7は、要部を構成し、図2
に示す流れ図に基づく処理を行うようになっている。こ
の処理は、先ず、S1にて、分離した食器画像を2値化
し輪郭を抽出する。続いて、S2にて、直線、円弧への
分解を行う。すなわち、抽出した輪郭をベクタライズす
ることにより、輪郭を構成する個々の点の座標を取り出
す。例えば、輪郭が図3に示すように抽出されたとする
と、この輪郭を部分輪郭辺に分解する。部分輪郭辺への
分解は、図4に示すように、輪郭上を2つの隣接した小
ベクトルa,bで捜査してベクトル同士のなす角がある
閾値以上の部分を四角形の食器の内角、又は食器同士の
接触部分と判断し削除することで行う。この結果、図5
に示すように部分輪郭辺T1 ,T2 ,T3 ,T4 ,T5
を得る。
The figure recognizing section 7 constitutes a main part and is shown in FIG.
Processing based on the flowchart shown in FIG. In this process, first, in S1, the separated tableware image is binarized and the contour is extracted. Then, in S2, decomposition into straight lines and circular arcs is performed. That is, the coordinates of the individual points forming the contour are extracted by vectorizing the extracted contour. For example, if the contour is extracted as shown in FIG. 3, the contour is decomposed into partial contour sides. As shown in FIG. 4, the decomposition into the partial contour sides is performed by searching the contour with two adjacent small vectors a and b, and if the angle formed by the vectors is equal to or larger than a threshold value, the interior angle of the rectangular tableware, or This is done by determining that the tableware is in contact with each other and deleting it. As a result, FIG.
As shown in, the partial contour sides T1, T2, T3, T4, T5
Get.

【0011】このとき、四角形の内角の検出を行い、さ
らに内角の座標を求める。図6に示すように、ベクトル
aから見て左回りを+、すなわち、ベクトルaとbのな
す角は+と定義し、また、ベクトルaから見て右回りを
−、すなわち、ベクトルaとcのなす角は−と定義す
る。
At this time, the inside angle of the quadrangle is detected, and the coordinates of the inside angle are obtained. As shown in FIG. 6, the counterclockwise direction viewed from the vector a is defined as +, that is, the angle formed by the vectors a and b is defined as +, and the clockwise direction viewed from the vector a is −, that is, the vectors a and c. The angle formed by is defined as −.

【0012】四角形の内角は、例えば、図7に示すよう
に、輪郭を左回りに辿ると、内角の部分ではベクトルa
から見てベクトルbは+90度であり、四角形同士が接
触した部分では−90度になる。なお、輪郭を右回りに
辿ればこの逆となる。同様な方法で、a,bのベクトル
の向きを互いに逆方向にして輪郭上を辿ってもベクトル
同士の向きの関係は内角と四角形の接触部分で逆にな
る。また、食器の角は厳密には丸いことから、ベクトル
aとベクトルbの間を少し開けることによって内角、接
触部分をより確実に検出できる。
The inner angle of the quadrangle is, for example, when the contour is traced counterclockwise as shown in FIG.
Seen from above, the vector b is +90 degrees, and is −90 degrees at the portions where the quadrangles are in contact with each other. If the contour is traced clockwise, the opposite is true. In the same way, even if the directions of the vectors of a and b are made opposite to each other and traced on the contour, the relationship of the directions of the vectors becomes opposite at the contact portion of the interior angle and the quadrangle. Further, since the corners of the tableware are strictly round, the inner corner and the contact portion can be detected more reliably by opening a little between the vector a and the vector b.

【0013】このような条件に当てはまる内角の座標を
求める。なお、このような方法で検出した輪郭上の点を
内角の座標としてもよいが、食器の角は厳密には丸いこ
とを考慮すれば、内角として検出した点からベクトルa
とベクトルbを離して、このベクトルa,bの直線の方
程式を求めて2直線の交点を内角の座標としてもよい。
また、2つのベクトルを離さないで同様の捜査を行って
もよい。内角の検出においてベクトルaとベクトルbを
離すことによって内角を検出した場合は、その時のベク
トルaとベクトルbをそのまま使用することもできる。
この内角の座標の求め方は図8に示す。
The coordinates of the interior angle that meet these conditions are determined. It should be noted that the points on the contour detected by such a method may be used as the coordinates of the interior angle, but considering that the corners of the tableware are strictly round, the vector a is detected from the point detected as the interior angle.
The vector b may be separated from each other, and the equation of the straight line of the vectors a and b may be obtained and the intersection of the two straight lines may be used as the coordinates of the interior angle.
Also, a similar investigation may be performed without separating the two vectors. When the interior angle is detected by separating the vector a and the vector b in the interior angle detection, the vector a and the vector b at that time can be used as they are.
The method of obtaining the coordinates of the interior angle is shown in FIG.

【0014】このように部分輪郭辺への分解と内角の検
出及び内角の座標を決定することができる。なお、部分
輪郭辺が円弧であるか直線であるかは、例えば、始点が
同じで終点の違う二つのベクトルを辺のベクトルデータ
から作成し、ベクトル間の角度がほとんど無ければ直
線、角度があれば円弧として検出できる。続いて、S3
にて、分解した個々の部分輪郭辺の色を求める。これ
は、図9に示す流れ図に基づいた処理を行う。
As described above, the decomposition into the partial contour side, the detection of the interior angle, and the coordinates of the interior angle can be determined. Whether the partial contour side is a circular arc or a straight line is determined by, for example, creating two vectors with the same start point but different end points from the vector data of the sides, and if there is almost no angle between the vectors For example, it can be detected as an arc. Then, S3
At, the color of each separated partial contour side is obtained. This performs the processing based on the flowchart shown in FIG.

【0015】これは、先ず、S31にて、分解した部分
輪郭辺を膨脹処理する。例えば、部分輪郭辺T1 につい
て考えると、図10の(a) に示す部分輪郭辺T1 を膨脹
して図10の(b) に示すように太らせる。続いて、S3
2にて、食器2の彩度の画像と膨脹させた辺との論理積
画像の統計をとる。すなわち、図10の(c) から(d) に
示すような処理を行って論理積画像を作成し、さらに適
当な閾値により有彩部分(高彩度部分)と無彩部分(低
彩度部分)とにわけ、それぞれの画素数の統計をとる。
これは、図10の(e) に示す色区分を2つにした場合に
相当する。
First, in S31, the decomposed partial contour side is expanded. For example, considering the partial contour side T1, the partial contour side T1 shown in FIG. 10 (a) is expanded to be thickened as shown in FIG. 10 (b). Then, S3
At 2, the statistics of the logical product image of the saturation image of the tableware 2 and the inflated side are taken. That is, the logical product image is created by performing the processes shown in (c) to (d) of FIG. 10, and the chromatic part (high-saturation part) and the achromatic part (low-saturation part) are further divided by an appropriate threshold value. Then, the statistics of the number of pixels are taken.
This corresponds to the case where there are two color sections shown in (e) of FIG.

【0016】続いて、S33にて、彩度の低い部分があ
る閾値以上あるかを判断し、彩度の低い部分がある閾値
以上あれば無彩部分と判断し、続いて、S34にて、食
器2の明度の画像と膨脹させた部分輪郭辺との論理積画
像を作成する。そして、適当な明度の閾値により、低明
度部分と高明度部分に分け、それぞれの画素数の統計を
とる。続いて、S35にて、明度の低い部分がある閾値
以上あるかを判断し、明度の低い部分がある閾値以上あ
れば、S36にて部分輪郭辺の色は黒であると判断し、
また、明度の低い部分がある閾値以上無ければ、S37
にて、部分輪郭辺の色は白であると判断する。
Subsequently, in S33, it is determined whether the low saturation portion is above a certain threshold value, and if the low saturation portion is above a certain threshold value, it is determined to be an achromatic portion, and then in S34. An AND image of the brightness image of the tableware 2 and the inflated partial contour side is created. Then, it is divided into a low lightness portion and a high lightness portion by an appropriate lightness threshold value, and statistics of the number of pixels of each are taken. Subsequently, in S35, it is determined whether or not the low lightness portion is above a certain threshold value. If the low lightness portion is above a certain threshold value, it is determined in S36 that the color of the partial contour side is black,
If there is no low-brightness part above a certain threshold, S37
Then, it is determined that the color of the partial contour side is white.

【0017】また、S33にて、彩度の低い部分がある
閾値以上無い場合は、高色彩部分と判断する。そして、
S38にて、食器2の色相の画像と膨脹させた部分輪郭
辺との論理積画像を作成する。そして、適当な閾値によ
りいくつかの色区分にわけ、それぞれの色区分に含まれ
る画素数の統計をとる。そして、S39にて、最も画素
数の多い色相区分をその部分輪郭辺の色とする。
If it is determined in S33 that the low-saturation portion does not exceed a certain threshold, it is determined to be a high-color portion. And
In S38, a logical product image of the hue image of the tableware 2 and the inflated partial contour side is created. Then, it is divided into several color sections by an appropriate threshold value, and the statistics of the number of pixels included in each color section are obtained. Then, in S39, the hue section having the largest number of pixels is set as the color of the partial contour side.

【0018】以上のS31〜S39の処理を個々の部分
輪郭辺について全て行うことで、各部分輪郭辺の色を正
確に識別でき、個々の食器2の縁の色を求めることがで
きる。すなわち、食器2内に料理が載っていても食器2
の縁の色を正確に識別して食器2の色を正確に求めるこ
とができる。以上のようにして分解した直線辺データと
内角データ、部分輪郭辺の色の情報を用いて、S4に
て、四角形の判断を行う。
By performing the above-described processing of S31 to S39 for all the individual partial contour sides, the color of each partial contour side can be accurately identified, and the edge color of each tableware 2 can be obtained. That is, even if a dish is placed in the tableware 2, the tableware 2
The color of the tableware 2 can be accurately obtained by accurately identifying the color of the edge of the tableware 2. Using the straight-line side data, interior angle data, and color information of the partial contour side decomposed as described above, a quadrangle is determined in S4.

【0019】この四角形の判断は、図11に基づいて行
う。なお、この図11の処理は左向きに輪郭を辿った場
合の処理であり、また、ある閾値よりも短い辺は判断の
対象外としている。すなわち、S41にて、直線辺の両
端にどのような角が存在するかを検出し、データとして
登録する。
The determination of this quadrangle is made based on FIG. The processing of FIG. 11 is processing when the contour is traced leftward, and the sides shorter than a certain threshold are excluded from the determination target. That is, in S41, what angles are present at both ends of the straight side is detected and registered as data.

【0020】続いて、S42にて、同一図形を構成する
互いに垂直な2辺を検出する。ここでは、着目する辺の
右側に存在する同一図形を構成する垂直な辺の検出を行
う。図12の(a) に示すように、先ず、着目する辺Pの
ベクトルaに対し辺Qのベクトルbは+90度でなけれ
ばならない。この原理は内角を検出した時と同様の理論
である。さらに、辺Pと辺Qの間の距離はある閾値内で
あることも条件となる。
Subsequently, in S42, two mutually perpendicular sides forming the same figure are detected. Here, the vertical side that constitutes the same figure existing on the right side of the target side is detected. As shown in (a) of FIG. 12, first, the vector b of the side Q must be +90 degrees with respect to the vector a of the side P of interest. This principle is the same theory as when the internal angle is detected. Furthermore, it is a condition that the distance between the side P and the side Q is within a certain threshold.

【0021】しかし、これだけの条件では確実な検出を
行うことはできない。例えば、図12の(b) に示すよう
な場合、着目する辺Pのベクトルaに対し辺Qのベクト
ルbは+90度でなければならないという条件は満たし
ているが、明らかに辺Pと辺Qは同一図形の縦と横の辺
ではない。そこで、辺Pの先と辺Qの原点を結んだベク
トルcを作成し、ベクトルaとベクトルcのなす角が−
ならNG、+ならOKとする。図12の(b) の場合はな
す角が−となるのでNGとなり、同一図形を構成する互
いに垂直な2辺として検出しない。
However, reliable detection cannot be performed under these conditions. For example, in the case shown in FIG. 12B, the condition that the vector b of the side Q must be +90 degrees with respect to the vector a of the side P of interest is satisfied, but the sides P and Q are obviously Is not the vertical and horizontal sides of the same figure. Therefore, a vector c connecting the tip of the side P and the origin of the side Q is created, and the angle between the vector a and the vector c is −
If it is NG, if +, it is OK. In the case of (b) of FIG. 12, the angle formed is −, and therefore NG, which is not detected as two mutually perpendicular sides forming the same figure.

【0022】また、着目する辺Pの右側にすでに内角を
検出している場合、内角と辺Qの原点(Q上ならどこで
もよい。)を結んだベクトルcとベクトルaのなす角は
90度でなければならないが、図13の(a) の場合は、
着目する辺Pのベクトルaに対し辺Qのベクトルbは+
90度でなければならないという条件は満たしている
が、2つの四角形が接していて、辺Pと辺Qはそれぞれ
別の図形に属する辺と考えられるためNGとする。これ
に対し、図13の(b) の場合は、内角と辺Qの原点を結
んだベクトルcとベクトルaのなす角が90度となって
いるのでOKとする。なお、図中○は検出済みの+90
度の内角を示している。
When the interior angle has already been detected on the right side of the side P of interest, the angle formed by the vector c and the vector a connecting the interior angle and the origin of the side Q (anywhere on Q) is 90 degrees. Although it must be, in the case of (a) of FIG.
The vector b of the side Q is + the vector a of the side P of interest
Although the condition that it has to be 90 degrees is satisfied, two quadrangles are in contact with each other, and the side P and the side Q are considered to be sides belonging to different figures, so they are set to NG. On the other hand, in the case of FIG. 13B, the angle formed by the vector a and the vector c connecting the interior angle and the origin of the side Q is 90 degrees, so that it is OK. In the figure, ○ indicates +90 that has been detected.
Indicates the interior angle of degrees.

【0023】また、辺Qの左側に検出済みの+90度の
内角が存在した場合、辺Pの先とその内角をむすんだベ
クトルcと辺P上のベクトルaとのなす角によって同一
図形の辺であるか否かを判別する。図14の場合は、ベ
クトルcとベクトルaのなす角が90度ではなくNGと
なる。また、辺Pの右、辺Qの左の両方に違う内角が存
在する場合は、角と角を結ぶベクトルを作成するまでも
なく、NGとなる。これは同一図形であれば同じ内角を
共有するはずであるからである。
If there is a detected interior angle of +90 degrees on the left side of the side Q, the side of the same figure is defined by the angle between the tip of the side P and the vector c on which the interior angle is formed and the vector a on the side P. Or not. In the case of FIG. 14, the angle formed by the vector c and the vector a is not 90 degrees but NG. Further, when different inner angles exist on both the right side of the side P and the left side of the side Q, it becomes NG without creating a vector connecting the angles. This is because the same figure should share the same interior angle.

【0024】以上のように、辺と辺との関係、辺と内角
との関係、内角と内角との関係を検証することにより、
2辺が同一図形の縦と横の辺であるかどうかがわかる。
As described above, by verifying the relationship between sides, the relationship between sides and interior angles, and the relationship between interior angles and interior angles,
It can be seen whether the two sides are the vertical and horizontal sides of the same figure.

【0025】続いて、S43にて、同一図形を構成する
互いに平行な2辺を検出する。これは、先ず、図15に
示すように、着目する辺Pと検出対象の辺Qは重なり部
分を有し、辺Pのベクトルaと辺Qのベクトルbのなす
角は180度でなければならない。しかし、これだけで
は同一図形を構成する平行辺であるかどうかはわからな
い。今までに検出した内角と垂直辺の情報を使ってさら
に2つの平行辺が同一図形であるかどうかを検証する。
Then, in S43, two parallel sides forming the same figure are detected. First, as shown in FIG. 15, the side P of interest and the side Q of the detection target have an overlapping portion, and the angle between the vector a of the side P and the vector b of the side Q must be 180 degrees. . However, this alone does not tell whether or not parallel sides that form the same figure. It is verified whether two parallel sides are the same figure by using the information of the interior angle and the vertical side detected so far.

【0026】着目する辺Pと検出対象の辺Qは重なり部
分を有し、辺Pのベクトルaと辺Qのベクトルbのなす
角は180度でなければならないという条件を満たす
他、辺Pの右側に内角が存在するならば、その内角と辺
Qの原点を結んだベクトルcと辺Pのベクトルaのなす
角は+90度以上でなければならないという条件を満た
す必要がある。このようなことが起きるのは四角形が接
している場合と考えられる。従って、図16の(a) に示
す図形の場合は、内角(図中○の部分)と辺Qの原点を
結んだベクトルcと辺Pのベクトルaのなす角は+90
度以下なのでNGとなる。
The side P of interest and the side Q to be detected have an overlapping portion, and the angle between the vector a of the side P and the vector b of the side Q must be 180 degrees. If the interior angle exists on the right side, it is necessary to satisfy the condition that the angle between the vector c connecting the interior angle and the origin of the side Q and the vector a of the side P must be +90 degrees or more. It is considered that this happens when the quadrangles are in contact. Therefore, in the case of the figure shown in FIG. 16 (a), the angle formed by the vector c of the side P and the vector c connecting the interior angle (the circled portion in the figure) and the origin of the side Q is +90.
Since it is below the degree, it will be NG.

【0027】また、着目する辺Pと検出対象の辺Qは重
なり部分を有し、辺Pのベクトルaと辺Qのベクトルb
のなす角は180度でなければならないという条件を満
たす他、辺Pの右側にすでに検出した同一図形を構成す
る垂直辺Rが存在するならば、垂直辺Rの原点(R上な
らどこでもよい。)と辺Qの原点を結んだベクトルcと
辺Pのベクトルaのなす角は+90度以上でなければな
らないという条件を満たす必要がある。従って、図16
の(b) に示す図形の場合は、垂直辺Rの原点と辺Qの原
点を結んだベクトルcと辺Pのベクトルaのなす角は+
90度以下なのでNGとなる。
The side P of interest and the side Q of the detection target have an overlapping portion, and the vector a of the side P and the vector b of the side Q are included.
In addition to the condition that the angle formed by must be 180 degrees, and if there is a vertical side R that constitutes the same figure that has already been detected on the right side of the side P, the origin of the vertical side R (anywhere on R is acceptable. ) And the vector c connecting the origin of the side Q and the vector a of the side P must meet the condition that the angle must be +90 degrees or more. Therefore, FIG.
In the case of the figure shown in (b), the angle between the vector c connecting the origin of the vertical side R and the origin of the side Q and the vector a of the side P is +
Since it is below 90 degrees, it will be NG.

【0028】同じような原理で、着目する辺Pと検出対
象の辺Qは重なり部分を有し、辺Pのベクトルaと辺Q
のベクトルbのなす角は180度でなければならないと
いう条件を満たす他、辺Pの右側に内角が存在し、辺Q
の左側にも内角が存在するならば、内角同士を結んだベ
クトルcと辺Pのベクトルaのなす角は+90度以上で
なければならないという条件を満たす必要がある。従っ
て、図16の(c) に示す図形の場合は、内角同士を結ん
だベクトルcと辺Pのベクトルaのなす角は+90度以
下なのでNGとなる。
Under the same principle, the side P of interest and the side Q to be detected have an overlapping portion, and the vector a of the side P and the side Q
In addition to satisfying the condition that the angle formed by the vector b of 180 degrees must be 180 degrees, there is an interior angle on the right side of the side P, and the side Q
If there is an interior angle also on the left side of, the condition that the angle between the vector c connecting the interior angles and the vector a of the side P must be +90 degrees or more must be satisfied. Therefore, in the case of the figure shown in FIG. 16 (c), the angle between the vector c connecting the interior angles and the vector a of the side P is +90 degrees or less, so that the figure is NG.

【0029】このような検証を辺Pの左側の内角、垂直
辺についても行う。さらに、辺Pと辺Qの立場を置き換
えて同様の検証を行うとさらに精度を向上できる。すな
わち、辺Pと辺Qの立場を置き換えた場合は、辺Qの左
側に内角が存在し、辺Pの先端と内角を結んだベクトル
cと辺Pのベクトルaのなす角は+90度以下でなけれ
ばならないという条件を満たす必要があるのに対し、図
16の(d) に示す図形の場合は、ベクトルcと辺Pのベ
クトルaのなす角が+90度を越えているのでNGとな
る。
Such verification is also performed for the inner corner on the left side of the side P and the vertical side. Further, the accuracy can be further improved by replacing the positions of the side P and the side Q and performing the same verification. That is, when the positions of the side P and the side Q are replaced, an inner angle exists on the left side of the side Q, and the angle between the vector c connecting the tip of the side P and the inner angle and the vector a of the side P is +90 degrees or less. In the case of the figure shown in (d) of FIG. 16, the condition that it must be satisfied must be satisfied, but since the angle between the vector c and the vector a of the side P exceeds +90 degrees, it becomes NG.

【0030】以上のようにして、内角、同一図形を構成
する垂直辺、平行辺の検出を行うことになる。続いて、
S44にて、同一図形に含まれる辺をまとめ、図形番号
を与える。そして、S45にて、各図形に対し、四角形
の判別条件に基づき識別を行う。すなわち、S42及び
S43にて求めた情報を用いて四角形の大きさを決定す
る。
As described above, the interior angle, the vertical side and the parallel side forming the same figure are detected. continue,
In S44, the sides included in the same figure are put together and a figure number is given. Then, in S45, each figure is identified based on the determination condition of the quadrangle. That is, the size of the quadrangle is determined using the information obtained in S42 and S43.

【0031】四角形の大きさを決定する条件は、図17
に示すように、同一図形として登録した辺の中に平行辺
P,Qが存在する場合は、平行辺間の距離dを四角形の
大きさとする。また、平行辺が存在しない場合は、図1
8に示すように、着目する辺Pの一方に垂直辺Qが存在
し、もう一方に内角Yが存在する場合、辺Pと辺Qの交
点と内角Yの距離dを四角形の大きさとするか、図19
に示すように、着目する辺Pの両端に内角Y,Zが存在
する場合、内角Y,Zの距離dを四角形の大きさとす
る。
The conditions for determining the size of the rectangle are shown in FIG.
When parallel sides P and Q exist among the sides registered as the same figure, the distance d between the parallel sides is set to the size of a quadrangle. If there is no parallel side,
As shown in FIG. 8, when the vertical side Q exists on one side of the side P of interest and the interior angle Y exists on the other side, whether the distance d between the intersection point of the sides P and Q and the interior angle Y is the size of a quadrangle. , FIG. 19
As shown in, when the inside angles Y and Z are present at both ends of the side P of interest, the distance d between the inside angles Y and Z is set to the size of a quadrangle.

【0032】なお、着目する辺Pの一方に垂直辺Qが存
在し、もう一方に垂直辺Rが存在する場合は、辺Pと辺
Qの交点と辺Pと辺Rの交点との距離で四角形の大きさ
を求めることができる。また、この場合は辺Qと辺Rと
は平行辺となっているので、平行辺が存在する場合とし
ても四角形の大きさを求めることができる。
When one side P of interest has a vertical side Q and the other side has a vertical side R, the distance between the intersection of sides P and Q and the intersection of sides P and R is determined. The size of the rectangle can be calculated. Further, in this case, since the side Q and the side R are parallel sides, the size of the quadrangle can be obtained even if the parallel sides exist.

【0033】また、上述した条件に当てはまらない場
合、すなわち、S46にて、条件を満たさない図形が1
つでも存在すればトレー1上の食器2を置き直す。以上
のように、平行辺、垂直辺、内角の情報を用いることに
よって、たとえ複数の四角形の食器2が接触していた
り、四角形の食器2に円形の食器2が重なっていても四
角形の食器のパターン及び大きさを精度よく、正確に認
識することができる。
If the above conditions are not met, that is, in S46, the number of figures that do not meet the conditions is 1
If any exist, replace the dishes 2 on the tray 1. As described above, by using the information on the parallel sides, the vertical sides, and the inside angles, even if a plurality of square tableware 2 are in contact with each other or the circular tableware 2 overlaps with the circular tableware 2, The pattern and size can be recognized accurately and accurately.

【0034】S4での四角形の判断が終了すると、続い
てS5にて、円形の判断を行う。この円形の判断は、従
来と同様に最小2乗法により、円弧の中心、半径を識別
し、半径、中心の近い円弧辺は同一の食器を構成するも
のとして円形の食器の判断を行う。これにより、円形の
食器も正確に認識できる。
When the determination of the quadrangle in S4 is completed, the determination of the circle is subsequently performed in S5. In this circular judgment, the center and the radius of the arc are identified by the least squares method as in the conventional method, and the circular tableware is judged by assuming that the arc and the arc side close to the center constitute the same tableware. As a result, circular tableware can be recognized accurately.

【0035】このように、食器2の画像を2値化し輪郭
を抽出した後、この輪郭を部分輪郭辺に分解し、この分
解した個々の部分輪郭辺を膨脹させ、この膨脹させた辺
と食器2の彩度の画像との論理積画像の統計をとり閾値
と比較することで有彩部分と無彩部分にわけている。そ
して、無彩部分についてはさらに食器2の明度の画像と
膨脹させた部分輪郭辺との論理積画像の統計をとり閾値
と比較することで部分輪郭辺が白か黒かを判断し、ま
た、有彩部分についてはさらに食器2の色相の画像と膨
脹させた部分輪郭辺との論理積画像の統計をとり、適当
な閾値によりいくつかの色区分にわけ、それぞれの色区
分に含まれる画素数の統計をとることで部分輪郭辺の色
を判断しているので、食器2内に料理が載っていても食
器の縁の色を正確に識別して食器の色を正確に求めるこ
とができる。また、色の異なる食器が接触した状態にあ
っても各食器の縁の色を正確に識別して各食器の色を正
確に求めることができる。
In this way, after binarizing the image of the tableware 2 and extracting the contours, the contours are decomposed into partial contour sides, the decomposed individual partial contour sides are expanded, and the expanded side and the tableware are expanded. A chromatic portion and an achromatic portion are separated by taking a statistic of an AND image with an image with a saturation of 2 and comparing it with a threshold value. Then, for the achromatic portion, it is further determined whether the partial contour edge is white or black by obtaining the statistics of the logical product image of the image of the brightness of the tableware 2 and the expanded partial contour edge and comparing it with a threshold value. For the chromatic portion, the statistics of the image of the logical product of the hue image of the tableware 2 and the inflated side of the contour are taken, divided into several color categories by an appropriate threshold, and the number of pixels included in each color category is calculated. Since the color of the partial contour side is determined by taking the statistic of 1, the color of the edge of the tableware 2 can be accurately identified and the color of the tableware can be accurately obtained even if the dish is placed on the tableware 2. Further, even if tableware having different colors are in contact with each other, the color of the edge of each tableware can be accurately identified and the color of each tableware can be accurately obtained.

【0036】従って、食器として同一形状同一大きさで
あっても色が異なれば別の食器として判断でき、また、
同一形状同一大きさで色の異なる食器が接触した状態に
あっても各食器の色を正確に識別できるので、食器認識
の精度を向上できる。従って、同一形状同一大きさの色
の異なる食器を別の料理に使用できるので、形状や大き
さの異なる食器の種類を極力少なくでき、換言すれば少
ない食器の種類で多くの料理に対処でき、食器の管理が
容易となる。なお、この実施の形態は本発明を食堂にお
ける料金自動精算装置に適用し、食器の認識を行う場合
について述べたが必ずしもこれに限定するものではな
く、食器以外の他の物品の認識にも適用できる。
Therefore, even if the dishes have the same shape and size, but different colors, they can be judged as different dishes.
Even if tableware having the same shape and the same size but different colors are in contact with each other, the color of each tableware can be accurately identified, so that the accuracy of tableware recognition can be improved. Therefore, since different dishes having the same shape and size and different colors can be used for different dishes, the number of dishes having different shapes and sizes can be minimized, in other words, many dishes can be dealt with with a small number of dishes, The tableware can be easily managed. In addition, although this embodiment has described the case where the present invention is applied to a charge automatic settlement device in a cafeteria to recognize tableware, the present invention is not necessarily limited to this, and is also applied to recognition of articles other than tableware. it can.

【0037】[0037]

【発明の効果】以上、請求項1記載の発明によれば、食
器に料理が盛り付けされている場合のように物品の中央
部の色が識別できない場合であっても物品の色を確実に
識別でき、物品の色の識別と輪郭の識別により物品認識
の精度を向上できる。また、請求項2記載の発明にれ
ば、中央部の色が識別できない複数の物品が接触した状
態にあっても各物品の色を確実に識別でき、各物品の色
の識別と輪郭の識別により接触した物品認識の精度を向
上できる。
As described above, according to the first aspect of the present invention, the color of the article can be surely identified even when the color of the central portion of the article cannot be identified such as when dishes are served on a table. Therefore, the accuracy of the article recognition can be improved by identifying the color and the contour of the article. According to the invention of claim 2, the color of each article can be surely identified even when a plurality of articles whose central color cannot be identified are in contact with each other. Therefore, the accuracy of recognizing the contacted article can be improved.

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

【図1】本発明の実施の形態を示す料金自動精算装置の
ブロック図。
FIG. 1 is a block diagram of an automatic charge settlement apparatus showing an embodiment of the present invention.

【図2】同実施の形態における図形認識部の図形認識処
理を示す流れ図。
FIG. 2 is a flowchart showing a graphic recognition process of a graphic recognition unit in the embodiment.

【図3】図2における図形認識処理を説明するための画
像輪郭例を示す図。
FIG. 3 is a diagram showing an example of an image contour for explaining the graphic recognition processing in FIG.

【図4】図3の画像輪郭例における部分輪郭辺への分解
処理を説明するための図。
FIG. 4 is a diagram for explaining a decomposition process into partial contour sides in the image contour example of FIG. 3;

【図5】図3の画像輪郭例を部分輪郭辺に分解した画像
輪郭例を示す図。
FIG. 5 is a diagram showing an image contour example in which the image contour example of FIG. 3 is decomposed into partial contour sides.

【図6】図4の部分輪郭辺への分解処理において四角形
の内角を検出する場合の角度の定義を説明するための
図。
6A and 6B are views for explaining the definition of an angle when the interior angle of a quadrangle is detected in the decomposition processing into the partial contour sides in FIG.

【図7】図4の部分輪郭辺への分解処理における四角形
の内角及び接触部分の角の検出方法を説明するための
図。
7A and 7B are views for explaining a method of detecting an inner corner of a quadrangle and a corner of a contact portion in the decomposition processing into the partial contour sides in FIG.

【図8】図4の部分輪郭辺への分解処理における四角形
の内角の座標の求め方を説明するための図。
8A and 8B are views for explaining how to obtain the coordinates of the inside angle of the quadrangle in the decomposition processing into the partial contour sides in FIG.

【図9】図2の図形認識処理における辺の色を求める処
理を詳細に示す流れ図。
FIG. 9 is a flowchart showing in detail the processing for obtaining a side color in the graphic recognition processing of FIG.

【図10】図9における辺の色を求める処理を説明する
ための模式図。
FIG. 10 is a schematic diagram for explaining a process for obtaining a side color in FIG.

【図11】図2の図形認識処理における四角形の判断処
理を詳細に示す流れ図。
FIG. 11 is a flowchart showing in detail the quadrilateral determination processing in the figure recognition processing of FIG.

【図12】図11の四角形の判断処理における垂直辺検
出時のOK,NGの判断条件を説明するための図。
FIG. 12 is a diagram for explaining OK / NG determination conditions when a vertical side is detected in the square determination process of FIG. 11;

【図13】図11の四角形の判断処理における垂直辺検
出時のOK,NGの判断条件を説明するための図。
FIG. 13 is a diagram for explaining OK / NG determination conditions when a vertical side is detected in the square determination process of FIG. 11;

【図14】図11の四角形の判断処理における垂直辺検
出時のNGの判断条件を説明するための図。
14 is a diagram for explaining NG determination conditions when a vertical side is detected in the square determination process of FIG.

【図15】図11の四角形の判断処理における平行辺検
出時の判断条件を説明するための図。
FIG. 15 is a diagram for explaining a determination condition when detecting parallel sides in the determination process of the quadrangle in FIG. 11;

【図16】図11の四角形の判断処理における平行辺検
出時のNGの判断条件を説明するための図。
16 is a diagram for explaining NG determination conditions when parallel sides are detected in the square determination process of FIG.

【図17】図11の四角形の判断処理において平行辺が
存在するときの四角形の大きさの決定を説明するための
図。
FIG. 17 is a diagram for explaining the determination of the size of a quadrangle when there are parallel sides in the quadrangle determination process of FIG. 11.

【図18】図11の四角形の判断処理において平行辺が
存在しないときの四角形の大きさの決定を説明するため
の図。
18 is a diagram for explaining determination of the size of a quadrangle when there are no parallel sides in the quadrangle determination process of FIG. 11.

【図19】図11の四角形の判断処理において平行辺が
存在しないときの四角形の大きさの決定を説明するため
の図。
19 is a diagram for explaining determination of the size of a quadrangle when there is no parallel side in the quadrangle determination process of FIG. 11.

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

2…食器 3…撮像カメラ 4…食器認識装置 7…図形認識部 2 ... tableware 3 ... imaging camera 4 ... tableware recognition device 7 ... figure recognition unit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 物品を撮像カメラで撮像し、この撮像し
た物品の輪郭を抽出して物品を認識する方法において、 抽出した輪郭を膨脹させて作成した画像と物品の色の情
報を含む画像との論理積画像を作成し、この論理積画像
の統計をとることにより物品の縁の色を識別し、これに
より物品を認識することを特徴とする物品の認識方法。
1. A method of recognizing an article by imaging the article with an imaging camera and extracting the contour of the imaged article, wherein an image created by expanding the extracted contour and an image including color information of the article are provided. A method for recognizing an article, characterized in that the color of the edge of the article is identified by creating a logical AND image of the above and the statistics of this logical image are taken, and the article is recognized by this.
【請求項2】 複数の物品を撮像カメラで撮像し、この
撮像した各物品の輪郭を抽出して各物品を認識する方法
において、 抽出した輪郭を部分輪郭辺に分割し、この各部分輪郭辺
を膨脹させて作成した画像と物品の色の情報を含む画像
との論理積画像をそれぞれ作成し、この各論理積画像の
統計をとることにより各物品の縁の色を識別し、これに
より各物品を認識することを特徴とする物品の認識方
法。
2. A method of recognizing each article by imaging a plurality of articles with an imaging camera and extracting the contours of each of the captured articles, wherein the extracted contours are divided into partial contour sides, and each of these partial contour sides And the image containing the color information of the article is created, and the color of the edge of each article is identified by taking the statistics of each of the AND images. A method of recognizing an article, which comprises recognizing an article.
JP8105034A 1996-04-25 1996-04-25 Method for recognizing article Pending JPH09293142A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8105034A JPH09293142A (en) 1996-04-25 1996-04-25 Method for recognizing article

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8105034A JPH09293142A (en) 1996-04-25 1996-04-25 Method for recognizing article

Publications (1)

Publication Number Publication Date
JPH09293142A true JPH09293142A (en) 1997-11-11

Family

ID=14396738

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8105034A Pending JPH09293142A (en) 1996-04-25 1996-04-25 Method for recognizing article

Country Status (1)

Country Link
JP (1) JPH09293142A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729851A (en) * 2017-10-24 2018-02-23 湖北工业大学 A kind of Chinese meal dinner party table top is set a table intelligent scoring method and system
JP2018156274A (en) * 2017-03-16 2018-10-04 株式会社リコー Image processing apparatus, image processing method, and program
CN112201117A (en) * 2020-09-29 2021-01-08 深圳市优必选科技股份有限公司 Logic board identification method and device and terminal equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018156274A (en) * 2017-03-16 2018-10-04 株式会社リコー Image processing apparatus, image processing method, and program
CN107729851A (en) * 2017-10-24 2018-02-23 湖北工业大学 A kind of Chinese meal dinner party table top is set a table intelligent scoring method and system
CN107729851B (en) * 2017-10-24 2020-12-29 湖北工业大学 Intelligent scoring method and system for table arrangement of Chinese meal banquet table
CN112201117A (en) * 2020-09-29 2021-01-08 深圳市优必选科技股份有限公司 Logic board identification method and device and terminal equipment

Similar Documents

Publication Publication Date Title
JP4970195B2 (en) Person tracking system, person tracking apparatus, and person tracking program
JPH11503588A (en) Method and apparatus for positioning television camera used in virtual studio
CN108986129B (en) Calibration plate detection method
JP4062987B2 (en) Image area dividing method, image area dividing apparatus, and image area dividing program
CN110009615A (en) The detection method and detection device of image angle point
JP3372419B2 (en) Object recognition method
JP3322569B2 (en) Component image edge detection method and component shape recognition device
JPH09293142A (en) Method for recognizing article
US6675120B2 (en) Color optical inspection system
KR100702292B1 (en) Image code and method and apparatus for recognizing thereof
JP2017079326A (en) Identification device, traceability system, and identification method
JP3456096B2 (en) Shape inspection method
JP2000030033A (en) Person detecting method
JP2023061880A (en) Collation device and program
JP3358997B2 (en) Engraved mark identification device
JP2004326382A (en) Component recognizing system and method, and program for recognizing component
JPH09185717A (en) Pattern recognizing method for article
JP3022459B2 (en) Form identification registration device
CN112219207A (en) Method for optically identifying a marking
JP3823379B2 (en) Image processing method
JPH08202878A (en) Picture processor
JPH08201041A (en) Method for recognizing three-dimensional shape
US20020191850A1 (en) Real time object localization and recognition from silhouette images
JPH1091788A (en) Device for positioning pattern and method therefor
JP3706431B2 (en) Part shape recognition device