JP2019086914A - Article inspection device, article inspection method and article inspection program - Google Patents

Article inspection device, article inspection method and article inspection program Download PDF

Info

Publication number
JP2019086914A
JP2019086914A JP2017213063A JP2017213063A JP2019086914A JP 2019086914 A JP2019086914 A JP 2019086914A JP 2017213063 A JP2017213063 A JP 2017213063A JP 2017213063 A JP2017213063 A JP 2017213063A JP 2019086914 A JP2019086914 A JP 2019086914A
Authority
JP
Japan
Prior art keywords
pixels
inspection
color
area
unit
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
JP2017213063A
Other languages
Japanese (ja)
Other versions
JP7167426B2 (en
Inventor
隆也 角森
Takaya Tsunomori
隆也 角森
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.)
Fujitsu Advanced Engineering Ltd
Original Assignee
Fujitsu Advanced Engineering 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 Fujitsu Advanced Engineering Ltd filed Critical Fujitsu Advanced Engineering Ltd
Priority to JP2017213063A priority Critical patent/JP7167426B2/en
Publication of JP2019086914A publication Critical patent/JP2019086914A/en
Application granted granted Critical
Publication of JP7167426B2 publication Critical patent/JP7167426B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

To improve inspection accuracy in an appearance inspection of an article.SOLUTION: An inspection apparatus includes: calculation means for classifying pixels of each color included in a predetermined area in an inspection target article image obtained by photographing an inspection target article and calculating the number of pixels of each color; comparison means for comparing the number of the calculated pixels of each color with reference to the number of pixels of each color included in an area corresponding to the predetermined area in a model image; and determination means for determining whether or not, based on the comparison result, the inspection target article passes an inspection.SELECTED DRAWING: Figure 3

Description

本発明は、検品装置、検品方法及び検品プログラムに関する。   The present invention relates to an inspection apparatus, an inspection method, and an inspection program.

従来より、特定の物品(例えば、弁当、パン、野菜、果物、花等の商品)を出荷する際の外観検査においては、当該物品の外観の色に着目して、合否の判定が行われている。このため、当該物品の外観検査を行う検品装置では、例えば、当該物品を撮影した検品画像を、所定のモデル画像(合格と判定される物品を予め撮影した画像)とマッチングさせることで、合否の判定を行っている。   Conventionally, in the appearance inspection at the time of shipment of a specific article (for example, a commodity such as a lunch box, bread, vegetables, fruits, flowers, etc.), a judgment of success or failure is made by paying attention to the color of the appearance of the article. There is. For this reason, in an inspection apparatus which performs an appearance inspection of the article, for example, an inspection image obtained by imaging the article is matched with a predetermined model image (an image obtained by imaging an article determined to be acceptable in advance). The decision is being made.

特開2005−4612号公報JP, 2005-4612, A 特表2004−502250号公報Japanese Patent Publication No. 2004-502250

しかしながら、上記のような物品の場合、外観検査において合格と判定される物品であっても、外観の色は均一ではない。例えば、パンの焼きムラや、花の模様などのように外観の色には一定程度の個体差があり、完全に同じ色が再現されることがないからである。このため、所定のモデル画像とマッチングさせる検品方法では、検査精度に限界がある。   However, in the case of an article as described above, the color of the appearance is not uniform even if the article is determined to pass the appearance inspection. For example, there is a certain degree of individual difference in appearance color such as uneven baking of a bread or a pattern of a flower, and the same color is not completely reproduced. For this reason, the inspection method for matching with a predetermined model image has a limit in inspection accuracy.

一つの側面では、物品の外観検査において、検査精度の向上を図ることを目的としている。   In one aspect, it is an object of the present invention to improve inspection accuracy in visual inspection of articles.

一態様によれば、検品装置は、
検査対象の物品を撮影した検品画像において、所定の領域に含まれる画素を、色ごとに分類し、各色の画素数を算出する算出手段と、
モデル画像において、前記所定の領域に対応する領域に含まれる画素の、前記各色の画素数を参照し、算出された前記各色の画素数と比較する比較手段と、
比較結果に基づいて、前記検査対象の物品の合否を判定する判定手段とを有する。
According to one aspect, the inspection device
Calculation means for classifying the pixels included in a predetermined area according to colors and calculating the number of pixels of each color in the inspection image obtained by photographing the article to be inspected;
A comparison unit that refers to the number of pixels of each color of the pixels included in the area corresponding to the predetermined area in the model image, and compares the calculated number of pixels of each color;
And determination means for determining whether the item to be inspected is acceptable or not based on the comparison result.

物品の外観検査において、検査精度の向上を図ることが可能となる。   In the appearance inspection of an article, it is possible to improve the inspection accuracy.

検品システムのシステム構成の一例を示す図である。It is a figure showing an example of system configuration of an inspection system. 検品装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of the inspection apparatus. 検品装置の生成部の機能構成の一例を示す図である。It is a figure which shows an example of a function structure of the production | generation part of the inspection apparatus. モデル画像の領域分割処理の具体例を示す図である。It is a figure which shows the specific example of area | region division processing of a model image. 圧縮処理の具体例を示す図である。It is a figure which shows the specific example of a compression process. RGB値変換処理の具体例を示す図である。It is a figure which shows the specific example of a RGB value conversion process. モデルデータ算出処理の具体例を示す図である。It is a figure which shows the specific example of a model data calculation process. モデルデータ選択処理の具体例を示す図である。It is a figure which shows the specific example of a model data selection process. モデルデータの具体例を示す図である。It is a figure which shows the example of model data. 検品装置の検品部の機能構成の一例を示す図である。It is a figure which shows an example of a function structure of the inspection part of the inspection apparatus. 判定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of determination processing. 判定処理の具体例を示す図である。It is a figure which shows the specific example of determination processing. 検品装置の効果を説明するための図である。It is a figure for demonstrating the effect of the inspection apparatus.

以下、各実施形態について添付の図面を参照しながら説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複した説明を省略する。   Hereinafter, each embodiment will be described with reference to the attached drawings. In the present specification and the drawings, components having substantially the same functional configuration will be denoted by the same reference numerals and redundant description will be omitted.

[第1の実施形態]
<検品システムのシステム構成>
はじめに、第1の実施形態に係る検品装置を含む検品システムのシステム構成について説明する。図1は、検品システムのシステム構成の一例を示す図である。
First Embodiment
<System configuration of inspection system>
First, a system configuration of an inspection system including the inspection device according to the first embodiment will be described. FIG. 1 is a diagram showing an example of a system configuration of an inspection system.

図1に示すように、検品システム100は、撮像装置110と、検品装置120とを有する。撮像装置110と検品装置120とは、有線または無線を介して接続される。   As shown in FIG. 1, the inspection system 100 includes an imaging device 110 and an inspection device 120. The imaging device 110 and the inspection device 120 are connected via a wired or wireless connection.

撮像装置110は、合格と判定される物品を予め撮影したモデル画像を含む画像データを、検品装置120に送信する。また、撮像装置110は、検査対象の物品141〜143を撮影した検品画像を含む画像データを、検品装置120に送信する。なお、第1の実施形態において、検査対象の物品141〜143は、“弁当”であり、搬送装置130により、撮像装置110の撮影範囲まで搬送されるものとする。   The imaging device 110 transmits, to the inspection device 120, image data including a model image obtained by capturing in advance an article determined to be a pass. In addition, the imaging device 110 transmits, to the inspection device 120, image data including an inspection image obtained by imaging the articles 141 to 143 to be inspected. In the first embodiment, the articles 141 to 143 to be inspected are “alarm lunches” and are conveyed by the conveyance device 130 to the imaging range of the imaging device 110.

検品装置120は、撮像装置110より送信される画像データを処理する画像処理装置の一例である。検品装置120には、生成プログラムと検品プログラムとがインストールされており、当該プログラムが実行されることで、検品装置120は、生成部121、検品部122として機能する。   The inspection device 120 is an example of an image processing device that processes image data transmitted from the imaging device 110. A generation program and an inspection program are installed in the inspection device 120, and when the program is executed, the inspection device 120 functions as a generation unit 121 and an inspection unit 122.

生成部121は、画像データに含まれるモデル画像に基づいて、モデルデータを生成する。また、生成部121は、生成したモデルデータを、モデル格納部123に格納する。   The generation unit 121 generates model data based on a model image included in the image data. Further, the generation unit 121 stores the generated model data in the model storage unit 123.

検品部122は、画像データに含まれる検品画像に基づいて、検査対象の物品の合否を判定するための検品データを生成する。また、検品部122は、生成した検品データに対応するモデルデータをモデル格納部123より読み出し、生成した検品データと比較することで、検査対象の物品の合否を判定する。   The inspection unit 122 generates inspection data for determining pass / fail of the article to be inspected based on the inspection image included in the image data. Further, the inspection unit 122 reads out model data corresponding to the generated inspection data from the model storage unit 123, and compares the generated inspection data with the generated inspection data to determine whether the product to be inspected is acceptable or not.

<検品装置のハードウェア構成>
次に、検品装置120のハードウェア構成について説明する。図2は、検品装置のハードウェア構成の一例を示す図である。図2に示すように、検品装置120は、CPU(Central Processing Unit)201、ROM(Read Only Memory)202、RAM(Random Access Memory)203を有する。CPU201、ROM202、RAM203は、いわゆるコンピュータを形成する。
<Hardware Configuration of Inspection Device>
Next, the hardware configuration of the inspection device 120 will be described. FIG. 2 is a diagram showing an example of the hardware configuration of the inspection device. As shown in FIG. 2, the inspection device 120 includes a central processing unit (CPU) 201, a read only memory (ROM) 202, and a random access memory (RAM) 203. The CPU 201, the ROM 202, and the RAM 203 form a so-called computer.

また、検品装置120は、補助記憶装置204、操作装置205、表示装置206、I/F(Interface)装置207、ドライブ装置208を有する。なお、検品装置120の各ハードウェアは、バス209を介して相互に接続されている。   Further, the inspection device 120 includes an auxiliary storage device 204, an operation device 205, a display device 206, an I / F (Interface) device 207, and a drive device 208. The hardware of the inspection device 120 is mutually connected via the bus 209.

CPU201は、補助記憶装置204にインストールされている各種プログラム(例えば、生成プログラム、検品プログラム等)を実行する演算デバイスである。   The CPU 201 is an arithmetic device that executes various programs (for example, a generation program, an inspection program, and the like) installed in the auxiliary storage device 204.

ROM202は、不揮発性メモリである。ROM202は、補助記憶装置204にインストールされている各種プログラムをCPU201が実行するために必要な各種プログラム、データ等を格納する、主記憶デバイスとして機能する。具体的には、ROM202はBIOS(Basic Input/Output System)やEFI(Extensible Firmware Interface)等のブートプログラム等を格納する。   The ROM 202 is a non-volatile memory. The ROM 202 functions as a main storage device that stores various programs, data, and the like necessary for the CPU 201 to execute various programs installed in the auxiliary storage device 204. Specifically, the ROM 202 stores a boot program such as BIOS (Basic Input / Output System) or EFI (Extensible Firmware Interface).

RAM203は、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)等の揮発性メモリである。RAM203は、補助記憶装置204にインストールされている各種プログラムがCPU201によって実行される際に展開される作業領域を提供する、主記憶デバイスとして機能する。   The RAM 203 is a volatile memory such as a dynamic random access memory (DRAM) or a static random access memory (SRAM). The RAM 203 functions as a main storage device which provides a work area to be expanded when the various programs installed in the auxiliary storage device 204 are executed by the CPU 201.

補助記憶装置204は、各種プログラムや、各種プログラムが実行されることで生成されるデータ等を格納する補助記憶デバイスである。例えば、モデル格納部123は、補助記憶装置204において実現される。   The auxiliary storage device 204 is an auxiliary storage device that stores various programs, data generated by executing the various programs, and the like. For example, the model storage unit 123 is realized in the auxiliary storage device 204.

操作装置205は、検品装置120の管理者が検品装置120に対して各種指示を入力するための入力デバイスである。表示装置206は、検品装置120の内部状態等を表示する表示デバイスである。I/F装置207は、撮像装置110と接続するための接続デバイスである。   The operation device 205 is an input device for the administrator of the inspection device 120 to input various instructions to the inspection device 120. The display device 206 is a display device that displays the internal state of the inspection device 120 and the like. The I / F device 207 is a connection device for connecting to the imaging device 110.

ドライブ装置208は、記録媒体210をセットするためのデバイスである。ここでいう記録媒体210には、CD−ROM、フレキシブルディスク、光磁気ディスク等のように情報を光学的、電気的あるいは磁気的に記録する媒体が含まれる。また、記録媒体210には、ROM、フラッシュメモリ等のように情報を電気的に記録する半導体メモリ等が含まれていてもよい。   The drive device 208 is a device for setting the recording medium 210. The recording medium 210 mentioned here includes a medium for optically, electrically or magnetically recording information, such as a CD-ROM, a flexible disk, a magneto-optical disk or the like. The recording medium 210 may also include a semiconductor memory or the like that electrically records information, such as a ROM, a flash memory, or the like.

なお、ドライブ装置208は、補助記憶装置204に各種プログラムをインストールする際に用いられてもよい。具体的には、検品装置120の管理者が、配布された記録媒体210をドライブ装置208にセットし、該記録媒体210に記録された各種プログラムをドライブ装置208が読み出すことで、補助記憶装置204に各種プログラムがインストールされてもよい。   The drive device 208 may be used when installing various programs in the auxiliary storage device 204. Specifically, the administrator of the inspection apparatus 120 sets the distributed recording medium 210 in the drive apparatus 208, and the drive apparatus 208 reads out various programs recorded in the recording medium 210, thereby the auxiliary storage apparatus 204. Various programs may be installed on

<検品装置の生成部の機能構成>
次に、検品装置120の生成部121の機能構成について説明する。図3は、検品装置の生成部の機能構成の一例を示す図である。図3に示すように、生成部121は、画像データ取得部301、領域分割部302、圧縮部303、RGB値変換部304、モデルデータ算出部305、選択部306を有する。
<Functional Configuration of Generation Unit of Inspection Device>
Next, the functional configuration of the generation unit 121 of the inspection device 120 will be described. FIG. 3 is a diagram illustrating an example of a functional configuration of a generation unit of the inspection device. As illustrated in FIG. 3, the generation unit 121 includes an image data acquisition unit 301, an area division unit 302, a compression unit 303, an RGB value conversion unit 304, a model data calculation unit 305, and a selection unit 306.

画像データ取得部301は、撮像装置110より画像データを取得し、モデル画像を抽出する。また、画像データ取得部301は、抽出したモデル画像を領域分割部302に通知する。   The image data acquisition unit 301 acquires image data from the imaging device 110 and extracts a model image. Further, the image data acquisition unit 301 notifies the region division unit 302 of the extracted model image.

領域分割部302は、モデル画像を予め定められた複数の領域に分割する。また、領域分割部302は、分割することで得られた各領域の領域画像を圧縮部303に通知する。   The area dividing unit 302 divides the model image into a plurality of predetermined areas. Also, the area division unit 302 notifies the compression unit 303 of the area image of each area obtained by the division.

圧縮部303は、各領域画像について、所定の画素数の画素領域をまとめて1画素とし、各画素領域ごとに、1の画素値(RGB値)を算出することで、各領域画像を圧縮する。また、圧縮部303は、圧縮済みの各領域画像を、RGB値変換部304に通知する。   The compression unit 303 compresses each area image by calculating a pixel value (RGB value) of 1 for each area image by grouping pixel areas of a predetermined number of pixels into one pixel for each area image. . Also, the compression unit 303 notifies the RGB value conversion unit 304 of each compressed region image.

RGB値変換部304は、圧縮済みの各領域画像の各画素のRGB値を色変換する。また、RGB値変換部304は、色変換済みの各領域画像を、モデルデータ算出部305に通知する。   The RGB value conversion unit 304 performs color conversion on the RGB values of each pixel of each compressed region image. Also, the RGB value conversion unit 304 notifies the model data calculation unit 305 of each of the color-converted area images.

モデルデータ算出部305は、色変換済みの各領域画像について、領域画像に含まれる画素を色ごとに分類し、各色の画素数を算出することで、領域ごとにモデルデータ候補を算出する。また、モデルデータ算出部305は、算出したモデルデータ候補を選択部306に通知する。   The model data calculation unit 305 classifies the pixels included in the area image for each color for each area image after color conversion, and calculates the number of pixels of each color to calculate model data candidates for each area. The model data calculation unit 305 also notifies the selection unit 306 of the calculated model data candidates.

選択部306は、算出されたモデルデータ候補を領域ごとに分類し、分類したモデルデータ候補の中から、互いに類似するモデルデータ候補の組を抽出する。また、選択部306は、互いに類似するモデルデータ候補の組それぞれから、1のモデルデータ候補を選択し、選択したモデルデータ候補をモデルデータとしてモデル格納部123に登録する。   The selecting unit 306 classifies the calculated model data candidates for each area, and extracts a set of model data candidates similar to each other from the classified model data candidates. Further, the selection unit 306 selects one model data candidate from each of the sets of model data candidates similar to each other, and registers the selected model data candidate in the model storage unit 123 as model data.

<検品装置の生成部の各部の処理の具体例>
次に、検品装置120の生成部121の各部(画像データ取得部301を除く各部)の処理の具体例について説明する。
<Specific Example of Processing of Each Unit of Generation Unit of Inspection Device>
Next, a specific example of the process of each unit (each unit excluding the image data acquisition unit 301) of the generation unit 121 of the inspection device 120 will be described.

(1)領域分割部302による領域分割処理の具体例
はじめに、生成部121の領域分割部302による、モデル画像の領域分割処理の具体例について説明する。図4は、モデル画像の領域分割処理の具体例を示す図である。図4(a)に示すように、合格と判定される物品(弁当)を予め撮影したモデル画像400には、弁当の容器の外縁及び弁当の容器内部の仕切りを示す境界部400BLが含まれる。
(1) Specific Example of Region Division Processing by Region Division Unit 302 First, a specific example of region division processing of a model image by the region division unit 302 of the generation unit 121 will be described. FIG. 4 is a diagram showing a specific example of region segmentation processing of a model image. As shown in FIG. 4A, the model image 400 obtained by photographing in advance an article (a lunch box) determined to be acceptable includes a boundary portion 400BL indicating the outer edge of the lunch box container and the partition inside the lunch box.

モデル画像400によれば、弁当の容器内部は境界部400BLにより4つの収容部(収容部401、402、403、404)に仕切られている。また、モデル画像400によれば、収容部401〜403には、それぞれ1種類の内容物(内容物411、412、413)が収容されている。内容物411は、例えば“ごはん”であり、内容物412は、例えば“サラダ”であり、内容物413は、例えば“漬物”である。   According to the model image 400, the inside of the container of the lunchbox is divided into four storage units (storage units 401, 402, 403, and 404) by the boundary 400BL. Further, according to the model image 400, the accommodation portions 401 to 403 accommodate one kind of contents (contents 411, 412, 413). The contents 411 are, for example, “rice”, the contents 412 are, for example, a “salad”, and the contents 413 are, for example, “pickles”.

更に、モデル画像400によれば、収容部404には、2種類の内容物(内容物414a、414b)が収容されている。内容物414aは、例えば“ハンバーグ”であり、内容物414bは、例えば“フライドポテト”である。   Furthermore, according to the model image 400, the storage unit 404 stores two types of contents (contents 414a and 414b). The contents 414 a are, for example, “hamburgers”, and the contents 414 b are, for example, “fried potatoes”.

第1の実施形態において、領域分割部302では、内容物の種類ごとに、モデル画像400を分割する。図4(b)は、内容物の種類ごとに、モデル画像400を分割した場合の分割位置を示す図である。   In the first embodiment, the region division unit 302 divides the model image 400 for each type of content. FIG. 4B is a diagram showing division positions when the model image 400 is divided for each type of content.

図4(b)に示すように、領域分割部302は、内容物411が収容された収容部401に対応する領域をモデル画像400から分割し、領域画像421(領域名=“領域1”と称す)を抽出する。また、領域分割部302は、内容物412が収容された収容部402に対応する領域をモデル画像400から分割し、領域画像422(領域名=“領域2”と称す)を抽出する。また、領域分割部302は、内容物413が収容された収容部403に対応する領域をモデル画像400から分割し、領域画像423(領域名=“領域3”と称す)を抽出する。   As shown in FIG. 4B, the area division unit 302 divides the area corresponding to the storage section 401 in which the content 411 is stored from the model image 400, and sets an area image 421 (area name = "area 1". Extract). In addition, the region division unit 302 divides the region corresponding to the storage unit 402 in which the content 412 is stored from the model image 400, and extracts the region image 422 (referred to as region name = "region 2"). In addition, the area division unit 302 divides an area corresponding to the storage unit 403 in which the content 413 is stored from the model image 400, and extracts an area image 423 (referred to as area name = "area 3").

また、領域分割部302は、内容物414aが収容された収容部404の左側領域をモデル画像から分割し、領域画像424(領域名=“領域4”と称す)を抽出する。更に、内容物414bが収容された収容部404の右側領域をモデル画像から分割し、領域画像425(領域名=“領域5”と称す)を抽出する。   In addition, the area division unit 302 divides the left area of the accommodation unit 404 in which the content 414 a is accommodated from the model image, and extracts an area image 424 (referred to as area name = “area 4”). Furthermore, the right side area of the accommodation unit 404 in which the contents 414 b are accommodated is divided from the model image, and an area image 425 (area name = referred to as “area 5”) is extracted.

(2)圧縮部303による圧縮処理の具体例
次に、生成部121の圧縮部303による圧縮処理の具体例について説明する。図5は、圧縮処理の具体例を示す図である。
(2) Specific Example of Compression Processing by Compression Unit 303 Next, a specific example of compression processing by the compression unit 303 of the generation unit 121 will be described. FIG. 5 is a diagram showing a specific example of the compression process.

図5に示すように、圧縮部303は、それぞれの領域画像421〜425において、所定の画素数の画素領域(例えば、3画素×3画素の計9画素からなる画素領域)を抽出し、抽出した画素領域に含まれる各画素の画素値の平均値を算出する。これにより、圧縮部303は、抽出した画素領域を、算出した1の画素値を有する1画素に圧縮する。   As shown in FIG. 5, the compression unit 303 extracts and extracts a pixel area of a predetermined number of pixels (for example, a pixel area consisting of a total of 9 pixels of 3 pixels × 3 pixels) in each of the area images 421 to 425 The average value of the pixel values of each pixel included in the selected pixel area is calculated. Thus, the compression unit 303 compresses the extracted pixel area into one pixel having the calculated pixel value of one.

図5の例は、領域画像421の画素領域501に含まれる各画素の画素値の平均値として、“210”を算出し、圧縮後の1画素の画素値とした場合を示している。圧縮部303では、かかる圧縮処理を、領域画像421〜425それぞれについて、領域画像内の全範囲に対して実行する。これにより、圧縮部303では、領域画像421〜425それぞれのデータ量を削減することができる。   The example of FIG. 5 shows a case where “210” is calculated as the average value of the pixel values of the respective pixels included in the pixel area 501 of the area image 421, and is set as the pixel value of one pixel after compression. The compression unit 303 executes such compression processing on the entire range in the region image for each of the region images 421 to 425. As a result, the compression unit 303 can reduce the amount of data of each of the region images 421 to 425.

(3)RGB値変換部304によるRGB値変換処理の具体例
次に、RGB値変換部304によるRGB値変換処理の具体例について説明する。図6は、RGB値変換処理の具体例を示す図である。
(3) Specific Example of RGB Value Conversion Processing by RGB Value Conversion Unit 304 Next, a specific example of RGB value conversion processing by the RGB value conversion unit 304 will be described. FIG. 6 is a diagram showing a specific example of the RGB value conversion process.

RGB値変換部304は、圧縮済みの各領域画像の各画素のRGB値をそれぞれ色変換する。本実施形態では、例えば、0〜255の256階調のR値を、11の階調範囲に分け、それぞれの階調範囲に属するR値を、それぞれの階調範囲の代表値に色変換する。図6の例は、
・階調範囲=0〜24に属するR値を、代表値=0に色変換すること、
・階調範囲=25〜49に属するR値を、代表値=25に色変換すること、
・階調範囲=50〜74に属するR値を、代表値=50に色変換すること、
・階調範囲=75〜99に属するR値を、代表値=75に色変換すること、
・階調範囲=100〜124に属するR値を、代表値=100に色変換すること、
・階調範囲=125〜149に属するR値を、代表値=125に色変換すること、
等を示している。これにより、256階調のR値は、11の代表値に色変換されることになる。
The RGB value conversion unit 304 performs color conversion on the RGB values of each pixel of each compressed region image. In this embodiment, for example, an R value of 256 gradations of 0 to 255 is divided into 11 gradation ranges, and color conversion of R values belonging to each gradation range is performed to a representative value of each gradation range. . The example of FIG.
Color conversion of an R value belonging to a gradation range of 0 to 24 into a representative value of 0,
Color conversion of an R value belonging to a gradation range of 25 to 49 into a representative value of 25;
Color conversion of an R value belonging to a gradation range of 50 to 74 into a representative value of 50,
Color conversion of R value belonging to gradation range = 75 to 99 to representative value = 75,
Color conversion of an R value belonging to the gradation range of 100 to 124 to a representative value of 100,
Color conversion of an R value belonging to a gradation range of 125 to 149 into a representative value of 125,
And so on. As a result, the R value of 256 gradations is color converted to a representative value of 11.

同様に、RGB値変換部304は、例えば、0〜255の256階調のG値を、11の階調範囲に分け、それぞれの階調範囲に属するG値を、それぞれの階調範囲の代表値に色変換する。これにより、256階調のG値は、11の代表値に色変換されることになる。   Similarly, the RGB value conversion unit 304 divides, for example, the G value of 256 gradations of 0 to 255 into 11 gradation ranges, and represents the G values belonging to each gradation range as a representative of each gradation range. Convert color to a value. As a result, the G value of 256 gradations is color converted to the representative value of 11.

同様に、RGB値変換部304は、例えば、0〜255の256階調のB値を、11の階調範囲に分け、それぞれの階調範囲に属するB値を、それぞれの階調範囲の代表値に色変換する。これにより、256階調のB値は、11の代表値に色変換されることになる。   Similarly, the RGB value conversion unit 304 divides the B value of 256 gradations of 0 to 255, for example, into 11 gradation ranges, and represents the B values belonging to each gradation range as a representative of each gradation range. Convert color to a value. As a result, the B value of 256 gradations is color converted to the representative value of 11.

なお、RGB値変換部304によれば、256×256×256=16,777,216通りの色が、11×11×11=1,331通りの色に変換されることになる。   The RGB value converter 304 converts 256 × 256 × 256 = 16,777,216 colors into 11 × 11 × 11 = 1,331 colors.

(4)モデルデータ算出部305によるモデルデータ算出処理の具体例
次に、モデルデータ算出部305によるモデルデータ算出処理の具体例について説明する。図7は、モデルデータ算出処理の具体例を示す図である。
(4) Specific Example of Model Data Calculation Process by Model Data Calculation Unit 305 Next, a specific example of the model data calculation process by the model data calculation unit 305 will be described. FIG. 7 is a diagram showing a specific example of model data calculation processing.

図7に示すように、モデルデータ算出処理は領域画像ごとに実行される。図7の例は、領域画像421(領域名=“領域1”)についてモデルデータ算出処理が行われたことを示している。モデルデータ算出部305では、領域画像421(領域名=“領域1”)に含まれる画素を、1,331通りの色に分類し、各色の画素数をカウントすることで、モデルデータ候補700を生成する。   As shown in FIG. 7, model data calculation processing is executed for each area image. The example of FIG. 7 indicates that model data calculation processing has been performed for the area image 421 (area name = "area 1"). The model data calculation unit 305 classifies the pixels included in the area image 421 (area name = “area 1”) into 1,331 colors, and counts the number of pixels of each color to obtain model data candidates 700. Generate

図7に示すように、モデルデータ候補700は、情報の項目として“色”と“カウント数”とを含み、“色”には、1,331通りの色(RGB値)が格納され、“カウント数”には、領域画像(領域名=“領域1”)に含まれる各色の画素数が格納される。   As shown in FIG. 7, the model data candidate 700 includes “color” and “count number” as items of information, and “color” stores 1,331 colors (RGB values), “ The number of pixels of each color included in the area image (area name = "area 1") is stored in the count number.

(5)選択部306によるモデルデータ選択処理の具体例
次に、選択部306によるモデルデータ選択処理の具体例について説明する。図8は、モデルデータ選択処理の具体例を示す図である。
(5) Specific Example of Model Data Selection Process by Selection Unit 306 Next, a specific example of the model data selection process by the selection unit 306 will be described. FIG. 8 is a diagram showing a specific example of model data selection processing.

図8の例は、選択部306が、領域画像421(領域名=“領域1”)について、モデルデータ算出部305により生成された、モデルデータ候補700、801、802を相互に比較した様子を示している。図8の例によれば、モデルデータ候補700とモデルデータ候補801とは類似度が高いため、当該モデルデータ候補の組について、選択部306は、モデルデータ候補700を選択し、モデルデータとしてモデル格納部123に登録する。つまり、モデルデータ候補801はモデル格納部123に登録されない。   In the example of FIG. 8, the selection unit 306 compares the model data candidates 700, 801, and 802 generated by the model data calculation unit 305 with each other for the region image 421 (region name = "region 1"). It shows. According to the example of FIG. 8, since the model data candidate 700 and the model data candidate 801 have high similarity, the selecting unit 306 selects the model data candidate 700 for the set of model data candidates, and sets the model data as model data. It is registered in the storage unit 123. That is, the model data candidate 801 is not registered in the model storage unit 123.

一方、モデルデータ候補700とモデルデータ候補802とは類似度が低いため、当該モデルデータ候補の組について、選択部306は、両方をモデルデータとしてモデル格納部123に登録する。   On the other hand, since the model data candidate 700 and the model data candidate 802 have a low degree of similarity, the selecting unit 306 registers both of the set of model data candidates in the model storage unit 123 as model data.

このように、モデルデータ算出部305により生成されたモデルデータ候補のうち、互いに類似するモデルデータ候補については、一方を選択して登録することで、選択部306では、モデル格納部123に登録するモデルデータの数を絞っている。   As described above, among the model data candidates generated by the model data calculation unit 305, the model data candidates similar to each other are registered in the model storage unit 123 by selecting and registering one of them. The number of model data is reduced.

<検品装置のモデル格納部に登録されたモデルデータの具体例>
次に、検品装置120のモデル格納部123に登録されたモデルデータの具体例について説明する。図9は、モデルデータの具体例を示す図である。図9に示すように、モデルデータは、領域名及びモデル名と対応付けて登録される。モデルデータ911、912は、検品画像のうち、領域名=“領域1”の領域画像との比較に用いられる、モデル名=モデル1_1、1_2のモデルデータである。
<Specific Example of Model Data Registered in Model Storage Unit of Inspection Device>
Next, a specific example of model data registered in the model storage unit 123 of the inspection device 120 will be described. FIG. 9 is a diagram showing a specific example of model data. As shown in FIG. 9, model data is registered in association with an area name and a model name. Model data 911 and 912 are model data of model names = models 1_1 and 1_2, which are used for comparison with an area image of area name = "area 1" among inspection images.

同様に、モデルデータ921、922は、検品画像のうち、領域名=“領域2”の領域画像との比較に用いられる、モデル名=モデル2_1、2_2のモデルデータである。同様に、モデルデータ951、952は、検品画像のうち、領域名=“領域5”の領域画像との比較に用いられる、モデル名=モデル5_1、5_2のモデルデータである。   Similarly, model data 921 and 922 are model data of model names = models 2_1 and 2_2 used for comparison with an area image of area name = "area 2" among inspection images. Similarly, model data 951 and 952 are model data of model name = models 5_1 and 5_2 used for comparison with an area image of area name = "area 5" among inspection images.

<検品装置の検品部の機能構成>
次に、検品装置120の検品部122の機能構成について説明する。図10は、検品装置の検品部の機能構成の一例を示す図である。図10に示すように、検品部122は、画像データ取得部1001、領域分割部1002、圧縮部1003、RGB値変換部1004、検品データ算出部1005、判定部1006を有する。
<Functional Configuration of Inspection Unit of Inspection Device>
Next, the functional configuration of the inspection unit 122 of the inspection device 120 will be described. FIG. 10 is a diagram showing an example of a functional configuration of the inspection unit of the inspection apparatus. As shown in FIG. 10, the inspection unit 122 includes an image data acquisition unit 1001, an area division unit 1002, a compression unit 1003, an RGB value conversion unit 1004, an inspection data calculation unit 1005, and a determination unit 1006.

なお、検品部122に含まれる各部のうち、画像データ取得部1001〜RGB値変換部1004の機能は、それぞれ、生成部121に含まれる、画像データ取得部301〜RGB値変換部304の機能に対応するため、ここでは、説明を省略する。   Among the units included in the inspection unit 122, the functions of the image data acquisition unit 1001 to the RGB value conversion unit 1004 are the same as the functions of the image data acquisition unit 301 to the RGB value conversion unit 304 included in the generation unit 121. In order to correspond, explanation is omitted here.

検品データ算出部1005は算出手段の一例であり、色変換済みの各領域画像について、領域画像に含まれる画素を色ごとに分類し、各色の画素数を算出することで、領域ごとに検品データを算出する。また、検品データ算出部1005は、算出した各領域の検品データを判定部1006に通知する。   The inspection data calculation unit 1005 is an example of a calculation unit, and for each area image after color conversion, the pixels included in the area image are classified for each color, and the number of pixels of each color is calculated. Calculate Further, the inspection data calculation unit 1005 notifies the determination unit 1006 of the inspection data of each calculated area.

判定部1006は比較手段の一例であり、モデル格納部123より、判定対象の領域に対応付けられたモデルデータを読み出し、判定対象の領域の検品データと比較することで、比較結果として、誤差率(詳細は後述)を算出する。また、判定部1006は判定手段の一例であり、算出した誤差率に基づいて、検査対象の物品の合否を判定し、検品結果を出力する。   The determination unit 1006 is an example of a comparison unit, reads out model data associated with the area to be determined from the model storage unit 123, and compares it with inspection data of the area to be determined, and as a comparison result, the error rate (The details will be described later). Further, the determination unit 1006 is an example of the determination unit, determines the pass / fail of the article to be inspected based on the calculated error rate, and outputs the inspection result.

<判定部による判定処理の流れ>
次に、判定部1006による、判定処理の流れについて説明する。図11は、判定処理の流れを示すフローチャートである。検品データ算出部1005より、各領域の検品データが通知されると、判定部1006は、図11に示すフローチャートを開始する。
<Flow of determination processing by determination unit>
Next, the flow of the determination process by the determination unit 1006 will be described. FIG. 11 is a flowchart showing the flow of determination processing. When inspection data of each area is notified from the inspection data calculation unit 1005, the determination unit 1006 starts the flowchart shown in FIG.

ステップS1101において、判定部1006は、領域数をカウントするカウンタnに1を設定する。   In step S1101, the determination unit 1006 sets 1 in a counter n that counts the number of areas.

ステップS1102において、判定部1006は、通知された検品データの中から、領域nの検品データを抽出する。   In step S1102, the determination unit 1006 extracts inspection data of the area n from the notified inspection data.

ステップS1103において、判定部1006は、モデルデータ数をカウントするカウンタmに1を設定する。   In step S1103, the determination unit 1006 sets 1 in a counter m that counts the number of model data.

ステップS1104において、判定部1006は、領域nのモデルデータn_mを、モデル格納部123より読み出す。   In step S1104, the determination unit 1006 reads model data n_m of the area n from the model storage unit 123.

ステップS1105において、判定部1006は、領域nの検品データと、モデルデータn_mとの誤差率を算出する。具体的には、判定部1006は、1,331通りの色それぞれについて、領域nの検品データと、モデルデータn_mとの画素数の差(絶対値)を算出する。また、判定部1006は、算出した画素数の差(絶対値)の合計値を求め、領域nに含まれる画素数(圧縮した後の画素数)で除算することで、誤差率を算出する。   In step S1105, the determination unit 1006 calculates an error rate between the inspection data of the area n and the model data n_m. Specifically, the determination unit 1006 calculates, for each of the 1,331 colors, the difference (absolute value) in the number of pixels between the inspection data of the region n and the model data n_m. In addition, the determination unit 1006 obtains a total value of the calculated difference (absolute value) of the number of pixels, and divides the number by the number of pixels included in the area n (the number of pixels after compression) to calculate an error rate.

ステップS1106において、判定部1006は、領域nに対応付けて登録された全てのモデルデータについて、誤差率を算出したか否かを判定する。ステップS1106において、誤差率を算出していないモデルデータがあると判定した場合には(ステップS1106においてNoの場合には)、ステップS1107に進む。   In step S1106, the determination unit 1006 determines whether or not error rates have been calculated for all model data registered in association with the area n. If it is determined in step S1106 that there is model data for which the error rate is not calculated (in the case of No in step S1106), the process proceeds to step S1107.

ステップS1107において、判定部1006は、モデルデータ数をカウントするカウンタmをインクリメントし、ステップS1104に戻る。これにより、判定部1006では、領域nに対応付けて登録された次のモデルデータについて、誤差率を算出することができる。   In step S1107, the determination unit 1006 increments a counter m that counts the number of model data, and the process returns to step S1104. Thus, the determination unit 1006 can calculate an error rate for the next model data registered in association with the area n.

一方、ステップS1006において、領域nに対応付けて登録された全てのモデルデータについて、誤差率を算出したと判定した場合には(ステップS1106においてYesの場合には)、ステップS1108に進む。   On the other hand, if it is determined in step S1006 that the error rates have been calculated for all model data registered in association with the area n (in the case of Yes in step S1106), the process proceeds to step S1108.

ステップS1108において、判定部1006は、領域nの検品データについて算出した誤差率の中に、閾値以下の誤差率となるモデルデータがあったか否かを判定する。ステップS1108において、閾値以下の誤差率となるモデルデータがあったと判定した場合には(ステップS1108においてYesの場合には)、ステップS1109に進む。   In step S1108, the determination unit 1006 determines whether or not there is model data having an error rate equal to or less than the threshold among the error rates calculated for the inspection data in the area n. If it is determined in step S1108 that model data having an error rate equal to or less than the threshold value is present (in the case of Yes in step S1108), the process proceeds to step S1109.

ステップS1109において、判定部1006は、検査対象の物品に含まれる各領域のうち、領域nについては“OK”と判定する。   In step S1109, the determination unit 1006 determines that the region n is “OK” among the regions included in the article to be inspected.

一方、ステップS1108において、閾値以下の誤差率となるモデルデータがなかったと判定した場合(ステップS1108においてNoの場合)、ステップS1110に進む。   On the other hand, when it is determined in step S1108 that there is no model data having an error rate equal to or less than the threshold (No in step S1108), the process proceeds to step S1110.

ステップS1110において、判定部1006は、検査対象の物品が“不合格”であると判定する。つまり、検査対象の物品に含まれる各領域のうちの1の領域がNGであった場合、判定部1006では、検査対象の物品自体を“不合格”と判定する。   In step S1110, the determination unit 1006 determines that the item to be inspected is “failed”. That is, when one of the regions included in the inspection target article is NG, the determination unit 1006 determines that the inspection target article itself is “failed”.

ステップS1111において、判定部1006は、検査対象の物品に含まれる全ての領域について処理を実行したか否かを判定する。ステップS1111において、処理を実行していない領域があると判定した場合には(ステップS1111においてNoの場合には)、ステップS1112に進む。   In step S1111, the determination unit 1006 determines whether the process has been performed for all the areas included in the item to be inspected. If it is determined in step S1111 that there is an area for which processing has not been performed (in the case of No in step S1111), the process proceeds to step S1112.

ステップS1112において、判定部1006は、領域数をカウントするカウンタnをインクリメントし、ステップS1102に戻る。これにより、判定部1006は、検査対象の物品に含まれる次の領域について、誤差率を算出することができる。   In step S1112, the determination unit 1006 increments the counter n for counting the number of areas, and the process returns to step S1102. Thereby, the determination unit 1006 can calculate the error rate for the next area included in the article to be inspected.

一方、ステップS1112において、検査対象の物品に含まれる全ての領域について処理を実行したと判定した場合には(ステップS1111においてYesの場合には)、ステップS1113に進む。   On the other hand, if it is determined in step S1112 that the processing has been performed for all the areas included in the inspection target item (in the case of Yes in step S1111), the process proceeds to step S1113.

ステップS1113において、判定部1006は、検査対象の物品が“合格”であると判定する。つまり、検査対象の物品に含まれる全ての領域が“OK”であった場合、判定部1006では、検査対象の物品を“合格”と判定する。   In step S1113, the determination unit 1006 determines that the item to be inspected is “pass”. That is, when all the areas included in the item to be inspected are “OK”, the determination unit 1006 determines that the item to be inspected is “pass”.

ステップS1114において、判定部1006は、判定処理を終了するか否かを判定する。ステップS1114において、判定処理を継続すると判定した場合には(ステップS1114においてNoの場合には)、ステップS1101に戻る。この場合、次の検品データが通知されることで、上記処理(ステップS1101〜S1113)が実行される。一方、ステップS1114において、判定処理を継続しないと判定した場合には(ステップS1114においてYesの場合には)、判定処理を終了する。   In step S1114, the determination unit 1006 determines whether to end the determination process. If it is determined in step S1114 that the determination process is to be continued (in the case of No in step S1114), the process returns to step S1101. In this case, when the next inspection data is notified, the above processing (steps S1101 to S1113) is executed. On the other hand, when it is determined in step S1114 that the determination process is not to be continued (in the case of Yes in step S1114), the determination process ends.

<判定部による判定処理の具体例>
次に、判定部1006による、検査対象の物品についての判定処理の具体例について説明する。図12は、判定処理の具体例を示す図である。
<Specific Example of Determination Process by Determination Unit>
Next, a specific example of the determination process for the article to be inspected by the determination unit 1006 will be described. FIG. 12 is a diagram illustrating a specific example of the determination process.

図12に示すように、領域名=“領域1”の検品データ1201が通知されると、判定部1006は、モデル格納部123より、領域名=“領域1”に対応付けて登録されたモデルデータを順次読み出す。図12の例は、モデル格納部123より、モデルデータ911(モデル名=“モデルデータ1_1”)が読み出されたことを示している。   As shown in FIG. 12, when the inspection data 1201 of the area name = “area 1” is notified, the determination unit 1006 causes the model storage unit 123 to register the model registered in association with the area name = “area 1”. Read data sequentially. The example of FIG. 12 indicates that model data 911 (model name = “model data 1_1”) is read from the model storage unit 123.

また、図12に示すように、判定部1006は、各色について、検品データ1201とモデルデータ911との画素数の差(絶対値)を算出し、差分データ1202を生成する。   Further, as shown in FIG. 12, the determination unit 1006 calculates, for each color, the difference (absolute value) in the number of pixels between the inspection data 1201 and the model data 911, and generates difference data 1202.

差分データ1202によれば、色=(0,0,0)の場合、検品データ1201とモデルデータ911との画素数の差(絶対値)は、“2”である。また、色=(25,0,0)の場合、検品データ1201とモデルデータ911との画素数の差(絶対値)は、“4”である。更に、色=(50,0,0)の場合、検品データ1201とモデルデータ911との画素数の差(絶対値)は、“1”である。   According to the difference data 1202, in the case of color = (0, 0, 0), the difference (absolute value) in the number of pixels between the inspection data 1201 and the model data 911 is “2”. In the case of color = (25, 0, 0), the difference (absolute value) in the number of pixels between the inspection data 1201 and the model data 911 is “4”. Furthermore, in the case of color = (50, 0, 0), the difference (absolute value) in the number of pixels between the inspection data 1201 and the model data 911 is “1”.

以下、判定部1006は、全ての色について、検品データ1201とモデルデータ911との画素数の差(絶対値)を算出し、算出した画素数の差(絶対値)の合計値(合計差異数)を求める。図12の例は、判定部1006により、合計差異数として“90”が算出されたことを示している。   Hereinafter, the determination unit 1006 calculates the difference (absolute value) in the number of pixels between the inspection data 1201 and the model data 911 for all colors, and the total value of the difference (absolute value) in the calculated number of pixels (total difference number Ask for). The example in FIG. 12 indicates that the determination unit 1006 has calculated "90" as the total difference number.

なお、判定部1006では、更に、算出した合計差異数を、領域名=“領域1”に含まれる画素数(圧縮した後の画素数)で除算することで、誤差率を算出し、領域名=“領域1”について“OK”か否かを判定する。   In addition, the determination unit 1006 further divides the calculated total number of differences by the number of pixels (number of pixels after compression) included in the area name = “area 1” to calculate the error rate, and the area name It is determined whether the "area 1" is "OK".

<検品装置による検品の効果>
次に、検品装置120による検品の効果について説明する。図13は、検品装置の効果を説明するための図である。図13に示すように、生成部121では、領域画像1301に対して、圧縮処理及びRGB値変換処理を実行することで、色変換済みの領域画像1302を生成する。また、生成部121では、色変換済みの領域画像1302に対して、モデルデータ算出処理及びモデルデータ選択処理を実行することで、モデルデータ1303を登録する。
<Effect of inspection by inspection device>
Next, the effect of the inspection by the inspection device 120 will be described. FIG. 13 is a diagram for explaining the effect of the inspection device. As illustrated in FIG. 13, the generation unit 121 executes compression processing and RGB value conversion processing on the area image 1301 to generate a color-converted area image 1302. In addition, the generation unit 121 registers model data 1303 by executing model data calculation processing and model data selection processing on the color-converted area image 1302.

一方、検品部122では、領域画像1311に対して、圧縮処理及びRGB値変換処理を実行することで、色変換済みの領域画像1312を生成する。また、検品部122では、色変換済みの領域画像1312に対して、検品データ算出処理を実行することで、検品データ1313を算出する。   On the other hand, the inspection unit 122 performs compression processing and RGB value conversion processing on the area image 1311 to generate a color-converted area image 1312. Further, the inspection unit 122 calculates inspection data 1313 by executing inspection data calculation processing on the color-converted area image 1312.

この結果、検品部122では、判定部1006が差分データ1320を算出し、更に、合計差異数として“10”を算出する。図13の例では、色変換済みの領域画像1302または1312に含まれる画素数は“132”であるため、誤差率=合計差異数/画素数=10/132=7.6%となる。つまり、検品部122では、判定部1006が色変換済みの領域画像1312に対応する領域について“OK”と判定する。   As a result, in the inspection unit 122, the determination unit 1006 calculates the difference data 1320, and further calculates “10” as the total difference number. In the example of FIG. 13, since the number of pixels included in the color-converted area image 1302 or 1312 is “132”, the error rate = the total number of differences / the number of pixels = 10/132 = 7.6%. That is, in the inspection unit 122, the determination unit 1006 determines that the area corresponding to the color-converted area image 1312 is “OK”.

ここで、領域画像1301と領域画像1311とでは、写し出されている内容物は同じであるが、内容物に含まれる具材の配置、個々の具材の大きさ及び形、色等は、一致していない。このため、領域画像1301と領域画像1311とをマッチングさせる従来の検品方法によれば、領域画像1311に対応する領域について“NG”と判定する可能性があった。   Here, in the area image 1301 and the area image 1311, although the contents being projected are the same, the arrangement of ingredients included in the contents, the size and shape of each ingredient, the color, etc. I do not do it. Therefore, according to the conventional inspection method in which the area image 1301 and the area image 1311 are matched, there is a possibility that the area corresponding to the area image 1311 is determined as “NG”.

これに対して、第1の実施形態に係る検品装置120によれば、圧縮処理及びRGB値変換処理が実行されるため、個々の具材の大きさ及び形、色等の違いは吸収されることになる(色変換済みの領域画像1302、1312参照)。一方で、写し出されている内容物が同じである場合、領域画像全体の色味は一致するため、各色に分類される画素数の差を算出すれば、色味が一致していることを判定することができる。このように、第1の実施形態に係る検品装置120によれば、領域画像1311に対応する領域について、正しく“OK”と判定することができる。   On the other hand, according to the inspection apparatus 120 according to the first embodiment, since the compression process and the RGB value conversion process are performed, the difference in size, shape, color, etc. of the individual ingredients is absorbed. (Refer to the color converted area image 1302 and 1312). On the other hand, if the contents of the image are the same, the color tone of the entire area image matches, and if the difference in the number of pixels classified into each color is calculated, it is determined that the colors match. can do. As described above, according to the inspection apparatus 120 according to the first embodiment, the area corresponding to the area image 1311 can be correctly determined as “OK”.

つまり、第1の実施形態に係る検品装置によれば、物品(弁当)の外観検査において、検査精度の向上を図ることが可能となる。   That is, according to the inspection apparatus according to the first embodiment, it is possible to improve the inspection accuracy in the appearance inspection of the article (the lunch box).

[第2の実施形態]
上記第1の実施形態では、領域分割部302、1002がそれぞれ、内容物の種類に応じて検品画像を5個の領域に分割するものとして説明したが、分割する領域数は、5個に限定されない。また、分割方法も、内容物の種類に限定されず、内容物の種類とは無関係に(予め定められた位置で)、分割するようにしてもよい。
Second Embodiment
In the first embodiment, the area dividing units 302 and 1002 each divide the inspection image into five areas according to the type of contents, but the number of areas to be divided is limited to five. I will not. Also, the division method is not limited to the type of contents, and may be divided independently of the type of contents (at a predetermined position).

また、上記第1の実施形態では、圧縮部303、1003がそれぞれ、3画素×3画素(9画素)の画素領域を1画素に圧縮する場合について説明したが、圧縮方法はこれに限定されない。   In the first embodiment, the compression units 303 and 1003 each compress a pixel region of 3 pixels × 3 pixels (9 pixels) into one pixel, but the compression method is not limited to this.

また、上記第1の実施形態では、RGB値変換部304、1004がそれぞれ、25階調を1階調に色変換する場合について説明したが、圧縮部303、1003による色変換方法はこれに限定されない。   In the first embodiment, the RGB value conversion units 304 and 1004 respectively convert 25 gradations into one gradation, but the color conversion method by the compression units 303 and 1003 is limited to this. I will not.

また、上記第1の実施形態では、各領域画像について同じ処理を行うものとして説明したが、領域画像ごとに処理内容を変更してもよい。例えば、領域画像ごとに、圧縮方法や色変換方法を変更してもよいし、あるいは、領域画像ごとに、誤差率を判定する際の閾値を変更してもよい。   In the first embodiment, the same processing is performed on each area image. However, the processing content may be changed for each area image. For example, the compression method or the color conversion method may be changed for each area image, or the threshold for determining the error rate may be changed for each area image.

また、上記第1の実施形態では、検品画像に含まれる全ての領域画像を処理対象として、処理を実行するものとして説明したが、検品画像に含まれる一部の領域画像を処理対象として処理を実行するようにしてもよい。   In the first embodiment, the processing is performed on all the area images included in the inspection image as the processing target. However, the processing is performed on the partial area image included in the inspection image as the processing target. It may be performed.

また、上記第1の実施形態では、各色の画素数の差を単純加算することで、合計差異数を算出したが、各色の画素数の差を重み付け加算することで、合計差異数を算出してもよい。   In the first embodiment, the total difference number is calculated by simply adding the difference in the number of pixels of each color, but the total difference number is calculated by weighted addition of the difference in the number of pixels of each color May be

また、上記第1の実施形態では、検査対象の物品=弁当の場合について説明したが、検査対象の物品はこれに限定されず、パン、野菜、果物、花等の商品のように、外観の色に基づいて、合否の判定が行われる物品であれば、他の物品についても適用可能である。   In the first embodiment, although the case of the inspection object = the lunchbox has been described, the inspection object is not limited thereto, and the appearance is the same as a product such as bread, vegetables, fruits, and flowers. The present invention is also applicable to other articles, as long as the article is subjected to a pass / fail determination based on the color.

なお、開示の技術では、以下に記載する付記のような形態が考えられる。
(付記1)
検査対象の物品を撮影した検品画像において、所定の領域に含まれる画素を、色ごとに分類し、各色の画素数を算出する算出手段と、
モデル画像において、前記所定の領域に対応する領域に含まれる画素の、前記各色の画素数を参照し、算出された前記各色の画素数と比較する比較手段と、
比較結果に基づいて、前記検査対象の物品の合否を判定する判定手段と
を有することを特徴とする検品装置。
(付記2)
前記判定手段は、
前記各色の画素数の差の合計値を、前記所定の領域に含まれる画素数で除算することで得た誤差率に基づいて、前記検査対象の物品の合否を判定することを特徴とする付記1に記載の検品装置。
(付記3)
前記判定手段は、
前記所定の領域について算出した誤差率が、所定の閾値以下でないと判定した場合、前記検査対象の物品が不合格であると判定し、
前記検品画像に含まれる全ての領域について算出した誤差率が、いずれも所定の閾値以下であると判定した場合、前記検査対象の物品が合格であると判定することを特徴とする付記2に記載の検品装置。
(付記4)
前記所定の領域に含まれる画素の画素値を、該画素値が属する階調範囲において予め定められた代表値に変換する変換手段を更に有することを特徴とする付記3に記載の検品装置。
(付記5)
前記所定の領域に含まれる画素について、所定の画素数の画素ごとにまとめて1の画素値を有する画素に圧縮する圧縮手段を更に有することを特徴とする付記4に記載の検品装置。
(付記6)
検査対象の物品を撮影した検品画像において、所定の領域に含まれる画素を、色ごとに分類し、各色の画素数を算出し、
モデル画像において、前記所定の領域に対応する領域に含まれる画素の、前記各色の画素数を参照し、算出された前記各色の画素数と比較し、
比較結果に基づいて、前記検査対象の物品の合否を判定する、
処理をコンピュータが実行する検品方法。
(付記7)
コンピュータに、
検査対象の物品を撮影した検品画像において、所定の領域に含まれる画素を、色ごとに分類し、各色の画素数を算出し、
モデル画像において、前記所定の領域に対応する領域に含まれる画素の、前記各色の画素数を参照し、算出された前記各色の画素数と比較し、
比較結果に基づいて、前記検査対象の物品の合否を判定する、
処理を実行させる検品プログラム。
In addition, in the disclosed technology, a form such as that described below can be considered.
(Supplementary Note 1)
Calculation means for classifying the pixels included in a predetermined area according to colors and calculating the number of pixels of each color in the inspection image obtained by photographing the article to be inspected;
A comparison unit that refers to the number of pixels of each color of the pixels included in the area corresponding to the predetermined area in the model image, and compares the calculated number of pixels of each color;
And a determination unit that determines the acceptability of the item to be inspected based on the comparison result.
(Supplementary Note 2)
The determination means
It is characterized by judging the pass / fail of the article to be inspected based on the error rate obtained by dividing the total value of the difference of the number of pixels of each color by the number of pixels included in the predetermined area. The inspection apparatus according to 1.
(Supplementary Note 3)
The determination means
When it is determined that the error rate calculated for the predetermined area is not less than or equal to a predetermined threshold, it is determined that the article to be inspected is rejected.
When it is determined that the error rates calculated for all the regions included in the inspection image are all equal to or less than a predetermined threshold value, it is determined that the article to be inspected is acceptable. Inspection equipment.
(Supplementary Note 4)
The inspection apparatus according to claim 3, further comprising conversion means for converting pixel values of pixels included in the predetermined area into representative values predetermined in a gradation range to which the pixel values belong.
(Supplementary Note 5)
The inspection apparatus according to claim 4, further comprising compression means for compressing the pixels included in the predetermined area into pixels having a pixel value of 1 collectively for every pixel of a predetermined number of pixels.
(Supplementary Note 6)
In an inspection image obtained by photographing an article to be inspected, pixels included in a predetermined area are classified by color, and the number of pixels of each color is calculated.
In the model image, the number of pixels of each color of the pixels included in the area corresponding to the predetermined area is referred to and compared with the calculated number of pixels of each color,
Determine the pass / fail of the item to be inspected based on the comparison result;
An inspection method in which a computer executes processing.
(Appendix 7)
On the computer
In an inspection image obtained by photographing an article to be inspected, pixels included in a predetermined area are classified by color, and the number of pixels of each color is calculated.
In the model image, the number of pixels of each color of the pixels included in the area corresponding to the predetermined area is referred to and compared with the calculated number of pixels of each color,
Determine the pass / fail of the item to be inspected based on the comparison result;
Inspection program to execute the process.

なお、上記実施形態に挙げた構成等に、その他の要素との組み合わせ等、ここで示した構成に本発明が限定されるものではない。これらの点に関しては、本発明の趣旨を逸脱しない範囲で変更することが可能であり、その応用形態に応じて適切に定めることができる。   Note that the present invention is not limited to the configurations shown here, such as combinations with other elements in the configurations and the like described in the above embodiments. These points can be modified without departing from the spirit of the present invention, and can be appropriately determined according to the application form.

100 :検品システム
110 :撮像装置
120 :検品装置
121 :生成部
122 :検品部
301 :画像データ取得部
302 :領域分割部
303 :圧縮部
304 :RGB値変換部
305 :モデルデータ算出部
306 :選択部
911〜952 :モデルデータ
1001 :画像データ取得部
1002 :領域分割部
1003 :圧縮部
1004 :RGB値変換部
1005 :検品データ算出部
1006 :判定部
100: inspection system 110: imaging device 120: inspection device 121: generation unit 122: inspection unit 301: image data acquisition unit 302: area division unit 303: compression unit 304: RGB value conversion unit 305: model data calculation unit 306: selection Parts 911 to 952: model data 1001: image data acquisition part 1002: area division part 1003: compression part 1004: RGB value conversion part 1005: inspection data calculation part 1006: judgment part

Claims (7)

検査対象の物品を撮影した検品画像において、所定の領域に含まれる画素を、色ごとに分類し、各色の画素数を算出する算出手段と、
モデル画像において、前記所定の領域に対応する領域に含まれる画素の、前記各色の画素数を参照し、算出された前記各色の画素数と比較する比較手段と、
比較結果に基づいて、前記検査対象の物品の合否を判定する判定手段と
を有することを特徴とする検品装置。
Calculation means for classifying the pixels included in a predetermined area according to colors and calculating the number of pixels of each color in the inspection image obtained by photographing the article to be inspected;
A comparison unit that refers to the number of pixels of each color of the pixels included in the area corresponding to the predetermined area in the model image, and compares the calculated number of pixels of each color;
And a determination unit that determines the acceptability of the item to be inspected based on the comparison result.
前記判定手段は、
前記各色の画素数の差の合計値を、前記所定の領域に含まれる画素数で除算することで得た誤差率に基づいて、前記検査対象の物品の合否を判定することを特徴とする請求項1に記載の検品装置。
The determination means
According to an error rate obtained by dividing the total value of the differences in the number of pixels of each color by the number of pixels included in the predetermined area, the pass / fail of the article to be inspected is determined. An inspection device according to Item 1.
前記判定手段は、
前記所定の領域について算出した誤差率が、所定の閾値以下でないと判定した場合、前記検査対象の物品が不合格であると判定し、
前記検品画像に含まれる全ての領域について算出した誤差率が、いずれも所定の閾値以下であると判定した場合、前記検査対象の物品が合格であると判定することを特徴とする請求項2に記載の検品装置。
The determination means
When it is determined that the error rate calculated for the predetermined area is not less than or equal to a predetermined threshold, it is determined that the article to be inspected is rejected.
When it is determined that the error rates calculated for all the regions included in the inspection image are all equal to or less than a predetermined threshold, it is determined that the article to be inspected is a pass. Inspection device described.
前記所定の領域に含まれる画素の画素値を、該画素値が属する階調範囲において予め定められた代表値に変換する変換手段を更に有することを特徴とする請求項3に記載の検品装置。   4. The inspection apparatus according to claim 3, further comprising conversion means for converting pixel values of pixels included in the predetermined area into representative values predetermined in a gradation range to which the pixel values belong. 前記所定の領域に含まれる画素について、所定の画素数の画素ごとにまとめて1の画素値を有する画素に圧縮する圧縮手段を更に有することを特徴とする請求項4に記載の検品装置。   5. The inspection apparatus according to claim 4, further comprising compression means for compressing the pixels included in the predetermined area into pixels having a pixel value of 1 collectively for every pixel of a predetermined number of pixels. 検査対象の物品を撮影した検品画像において、所定の領域に含まれる画素を、色ごとに分類し、各色の画素数を算出し、
モデル画像において、前記所定の領域に対応する領域に含まれる画素の、前記各色の画素数を参照し、算出された前記各色の画素数と比較し、
比較結果に基づいて、前記検査対象の物品の合否を判定する、
処理をコンピュータが実行する検品方法。
In an inspection image obtained by photographing an article to be inspected, pixels included in a predetermined area are classified by color, and the number of pixels of each color is calculated.
In the model image, the number of pixels of each color of the pixels included in the area corresponding to the predetermined area is referred to and compared with the calculated number of pixels of each color,
Determine the pass / fail of the item to be inspected based on the comparison result;
An inspection method in which a computer executes processing.
コンピュータに、
検査対象の物品を撮影した検品画像において、所定の領域に含まれる画素を、色ごとに分類し、各色の画素数を算出し、
モデル画像において、前記所定の領域に対応する領域に含まれる画素の、前記各色の画素数を参照し、算出された前記各色の画素数と比較し、
比較結果に基づいて、前記検査対象の物品の合否を判定する、
処理を実行させる検品プログラム。
On the computer
In an inspection image obtained by photographing an article to be inspected, pixels included in a predetermined area are classified by color, and the number of pixels of each color is calculated.
In the model image, the number of pixels of each color of the pixels included in the area corresponding to the predetermined area is referred to and compared with the calculated number of pixels of each color,
Determine the pass / fail of the item to be inspected based on the comparison result;
Inspection program to execute the process.
JP2017213063A 2017-11-02 2017-11-02 Inspection device, inspection method and inspection program Active JP7167426B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017213063A JP7167426B2 (en) 2017-11-02 2017-11-02 Inspection device, inspection method and inspection program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017213063A JP7167426B2 (en) 2017-11-02 2017-11-02 Inspection device, inspection method and inspection program

Publications (2)

Publication Number Publication Date
JP2019086914A true JP2019086914A (en) 2019-06-06
JP7167426B2 JP7167426B2 (en) 2022-11-09

Family

ID=66763033

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017213063A Active JP7167426B2 (en) 2017-11-02 2017-11-02 Inspection device, inspection method and inspection program

Country Status (1)

Country Link
JP (1) JP7167426B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021039691A (en) * 2019-09-05 2021-03-11 株式会社富士通アドバンストエンジニアリング Inspection device, inspection method, and inspection program
JP7396160B2 (en) 2020-03-26 2023-12-12 富士通株式会社 Inspection equipment, inspection program and inspection method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09203664A (en) * 1996-01-25 1997-08-05 C G A Kk Hue inspecting apparatus
JP2009126058A (en) * 2007-11-22 2009-06-11 Olympus Corp Image recording device and poor recording detecting method
JP2012505485A (en) * 2008-10-14 2012-03-01 シクパ ホールディング エスアー Method and system for item identification
JP2014021973A (en) * 2012-07-19 2014-02-03 Suzhou Bitstrong Electronics Co Ltd Image processor
JP2014145639A (en) * 2013-01-29 2014-08-14 Tdi Product Solution Co Ltd Food product inspection device
JP2017527905A (en) * 2014-08-26 2017-09-21 ノースロップ グラマン システムズ コーポレイションNorthrop Grumman Systems Corporation Foreign matter detection system based on color

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09203664A (en) * 1996-01-25 1997-08-05 C G A Kk Hue inspecting apparatus
JP2009126058A (en) * 2007-11-22 2009-06-11 Olympus Corp Image recording device and poor recording detecting method
JP2012505485A (en) * 2008-10-14 2012-03-01 シクパ ホールディング エスアー Method and system for item identification
JP2014021973A (en) * 2012-07-19 2014-02-03 Suzhou Bitstrong Electronics Co Ltd Image processor
JP2014145639A (en) * 2013-01-29 2014-08-14 Tdi Product Solution Co Ltd Food product inspection device
JP2017527905A (en) * 2014-08-26 2017-09-21 ノースロップ グラマン システムズ コーポレイションNorthrop Grumman Systems Corporation Foreign matter detection system based on color

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021039691A (en) * 2019-09-05 2021-03-11 株式会社富士通アドバンストエンジニアリング Inspection device, inspection method, and inspection program
JP7396160B2 (en) 2020-03-26 2023-12-12 富士通株式会社 Inspection equipment, inspection program and inspection method

Also Published As

Publication number Publication date
JP7167426B2 (en) 2022-11-09

Similar Documents

Publication Publication Date Title
US8472718B2 (en) Superpixel segmentation methods and systems
US9179092B2 (en) System and method producing high definition video from low definition video
US20160019688A1 (en) Method and system of estimating produce characteristics
JP2008234551A (en) Abnormality detection apparatus and abnormality detection program
JPH11502335A (en) Apparatus and method for providing depth modeling and depth information of moving object
US11055816B2 (en) Image processing device, image processing method, and image processing program
JP2015507807A (en) Quality evaluation of image composition change
CN109977952B (en) Candidate target detection method based on local maximum
JP7167426B2 (en) Inspection device, inspection method and inspection program
US20140185956A1 (en) Device and method of image processing
EP3012781A1 (en) Method and apparatus for extracting feature correspondences from multiple images
CN111401269A (en) Commodity hotspot detection method, device and equipment based on monitoring video
JP6316569B2 (en) Article identification system and its program
JP2018508910A (en) Foreground detection using fractal dimension measurement
Niu et al. Image retargeting quality assessment based on registration confidence measure and noticeability-based pooling
CN111444806A (en) Commodity touch information clustering method, device and equipment based on monitoring video
US20160275370A1 (en) Methods and systems for determining a perceptual similarity between images
GB2457797A (en) Associating face images using covariance matrices of extracted features
US11003735B2 (en) Computer architecture for emulating recording and playback in a correlithm object processing system
JP6404794B2 (en) Image information acquisition method, image evaluation method, image information acquisition device, image evaluation device, and image processing program
Mousse et al. Foreground-background segmentation based on codebook and edge detector
US20220414826A1 (en) Image processing apparatus, image processing method, and medium
JP7396160B2 (en) Inspection equipment, inspection program and inspection method
US11182617B2 (en) Device and method for generating heat map
CN115374517A (en) Testing method and device for wiring software, electronic equipment and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200803

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210824

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20210825

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211005

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211119

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220412

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220608

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221010

R150 Certificate of patent or registration of utility model

Ref document number: 7167426

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150