JP5510924B2 - Bread identification device and program - Google Patents

Bread identification device and program Download PDF

Info

Publication number
JP5510924B2
JP5510924B2 JP2010035842A JP2010035842A JP5510924B2 JP 5510924 B2 JP5510924 B2 JP 5510924B2 JP 2010035842 A JP2010035842 A JP 2010035842A JP 2010035842 A JP2010035842 A JP 2010035842A JP 5510924 B2 JP5510924 B2 JP 5510924B2
Authority
JP
Japan
Prior art keywords
bread
color
pan
color image
feature amount
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.)
Active
Application number
JP2010035842A
Other languages
Japanese (ja)
Other versions
JP2011170745A (en
Inventor
雅和 森本
壽 神戸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hyogo Prefectural Government
Original Assignee
Hyogo Prefectural Government
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 Hyogo Prefectural Government filed Critical Hyogo Prefectural Government
Priority to JP2010035842A priority Critical patent/JP5510924B2/en
Publication of JP2011170745A publication Critical patent/JP2011170745A/en
Application granted granted Critical
Publication of JP5510924B2 publication Critical patent/JP5510924B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Description

この発明はパンの識別に関し、特に画像認識によりパンの種類を識別する装置とそのプログラムとに関する。   The present invention relates to bread identification, and more particularly to an apparatus for identifying a bread type by image recognition and a program thereof.

パンの種類を識別したいとの要求がある。例えばパン焼き釜からどの種類のパンを何個焼き上げたのかを自動的に認識し、生産管理を行いたいとの要求がある。またパンの販売時にトレー上のパンの種類と種類毎の数を自動的に認識し、価格の計算と販売数の管理を自動化したいとの要求がある。パン焼き釜の付近で、パンの種類と個数を人手でキー入力するのは面倒であるし、粉にまみれた手でキーを押すのは好ましくない。販売員がパンの種類を正確に見分けるのには熟練が必要で、未熟練の販売員がPOS端末から人手で入力するには無理がある。   There is a request to identify the type of bread. For example, there is a request for automatically recognizing how many types of bread are baked from a bread-baking kettle and managing production. In addition, there is a demand for automatically recognizing the type of bread and the number of each type of bread on the tray when selling bread, and automating price calculation and management of the number of sales. It is troublesome to manually input the type and number of breads near the bread-baking pot, and it is not preferable to press the keys with hands covered with flour. Skills are necessary for the salesperson to accurately identify the type of bread, and it is impossible for an unskilled salesperson to input manually from a POS terminal.

食品の種類の識別に関して、特許文献1(特開2000-225049A)は皿上の寿司の種類を画像認識することを開示している。特許文献1では、同一の販売価格で類似したパターンが存在する場合、寿司の種類毎に皿への並べ方を変えることを提案している。しかしながらこの手法は、パンの種類の識別には有効とは考えにくい。   Regarding the identification of the type of food, Patent Document 1 (Japanese Patent Laid-Open No. 2000-225049A) discloses image recognition of the type of sushi on a plate. In patent document 1, when the similar pattern exists with the same sales price, it proposes changing the arrangement to a plate for every kind of sushi. However, this method is unlikely to be effective for identifying the type of bread.

パンの識別での問題点は、以下の点にある。
1) パンの色は基本的に焦げ茶色で、形状は円形に近いものが多い。
2) 同種のパンでも個体間で形状の差が大きく、例えば種類が同じクロワッサンでも、パンの縦横比、パンの中央部での横方向の突起の有無など、形状が変化に富んでいる。
3) ピロシキとカレーパンなど、種類が異なるにもかかわらず、揚げパンで平面視で真円でないなど、基本的特徴が共通なものがある。
4) こしアンパンと粒アンパンのように、極めて類似したパンがある。
The problems in bread identification are as follows.
1) The color of the bread is basically dark brown, and the shape is almost circular.
2) There is a large difference in shape among individuals even in the same type of bread. For example, even in the same type of croissant, the shape of the bread varies widely, such as the aspect ratio of the bread and the presence or absence of lateral protrusions in the center of the bread.
3) Some of the basic features are common, such as fried bread and not a perfect circle in plan view, such as piroshki and curry bread.
4) There are very similar breads such as strained and breaded bread.

特開2000-225049AJP2000-225049A

この発明の課題は、画像認識によりパンの種類を正確に識別することにある。   An object of the present invention is to accurately identify the type of bread by image recognition.

この発明のパンの識別装置は、カメラからのパンのカラー画像を画像認識することにより、パンの種類を識別する装置であって、
パンのカラー画像から、パンの内側領域のカラー画像と、中間領域のカラー画像と、外側領域のカラー画像の3種類のカラー画像を切り出す切り出し部と、
パンのカラー画像から、パンの輪郭に関する特徴量を求めるための輪郭データ抽出部と、 パンのカラー画像から、パンのテクスチャーに関する特徴量を、パンのカラーデータ中の輝度成分を用いて、求めるためのテクスチャーデータ抽出部と、
パンの内側領域のカラー画像のカラースペース内での特徴量を求めるための内側カラーデータ抽出部と、
パンの外側領域のカラー画像のカラースペース内での特徴量を求めるための外側カラーデータ抽出部と、
パンの中間領域のカラー画像のカラースペース内での特徴量を求めるための中間カラーデータ抽出部と、
前記各抽出部で求めた特徴量によりパンの種類を識別する識別部、とを備えている。
The bread identifying apparatus of the present invention is an apparatus for identifying a type of bread by recognizing a color image of a pan from a camera,
A cutout unit that cuts out three types of color images from the color image of the pan, the color image of the inner region of the pan, the color image of the intermediate region, and the color image of the outer region ;
A contour data extraction unit for obtaining a feature value related to the outline of the bread from the color image of the bread, and a feature value related to the texture of the bread from the color image of the bread using the luminance component in the color data of the bread. Texture data extraction unit of
An inner color data extraction unit for obtaining a feature amount in the color space of the color image of the inner area of the pan;
An outer color data extraction unit for obtaining a feature amount in the color space of the color image of the outer region of the pan;
An intermediate color data extraction unit for obtaining a feature amount in the color space of the color image of the intermediate area of the pan;
An identification unit for identifying the type of bread based on the feature amount obtained by each of the extraction units.

この発明のパンの識別プログラムは、
カメラからのパンのカラー画像を画像認識することにより、パンの種類を識別するために、
コンピュータを、
パンのカラー画像から、パンの内側領域のカラー画像と、中間領域のカラー画像と、外側領域のカラー画像の3種類のカラー画像を切り出す切り出し部と、
パンのカラー画像から、パンの輪郭に関する特徴量を求めるための輪郭データ抽出部と、
パンのカラー画像から、パンのテクスチャーに関する特徴量を、パンのカラーデータ中の輝度成分を用いて、求めるためのテクスチャーデータ抽出部と、
パンの内側領域のカラー画像のカラースペース内での特徴量を求めるための内側カラーデータ抽出部と、
パンの外側領域のカラー画像のカラースペース内での特徴量を求めるための外側カラーデータ抽出部と、
パンの中間領域のカラー画像のカラースペース内での特徴量を求めるための中間カラーデータ抽出部と、
前記各抽出部で求めた特徴量によりパンの種類を識別する識別部、として機能させる。
The bread identification program of the present invention is
In order to identify the type of pan by recognizing the pan color image from the camera,
Computer
A cutout unit that cuts out three types of color images from the color image of the pan, the color image of the inner region of the pan, the color image of the intermediate region, and the color image of the outer region ;
An outline data extraction unit for obtaining a feature amount related to the outline of the bread from the color image of the bread,
A texture data extraction unit for obtaining a feature amount related to the texture of the bread from the color image of the bread using a luminance component in the color data of the bread ;
An inner color data extraction unit for obtaining a feature amount in the color space of the color image of the inner area of the pan;
An outer color data extraction unit for obtaining a feature amount in the color space of the color image of the outer region of the pan;
An intermediate color data extraction unit for obtaining a feature amount in the color space of the color image of the intermediate area of the pan;
It functions as an identification unit that identifies the type of bread based on the feature value obtained by each extraction unit.

好ましくは、前記識別部は、パンの全ての種類の中からパンの種類を識別する第1段の識別部と、少なくとも第1段の識別部でパンの種類を特定できなかったものに対して、第1段で識別したパンの種類の候補を対象としてパンの種類を識別する第2段の識別部とからなる。 Preferably, the identification unit is configured to identify a bread type among all types of bread, and at least a first type identification unit that cannot identify a bread type. And a second-stage identifying unit for identifying the bread type for the bread type candidate identified in the first stage .

この発明では、パンの輪郭、パンのテクスチャー、パンを内側と中間と外側とに分割した際の、内側と中間と外側とのカラースペースでの特徴を用いて、パンの種類を識別する。パンの輪郭は、アンパン、ロールパンなどの丸いパンと、デニッシュ、フランスパンなどの細長いパン、食パン系の四角いパン、ピザ系の三角のパンの識別に有効である。テクスチャーは、ロールパン、パイ系のパンなどのパン皮自体のテクスチャーと、揚げパンのパン粉のテクスチャー、砂糖をまぶしたパンでの砂糖粒、豆パンでの豆などを識別に利用できる。パンの内側のカラーデータはトッピングの色を反映し、外側のカラーデータはパン自体の色を反映し、中間領域と外側領域ではパンの焼き色などが異なる。これらの特徴はいずれも単独でパンを識別するには不十分であるが、これらの特徴を組合せることにより、多種類のパンをほぼ正確に識別できる。 In the present invention, the type of bread is identified by using the features of the inner, middle, and outer color spaces when the bread is divided into the inner, middle, and outer sides . The bread outline is effective for identifying round bread such as Anpan and roll bread, elongated bread such as Danish and French bread, square bread of bread and pizza triangle. The texture can be used to identify the texture of the bread crust itself, such as roll bread and pie bread, the texture of the bread crumbs of the deep-fried bread, the sugar grains in the bread sprinkled with sugar, and the beans in the bean bread. The color data on the inside of the pan reflects the topping color, the color data on the outside reflects the color of the pan itself, and the baked color of the pan is different between the intermediate region and the outer region. All of these features are insufficient to identify bread alone, but by combining these features, many types of bread can be identified almost accurately.

しかしながら、こしアンパンと粒アンパンなどのように、極めて類似したパンを識別することは難しい。そこで第1段階の識別でパンの種類をほぼ識別した後に、第2段階の識別により、類似したパンのグループ内で識別すると、正確にパンの種類を識別できる。第2段階の識別は、例えば第1段階で識別が困難なものに対してのみ行えばよい。   However, it is difficult to distinguish very similar breads such as strained bread and grained bread. Therefore, if the bread type is substantially identified by the first stage identification and then identified in the similar bread group by the second stage identification, the bread type can be accurately identified. The identification at the second stage may be performed only for those that are difficult to identify at the first stage, for example.

パンの種類を正確に識別すると、パンの販売時に価格計算を自動化でき、販売数量をパンの種類毎に自動的に求めることができる。またパンの生産数量と種類とを正確に求めることができる。   If the type of bread is accurately identified, the price calculation can be automated when the bread is sold, and the sales quantity can be automatically determined for each type of bread. In addition, the production quantity and type of bread can be determined accurately.

実施例の識別装置のブロック図Block diagram of identification device of embodiment 実施例での特徴量の抽出(前処理)アルゴリズムを示すフローチャートThe flowchart which shows the feature-value extraction (pre-processing) algorithm in an Example 背景(トレー)からのパンの切り出しを示す図Diagram showing bread cut from background (tray) パンを左側の内側、中央部の中間、右側の外側の3領域へ分割することを示す図The figure which divides | segments bread into 3 area | regions of the inner side of the left side, the middle part of the center, and the outer side of the right side 実施例での学習アルゴリズムを示すフローチャートThe flowchart which shows the learning algorithm in the execution example 実施例での識別アルゴリズムを示すフローチャートThe flowchart which shows the identification algorithm in an Example 第1段の識別での特徴数と正解率との関係を示す図The figure which shows the relationship between the number of features in the 1st step | paragraph identification, and a correct answer rate 第2段での識別の例を示す図で、右側のパンは「ミルクフランス」、左側のパンは「アーモンドフランス」である。It is a figure which shows the example of identification in the 2nd stage, The bread | pan on the right side is "Milk France", and the bread | pan on the left side is "Almond France".

以下に本発明を実施するための最適実施例を示す。この発明の範囲は、特許請求の範囲の記載に基づき、明細書の記載とこの分野での周知技術とを参酌し、当業者の理解に従って定められるべきである。   In the following, an optimum embodiment for carrying out the present invention will be shown. The scope of the present invention should be determined according to the understanding of those skilled in the art based on the description of the scope of the claims, taking into account the description of the specification and well-known techniques in this field.

図1〜図8に実施例を示す。図1に実施例の識別装置2を示し、4は適宜の光源で、6はCCDカメラで、他のカメラでも良い。8は背景分離部で、CCDカメラ6のカラー画像からパンと背景とを分離する。背景は例えば複数個のパンを載せたトレーであり、色相の変化、あるいは色相の変化と輝度の変化などから、パンをトレーから切り出す。なおパンが互いに接触して置かれている場合、パンが接触してない部分での輪郭から始めて、パンが接触している部分まで輪郭を延長することにより、パンの画像を互いに分離する。こなおパンが互いに接触している場合、接触部で輝度が急変する。切り出し部10は背景分離部8で切り出したパンの画像を、例えば内側(トッピングのある領域)、中間、外側の3領域に分割する。 1 to 8 show an embodiment. FIG. 1 shows an identification device 2 according to the embodiment, 4 is an appropriate light source, 6 is a CCD camera, and another camera may be used. A background separation unit 8 separates the pan and the background from the color image of the CCD camera 6. The background is, for example, a tray on which a plurality of breads are placed, and the bread is cut out from the trays based on a change in hue or a change in hue and a change in luminance. If the pans are placed in contact with each other, the images of the pans are separated from each other by starting with the contour at the part where the pan is not in contact and extending to the part where the pan is in contact. When the breads are in contact with each other, the brightness changes suddenly at the contact portion. The cutout unit 10 divides the bread image cut out by the background separation unit 8 into, for example, three regions on the inside (region with topping), the middle, and the outside .

識別装置2に光源4とCCDカメラ6を設けず、これらを識別装置2とは別体にしても良い。用いるカラースペースはRGB,H(色相)S(飽和度)V(輝度)などとし、輝度と明度は同じ意味で用いる。画像認識にクラスターへの分離を用いたが、クラスターを用いない認識方法でも良い。   The light source 4 and the CCD camera 6 may not be provided in the identification device 2 and these may be separated from the identification device 2. The color space to be used is RGB, H (hue) S (saturation) V (luminance), etc., and luminance and lightness are used in the same meaning. Although separation into clusters is used for image recognition, a recognition method that does not use clusters may be used.

背景分離部8からのデータを輪郭データ抽出部12へ送り、面積、円形度、重心から輪郭までの距離の平均と分散、縦横比、充填度、輪郭のHuモーメント、などの特徴量を抽出する。円形度は例えばパンの面積とパンの輪郭長の2乗の比である。縦横比はパンの最大長さとこれに直角な方向での長さとの比で、充填度はパンの面積とパンを収容できる最小の長方形の面積との比である。Huモーメントは例えば2次のモーメントなどを用い、それ自体としては画像認識において周知である。Huモーメントは画像の回転、縮小、拡大などにより不変で、同種のパンであればHuモーメントも互いに類似することが期待できる。   Data from the background separation unit 8 is sent to the contour data extraction unit 12, and features such as area, circularity, average and variance of distance from the center of gravity to the contour, aspect ratio, filling degree, and contour Hu moment are extracted. . The circularity is, for example, a ratio of the square of the bread area and the bread contour length. The aspect ratio is the ratio of the maximum bread length to the length in a direction perpendicular thereto, and the degree of filling is the ratio of the bread area to the smallest rectangular area that can accommodate the bread. For example, a second moment is used as the Hu moment, and the Hu moment is well known in image recognition. Hu moments do not change with image rotation, reduction, enlargement, etc., and if they are the same kind of pan, it can be expected that the Hu moments are similar to each other.

テクスチャーデータ抽出部14はパン全体の画像からテクスチャーデータを抽出し、ここではテクスチャーデータとして同時生起行列を求めるが、2次元フーリエ変換での高周波数成分、あるいは2次元の自己相関関数などを求めてもよい。同時生起行列では、i,jを画素を表す添字とし、画素値は輝度とする。画素i,jが相対的にδ=(d,θ)だけ離れているものとし、画素iの画素値がLiである際に、同時生起行列は画素jの画素値がLjとなる確率を示している。同時生起行列はδ毎に変化するが、デジタル画像なのでdの値は0,1,2などであり、θの値は0°,45°,90°,135°などに限られるので、同時生起行列の数も限られる。   The texture data extraction unit 14 extracts texture data from the entire pan image, and obtains a co-occurrence matrix as texture data here, but obtains a high-frequency component in a two-dimensional Fourier transform or a two-dimensional autocorrelation function. Also good. In the co-occurrence matrix, i and j are subscripts representing pixels, and the pixel value is luminance. Assuming that the pixel i, j is relatively separated by δ = (d, θ), and the pixel value of the pixel i is Li, the co-occurrence matrix indicates the probability that the pixel value of the pixel j is Lj. ing. The co-occurrence matrix changes every δ, but since it is a digital image, the value of d is 0, 1, 2, etc., and the value of θ is limited to 0 °, 45 °, 90 °, 135 °, etc. The number of matrices is also limited.

内側カラーデータ抽出部16,中間カラーデータ抽出部18,外側カラーデータ抽出部20は、パンから切り出した内側、中間、外側の3領域に対し、カラースペース内での特徴量を抽出する。カラースペース内の特徴量としては、RGBあるいはHSVなどのカラースペースでの色座標の平均値と分散、輝度のHuモーメントなどがある。内側カラーデータ抽出部16は、内側の領域のカラーデータから特徴量を抽出し、中間カラーデータ抽出部18は中間領域のカラーデータから特徴量を抽出し、外側カラーデータ抽出部20は外側領域のカラーデータから特徴量を抽出する。実施例では、このようにして最大91種類の特徴量をパンのカラー画像から抽出する。ただし学習によりどの特徴量を用いるかを決定すると、必要な特徴量は例えば10種類程度に減少するので、抽出部12〜20はこれらのうち必要な特徴量のみを抽出する。   The inner color data extraction unit 16, the intermediate color data extraction unit 18, and the outer color data extraction unit 20 extract feature amounts in the color space with respect to the three regions of the inside, the middle, and the outside cut out from the pan. The feature amount in the color space includes an average value and dispersion of color coordinates in a color space such as RGB or HSV, and a Hu moment of luminance. The inner color data extraction unit 16 extracts feature amounts from the color data of the inner region, the intermediate color data extraction unit 18 extracts feature amounts from the color data of the intermediate region, and the outer color data extraction unit 20 extracts the feature amount of the outer region. Extract features from color data. In the embodiment, 91 types of feature quantities are extracted from the pan color image in this way. However, when it is determined which feature quantity is to be used by learning, the required feature quantities are reduced to, for example, about 10 types, and therefore the extraction units 12 to 20 extract only the necessary feature quantities.

学習部22はどのような特徴量の組み合わせで画像認識を行うかを学習し、入力はパンの種類に関する正解で、出力は特徴量の組合せ、あるいは特徴量の組合せとその重みなどで、画像認識部24,26へ出力する。画像認識は、例えば学習用のサンプル(多種類のパンのカラー画像から抽出した特徴量)を、例えばパンの種類毎のクラスターに分解することである。1つのクラスターが1種類のパンしか含まなければ、基本的にパンの種類を正確に識別できる。1つのクラスターが複数の種類のパンを含み、あるいはクラスター間の分離が不完全であれば、パンの種類を誤認識する可能性がある。そこで第1段の画像認識と第2段の画像認識とを行う。   The learning unit 22 learns what kind of feature value combination to perform image recognition, the input is a correct answer regarding the type of bread, the output is the feature value combination, or the feature value combination and its weight, etc. To the units 24 and 26. Image recognition is, for example, to decompose a learning sample (features extracted from color images of various types of bread) into, for example, clusters for each type of bread. If one cluster contains only one type of bread, basically the type of bread can be accurately identified. If one cluster includes a plurality of types of bread, or if the separation between the clusters is incomplete, the type of bread may be erroneously recognized. Therefore, first-stage image recognition and second-stage image recognition are performed.

第1段画像認識部24は、学習部22により指定された特徴量を用いて、パンの種類を認識する。第1段画像認識部24は、対象とする全ての種類のパンの中からパンの種類を識別する。識別には例えば特徴量により定まる空間内での、同種のパンの集まり(クラスター)の中心座標と、クラスター半径とを用い、入力されたパンの特徴量がどのクラスターに属するかから種類を判定する。出力はパンの種類の上位3候補とし、確実に1つのパンの種類を識別できる場合、上位3候補を全て同じパンの種類とする。例えば1種類のパンのみからなるクラスターに確実に属する場合が、これに相当する。複数のクラスターに属する可能性がある場合、あるいはこしアンパンと粒アンパンのように、複数種のパンを含むクラスターに属する場合、上位3候補として複数種のパンの種類を出力する。上位3候補が一致する場合、正しい認識が行われたものとしてパンの種類を出力する。上位3候補の中に不一致がある場合、識別が難しいものとして、第2段画像認識部26による識別を行う。なお上位3候補が一致した場合でも、第2段の識別を行っても良い。   The first-stage image recognition unit 24 recognizes the type of bread using the feature amount specified by the learning unit 22. The first-stage image recognizing unit 24 identifies the type of bread from among all types of bread that are targeted. For identification, for example, the center coordinates of clusters (clusters) of the same kind of bread in the space determined by the feature value and the cluster radius are used, and the type is determined from which cluster the feature value of the input bread belongs. . The output is the top 3 candidates for bread types, and if one bread type can be reliably identified, the top 3 candidates are all set to the same bread type. For example, this case corresponds to a case where it certainly belongs to a cluster consisting of only one kind of bread. When there is a possibility of belonging to a plurality of clusters, or when belonging to a cluster including a plurality of types of bread, such as strained and breaded bread, a plurality of types of bread are output as the top three candidates. If the top three candidates match, the bread type is output assuming that correct recognition has been performed. If there is a mismatch among the top three candidates, the second-stage image recognition unit 26 identifies that it is difficult to identify. Even when the top three candidates match, the second-stage identification may be performed.

第2段画像認識部26は認識部24とは用いる特徴量の組み合わせが異なり、識別の候補となるパンの種類は、第1段の識別で特定したクラスターとその周囲のクラスターに限られる。例えばこしアンパンと粒アンパンとからなるクラスター内で、どちらかを識別し、パンの種類を識別する範囲はがられている。第2段認識部26で求めた上位3候補が互いに一致すると、正解が得られたものとして出力する。この作業を個々のパン毎に繰り返すことにより、トレー上のパンの種類と個数とが判明する。なお第2段認識部26の上位3候補が不一致の場合、学習部22などからオペレータが正解を入力する。また学習部22は不正解の頻度が高い場合、あるいはパンの種類が追加された場合などに、学習を再度実行する。   The second-stage image recognition unit 26 differs from the recognition unit 24 in the combination of feature amounts used, and the types of pans that are identification candidates are limited to the cluster specified by the first-stage identification and the surrounding clusters. For example, in a cluster composed of strained bread and grained bread, either is identified, and the range for identifying the type of bread is separated. When the top three candidates obtained by the second stage recognition unit 26 match each other, it is output that the correct answer has been obtained. By repeating this operation for each individual bread, the type and number of breads on the tray can be determined. If the top three candidates of the second stage recognition unit 26 do not match, the operator inputs a correct answer from the learning unit 22 or the like. The learning unit 22 performs the learning again when the frequency of incorrect answers is high or when a type of bread is added.

30は記憶媒体で、識別装置2のプログラムを記憶する。例えば光源4とCCDカメラ6とを制御できるパーソナルコンピュータに、記憶媒体30のプログラムを記憶させることにより、実施例の識別装置2が得られる。   Reference numeral 30 denotes a storage medium that stores the program of the identification device 2. For example, by storing the program in the storage medium 30 in a personal computer that can control the light source 4 and the CCD camera 6, the identification device 2 of the embodiment can be obtained.

図2に前処理アルゴリズムを示し、図3,図4に前処理の内容を示す。色相の変化などでパンと背景とを分離する(ステップ1)。これによって図3の左側のトレー上のパンの画像から、パンの部分のみを取り出すことができる。HSVの変化などから、パンを内側、中間、外側の3領域に分割する。図4で、中央のトッピング領域は中間のパンの領域とは色調などが異なるので、分離できる。中間領域と外側領域では焼き色などが異なるので、これも分離できる。中間領域、外側領域はパンの焼き色などを反映しており、内側領域は前記のようにトッピングを反映している(ステップ2)。パン全体の輪郭の特徴量を抽出し(ステップ3)、内側、中間、外側の各領域毎にHSV値の平均、分散、Huモーメントなどのカラースペース内での特徴量を抽出する(ステップ4)。そしてパン全体に対しテクスチャーの特徴量、例えば同時生起行列を抽出する(ステップ5)。 FIG. 2 shows the preprocessing algorithm, and FIGS. 3 and 4 show the contents of the preprocessing. The bread and the background are separated by changing the hue or the like (step 1). Thus, only the bread portion can be extracted from the bread image on the left tray in FIG. Divide the pan into three areas: inner, middle, and outer due to changes in HSV . In FIG. 4, the central topping region can be separated because it has a different color tone from the middle pan region. Since the middle region and the outer region have different colors, they can also be separated. The intermediate area and the outer area reflect the baking color of bread, and the inner area reflects the topping as described above (step 2). Extract feature values of the outline of the entire pan (step 3), and extract feature values in the color space such as average, variance, and Hu moment of HSV values for each of the inner, middle, and outer regions (step 4). . Then, texture features such as a co-occurrence matrix are extracted for the entire pan (step 5).

図5に学習アルゴリズムを示し、第1段学習は全ての種類のパンを互いに識別することを目的とし、最適の特徴量を探索する(ステップ11)。特徴量の探索に用いなかった新しいパンを用い、求めた特徴量により識別する。ここで上位3候補が等しく、実際の種類と一致した場合は正解とし、不一致であれば誤答とする。正解率が低い場合、用いる特徴量を変更し、所望の正解率(例えば80%以上)が得られるまで、特徴量の探索を続行する(ステップ12)。   FIG. 5 shows a learning algorithm, and the first-stage learning searches for an optimum feature amount for the purpose of discriminating all kinds of bread from each other (step 11). A new bread that has not been used for the feature amount search is used, and is identified by the obtained feature amount. Here, if the top three candidates are equal and match the actual type, the answer is correct, and if they do not match, the answer is incorrect. When the accuracy rate is low, the feature amount to be used is changed, and the search for the feature amount is continued until a desired accuracy rate (for example, 80% or more) is obtained (step 12).

第2段学習は類似したパンを互いに識別することを目的とし、用いる特徴量は、アンパンの上に黒胡麻があれば粒アンで、芥子粒があればこしアンである、パンの端まで切れ込みがあればアーモンドフランスで、端までの切れ込みがなければミルクフランスであるなどである(ステップ13)。この特徴は、アンパンには黒胡麻を用い、こしアンには芥子粒を用いるなど、パン屋さんの職業的な伝統を反映している。ステップ14で類似のパンを互いに識別するための特徴量を探し、ステップ15で特徴量の探索には用いなかった新しいパンを識別し、正解率が低ければ特徴量を変更する。   The second stage learning is aimed at distinguishing similar breads from each other, and the feature amount used is a grain ann if black sesame is on the anpan, and an annunciator to the end of the bread if there is an eggplant grain. If there is, there is almond france, and if there is no cut to the end, it is milk france (step 13). This feature reflects the bakery's professional tradition, such as using black sesame for Anpan and eggplant for Koshi An. In step 14, a feature quantity for identifying similar breads is searched for. In step 15, a new bread that has not been used for the feature quantity search is identified. If the accuracy rate is low, the feature quantity is changed.

図6に識別アルゴリズムを示し、学習の段階で第1段と第2段での特徴量が判明し、用いる特徴量とその重み等は、認識部24,26へ入力されている。特徴量に応じてパンの種類を識別し(ステップ21)、第1段識別での信頼性が高ければそのままパンの種類を出力する。信頼性が低い場合、第2段の識別によりパンの種類を出力する(ステップ22〜24)。   FIG. 6 shows an identification algorithm. In the learning stage, the feature quantities in the first stage and the second stage are found, and the feature quantities to be used and their weights are input to the recognition units 24 and 26. The type of bread is identified according to the feature amount (step 21), and if the reliability at the first stage identification is high, the type of bread is output as it is. If the reliability is low, the type of bread is output by the second stage identification (steps 22 to 24).

これらの結果、店頭などにおいて、トレー上のパンの種類と種類毎の個数を求めることができるので、価格が自動的に判明し、同時に販売数量も管理できる。従ってパンの種類が多くても、不慣れな店員でパンを販売できる。パンの生産管理の場合、同様に焼き上げたパンの種類と個数を自動的に求めることができる。   As a result, since the type of bread on the tray and the number of each type can be obtained at the store, the price can be automatically determined, and the sales quantity can be managed at the same time. Therefore, even if there are many types of bread, bread can be sold by an unfamiliar clerk. In the case of bread production management, the type and number of baked bread can be automatically obtained in the same manner.

図7に第1段識別に用いる特徴量の数と正解率の関係を示す。29種類のパンを6個ずつ購入し、91種類の特徴量を抽出した際の正解率を求め、正解率は学習に用いなかったパンを識別できる確率である。特徴量が10〜20程度で正解率が最高となり、それ以上特徴数を増しても正解率は向上しなかった。図7は第1段の識別での正解率を示し、第2段の識別を行うと正解率はほぼ100%となった。   FIG. 7 shows the relationship between the number of feature values used for first-stage identification and the accuracy rate. When 29 types of bread are purchased 6 pieces each and 91 types of feature quantities are extracted, the correct answer rate is obtained, and the correct answer rate is the probability of identifying the bread that was not used for learning. The correct answer rate became the highest when the feature amount was about 10 to 20, and the correct answer rate did not improve even if the number of features was further increased. FIG. 7 shows the accuracy rate in the first-stage identification. When the second-stage identification is performed, the accuracy rate is almost 100%.

図8に第2段識別での例を示し、右側のパンはミルクフランス、左側のパンはアーモンドフランスである。実際の区別はパンの端部まで切れ込みがあるか否かで、このことはパンの味付けにミルククリームを用いるかアーモンドクリームを用いるかとは関係がない。第1段の識別でミルクフランスとアーモンドフランスとのクラスターまで識別し、第2段でクラスター内でこれらを識別する。   FIG. 8 shows an example in the second stage identification, where the bread on the right is milk France and the bread on the left is almond France. The actual distinction is whether there is a cut to the end of the bread, which has nothing to do with the use of milk cream or almond cream to season the bread. In the first stage, the cluster of milk France and almond France is identified, and in the second stage, these are identified in the cluster.

実施例では以下の効果が得られる。
1) パンの種類と個数とを自動的に認識できる。
2) パンを内側領域と中間領域及び外側領域に分割することにより、トッピング上の特徴とパンの焼き具合の特徴とを別々に利用できる。
3) パンの輪郭の特徴を用いることにより、識別率を高める。丸いパン、四角いパン、三角のパン、輪郭の凹凸が多いパンなどを、輪郭上の特徴で識別できる。
4) パンのテクスチャーの特徴とを用いることにより、識別率を高める。例えばカレーパンもアンパンもパンの形状自体としては大差はない。しかしカレーパンでは表面にパン粉のテクスチャーが表れ、これは揚げパンの特徴である。またクロワッサンなどのパイ系のパンと他のパンはテクスチャーが異なる。
5) 第1段の識別と第2段の識別を組み合わせることにより、パンの種類を正確に識別できる。
In the embodiment, the following effects can be obtained.
1) The type and number of bread can be recognized automatically.
2) By dividing the bread into an inner area, an intermediate area and an outer area , the topping characteristics and the bread baking characteristics can be used separately.
3) Increase the recognition rate by using the features of the pan outline. Round pans, square pans, triangular pans, pans with many contours, etc. can be identified by contour features.
4) Increase the recognition rate by using the texture features of bread. For example, curry bread and anpan do not differ greatly in the shape of the bread itself. However, curry bread has a crumb texture on its surface, which is characteristic of fried bread. Also, pie bread such as croissants and other breads have different textures.
5) By combining the identification of the first level and the identification of the second level, the type of bread can be accurately identified.

2 識別装置
4 光源
6 CCDカメラ
8 背景分離部
10 切り出し部
12 輪郭データ抽出部
14 テクスチャーデータ抽出部
16 内側カラーデータ抽出部
18 中間カラーデータ抽出部
20 外側カラーデータ抽出部
22 学習部
24 第1段画像認識部
26 第2段画像認識部
30 記憶媒体
2 Identification Device 4 Light Source 6 CCD Camera 8 Background Separation Unit 10 Cutout Unit 12 Outline Data Extraction Unit 14 Texture Data Extraction Unit 16 Inner Color Data Extraction Unit 18 Intermediate Color Data Extraction Unit 20 Outer Color Data Extraction Unit 22 Learning Unit 24 First Stage Image recognition unit 26 Second stage image recognition unit 30 Storage medium

Claims (2)

カメラからのパンのカラー画像を画像認識することにより、パンの種類を識別する装置であって、
パンのカラー画像から、パンの内側領域のカラー画像と、中間領域のカラー画像と、外側領域のカラー画像の3種類のカラー画像を切り出す切り出し部と、
パンのカラー画像から、パンの輪郭に関する特徴量を求めるための輪郭データ抽出部と、
パンのカラー画像から、パンのテクスチャーに関する特徴量を、パンのカラーデータ中の輝度成分を用いて、求めるためのテクスチャーデータ抽出部と、
パンの内側領域のカラー画像のカラースペース内での特徴量を求めるための内側カラーデータ抽出部と、
パンの外側領域のカラー画像のカラースペース内での特徴量を求めるための外側カラーデータ抽出部と、
パンの中間領域のカラー画像のカラースペース内での特徴量を求めるための中間カラーデータ抽出部と、
前記各抽出部で求めた特徴量によりパンの種類を識別する識別部、とを備えている、パンの識別装置。
A device for recognizing pan types by recognizing pan color images from a camera,
A cutout unit that cuts out three types of color images from the color image of the pan, the color image of the inner region of the pan, the color image of the intermediate region, and the color image of the outer region ;
An outline data extraction unit for obtaining a feature amount related to the outline of the bread from the color image of the bread,
A texture data extraction unit for obtaining a feature amount related to the texture of the bread from the color image of the bread using a luminance component in the color data of the bread ;
An inner color data extraction unit for obtaining a feature amount in the color space of the color image of the inner area of the pan;
An outer color data extraction unit for obtaining a feature amount in the color space of the color image of the outer region of the pan;
An intermediate color data extraction unit for obtaining a feature amount in the color space of the color image of the intermediate area of the pan;
An identification unit that identifies a type of bread based on a feature amount obtained by each of the extraction units.
カメラからのパンのカラー画像を画像認識することにより、パンの種類を識別するために、
コンピュータを、
パンのカラー画像から、パンの内側領域のカラー画像と、中間領域のカラー画像と、外側領域のカラー画像の3種類のカラー画像を切り出す切り出し部と、
パンのカラー画像から、パンの輪郭に関する特徴量を求めるための輪郭データ抽出部と、
パンのカラー画像から、パンのテクスチャーに関する特徴量を、パンのカラーデータ中の輝度成分を用いて、求めるためのテクスチャーデータ抽出部と、
パンの内側領域のカラー画像のカラースペース内での特徴量を求めるための内側カラーデータ抽出部と、
パンの外側領域のカラー画像のカラースペース内での特徴量を求めるための外側カラーデータ抽出部と、
パンの中間領域のカラー画像のカラースペース内での特徴量を求めるための中間カラーデータ抽出部と、
前記各抽出部で求めた特徴量によりパンの種類を識別する識別部、として機能させるパンの識別プログラム。
In order to identify the type of pan by recognizing the pan color image from the camera,
Computer
A cutout unit that cuts out three types of color images from the color image of the pan, the color image of the inner region of the pan, the color image of the intermediate region, and the color image of the outer region ;
An outline data extraction unit for obtaining a feature amount related to the outline of the bread from the color image of the bread,
A texture data extraction unit for obtaining a feature amount related to the texture of the bread from the color image of the bread using a luminance component in the color data of the bread ;
An inner color data extraction unit for obtaining a feature amount in the color space of the color image of the inner area of the pan;
An outer color data extraction unit for obtaining a feature amount in the color space of the color image of the outer region of the pan;
An intermediate color data extraction unit for obtaining a feature amount in the color space of the color image of the intermediate area of the pan;
A bread identification program that functions as an identification unit that identifies the type of bread based on the feature amount obtained by each of the extraction units.
JP2010035842A 2010-02-22 2010-02-22 Bread identification device and program Active JP5510924B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010035842A JP5510924B2 (en) 2010-02-22 2010-02-22 Bread identification device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010035842A JP5510924B2 (en) 2010-02-22 2010-02-22 Bread identification device and program

Publications (2)

Publication Number Publication Date
JP2011170745A JP2011170745A (en) 2011-09-01
JP5510924B2 true JP5510924B2 (en) 2014-06-04

Family

ID=44684780

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010035842A Active JP5510924B2 (en) 2010-02-22 2010-02-22 Bread identification device and program

Country Status (1)

Country Link
JP (1) JP5510924B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5874141B2 (en) 2012-01-13 2016-03-02 株式会社ブレイン Object identification device
JP5660078B2 (en) * 2012-05-31 2015-01-28 カシオ計算機株式会社 Multi-class classifier, method and program
JP6316562B2 (en) * 2013-09-24 2018-04-25 株式会社ブレイン Store system having product identification device
JP6528397B2 (en) * 2014-12-10 2019-06-12 カシオ計算機株式会社 Sales processing device, product popularity analysis method and program
JP6369319B2 (en) * 2014-12-16 2018-08-08 カシオ計算機株式会社 Sales processing apparatus and product popularity analysis method by customer group
JP6341124B2 (en) 2015-03-16 2018-06-13 カシオ計算機株式会社 Object recognition device and recognition result presentation method
JP7215485B2 (en) * 2018-08-23 2023-01-31 日本電気株式会社 Object matching device
JP7300699B2 (en) * 2018-11-12 2023-06-30 株式会社イシダ Training data generation method, training data generation program, training data generation device, and product identification device
CN111860533B (en) * 2019-04-30 2023-12-12 深圳数字生命研究院 Image recognition method and device, storage medium and electronic device
JP7289448B2 (en) 2019-06-11 2023-06-12 株式会社イシダ Article identification system and accounting system with article identification system

Also Published As

Publication number Publication date
JP2011170745A (en) 2011-09-01

Similar Documents

Publication Publication Date Title
JP5510924B2 (en) Bread identification device and program
US10402980B2 (en) Imaging system object recognition and assessment
JP5874141B2 (en) Object identification device
Mery et al. Quality classification of corn tortillas using computer vision
US11823042B2 (en) System for measuring food weight
CN108710916B (en) Picture classification method and device
US11756282B2 (en) System, method and computer program for guided image capturing of a meal
Jing et al. The fabric defect detection based on CIE L* a* b* color space using 2-D Gabor filter
WO2011002524A1 (en) Non-product image identification
CN112006525B (en) Burnt food detection method in cooking equipment and cooking equipment
CN109948653B (en) Image similarity judging method, electronic equipment and storage medium
Calvo et al. A practical framework for automatic food products classification using computer vision and inductive characterization
CN114549418A (en) Defect detection method and device, electronic equipment and storage medium
CN111091607A (en) Color matching method and device, electronic equipment and storage medium
CN111091029B (en) Method for evaluating uniformity of baked food in oven
CN109801235A (en) A kind of epipremnum aureum blade disease causes detection method and device
De Pilli Application of fuzzy logic system for the pizza production processing optimisation
Phetphoung et al. Automatic sushi classification from images using color histograms and shape properties
CN114218415A (en) Cooking recipe display method and device
Khan et al. Automatic quality inspection of bakery products based on shape and color information
CN113610776A (en) Method and device for detecting defects of sandwich biscuits and storage medium
Jollet et al. Assessing yield quality parameters in bush bean via RGB imagery
WO2023242895A1 (en) Nutrient determination system, nutrient determination apparatus, nutrient determination method, and nutrient determination program
Hernandez-Abundez et al. Incorporation of pollen flour in baking’s
WO2024142888A1 (en) Ripeness determination system and ripeness determination method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130116

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130919

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130930

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: 20140313

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140318

R150 Certificate of patent or registration of utility model

Ref document number: 5510924

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250