JP2012198848A - Object identification device - Google Patents

Object identification device Download PDF

Info

Publication number
JP2012198848A
JP2012198848A JP2011063991A JP2011063991A JP2012198848A JP 2012198848 A JP2012198848 A JP 2012198848A JP 2011063991 A JP2011063991 A JP 2011063991A JP 2011063991 A JP2011063991 A JP 2011063991A JP 2012198848 A JP2012198848 A JP 2012198848A
Authority
JP
Japan
Prior art keywords
boundary
vector
boundary line
image
constriction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2011063991A
Other languages
Japanese (ja)
Other versions
JP5750603B2 (en
Inventor
Masayuki Hatsuda
真幸 初田
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.)
Brain Co Ltd
Original Assignee
Brain Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brain Co Ltd filed Critical Brain Co Ltd
Priority to JP2011063991A priority Critical patent/JP5750603B2/en
Publication of JP2012198848A publication Critical patent/JP2012198848A/en
Application granted granted Critical
Publication of JP5750603B2 publication Critical patent/JP5750603B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an object identification device capable of automatically separating areas for each object in identifying each kind of objects using image recognition even when loaves of bread are partly in contact with each other.SOLUTION: Binarization is performed on a color image with two or more loaves of bread in contact with each other therein to separate a binarized image of the two or more loaves of bread, and polygonal approximation is performed on the separated contour lines to obtain the coordinates of apices, P1 to P33, of the approximate polygon. Then, the restriction vector (KH) indicating the curvature is obtained with each apex (P12) based on the relationship with apices nearby (P11-9, P13-14). The borderline is defined based on the length L of a candidate for the borderline connecting a pair of candidates for boundary points, the angles θ defined by the candidates for borderlines and each restriction vector, the area occupancy rate showing the overlap between the circular areas (E12-27) having the borderline candidates as the diameters and the whole image area, and the depth D of the restriction vector. The loaves of bread are separated by the borderlines.

Description

本発明は、撮像された例えばパン等の物体を識別するための物体識別装置に関し、特に同一画像内に複数の物体が接触した状態にある場合に個々の物体毎に識別するために自動的に各物体に分離処理し得る技術に係る。   The present invention relates to an object identification device for identifying an imaged object such as a pan, and more particularly to automatically identifying each object when a plurality of objects are in contact with each other in the same image. The present invention relates to a technique capable of separating each object.

従来、例えば特許文献1では、画像情報に含まれる物体を識別するために、その物体の輪郭線を得る技術が提案されている。
又、特許文献2では、画像情報に含まれる輪郭等の形状特徴を抽出して、これに類似するモデルとの対比により識別する技術が提案されている。
さらに、特許文献3では、画像情報に含まれる錠剤の個数を検出する上で、2個の錠剤が部分的に接触していたとしても、正確に2個と識別する技術が提案されている。このものでは、互いに接触して塊領域を示す二値画像の内側の輪郭線に沿って配置させた多数の点の内から選択した2点を結ぶ連結線が、一部でも前記塊領域の領域外を通る場合はその2点はそれぞれ異なる錠剤に属する、つまり2個の錠剤があると識別するようにしている。
Conventionally, for example, Patent Document 1 proposes a technique for obtaining an outline of an object in order to identify the object included in the image information.
Patent Document 2 proposes a technique for extracting shape features such as contours included in image information and identifying them by comparison with a similar model.
Furthermore, Patent Document 3 proposes a technique for accurately identifying two tablets even if the two tablets are partially in contact with each other when detecting the number of tablets included in the image information. In this case, at least a part of the connecting line connecting two points selected from a large number of points arranged along the inner contour line of the binary image that is in contact with each other to indicate the mass region is the region of the mass region. When passing outside, the two points belong to different tablets, that is, there are two tablets.

特開平7−22089号公報JP-A-7-22089 特開2000−215315号公報JP 2000-215315 A 特開2006−234519号公報JP 2006-234519 A

ところで、近年、自家製のパンを販売するパン屋が増加傾向にあり、そのようなパン屋で製造・販売されるパンの種類も増加傾向にある。このようなパン屋では顧客が自己の欲するパンを陳列台からトレーに移し、トレーに載せた状態で代金計算が行われており、それに手間と時間を要している。すなわち、パンの種類は多種・多様であり、同一種類であっても外観が完全に同一とは限らない。従って、販売員は、トレー上のパンの種類を正確に見分け、それに基づいて例えばPOSレジスタに正確に入力する必要があり、これらに熟練作業が要求されることになる。このため、出願人において、トレー上のパンについてCCDカメラにより撮像し、この画像情報からトレー上のパンの種類と数を自動的に認識して、代金計算を自動化し得る技術の開発を進めている。   By the way, in recent years, the number of bakery selling homemade bread has been increasing, and the types of bread produced and sold at such bakery have also been increasing. In such a bakery, customers move the bread they want from the display stand to the tray, and the price is calculated in a state where it is placed on the tray, which takes time and effort. That is, the types of bread are various and diverse, and the appearance is not always the same even if they are the same type. Therefore, it is necessary for the salesperson to accurately identify the type of bread on the tray, and to input it accurately, for example, in the POS register based on the type of bread, which requires skilled work. For this reason, the applicant has been developing a technology that can image the pan on the tray with a CCD camera, automatically recognize the type and number of pans on the tray from this image information, and automate the price calculation. Yes.

このようなパンの識別において、顧客が陳列台からトレーに複数個のパンを載せる際に、それらの個々のパンを互いに接触させた状態でトレーを代金計算に持参する場合が考えられる。この場合、前記の画像情報からの自動認識を適用しようとしても、例えば2個のパンが接触して1つの輪郭を構成していると、たとえその輪郭から特徴量を得たとしても、本来は個々の種類のパンの特徴量についてモデル化されたものと合致せず、識別は困難又は不能となることが考えられる。このため、撮像前に販売員がトレー上のパンを互いに非接触状態になるように移動する作業を行わざるを得ず、その上に、衛生状態を維持しつつ前記移動作業とPOSレジスタの操作とを行わざるを得ず、手間を要することになると考えられる。   In such bread identification, when a customer places a plurality of breads on the tray from the display stand, it is conceivable that the trays are brought into the price calculation with the individual breads in contact with each other. In this case, even if automatic recognition from the image information is applied, for example, if two pans are in contact with each other to form one outline, even if a feature amount is obtained from the outline, It may be difficult or impossible to discriminate because it does not match what is modeled for the features of individual types of bread. For this reason, the sales staff must move the pans on the tray so that they are not in contact with each other before imaging, and the moving operation and the operation of the POS register are performed while maintaining the sanitary condition. It is thought that it will be time-consuming.

本発明は、このような事情に鑑みてなされたものであり、その目的とするところは、物体同士が部分的に互いに接触した状態で撮像されているとしても、その画像に基づいて各物体を識別するにあたり、個々の物体に自動的に分離処理して区分し得る物体識別装置を提供することにある。   The present invention has been made in view of such circumstances, and the object of the present invention is to capture each object based on the image even if the objects are imaged in a state where the objects are partially in contact with each other. An object of the present invention is to provide an object identification device that can automatically separate and classify individual objects.

上記目的を達成するために、本発明では、同一平面上に載置された2以上の物体について撮像手段により撮像されたカラー画像を取り込み、このカラー画像を画像認識することにより前記物体の種類を識別する画像処理手段を備えた物体識別装置を対象にして次の特定事項を備えることとした。すなわち、前記画像処理手段として、前記カラー画像に含まれる2以上の物体が互いに接触した状態にあるときに個々の物体に属する領域に分離して区分けする分離処理部を備えたものとし、この分離処理部により分離された個々の物体に属する領域毎に前記物体の種類についての識別処理を実行するように構成する。そして、前記分離処理部として、前記カラー画像から前記2以上の物体の画像領域を二値化処理により抽出する機能と、抽出された二値化画像から前記2以上の物体の画像領域の輪郭線を抽出する機能と、抽出された輪郭線に沿って多角形近似処理によりその近似多角形を構成する各頂点を抽出する機能と、各頂点について前後に位置する頂点との関係で特定される屈曲状況をくびれベクトルにして求める機能と、境界点候補として一対の頂点を抽出しこの一対の境界点候補間を結ぶ境界線候補の長さ及びその境界線候補に対する前記一対の境界点候補のそれぞれにおける前記くびれベクトルがなす角度をパラメータとして演算する機能と、演算された境界線候補の長さがより短くかつ前記くびれベクトルがなす角度が180度により近い一対の境界点候補の組み合わせを一対の境界点として設定して境界線を確定する機能と、前記2以上の物体の画像領域を前記一対の境界点を結ぶ境界線で分離して領域分けする機能とを備えた構成とする(請求項1)。   In order to achieve the above object, in the present invention, a color image captured by an imaging unit for two or more objects placed on the same plane is captured, and the type of the object is determined by recognizing the color image. The following specific items are provided for an object identification device including an image processing means for identification. That is, the image processing means includes a separation processing unit that separates and divides into regions belonging to individual objects when two or more objects included in the color image are in contact with each other. An identification process for the type of the object is executed for each region belonging to each object separated by the processing unit. Then, as the separation processing unit, a function of extracting the image region of the two or more objects from the color image by binarization processing, and a contour line of the image region of the two or more objects from the extracted binary image The bend specified by the relationship between the function that extracts vertices, the function that extracts each vertex constituting the approximate polygon by the polygon approximation process along the extracted contour line, and the vertices located before and after each vertex A function for obtaining the situation as a constricted vector, a length of a boundary line candidate that extracts a pair of vertices as boundary point candidates, and connects the pair of boundary point candidates, and each of the pair of boundary point candidates for the boundary line candidate The function of calculating the angle formed by the constriction vector as a parameter, and the calculated boundary line length is shorter and the angle formed by the constriction vector is closer to 180 degrees. A function of setting a boundary point candidate combination as a pair of boundary points and defining a boundary line; and a function of separating an image area of the two or more objects by a boundary line connecting the pair of boundary points (Claim 1).

本発明の場合、2以上の物体が互いに接触した状態で撮像されていても、分離処理部によって、それら2以上の物体の画像領域の輪郭線抽出、その輪郭線に沿って多角形近似により得られる各頂点の抽出、抽出された各頂点についてくびれベクトルの演算を経た上で、境界点候補がくびれベクトルに基づいて抽出され、一対の境界点候補を結ぶ境界線候補からその長さや、境界線候補とくびれベクトルとのなす角度に基づいて境界線が確定される。そして、確定された境界線で2以上の物体が一体となった画像領域が領域分けされるため、領域分けされた個々の物体に対応する画像領域に基づき各物体の種類が確実に識別されることになる。従って、例えばパンを対象物体として画像識別により代金計算等を自動的に行うシステムを構築するにあたり、顧客が例えばトレー上に選択した複数のパン(物体)を撮像前に販売員がトレー上のパンを互いに非接触状態になるように移動する作業を行うことなく、衛生状態を維持した状態で、自動的に接触状態の複数のパンを個々のパンに属するそれぞれの領域に分離(区分け)した上で各パンの種類を画像識別により自動認識することができるようになる。これにより、パン屋等の小売り業において、大幅な省力化や自動化を図ることができるようになる。なお、前記の識別処理としては個々の物体に属するものとして領域分けされた画像領域に対応するカラー画像部分の形状に関する特徴量に基づき各物体の種類を識別するようにすればよい。   In the case of the present invention, even if two or more objects are imaged in contact with each other, the separation processing unit obtains the contour lines of the image areas of the two or more objects and obtains a polygon approximation along the contour lines. After extracting the vertices and calculating the constriction vector for each extracted vertex, the boundary point candidates are extracted based on the constriction vector, and the length and boundary line of the boundary line candidates connecting the pair of boundary point candidates are extracted. A boundary line is determined based on the angle formed between the candidate and the constriction vector. Then, since the image area in which two or more objects are integrated with the determined boundary line is divided into regions, the type of each object is surely identified based on the image region corresponding to each divided object. It will be. Therefore, for example, in constructing a system that automatically performs price calculation or the like by image identification using a bread as a target object, a salesperson pans on the tray before imaging a plurality of breads (objects) selected by the customer on the tray, for example. Without having to move the pans so that they are not in contact with each other, while maintaining the sanitary condition, the breads in contact are automatically separated (divided) into areas belonging to individual breads. Thus, each bread type can be automatically recognized by image identification. Thereby, in the retail business such as a bakery, it becomes possible to achieve significant labor saving and automation. In the identification process, the type of each object may be identified based on the feature amount relating to the shape of the color image portion corresponding to the image area divided into areas belonging to each object.

前記発明の物体識別装置において、前記境界線を確定する機能として、境界点判定処理により境界点候補として一対の頂点を抽出する機能と、抽出された境界点候補に基づいて境界線確定処理により境界線を確定する機能とを備えることとし、前記境界点判定処理として、一対の頂点を構成する各くびれベクトルのベクトル量により表されるくびれ深さが所定の閾値以上であることで境界点候補を抽出する構成とすることができる(請求項2)。このようにすることにより、境界点候補の抽出、及び、この境界点候補の抽出による境界線の確定を、より確実に実現させ得ることになる。   In the object identification device of the invention, as a function of determining the boundary line, a function of extracting a pair of vertices as boundary point candidates by boundary point determination processing, and a boundary by boundary line determination processing based on the extracted boundary point candidates The boundary point determination process, the boundary point candidate is determined by the necking depth represented by the vector amount of each necking vector constituting a pair of vertices being equal to or greater than a predetermined threshold. It can be set as the structure to extract (Claim 2). By doing so, the extraction of boundary point candidates and the determination of boundary lines by extraction of the boundary point candidates can be realized more reliably.

又、その場合、前記境界線確定処理として、前記境界線候補の長さ及び前記くびれベクトルがなす角度をパラメータとして境界線スコアを演算する演算式を備えることとし、この境界線スコアの値の大小に基づいて境界線を確定する構成とすることができる(請求項3)。このようにすることにより、境界線の確定をより確実なものとし得ることになる。   In this case, the boundary line determination process includes an arithmetic expression for calculating a boundary line score using the length of the boundary line candidate and the angle formed by the constriction vector as parameters. The boundary line can be determined based on (Claim 3). By doing in this way, the boundary line can be determined more reliably.

さらに、前記演算式として、前記境界線候補を直径とする円形領域が前記2以上の物体の画像領域と重複する比率である領域占有率をもパラメータに加えて境界線スコアを演算するように構成することができる(請求項4)。あるいは、加えて、前記演算式として、前記くびれベクトルのくびれ深さをもパラメータに加えて境界線スコアを演算するように構成することができる(請求項5)。このようにすることにより、前記演算式に基づく境界線の確定がより一層確実なものとし得ることになる。   Further, as the calculation formula, a boundary score is calculated by adding an area occupancy ratio, which is a ratio of a circular area having the diameter of the boundary line candidate as an overlap with the image area of the two or more objects, to the parameter. (Claim 4). Alternatively, the boundary expression score can be calculated by adding the constriction depth of the constriction vector to the parameter as the arithmetic expression (claim 5). By doing so, the boundary line based on the arithmetic expression can be determined more reliably.

以上、説明したように、本発明の物体識別装置によれば、2以上の物体が互いに接触した状態で撮像されていても、分離処理部によって、2以上の物体の画像領域において互いに接触している境界線を自動的に確定することができるようになる。そして、この確定された境界線で2以上の物体が一体となった画像領域を領域分けすることができるため、領域分けされた個々の物体に対応する画像領域に基づき各物体の種類を確実に識別することができるようになる。従って、例えばパンを対象物体として画像識別により代金計算等を自動的に行うシステムを構築するにあたり、顧客が例えばトレー上に選択した複数のパン(物体)を撮像前に販売員がトレー上のパンを互いに非接触状態になるように移動する作業を行うことなく、衛生状態を維持した状態で、自動的に個々のパンに分離(区分け)した上で各パンの種類を画像識別により自動認識することができるようになる。これにより、パン屋等の小売り業において、大幅な省力化や自動化を図ることができるようになる。   As described above, according to the object identification device of the present invention, even if two or more objects are imaged in contact with each other, the separation processing unit makes contact with each other in the image area of the two or more objects. It becomes possible to automatically determine the boundary line. Then, since the image region where two or more objects are integrated can be divided into regions with the determined boundary line, the type of each object can be surely determined based on the image region corresponding to each divided object. Can be identified. Therefore, for example, in constructing a system that automatically performs price calculation or the like by image identification using a bread as a target object, a salesperson pans on the tray before imaging a plurality of breads (objects) selected by the customer on the tray, for example. Without the work of moving the foods in a non-contact state with each other, the type of each bread is automatically recognized by image identification after automatically separating (dividing) into individual breads while maintaining a sanitary state. Will be able to. Thereby, in the retail business such as a bakery, it becomes possible to achieve significant labor saving and automation.

特に、請求項2によれば、前記境界線を確定する機能として、境界点判定処理により境界点候補として一対の頂点を抽出する機能と、抽出された境界点候補に基づいて境界線確定処理により境界線を確定する機能とを備え、前記境界点判定処理として、一対の頂点を構成する各くびれベクトルのベクトル量により表されるくびれ深さが所定の閾値以上であることで境界点候補を抽出する構成とすることで、境界点候補の抽出、及び、この境界点候補の抽出による境界線の確定を、より確実に実現させることができるようになる。   In particular, according to claim 2, as a function of determining the boundary line, a function of extracting a pair of vertices as boundary point candidates by boundary point determination processing, and a boundary line determination process based on the extracted boundary point candidates A boundary line determination function, and as the boundary point determination process, a boundary point candidate is extracted when a necking depth represented by a vector amount of each necking vector constituting a pair of vertices is a predetermined threshold or more By adopting such a configuration, it becomes possible to more reliably realize the extraction of boundary point candidates and the determination of the boundary line by the extraction of boundary point candidates.

又、請求項3によれば、前記境界線確定処理として、前記境界線候補の長さ及び前記くびれベクトルがなす角度をパラメータとして境界線スコアを演算する演算式を備え、この境界線スコアの値の大小に基づいて境界線を確定する構成とすることで、境界線の確定をより確実なものとすることができるようになる。   According to a third aspect of the present invention, the boundary line determination process includes an arithmetic expression for calculating a boundary line score using the length of the boundary line candidate and the angle formed by the constriction vector as parameters, and the value of the boundary line score By adopting a configuration in which the boundary line is determined based on the size of the boundary, the boundary line can be determined more reliably.

さらに、請求項4によれば、前記演算式として、前記境界線候補を直径とする円形領域が前記2以上の物体の画像領域と重複する比率である領域占有率をもパラメータに加えて境界線スコアを演算するように構成することで、あるいは、請求項5によれば、前記演算式として、前記くびれベクトルのくびれ深さをもパラメータにさらに加えて境界線スコアを演算するように構成することで、前記演算式に基づく境界線の確定をより一層確実なものとすることができるようになる。   Further, according to claim 4, as the calculation formula, a boundary line is added by adding an area occupancy ratio, which is a ratio of a circular area having a diameter of the boundary line candidate to an image area of the two or more objects, to the parameter. By configuring so as to calculate the score, or according to claim 5, it is configured so that the boundary score is calculated by further adding the constriction depth of the constriction vector to the parameter as the arithmetic expression. Thus, the boundary line based on the arithmetic expression can be determined more reliably.

本発明の物体識別装置の実施形態を示す模式図である。It is a schematic diagram which shows embodiment of the object identification apparatus of this invention. 図1の物体識別装置を構成する画像処理装置を示すブロック図である。It is a block diagram which shows the image processing apparatus which comprises the object identification apparatus of FIG. 画像処理の例を示すフローチャートである。It is a flowchart which shows the example of an image process. 図3の画像処理に含まれる分離処理の例を示すフローチャートである。4 is a flowchart illustrating an example of a separation process included in the image processing of FIG. 3. 図5(a)はトレー上に部分的に互いに接触した状態で載せられた2つの物体(パン)のカラー画像の例を示す平面図であり、図5(b)はそのカラー画像から二値化処理により得られた2つの物体(パン)を含む二値画像を示す平面図である。FIG. 5A is a plan view showing an example of a color image of two objects (pans) placed in a state where they are partially in contact with each other on the tray, and FIG. It is a top view which shows the binary image containing the two objects (pan) obtained by the digitization process. 図6(a)は図5(b)の二値画像から抽出した輪郭線を示す平面図であり、図6(b)は図6(a)の輪郭線から多角形近似処理により得られた多角形と各頂点を示す平面図である。6A is a plan view showing the contour line extracted from the binary image in FIG. 5B, and FIG. 6B is obtained from the contour line in FIG. 6A by polygon approximation processing. It is a top view which shows a polygon and each vertex. 図6(b)の各頂点についてくびれベクトルを得るために検索範囲にある頂点を抽出する第1処理を説明するための平面説明図である。FIG. 7 is an explanatory plan view for explaining a first process of extracting vertices in a search range in order to obtain a constriction vector for each vertex in FIG. 第1処理により抽出された頂点によりくびれ方向ベクトルを得る第2処理を説明するための図7対応図である。FIG. 8 is a diagram corresponding to FIG. 7 for describing a second process for obtaining a constriction direction vector from vertices extracted by the first process. 第2処理により得られたくびれ方向ベクトルからくびれベクトルを得る第3処理と、その後の境界点候補を抽出する第4処理とを説明するための図7対応図である。FIG. 8 is a diagram corresponding to FIG. 7 for describing a third process for obtaining a constriction vector from a constriction direction vector obtained by the second process, and a fourth process for extracting a boundary point candidate thereafter. 第4処理により得られた境界点候補から境界線を確定する第5処理を説明するための図7対応図である。FIG. 8 is a diagram corresponding to FIG. 7 for describing a fifth process for determining a boundary line from boundary point candidates obtained by the fourth process. 第5処理により得られる境界線について最終確定させるための確認的条件を説明するための図7対応図である。FIG. 8 is a diagram corresponding to FIG. 7 for explaining confirmation conditions for final determination of the boundary line obtained by the fifth process. 多数個の物体(パン)間における部分的接触を分離処理するための順序について例示する説明図である。It is explanatory drawing which illustrates about the order for carrying out the separation process of the partial contact between many objects (pan).

以下、本発明の実施形態を図面に基づいて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明の実施形態に係る物体識別装置を示す。符号2は撮像手段であり、例えばCCDカメラにより構成され、トレー3上に載せられた物体(例えばパン;以下、本実施形態の物体はパンとして説明する)4を光源5からの照明下で真上から撮像するようになっている。物体4としては任意数のパンであり、本実施形態では説明の都合上2個のパン4a,4bが部分的に接触した状態でトレー3上に載せられているものとして、以下説明する。又、6は画像処理装置であり、7は画像処理装置6と通信接続された例えばPOSレジスタである。前記の画像処理装置6は、例えば、CPU,ROM,RAM,ハードディスク,通信インターフェースや、適宜の入力部・表示部を備えたパーソナルコンピュータにより構成されている。そして、前記ハードディスクには、オペレーティングシステムと、本実施形態による画像処理を実行するためのプログラムがインストールされており、以下説明する画像処理が実行可能となっている。前記の入力部としては例えばマウスやキーボード等、前記の表示部としては例えば液晶パネル等のディスプレイでもよいが、前記ディスプレイと、タッチパッド等の位置入力装置とを組み合わせたタッチパネル61を採用するようにしてもよい。POSレジスタ7は画像処理装置6からパン4a,4bの種類と個数との識別情報を受けて、合計代金等の表示や、販売管理・売上実績管理等の演算・入出力を実行するようになっている。POSとは、販売時点情報管理(Point of sale system)の略称である。なお、前記のトレー3として、半透明の透過素材の材料により形成されたものを用い、背後(裏面側)に設置したバックライト光源8からのバックライトを照射した状態で撮像するようにしてもよい。これにより、パン4a,4bの周囲に形成されることのある影を可及的に排除し得るようになる。   FIG. 1 shows an object identification device according to an embodiment of the present invention. Reference numeral 2 denotes an imaging means, which is constituted by, for example, a CCD camera, and an object (for example, pan; hereinafter, the object of the present embodiment will be described as pan) 4 placed on the tray 3 is true under illumination from the light source 5. Images are taken from above. The object 4 is an arbitrary number of breads, and in the present embodiment, for convenience of explanation, the following description will be made assuming that the two breads 4a and 4b are placed on the tray 3 in a state of partial contact. Reference numeral 6 denotes an image processing apparatus, and reference numeral 7 denotes, for example, a POS register connected to the image processing apparatus 6 in communication. The image processing device 6 is configured by, for example, a personal computer including a CPU, ROM, RAM, hard disk, communication interface, and appropriate input / display units. The hard disk is installed with an operating system and a program for executing image processing according to the present embodiment, so that image processing described below can be executed. The input unit may be a mouse or a keyboard, for example, and the display unit may be a display such as a liquid crystal panel, but a touch panel 61 that combines the display and a position input device such as a touch pad is adopted. May be. The POS register 7 receives the identification information of the type and number of breads 4a and 4b from the image processing device 6, and executes calculation / input / output such as display of total price, sales management, sales performance management, etc. ing. POS is an abbreviation for point of sale system. Note that the tray 3 is made of a translucent transparent material, and imaging is performed in a state in which the backlight from the backlight light source 8 placed behind (back side) is irradiated. Good. As a result, shadows that may be formed around the pans 4a and 4b can be eliminated as much as possible.

前記画像処理装置6は、図2に示すように、撮像されてCCDカメラ2から取り込まれた画像(カラーデジタル画像)を記憶する画像記憶部62と、2個のパン4a,4bが部分的に接触して塊状になった状態で撮像された画像から個々のパン4a,4bに分離する、すなわち個々のパン4a,4bの境界線を確定して区分けする分離処理部63と、互いに分離された個々のパン4a,4b毎の種類を前記画像に基づいて識別する識別処理部64とを備えている。さらに、前記画像処理装置6は、前記識別処理部64による識別のために、パンの種類毎にモデル化された特徴量を組み合わせたテンプレート情報等が予め記憶登録されたマスタデータ記憶部65と、このマスタデータ記憶部65の登録情報を参照して識別処理部64により識別処理を実行する際に取得される新たな特徴量等について学習処理し、マスタデータ記憶部65の登録内容を更新する学習処理部66とを備えている。そして、識別処理部64による識別結果(パンの種類と個数)をPOSレジスタ7に出力するようになっている。以上の画像記憶部62、分離処理部63、識別処理部64及び学習処理部66等の各処理は前記の如く所定のプログラムにより実行されるようになっており、画像処理装置6はかかる各処理を実行する機能を備えたものとして構成されている。   As shown in FIG. 2, the image processing apparatus 6 includes an image storage unit 62 for storing an image (color digital image) captured and captured from the CCD camera 2, and two pans 4a and 4b. The separation processing unit 63 that separates the individual pans 4a and 4b from the image captured in the state of being brought into contact with each other, that is, separates the boundary lines of the individual pans 4a and 4b and separated from each other. And an identification processing unit 64 for identifying the type of each individual bread 4a, 4b based on the image. Furthermore, the image processing device 6 includes a master data storage unit 65 in which template information combined with feature quantities modeled for each type of bread is stored and registered in advance for identification by the identification processing unit 64; Learning to update the registration contents of the master data storage unit 65 by referring to the registration information in the master data storage unit 65 and performing learning processing on a new feature amount or the like acquired when the identification processing unit 64 executes the identification process. And a processing unit 66. The identification result (bread type and number) by the identification processing unit 64 is output to the POS register 7. Each processing such as the image storage unit 62, the separation processing unit 63, the identification processing unit 64, and the learning processing unit 66 is executed by a predetermined program as described above. It is comprised as what has the function to perform.

前記の画像処理装置6により実行される処理について図3を参照しつつ簡単に説明すると、次のようになる。すなわち、まず、例えばタッチパネル61から画像取り込み指令を入力操作することでCCDカメラ2により撮像された画像を取り込んで画像記憶部62に記録する(ステップS1)。この画像WIの例を図5(a)に示す。この例では各1個の2種類のパン4a,4bが部分的に互いに接触した状態になっている。次に、記録された画像に基づいてパン4a,4bの境界線を確定して各パン4a,4bに属する領域を区分けする分離処理を実行した上で(ステップS2)、各パン4a,4bの種類を識別処理し(ステップS3)、識別結果をタッチパネル61及び/又はPOSレジスタ7等に出力する(ステップS4)。   The process executed by the image processing device 6 will be briefly described with reference to FIG. That is, first, an image captured by the CCD camera 2 is captured by inputting an image capture command from the touch panel 61, for example, and recorded in the image storage unit 62 (step S1). An example of this image WI is shown in FIG. In this example, each of the two kinds of breads 4a and 4b is partially in contact with each other. Next, after separating the areas belonging to the pans 4a and 4b by determining the boundary lines of the pans 4a and 4b based on the recorded images (step S2), the pans 4a and 4b The type is identified (step S3), and the identification result is output to the touch panel 61 and / or the POS register 7 (step S4).

次に、前記の分離処理(ステップS2)について、図4を参照しつつ詳細に説明する。画像記憶部62に記録された画像(初期画像;カラーデジタル画像)WIはトレー3上にパン4a,4bが載置された状態で撮像されたものであるので、まず、背景分離処理(ステップS11)及び二値化処理(ステップS12)を実行することで、背景であるトレー3の部分を分離してパン4a,4bの部分のみを切り出し、図5(b)に例示するようにパン4a,4bが互いに連続して塊状になった二値画像BIを得る。前記の二値化処理によって、背景のトレー3とパン4a,4bとの彩度差に応じて初期画像に表れる各画素の濃淡情報が所定の閾値で1と0とに二値化され、これにより、パン4a,4bの領域が白色又は黒色のいずれか一色のモノクロで表示された二値画像BIを得る。つまり二値化処理によって背景分離処理も行われる。   Next, the separation process (step S2) will be described in detail with reference to FIG. Since the image (initial image; color digital image) WI recorded in the image storage unit 62 is captured with the pans 4a and 4b placed on the tray 3, first, background separation processing (step S11) is performed. ) And binarization processing (step S12), the portion of the tray 3, which is the background, is separated, and only the portions of the pans 4a and 4b are cut out. As illustrated in FIG. A binary image BI in which 4b is continuously formed into a lump is obtained. By the above binarization processing, the grayscale information of each pixel appearing in the initial image is binarized into 1 and 0 with a predetermined threshold according to the saturation difference between the background tray 3 and the pans 4a and 4b. As a result, a binary image BI in which the areas of the pans 4a and 4b are displayed in monochrome of either one of white or black is obtained. That is, background separation processing is also performed by binarization processing.

次に、二値画像BIを対象にして輪郭抽出処理(ステップS13)を実行し、図6(a)に例示する輪郭線画像CIを得た後、輪郭線画像CIの輪郭線を対象にして多角形近似処理(ステップS14)を実行し、図6(b)に多角画像PIとして例示するように、前記輪郭線に沿って例えば左回りに折れ線近似して元の出発点に閉じることで近似多角形及びこの近似多角形を構成する各頂点P1〜P33を得る。具体的には、前記の多角画像PIとして、頂点P1〜P33と、隣接する頂点間を結んだ線分とで、パン4a,4bの双方を1つの領域として表現した画像が得られ、各頂点P1〜P33の頂点座標が得られることになる。以上の輪郭抽出処理及び多角形近似処理として、例えば画像処理用のオープンソースライブラリであるOpen CV(インテル社製品名)に含まれるcv Find Contourを輪郭抽出処理に、同cv Approx Poly による折れ線近似を多角形近似処理に、それぞれ利用することが可能である。   Next, the contour extraction process (step S13) is performed on the binary image BI, and after obtaining the contour line image CI illustrated in FIG. 6A, the contour line of the contour image CI is targeted. The polygon approximation process (step S14) is executed, and approximated by, for example, counterclockwise polygonal line approximation along the contour line and closing to the original starting point as illustrated in FIG. 6B as a polygon image PI. The polygon and each vertex P1 to P33 constituting this approximate polygon are obtained. Specifically, as the polygon image PI, an image is obtained in which the vertices P1 to P33 and a line segment connecting adjacent vertices are expressed as both areas of the pans 4a and 4b. The vertex coordinates of P1 to P33 are obtained. As the above contour extraction processing and polygon approximation processing, for example, cv Find Contour included in Open CV (Intel product name), which is an open source library for image processing, is used for contour extraction processing, and polyline approximation using the same cv Approx Poly is performed. Each can be used for polygon approximation processing.

次に、本実施形態での特徴的な処理部分である、パン4a,4bの境界線を確定するまでの境界点判定処理(ステップS15)及び境界線確定処理(ステップS16)に基づく処理を以下詳細に説明する。概略手順としては、前記の多角画像PI(具体的には各頂点座標)に基づいて各頂点について各種パラメータを抽出し、抽出した各種パラメータに基づいて境界線スコアBSを一対の頂点の組み合わせ毎に演算し、境界線スコアBSが高い一対の頂点の組み合わせを境界点候補として抽出し、かかる境界点候補から最終的に境界線を確定させるものである。前記の境界線スコアBSを得るための各種パラメータとしては、例えば、一対の境界点候補を結んだ境界線候補の長さL,一対の境界点候補のそれぞれのくびれ深さDi,前記境界線候補と一対の境界点候補のそれぞれのくびれベクトルの向きとのなす角度θi,一対の境界点候補を結んだ境界線候補を直径とする円領域が二値画像BIに重複する割合である領域占有率Rである。   Next, processing based on boundary point determination processing (step S15) and boundary line determination processing (step S16) until the boundary lines of the pans 4a and 4b, which are characteristic processing portions in the present embodiment, are described below. This will be described in detail. As a general procedure, various parameters are extracted for each vertex based on the polygon image PI (specifically, each vertex coordinate), and the boundary score BS is determined for each pair of vertices based on the extracted various parameters. A combination of a pair of vertices having a high boundary line score BS is extracted as a boundary point candidate, and a boundary line is finally determined from the boundary point candidates. The various parameters for obtaining the boundary line score BS include, for example, the length L of the boundary line candidate connecting the pair of boundary point candidates, the constriction depth Di of each of the pair of boundary point candidates, and the boundary line candidate. Occupancy ratio that is the ratio of the angle θi formed by the direction of the constriction vector of each of the pair of boundary point candidates and the circular region having a diameter of the boundary line candidate connecting the pair of boundary point candidates to the binary image BI R.

まず、第1処理(図7)、第2処理(図8)及び第3処理(図9)によりくびれベクトルを求め、くびれベクトルの深さDiと向きとを求める。第1処理では、各頂点から前後方向の両側に対し、例えば左回り方向YAにマイナス側(逆方向)及びプラス側(順方向)に対し、それぞれ隣接する頂点と同様方向の所定の検索範囲に存在する頂点を求める。具体的には、図7に示すように、例えば頂点P12からマイナス側に隣接する頂点P11に伸びる方向を中心方向C1としてその両側に所定角度αずつの検索範囲(−α〜+α)を設定し、この検索範囲に存在する頂点P11,P10,P9を抽出する。同様に、頂点P12からプラス側に隣接する頂点P13に伸びる方向を中心方向C2としてその両側に所定角度αずつの検索範囲(−α〜+α)を設定し、この検索範囲に存在する頂点P13,P14を抽出する。図7に例示したものでは、頂点P20からマイナス側の検索範囲に存在する頂点P19,P18を抽出し、プラス側の検索範囲に存在する頂点P21,P22,P23を抽出している。又、同様に、頂点P27からマイナス側の検索範囲に存在する頂点P26,P25,P24を抽出し、プラス側の検索範囲に存在する頂点P28,P30,P31を抽出している。前記の検索範囲(−α〜+α)としては、2つの頂点が連続して検索範囲外となる場合の直前の頂点が検索範囲内に入るように設定すればよい。例えば、頂点P27を起点とする場合には、頂点P29が検索範囲外になったとしても1つのみであり、頂点P32,P33が連続して検索範囲外となるようになっている。   First, the constriction vector is obtained by the first process (FIG. 7), the second process (FIG. 8), and the third process (FIG. 9), and the depth Di and the direction of the constriction vector are obtained. In the first process, for each side in the front-rear direction from each vertex, for example, in the counterclockwise direction YA, the negative side (reverse direction) and the positive side (forward direction) are within a predetermined search range in the same direction as the adjacent vertex. Find existing vertices. Specifically, as shown in FIG. 7, for example, a search range (−α to + α) with a predetermined angle α is set on both sides with a direction extending from the vertex P12 to the vertex P11 adjacent to the minus side as the central direction C1. , Vertices P11, P10, and P9 existing in the search range are extracted. Similarly, a search range (-α to + α) with a predetermined angle α is set on both sides of a direction extending from the vertex P12 to the vertex P13 adjacent to the plus side as the center direction C2, and the vertexes P13, P13, P14 is extracted. In the example illustrated in FIG. 7, vertices P19, P18 existing in the negative search range are extracted from the vertex P20, and vertices P21, P22, P23 existing in the positive search range are extracted. Similarly, vertices P26, P25, and P24 existing in the negative search range are extracted from the vertex P27, and vertices P28, P30, and P31 existing in the positive search range are extracted. The search range (−α to + α) may be set so that the immediately preceding vertex when the two vertices are continuously outside the search range falls within the search range. For example, when the vertex P27 is set as the starting point, even if the vertex P29 is outside the search range, there is only one, and the vertices P32 and P33 are continuously outside the search range.

第2処理では、各頂点についてマイナス側及びプラス側の2つのくびれ方向ベクトルKH1,KH2を求める。すなわち、対象とする各頂点のマイナス側及びプラス側について、それぞれ検索範囲から抽出した各頂点へのベクトルを合成したベクトル和と同じ向きと、対象とする前記頂点から最も遠い頂点へのベクトルと同じベクトル量とで定義したくびれ方向ベクトルを求める。具体的には、図8に示すように、例えば頂点P12を起点としてマイナス側の検索範囲にある頂点P11へのベクトル,頂点P10へのベクトル及び頂点P9へのベクトルを合成したベクトル和VT1と同じ向きと、前記頂点P12から最も遠い頂点P9へのベクトルと同じベクトル量とを有するくびれ方向ベクトルKH1を求める。同様に、頂点P12を起点としてプラス側の検索範囲にある頂点P13へのベクトル及び頂点P14へのベクトルを合成したベクトル和VT2と同じ向きと、前記頂点P12から最も遠い頂点P14へのベクトルと同じベクトル量とを有するくびれ方向ベクトルKH2を求める。   In the second process, two constriction direction vectors KH1 and KH2 on the negative side and the positive side are obtained for each vertex. That is, for the minus side and the plus side of each target vertex, the same direction as the vector sum obtained by combining the vectors to each vertex extracted from the search range, and the same vector as the vector farthest from the target vertex The constriction direction vector defined by the vector quantity is obtained. Specifically, as shown in FIG. 8, for example, the same as the vector sum VT1 obtained by synthesizing the vector to the vertex P11, the vector to the vertex P10 and the vector to the vertex P9 in the negative search range starting from the vertex P12. A constriction direction vector KH1 having a direction and the same vector quantity as the vector from the vertex P12 to the farthest vertex P9 is obtained. Similarly, the same direction as the vector sum VT2 obtained by combining the vector to the vertex P13 and the vector to the vertex P14 in the plus side search range starting from the vertex P12, and the same as the vector to the vertex P14 farthest from the vertex P12 A constriction direction vector KH2 having a vector quantity is obtained.

図8に例示したものでは、頂点P20について、頂点20を起点としてマイナス側に頂点P19へのベクトル及び頂点P18へのベクトルを合成したベクトル和VT1と同じ向きと、前記頂点P20から最も遠い頂点P18へのベクトルと同じベクトル量とを有するくびれ方向ベクトルKH1を求める一方、プラス側に頂点P21へのベクトル,頂点P22へのベクトル及び頂点P23へのベクトルを合成したベクトル和VT1と同じ向きと、前記頂点P20から最も遠い頂点P23へのベクトルと同じベクトル量とを有するくびれ方向ベクトルKH2を求める。同様に、頂点P27について、頂点27を起点としてマイナス側に頂点P26へのベクトル,頂点P25へのベクトル及び頂点P24へのベクトルを合成したベクトル和VT1と同じ向きと、前記頂点P27から最も遠い頂点P24へのベクトルと同じベクトル量とを有するくびれ方向ベクトルKH1を求める一方、プラス側に頂点P28へのベクトル,頂点P30へのベクトル及び頂点P31へのベクトルを合成したベクトル和VT1と同じ向きと、前記頂点P27から最も遠い頂点P31へのベクトルと同じベクトル量とを有するくびれ方向ベクトルKH2を求める。   In the example illustrated in FIG. 8, the vertex P20 has the same direction as the vector sum VT1 obtained by combining the vector to the vertex P19 and the vector to the vertex P18 on the minus side starting from the vertex 20 and the vertex P18 farthest from the vertex P20. A constriction direction vector KH1 having the same vector amount as the vector to the vector, and the same direction as the vector sum VT1 obtained by combining the vector to the vertex P21, the vector to the vertex P22, and the vector to the vertex P23 on the plus side, A constriction direction vector KH2 having the same vector amount as the vector from the vertex P20 to the farthest vertex P23 is obtained. Similarly, with respect to the vertex P27, the vertex farthest from the vertex P27 in the same direction as the vector sum VT1 obtained by synthesizing the vector to the vertex P26, the vector to the vertex P25, and the vector to the vertex P24 starting from the vertex 27 While obtaining the constriction direction vector KH1 having the same vector quantity as the vector to P24, the same direction as the vector sum VT1 obtained by combining the vector to the vertex P28, the vector to the vertex P30, and the vector to the vertex P31 on the plus side, A constriction direction vector KH2 having the same vector quantity as the vector from the vertex P27 to the farthest vertex P31 is obtained.

第3処理では、各頂点についてマイナス側及びプラス側の2つのくびれ方向ベクトルKH1,KH2からくびれベクトルKVを求める。具体的には、図9に示すように、例えば頂点P12を対象とした場合には、頂点P12を起点とする2つのくびれ方向ベクトルKH1,KH2を2辺とする三角形を仮想し、頂点P12を起点としてその2つのくびれ方向ベクトルKH1,KH2のなす角(挟角)の二等分線が延びる方向と、その二等分線が前記三角形の対辺と交わる交点までの長さとで表されるベクトルをくびれベクトルKVと定義する。そして、くびれベクトルKVの長さを、くびれベクトルKVの深さとする。   In the third process, a constriction vector KV is obtained from two constriction direction vectors KH1 and KH2 on the minus side and the plus side for each vertex. Specifically, as shown in FIG. 9, for example, when the vertex P12 is targeted, a triangle having two sides of the two constriction direction vectors KH1 and KH2 starting from the vertex P12 is assumed, and the vertex P12 is defined as A vector represented by the direction in which the bisector of the angle (the included angle) formed by the two constriction direction vectors KH1 and KH2 extends as the starting point and the length to the intersection where the bisector intersects the opposite side of the triangle Is defined as a constriction vector KV. The length of the constriction vector KV is defined as the depth of the constriction vector KV.

図9に他に例示したものとしては、頂点P20を対象とした場合には、頂点P20を起点とする2つのくびれ方向ベクトルKH1,KH2を2辺とする三角形を仮想し、頂点P20を起点としてその2つのくびれ方向ベクトルKH1,KH2のなす角(挟角)の二等分線が延びる方向と、その二等分線が前記三角形の対辺と交わる交点までの長さとで表されるベクトルをくびれベクトルKVとして求める。又、頂点P27を対象とした場合には、頂点P27を起点とする2つのくびれ方向ベクトルKH1,KH2を2辺とする三角形を仮想し、頂点P27を起点としてその2つのくびれ方向ベクトルKH1,KH2のなす角(挟角)の二等分線が延びる方向と、その二等分線が前記三角形の対辺と交わる交点までの長さとで表されるベクトルをくびれベクトルKVとして求めればよい。   As another example shown in FIG. 9, when the vertex P20 is targeted, a triangle having two sides of the two constriction direction vectors KH1 and KH2 starting from the vertex P20 is assumed, and the vertex P20 is the starting point. Constriction of a vector represented by the direction in which the bisector of the angle (the included angle) formed by the two constriction direction vectors KH1 and KH2 extends and the length to the intersection where the bisector intersects the opposite side of the triangle Obtained as vector KV. When the vertex P27 is targeted, a triangle having two sides of the two constriction direction vectors KH1 and KH2 starting from the vertex P27 is assumed, and the two constriction direction vectors KH1 and KH2 starting from the vertex P27. A vector represented by the direction in which the bisector of the angle (the included angle) extends and the length to the intersection where the bisector intersects the opposite side of the triangle may be obtained as the constriction vector KV.

以上の第1処理〜第3処理により、各頂点におけるくびれベクトルKV,KV,…が求められ、くびれベクトルの深さDiと向きとが求まる。次に、第4処理として、これら各頂点PiにおけるくびれベクトルKV,KV,…の深さDiと、2つのくびれ方向ベクトルKH1,KH2のなす角βiとに基づいて、境界点候補の抽出を行う。抽出の判定基準は次の2つがある。すなわち、第1の判定基準は、各頂点における2つのくびれ方向ベクトルKH1,KH2のなす角βi(マイナス側のくびれ方向ベクトルKH1からプラス側のくびれ方向ベクトルKH2に対し左回りYA方向に計測される角度)が所定の設定角度よりも小さいことであり、第2の判定基準は、くびれベクトルKVの深さDiが所定の閾値以上であることである。前記の設定角度としては、少なくとも180度未満の角度を設定し、好ましくは150度未満の角度を、通常は135度以下の角度を設定すればよい。くびれベクトルKVの深さDiは前記閾値以上で大きいほど、くびれが深く切れ込んでいる状況を表している。第4処理では、以上の第1及び第2の両判定基準に基づいて境界点候補を抽出する。   By the above first to third processes, the constriction vectors KV, KV,... At each vertex are obtained, and the depth Di and the direction of the constriction vector are obtained. Next, as a fourth process, boundary point candidates are extracted based on the depth Di of the constriction vectors KV, KV,... At these vertices Pi and the angle βi formed by the two constriction direction vectors KH1, KH2. . There are the following two criteria for extraction. In other words, the first determination criterion is an angle βi formed by two necking direction vectors KH1 and KH2 at each vertex (measured in the counterclockwise YA direction from the minus side necking direction vector KH1 to the plus side necking direction vector KH2. Angle) is smaller than a predetermined set angle, and the second criterion is that the depth Di of the constriction vector KV is equal to or greater than a predetermined threshold. As the setting angle, an angle of at least less than 180 degrees is set, preferably an angle of less than 150 degrees, and usually an angle of not more than 135 degrees may be set. As the depth Di of the constriction vector KV is larger than the threshold value, the constriction becomes deeper. In the fourth process, boundary point candidates are extracted based on both the above first and second determination criteria.

そして、第5処理では、第4処理で抽出した境界点候補により得られる境界線候補について、それぞれ境界線スコアBSを演算し、境界線スコアBSの値が大きいものを境界線として決定する。境界線スコアBSは、図10に一対の境界点候補P12,P27について示すように、任意の一対の境界点候補毎に、その一対の境界点候補を結んだ境界線候補の長さL(一対の境界点候補の頂点座標間の長さ)、一対の境界点候補のそれぞれのくびれ深さDj,前記境界線候補と一対の境界点候補のそれぞれのくびれベクトルの向きとのなす角度θj,及び,一対の境界点候補を結んだ境界線候補を直径とする円領域が二値画像BI(図5(b)参照)に対し重複する割合である領域占有率Rという各パラメータに基づいて、次式(1)により演算する。ここで、境界点候補は相対向する一対であるため、添字j=1,2である。
BS=−Nl・logL
+Nd(logD1+logD2)
−Ns{log(cosθ1+2)+log(cosθ2+2)}
+Nr・logR …(1)
ここで、Nl,Nd,Ns,Nrは各パラメータについての係数である。
In the fifth process, the boundary line score BS is calculated for each boundary line candidate obtained from the boundary point candidates extracted in the fourth process, and the boundary line BS having a large value is determined as the boundary line. As shown for the pair of boundary point candidates P12 and P27 in FIG. 10, the boundary line score BS is a length L (a pair of boundary line candidates connecting the pair of boundary point candidates for each pair of boundary point candidates. The length between the vertex coordinates of the boundary point candidates), the necking depth Dj of each of the pair of boundary point candidates, the angle θj between the boundary line candidate and the direction of the respective necking vectors of the pair of boundary point candidates , Based on each parameter of area occupancy R, which is the ratio of a circular area having a diameter of a boundary line candidate connecting a pair of boundary point candidates to a binary image BI (see FIG. 5B). Calculation is performed according to equation (1). Here, since the boundary point candidates are a pair of opposites, the subscripts j = 1 and 2.
BS = -Nl·logL
+ Nd (logD1 + logD2)
-Ns {log (cosθ1 + 2) + log (cosθ2 + 2)}
+ Nr · logR (1)
Here, Nl, Nd, Ns, and Nr are coefficients for each parameter.

以上の式(1)では、境界線候補Lが短いほど、くびれ深さDjが深いほど、角度θjが大きくて180度に等しいか近いほど、あるいは、領域占有率Rが100%に等しいか近いほど、それぞれ境界線スコアBSの値は大きいものとなる。例えば、図10にE12-27(頂点P12,P27間を結ぶ線分を直径とする円領域)として示す円領域の領域占有率Rは100%であるのに対し、E12-19(頂点P12,P19間を結ぶ線分を直径とする円領域)として示す円領域の領域占有率Rはほぼ70%であり、前者の方が境界線スコアBSの値は大きく表れることになる。以上の境界線スコアBSの値の大きさは、主として、第1項の境界線候補の長さLの短さと、第3項のθjが180度に等しいか近いかとに基づいて左右されるようになっている。従って、最小のパラメータとしてはこれら2種類のパラメータのみを用いて、境界線スコアBSの値を決定するようにしてもよい。あるいは、さらに前記の第4項の領域占有率Rに基づくパラメータをも加えて、境界線スコアBSの値を決定するようにしてもよい。   In the above formula (1), the shorter the boundary line candidate L, the deeper the constriction depth Dj, the larger the angle θj is equal to or close to 180 degrees, or the area occupation ratio R is equal to or close to 100%. As shown, the boundary score BS becomes larger. For example, the area occupancy ratio R of a circular area shown as E12-27 (circle area having a diameter of a line connecting the vertices P12 and P27) in FIG. 10 is 100%, whereas E12-19 (vertex P12, The area occupancy ratio R of the circular area shown as a circular area having a diameter of the line segment connecting P19 is approximately 70%, and the value of the boundary score BS is larger in the former case. The magnitude of the value of the boundary score BS described above mainly depends on the shortness of the length L of the boundary term candidate of the first term and whether the θj of the third term is equal to or close to 180 degrees. It has become. Therefore, the boundary line score BS may be determined using only these two types of parameters as the minimum parameters. Alternatively, the value of the boundary score BS may be determined by further adding a parameter based on the area occupancy R in the fourth term.

前記の第5処理で境界線スコアBSの値の基づいて得られた境界線について、最終的に次の確認的条件をクリアしたものを最終確定させる。すなわち、(a)境界線を特定する一対の境界点は一対一で対応し、1つの境界点(例えば図11のP12)から2本の境界線が生じることはない、(b)2本の境界線(例えば図11のP16−P29を結ぶ線と、P12−P27を結ぶ線)が互いに交差することはない、(c)一対の境界点は互いに向かい合うくびれを構成すること、換言すれば前記のθjを用いたcosθjの値は所定の閾値以上であること、(d)互いに隣接する境界点同士を結ぶ2本の境界線(例えば図11のP12−P27を結ぶ線と、P11−P28を結ぶ線)は境界線スコアBSの値が少しでも大きい方を正解とすること、(e)相隣接する境界点同士を結ぶものは境界線ではないこと、という確認的条件を適用して最終的に境界線(図11ではP12−P27を結ぶ線)を確定させる。   As for the boundary line obtained based on the value of the boundary line score BS in the fifth process, the boundary line finally clearing the following confirming condition is finally determined. That is, (a) a pair of boundary points specifying a boundary line correspond one-to-one, and no two boundary lines are generated from one boundary point (for example, P12 in FIG. 11), (b) two boundary points Boundary lines (for example, a line connecting P16-P29 and a line connecting P12-P27 in FIG. 11) do not intersect each other, (c) a pair of boundary points form constrictions facing each other, in other words, The value of cos θj using θj of (b) is equal to or greater than a predetermined threshold value. (D) Two boundary lines connecting adjacent boundary points (for example, a line connecting P12-P27 in FIG. 11 and P11-P28) Applying the confirming condition that the connecting line) is correct when the boundary line score BS value is as large as possible, and (e) the connecting point between adjacent boundary points is not a boundary line. To the boundary line (in FIG. 11, P12-P27 Confirm the connecting line.

そして、最後に前記境界線を挟んで分離された2つの領域にある各画素に対し領域毎に異なる値を設定するラベリング処理(ステップS17;図4参照)を施して、パン4aの領域と、パン4bの領域とに互いに区分けする。この分離処理後の領域情報を識別処理部64に出力し、各領域毎のパン4a,4bの種類を識別処理する。   Finally, a labeling process (step S17; refer to FIG. 4) for setting different values for each area is performed on each pixel in the two areas separated across the boundary line, and the area of the pan 4a, The pan 4b is divided into regions. The region information after the separation processing is output to the identification processing unit 64, and the type of bread 4a, 4b for each region is identified.

以上では、2個のパン4a,4bが互いに接触している例を対象にして分離処理する場合について説明したが、多数個にわたり接触している場合には例えば次の方針に基づく順序で分離処理を実行させればよい。すなわち、図12に7個のパン4c,4d,4e,4f,4g,4h,4iが接触した例を示すように、まず、接触により閉鎖状態に区画形成された空白部同士の間にある境界線(例えば符号90,91で示す部位の境界線)を確定して分離処理することを繰り返し、次に、閉鎖状態の空白部が開放されるように該当する境界線(例えば符号92,93で示す部位の境界線)を確定して分離処理し、閉鎖状態の空白部の存在が無くなれば、最後に個々のパン4c,4d,4e,4f,4g,4h,4iに分離されるように残る境界線((例えば符号94〜99で示す部位の境界線)を確定して分離処理すればよい。   In the above, the case where the separation process is performed for the example in which the two breads 4a and 4b are in contact with each other has been described. Can be executed. That is, as shown in FIG. 12 in which seven pans 4c, 4d, 4e, 4f, 4g, 4h, and 4i are in contact with each other, first, there is a boundary between the blank portions partitioned and formed in a closed state by contact. A line (for example, a boundary line of parts indicated by reference numerals 90 and 91) is repeatedly determined and separated, and then the corresponding boundary line (for example, reference numerals 92 and 93 is set so that the closed blank portion is opened). The boundary line of the part to be shown) is determined and separated, and if there is no blank space in the closed state, it is finally left so that it is separated into individual pans 4c, 4d, 4e, 4f, 4g, 4h, 4i. A boundary line (for example, a boundary line of parts indicated by reference numerals 94 to 99) may be determined and separated.

本実施形態によれば、同一種類であっても焼き上がり形状の個体差が大きく、かつ、ほぼ円形の形状のものが多いとはいっても真円形状のものはなく、円形に近いものから楕円形に近いものまでいびつな形状を有するパンを識別対象や分離対象の物体4とする場合に、複数個が部分的に互いに接触した状態で撮像された画像に基づいて、個々の物体(パン4a,4b)4に自動的に分離して区分けすることができるようになる。これにより、互いに接触した状態では物体((パン4a,4b)4毎の識別が困難又は不能となる事態を回避して、個々の物体((パン4a,4b)4の各種類を自動的かつ確実に識別することができるようになって、例えば代金の自動計算や、売上実績の自動管理等を行うことができるようになる。以上より、例えばパンを対象物体として画像識別により代金計算等を自動的に行うシステムを構築するにあたり、顧客が例えばトレー上に選択した複数のパン(物体)を撮像前に販売員がトレー上のパンを互いに非接触状態になるように移動する作業を行うことなく、衛生状態を維持した状態で、自動的に接触状態の複数のパンを個々のパンに属するそれぞれの領域に分離(区分け)した上で各パンの種類を画像識別により自動認識することができるようになる。これにより、パン屋等の小売り業において、大幅な省力化や自動化を図ることができるようになる。   According to this embodiment, even if they are of the same type, there is a large individual difference in the baked shape, and although there are many almost circular shapes, there is no perfect circular shape, but from a nearly circular shape to an elliptical shape When a pan having a distorted shape close to a shape is used as the object 4 to be identified or separated, individual objects (pans 4a) based on images captured in a state where a plurality of parts are partially in contact with each other. , 4b) can be automatically separated and divided into four. This avoids a situation in which it is difficult or impossible to identify each object ((pan 4a, 4b) 4 in a state where they are in contact with each other, and each type of individual object ((pan 4a, 4b) 4 is automatically and For example, automatic calculation of price, automatic management of sales performance, etc. can be performed, for example. In constructing an automatic system, the salesperson moves the pans on the tray so that they are not in contact with each other before imaging a plurality of pans (objects) selected by the customer on the tray, for example. In addition, a plurality of breads in contact are automatically separated (divided) into areas belonging to individual breads while maintaining a sanitary condition, and each bread type is automatically recognized by image identification. It can be so made. As a result, in the retail industry, such as a bakery, so that it is possible to achieve a significant labor saving and automation.

<他の実施形態>
なお、本発明は上記実施形態に限定されるものではなく、その他種々の実施形態を包含するものである。すなわち、前記実施形態では、二値画像BIを対象にして分離処理を実行する例を示したが、これに限らず、初期画像WIであるカラーデジタル画像をそのまま、あるいは、グレースケール画像を対象にして分離処理を適用するようにしてもよく、この場合には、境界線スコアBSを得るための各種パラメータとして、本実施形態に例示したもの以外に、初期画像からエッジ画像を作成して境界線候補に沿った所定幅の領域でのエッジ画像の濃度値(エッジ強度)の平均値、及び/又は、初期画像から輝度画像を作成して前記の境界線候補に沿った所定幅の領域での輝度画像の濃度値(輝度)の平均値を追加して用いるようにしてもよい。
<Other embodiments>
In addition, this invention is not limited to the said embodiment, Various other embodiments are included. That is, in the embodiment, the example in which the separation process is performed on the binary image BI has been described. However, the present invention is not limited to this. In this case, as various parameters for obtaining the boundary score BS, in addition to those exemplified in the present embodiment, an edge image is created from the initial image to generate the boundary line. An average value of edge image density values (edge strength) in an area with a predetermined width along the candidate and / or a luminance image is created from the initial image, and an area with a predetermined width along the boundary line candidate is created. You may make it add and use the average value of the density value (luminance) of a luminance image.

2 CCDカメラ(撮像手段)
3 トレー
4 物体
4a,4b パン
5 光源
6 画像処理装置(画像処理手段)
63 分離処理部
64 識別処理部
2 CCD camera (imaging means)
3 Tray 4 Object 4a, 4b Pan 5 Light source 6 Image processing device (image processing means)
63 Separation processing unit 64 Identification processing unit

Claims (5)

同一平面上に載置された2以上の物体について撮像手段により撮像されたカラー画像を取り込み、このカラー画像を画像認識することにより前記物体の種類を識別する画像処理手段を備えた物体識別装置であって、
前記画像処理手段は、前記カラー画像に含まれる2以上の物体が互いに接触した状態にあるときに個々の物体に属する領域に分離して区分けする分離処理部を備え、この分離処理部により分離された個々の物体に属する領域毎に前記物体の種類についての識別処理を実行するように構成され、
前記分離処理部は、前記カラー画像から前記2以上の物体の画像領域を二値化処理により抽出する機能と、抽出された二値化画像から前記2以上の物体の画像領域の輪郭線を抽出する機能と、抽出された輪郭線に沿って多角形近似処理によりその近似多角形を構成する各頂点を抽出する機能と、各頂点について前後に位置する頂点との関係で特定される屈曲状況をくびれベクトルにして求める機能と、境界点候補として一対の頂点を抽出しこの一対の境界点候補間を結ぶ境界線候補の長さ及びその境界線候補に対する前記一対の境界点候補のそれぞれにおける前記くびれベクトルがなす角度をパラメータとして演算する機能と、演算された境界線候補の長さがより短くかつ前記くびれベクトルがなす角度が180度により近い一対の境界点候補の組み合わせを一対の境界点として設定して境界線を確定する機能と、前記2以上の物体の画像領域を前記一対の境界点を結ぶ境界線で分離して領域分けする機能とを備えている
ことを特徴とする物体識別装置。
An object identification apparatus provided with an image processing unit that captures a color image captured by an imaging unit with respect to two or more objects placed on the same plane and recognizes the type of the object by recognizing the color image. There,
The image processing unit includes a separation processing unit that separates and classifies the two or more objects included in the color image into regions belonging to individual objects when the two or more objects are in contact with each other, and is separated by the separation processing unit. Configured to execute identification processing for the type of the object for each region belonging to the individual object,
The separation processing unit extracts a region of the two or more objects from the color image by binarization processing, and extracts an outline of the image region of the two or more objects from the extracted binarized image A bending state specified by the relationship between the function to extract the vertices constituting the approximate polygon by the polygon approximation process along the extracted contour line, and the vertices located before and after each vertex. A function to obtain a constriction vector, a length of a boundary line candidate that extracts a pair of vertices as boundary point candidates, and connects the pair of boundary point candidates, and the constriction in each of the pair of boundary point candidates with respect to the boundary line candidate A function for calculating an angle formed by a vector as a parameter, and a pair of boundary points whose calculated boundary line length is shorter and the angle formed by the constriction vector is closer to 180 degrees. And a function for setting the boundary line as a pair of boundary points, and a function for separating the image area of the two or more objects by a boundary line connecting the pair of boundary points. An object identification device.
請求項1に記載の物体識別装置であって、
前記境界線を確定する機能として、境界点判定処理により境界点候補として一対の頂点を抽出する機能と、抽出された境界点候補に基づいて境界線確定処理により境界線を確定する機能とを備えており、
前記境界点判定処理として、一対の頂点を構成する各くびれベクトルのベクトル量により表されるくびれ深さが所定の閾値以上であることで境界点候補を抽出するように構成されている、物体識別装置。
The object identification device according to claim 1,
As a function of determining the boundary line, a function of extracting a pair of vertices as boundary point candidates by boundary point determination processing, and a function of determining a boundary line by boundary line determination processing based on the extracted boundary point candidates are provided. And
Object identification configured to extract boundary point candidates when the necking depth represented by the vector amount of each necking vector constituting a pair of vertices is greater than or equal to a predetermined threshold as the boundary point determination processing apparatus.
請求項2に記載の物体識別装置であって、
前記境界線確定処理として、前記境界線候補の長さ及び前記くびれベクトルがなす角度をパラメータとして境界線スコアを演算する演算式を備え、この境界線スコアの値の大小に基づいて境界線を確定するように構成されている、物体識別装置。
The object identification device according to claim 2,
The boundary line determination processing includes an arithmetic expression for calculating a boundary line score using the length of the boundary line candidate and the angle formed by the constriction vector as parameters, and the boundary line is determined based on the value of the boundary line score. An object identification device configured to:
請求項3に記載の物体識別装置であって、
前記演算式は、前記境界線候補を直径とする円形領域が前記2以上の物体の画像領域と重複する比率である領域占有率をもパラメータに加えて境界線スコアを演算するように構成されている、物体識別装置。
The object identification device according to claim 3,
The calculation formula is configured to calculate a boundary score by adding an area occupancy ratio, which is a ratio of a circular area having a diameter of the boundary line candidate to an image area of the two or more objects, to a parameter. An object identification device.
請求項4に記載の物体識別装置であって、
前記演算式は、前記くびれベクトルのくびれ深さをもパラメータに加えて境界線スコアを演算するように構成されている、物体識別装置。
The object identification device according to claim 4,
The arithmetic expression is configured to calculate a boundary score by adding a constriction depth of the constriction vector to a parameter as well.
JP2011063991A 2011-03-23 2011-03-23 Object identification device Active JP5750603B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011063991A JP5750603B2 (en) 2011-03-23 2011-03-23 Object identification device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011063991A JP5750603B2 (en) 2011-03-23 2011-03-23 Object identification device

Publications (2)

Publication Number Publication Date
JP2012198848A true JP2012198848A (en) 2012-10-18
JP5750603B2 JP5750603B2 (en) 2015-07-22

Family

ID=47180974

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011063991A Active JP5750603B2 (en) 2011-03-23 2011-03-23 Object identification device

Country Status (1)

Country Link
JP (1) JP5750603B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014229153A (en) * 2013-05-24 2014-12-08 株式会社ブレイン Article identification system and program for the same
JP2016099980A (en) * 2014-11-26 2016-05-30 日本電信電話株式会社 Image segmentation method, device, and program
WO2016117372A1 (en) * 2015-01-20 2016-07-28 株式会社イシダ Examination device
KR101842363B1 (en) 2016-09-05 2018-03-26 인천국제공항공사 Method for separating image of adjacent baggage of baggage position control system
CN115601385A (en) * 2022-04-12 2023-01-13 北京航空航天大学(Cn) Bubble form processing method, bubble form processing apparatus, bubble form processing medium, and program product
DE112022002227T5 (en) 2021-04-20 2024-03-07 Teijin Limited Method for the individual recognition of fiber-reinforced plastic

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101864533B1 (en) * 2017-03-21 2018-06-04 고려대학교 세종산학협력단 Method and Apparatus for Segmentation of Touching Objects using Concave Sections and Concave Points

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0417665A (en) * 1990-05-10 1992-01-22 Kowa Eng Kk Silver white ornament
JPH07200820A (en) * 1993-12-28 1995-08-04 Sanyo Electric Co Ltd Image recognition processing method
JPH07282266A (en) * 1994-04-14 1995-10-27 N T T Data Tsushin Kk Article discrimination system
JP2000215315A (en) * 1999-01-26 2000-08-04 Ricoh Co Ltd Graphic classifying method, graphic retrieving method, graphic classification and retrieval system, and recording medium
JP2004234132A (en) * 2003-01-28 2004-08-19 Matsushita Electric Works Ltd Inspection equipment and method for granular object
JP2006234519A (en) * 2005-02-23 2006-09-07 Matsushita Electric Works Ltd Inspection method of particulate body and inspection device using it

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0417665A (en) * 1990-05-10 1992-01-22 Kowa Eng Kk Silver white ornament
JPH07200820A (en) * 1993-12-28 1995-08-04 Sanyo Electric Co Ltd Image recognition processing method
JPH07282266A (en) * 1994-04-14 1995-10-27 N T T Data Tsushin Kk Article discrimination system
JP2000215315A (en) * 1999-01-26 2000-08-04 Ricoh Co Ltd Graphic classifying method, graphic retrieving method, graphic classification and retrieval system, and recording medium
JP2004234132A (en) * 2003-01-28 2004-08-19 Matsushita Electric Works Ltd Inspection equipment and method for granular object
JP2006234519A (en) * 2005-02-23 2006-09-07 Matsushita Electric Works Ltd Inspection method of particulate body and inspection device using it

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014229153A (en) * 2013-05-24 2014-12-08 株式会社ブレイン Article identification system and program for the same
JP2016099980A (en) * 2014-11-26 2016-05-30 日本電信電話株式会社 Image segmentation method, device, and program
WO2016117372A1 (en) * 2015-01-20 2016-07-28 株式会社イシダ Examination device
CN107209131A (en) * 2015-01-20 2017-09-26 株式会社石田 Check device
JPWO2016117372A1 (en) * 2015-01-20 2017-11-02 株式会社イシダ Inspection device
KR101842363B1 (en) 2016-09-05 2018-03-26 인천국제공항공사 Method for separating image of adjacent baggage of baggage position control system
DE112022002227T5 (en) 2021-04-20 2024-03-07 Teijin Limited Method for the individual recognition of fiber-reinforced plastic
CN115601385A (en) * 2022-04-12 2023-01-13 北京航空航天大学(Cn) Bubble form processing method, bubble form processing apparatus, bubble form processing medium, and program product
CN115601385B (en) * 2022-04-12 2023-05-05 北京航空航天大学 Bubble morphology processing method, device and medium

Also Published As

Publication number Publication date
JP5750603B2 (en) 2015-07-22

Similar Documents

Publication Publication Date Title
JP5750603B2 (en) Object identification device
TWI715877B (en) Method and system for marking bone marrow cells
JP6710135B2 (en) Cell image automatic analysis method and system
CN104424482B (en) Image processing equipment and image processing method
Wang et al. Clump splitting via bottleneck detection and shape classification
CN109859305B (en) Three-dimensional face modeling and recognizing method and device based on multi-angle two-dimensional face
JP6151562B2 (en) Article identification system and its program
CN107609541A (en) A kind of estimation method of human posture based on deformable convolutional neural networks
Park et al. Deep learning based food instance segmentation using synthetic data
KR102190315B1 (en) Method for recognizing goods and sales system using the method thereof
JP5874141B2 (en) Object identification device
JP2015523561A (en) Tablet identification system and method
US11170501B2 (en) Image analysis device
CN113989167B (en) Contour extraction method, device, equipment and medium based on seed point self-growth
US11354549B2 (en) Method and system for region proposal based object recognition for estimating planogram compliance
US11087159B2 (en) Object detection device, object detection method and non-transitory computer readable medium
CN105828691A (en) Image-processing apparatus, image-processing method, and image-processing program
Hahn et al. A new algorithm for ellipse detection by curve segments
KR20220157369A (en) Method and device for determining location relative to a gemstone
US20230071821A1 (en) Product identification method and sales system using the same
JP6623851B2 (en) Learning method, information processing device and learning program
JP6628336B2 (en) Information processing system
Panigrahi et al. Evaluations of fractal geometry and invariant moments for shape classification of corn germplasm
JP2009104244A (en) Information processor and method, and program
CN110874834A (en) Bone age prediction method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140303

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141203

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141226

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150305

R150 Certificate of patent or registration of utility model

Ref document number: 5750603

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