WO2019151393A1 - 食品検査システム、食品検査プログラム、食品検査方法および食品生産方法 - Google Patents

食品検査システム、食品検査プログラム、食品検査方法および食品生産方法 Download PDF

Info

Publication number
WO2019151393A1
WO2019151393A1 PCT/JP2019/003365 JP2019003365W WO2019151393A1 WO 2019151393 A1 WO2019151393 A1 WO 2019151393A1 JP 2019003365 W JP2019003365 W JP 2019003365W WO 2019151393 A1 WO2019151393 A1 WO 2019151393A1
Authority
WO
WIPO (PCT)
Prior art keywords
luminance
food
image
value
neural network
Prior art date
Application number
PCT/JP2019/003365
Other languages
English (en)
French (fr)
Inventor
史章 竹田
友亮 吾郷
塚本 真也
稔 間宮
青木 仁史
Original Assignee
株式会社ニチレイフーズ
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 株式会社ニチレイフーズ filed Critical 株式会社ニチレイフーズ
Priority to JP2019516028A priority Critical patent/JPWO2019151393A1/ja
Publication of WO2019151393A1 publication Critical patent/WO2019151393A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Definitions

  • the present invention relates to a food inspection system, a food inspection program, a food inspection method, and a food production method.
  • Patent Document 1 discloses an apparatus for detecting foreign matter from fluorescence generated by irradiating a fish fillet with ultraviolet rays.
  • Patent Document 2 discloses a method in which meat is irradiated with visible light and fluorescence generated from the parasite is selectively detected by a filter.
  • Patent Document 3 discloses an apparatus that irradiates meat with ultraviolet rays, generates an image based on generated fluorescence, and determines a marbling grade.
  • the present invention provides a food inspection system, a food inspection program, a food inspection method, and a food production method that realize accurate and rapid selection of food raw materials and contribute to the production and cost reduction of high-quality food.
  • Extracting luminance information of the pixel generating luminance data including an element storing the luminance value in the luminance information of the pixel; and degrading or ascending the luminance value in the element of the luminance data.
  • Performing the alignment step and inputting the luminance data as first input data to a neural network and estimating a determination mode of a food to be inspected based on a reaction value in an output layer of the neural network.
  • the determination image is converted into first input data in which information on the size, shape, position, and direction (rotation) of the food to be inspected is discarded, and then input to the neural network.
  • the figure which showed the structural example of the imaging device for blood sorting The figure which shows the example of the image which image
  • the histogram which showed the frequency distribution which concerns on the brightness
  • the flowchart of the learning process which concerns on 1st Embodiment The figure which shows the example of the neural network which outputs three reaction values.
  • the figure which shows the arithmetic processing between the units of a neural network A graph showing the Gaussian function.
  • Graph showing sigmoid function The flowchart of the determination process which concerns on 1st Embodiment. Discrimination surface and reaction value distribution when RBF is used as the activation function. Distribution of response surface and discrimination surface when sigmoid function is used for activation function.
  • luminance in the 2nd input data corresponded to a good quality image.
  • FIG. 1 is a diagram illustrating a configuration example of the entire food inspection system according to the first embodiment.
  • a food inspection apparatus 1 includes a food inspection apparatus 1, a photographing apparatus 2, a sorting apparatus 3, a transport apparatus 4, a slide 5, and a PLC (programmable logic controller) 6.
  • a food inspection apparatus 1 includes a food inspection apparatus 1, a photographing apparatus 2, a sorting apparatus 3, a transport apparatus 4, a slide 5, and a PLC (programmable logic controller) 6.
  • Food inspection system automatically determines good and defective products based on images of food.
  • the defective product means a food having a defect or a food containing a foreign object.
  • good products refer to foods that are free from defects and foreign matter.
  • foods to be inspected by the food inspection system include chicken, pork, beef, lamb, seafood, vegetables, fruits, cereals, beverages, and seasonings, but the type of food is not particularly limited.
  • meat such as chicken, pork, beef, and seafood
  • unheated raw meat may be the inspection target, and heated meat may be the inspection target.
  • the food may be an unprocessed raw material, a raw fillet, or a product that has been processed in some way. That is, the degree of processing of food is not particularly limited.
  • a blood clot is an example of a defect in chicken, but other types of defects may also be examined.
  • wing which is one of the foreign materials in chicken is mentioned later.
  • the food inspection system learns a neural network using data generated based on the brightness of pixels included in an image of a sample food (sample food).
  • the data is converted into data that can be input to the neural network based on the luminance of the pixel of the image obtained by photographing the food to be inspected, and then input to the neural network.
  • input data data converted into a format that can be input to the input layer of the neural network is referred to as input data.
  • the food inspection system determines good and defective products based on the reaction values in the output layer from the neural network. Based on the determination result, food groups in which good products and good products are mixed may be sorted.
  • Food inspection system can use images optimized for learning process and judgment process for effective learning and high accuracy judgment.
  • the frequency spectrum and polarization of a light source used when photographing food may be controlled.
  • a filter may be attached to the camera, and an image obtained through the filter may be used.
  • various image processes may be performed on the image after photographing so that blood and foreign matter can be easily detected.
  • blood includes not only coloring caused by bruises in meat and blood clumps, but also coloring portions that differ from other portions in color, flavor, and the like.
  • the food inspection apparatus 1 performs image processing, input data generation, neural network learning, non-defective product and defective product determination using the neural network, and the like.
  • the food inspection apparatus 1 is an information processing apparatus such as a computer that includes one or more CPUs (Central Processing Units), a storage unit, and a communication unit and that operates an OS (Operating System) and applications.
  • the food inspection apparatus 1 may be a physical computer, or may be realized by a virtual machine (VM), a container, or a combination thereof.
  • the function of the food inspection apparatus 1 may be shared by one or more physical computers, virtual computers, and containers. It is not excluded to use a configuration in which the number of food inspection apparatuses 1 is increased in order to improve availability and load distribution. In addition, the detail of the function of the food inspection apparatus 1 is mentioned later.
  • the photographing device 2 illuminates the food contained in the housing with a light source and photographs it.
  • An image photographed by the photographing device 2 is stored in the storage unit of the food inspection device 1. It is assumed that the interface between the imaging apparatus 2 and the food inspection apparatus 1 is performed by Ethernet, wireless LAN, PCI Express, USB, UART, SPI, SDIO, serial port, Bluetooth, or the like. These interfaces are examples and do not preclude the use of other methods. Details of the photographing apparatus 2 will also be described later.
  • the sorting device 3 sorts a food group in which good products and good products are mixed based on the determination result by the food inspection device 1.
  • a device that pushes out the food conveyed by the conveying device 4 from the conveying device 4 is shown, but the structure and operation of the sorting device 3 are not particularly limited.
  • the sorting device 3 may be a device that transports food determined to be defective in a direction different from that of non-defective products. Further, the sorting device 3 may be a robot that grips (picks) food that has been determined to be defective or foreign.
  • the sorting apparatus 3 is connected to the food inspection apparatus 1 via the PLC 6.
  • a control signal is transmitted to the PLC 6.
  • the sorting device 3 sorts food groups in which defective products and non-defective products are mixed. Note that the food inspection system does not necessarily include the sorting device 3. Regardless of the presence or absence of the sorting device 3, the worker may manually remove the food that is determined to be defective by the food inspection device 1.
  • the transport device 4 transports food to a photographing area below the photographing device 2. Thereafter, the food is transported to the sorting device 3 by the transport device 4.
  • various conveyor devices such as a belt conveyor, a chain conveyor, a roller conveyor, a mesh conveyor, and a gravity conveyor can be used.
  • the conveyor device is an example, and the food may be transported using other moving bodies, and the transport means is not particularly limited.
  • the foodstuff is conveyed toward the right from the left, it does not specifically limit also about the direction in which foodstuff is conveyed.
  • the transport device 4 By providing the transport device 4, it is possible to shoot and judge the flowing food in any process of food processing or food manufacturing.
  • the food inspection system does not necessarily include the transport device 4, but it is desirable to include some transport means for efficient image capturing and high speed food inspection. A configuration example of the transport device will be described later.
  • the slide 5 moves the food determined to be defective in a different direction from the non-defective product.
  • the food pushed out from the conveying device 4 by the sorting device 3 descends on the slide 5 by its own weight.
  • a large container may be installed in the lower part of the slide 5, or another conveyance device may be installed.
  • the food judged to be defective may be processed in the next step as a good product free of wrinkles after removing foreign matters and blood, or may be discarded.
  • the slide 5 of FIG. 1 is only an example of a means for moving the food determined to be defective.
  • the food inspection system may sort food that has been determined to be defective by other methods.
  • the PLC 6 controls the sorting device 3 or the transport device 4 based on the control signal transmitted from the food inspection device 1.
  • an image of the food 61 is taken by the photographing device 2.
  • the photographed food image is stored in the food inspection apparatus 1 and used for determination. Since the food 62 is determined to be a defective product with blood, it is pushed out of the conveying device 4 by the sorting device 3 and descends on the slide 5. Since it is determined that the food 63 is a non-defective product, it can proceed to the next step without being sorted from the food group.
  • the food inspection apparatus 1 includes a control unit 10, an image storage unit 11, an image processing unit 12, an input data generation unit 13, a learning data storage unit 14, a learning unit 15, a model storage unit 16, and a determination unit. 17, a display unit 18, and an operation unit 19.
  • the control unit 10 instructs the camera 22 of the photographing apparatus 2 to take an image. That is, the sensor 23 detects that the food has been moved below the photographing apparatus 2 by the transport device 4.
  • the control unit 10 instructs photographing at the timing when the food enters the photographing angle of the camera 22. This timing can be estimated based on the detection time of the food by the sensor 23 and the moving speed of the transport device 4, for example. Thus, the food of the food is automatically taken by the function of the control unit 10.
  • the image storage unit 11 is a storage area for storing an image photographed by the camera 22 of the photographing apparatus 2.
  • the image storage unit 11 may be a volatile memory such as SRAM or DRAM, or a nonvolatile memory such as NAND, MRAM, or FRAM.
  • a storage device such as an optical disk, a hard disk, or an SSD may be used.
  • the image storage unit 11 may be built in the food inspection apparatus 1 or may be a storage device outside the food inspection apparatus 1. Further, the image storage unit 11 may be a removable storage medium such as an SD memory card or a USB memory.
  • the image processing unit 12 performs image processing on the captured food image, and stores the image after the image processing is performed in the image storage unit 11.
  • image processing an image is generated by extracting the luminance of each color of red, green, and blue (RGB) at a pixel in the image, and the luminance of green (G) is subtracted from the luminance of red (R) at each pixel.
  • RGB red, green, and blue
  • G luminance of green
  • R luminance of red
  • the image processing unit 12 may also perform image enlargement, reduction, cropping, noise removal, rotation, inversion, color depth change, contrast adjustment, brightness adjustment, sharpness adjustment, color correction, and the like. A plurality of processes may be executed in combination.
  • the function of the image processing unit 12 can be realized by, for example, an image processing library or image processing software, but may be implemented using a semiconductor circuit such as an FPGA or ASIC having an image processing function. Note that the food inspection apparatus 1 does not necessarily include the image processing unit 12. Further, it is not necessary to perform image processing on the photographed food image.
  • the input data generation unit 13 generates input data that is input from the food image to the input layer of the neural network. For example, if the number of units included in the input layer of the neural network is smaller than the number of pixels included in the image, the number of input variables is stored in the input layer of the neural network while retaining information necessary for learning and determination included in the image. It is necessary to reduce it to a number equal to the number N of units included. Details of the input data generation processing by the input data generation unit 13 will be described later.
  • the image converted into input data by the input data generation unit 13 may be an image that has been subjected to image processing, or may be any unprocessed image that has been captured by the camera 22.
  • the input data generation unit 13 stores the input data in the learning data storage unit 14.
  • the input data is transferred to the determination unit 17.
  • a method of transferring input data to the determination unit 17 there are a method of placing input data in a shared memory, a method of using inter-process communication, and the like, but there is no particular limitation.
  • the input data generation unit 13 does not necessarily use an image captured by the camera 22 of the imaging device 2.
  • input data may be generated using an image taken by an external device or system.
  • the learning data storage unit 14 is a storage area for storing a plurality of input data used for learning of the neural network.
  • the input data stored in the learning data storage unit 14 is used as learning data (teacher data) of the learning unit 15.
  • learning data teacher data
  • second input data Even if the input data used as learning data (second input data) is stored in a state in which the judgment modes such as non-defective product, defective product, foreign matter, foreign matter, bloodyness, bloodyness, bloodlessness, and difficult to judge are labeled. Good.
  • the labeling of the second input data can be performed, for example, when the user visually determines an image displayed on the display unit 18 and the user operates the operation unit 19. It should be noted that if the determination mode of images taken continuously is known, labeling may be automatically performed by a program or script. The labeling of the determination mode may be performed before the conversion to the second input data, or may be performed after the conversion to the second input data.
  • the learning data storage unit 14 may be a volatile memory such as SRAM or DRAM, or a non-volatile memory such as NAND, MRAM, or FRAM.
  • a storage device such as an optical disk, a hard disk, or an SSD may be used.
  • the learning data storage unit 14 may be built in the food inspection apparatus 1 or may be a storage device outside the food inspection apparatus 1.
  • the learning data storage unit 14 may be a removable storage medium such as an SD memory card or a USB memory.
  • the learning unit 15 learns the neural network using the input data (second input data) stored in the learning data storage unit 14.
  • the learning unit 15 stores the learned neural network in the model storage unit 16.
  • the learning unit 15 can learn, for example, a three-layer neural network of an input layer, a hidden layer, and an output layer. By learning a three-layer neural network, real-time response performance during food inspection can be ensured.
  • the number of units included in each of the input layer, hidden layer, and output layer is not particularly limited. The number of units included in each layer can be determined based on required response performance, determination target, identification performance, and the like.
  • the three-layer neural network is an example, and does not prevent the use of a multilayer neural network having a larger number of layers.
  • various neural networks such as a convolutional neural network can be used.
  • the model storage unit 16 is a storage area for storing the neural network learned by the learning unit 15.
  • a plurality of neural networks may be stored in the model storage unit 16 according to the type of food to be inspected and the type of foreign matter to be detected. Since the model storage unit 16 is set so that it can be referred to by the determination unit 17, the determination unit 17 can inspect food using a neural network stored in the model storage unit 16.
  • the model storage unit 16 may be a volatile memory such as RAM or DRAM, or a nonvolatile memory such as NAND, MRAM, or FRAM.
  • a storage device such as an optical disk, a hard disk, or an SSD may be used.
  • the model storage unit 16 may be built in the food inspection apparatus 1 or may be a storage device outside the food inspection apparatus 1.
  • the model storage unit 16 may be a removable storage medium such as an SD memory card or a USB memory.
  • the determination unit 17 determines a non-defective product and a defective product using a neural network stored in the model storage unit 16.
  • the determination unit 17 estimates a food determination mode (for example, non-defective product, defective product, difficult determination, etc.) based on the reaction value output from the unit of the output layer.
  • the output layer unit include a non-defective unit, a defective unit, a unit without foreign matter, a unit with foreign matter, and a unit whose determination is unknown, but other types of units may be prepared.
  • the determination unit 17 can estimate the food determination mode by comparing the reaction value with a threshold value.
  • the determination mode of the food may be estimated using a difference or ratio between the response values of a plurality of units.
  • the functions of the learning unit 15 and the determination unit 17 may be realized by a program operating on the CPU, or some or all of the functions are realized by a semiconductor circuit such as an FPGA or an ASIC or a GPU (Graphics Processing Unit). May be.
  • the display unit 18 is a display that displays images and text.
  • the display unit 18 may display a captured image or an image after image processing, or may display a food inspection determination result or detection result.
  • GUI Graphic User Interface
  • CLI Common Line Interface
  • etc. may be displayed to provide an operation screen for the user.
  • the display unit 18 for example, an LCD (liquid crystal display), a CRT (CRT), an organic EL (organic electroluminescence) display, or the like can be used, but other types of devices may be used.
  • the display unit 18 in the example of FIG. 1 is built in the food inspection apparatus 1, but the position of the display unit 18 is not particularly limited.
  • the display unit 18 may be installed in a room or building away from the food inspection apparatus 1.
  • the operation unit 19 is an apparatus that provides an operation means of the food inspection apparatus 1 by the user.
  • the operation unit 19 is, for example, a keyboard, a mouse, a button, a switch, a voice recognition device, or the like, but is not limited thereto.
  • the operation unit 19 may be an integrated touch panel with the display unit 18.
  • the position of the operation unit 19 is not particularly limited.
  • the operation unit 19 may be installed in a room or building apart from the food inspection apparatus 1.
  • FIGS. 2 and 3 show a configuration example of the apparatus according to the first embodiment. Hereinafter, the configuration of each apparatus will be described with reference to FIGS. 2 and 3.
  • FIG. 2 and 3 show the configuration of some devices included in the food inspection system.
  • FIG. 2 is a side view showing the configuration when the apparatus is viewed from the side.
  • FIG. 3 is a plan view showing a configuration when the apparatus is viewed from above. 2 and 3 show the photographing device 2a, the sorting device 3a, the transport device 4a, and the display unit 18a.
  • the conveying device 4a can move the food arranged on the conveyor in the length direction.
  • the imaging device 2a is installed so as to cover a part of the conveyor of the transport device 4a.
  • the food arranged on the conveyor is photographed at the timing when it enters the photographing region below the photographing device 2a.
  • the display unit 18a is arranged so as to stand upright along one side surface of the transport device 4a. Thereby, the worker can perform the sorting operation while confirming the video displayed on the display unit 18a.
  • the sorting device 3a is a shuttle type conveyor device, and when it is determined that the food to be inspected is defective or foreign matter, the corresponding food is moved in a direction different from the non-defective product.
  • a detection technique based on the above-described color difference will be described.
  • a region with blood on chicken is identified based on the color in the food image.
  • the inspection apparatus is set so that pixels having a specific range of colors in the image are determined to be bloody.
  • FIG. 4 shows an example of blood contact detection based on a difference in color.
  • On the left side of FIG. 4 is an image of chicken before blood detection processing.
  • an image of chicken after image processing is shown on the right side of FIG.
  • a portion with blood is surrounded by an ellipse.
  • On the right side of FIG. 4 the bloody part is highlighted brightly, and it can be seen that the blood detection is successful in the example of FIG. 4.
  • accurate blood detection is not always performed.
  • FIG. 5 shows an example of erroneous detection in determination based on the difference in color.
  • FIG. 5 shows chicken with a depression at the end. Depending on the angle of illumination, the indented portion of the chicken may become a shadow. In the image of FIG. 5, the indented portion is expressed in a dark color different from the original chicken color.
  • the left side of FIG. 5 is an image of chicken before blood detection processing, and the right side of FIG. 5 is an image of chicken after blood detection processing. On the right side of FIG. 5, the indentation at the end of the chicken is highlighted brightly, indicating that it is erroneously determined as a bloody part.
  • the upper part of FIG. 6 shows an example of an image of chicken taken without passing through a polarizing filter.
  • food such as meat may be inspected in a wet state. Since wet food may reflect light, accurate color information of the food may not be acquired at the time of photographing.
  • the method for photographing meat is changed in order to realize highly accurate blood detection.
  • a polarizing filter is disposed in front of the camera and photographing is performed through the polarizing filter.
  • the lower part of FIG. 6 is an image when the same chicken as in the upper part of FIG. 6 is photographed through a polarizing filter.
  • light reflection components and shine are removed from the image, and accurate color information is acquired.
  • the reflection of water on the conveyor disappears, making it easier to see the image.
  • image processing may be performed on a photographed image to facilitate detection of blood clots and foreign matters.
  • luminance information Information having various luminance values related to pixels is collectively referred to as luminance information.
  • luminance information include color information of the three primary colors of light such as red, green, and blue included in the pixels of the color image, and brightness information included in the pixels of the grayscale image.
  • brightness information of pixels related to the image after image processing may be used as the luminance information.
  • images after image processing include an image obtained by subtracting the green luminance from the red luminance of each pixel, an image obtained by extracting only the red luminance component, and an image obtained by converting a color image to grayscale. Other images may be used.
  • the brightness in the brightness information described above may be obtained by weighted addition of brightness of color information relating to at least two or more colors of red, green, and blue of pixels included in the image.
  • the luminance in the above-described brightness information may be obtained by subtracting the luminance of the color information relating to two colors among red, green, and blue of the pixel.
  • FIG. 7 shows an example of an image obtained by subtracting the green luminance from the red luminance of each pixel.
  • the image 131 from which red (R) luminance is separated the image 132 from which green (G) luminance is separated, and blue (B).
  • An image 133 with separated luminance is shown.
  • the original image 130 is a color image
  • the images 131 to 133 are grayscale images as long as they can express the magnitude of the luminance associated with each color. Brightness information is stored in the pixels of the grayscale image instead of color information.
  • FIG. 7 shows an image 134 obtained by subtracting the green luminance from the red luminance in each pixel.
  • a bloody part in the original image 130 is shown in white and highlighted.
  • the image processing unit 12 may emphasize red and green of the original image before separating the image into luminance for each color.
  • FIG. 8 shows an example of an image taken by a color camera capable of infrared photography.
  • a color camera capable of infrared imaging is an example of a camera that can capture images related to electromagnetic waves in a plurality of wavelength regions. It is assumed that the subjects of the images 241 to 244 are the same meat. This meat has a relatively dark blood. Some of the darker colors are darker. However, since the blood color varies depending on the type and part of the meat to be inspected, the color and density of the blood to be detected are not particularly limited.
  • the image 241 is an image (an example of a red component image) showing the intensity related to red visible light (R).
  • the image 242 is an image (an example of a green component image) showing the intensity related to green visible light (G).
  • the image 243 is an image (an example of a blue component image) showing the intensity related to blue visible light (B).
  • the image 244 is an image (an example of an infrared image) showing the intensity related to near infrared rays. In the images 241 to 243, the intensity corresponds to the luminance related to each color component.
  • the intensity of the electromagnetic wave in the corresponding wavelength region in each pixel is displayed after being converted into grayscale gradation (luminance).
  • the pixel is displayed brighter as the intensity of the electromagnetic wave in the corresponding wavelength region increases.
  • the smaller the intensity of the electromagnetic wave related to the corresponding wavelength region the darker the pixel is displayed. Referring to the images 241 to 244, it can be seen that in any of the images, the flesh portion is brighter than the surroundings, and the intensity of the electromagnetic wave in the corresponding wavelength region is stronger than the surroundings.
  • the image shown in FIG. 8 is only an example of an image taken by a camera capable of taking images related to electromagnetic waves in a plurality of wavelength regions. Therefore, a different type of food from the example of FIG. 8 may be the subject, and an electromagnetic wave image related to a wavelength region not shown in the example of FIG. 8 may be taken.
  • the blood formed by the blood derived from the veins tends to be a dark black blood.
  • blood formed by blood derived from arteries tends to be bloody with strong redness.
  • image processing that is executed when it is desired to improve the accuracy with which a relatively dark blood color, such as a dark blood color, is detected will be described.
  • a relatively dark blood color such as a dark blood color
  • the image processing unit 12 generates an image (input image) to be converted into input data based on the electromagnetic wave images related to a plurality of wavelength regions.
  • FIG. 9 shows an example of an input image generated by the image processing unit 12.
  • the image processing unit 12 can generate an image 246 obtained by subtracting a visible light green component image (for example, the image 242) from the near-infrared image (for example, the image 244).
  • the image 245 is an example of an image obtained by subtracting a visible light green component image (for example, the image 242) from a visible light red component image (for example, the image 241).
  • the luminance of each pixel of the generated third image is determined from the luminance of the corresponding pixel of the first image by the corresponding pixel of the second image. It is a value obtained by subtracting the brightness of.
  • binarization processing may be performed on the image generated after the calculation.
  • the binarization process there is a process of comparing the luminance (brightness) of each pixel in the image with a threshold value.
  • the threshold value is not particularly limited.
  • the type of image used when generating the input image and the algorithm used are not particularly limited.
  • the input image may be an image in which each pixel has information relating to one type of brightness (brightness).
  • Such an image is generally visualized as a gray scale image or an image related to a single color gradation when displayed on a display or during printing.
  • the image obtained by subtracting the green component image from the near-infrared image is an example of an input image having information related to one type of brightness (brightness).
  • the image converted into the input data may be an image in which at least some pixels are included in the range of the food to be examined. In the image, it does not matter whether or not the pixel corresponding to the food to be inspected, which is the subject, is visually or data identifiable.
  • FIG. 10 shows a configuration example of an imaging apparatus for blood sorting.
  • the photographing apparatus 2a will be described with reference to FIG.
  • FIG. 10 is a cross-sectional view of the photographing apparatus 2a.
  • the imaging device 2a has a substantially rectangular parallelepiped housing that is open at the bottom facing the transport device 4a.
  • the imaging device 2a is supported so as to cover a partial section of the transport device 4a from above.
  • the imaging device 2a may include a wall on a part or all of the side surface. Further, a ceiling may be provided on the upper part of the photographing apparatus 2a. By providing the ceiling and the wall, it is possible to suppress infrared rays, visible light, ultraviolet rays, and the like from an external light source from entering the imaging region. Thereby, the imaging device 2a can selectively irradiate the food to be imaged with light having a necessary property from a desired light source.
  • the photographing apparatus 2a does not necessarily have a ceiling or a wall.
  • the influence from an external light source is small, so that a light-shielding ceiling or wall can be omitted.
  • the material of the ceiling and wall include stainless steel, aluminum, and resin, but the material is not particularly limited.
  • the photographing apparatus 2a includes an illumination unit 21, a polarizing plate 21a, a camera 22, a polarizing plate 22a, and a sensor 23.
  • the illumination unit 21 is an illumination device using, for example, a white LED.
  • the white LED is an example, and an LED having a different color may be used as the light source.
  • you may comprise a light source combining LED of several colors, such as red, green, and blue.
  • other light sources such as an electroluminosense lamp, an HID lamp, a fluorescent lamp, and an incandescent lamp may be used.
  • the type of light source to be used can be determined according to the type of food or foreign matter to be detected.
  • the light source is not limited to the one that emits visible light, but may be one that emits infrared rays, ultraviolet rays, or the like, or a combination of light sources related to a plurality of wavelengths (multi-wavelength).
  • the illumination unit 21 may not be a single light source, but may be light sources arranged at a plurality of positions as in the example of FIG. For example, the number and position of the light sources in the illuminating unit 21 can be determined so that visible light is irradiated onto the imaging region below the imaging device 2a.
  • a polarizing plate 21 a is provided on the front surface of the illumination unit 21.
  • the polarizing plate 21a is, for example, a linear polarizing plate.
  • the polarizing plate 21a does not necessarily have to be provided on the front surface of the illumination unit 21, but if the polarizing plate 21a is provided, irregular reflection of light due to the surface of the transport device 4a and the moisture or oil of food is suppressed, and the accuracy of the food in the camera 22 is suppressed. Contributes to the acquisition of accurate color information.
  • the camera 22 photographs the food illuminated by the light beam emitted from the illumination unit 21.
  • a CMOS image sensor or a CCD image sensor is mounted inside the camera 22, and a color image including color information relating to food to be photographed can be obtained.
  • These imaging elements are examples, and imaging may be performed using different devices.
  • the lens of the camera 22 may be a fixed focus lens or a zoom lens, and the type of lens is not particularly limited.
  • An example of the resolution related to the image captured by the camera 22 is full HD (1920 ⁇ 1080 pixels), but the resolution of the captured image is not particularly limited.
  • the image captured by the camera 22 is not limited to a color image in which each pixel includes information on the luminance of three colors of red, green, and blue (RGB).
  • RGB red, green, and blue
  • an image including information on luminance of colors other than red, green, and blue (RGB) may be taken even within the wavelength of visible light.
  • the captured image may be an image related to electromagnetic waves other than visible light. For example, an image (ultraviolet image) in which information about the intensity of ultraviolet rays is included in each pixel or an image (infrared image) in which information about the intensity of infrared rays is included in each pixel may be taken.
  • Infrared rays are classified into near infrared rays, middle infrared rays, and far infrared rays depending on the wavelength, but any kind of infrared rays may be used.
  • An image 244 in FIG. 10 is an example of an image obtained by photographing a food to be inspected using near infrared light having a wavelength of 760 nm to 1000 nm.
  • Examples of cameras that can capture images using electromagnetic waves related to multiple wavelengths include color cameras capable of infrared imaging, multispectral cameras, and hyperspectral cameras.
  • a camera for example, an RGB camera
  • a camera capable of capturing a visible light image and an infrared camera may be attached to the image capturing device 2a, and images captured by both cameras may be stored in the image storage unit 11.
  • a camera capable of photographing an ultraviolet image may be used, or a camera capable of photographing a distance image may be used.
  • the distance image can be obtained by, for example, a ToF type distance image sensor, but the type of sensor to be used is not particularly limited.
  • the imaging device 2a if the image which concerns on several wavelengths which is not restricted to the red component (R) of visible light, the green component (G) of visible light, and the blue component (B) of visible light can be image
  • a polarizing plate 22 a is also provided on the front surface of the camera 22.
  • the polarizing plate 22a is a polarizing filter for a camera lens.
  • the polarizing plate 21a is not necessarily provided on the front surface of the illumination unit 21 of the camera 22, but by taking an image through the polarizing plate 21a, an image in which irregular reflection or shine caused by gloss such as moisture, fats and oils is suppressed can be obtained. Can be obtained.
  • the sensor 23 detects that the food is conveyed below the photographing apparatus 2a by the conveying device 4a.
  • Examples of the sensor 23 include a laser sensor, an infrared sensor, an ultrasonic sensor, various photoelectric sensors, an image sensor, and a weight sensor, but the type of sensor is not particularly limited.
  • the upper part of FIG. 11 shows an example of an image taken of chicken that is determined to be non-defective.
  • the chicken in the upper part of FIG. 11 has no blood and no foreign matter is seen, so it is determined as a good product.
  • the lower part of FIG. 11 shows an example of an image taken of chicken that is determined to be defective.
  • the chicken in the lower part of FIG. 11 is judged as a defective product because blood is contained in the circled part.
  • FIG. 12 shows examples of meat according to various shapes.
  • FIG. 12 shows images 101 to 106.
  • the meat according to the images 101, 102 and 105 is relatively large, but the meat according to the image 103 is relatively small.
  • the meat related to the image 102 has a shape close to an ellipse, but the meat related to the image 101 has a shape close to a quadrangle.
  • the meat according to the image 104 is elongated and the meat according to the image 105 has an uneven shape. In this way, foods of the same type may have different shapes and sizes.
  • FIG. 13 shows an example of the correspondence between meat images and pixels.
  • input data generation processing will be described with reference to FIG.
  • the food 110 is meat such as chicken.
  • the food 110 has a bloody 110a and a bloody 110b.
  • FIG. 14 is a flowchart of processing for generating input data from an image.
  • the data conversion process will be described with reference to FIG.
  • step S101 For each color (RGB) of the food image, a luminance frequency distribution at each pixel is obtained (step S101).
  • An overview of the processing in step S101 is shown in FIG.
  • FIG. 15 is a histogram showing a frequency distribution related to the luminance of each color.
  • FIG. 15 shows a graph (histogram) of the frequency distribution relating to the luminance of each color of red (RED), green (GREEN), and blue (BLUE).
  • the horizontal axis of each graph indicates the luminance value.
  • the luminance value is 256 gradations from 0 to 255. Since the color information of the image to be used is not always represented by 24 bits (8 bits ⁇ 3), the gradation related to the luminance of each color may be coarser or finer than this.
  • the color information is a luminance value related to an arbitrary color in each pixel.
  • each graph in FIG. 15 is the number of pixels having each luminance value, and corresponds to the frequency (frequency) in the histogram.
  • the frequencies are arranged in ascending order of luminance, the luminance value increases from left to right.
  • the graph of FIG. 15 is an example, and the frequencies may be arranged in descending order of luminance when the frequency distribution is generated.
  • the input data generation unit 13 may generate frequency distribution data corresponding to FIG. 15 from the food image, and the histogram as shown in FIG. 15 is not necessarily displayed on the display unit 18. .
  • the input data generation unit 13 stores the frequency distribution data in a storage device such as a memory.
  • a frequency distribution may be obtained for the RG luminance (brightness information).
  • the frequency distribution may be obtained only for the luminance of red (R).
  • step S102 color information (luminance information) of pixels whose luminance is within a certain range is extracted from the frequency distribution of each color.
  • luminance information luminance information
  • FIG. 15 Each graph (histogram) shown in FIG. 15 has a first peak 70 on the lower luminance side. On the other hand, there is a second peak 71 on the higher luminance side.
  • the peak 70 corresponds to the color information of the pixel 108, which is the background portion area in the image of FIG.
  • a peak 71 corresponds to the color information of the pixel 109, which is the region of the food part in the image of FIG.
  • the peak information corresponding to the area of the food part is extracted.
  • peak extraction processing using a threshold value is performed.
  • a threshold value for peak detection (first threshold value) and a threshold value for luminance (second threshold value) can be used.
  • Peaks in the frequency distribution can be detected by comparing the number of pixels (frequency) in each luminance value with a threshold for peak detection. For example, a case where an average value of frequencies is used as a threshold value for peak detection will be described. In this case, if the frequency continuously exceeds the average value of the frequency at a plurality of luminances in the histogram, it is determined that there is a peak. A value other than the average value of the frequencies may be used as the threshold for peak detection. Lines 70a, 70b, and 70c in FIG. 15 are examples of such threshold values for peak detection.
  • Threshold values 111a, 111b, and 111c in FIG. 15 are luminance threshold values (second threshold values).
  • the range from which color information is extracted can be determined using the luminance threshold. For example, for the frequency distribution related to the luminance of red (R), only the color information of the portion where the luminance is larger than the threshold value 111a is extracted.
  • the information extracted here is luminance data 112a.
  • the information extracted here is luminance data 112b.
  • luminance data 112c data including an element storing the luminance value of the color information (luminance information) is referred to as luminance data.
  • the threshold values 111a, 111b, and 111c may all be set to the same value, or may be set to different values for each color.
  • the extraction process is performed by setting a threshold value of luminance one by one for each color, but the extraction process may be performed using a plurality of luminance threshold values.
  • two luminance threshold values b 1 and b 2 may be set, and portions having luminance values in the range of [b 1 , b 2 ] may be extracted.
  • the luminance threshold value in the example of FIG. 15 for example, a value 0.7 to 0.8 times the maximum luminance value can be set, but the value is not particularly limited.
  • the setting of the threshold value of luminance can be determined based on the color of the background portion and the color of the food portion in the image. For example, when the color of the food part is bright, the luminance threshold value can be adjusted to be large, and when the color of the food part is dark, the luminance threshold value can be adjusted to be small.
  • the adjustment value of the brightness threshold value can be determined by the user referring to the frequency distribution (histogram) of each color in the food image in advance using image processing software or the like.
  • luminance threshold (second threshold)
  • the color of the background portion in the image can be adjusted by selecting the color of the conveyor of the transport device 4 or selecting or setting the light source of the illumination unit 21 of the photographing device 2.
  • the color of the food part in the image depends on the type of food, but can be adjusted by selecting or setting the light source of the illumination unit 21 of the photographing apparatus 2.
  • the range to be extracted and the threshold value are set based on the replaced color. That's fine. It can be said that the data (color information) extracted by the processing in step S102 is normalized data in which information on the size, shape, position, and direction of food is discarded.
  • step S103 the elements of the extracted color information (luminance data) are arranged (sorted) in ascending or descending order of the luminance value.
  • luminance data luminance data
  • step S103 the process according to step S103 will be described with reference to FIG.
  • FIG. 16 shows an example of luminance data arranged in ascending order of luminance.
  • FIG. 16 shows luminance data 113a, 113b, and 113c sorted in ascending order of luminance.
  • the luminance data 113a includes an element that stores a red (R) luminance value in the extracted color information.
  • the luminance data 113b includes an element storing a green (G) luminance value in the extracted color information.
  • the luminance data 113c includes an element that stores a blue (B) luminance value in the extracted color information.
  • the luminance data related to RG may be aligned.
  • the luminance data relating to the luminance of red (R) may be aligned.
  • the color information having the same luminance value is continuously arranged to form a series.
  • the luminance data 113a in FIG. 16 has a series of 114, 115, and 116.
  • these series are only examples.
  • a series of different patterns occurs depending on the type of food to be detected, the background color, the image to be used, and the threshold setting.
  • luminance data in which color information is arranged in ascending order of luminance is shown.
  • color information of luminance data may be arranged in descending order of luminance.
  • the input data generation unit 13 stores the aligned luminance data in a storage device such as a memory.
  • step S104 block division and representative value calculation are performed for each luminance data (step S104).
  • the luminance data is divided into a plurality of blocks, and the luminance representative value is calculated for each block.
  • the representative value include an average value, mode, median, power spectrum addition average, and the like, but other types of representative values may be used.
  • an average value is used as a representative value of luminance will be described as an example.
  • the processing of block division and representative value calculation is performed by setting the number of input variables in the input layer of the neural network while retaining the information necessary for learning and determination included in the image described in the description of the input data generation unit 13. This corresponds to the process of reducing the number to the number equal to the number N of units included.
  • FIG. 17 shows an example in which the luminance data is divided into a plurality of blocks.
  • the lower part of FIG. 17 shows an example in which the average luminance value of each block is calculated.
  • the division number X of the luminance data is 10 in the middle, but this is only an example, and the division number X may be a different number.
  • the division number X can be determined by the number of units included in the input layer of the neural network, the number of colors (for example, RGB, RG, R) input to the input data generation unit 13.
  • luminance data 123 in the lower part of FIG. 17 is obtained. It can be said that the luminance data 123 is obtained by converting the original luminance data 122a into luminance data having a number of elements equal to the number of blocks and having an average luminance value as the element value.
  • Equation (1) it is possible to calculate an average value of luminance related to color information included in each block.
  • x i is a luminance value related to each color information in the block.
  • the left side of Equation (1) is the average value of the luminance related to the color information included in the block number j.
  • the calculation of Expression (1) may be executed by a program operating on the CPU, or may be executed by hardware such as a semiconductor circuit.
  • M pieces of color information are aggregated into 10 pieces of color information.
  • the process according to step S104 is executed for color information relating to each color.
  • color information of three colors of RGB is input to the input data generation unit 13
  • block division and representative value calculation are performed for each color information of red (R), green (G), and blue (B).
  • RGB color information when there is RGB color information, the color information of the image is collected into a total of 30 pieces of color information (luminance).
  • the luminance data is divided into a plurality of blocks in the block division process
  • the representative value calculation process calculates the representative value of the luminance stored in the elements included in each block
  • the original luminance data is the number of blocks. It can be said that a process of converting into luminance data including the number of elements equal to and having the representative value of the luminance as the element value is executed.
  • step S104 the number of input variables may be reduced using a method such as linear transformation or principal component analysis instead of block division. If the number of color information included in the luminance data is equal to the number of units included in the input layer of the neural network and it is not necessary to narrow down the number of input variables, block division and representative value calculation processing (step S104) are performed. It may be omitted.
  • the luminance data 125a is luminance data relating to red (R).
  • the luminance data 125b is luminance data relating to green (G).
  • the luminance data 125c is luminance data relating to blue (B).
  • FIG. 19 is a flowchart of the learning process according to the first embodiment.
  • the learning process by the learning unit 15 will be described with reference to the flowchart of FIG.
  • a non-defective image is an image of a sample food labeled by a user as being non-defective.
  • the defective product image is an image of the sample food labeled by the user as being defective.
  • the method and timing for labeling the image are not particularly limited.
  • an image used for the learning process is referred to as a sample image, and is distinguished from an image used for the determination process (determination image).
  • the sample image includes a good product image and a defective product image.
  • the user After the user captures a sample image of the sample food with the imaging device 2, the user confirms the sample image with the display unit 18, and determines that the food imaged in the sample image is a non-defective product. When it is determined that the food shown in the sample image is defective, it can be labeled as defective.
  • a plurality of sample foods may be preliminarily classified into non-defective products and defective products, and then photographed with the photographing device 2.
  • a program or script to shoot a set of good samples, label the sample images as good, and if you are shooting a set of defective samples, Label as good.
  • ⁇ As a defective product image in a sample image an image of a sample food having a plurality of types of defects and foreign matter (defective mode) may be used.
  • the sample image may be labeled for each failure mode of the sample food.
  • the labeling may be performed without classifying the defective mode of the sample food imaged on the defective product image.
  • the same “defective product” label is given to the sample image having blood and the sample image mixed with foreign matters such as wings.
  • the defective product image in the sample image may be only an image of a sample food having a specific type of defect or foreign matter (defective mode).
  • the defective mode of the sample food imaged on the defective product image may be only blood clots or only wing contamination.
  • the type of foreign matter or defect to be included in the defective product image can be determined.
  • sample image that is difficult to determine may be prepared.
  • a difficult-to-determine sample image refers to a sample image that cannot visually determine the presence or absence of a food defect or foreign matter. Examples of sample images that are difficult to judge include images that do not have enough sample food to be judged in the area to be photographed, and images that do not have clear sample food due to improper brightness adjustment due to illumination or exposure. It is done. Sample images that are difficult to determine are labeled as “difficult to determine”.
  • 11 and the images 101, 102, 103, and 106 in FIG. 12 are examples of non-defective images.
  • 11 and images 104 and 105 in FIG. 12 and image 107 in FIG. 13 are examples of defective images.
  • step S202 image processing is performed on the non-defective product image and the defective product image. Details of the image processing are as described in the description of the image processing unit 12. The type and content of image processing performed in step S202 are not particularly limited. The process of step S202 may be omitted.
  • input data (second input data) used for learning of the neural network is generated from the respective non-defective product images and defective product images (sample images) (step S203).
  • Each sample image is converted into a format of input data that can be input to the neural network.
  • the details of the process of generating input data from the sample image are as described in the description of the input data generating unit 13.
  • the input data used for learning of the neural network is referred to as second input data, and is distinguished from input data (first input data) generated from an image (determination image) obtained by photographing the food to be inspected for determination. Shall.
  • step S204 When the second input data is generated from the sample image, it is confirmed whether the second input data relating to all the sample images is generated (step S204). If there is a sample image that has not yet been converted to the input data format, the process returns to step S203. If all the sample images have been converted to the input data format, the process proceeds to step S205.
  • Step S205 Learning of the neural network is started based on the second input data corresponding to the plurality of non-defective images and defective images (sample images) (step S205). Below, the neural network used for learning will be described.
  • FIG. 20 shows an example of a neural network that outputs three reaction values.
  • a neural network 150 in FIG. 20 is a neural network having three layers of an input layer 151, a hidden layer 152, and an output layer 153.
  • the output layer 153 includes three units 153a, 153b, and 153c.
  • the unit 153a is a unit that outputs a good response value.
  • the unit 153b is a unit that outputs a reaction value of a defective product.
  • the unit 153c is a unit that outputs a reaction value that is difficult to determine.
  • FIG. 21 shows arithmetic processing between units of the neural network. The movement of the neural network will be described with reference to FIG.
  • FIG. 21 shows the (m ⁇ 1) th layer units 154a, 154b, and 154c and the mth layer unit 155.
  • FIG. 21 shows only some of the units of the neural network.
  • the reaction value of the unit number k in the (m-1) th layer is a m-1 k
  • the reaction value a m j of the unit number j in the mth layer is obtained using the following equation (2).
  • W m jk is a weight and indicates the strength of coupling between units.
  • b m j is a bias.
  • FIG. 22 is a graph showing a normal distribution function.
  • Equation (3) is a normal distribution function.
  • the normal distribution function is a kind of Gaussian function.
  • is an average value and indicates the center position of a bell-shaped peak drawn by a normal distribution function.
  • is the standard deviation and indicates the peak width. Since the value of Equation (3) depends only on the distance from the center of the peak, it can be said that the Gaussian function (normal distribution function) is a kind of radial basis function (RBF).
  • the Gaussian function (normal distribution function) is an example, and other RBFs may be used.
  • FIG. 23 is a graph showing a sigmoid function. Equation (4) below is a sigmoid function.
  • the sigmoid function asymptotically approaches 1.0 in the limit of x ⁇ ⁇ . Also, asymptotically approaches 0.0 at the limit of x ⁇ ⁇ . That is, the sigmoid function takes a value in the range of (0.0, 1.0). Note that this does not prevent the use of a function other than the Gaussian function or sigmoid function as the activation function.
  • the weight W jk that is the strength of coupling between units is adjusted so that a correct output is obtained.
  • the correct output (the response value of the unit in the output layer) expected when inputting the input data labeled in a certain determination mode in the neural network is also called a teacher signal.
  • the response value of the unit 153a is 0, the response value of the unit 153b (defective unit) is 1, The reaction value of 153c is 0.
  • the response value of the unit 153a good unit
  • the response value of the unit 153b is 0, and the unit 153c is the teacher signal. The reaction value of becomes zero.
  • the response of the unit 153a (good unit) is received in the teacher signal.
  • the value is 0, the reaction value of the unit 153b (defective product unit) is 1, and the reaction value of the unit 153c is 1.
  • the adjustment of the weight W jk can be performed using a back-propagation method (Back Propagation Method).
  • the weight W jk is adjusted in order from the output layer side so that the deviation between the output of the neural network and the teacher signal becomes small. Equation (5) below shows an improved backpropagation method.
  • Equation (7) shows a value adjustment process performed for the parameter ⁇ .
  • t is the number of learnings
  • is a learning constant
  • ⁇ k is a generalization error
  • O j is a reaction value of unit number j
  • is a sensitivity constant
  • is a vibration constant.
  • ⁇ W jk , ⁇ jk , and ⁇ jk indicate the respective correction amounts of the weights W jk , ⁇ , and ⁇ .
  • the adjustment process of the weight W jk and the parameters has been described by taking the improved back propagation method as an example, but a general pack propagation method may be used instead.
  • the improved back propagation method includes both general back propagation methods.
  • the weight W jk and the number of parameter adjustments by the pack propagation method may be one time or multiple times, and are not particularly limited. In general, it is possible to determine whether or not to repeatedly adjust the weight W jk and parameters by the back-propagation method based on the determination accuracy when using test data. If adjustment of the weight W jk and the parameter is repeated, the determination accuracy may be improved.
  • the values of the weight W jk and the parameters ⁇ and ⁇ can be determined (step S206).
  • the learning of a neural network in which the number of units that output defective product response values is one in the output layer has been described as an example.
  • a neural network that has a plurality of units that output defective product response values is used. May be.
  • learning may be performed by preparing a unit that outputs a reaction value for each type of defect (failure mode) such as blood, foreign matter, and feathers.
  • FIG. 24 is a flowchart of the determination process according to the first embodiment. Hereinafter, the process will be described with reference to the flowchart of FIG.
  • step S301 the food to be inspected is photographed (step S301). For example, using the photographing device 2, the food conveyed by the conveying device 4 is photographed.
  • the captured image is stored in the food inspection apparatus 1.
  • an image taken for the determination process is referred to as a determination image.
  • image processing is performed on the determination image (step S302). Details of the image processing are as described in the description of the image processing unit 12.
  • the type and content of image processing performed in step S302 are not particularly limited. Further, the process of step S302 may be omitted.
  • first input data is generated from the determination image (step S303).
  • the input data generated from the determination image is particularly referred to as first input data.
  • the first input data has N elements equal to the number of units in the input layer of the neural network, and has a format that can be input to the neural network. Details of the process of generating input data from the determination image are as described in the description of the input data generation unit 13.
  • the first input data is input to the neural network (step S304). As described in FIG. 21 and the description related to the expression (2), the first input data is transmitted in the order of the input layer, the hidden layer, and the output layer. Based on the reaction value in the output layer of the neural network, a non-defective product and a defective product are determined (step S305).
  • FIG. 25 shows an example of an identification space when a Gaussian function is used as the activation function.
  • an RBF such as a Gaussian function
  • an identification curved surface that divides the identification space into a non-defective product region and a defective product region becomes a closed curved surface.
  • FIG. 26 shows an example of an identification space when a sigmoid function is used as the activation function.
  • the activation function is a sigmoid function
  • the identification curved surface is an open curved surface. Note that the above-described neural network learning process corresponds to a process of learning an identification curved surface in an identification space.
  • FIG. 25 and FIG. 26 show the distribution of a plurality of defective products in the defective product area.
  • the distribution of each defective product corresponds to the type of defect (defective mode) such as blood, feathers, and foreign matter.
  • FIG. 27 is a graph showing an example of the response value of the neural network.
  • the vertical axis of the graph in FIG. 27 indicates the reaction value of the unit.
  • the horizontal axis of the graph in FIG. 27 indicates the input data number.
  • the response value of the non-defective product corresponds to the response value of the unit 153a (good product unit) in the neural network 150 of FIG.
  • the line on the lower side of the graph in FIG. 27 is the reaction value of defective products.
  • the response value of the defective product corresponds to the response value of the unit 153b (defective product unit) in the neural network 150 of FIG.
  • the output values shown in FIG. 27 all have a non-defective product response value of around 1.0 and the inferior product response value of around 0.0. It is considered that it corresponds to the judgment image.
  • FIG. 28 is a table showing examples of reaction values of the neural network. Each row of the table in FIG. 28 corresponds to different input data. In the left column of the table, response values of good products are stored. In the right column of the table, reaction values of defective products are stored. In the table of FIG. 28, except for the data 161 and 162, the response value of the non-defective product takes a value in the vicinity of 1.0, and the response value of the defective product takes a value in the vicinity of 0.0. It is estimated that most of the input data that is input corresponds to a non-defective determination image.
  • the data 161 and 162 take values where the response values of the non-defective products are separated from 1.0, and the reaction values of the defective products are taken away from 0.0. Therefore, there is a possibility that the input data input to the neural network when the data 161 and 162 are obtained as reaction values is a defective determination image or an image that is difficult to determine.
  • the response value of the good product is compared with a threshold value. If the response value of the good product is larger than the threshold value, the input data There is a method for estimating the determination image corresponding to the non-defective image. For example, a value such as 0.8 or 0.9 can be used as the threshold value, but a different threshold value may be used.
  • the judgment image corresponding to the input data is a good product image or a defective product image. May be estimated.
  • a value such as 0.6 or 0.7 can be used as the threshold value, but a different threshold value may be used.
  • the determination unit 17 may display the determination result on the display unit 18.
  • FIG. 29 shows an example of the GUI provided by the program.
  • FIG. 29 is a screen displayed by a program executed by the food inspection apparatus 1.
  • the screen in FIG. 29 serves both as an operation screen for the food inspection apparatus 1 and a determination result display screen. Since the characters “OK” are displayed in the upper right of the screen, it can be seen that the determination image input to the program is determined to be a non-defective image.
  • FIG. 29 shows a screen of an application executed locally on the food inspection apparatus 1, but the operation screen and the display screen of the determination result are screens such as a web browser on a remote client terminal remote from the food inspection apparatus 1. May be displayed. In this case, the food inspection apparatus 1 operates as a server of the client terminal.
  • FIG. 30 shows an example of a neural network that outputs two reaction values. Similar to the neural network 150, the neural network 170 in FIG. 30 has three layers: an input layer 171, a hidden layer 172, and an output layer 173. However, the output layer 173 includes a good unit (unit 173a) and a defective unit (unit 173b), but does not include other units such as a unit that outputs a reaction value that is difficult to determine.
  • the input data generation unit obtains a luminance frequency distribution in each pixel for each color of the image (sample image and determination image), and luminance that is luminance information (color information) of a part of the frequency distribution After extracting the data and aligning the luminance data based on the luminance value, block division and representative value calculation processing were performed.
  • the processing performed by the input data generation unit may be different from this.
  • the determination image obtained by photographing the food to be inspected is divided into a plurality of regions, and the representative value of the luminance related to the luminance information of the pixels included in each region is calculated.
  • Luminance data including elements storing representative values is generated. That is, the input data generation unit performs region division processing and representative value calculation processing on the image.
  • FIG. 31 shows an example of the correspondence between image pixels and area division processing in the second embodiment.
  • the input data generation unit according to the present embodiment divides an image into a plurality of regions.
  • An area 201 is an example of an area generated by the input data generation unit.
  • the image 200 is divided into regions having a size of 3 ⁇ 3 pixels, but the size of the region is not particularly limited.
  • the representative value of the luminance of red (R), the representative value of the luminance of green (G), and the representative value of the luminance of blue (B) in the color information of the pixels included in each region are calculated.
  • the representative value include an average value, mode, median, power spectrum addition average, and the like, but other types of representative values may be used.
  • luminance information color information related to all colors of red, green, and blue is used as luminance information, and an example in which representative values of luminance are calculated will be described.
  • representative values of luminance for all colors are always used. It is not necessary to calculate.
  • a representative luminance value may be calculated for some colors, or a representative luminance value may be calculated for only one color.
  • the luminance representative value may be calculated using the brightness information as the luminance information.
  • an image-processed image such as a grayscale image or an image obtained by extracting only a part of colors may be used.
  • the number of color information can be reduced, and input data having the number N of elements that can be input to the neural network can be generated. That is, in the region division processing, the image is divided into a plurality of regions, and in the representative value calculation processing, the representative luminance value related to the luminance information of the pixels included in each region is calculated, and the representative luminance value in each region is calculated as the element value. It can be said that luminance data is generated as a value.
  • FIG. 32 is a flowchart of the learning process according to the second embodiment. Hereinafter, the process will be described with reference to the flowchart of FIG.
  • step S401 a plurality of non-defective images and defective images (sample images) are taken (step S401).
  • the process executed in step S401 is the same as the process executed in step S201 of FIG.
  • image processing is performed on the sample image (step S402).
  • the process executed in step S401 is the same as the process executed in step S202 of FIG.
  • the process of step S401 may be omitted.
  • step S403 region division is performed for each color (RGB) of the sample image, and a representative value of RGB luminance is calculated for each region (step S403).
  • a representative value of luminance related to each region is extracted for each color (RGB) (step S404).
  • the data having the representative value of the luminance relating to R (red) as the element value, the data having the representative value of the luminance relating to G (green) as the element value, and the representative value of the luminance relating to B (blue) are obtained.
  • Data with element values is obtained.
  • data in which the representative value of luminance is an element value is referred to as luminance data.
  • Luminance data for each color is generated by the processing in step S404.
  • step S405 the elements of the luminance data of each color (RGB) are arranged in ascending or descending order of the luminance value (step S405).
  • step S406 the luminance data is combined to generate second input data (step S406). Note that if the luminance data is not generated for a plurality of colors, the process of step S406 may be omitted.
  • step S407 it is confirmed whether or not the second input data has been created for all the sample images. If there is a sample image that has not yet been converted to the second input data, the processing from step S403 is executed on the sample image. If all the sample images have been converted into the second input data, the process proceeds to step S408.
  • step S408 learning of the neural network is started based on the second input data having the number N of elements corresponding to the plurality of non-defective images and defective images (sample images) (step S408). Then, the values of the weight W jk and the parameters ⁇ and ⁇ are determined by learning (step S409).
  • the processing executed in steps S408 and S409 is the same as the neural network learning processing according to the first embodiment.
  • FIG. 33 is a flowchart of the determination process according to the second embodiment. Hereinafter, the process will be described with reference to the flowchart of FIG.
  • step S501 the food to be inspected is photographed (step S501).
  • step S501 is the same as the process according to step S301 in FIG.
  • image processing is performed on the photographed determination image (step S502).
  • step S502 is the same as the process according to step S302 of FIG.
  • the process in step S502 may be omitted.
  • step S503 region division is performed for each color (RGB) of the determination image, and a representative value of RGB luminance is calculated for each region (step S503).
  • the process in step S503 is the same as the process according to step S403 in FIG.
  • step S504 a representative value of luminance related to each region is extracted for each color (RGB) (step S504).
  • luminance data having the luminance representative value as the element value is obtained for each color.
  • the elements of the luminance data of each color (RGB) are arranged in ascending or descending order of the luminance value (step S505).
  • the luminance data of each color is aligned, the luminance data is combined to generate first input data (step S506).
  • the first input data is input to the neural network (step S507).
  • the non-defective product and the defective product are determined (step S508).
  • the food determination process is the same as that when the neural network according to the first embodiment is used.
  • the first input data or the second input data is generated by combining the luminance data in which the elements are arranged for each color after performing the region division on the image.
  • the first input data and the second input data may be generated by a different method.
  • the luminance data may be generated by executing a process of extracting a certain range of the luminance frequency distribution performed in the first embodiment.
  • the number of pieces of color information (luminance) related to pixels to be used may be narrowed down by performing block division and representative value calculation processing performed in the first embodiment on the luminance data.
  • color information (luminance) related to pixels is stored even when the resolution of the captured image is high (for example, the number of pixels of full HD, 4K, 8K, or more).
  • the number of elements can be reduced to a number equal to the number N of units in the input layer of the neural network.
  • FIG. 34 shows an example of a neural network that outputs one reaction value.
  • the neural network 180 of FIG. 34 has three layers, an input layer 181, a hidden layer 182, and an output layer 183, as in the above-described neural networks. However, only the unit 183a, which is a non-defective unit, is present in the output layer, and there are no other units. Thus, the number of units in the output layer may be one. When the neural network 180 is used, a non-defective product or a defective product is determined by comparing the reaction value of the unit 183a with a threshold value.
  • the neural network 180 is an example, and the number of units in the output layer may be larger than this.
  • FIG. 35 is a table showing the results of identification performance.
  • the upper part of the table in FIG. 35 shows the discrimination performance when the neural network (NN) according to the first embodiment is used.
  • the lower part of the table in FIG. 35 shows the identification performance when the neural network (NN) according to the second embodiment is used.
  • the value stored in each column indicates the success rate (identification performance) of the determination as a percentage.
  • the success rate of determination stored in FIG. 35 is a value when a neural network in which learning is performed once on a trial basis is used. Therefore, by continuing the learning of the neural network, the success rate of the determination may be improved from that in FIG.
  • the type of light source used when photographing the sample image and the determination image can be determined according to the type of food to be inspected, the type of defect or foreign matter to be detected, and the like. Below, the selection method of the light source used with a food inspection system is demonstrated.
  • Spectral fluorescence spectral analysis can be performed, for example, by using a spectrofluorometer.
  • FIG. 36 shows the difference in image appearance depending on the type of light source.
  • the left side of FIG. 36 shows an image of chicken taken using a visible light source.
  • the left side of FIG. 36 shows an image of chicken taken using an ultraviolet light source.
  • a visible light source it may be difficult to detect the foreign object when the color of the foreign object illuminated by the visible light is similar to that of chicken.
  • an ultraviolet light source since fluorescence is generated, foreign matters such as wings may be easily distinguished from surrounding chicken.
  • the circled part on the left side of FIG. 36 shows chicken wings that appear to float from the surroundings due to fluorescence. However, since the fluorescence is also generated from the chicken skin and looks similar to the wings in the image, it is difficult to sort out foreign objects using only the color difference as a reference.
  • FIG. 37 shows the results of spectral fluorescence spectrum analysis at each part of the chicken.
  • FIG. 37 shows the results of spectral fluorescence spectrum analysis for chicken skin, chicken wings, chicken meat, and blood.
  • FIG. 38 shows a wing-skin difference signal in the spectral fluorescence spectrum analysis.
  • FIG. 38 shows the spectrum of the difference signal between the wing and the skin in a three-dimensional graph.
  • a portion surrounded by a white circle in FIG. 38 shows a peak where fluorescence is generated.
  • the upper circle indicates that the fluorescence generated has a peak at a wavelength of 435 nm when excited by an electromagnetic wave with a wavelength of 375 nm.
  • the lower circle indicates that there is a peak with a wavelength of 405 nm when excitation is performed with an electromagnetic wave with a wavelength of 205 nm.
  • the upper part of FIG. 39 shows an image of chicken taken without passing through the color filter.
  • the winged portion is not clear although the color is slightly thin.
  • the skinned part and the uneven part are brighter and clearer than the wing part. It can be seen that even if ultraviolet rays are irradiated, it is not always easy to identify the wings in the image if the image is taken without passing through the color filter.
  • the middle part of FIG. 39 shows an example of an image obtained through the blue filter.
  • the middle image in FIG. 39 is taken of the same chicken as the upper image in FIG. Even in the middle of FIG. 39, there is a part of the wing within the range surrounded by the white ellipse. In the image in the middle of FIG. 39, the brightness of the part with skin or the part with unevenness is suppressed, but the brightness of the part with wings is also lowered and the wings are blurred. Therefore, it is difficult to say that wings can be easily identified even if an image is taken through a blue filter.
  • the lower part of FIG. 39 shows an example of an image taken through a green filter.
  • the lower image in FIG. 39 is taken of the same chicken as the upper image in FIG. 39 and the middle image in FIG. Even in the lower part of FIG. 39, there is a part of the wing within the range surrounded by the white ellipse. In the lower image of FIG. 39, the winged portion appears clearly, and it can be said that it is easy to distinguish the chicken from other parts.
  • the imaging device according to the present embodiment uses an ultraviolet light source and takes an image through a green filter.
  • FIG. 40 shows a configuration example of a photographing apparatus for selecting wings that are foreign matters.
  • the photographing apparatus 2b will be described with reference to FIG.
  • FIG. 40 is a cross-sectional view of the imaging device 2b.
  • the structure related to the housing of the photographing apparatus 2b is the same as the structure of the photographing apparatus 2a shown in FIG.
  • the imaging device 2b includes an illumination unit 21b, a camera 22b, a filter 22c, and a sensor 23.
  • the illumination unit 21b is a device that emits ultraviolet rays.
  • the light source in the illumination unit 21b include an ultraviolet LED, a black light, and various fluorescent lamps, but the type is not particularly limited.
  • an ultraviolet light source having a peak at a wavelength of 375 nm in the spectrum can be used as the light source. It is desirable to use an ultraviolet light source having a spectrum with a peak in the wavelength range of 365 nm to 400 nm.
  • the spectrum of the light source is not particularly limited. A light source having a different spectrum can be selected depending on the food or foreign object to be detected. A light source containing not only an ultraviolet component but also a visible light component may be used. In FIG.
  • a plurality of illumination units 21b are installed in the lower part of the casing of the photographing apparatus 2b.
  • the number and arrangement of the light sources are particularly important. It doesn't matter.
  • the camera 22b photographs food irradiated with ultraviolet rays emitted from the illumination unit 21b.
  • the structure and function of the camera 22b are the same as those of the camera 22 shown in FIG.
  • a filter 22c is provided in front of the camera 22b.
  • the filter 22c has a function of facilitating identification of a foreign object based on an image captured by the camera 22b.
  • a green filter can be used as the filter 22c.
  • the green filter is an optical filter that selectively transmits electromagnetic waves in the vicinity of a wavelength of 520 nm, for example.
  • the green filter is an example of the filter 22c, and does not prevent the use of a different type of filter.
  • the sensor 23 detects that the food is transported below the photographing device 2b by the transport device 4b.
  • Examples of the sensor 23 include a laser sensor, an infrared sensor, an ultrasonic sensor, various photoelectric sensors, an image sensor, and a weight sensor, but the type of sensor is not particularly limited.
  • the food inspection system according to the above-described embodiment determines the presence or absence of defects such as defects and foreign matters in food.
  • the food inspection system according to the present invention may further specify the position of a defect or a foreign object in the food. When the position of the defect or foreign matter in the food is specified, the defective portion or the foreign matter can be removed by a robot or manual work.
  • the food inspection apparatus converts a plurality of sample images into second input data having N elements, and inputs the second input data to a neural network having N units of input layers.
  • I was learning. For example, in order to identify a non-defective product, a defective product, and a case where determination is difficult, second input data generated from a plurality of non-defective sample images, second input data generated from a plurality of defective sample images, It is necessary to perform learning using each of the second input data generated from the sample image that is difficult to determine.
  • the food inspection system uses a set of second input data generated from sample images (non-defective images) labeled as a plurality of non-defective products, and the determination image is determined to be defective.
  • the position where there is a defect or a foreign object can be traced (backtrace).
  • the input data generation unit of the food inspection apparatus can generate a luminance distribution in the second input data generated from the non-defective sample image.
  • an example of the luminance distribution in the second input data will be described.
  • FIG. 41 shows an example of luminance distribution in the second input data generated from the non-defective image.
  • R (red), G (green), and B (blue) elements are arranged in ascending order of element numbers.
  • the value of each element is a luminance calculated from a set of a plurality of pixels. It becomes the value of.
  • the vertical axis of the graph in FIG. 41 indicates luminance.
  • Distributions 194, 195, and 196 in FIG. 41 are luminance distributions related to the second input data generated from the non-defective sample images thus obtained.
  • a group of pixels corresponding to a defect or foreign substance site is obtained. Can be identified.
  • Dashed lines 191, 192, and 193 shown on the graph of FIG. 41 indicate the luminance of the first input data generated from the determination image.
  • a broken line 192 that is the luminance of G (green) is included in the range of the distribution 195.
  • a broken line 193 that is the brightness of B (blue) is included in the range of the distribution 196.
  • a part of the broken line 191 that is the luminance of R (red) is out of the range of the distribution 194.
  • a section outside the range of the distribution 194 corresponds to an element number in which the presence of a defect or a foreign object is suspected in the first input data.
  • Such elements shall be referred to as distributed outside element k d.
  • k d may be one element or may include a plurality of elements.
  • each out-of-distribution element k d corresponds to a block number j suspected of having a defect or a foreign object. doing.
  • each out-of-distribution element k d corresponds to a region in the image in which the existence of a defect or a foreign object is suspected. doing.
  • the food inspection apparatus In order for the food inspection apparatus to obtain the coordinate position of the pixel of the original determination image from the information relating to the out-of-distribution element k d in the first input data, The correspondence between pixels and element numbers needs to be maintained.
  • the storage unit stores data indicating which pixel related color information is used to generate the block.
  • the storage unit may be a volatile memory such as RAM or DRAM, or a nonvolatile memory such as NAND, MRAM, or FRAM.
  • a storage device such as an optical disk, a hard disk, or an SSD may be used.
  • the correspondence relationship between the pixel and the block from which the color information is acquired can be stored in a metadata format such as a pointer table or a two-dimensional table by the program.
  • the correspondence relationship may be saved using a log file in a text format, CSV format, XML format, JSON format, or the like. Data holding such a correspondence relationship is referred to as backtrace data.
  • the pixels in the determination image may be specified using two-dimensional coordinate information such as (x, y) coordinates, or may be specified by other types of identifiers.
  • the element of the input data generated by the input data generation unit can be specified by the element number k, for example, but may be specified by using another kind of identifier.
  • each step of conversion process Generates and saves backtrace data that retains the correspondence between the pixel coordinate position and the element or block. Accordingly, it is possible to track which pixel coordinate position in the original determination image corresponds to the element number k in the first input data.
  • the block corresponding to the out-of-distribution element k d There is a possibility that the pixels used in the calculation of the average value (representative value) of the luminance are diffused on the determination image. For this reason, a blob analysis or the like is performed on an image in which the position of the pixel on the determination image is marked, and the pixel is adjacently distributed in the image or distributed at a high density. The position of the defect or foreign substance in the determination image may be estimated.
  • FIG. 42 shows an example of a backtrace result to the original determination image.
  • the section 197 (out-of-distribution element k d ) of the graph of FIG. It can be seen that it corresponds to the pixels included in.
  • block division (region division) processing and representative value calculation processing are performed in the input data generation unit, the coordinate positions of multiple pixels corresponding to blocks (regions) that are suspected of having defects or foreign objects in the judgment image Can be identified. If the input data generation unit does not perform block division (region division) processing and representative value calculation processing, the coordinate position of each pixel suspected of having a defect or a foreign object in the determination image can be specified.
  • a projector may be used to project and map symbols, colors, and the like on parts that are suspected of having defects or foreign objects on the food to be inspected.
  • an image in which a portion of the food to be inspected or a portion suspected of having a foreign object is marked with a symbol or a color may be generated and displayed on a display. Thereby, the worker can confirm the result of the projection mapping and the display contents, and can manually remove the problem part and the foreign matter.
  • information such as the coordinate position of a pixel that is suspected of the presence of a defect or a foreign object in the captured judgment image is converted into physical coordinate information, and automatic trouble spot and foreign object removal work is performed by a robot or laser. May be.
  • a luminance threshold value (second threshold value) is used to determine the range of luminance to be extracted.
  • the setting value of a 2nd threshold value and the result of learning and determination are shown about the case where the blood density of chicken is detected.
  • the upper part of FIG. 43 shows an example in which the second threshold value is set so as to extract color information having a luminance value of the top 10%.
  • the horizontal axis of the histogram in the upper part of FIG. 43 is the luminance, and the vertical axis is the frequency (frequency) of each luminance.
  • the leftmost range of the histogram in the upper part of FIG. 43 corresponds to the color information relating to the pixels in the background portion.
  • the rightmost range of the histogram in the upper part of FIG. 43 corresponds to the color information relating to the pixels in the blood portion.
  • the broken line corresponds to the second threshold value. Peaks appear in both the background portion of the histogram and the blood portion.
  • the learning did not converge even after 20,000 learnings based on 275 images, and the neural network learning was not completed.
  • color information having a luminance value of the top 10% is extracted, not only chicken and blood portions in the determination image but also pixels having high luminance in the background portion are included. Therefore, it is estimated that the information regarding the chicken portion and the background portion is insufficiently separated.
  • the middle part of FIG. 43 shows an example in which the second threshold value is set so as to extract color information having the highest luminance value of 4%.
  • the horizontal axis of the histogram in the middle of FIG. 43 is the luminance, and the vertical axis is the frequency (frequency) of each luminance.
  • histograms having the same shape are shown.
  • the correct answer rate when a non-defective product judgment image is input is 74%
  • the correct answer rate when a defective product judgment image is input is 96%.
  • the lower part of FIG. 43 shows an example in which the second threshold value is set so as to extract color information having a luminance value of the upper 2%.
  • the horizontal axis of the histogram in the lower part of FIG. 43 is the luminance, and the vertical axis is the frequency (frequency) of each luminance.
  • the same determination image as the determination image used in the example of the upper part of FIG. 43 and the middle part of FIG. 43 is used, so that histograms having the same shape are shown.
  • the correct answer rate when a non-defective product judgment image is input is 88%
  • the correct answer rate when a defective product judgment image is input is 97%. It can be seen that color information including a blood portion can be effectively selected by extracting color information having a luminance value of the top 2%. Note that the color information having the highest luminance value of 2% corresponds to 2% 1310 pixels out of the total 65536 pixels of the determination image, and is a sufficient amount to extract the information related to the blood portion in the determination image. It is thought that.
  • the second threshold setting method described here is merely an example, and different setting values can be used depending on the food to be inspected, defects, foreign matter, background color, imaging environment, and the like.
  • the food inspection method according to the present invention it is possible to achieve accurate and quick sorting of food raw materials, and to produce high-quality food and reduce costs.
  • the improved back-propagation method highly accurate determination processing is realized even for a neural network that is not multi-layered. Thereby, the load on learning and determination is reduced, and real-time identification and selection can be performed without using a high-performance computer.
  • the method for detecting a food defect or a foreign object (defective product) at high speed and with high accuracy has been described.
  • the present invention may be used to classify non-defective products into a plurality of categories so that cooking processes suitable for the characteristics of the non-defective products can be selected.
  • defective products may be classified into a plurality of categories.
  • data on characteristics, types of defects and foreign matters may be aggregated so that an optimal cooking method and quality problems of food can be analyzed.
  • a case where non-defective products and defective products are classified into a plurality of categories will be described.
  • FIG. 44 shows an example of a neural network that outputs reaction values corresponding to a plurality of good product categories and defective product categories.
  • the neural network 220 in FIG. 44 includes three layers, an input layer 221, a hidden layer 222, and an output layer 223, as in the above-described embodiments.
  • the output layer 223 is provided with units corresponding to a plurality of categories.
  • each good product category there are a plurality of good product units including a good product unit 224 (good product # 1 unit), a good product unit 225 (good product # 2 unit), and a good product unit 226 (good product #P unit). It is shown.
  • P is the number of non-defective units.
  • non-defective product # 1 is a non-defective product category that provides a good taste when cooked as fried chicken.
  • non-defective product # 2 is a non-defective product category in which a good taste can be obtained when cooking as grilled chicken.
  • Good product # 3 is assumed to be a good product category that provides a good taste when cooked as a steamed chicken.
  • the meat part has a certain color and the chicken is mixed with fat and then fried, then a good taste can be obtained.
  • Two-input data is generated, and the neural network 220 is learned by setting the response value of the non-defective item # 1 to 1 and the response values of the other units to 0.
  • good taste can be obtained by making chicken with a certain percentage of fat
  • the second input data is generated from multiple sample images of chicken that meet the relevant requirements, and the unit of good product # 2
  • the response value of 1 is set to 1, and the response values of other units are set to 0, and the neural network 220 is learned.
  • the second input data is generated from multiple sample images of chicken that satisfy the relevant requirements, and The response value is 1 and the response values of other units are 0, and the neural network 220 is learned.
  • the optimum cooking application of chicken meat that has been determined by experienced workers from the experience side can be automatically determined by the device.
  • the requirement of the chicken meat from which the above-mentioned good taste is obtained is an example, and different requirements may be used.
  • the category of non-defective products is defined here based on the optimal cooking application, but other criteria such as less change in taste over time, less change in color over time, and less denaturation due to freezing. A non-defective product category may be defined.
  • the determination mode includes a plurality of non-defective categories
  • the output layer of the neural network includes a plurality of non-defective units that output reaction values related to any of the non-defective categories.
  • a defective product unit 227 (a defective product # 1 unit), a defective product unit 228 (a defective product # 2 unit), and a defective product unit. 229 (defective product #Q unit) is shown.
  • Q is the number of defective units.
  • the defective product # 1 is a category of defective products related to chicken with blood.
  • Defective product # 2 is a category of defective products related to chicken including wings as a foreign object.
  • Second input data is generated from a plurality of sample images in which chicken with blood is reflected, and the response value of the unit of the defective product # 1 is set to 1 and the response values of the other units are set to 0, and the neural network 220 is learned.
  • the second input data is generated from a plurality of sample images showing chickens including wings as a foreign object, the response value of the unit of the defective product # 2 is 1 and the response value of the other unit is 0, and the neural network 220 is learned. Do.
  • the determination mode includes a plurality of defective product categories
  • the output layer of the neural network includes a plurality of defective product units that output reaction values related to any of the defective product categories.
  • R 1
  • other unit categories include cases where it is difficult to determine, but other categories may also be used.
  • reaction values relating to different types of food may be output. Thereby, classification and sorting of food types can be performed.
  • first input data is generated from an image to be inspected, and the first input data is input to a neural network (for example, FIG. 44) having a plurality of non-defective units and a plurality of defective units in the output layer
  • the reaction value of each unit Is obtained. Further, based on the reaction values of a plurality of non-defective units or defective units, the non-defective product category or the non-defective product category of the food imaged in the inspection target image is estimated.
  • reaction values related to a plurality of non-defective units may be stored in the storage device. If it is estimated that the food to be inspected is a non-defective product, the estimated good product category may be stored in a storage device. Similarly, reaction values relating to a plurality of defective units may be stored in the storage device. If it is estimated that the food to be inspected is a defective product, the category of the estimated defective product may be stored in the storage device. In addition, reaction values relating to other units may be stored, and if it is difficult to determine, the fact may be stored in a storage device. As with the storage unit described above, the type and arrangement of the storage device are not particularly limited.
  • FIG. 45 shows the ratio of the non-defective product category and the defective product category for each production area.
  • a table storing statistical data as shown in FIG. 45 is obtained. can get.
  • Each row in the table of FIG. 45 corresponds to the chicken production area examined.
  • a factory, B factory, C factory, D farm, E company, and F company are shown as chicken production areas.
  • Each column in FIG. 45 corresponds to an estimated category. From the left, chicken with good characteristics for fried chicken (good quality # 1), chicken with characteristics suitable for grilled chicken (good quality # 2), chicken with characteristics suitable for steamed chicken (good quality # 3), bloody The categories of chicken (defective product # 1), chicken containing wings as a foreign object (defective product # 2), and cases where determination is difficult (other # 1) are shown. In the statistical data of FIG. 45, the composition ratio of each category is shown as a percentage.
  • the ratio of chickens that are suitable for steamed chicken is high in the chickens supplied from Factory A and Company F, and the chicken that is supplied from Factory B and Factory D has characteristics suitable for grilled chicken. It turns out that the ratio of what has is high. It can be seen that the ratio of chickens that have characteristics suitable for fried chicken is high. It can be seen that the chicken supplied from Company E has a relatively high probability of containing blood as a defect, and the chicken supplied from Farm D has a relatively high probability of having wings as a foreign object.
  • the statistical data of FIG. 45 may be used to determine the production area of chicken to be supplied to production lines such as fried chicken, grilled chicken, and steamed chicken.
  • the statistical data in FIG. 45 is an example, and data acquired by a different method may be processed.
  • a cooking process to be performed on meat may be selected based on the category of good products estimated for meat.
  • FIG. 46 shows an example of a system for selecting a different cooking process for each good product category. Below, the system which concerns on 5th Embodiment is demonstrated to the case where it applies with respect to chicken as an example.
  • FIG. 46 is a plan view showing a configuration example when the system according to this embodiment is viewed in plan.
  • the transport device 4c transports a plurality of chickens downward in FIG.
  • the transport device 4c is, for example, a belt conveyor, but may be another type of transport device.
  • the non-defective product category (determination mode) related to each chicken being transported is estimated by a food inspection system (not shown) installed on the upstream side of the transport device 4c.
  • the configuration and function of the food inspection system according to this embodiment are the same as those of the above-described embodiments except for the difference between the neural network to be used and the learning method.
  • the chicken estimated to be defective has been removed on the upstream side of the conveying device 4c, or the defects and foreign matter have been removed, so that the chickens 81 to 84 shown in FIG. 46 are all good.
  • the non-defective item category (determination mode) of chicken 81 is estimated to be non-defective item # 3 (for steamed chickens). For this reason, when the sorting device 3b detects that the chicken 81 has been transported onto the transport device 4c by the sensor 24, the sorting device 3b moves the arm 31b to push the chicken 81 on the transport device 4c onto the transport device 4d. The transport device 4d moves to the left in FIG. The conveying device 4d conveys the chicken 81 to the cooking process related to the steamed chicken. Then, the chicken 81 is cooked as a steamed chicken in the next step.
  • the non-defective item category (judgment mode) of chicken 83 is presumed to be non-defective item # 2 (for grilled chicken). For this reason, when the sorting device 3c detects that the chicken 83 has been transported onto the transport device 4c by the sensor 25, the sorting device 3c moves the arm 31c to push the chicken 83 on the transport device 4c onto the transport device 4e.
  • the transport device 4e is moving in the right direction in FIG.
  • the conveyance device 4e conveys the chicken 83 to a cooking process related to grilled chicken.
  • the chicken 81 is then cooked as grilled chicken in the next step.
  • the transfer devices 4b and 4c are electrically connected to the food inspection system and can acquire information on the category of non-defective products related to each chicken estimated by the food inspection system.
  • the non-defective category (judgment mode) of chicken 84 is presumed to be non-defective item # 1 (dried from the chicken). For this reason, the chicken 84 is not pushed out by the sorting devices 3b and 3c, but is conveyed downward by FIG. 46 by the conveying device 4c.
  • the conveyance device 4c conveys the chicken 84 to the cooking process related to fried chicken. And chicken 84 is cooked as fried food in the next step.
  • fried chicken, fried chicken, and steamed chicken are listed as examples of the chicken cooking process, but other cooking processes may be selected.
  • cooking suitable for the characteristics of meat is performed, so that food with good taste and quality can be produced.

Abstract

[課題]食品原材料の正確かつ迅速な選別を実現し、高品質な食品の生産およびコストの抑制に寄与する、食品検査システム、食品検査プログラム、食品検査方法および食品生産方法を提供する。 [解決手段]本発明に係る食品検査システムは、検査対象食品を撮影した判定画像について、前記判定画像に含まれるピクセルの輝度の度数分布を求めるステップと、前記度数分布から、前記輝度が一定範囲の値にある前記ピクセルの輝度情報を抽出し、前記ピクセルの前記輝度情報における前記輝度の値を格納した要素を含む輝度データを生成するステップと、前記輝度データの前記要素を前記輝度の値の降順または昇順に整列するステップと、前記輝度データを第1入力データとして、ニューラルネットワークに入力し、前記ニューラルネットワークの出力層における反応値に基づき、検査対象食品の判定モードを推定するステップとを実行することを特徴とする。

Description

食品検査システム、食品検査プログラム、食品検査方法および食品生産方法
 本発明は、食品検査システム、食品検査プログラム、食品検査方法および食品生産方法に関する。
 食品の生産工程では、原材料の加工時に不良品や異物の選別と除去が行われている。例えば、鶏肉を使った加工食品の生産では、原材料の選別作業において骨、羽などの異物や血合いなどの欠陥を除去しなくてはならない。しかし、現実の選別作業は、目視検査や触手検査に頼っているため、作業ミスで骨、羽などの異物や血合いを含む原材料が見落とされ、次の工程に進んでしまうおそれがある。作業ミスを減らし、選別作業を高速化するためには、作業人員を増やす必要があり、生産コストが高くなってしまう。
 上述の背景もあり、食品の生産工程では高精度の検査を自動的に行う装置の導入が進められている。原材料中に混入した硬骨については、X線検査装置による検出が行われるようになっている。食肉の異物や血合いなどを検出する技術の開発も進められている。特許文献1では、魚介類の切り身に紫外線を照射し、発生する蛍光より異物を検出する装置が示されている。特許文献2では、肉類に可視光を照射し、寄生中から発生する蛍光をフィルタにより選択的に検出する方法が示されている。特許文献3では、食肉に紫外線を照射し、発生した蛍光により画像を生成し、脂肪交雑等級を判定する装置が示されている。
特開2017-142133号公報 特開2007-286041号公報 特開2005-233636号公報
 食肉の血合いを検出する技術としては、画像中の色彩の違いによって血合いの位置を推定する方法がある。この方法では画像中の影や凹凸を血合いと誤判定することがあり、充分な検査精度を確保できない。鶏肉の羽については検査対象に紫外線を照射し、発生する蛍光に基づき、羽の位置を推定する方法がある。鶏肉の皮からも蛍光が発生し、画像中の色彩が羽の部分と類似してしまうため、正確な判定が難しい。また、近年は原材料価格や人件費の高騰などもあり、高い品質を維持しながら生産コストを抑えることが課題となっており、食品原材料の低コストで高精度な検査を実現することが求められている。
 これらの課題を踏まえ、加工食品の生産においては、高品質な製品を低コストで提供するため、効率的に血合いや羽などの選別を実現する技術の開発が望まれている。本発明は食品原材料の正確かつ迅速な選別を実現し、高品質な食品の生産およびコストの抑制に寄与する、食品検査システム、食品検査プログラム、食品検査方法および食品生産方法を提供する。
 本発明に係る食品検査システムでは、検査対象食品を撮影した判定画像について、前記判定画像に含まれるピクセルの輝度の度数分布を求めるステップと、前記度数分布から、前記輝度が一定範囲の値にある前記ピクセルの輝度情報を抽出し、前記ピクセルの前記輝度情報における前記輝度の値を格納した要素を含む輝度データを生成するステップと、前記輝度データの前記要素を前記輝度の値の降順または昇順に整列するステップと、前記輝度データを第1入力データとして、ニューラルネットワークに入力し、前記ニューラルネットワークの出力層における反応値に基づき、検査対象食品の判定モードを推定するステップとを実行することを特徴とする。判定画像における検査対象食品の大きさ、形状、位置、方向(回転)は不定で予測困難である。そこで、本発明では判定画像を検査対象食品の大きさ、形状、位置、方向(回転)に係る情報を捨像した第1入力データに変換してから、ニューラルネットワークに入力するものとする。
第1の実施形態に係る食品検査システム全体の構成例を示す図。 第1の実施形態に係る装置の構成例を示した図。 第1の実施形態に係る装置の構成例を示した図。 色彩の違いによる血合い検出の例を示した図。 色彩の違いに基づく判定における誤検出例を示した図。 偏光フィルタを通して画像を撮影された画像の例を示す図。 赤の輝度データから緑の輝度データを減算した画像の例を示す図。 赤外線撮影が可能なカラーカメラによって撮影された画像の例を示した図。 入力画像の例を示した図。 血合い選別用の撮影装置の構成例を示した図。 良品の鶏肉と不良品の鶏肉を撮影した画像の例を示す図。 様々な形状に係る食肉の例を示した図。 食肉の画像とピクセルとの対応関係の例を示した図。 画像から入力データを生成する処理のフローチャート。 各色の輝度に係る度数分布を示したヒストグラム。 輝度により昇順に整列した輝度データの例を示した図。 輝度データのブロック分割処理と代表値の計算処理の例を示す図。 輝度データと入力データの関係を示した図。 第1の実施形態に係る学習処理のフローチャート。 3つの反応値を出力するニューラルネットワークの例を示す図。 ニューラルネットワークのユニット間の演算処理を示す図。 ガウス関数を示したグラフ。 シグモイド関数を示したグラフ。 第1の実施形態に係る判定処理のフローチャート。 活性化関数にRBFを使ったときの識別曲面と反応値の分布。 活性化関数にシグモイド関数を使ったときの識別曲面と反応値の分布。 ニューラルネットワークの反応値の例を示したグラフ。 ニューラルネットワークの反応値の例を示したテーブル。 プログラムにより提供されるGUIの例を示した図。 2つの反応値を出力するニューラルネットワークの例を示す図。 画像のピクセルと領域分割処理の対応関係の例を示した図。 第2の実施形態に係る学習処理のフローチャート。 第2の実施形態に係る判定処理のフローチャート。 ひとつの反応値を出力するニューラルネットワークの例を示す図。 識別性能の結果を示したテーブル。 光源の種類による画像の見え方の違いを示した図。 鶏の各部位における分光蛍光スペクトル分析の結果を示した図。 分光蛍光スペクトル分析における羽と皮の差分信号を示す図。 フィルタの種類による画像の違いを示した図。 異物である羽を選別する撮影装置の構成例を示した図。 良品画像に相当する第2入力データにおける輝度の分布の例を示した図。 もとの判定画像へのバックトレース結果の例を示した図。 度数分布における輝度のしきい値(第2しきい値)の例を示した図。 複数の良品のカテゴリおよび不良品のカテゴリに対応した反応値を出力するニューラルネットワークの例を示した図。 産地ごとの良品のカテゴリおよび不良品のカテゴリの比率を示した図。 良品のカテゴリごとに異なる調理工程を選択するシステムの例を示した図。
 以下では、図面を参照しながら、本発明の実施形態について説明する。また、図面において同一の構成要素は、同じ番号を付し、説明は、適宜省略する。
(第1の実施形態)
 図1は、第1の実施形態に係る食品検査システム全体の構成例を示す図である。
 図1の食品検査システムは、食品検査装置1と、撮影装置2と、仕分け装置3と、搬送装置4と、滑り台5と、PLC(プログラマブルロジックコントローラ)6とを含む。以下では、食品検査システムの概要について説明する。
 食品検査システムは、食品を撮影した画像に基づき、良品と不良品の自動的な判定を行う。ここで不良品とは、欠陥を有する食品や異物を含む食品のことをいうものとする。一方、良品とは欠陥や異物のない食品のことをいう。食品検査システムが検査対象とする食品の例としては、鶏肉、豚肉、牛肉、羊肉、魚介類、野菜、果物、穀物、飲料、調味料などがあるが、食品の種類については特に問わない。鶏肉、豚肉、牛肉、魚介類などの食肉の場合、未加熱である生の食肉を検査対象としてもよいし、加熱後の食肉を検査対象としてもよい。食品は未加工の原材料であってもよいし、生の切り身であってもよいし、何らかの加工が施されたものであってもよい。すなわち、食品の加工の程度についても特に限定しない。
 第1の実施形態では、鶏肉の生の切り身を検査対象とし、血合いの有無を判定する場合を例に説明する。血合いは鶏肉の欠陥の一例であるが、その他の種類の欠陥を検査対象としてもよい。なお、鶏肉における異物のひとつである羽の有無を検査する例については後述する。本発明の食品検査システムが検出する、不良品に含まれる欠陥や異物などの種類については特に問わない。
 食品検査システムは、サンプルの食品(サンプル食品)を撮影した画像に含まれるピクセルの輝度に基づき生成されたデータを使ってニューラルネットワークの学習を行う。ニューラルネットワークの学習が完了したら、検査対象食品を撮影した画像のピクセルの輝度に基づき、ニューラルネットワークへ入力可能なデータに変換した後、ニューラルネットワークに入力する。以降では、ニューラルネットワークの入力層へ入力可能な形式に変換されたデータを入力データと呼ぶものとする。
 食品検査システムは、ニューラルネットワークからの出力層における反応値に基づき、良品と不良品の判定を行う。判定結果に基づき、良品と良品が混在した食品群を仕分けてもよい。
 食品検査システムは効果的な学習や高い精度の判定を行うため、学習処理と判定処理に最適化された画像を使うことができる。例えば、食品を撮影するときに利用する光源の周波数スペクトルや偏光を制御してもよい。カメラにフィルタを装着し、フィルタを通して得られた画像を使ってもよい。また、血合いや異物の検出が容易になるよう、撮影後の画像に各種画像処理を行ってもよい。ここで、血合いとは食肉における打ち身などの起因する着色や血の固まりだけでなく、色、風味などが他の部位とは異なる着色部位なども含むものとする。
 次に、食品検査システムに含まれる各装置の概要について説明する。
 食品検査装置1は、画像処理、入力データの生成、ニューラルネットワークの学習、ニューラルネットワークを使った良品と不良品の判定などを行う。食品検査装置1は、1以上のCPU(中央処理装置)、記憶部、通信部を備え、OS(オペレーティングシステム)とアプリケーションが動作する計算機などの情報処理装置である。食品検査装置1は、物理的な計算機であってもよいし、仮想計算機(Virtual Machine:VM)、コンテナ(container)またはこれらの組み合わせにより実現されるものであってもよい。1つ以上の物理計算機、仮想計算機、コンテナに食品検査装置1の機能を分担させてもよい。可用性の向上や負荷分散のために食品検査装置1の台数を増やした構成を用いることも排除されない。なお、食品検査装置1の機能の詳細については後述する。
 撮影装置2は、筐体内に入った食品を光源で照らし、撮影する。撮影装置2で撮影された画像は、食品検査装置1の記憶部に保存される。撮影装置2と食品検査装置1の間のインタフェースとして、Ethernet、無線LAN、PCI Express、USB、UART、SPI、SDIO、シリアルポート、Bluetoothなどによって行われるものとする。これらのインタフェースは例であり、その他の方式によるものを用いることを妨げるものではない。撮影装置2の詳細についても後述する。
 仕分け装置3は、食品検査装置1による判定結果に基づき、良品と良品が混在した食品群を仕分ける。図1の例では、搬送装置4により搬送された食品を搬送装置4から押し出す装置が示されているが、仕分け装置3の構造や動作については特に問わない。例えば、仕分け装置3は不良品と判定された食品を、良品とは異なる方向に搬送する装置であってもよい。また、仕分け装置3は不良品または異物ありと判定された食品を、把持(ピッキング)するロボットであってもよい。
 仕分け装置3は、PLC6を介して食品検査装置1と接続されている。食品検査装置1が食品を不良品と判定した場合、PLC6に制御信号を送信する。仕分け装置3はPLC6から送信された制御信号に基づき、不良品と良品が混在した食品群を仕分ける。なお、食品検査システムは必ず仕分け装置3を備えていなくてもよい。仕分け装置3の有無に関わらず、食品検査装置1により不良品と判定された食品を作業員が手作業で取り除いてもよい。
 搬送装置4は、食品を撮影装置2の下方の撮影領域に搬送する。その後、食品は搬送装置4によって仕分け装置3に搬送される。搬送装置4として、例えばベルトコンベヤ、チェーンコンベヤ、ローラコンベヤ、メッシュコンベヤ、グラビティコンベヤなど各種のコンベヤ装置を用いることができる。コンベヤ装置は一例であり、その他の移動体を使って食品を搬送してもよく、搬送手段については特に問わない。また、図1の例では、食品が左から右に向かって搬送されているが、食品が搬送される方向についても特に限定しない。
 搬送装置4を設けることにより、食品加工または食品製造のいずれかの工程において、流れてくる食品の撮影や判定を行うことができる。食品検査システムは必ず搬送装置4を備えていなくてもよいが、効率的な画像の撮影や食品検査の高速化のため、何らかの搬送手段を備えていることが望ましい。搬送装置の構成例については後述する。
 滑り台5は、不良品と判定された食品を良品とは異なる方向に移動する。仕分け装置3によって搬送装置4から押し出された食品は、自重により滑り台5を降下する。滑り台5の下部には大型の容器が設置されていてもよいし、別の搬送装置が設置されていてもよい。不良品と判定された食品は、異物や血合いを除去した後、瑕疵のない良品として次の工程で加工してもよいし、廃棄してもよい。なお、図1の滑り台5は、不良品と判定された食品を移動する手段の一例に過ぎない。食品検査システムはその他の方法で不良品と判定された食品を仕分けてもよい。
 PLC6は、食品検査装置1から送信された制御信号に基づき仕分け装置3または搬送装置4を制御する。食品検査装置1とPLC6の間のインタフェースならびにPLC6と仕分け装置3または搬送装置4の間のインタフェースとして、Ethernet、無線LAN、PCI Express、USB、UART、SPI、SDIO、シリアルポート、Bluetoothなどを使うことができる。これらのインタフェースは例であり、その他の方式のものを使ってもよい。
 図1の食品検査システムでは、食品61の画像が撮影装置2によって撮影されている。撮影された食品の画像は食品検査装置1に保存され、判定に用いられる。食品62は、血合いを有する不良品であると判定されたため、仕分け装置3によって、搬送装置4から押し出され、滑り台5を降下している。食品63は、良品であると判定されたため、食品群から仕分けられずに次の工程に進むことができる。
 次に、食品検査装置1に含まれる構成要素について説明する。
 食品検査装置1は、制御部10と、画像記憶部11と、画像処理部12と、入力データ生成部13と、学習データ記憶部14と、学習部15と、モデル記憶部16と、判定部17と、表示部18と、操作部19とを備えている。
 制御部10は、撮影装置2のセンサ23が食品を検出したら、撮影装置2のカメラ22に画像の撮影を指示する。すなわち、センサ23は食品が搬送装置4により撮影装置2の下方に移動してきたことを検出する。制御部10は、食品がカメラ22の撮影アングル内に入ったタイミングで撮影を指示する。このタイミングは、例えばセンサ23による食品の検出時刻と、搬送装置4の移動速度に基づいて推定することができる。このように制御部10の機能により、食品の自動的な撮影が行われる。
 画像記憶部11は、撮影装置2のカメラ22により撮影された画像を保存する記憶領域である。画像記憶部11は、SRAM、DRAMなどの揮発性メモリでも、NAND、MRAM、FRAMなどの不揮発性メモリでもよい。また光ディスク、ハードディスク、SSDなどのストレージ装置でもよい。画像記憶部11は、食品検査装置1に内蔵されていてもよいし、食品検査装置1の外部の記憶装置であってもよい。また、画像記憶部11は、SDメモリカード、USBメモリなどの取り外し可能な記憶媒体であってもよい。
 画像処理部12は、撮影された食品の画像に対して画像処理を行い、画像処理が行われた後の画像を画像記憶部11に保存する。画像処理の例としては、画像中のピクセルにおける赤、緑、青(RGB)の各色の輝度をそれぞれ抽出した画像の生成、各ピクセルにおける赤(R)の輝度から緑(G)の輝度を減算した画像の生成、HSV色空間への変換後、赤の成分のみを抽出した画像の生成などが挙げられるが、他の種類の画像処理を行ってもよい。画像処理を行うことにより、食品の欠陥や異物の検出が容易となる場合がある。
 画像処理部12は、他に画像の拡大、縮小、切り取り、ノイズ除去、回転、反転、色深度の変更、コントラスト調整、明るさ調整、シャープネスの調整、色補正などを行ってもよい。また、複数の処理を組み合わせて実行してもよい。画像処理部12の機能は、例えば画像処理ライブラリや、画像処理ソフトウェアによって実現することができるが、画像処理機能を備えたFPGA、ASICなどの半導体回路を使って実装してもよい。なお、食品検査装置1は画像処理部12を必ず備えていなくてもよい。また、撮影された食品の画像に対して画像処理を行わなくてもよい。
 入力データ生成部13は、食品の画像からニューラルネットワークの入力層に入力される、入力データを生成する。例えば、画像に含まれるピクセル数よりニューラルネットワークの入力層に含まれるユニット数が少ない場合、画像に含まれる学習や判定に必要な情報を保持しつつ、入力変数の数をニューラルネットワークの入力層に含まれるユニット数Nに等しい数に減らす必要がある。入力データ生成部13による入力データの生成処理の詳細については後述する。入力データ生成部13により、入力データに変換される画像は、画像処理が行われた画像であってもよいし、カメラ22により撮影された未加工の画像のいずれであってもよい。
 食品検査装置1が学習処理を実行している場合、入力データ生成部13は入力データを学習データ記憶部14に保存する。食品検査装置1が食品の検査を行っている場合、入力データは判定部17に転送される。判定部17への入力データの転送方法については入力データを共有メモリに配置する方法や、プロセス間通信を使う方法などがあるが、特に問わない。
 なお、学習処理において入力データ生成部13は必ず撮影装置2のカメラ22により撮影された画像を使わなくてもよい。例えば、外部の装置やシステムによって撮影された画像を使って入力データを生成してもよい。
 学習データ記憶部14は、ニューラルネットワークの学習に用いられる複数の入力データを保存する記憶領域である。学習データ記憶部14に保存された入力データは、学習部15の学習データ(教師データ)として用いられる。学習データとして使われる入力データ(第2入力データ)は、良品、不良品、異物有り、異物無、血合い有り、血合い無、判定困難などの判定モードをラベル付けされた状態で保存されていてもよい。第2入力データのラベル付けは、例えばユーザが表示部18に表示された画像を目視で判定し、ユーザが操作部19を操作することによって行うことができる。なお、連続して撮影された画像の判定モードが既知なのであれば、プログラムやスクリプトなどによって自動的にラベル付けを行ってもよい。判定モードのラベル付けは第2入力データへの変換前に行ってもよいし、第2入力データへの変換以後に行ってもよい。
 学習データ記憶部14は、SRAM、DRAMなどの揮発性メモリでも、NAND、MRAM、FRAMなどの不揮発性メモリでもよい。また光ディスク、ハードディスク、SSDなどのストレージ装置でもよい。学習データ記憶部14は、食品検査装置1に内蔵されていてもよいし、食品検査装置1の外部の記憶装置であってもよい。また、学習データ記憶部14は、SDメモリカード、USBメモリなどの取り外し可能な記憶媒体であってもよい。
 学習部15は、学習データ記憶部14に保存された入力データ(第2入力データ)を使い、ニューラルネットワークの学習を行う。学習部15は、学習したニューラルネットワークをモデル記憶部16に保存する。学習部15は、例えば入力層と、隠れ層と、出力層の3層のニューラルネットワークを学習することができる。3層のニューラルネットワークを学習することにより、食品検査時におけるリアルタイムの応答性能を確保することができる。入力層、隠れ層、出力層のそれぞれに含まれるユニット数については特に限定しない。各層に含まれるユニット数は、求められる応答性能、判定対象、識別性能などに基づいて決定することができる。
 なお、3層のニューラルネットワークは一例であり、これより層の数が多い多層のニューラルネットワークを用いることを妨げるものではない。多層のニューラルネットワークを用いる場合、畳み込みニューラルネットワークなど各種のニューラルネットワークを使うことができる。
 モデル記憶部16は、学習部15により学習されたニューラルネットワークを保存する、記憶領域である。モデル記憶部16には、検査対象とする食品の種類や検出対象とする異物の種類に応じて複数のニューラルネットワークを保存してもよい。モデル記憶部16は判定部17より参照可能に設定されているため、判定部17はモデル記憶部16に保存されているニューラルネットワークを使って食品の検査を行うことができる。
 モデル記憶部16は、RAM、DRAMなどの揮発性メモリでも、NAND、MRAM、FRAMなどの不揮発性メモリでもよい。また光ディスク、ハードディスク、SSDなどのストレージ装置でもよい。モデル記憶部16は、食品検査装置1に内蔵されていてもよいし、食品検査装置1の外部の記憶装置であってもよい。また、モデル記憶部16は、SDメモリカード、USBメモリなどの取り外し可能な記憶媒体であってもよい。
 判定部17は、モデル記憶部16に保存されたニューラルネットワークを使って、良品と不良品の判定を行う。判定部17は、出力層のユニットから出力される反応値に基づいて食品の判定モード(例えば、良品、不良品、判定困難など)を推定する。出力層のユニットの例としては、良品のユニット、不良品のユニット、異物なしのユニット、異物ありのユニット、判定不明のユニットなどがあるが、その他の種類のユニットを用意してもよい。判定部17は、例えば反応値をしきい値と比較し、食品の判定モードを推定することができる。複数のユニットの反応値の差や比を使って食品の判定モードを推定してもよい。
 なお、学習部15および判定部17の機能はCPU上で動作するプログラムによって実現されていてもよいし、一部またはすべての機能をFPGA、ASICなどの半導体回路やGPU(Graphics Processing Unit)によって実現してもよい。
 表示部18は、画像やテキストを表示するディスプレイである。表示部18には、撮影された画像や画像処理後の画像を表示してもよいし、食品検査の判定結果または検出結果を表示してもよい。また、GUI(Graphical User Interface)やCLI(Command Line Interface)などを表示し、利用者のための操作画面を提供してもよい。
 表示部18として、例えば、LCD(液晶ディスプレイ)、CRT(ブラウン管)、有機EL(有機エレクトロルミネッセンス)ディスプレイなどを使うことができるが、その他の種類の装置を使ってもよい。図1の例における表示部18は食品検査装置1に内蔵されているが、表示部18の位置については特に問わない。表示部18は、食品検査装置1から離れた部屋や建物に設置されていてもよい。
 操作部19は、利用者による食品検査装置1の操作手段を提供する装置である。操作部19は、例えば、キーボード、マウス、ボタン、スイッチ、音声認識装置などであるが、これに限られない。また、操作部19は表示部18と一体化タッチパネルであってもよい。図1の例における操作部19は食品検査装置1に内蔵されているが、操作部19の位置についても特に問わない。操作部19は、食品検査装置1から離れた部屋や建物に設置されていてもよい。
 図2、図3は第1の実施形態に係る装置の構成例を示している。以下では、図2および図3を参照しながら各装置の構成について説明する。
 図2、図3には食品検査システムに含まれる一部の装置の構成が示されている。図2は、装置を側面から見たときの構成を示す側面図である。図3は、装置を上から見たときの構成を示す平面図である。図2、図3には撮影装置2aと、仕分け装置3aと、搬送装置4aと、表示部18aが示されている。
 搬送装置4aはコンベヤ上に配置された食品を長さ方向に移動することができる。撮影装置2aは搬送装置4aのコンベヤの一部区間を覆うように設置されている。コンベヤ上に配置された食品は、撮影装置2aの下方の撮影領域に入ったタイミングで撮影される。表示部18aは搬送装置4aの一方の側面に沿って直立するように配置されている。これにより作業員は、表示部18aに表示された映像を確認しながら、選別作業を行うことができる。仕分け装置3aは、シャトル式コンベヤ装置となっており、検査対象食品が不良品または異物ありと判定されたら、該当する食品を良品とは異なる方向に移動する。
 本発明による血合い検出の方法を説明する前に、上述の色彩の違いに基づく検出技術について説明する。色彩の違いによる検出では、食品画像中の色彩に基づき、鶏肉上の血合いがある部位を特定している。例えば、画像中で特定の範囲の色彩を有するピクセルを血合いと判定するよう、検査装置を設定する。
 図4は、色彩の違いによる血合い検出の例を示している。図4左側には血合い検出処理前の鶏肉の画像が示されている。一方、図4右側には画像処理後の鶏肉の画像が示されている。いずれの画像においても、楕円で血合いのある部位を囲んで示している。図4右側では、血合いのある部位が明るくハイライトされており、図4の例では血合い検出に成功していることがわかる。だが、画像中の色彩の違いのみに基づく判定では、正確な血合い検出が行われるとは限らない。
 図5は、色彩の違いに基づく判定における誤検出例を示している。図5には端部にくぼみを有する鶏肉が示されている。鶏肉のくぼみの部分は、照明の角度によっては影になることがある。図5の画像でくぼみの部分は本来の鶏肉の色とは異なる暗い色で表現されている。図5左側は血合い検出処理前の鶏肉の画像であり、図5右側は血合い検出処理後の鶏肉の画像である。図5右側では鶏肉の端部にあるくぼみが明るくハイライトされており、血合いのある部位と誤判定されていることがわかる。
 従来の色彩の違いに基づく血合いおよび異物検出では、血合いや異物の検出に失敗する確率が高く、色彩の違いに基づく判定は目視検査に変わる自動検査の方法として適用するのが難しい。自動検査を実現するためには、より高精度で血合いを検出する方法を使う必要がある。
 図6上段は、偏光フィルタを通さずに撮影された鶏肉の画像の例を示している。食肉などの食品は工程や加工方法によっては、濡れた状態で検査されることがある。濡れた食品は、光を反射することがあるため、撮影時に食品の正確な色情報が取得できなくなるおそれがある。また、油脂などに由来する光沢を有する食品も存在する。食品に光沢があると、画像中にテカリが現れ、食品の正しい色情報が得られなくなってしまう。図6上段の例では、画像中に光の反射やテカリが現れている。
 そこで、本発明では高い精度の血合い検出を実現するため、食肉の撮影方法を変更する。具体的には、カメラの前面に偏光フィルタを配置し、偏光フィルタを通して撮影を行う。図6下段は、図6上段と同一の鶏肉を、偏光フィルタを通して撮影したときの画像である。図6下段の例では画像から光の反射成分やテカリが除去されており、正確な色情報が取得されていることがわかる。また、コンベヤ上の水の反射も消えており、画像が見やすくなっている。
 本発明では、撮影された画像に対して画像処理を行い、血合いや異物の検出を容易にしてもよい。例えば、画像に含まれるピクセルの輝度に着目して画像処理を行うことが考えられる。ピクセルに係る各種の輝度の値を有する情報をまとめて輝度情報とよぶものとする。輝度情報の例としては、カラー画像のピクセルが有する赤色、緑色、青色など光の三原色の色情報、グレースケール画像のピクセルが有する明るさ情報が挙げられる。輝度情報として、他に画像処理後の画像に係るピクセルの明るさ情報を用いてもよい。画像処理後の画像の例としては、各ピクセルの赤の輝度から緑の輝度を減算した画像、赤の輝度成分のみを抽出した画像、カラー画像をグレースケールに変換した画像などが挙げられるが、その他の画像を使ってもよい。
 上述の明るさ情報における輝度は、画像に含まれるピクセルの赤色、緑色、青色のうち、少なくとも2つ以上の色に係る色情報の輝度を重み付け加算して求めたものであってもよい。また、上述の明るさ情報における輝度は、ピクセルの赤色、緑色、青色のうち、2つの色に係る色情報の輝度を減算することによって求めたものであってもよい。
 図7は、各ピクセルの赤の輝度から緑の輝度を減算した画像の例を示している。図7の例では、もとの画像130の各ピクセルの色情報について、赤(R)の輝度を分離した画像131と、緑(G)の輝度を分離した画像132と、青(B)の輝度を分離した画像133が示されている。もとの画像130はカラー画像である一方、画像131~133はそれぞれの色に係る輝度の大小を表現できればよいので、グレースケールの画像となっている。グレースケール画像のピクセルには、色情報の代わりに明るさ情報が格納されている。
 図7の右上には、各ピクセルにおける赤の輝度から緑の輝度を減算することによって得られた画像134が示されている。画像134ではもとの画像130における血合いのある部位が白色で強調された形で示されている。このように、画像処理を行うと血合いの検出を容易に行うことができるようになる。なお、画像を色ごとの輝度に分離する前に、画像処理部12はもとの画像の赤色と緑色を強調してもよい。
 図8は、赤外線撮影が可能なカラーカメラによって撮影された画像の例を示している。赤外線撮影が可能なカラーカメラは、複数の波長領域の電磁波に係る画像を撮影可能なカメラの一例である。画像241~244の被写体は同一の肉であるものとする。この肉は比較的色の濃い血合いを有するものとする。比較的色の濃い血合いの一部には、黒みの強いものも存在する。しかし、検査対象とする肉の種類や部位によって血合いの色は異なるため、検出対象とする血合いの色彩および色の濃さについては特に限定しないものとする。
 画像241は、赤色の可視光(R)に係る強度を示した画像(赤色成分画像の一例)である。画像242は、緑色の可視光(G)に係る強度を示した画像(緑色成分画像の一例)である。画像243は、青色の可視光(B)に係る強度を示した画像(青色成分画像の一例)である。画像244は、近赤外線に係る強度を示した画像(赤外線画像の一例)である。画像241~243において、強度は各色成分に係る輝度に相当する。
 画像241~244では、各ピクセルにおける対応する波長領域の電磁波の強度がグレースケールの階調(輝度)に変換されて表示されている。対応する波長領域の電磁波の強度が大きいほど、ピクセルは明るく表示されている。一方、対応する波長領域に係る電磁波の強度が小さいほど、ピクセルは暗く表示されている。画像241~244を参照すると、いずれの画像においても、肉の部分が周囲より明るく浮き出ており、対応する波長領域の電磁波の強度が周囲より強くなっていることがわかる。
 図8に示された画像は複数の波長領域の電磁波に係る画像を撮影可能なカメラによって撮影された画像の一例にしかすぎない。したがって、図8の例とは異なる種類の食品が被写体となっていてもよいし、図8の例に示されていない波長領域に係る電磁波の画像が撮影されてもよい。
 次に、食品検査システムが実行する画像処理の例について説明する。静脈に由来する血液によって形成された血合いは、黒みの強い血合いになりやすい傾向がある。一方、動脈に由来する血液によって形成された血合いは、赤みの強い血合いになりやすい傾向にある。ここでは、黒みの強い血合いをはじめとする、比較的色の濃い血合いが検出される精度を改善したい場合に実行される画像処理の例について説明する。以下では、比較的色の濃い血合いの例として、黒みの強い血合いの検出を行う場合について述べる。
 画像処理部12は、複数の波長領域に係る電磁波の画像に基づき、入力データに変換される画像(入力画像)を生成する。図9は、画像処理部12によって生成された入力画像の例を示している。図9に示されたように、画像処理部12は、近赤外線画像(例えば、画像244)から可視光の緑色成分画像(例えば、画像242)を減算した画像246を生成することができる。なお、画像245は、可視光の赤成分画像(例えば、画像241)から可視光の緑色成分画像(例えば、画像242)を減算した画像の例である。
 ここで、画像どうしの減算によって別の画像を生成する処理について説明する。例えば、第1画像から第2画像を減算した第3画像を生成する場合、生成された第3画像の各ピクセルの輝度は、第1画像の対応するピクセルの輝度から第2画像の対応するピクセルの輝度を減算した値となっている。
 図9の画像245を参照すると、現実に血合いの存在しない箇所にノイズ成分が現れている。この場合、欠陥・異物の誤検出が発生するおそれがある。一方、画像246を参照すると、黒みの強い血合いのある箇所に相当するピクセルが鮮明に浮き出ている。このため、近赤外線画像から緑色成分画像を減算した画像を入力画像とすると、黒みの強い血合いが検出される精度を改善できることがわかる。
 なお、ここで述べた演算対象の画像の組み合わせは例にしかすぎない。したがって、近赤外線領域以外の赤外線画像、紫外線画像、距離画像、RGB以外の波長領域に係る可視光成分の画像の任意の組み合わせを演算対象に含めてもよい。また、上述では画像どうしの減算について説明したが、画像どうしの加算を行ってもよい。また、画像に重み係数を乗じてから加算または減算を行ってもよい。すなわち、任意の画像を組み合わせて線形演算を行い、入力画像を生成することができる。
 また、演算後に生成された画像に対して二値化処理を行ってもよい。二値化処理の一例として、画像中の各ピクセルの輝度(明るさ)をしきい値と比較する処理が挙げられる。ここでは、当該ピクセルの輝度がしきい値以上であれば、当該ピクセルを白色(当該ピクセルの値を1)とする。一方、当該ピクセルの輝度がしきい値未満であれば、当該ピクセルを黒色(当該ピクセルの値を0)とする。ピクセルの変換方法はこれと逆であってもよい。また、しきい値の大きさについては特に問わない。
 上述のように、入力画像の生成時に使われる画像の種類や、使用されるアルゴリズムについては特に問わない。入力画像は、各ピクセルが1種類の輝度(明るさ)に係る情報を有する画像であってもよい。このような画像は、一般にディスプレイへの表示時や、印刷時にグレースケールの画像または、単色の階調に係る画像に可視化される。近赤外線画像から緑色成分画像を減算した画像は、1種類の輝度(明るさ)に係る情報を有する入力画像の一例である。
 上述のような画像処理を使うことにより、比較的色の濃い血合い(例えば、黒みの強い血合い)をはじめとする、欠陥や異物を高い精度で検出することが可能となる。これにより、食品生産に係るコストの削減、食品の高品質化を実現することができる。検出対象とする欠陥や異物に応じて、入力画像の生成に使われる画像の種類の組み合わせ、使用する演算の種類を選択してもよい。
 入力データに変換される画像は、少なくとも一部のピクセルが検査対象食品の範囲に含まれる画像であればよい。画像において、被写体である検査対象食品に相当する部分のピクセルが視覚的に、またはデータ的に識別可能な状態となっているか否かは問わないものとする。 
 図10は、血合い選別用の撮影装置の構成例を示している。以下では、図10を参照しながら撮影装置2aについて説明する。
 図10は、撮影装置2aの断面図である。撮影装置2aは搬送装置4aに面した下部が開放された略直方体形状の筐体を有する。撮影装置2aは、搬送装置4aの一部区間を上方から覆うように支持されている。撮影装置2aは、側面の一部またはすべてに壁を備えていてもよい。また、撮影装置2aの上部には天井が設けられていてもよい。天井や壁を備えることにより、撮影領域に外部の光源からの赤外線、可視光、紫外線などが入り込むのを抑制することができる。これにより、撮影装置2aは所望の光源から必要となる性質の光を選択的に撮影対象の食品に照射することができる。
 なお、撮影装置2aは必ず天井や壁を備えていなくてもよい。例えば、撮影装置2aが暗室に設置されているのであれば、外部の光源からの影響が少ないため、遮光用の天井や壁を省略することができる。天井や壁の材質の例としては、ステンレス鋼、アルミニウム、樹脂などがあるが、材質については特に問わない。
 撮影装置2aは、照明部21と、偏光板21aと、カメラ22と、偏光板22aと、センサ23を備えている。
 照明部21は、例えば白色LEDによる照明装置である。白色LEDは、一例であり、これとは異なる色のLEDを光源として使ってもよい。例えば、赤色、緑色、青色など複数の色のLEDを組み合わせて光源を構成してもよい。また、エレクトロルミノセンスランプ、HIDランプ、蛍光灯、白熱灯など、その他の光源を使ってもよい。使用する光源の種類は、検出対象の食品や異物の種類に応じて決めることができる。光源は可視光を放射するものに限らず、赤外線や紫外線などを放射するものであってもよいし、複数の波長に係る光源の組み合わせ(マルチ波長)であってもよい。照明部21は単一の光源ではなく、図10の例のように複数の位置に配置された光源であってもよい。例えば、撮影装置2a下方の撮影領域に可視光が照射されるよう、照明部21における光源の数と位置を決めることができる。
 照明部21の前面には偏光板21aが設けられている。偏光板21aは例えば直線偏光板である。照明部21の前面に必ず偏光板21aを設けなくてもよいが、偏光板21aがあれば、搬送装置4aの表面や食品の水分や油脂による光の乱反射が抑制され、カメラ22における食品の正確な色情報の取得に寄与する。
 カメラ22は、照明部21から放射された光線に照らされた食品を撮影する。カメラ22の内部には、例えばCMOSイメージセンサやCCDイメージセンサが実装されており、撮影対象の食品に係る色情報を含むカラー画像を得ることができる。これらの撮像素子は例であり、異なるデバイスを使って撮像を行ってもよい。カメラ22のレンズは固定焦点レンズであってもよいし、ズームレンズであってもよく、レンズの種類について特に限定しない。カメラ22が撮影する画像に係る解像度の例としては、フルHD(1920×1080ピクセル)があるが、撮影される画像の解像度については特に限定しない。
 カメラ22の撮影する画像は、各ピクセルに赤、緑、青(RGB)の三色の輝度に関する情報が含まれるカラー画像に限られない。例えば、可視光の波長内であっても、赤、緑、青(RGB)以外の色の輝度に関する情報が含まれる画像を撮影してもよい。また、撮影される画像は可視光以外の電磁波に係る画像であってもよい。例えば、各ピクセルに紫外線の強度に関する情報が含まれる画像(紫外線画像)や、各ピクセルに赤外線の強度に関する情報が含まれる画像(赤外線画像)を撮影してもよい。
 赤外線は、波長によって近赤外線、中赤外線、遠赤外線に分類されるが、どの種類の赤外線を使ってもよい。図10の画像244は、波長が760nm~1000nmの近赤外線を使って検査対象食品を撮影した画像の例である。
 複数波長に係る電磁波を使って画像を撮影することができるカメラの例としては、赤外線撮影が可能なカラーカメラ、マルチスペクトルカメラ、ハイパースペクトルカメラが挙げられる。また、撮影装置2aに可視光画像を撮影可能なカメラ(例えば、RGBカメラ)と、赤外線カメラの両方を装着し、画像記憶部11に両方のカメラによって撮影された画像を保存してもよい。また、紫外線画像を撮影可能なカメラを使ってもよいし、距離画像を撮影可能なカメラを使ってもよい。距離画像は、例えばToF方式の距離画像センサによって得ることができるが、使用するセンサの種類については特に問わない。
 このように、可視光の赤色成分(R)、可視光の緑色成分(G)、可視光の青色成分(B)に限られない複数の波長に係る画像が撮影可能なのであれば、撮影装置2aが備えるカメラの構成、台数、種類については特に限定しない。
 カメラ22の前面にも偏光板22aが設けられている。偏光板22aは例えば、カメラレンズ用の偏光フィルタである。カメラ22の照明部21の前面に必ず偏光板21aを設けなくてもよいが、偏光板21aを通して撮影を行うことにより、水分、油脂などの光沢に由来する乱反射やテカリなどが抑制された画像を得ることができる。
 センサ23は、搬送装置4aによって、撮影装置2aの下方に食品が搬送されたことを検出する。センサ23の例としては、レーザセンサ、赤外線センサ、超音波センサ、各種の光電センサ、画像センサ、重量センサなどが挙げられるが、センサの種類については特に問わない。
 次に、血合いの有無に基づき不良品の鶏肉に検出するときに使用する画像について説明する。図11上段は、良品と判定される鶏肉を撮影した画像の例を示している。図11上段の鶏肉には血合いがなく、異物も見えないため、良品と判定される。図11下段は、不良品と判定される鶏肉を撮影した画像の例を示している。図11下段の鶏肉は丸で囲まれた部位に血合いが含まれているため、不良品と判定される。
 次に、判定対象とされる食品の形状について説明する。図12は、様々な形状に係る食肉の例を示している。図12には画像101~106が示されている。画像101、102、105に係る食肉は比較的大きいが、画像103に係る食肉は比較的小さい。画像102に係る食肉は楕円形に近い形状を有しているが、画像101に係る食肉は四角形に近い形状である。また、画像104に係る食肉は細長く、画像105に係る食肉は凹凸のある形状である。このように、同じ種類の食品であっても、異なる形状や大きさのものが混在することがある。
 図12の例のように、判定対象とされる食品の形状が不定で予測困難な場合、パターンマッチングなどの手法を使って、画像中の食品に相当する領域を抽出するのは現実的ではない。本発明に係る食品検査システムでは、判定において食品の大きさ、形状、位置、方向(回転)などに依存しない手法を使う必要がある。例えば、食品の画像を、食品の大きさ、形状、位置、方向(回転)に係る情報を捨像した入力データに変換する処理を実行することが考えられる。以下ではこのような入力データを生成する方法の一例について説明する。
 図13は、食肉の画像とピクセルとの対応関係の例を示している。以下では、図13を参照しながら、入力データの生成処理について説明する。
 図13の画像107には撮影装置2によって撮影された食品110が示されている。食品110は、鶏肉などの食肉であるものとする。食品110は血合い110aと、血合い110bを有する。食品110を良品または不良品と効率的に判定するためには、食品110の領域に相当するピクセル109に係る情報を選択的に抽出するのが望ましい。食品110の存在しない領域にあるピクセル108に係る情報は食品の判定との関連性が少ないため、データ変換処理の過程で捨像されてもよい。画像中から食品の判定に必要な情報を含む部分のデータを、ニューラルネットワークの入力層に入力する入力データとして使うことにより、効率的な学習や判定を行うことができる。
 次に、上述のデータ変換処理の一例として輝度の度数分布を用いる方法について説明する。以降の説明では、輝度情報として、赤色、緑色、青色の色情報を使う場合を例に説明するが、その他の種類の輝度情報を使うことを妨げるものではない。図14は、画像から入力データを生成する処理のフローチャートである。以下では、図14を参照しながらデータ変換処理について説明する。
 まず、食品の画像の各色(RGB)について各ピクセルにおける輝度の度数分布を求める(ステップS101)。ステップS101における処理の概要は図15に示されている。図15は、各色の輝度に係る度数分布を示したヒストグラムである。
 図15には、赤(RED)、緑(GREEN)、青(BLUE)の各色の輝度に係る度数分布のグラフ(ヒストグラム)が示されている。それぞれのグラフの横軸は輝度の値を示している。例えば、各色の輝度が8ビットの情報で表現されている場合、輝度の値は0~255の256階調となる。使われる画像の色情報が必ず24ビット(8ビット×3)で表されているとは限らないため、各色の輝度に係る階調はこれより粗くてもよいし、細かくてもよい。色情報とはそれぞれのピクセルにおける任意の色に係る輝度の値である。
 図15の各グラフの縦軸は、それぞれの輝度の値を有するピクセルの数であり、ヒストグラムにおける度数(頻度)に相当する。図15の各グラフでは、度数が輝度の昇順で整列されているため、左から右に行くのにつれて輝度の値が大きくなっている。なお、図15のグラフは一例であり、度数分布の生成時に、度数を輝度の降順で整列してもよい。食品検査装置1における処理では、入力データ生成部13が食品の画像から図15に相当する度数分布データを生成すればよく、必ず図15のようなヒストグラムを表示部18に表示しなくてもよい。入力データ生成部13は度数分布データをメモリなどの記憶装置に保存する。
 なお、画像処理部12で各ピクセルにおける赤の輝度から緑の輝度を減算した画像を生成した場合、R-Gの輝度(明るさ情報)について度数分布を求めてもよい。もとの画像をHSV色空間に変換し、赤色を抽出した場合には、赤(R)の輝度についてのみ度数分布を求めてもよい。
 次に、各色の度数分布より、輝度が一定範囲の値にあるピクセルの色情報(輝度情報)を抽出する(ステップS102)。ステップS102における処理の概要についても図15を参照しながら説明する。図15に示された各グラフ(ヒストグラム)には、輝度の小さい側に第1のピーク70がある。一方、輝度の大きい側には第2のピーク71がある。
 図15の例では、ピーク70は図15の画像における背景部分の領域である、ピクセル108の色情報に相当している。ピーク71は図13の画像における食品部分の領域である、ピクセル109の色情報に相当している。
 上述のように、食品の良品/不良品判定では画像中の食品部分の領域に係る情報のみを使えばよいため、食品部分の領域に相当するピークの情報を取り出す。図15の例では、ピーク71に相当する部分の色情報を取得するため、しきい値を使ったピーク抽出処理を行っている。ピーク抽出処理では、例えばピーク検出用のしきい値(第1しきい値)と、輝度のしきい値(第2しきい値)とを用いることができる。
 度数分布におけるピークは、それぞれの輝度の値におけるピクセル数(度数)をピーク検出用のしきい値と比較することによって検出することができる。例えば、ピーク検出用のしきい値として度数の平均値を使う場合を説明する。この場合、ヒストグラムにおいて度数が複数の輝度で連続して度数の平均値を上回ったら、ピークがあると判定する。なお、ピーク検出用のしきい値として度数の平均値以外の値を使ってもよい。図15の線70a、70b、70cはこのようなピーク検出用のしきい値の一例である。
 図15のしきい値111a、111b、111cは輝度のしきい値(第2しきい値)である。輝度のしきい値を使って、色情報を抽出する範囲を決めることができる。例えば、赤(R)の輝度に係る度数分布については、輝度がしきい値111aより大きい部分の色情報のみを抽出する。ここで抽出された情報は輝度データ112aである。例えば、緑(G)の輝度に係る度数分布については、輝度がしきい値111bより大きい部分の色情報のみを抽出する。ここで抽出された情報は輝度データ112bである。例えば、青(B)の輝度に係る度数分布については、輝度がしきい値111cより大きい部分の色情報のみを抽出する。ここで抽出された情報は輝度データ112cである。以降では、色情報(輝度情報)の輝度の値を格納した要素を含むデータを輝度データとよぶものとする。
 しきい値111a、111b、111cはすべて同じ値に設定されてもよいし、色ごとに異なる値に設定されていてもよい。図15の例では各色についてひとつずつ輝度のしきい値を設定して抽出処理を行っているが、複数の輝度のしきい値を使って抽出処理を行ってもよい。例えば、ふたつの輝度のしきい値b、bを設定し、輝度の値が[b,b]の範囲である部分を抽出してもよい。
 図15の例における輝度のしきい値としては、例えば輝度の最大値の0.7倍~0.8倍の値を設定することができるが、値については特に限定しない。輝度のしきい値の設定は画像における背景部分の色と、食品部分の色に基づいて決めることができる。例えば、食品部分の色が明るい場合には、輝度のしきい値を大きく調整し、食品部分の色が暗い場合には輝度のしきい値を小さく調整することができる。輝度のしきい値の調整値は、利用者が事前に画像処理ソフトウェアなどを使って食品画像における各色の度数分布(ヒストグラム)を参照することによって決めることができる。
 なお、輝度のしきい値(第2しきい値)の具体例については後述する。
 図15では画像中の食品部分の色が背景部分の色より明るい場合を例に説明したため、輝度の大きい側のピークに係る情報を抽出したが、食品と背景部分の色によってはこれとは異なる処理を行ってもよい。例えば、食品の背景部分が白色、黄色、クリーム色、薄い灰色などの明るい色であり、食品が背景部分より相対的に暗い色なのであれば、輝度の小さい側のピークに係る情報を抽出してもよい。この場合、各色の輝度に係る度数分布から、輝度がしきい値より小さい部分の色情報のみを抽出する。
 画像中の背景部分の色は、搬送装置4のコンベヤの色や、撮影装置2の照明部21の光源の選定や設定などによって調整することができる。画像中の食品部分の色は、食品の種類に依存するが、撮影装置2の照明部21の光源の選定や設定などによって調整することが可能である。
 なお、画像処理部12における画像処理で、画像中の食品部分の色や、背景部分の色が置換された場合には、置換後の色に基づいて、抽出する範囲やしきい値を設定すればよい。ステップS102における処理で抽出されたデータ(色情報)は食品の大きさ、形状、位置、方向に係る情報が捨像された、正規化済みのデータであるといえる。
 次に、抽出された色情報(輝度データ)の要素を輝度の値の昇順または降順に整列(ソート)する(ステップS103)。以下ではステップS103に係る処理を、図16を参照しながら説明する。図16は、輝度の昇順に整列した輝度データの例を示している。
 前のステップS102で、度数分布より輝度に基づいて抽出された一部の色情報に係る輝度データは、輝度の値に基づき整列される。図16では、輝度の昇順にソートされた輝度データ113a、113b、113cが示されている。輝度データ113aは抽出された色情報における赤色(R)の輝度の値を格納した要素を含む。輝度データ113bは抽出された色情報における緑色(G)の輝度の値を格納した要素を含む。輝度データ113cは抽出された色情報における青色(B)の輝度の値を格納した要素を含む。
 なお、画像処理部12で赤の輝度から緑の輝度を減算した画像を生成した場合、R-Gに係る輝度データを整列してもよい。もとの画像をHSV色空間に変換し、赤色を抽出した場合には、赤(R)の輝度に係る輝度データが整列されてもよい。
 ステップS103で輝度データを整列すると、輝度の値が同一の色情報は連続して配置され、連なりを形成する。例えば、図16の輝度データ113aは連なり114、115、116を有する。連なり114には、輝度=182の色情報が3つ連続している。連なり115には、輝度=242の色情報が4つ連続している。連なり116には、輝度=243の色情報が3つ連続して配置されている。
 同様に、輝度データ113bには、輝度=243の連なり117がある。輝度データ113bには、輝度=182の連なり118、輝度=241の連なり120、輝度=243の連なり121がある。図16の例では、輝度データの一部しか示されていないため、これらの連なりは例にしか過ぎない。また、検出対象となる食品の種類、背景の色、使用する画像や、しきい値の設定によって異なるパターンの連なりが生ずる。
 なお、図16の例では、色情報を輝度の昇順に整列した輝度データが示されているが、ステップS103では輝度データの色情報を輝度の降順に整列してもよい。入力データ生成部13は整列した輝度データをメモリなどの記憶装置に保存する。
 そして、それぞれの輝度データに対してブロック分割と代表値の計算を行う(ステップS104)。ブロック分割と代表値の計算の処理では、輝度データを複数のブロックに分割し、それぞれのブロックについて輝度の代表値を計算する。代表値の例としては、平均値、モード、メジアン、パワースペクトル加算平均などが挙げられるが、その他の種類の代表値を用いてもよい。以下では、輝度の代表値として平均値を用いた場合を例に説明する。ブロック分割と代表値の計算の処理は、入力データ生成部13に係る説明で述べた、画像に含まれる学習や判定に必要な情報を保持しつつ、入力変数の数をニューラルネットワークの入力層に含まれるユニット数Nに等しい数に減らす処理にあたる。
 ブロック分割と代表値の計算の処理について、図17を参照しながら説明する。図17中段は、輝度データを複数のブロックに分割した例を示している。図17下段は、各ブロックの輝度の平均値を計算した例を示している。
 図17上段には、M個の色情報を有する輝度データ122が示されている。輝度データ122の色情報にはそれぞれ、色情報番号i=1、2、3、・・・、Mが付与されているものとする。図17中段には、X個のブロックに分割された後の輝度データ122aが示されている。図17中段の例では、X=10であるため、輝度データ122aは10個のブロックに分割されている。それぞれのブロックには、ブロック番号j=1、2、3、・・・、10が付与されているものとする。それぞれのブロックは、M/X個の色情報を含んでいる。
 図17中段における輝度データの分割数Xは10であるが、これは一例に過ぎず、分割数Xはこれとは異なる数であってもよい。分割数Xは、ニューラルネットワークの入力層に含まれるユニット数、入力データ生成部13に入力される色(例えばRGB、R-G、R)の数などによって決めることができる。
 輝度データ122aに係るそれぞれのブロックに含まれる色情報について、輝度の平均値を計算すると、図17下段の輝度データ123が得られる。輝度データ123はもとの輝度データ122aをブロックの数に等しい数の要素を有し、輝度の平均値を要素の値とする輝度データに変換したものであるといえる。
 下記の式(1)と使って各ブロックに含まれる色情報に係る輝度の平均値の計算することができる。
Figure JPOXMLDOC01-appb-M000001
ここで、xはブロック内のそれぞれの色情報に係る輝度の値である。式(1)の左辺はブロック番号jに含まれる色情報に係る輝度の平均値である。式(1)の計算はCPUで動作するプログラムにより実行されてもよいし、半導体回路などのハードウェアによって実行されてもよい。
 図17下段の例では、M個の色情報が10個の色情報に集約されている。ステップS104に係る処理はそれぞれの色に係る色情報について実行される。入力データ生成部13にRGBの3色の色情報が入力された場合、赤(R)、緑(G)、青(B)のそれぞれの色情報についてブロック分割と代表値の計算を行う。この例ではRGBの色情報がある場合、画像の色情報は合計30個の色情報(輝度)にまとめられる。
 すなわち、ブロック分割処理では輝度データが複数のブロックに分割され、代表値の計算処理では各ブロックに含まれる要素に格納されている輝度の代表値を計算し、もとの輝度データをブロックの数に等しい数の要素を含み、輝度の代表値を要素の値とする輝度データに変換する処理が実行されているといえる。
 なお、ブロック分割は入力変数の数を絞り込む方法の一例にしか過ぎない。ステップS104ではブロック分割に代わり、線形変換、主成分分析などその手法を使って入力変数の数を減らしてもよい。また、輝度データに含まれる色情報の数がニューラルネットワークの入力層に含まれるユニット数に等しく、入力変数の数を絞り込む必要がない場合にはブロック分割と代表値の計算処理(ステップS104)を省略してもよい。
 最後に、各色に係る輝度データを結合する(ステップS105)。図18は、ステップS105における処理を示している。輝度データ125aは、赤(R)に係る輝度データである。輝度データ125bは、緑(G)に係る輝度データである。輝度データ125cは、青(B)に係る輝度データである。輝度データ125a、125b、125cを結合することにより、入力データ126が生成される。入力データ126は30個の色情報(輝度)を有するため、入力層のユニット数がN=30のニューラルネットワークに入力することができる。
 食品検査装置1による良品/不良品の判定処理を行う前に、同一種類のサンプルの食品を使って学習処理を行う必要がある。以降では、学習に使用される食品をサンプル食品とよぶものとする。図19は、第1の実施形態に係る学習処理のフローチャートである。以下では図19のフローチャートを参照しながら学習部15による学習処理について説明する。
 まず、サンプル食品について複数の良品画像および不良品画像を撮影する(ステップS201)。良品画像とは、良品であると利用者によってラベル付けされたサンプル食品の画像をいう。不良品画像とは、不良品であると利用者によってラベル付けされたサンプル食品の画像をいう。画像をラベル付けする方法とタイミングについては特に問わない。また、以降では学習処理に用いられる画像をサンプル画像とよび、判定処理で使う画像(判定画像)と区別することにする。サンプル画像は良品画像や不良品画像などを含むものとする。
 例えば利用者は撮影装置2でサンプル食品のサンプル画像を撮影した後、表示部18でサンプル画像を確認し、当該サンプル画像に写された食品が良品であると判定した場合には、良品とラベル付けをし、当該サンプル画像に写された食品が不良品であると判定された場合には、不良品とラベル付けすることができる。
 また、複数個のサンプル食品をあらかじめ良品と不良品に分類した後、撮影装置2で撮影してもよい。この場合、プログラムやスクリプトなどを使い、良品のサンプルの集合を撮影しているときは、サンプル画像を良品とラベル付けをし、不良品のサンプルの集合を撮影しているときには、サンプル画像を不良品とラベル付けする。
 サンプル画像における不良品画像として、複数の種類の欠陥や異物(不良モード)を有するサンプル食品の画像を使ってもよい。この場合、サンプル画像をサンプル食品が有する不良モードごとにラベル付けしてもよい。例えば、「不良モード=血合い」、「不良モード=羽の混入」のようなラベル付けを行うことが考えられる。また、不良品画像に写されたサンプル食品の不良モードを分類せずにラベル付けを行ってもよい。この場合、血合いを有するサンプル画像も、羽などの異物が混入しているサンプル画像にも同じ「不良品」のラベルが付与される。
 サンプル画像における不良品画像は、特定の種類の欠陥や異物(不良モード)を有するサンプル食品の画像のみであってもよい。例えば、不良品画像に写されたサンプル食品の不良モードは血合いのみであってもよいし、羽の混入のみであってもよい。ニューラルネットワークの出力層に設けるユニットの種類に基づいて、不良品画像に含める異物や欠陥の種類を決めることができる。
 ニューラルネットワークの出力層に判定困難の反応値を出力するユニットを設ける場合には、判定困難なサンプル画像を用意してもよい。判定困難なサンプル画像とは、食品の欠陥や異物の有無を視覚的に判定できないサンプル画像をいう。判定困難なサンプル画像の例としては、撮影対象領域に判定対象のサンプル食品が充分に写っていない画像、照明や露光による明るさ調整が不適切でサンプル食品が鮮明に写っていない画像などが挙げられる。判定困難なサンプル画像については、「判定困難」とラベル付けをする。
 なお、それぞれのサンプル画像が第2入力データに変換された後も、当該サンプル画像に付与されたラベルは対応する第2入力データに引き継がれるものとする。
 図11上段ならびに図12の画像101、102、103、106は良品画像の例である。図11下段ならびに図12の画像104、105ならびに図13の画像107は不良品画像の例である。
 次に、良品画像および不良品画像について画像処理をする(ステップS202)。画像処理の詳細については、画像処理部12に係る説明で述べた通りである。ステップS202で行う画像処理の種類および内容については特に問わない。ステップS202の処理を省略してもよい。
 そして、それぞれの良品画像および不良品画像(サンプル画像)からニューラルネットワークの学習に使う入力データ(第2入力データ)を生成する(ステップS203)。それぞれのサンプル画像は、ニューラルネットワークへ入力可能な入力データの形式に変換される。サンプル画像から入力データを生成する処理の詳細については入力データ生成部13に係る説明で述べた通りである。以降では特にニューラルネットワークの学習に用いられる入力データを第2入力データと呼び、判定のために検査対象食品を撮影した画像(判定画像)から生成された入力データ(第1入力データ)と区別するものとする。
 サンプル画像から第2入力データを生成したら、すべてのサンプル画像に係る第2入力データが生成されているかを確認する(ステップS204)。まだ入力データの形式に変換されていないサンプル画像がある場合、ステップS203の処理に戻る。すべてのサンプル画像が入力データの形式に変換されている場合、ステップS205の処理に進む。
 複数の良品画像および不良品画像(サンプル画像)に対応する第2入力データに基づき、ニューラルネットワークの学習を開始する(ステップS205)。以下では、学習に用いられるニューラルネットワークについて説明する。
 図20は、3つの反応値を出力するニューラルネットワークの例を示している。図20のニューラルネットワーク150は入力層151、隠れ層152、出力層153の3層を有するニューラルネットワークである。出力層153はユニット153a、153b、153cの3つのユニットを含む。ユニット153aは良品の反応値を出力するユニットである。ユニット153bは不良品の反応値を出力するユニットである。ユニット153cは判定困難の反応値を出力するユニットである。
 ニューラルネットワークは入力層に入力された値が、隠れ層、出力層と伝播され、出力層の反応値が得られる。図21はニューラルネットワークのユニット間の演算処理を示している。図21を参照しながら、ニューラルネットワークの動きを説明する。
 図21には、第m-1層のユニット154a、154b、154cと、第m層のユニット155が示されている。説明のため、図21にはニューラルネットワークの一部のユニットのみが示されているものとする。第m-1層におけるユニット番号はk=1、2、3...である。第m層におけるユニット番号はj=1、2、3...である。
 第m-1層のユニット番号kの反応値をam-1 とすると、第m層のユニット番号jの反応値a は、下記の式(2)を使って求められる。
Figure JPOXMLDOC01-appb-M000002
ここで、W jkは重みであり、ユニット間の結合の強さを示している。b はバイアスである。f(・・・)は活性化関数である。図21および式(2)より、第m層における任意のユニットの反応値は、第m-1層にあるすべてのユニット(k=1、2、3...)の反応値を重み付け加算し、活性化関数の変数として入力したときの出力値であることがわかる。
 次に活性化関数の例について説明する。図22は、正規分布関数を示したグラフである。下記の式(3)は正規分布関数である。正規分布関数はガウス関数の一種である。
Figure JPOXMLDOC01-appb-M000003
ここで、μは平均値であり、正規分布関数が描く釣鐘状のピークの中心位置を示している。σは標準偏差でありピークの幅を示している。式(3)の値は、ピークの中心からの距離のみに依存するため、ガウス関数(正規分布関数)は放射基底関数(radial basis function:RBF)の一種であるといえる。ガウス関数(正規分布関数)は一例であり、これ以外のRBFを使ってもよい。
 図23は、シグモイド関数を示したグラフである。下記の式(4)はシグモイド関数である。シグモイド関数はx→∞の極限で1.0に漸近する。また、x→-∞の極限で0.0に漸近する。すなわち、シグモイド関数は(0.0,1.0)の範囲の値をとる。
Figure JPOXMLDOC01-appb-M000004
なお、活性化関数としてガウス関数やシグモイド関数以外の関数を用いることを妨げるものではない。
 次にニューラルネットワークの学習について説明する。ニューラルネットワークの学習は、所定の判定モードに係る入力データを入力層に入力したら、正しい出力が得られるよう、ユニット間の結合の強さである重みWjkの調整を行う。ニューラルネットワークにおいてある判定モードのラベル付けされた入力データを入力したときに期待される、正しい出力(出力層のユニットの反応値)は教師信号ともよばれる。
 例えば、不良品とラベル付けされた入力データをニューラルネットワーク150に入力したら、教師信号ではユニット153a(良品のユニット)の反応値が0、ユニット153b(不良品のユニット)の反応値が1、ユニット153cの反応値が0となる。また、良品とラベル付けされた入力データをニューラルネットワーク150に入力したら、教師信号ではユニット153a(良品のユニット)の反応値が1、ユニット153b(不良品のユニット)の反応値が0、ユニット153cの反応値が0となる。
 欠陥の有無を視覚的に判定するのが困難なサンプル画像から生成された(判定困難とラベル付けされた)入力データをニューラルネットワーク150に入力したら、教師信号ではユニット153a(良品のユニット)の反応値が0、ユニット153b(不良品のユニット)の反応値が1、ユニット153cの反応値が1となる。
 重みWjkの調整はバックプロパゲーション法(誤差逆伝播法:Back Propagation Method)を使って実行することができる。バックプロパゲーション法では、ニューラルネットワークの出力と教師信号のずれが小さくなるよう、出力層側から順番に、重みWjkを調整する。下記の式(5)は改良型バックプロパゲーション法を示している。
Figure JPOXMLDOC01-appb-M000005
 なお、活性化関数としてガウス関数を用いた場合には重みWjkだけでなく、式(3)のσとμも、改良型バックプロパゲーション法におけるパラメータとして調整対象とする。パラメータσ、μの値を調整することにより、ニューラルネットワークの学習収束を補助する。下記の式(6)はパラメータσについて行われる値の調整処理を示している。
Figure JPOXMLDOC01-appb-M000006
 下記の式(7)はパラメータμについて行われる値の調整処理を示している。
Figure JPOXMLDOC01-appb-M000007
ここで、tは学習回数、ηは学習定数、δは一般化誤差、Oはユニット番号jの反応値、αは感性定数、βは振動定数である。ΔWjk、Δσjk、Δμjkは重みWjk、σ、μのそれぞれの修正量を示す。
 ここでは、改良型バックプロパゲーション法を例に重みWjkやパラメータの調整処理を説明したが、代わりに一般のパックプロパゲーション法を使ってもよい。以降で単にバックプロパゲーション法と述べた場合、改良型バックプロパゲーション法を一般のバックプロパゲーション法の双方を含むものとする。
 パックプロパゲーション法による重みWjkやパラメータの調整回数は一回でもよいし、複数回でもよく、特に限定しない。一般に、テストデータを使ったときの判定精度に基づいてバックプロパゲーション法による重みWjkやパラメータの調整の繰り返しを行うのか否かを判断することができる。重みWjkやパラメータの調整を繰り返すと、判定精度が向上する場合がある。
 上述の方法を使うことにより、重みWjk、パラメータσ、μの値を決定することができる(ステップS206)。重みWjk、パラメータσ、μの値が決まると、ニューラルネットワークを使った判定処理を行うことが可能となる。なお、上述では出力層において不良品の反応値を出力するユニットの数が1つであるニューラルネットワークの学習を例に説明したが、不良品の反応値を出力するユニットが複数あるニューラルネットワークを使ってもよい。例えば、血合い、異物、羽毛など欠陥の種類(不良モード)ごとに反応値を出力するユニットを用意して学習を行ってもよい。
 次に、学習したニューラルネットワークによる良品/不良品判定処理について説明する。図24は、第1の実施形態に係る判定処理のフローチャートである。以下では、図24のフローチャートを参照しながら、処理を説明する。
 まず、検査対象食品を撮影する(ステップS301)。例えば、撮影装置2を使い、搬送装置4によって搬送された食品を撮影する。撮影された画像は食品検査装置1に保存される。以降では、判定処理のために撮影された画像を判定画像とよぶものとする。次に判定画像に対して画像処理をする(ステップS302)。画像処理の詳細については、画像処理部12に係る説明で述べた通りである。ステップS302で行う画像処理の種類および内容については特に問わない。また、ステッS302の処理を省略してもよい。
 そして判定画像から第1入力データを生成する(ステップS303)。判定画像から生成された入力データを特に第1入力データとよぶものとする。第1入力データはニューラルネットワークの入力層のユニット数に等しいN個の要素を有し、ニューラルネットワークへ入力可能な形式となっている。判定画像から入力データを生成する処理の詳細については入力データ生成部13に係る説明で述べた通りである。
 第1入力データが生成されたら、第1入力データをニューラルネットワークへ入力する(ステップS304)。図21および式(2)に係る説明で述べたように、第1入力データは入力層、隠れ層、出力層の順番に伝達される。そして、ニューラルネットワークの出力層における反応値に基づき、良品と不良品の判定を行う(ステップS305)。
 ニューラルネットワークを使った判定処理は、第1入力データの識別空間内における位置を見つける処理と等価である。図25は、活性化関数にガウス関数を使ったときの識別空間の例を示している。活性化関数にガウス関数などのRBFを使うと、識別空間を良品の領域と不良品の領域に分ける識別曲面が閉曲面になる。また、良品と不良品のそれぞれのカテゴリについて、高さ方向の指標を追加することにより、識別空間において各カテゴリに係る領域を局所化することができる。図26は、活性化関数にシグモイド関数を使ったときの識別空間の例を示している。活性化関数がシグモイド関数である場合、識別曲面は開曲面となる。なお、上述のニューラルネットワークの学習処理は、識別空間で識別曲面を学習する処理にあたる。
 図25、図26における不良品の領域にはそれぞれ複数の不良品の分布が示されている。それぞれの不良品の分布は、例えば血合い、羽毛、異物などの欠陥の種類(不良モード)に対応している。
 図27は、ニューラルネットワークの反応値の例を示したグラフである。図27のグラフの縦軸はユニットの反応値を示している。図27のグラフの横軸は入力データ番号を示している。図27のグラフ上側の線は良品の反応値である。良品の反応値は、図20のニューラルネットワーク150におけるユニット153a(良品のユニット)の反応値に相当する。図27のグラフ下側の線は不良品の反応値である。不良品の反応値は、図20のニューラルネットワーク150におけるユニット153b(不良品のユニット)の反応値に相当する。
 図27に示された出力値はいずれも良品の反応値が1.0近傍の値をとり、不良品の反応値が0.0近傍の値をとっているため、いずれの入力データも良品の判定画像に対応していると考えられる。
 図28は、ニューラルネットワークの反応値の例を示したテーブルである。図28のテーブルの各行は、異なる入力データに対応している。テーブルの左側の列には良品の反応値が格納されている。テーブルの右側の列には不良品の反応値が格納されている。図28のテーブルでは、データ161、162を除き、いずれも良品の反応値が1.0近傍の値をとり、不良品の反応値が0.0近傍の値をとっているため、ニューラルネットワークへ入力された入力データのほとんどが良品の判定画像に対応していると推測される。
 一方、データ161、162は良品の反応値が1.0より離れた値をとり、不良品の反応値が0.0から離れた値をとっている。したがって、反応値としてデータ161、162が得られたときにニューラルネットワークへ入力された入力データは、不良の判定画像または判定困難な画像である可能性がある。
 ニューラルネットワークの反応値に基づき、良品と不良品の判定を行う方法の例としては、良品の反応値をしきい値と比較し、良品の反応値がしきい値より大きい場合には、入力データに対応する判定画像を良品の画像と推定する方法がある。しきい値として、例えば0.8、0.9などの値を使うことができるが、これとは異なるしきい値を使ってもよい。
 また、良品の反応値と不良品の反応値の差を求め、値の差をしきい値と比較することによって、入力データに対応する判定画像が良品の画像であるか、あるいは不良品の画像であるかを推定してもよい。この場合、しきい値として例えば0.6、0.7などの値を使うことができるが、これとは異なるしきい値を使ってもよい。
 判定部17は判定結果を表示部18に表示してもよい。図29は、プログラムにより提供されるGUIの例を示している。図29は食品検査装置1で実行されるプログラムによって表示される画面である。図29の画面は、食品検査装置1の操作画面と、判定結果の表示画面を兼ねている。画面の右上には“OK”の文字が表示されているため、プログラムに入力された判定画像は良品の画像と判定されたことがわかる。なお、図29は食品検査装置1のローカルで実行されているアプリケーションの画面であるが、操作画面や判定結果の表示画面は食品検査装置1から離れたリモートのクライアント端末上でウェブブラウザなどの画面として表示されてもよい。この場合、食品検査装置1はクライアント端末のサーバとして動作する。
(第1の変形例)
 第1の実施形態に係るニューラルネットワークは出力層に3つのユニットを有していたが、出力層のユニット数はこれとは異なる数であってもよい。図30は、2つの反応値を出力するニューラルネットワークの例を示している。図30のニューラルネットワーク170は、ニューラルネットワーク150と同様、入力層171、隠れ層172、出力層173の3層を有する。しかし、出力層173には、良品のユニット(ユニット173a)と不良品のユニット(ユニット173b)があるが、判定困難な反応値を出力するユニットなど、他のユニットを備えていない。
 (第2の実施形態)
 第1の実施形態に係る入力データ生成部は、画像(サンプル画像および判定画像)の各色について、各ピクセルにおける輝度の度数分布を求め、度数分布の一部の輝度情報(色情報)である輝度データを抽出し、輝度データを輝度の値に基づき整列した後にブロック分割と代表値の計算処理を行っていた。入力データ生成部が行う処理はこれとは異なっていてもよい。第2の実施形態に係る入力データでは、はじめに検査対象食品を撮影した判定画像を複数の領域に分割し、各領域に含まれるピクセルの輝度情報に係る輝度の代表値を計算し、各領域における代表値を格納した要素を含む輝度データを生成する。すなわち、入力データ生成部は画像に対して領域分割処理と代表値の計算処理を行う。
 図31は、第2の実施形態における画像のピクセルと領域分割処理の対応関係の例を示している。本実施形態に係る入力データ生成部は、画像を複数の領域に分割する。領域201は、入力データ生成部によって生成された領域の一例である。図31では、画像200が3×3ピクセルのサイズの領域に分割されているが、領域の大きさについては特に限定しない。そして、各領域に含まれるピクセルの色情報における赤色(R)の輝度の代表値、緑色(G)の輝度の代表値、青色(B)の輝度の代表値を計算する。代表値の例としては、平均値、モード、メジアン、パワースペクトル加算平均などが挙げられるが、その他の種類の代表値を用いてもよい。
 なお、以降の説明では輝度情報として赤色、緑色、青色のすべての色に係る色情報を使い、輝度の代表値を計算した場合を例に説明するが、必ずすべての色について輝度の代表値を計算しなくてもよい。例えば、一部の色について輝度の代表値を計算してもよいし、いずれかの色に限り輝度の代表値の計算を行ってもよい。また、各ピクセルの赤色の輝度から緑色の輝度を減算した画像を使った場合には、輝度情報として明るさ情報を使って輝度の代表値を計算してもよい。第1の実施形態と同様、グレースケールの画像や一部の色のみを抽出した画像など画像処理後の画像を使ってもよい。
 図31に示した領域分割処理と代表値の計算処理を行うことにより、色情報の数を減らし、ニューラルネットワークに入力可能な要素数Nを有する入力データを生成することができる。すなわち、領域分割処理では画像を複数の領域に分割し、代表値の計算処理では各領域に含まれるピクセルの輝度情報に係る輝度の代表値を計算し、各領域における輝度の代表値を要素の値とする輝度データを生成しているといえる。次に、第2の実施形態に係る食品検査装置が実行する全体的な処理について述べる。
 図32は、第2の実施形態に係る学習処理のフローチャートである。以下では、図32のフローチャートを参照しながら処理を説明する。
 最初に、良品画像および不良品画像(サンプル画像)をそれぞれ複数枚、撮影する(ステップS401)。ステップS401で実行される処理は、図19のステップS201で実行される処理される処理と同様である。次に、サンプル画像について画像処理をする(ステップS402)。ステップS401で実行される処理は、図19のステップS202で実行される処理される処理と同様である。ステップS401の処理を省略してもよい。
 そして、サンプル画像の各色(RGB)について領域分割を行い、領域ごとにRGBの輝度の代表値を計算する(ステップS403)。ステップS403で実行される処理の詳細は、図31に係る説明で述べた通りである。領域分割が行われたら、各領域に係る輝度の代表値を色(RGB)ごとに抽出する(ステップS404)。これにより、R(赤)に係る輝度の代表値を要素の値としたデータ、G(緑)に係る輝度の代表値を要素の値としたデータ、B(青)に係る輝度の代表値を要素の値としたデータが得られる。本実施形態では、輝度の代表値を要素の値としたデータを輝度データとよぶものとする。ステップS404の処理により、色ごとの輝度データが生成される。
 次に、各色(RGB)の輝度データの要素を輝度の値の昇順または降順に整列する(ステップS405)。各色の輝度データが整列されたら、輝度データを結合し、第2入力データを生成する(ステップS406)。なお、複数の色について輝度データを生成していない場合には、ステップS406の処理を省略してもよい。そして、すべてのサンプル画像について第2入力データが作成されたか否かを確認する(ステップS407)。まだ第2入力データに変換されていないサンプル画像が存在する場合には、当該サンプル画像についてステップS403以降の処理を実行する。すべてのサンプル画像が第2入力データに変換されている場合、ステップS408の処理に進む。
 第2入力データの生成が完了したら、複数の良品画像および不良品画像(サンプル画像)に対応する要素数Nの第2入力データに基づき、ニューラルネットワークの学習を開始する(ステップS408)。そして、学習により重みWjk、パラメータσ、μの値を決定する(ステップS409)。ステップS408、S409で実行される処理は、第1の実施形態に係るニューラルネットワークの学習処理と同様である。
 図33は、第2の実施形態に係る判定処理のフローチャートである。以下では、図33のフローチャートを参照しながら、処理を説明する。
 まず、検査対象食品を撮影する(ステップS501)。ステップS501の処理は図24のステップS301に係る処理と同様である。次に、撮影した判定画像に対して画像処理をする(ステップS502)。ステップS502の処理は図24のステップS302に係る処理と同様である。ステップS502の処理は省略してもよい。
 そして、判定画像の各色(RGB)について領域分割を行い、領域ごとにRGBの輝度の代表値を計算する(ステップS503)。ステップS503の処理は、図32のステップS403に係る処理と同様である。領域分割が行われたら、各領域に係る輝度の代表値を色(RGB)ごとに抽出する(ステップS504)。これにより、色ごとに、輝度の代表値を要素の値とする輝度データが得られる。次に、各色(RGB)の輝度データの要素を輝度の値の昇順または降順に整列する(ステップS505)。各色の輝度データが整列されたら、輝度データを結合し、第1入力データを生成する(ステップS506)。
 判定画像を要素数Nの第1入力データに変換したら、当該第1入力データをニューラルネットワークへ入力する(ステップS507)。そして、ニューラルネットワークからの出力に基づき、良品と不良品の判定を行う(ステップS508)。食品の判定処理は、第1の実施形態に係るニューラルネットワークを用いる場合と同様である。
 図32、図33のフローチャートでは、画像について領域分割を行ってから、色ごとに要素を整列した輝度データを結合し、第1入力データまたは第2入力データを生成していた。ただし、これとは異なる方法により第1入力データと第2入力データの生成を行ってもよい。例えば、本実施形態に係る画像の領域分割を行った後に、第1の実施形態で行った輝度の度数分布の一定範囲を抽出する処理を実行して輝度データを生成してもよい。また、輝度データに対して第1の実施形態で行ったブロック分割と代表値の計算処理を実施し、使用するピクセルに係る色情報(輝度)の数を絞り込んでもよい。このような処理を行うことにより、撮影された画像の解像度が高い場合(例えば、フルHD、4K、8K、またはそれ以上のピクセル数など)にもピクセルに係る色情報(輝度)が格納された要素の数をニューラルネットワークの入力層のユニット数Nに等しい数に減らすことができる。
 図34は、ひとつの反応値を出力するニューラルネットワークの例を示している。図34のニューラルネットワーク180は、上述の各ニューラルネットワークと同様、入力層181、隠れ層182、出力層183の3層を有する。ただし、出力層には良品のユニットである、ユニット183aがあるだけで、他のユニットが存在しない。このように、出力層のユニット数をひとつにしてもよい。ニューラルネットワーク180を使用する場合、ユニット183aの反応値をしきい値と比較することにより、良品または不良品の判定を行う。なお、ニューラルネットワーク180は一例であり、出力層のユニット数がこれより多くてもよい。
 図35は、識別性能の結果を示したテーブルである。図35のテーブル上段は、第1の実施形態に係るニューラルネットワーク(NN)を使ったときの識別性能である。図35のテーブル下段は、第2の実施形態に係るニューラルネットワーク(NN)を使ったときの識別性能である。それぞれの欄に格納された値は判定の成功率(識別性能)をパーセントで示したものである。図35に格納された判定の成功率は、いずれも試験的に1回の学習を行わせたニューラルネットワークを使った場合の値である。したがって、ニューラルネットワークの学習を継続することにより、判定の成功率が図35より改善する可能性がある。
 (撮影時に使用する光源の選定)
 サンプル画像および判定画像を撮影するときに使用する光源の種類は、検査対象とする食品の種類、検出対象とする欠陥や異物の種類などに応じて決定することができる。以下では食品検査システムで使用する光源の選定方法について説明する。
 一般に、物質に対して電磁波を照射すると、物質の種類によって異なる反応が得られる。例えば、物質によって吸収する電磁波、反射する電磁波、蛍光が発生する電磁波の波長(周波数)は異なる。そこで、検査対象とする食品、検出対象とする欠陥や異物に対して分光蛍光スペクトル分析を行い、強い反応を示す電磁波の波長を調べることができる。分光蛍光スペクトル分析は例えば、分光蛍光光度計を使うことによって行うことができる。
 図36は、光源の種類による画像の見え方の違いを示している。図36左側は、可視光の光源を使って撮影した鶏肉の画像を示している。図36左側は、紫外線光源を使って撮影した鶏肉の画像を示している。可視光の光源を使った場合、可視光に照らされた異物の色が鶏肉の色と類似している場合、異物の検出が難しくなることがある。一方、紫外線光源を使った場合、蛍光が発生するため、羽など異物の部分が周囲の鶏肉から見分けやすくなることがある。図36左側の丸で囲まれた部分は、蛍光によって周囲から浮きあがって見える鶏の羽を示している。ただし、鶏の皮からも蛍光が発生し、画像では羽と類似した色に見えるため、色彩の違いのみを基準として使って異物を選別するのは難しい。
 図37は、鶏の各部位における分光蛍光スペクトル分析の結果を示している。図37には、鶏の皮、鶏の羽、鶏の肉、血合いに対する分光蛍光スペクトル分析の結果が示されている。
 図38は、分光蛍光スペクトル分析における羽と皮の差分信号を示している。図38は、羽と皮の差分信号のスペクトルを三次元グラフに表したものである。図38の白い丸で囲まれた部分は、蛍光が発生するピークを示している。上側の丸は、波長375nmの電磁波で励起を行ったときに、発生する蛍光には波長435nmのピークがあることを示している。下側の丸は、波長205nmの電磁波で励起を行ったときに、波長405nmのピークがあることを示している。
 図38の結果より、異物として羽を検出するときに使用する光源とバンドパスフィルタの特性を決定することができる。波長375nmの紫外線を発生する光源を使うと、羽の識別がしやすいことがわかる。バンドパスフィルタとして、波長435nm近傍の電磁波を選択的に透過させるものを使うと、羽の検出がしやすくなることがわかる。
 (第3の実施形態)
 第1の実施形態では、食肉の血合いを検出する場合を例に説明したが、本発明に係る食品検査方法を用いてその他の欠陥や異物を検出してもよい。第3の実施形態では、鶏肉の異物として羽の有無を検査する場合を例に説明する。
 上述のように、鶏の羽に紫外線を照射すると、蛍光が発生するため、周囲の鶏肉から浮きあがって見えるようになる。しかし、羽を高い精度で検出可能な画像を撮影するためには、撮影条件を調整する必要がある。図39上段は、カラーフィルタを通さずに撮影された鶏肉の画像を示している。図39上段では白い楕円で囲まれた範囲内に羽の一部がある。図39上段を見ると羽のある箇所に、色がやや薄い筋があるものの、不鮮明である。羽の部分より、皮のある部位や凹凸のある部位の方が高い輝度であり鮮明である。たとえ紫外線を照射したとしても、カラーフィルタを通さずに撮影をすると、画像中の羽の識別が容易になるとは限らないことがわかる。
 次に、カラーフィルタを通して画像を撮影したときの結果をみる。図39中段は、ブルーフィルタを通して得られた画像の例を示している。図39中段の画像は、図39上段の画像と同一の鶏肉を撮影したものである。図39中段でも、白い楕円に囲まれた範囲内に羽の一部がある。図39中段の画像は皮のある部位や凹凸のある部位の輝度は抑えられているが、羽のある箇所の輝度も低下しており、羽がぼやけている。したがって、ブルーフィルタを通して画像を撮影しても羽の識別が容易になるとは言い難い。
 図39下段は、グリーンフィルタを通して撮影された画像の例と示している。図39下段の画像は、図39上段および図39中段の画像と同一の鶏肉を撮影したものである。図39下段でも、白い楕円に囲まれた範囲内に羽の一部がある。図39下段の画像では羽のある箇所が鮮明に現れており、鶏肉の他の部位との識別がしやくなっているといえる。本実施形態に係る撮影装置は、紫外線光源を使い、グリーンフィルタを通して画像の撮影を行うものとする。
 次に、本実施形態に係る撮影装置について述べる。図40は、異物である羽を選別するための撮影装置の構成例を示している。以下では、図40を参照しながら撮影装置2bについて説明する。
 図40は、撮影装置2bの断面図である。撮影装置2bの筐体に係る構造は、図10に示された撮影装置2aの構造と同様である。撮影装置2bは、照明部21bと、カメラ22bと、フィルタ22cと、センサ23とを備えている。
 照明部21bは、紫外線を放射する装置である。照明部21bにおける光源の例としては、紫外線LED、ブラックライト、各種の蛍光ランプなどがあるが、種類については特に問わない。異物として鶏の羽を検出する場合、光源として、例えばスペクトルに波長375nmのピークがある紫外線光源を使うことができる。紫外線光源として、スペクトルに波長365nm~400nmの範囲にピークがあるものを用いることが望ましい。ただし、光源のスペクトルについては特に問わない。検出対象の食品や異物に応じて異なるスペクトルを有する光源を選ぶことができる。紫外線成分だけでなく、可視光成分も含む光源を用いてもよい。図40には、撮影装置2bの筐体内下部に複数の照明部21bが設置されているが、撮影装置2bの下方の撮影領域に紫外線を照射できるのであれば、光源の数と配置については特に問わない。
 カメラ22bは、照明部21bから放射された紫外線が照射された食品を撮影する。カメラ22bの構造や機能は、図10に示されたカメラ22と同様である。
 カメラ22bの前面にはフィルタ22cが設けられている。フィルタ22cは、カメラ22bによって撮影される画像によって異物の識別を容易にする機能を備える。異物として鶏の羽を検出する場合、フィルタ22cとして緑色のグリーンフィルタを用いることができる。グリーンフィルタとは、例えば波長520nm近傍の電磁波を選択的に透過させる光学フィルタである。グリーンフィルタはフィルタ22cの一例であり、これと異なる種類のフィルタを用いることを妨げるものではない。
 センサ23は、搬送装置4bによって、撮影装置2bの下方に食品が搬送されたことを検出する。センサ23の例としては、レーザセンサ、赤外線センサ、超音波センサ、各種の光電センサ、画像センサ、重量センサなどが挙げられるが、センサの種類については特に問わない。
 なお、第2の実施形態に係る食品検査システムのその他の構成要素の機能と構成は、第1の実施形態に係る食品検査システムと同様である。
 (第4の実施形態)
 上述の実施形態に係る食品検査システムは、食品において欠陥や異物などの不良の有無を判定していた。本発明に係る食品検査システムは、さらに食品における欠陥や異物の位置を特定してもよい。食品における欠陥や異物の位置を特定すると、ロボットまたは手作業によって不良箇所または異物の除去などを行うことができる。
 上述のように、本発明に係る食品検査装置は、複数のサンプル画像をそれぞれ要素数Nの第2入力データに変換後、第2入力データを入力層のユニット数がNのニューラルネットワークに入力して、学習を行っていた。例えば良品、不良品、判定困難な場合を識別するためには、複数の良品のサンプル画像から生成された第2入力データと、複数の不良品のサンプル画像から生成された第2入力データと、判定困難なサンプル画像から生成された第2入力データのそれぞれを使って学習を行う必要があった。
 第4の実施形態に係る食品検査システムは、複数の良品とラベル付けされたサンプル画像(良品画像)から生成された第2入力データの集合を使い、判定画像が不良品と判定された場合に欠陥または異物がある位置をたどる(バックトレース)することができる。食品検査装置の入力データ生成部は、良品のサンプル画像から生成された第2入力データにおける輝度の分布を生成することができる。以下では、第2入力データにおける輝度の分布の例を説明する。
 図41は良品画像から生成された第2入力データにおける輝度の分布の例を示している。図41のグラフの横軸は、入力データにおける要素の番号k=1、2、3、・・・、Nを示している。図41の例では、要素番号の昇順に、R(赤)、G(緑)、B(青)の要素が配置されている。入力データ生成部が第1の実施形態のブロック分割処理または第2の実施形態の領域分割処理と代表値の計算処理を行う場合、それぞれの要素の値は複数のピクセルの集合から計算された輝度の値となる。図41のグラフの縦軸は、輝度を示している。
 図41のグラフ上に、複数の良品のサンプル画像に相当する第2入力データの輝度をすべてプロットすると、輝度の値がグラフ上の一定範囲に分布する。図41の分布194、195、196はこのようにして得られた良品のサンプル画像から生成された第2入力データに係る輝度の分布である。後述するように、判定画像から生成された第1入力データの輝度を、良品のサンプル画像から生成された第2入力データの輝度分布と比較すると、欠陥または異物の部位に相当するピクセルのグループを特定することができる。
 図41のグラフ上に示された破線191、192、193は判定画像から生成された第1入力データの輝度を示している。G(緑)の輝度である破線192は分布195の範囲内に含まれている。同様に、B(青)の輝度である破線193は分布196の範囲内に含まれている。一方、R(赤)の輝度である破線191の一部は、分布194の範囲から外れている。破線191のうち、分布194の範囲から外れた区間は、第1入力データにおける欠陥や異物の存在が疑われる要素番号に対応している。このような要素を分布外要素kとよぶものとする。kはひとつの要素である場合もあれば、複数の要素を含む場合もある。
 入力データの生成時に第1の実施形態で説明したブロック分割と代表値の計算処理が行われている場合、それぞれの分布外要素kは欠陥や異物の存在が疑われるブロックの番号jに相当している。入力データの生成時に第2の実施形態で説明した領域分割と代表値の計算処理が行われている場合、それぞれの分布外要素kは欠陥や異物の存在が疑われる画像中の領域に相当している。食品検査装置が第1入力データ中の分布外要素kに係る情報から、もとの判定画像のピクセルの座標位置を求めるためには、第1入力データの生成処理においてもとの判定画像のピクセルと要素番号との間の対応関係を保持する必要がある。
 そこで、第4の実施形態に係る入力データ生成部は、判定画像を第1入力データに変換するときに、どのピクセルに係る色情報を使ってブロックを生成したのかを示すデータを記憶部に保存する。記憶部は、RAM、DRAMなどの揮発性メモリでも、NAND、MRAM、FRAMなどの不揮発性メモリでもよい。また光ディスク、ハードディスク、SSDなどのストレージ装置でもよい。色情報を取得したピクセルとブロックの対応関係は、例えばプログラムがポインタテーブルや2次元のテーブルなどのメタデータの形式で保存することができる。また、テキスト形式、CSV形式、XML形式、JSON形式などのログファイルを使って対応関係を保存してもよい、このような対応関係を保持したデータを、バックトレース用データとよぶものとする。
 バックトレース用データでは判定画像中のピクセルを、(x、y)座標など2次元の座標情報を使って特定してもよいし、他の種類の識別子により特定してもよい。入力データ生成部で生成された入力データの要素は、例えば要素の番号kにより特定することができるが、他の種類の識別子を使って特定してもよい。なお、第1の実施形態に係る入力データ生成部のように、判定画像が複数回の変換処理を経た後に各ブロックの代表値を計算する処理が実行される場合には、変換処理の各ステップにおいてピクセルの座標位置と要素またはブロックの対応関係を保持したバックトレース用データを生成し、保存する。これによって、第1入力データにおける要素の番号kがもとの判定画像中のどのピクセルの座標位置に対応しているかを追跡することができる。
 なお、第1の実施形態のように輝度データにブロック分割と代表値の計算処理を行う前に色情報(輝度)を昇順または降順にソートしている場合、分布外要素kに相当するブロックに係る輝度の平均値(代表値)の計算に使われたピクセルは判定画像上に拡散している可能性がある。このため、判定画像上の当該ピクセルの位置をマーキングした画像に対してブロブ解析などを行い、画像中に当該ピクセルが隣接して分布している領域や、高い密度で分布して密度で分布している領域を特定し、判定画像中の欠陥や異物の位置を推定してもよい。
 図42は、もとの判定画像へのバックトレース結果の例を示している。もとの判定画像を第1入力データに変換するときに生成したバックトレース用データを参照すると、図41のグラフの区間197(分布外要素k)が、画像210における領域211、212、213に含まれるピクセルに対応していることがわかる。入力データ生成部でブロック分割(領域分割)処理と代表値の計算処理が行われている場合、判定画像中で欠陥や異物の存在が疑われるブロック(領域)に対応する複数のピクセルの座標位置を特定できる。なお、入力データ生成部がブロック分割(領域分割)処理と代表値の計算処理を行わない場合、判定画像中で欠陥や異物の存在が疑われるそれぞれのピクセルの座標位置を特定することができる。
 撮影された判定画像における欠陥や異物の存在が疑われるピクセルに係る情報を使って、検査対象食品における問題箇所または異物の除去を行うことができる。例えば、プロジェクタを使い、当該検査対象食品上に欠陥や異物の存在が疑われる部位に記号や色などをプロジェクションマッピングしてもよい。また、当該検査対象食品の欠陥や異物の存在が疑われる部位を記号や色などでマーキングした画像を生成し、ディスプレイに写し出してもよい。これにより、作業員はプロジェクションマッピングの結果や、表示内容を確認し、手作業で問題箇所や異物の除去作業を行うことができる。
 また、撮影された判定画像における欠陥や異物の存在が疑われるピクセルの座標位置などの情報を物理的な座標情報に変換し、ロボットやレーザなどによる自動的な問題箇所や異物の除去作業を行ってもよい。
(度数分布におけるしきい値)
 図15の例ではピクセルの輝度に係る度数分布を生成し、度数分布から輝度が一定範囲の値にあるピクセルの輝度情報(色情報)を抽出する方法について説明した。このとき、抽出する輝度の範囲を決めるため、輝度のしきい値(第2しきい値)を使っていた。以下では、鶏肉の血合い検出を行う場合について、第2しきい値の設定値と学習・判定の結果を示す。
 図43上段は、輝度が上位10%の値をとる色情報を抽出するよう、第2しきい値を設定した例を示している。図43上段のヒストグラムの横軸は輝度であり、縦軸はそれぞれの輝度の度数(頻度)である。図43上段のヒストグラムの最も左側の範囲が背景部分のピクセルに係る色情報に相当する。一方、図43上段のヒストグラムの最も右側の範囲が血合い部分のピクセルに係る色情報に相当する。図43上段の例では、破線が第2のしきい値に対応している。ヒストグラムの背景部分の範囲と、血合い部分の範囲にはいずれもピークが現れている。
 なお、図43上段の例では、256×256=65536ピクセル、ピクセル当たりの色情報が24ビットのカラー画像から輝度のヒストグラムを生成している。
 図43上段の例では、275枚の画像に基づき2万回の学習を行っても学習が収束せず、ニューラルネットワークの学習が終わらなかった。輝度が上位10%の値をとる色情報を抽出すると、判定画像中の鶏肉や血合いの部分だけでなく、背景部分のうち輝度が高いピクセルまでも含まれてしまう。したがって、鶏肉部分と背景部分に係る情報の分離が不十分になっていると推測される。
 図43中段は、輝度が上位4%の値をとる色情報を抽出するよう、第2しきい値を設定した例を示している。図43中段のヒストグラムの横軸は輝度であり、縦軸はそれぞれの輝度の度数(頻度)である。図43中段では、図43上段の例で使用した判定画像と同一の判定画像を使用しているため、同一の形状のヒストグラムが示されている。
 図43中段の例では、良品の判定画像を入力した場合の正解率が74%、不良品の判定画像を入力した場合の正解率が96%となった。輝度が上位4%の値をとる色情報を抽出すると、良品の判定画像を入力した場合の正解率が低いことがわかる。
 図43下段は、輝度が上位2%の値をとる色情報を抽出するよう、第2しきい値を設定した例を示している。図43下段のヒストグラムの横軸は輝度であり、縦軸はそれぞれの輝度の度数(頻度)である。図43下段では、図43上段および図43中段の例で使用した判定画像と同一の判定画像を使用しているため、同一の形状のヒストグラムが示されている。
 図43下段の例では、良品の判定画像を入力した場合の正解率が88%、不良品の判定画像を入力した場合の正解率が97%となった。輝度が上位2%の値をとる色情報を抽出すると、血合い部分を含む色情報を効果的に選択できることがわかる。なお、輝度が上位2%の値をとる色情報は、判定画像の全65536ピクセルのうち、2%の1310ピクセルに相当し、判定画像中の血合い部分に係る情報を抽出するのに充分な量であると考えられる。
 なお、ここで述べた第2しきい値の設定方法は一例であり、検査対象とする食品、欠陥、異物、背景の色、撮影環境などに応じて異なる設定値を使用することができる。
 本発明に係る食品検査方法を適用することにより、食品原材料の正確かつ迅速な選別を実現し、高品質な食品の生産とコストの削減を行うことができる。ニューラルネットワークの学習においては改良バックプロパゲーション法を用いることにより、多層でないニューラルネットワークであっても高精度の判定処理が実現される。これにより、学習や判定にかかる負荷が軽減され、高性能な計算機を使わなくてもリアルタイムの識別や選別を行うことができる。
(第5の実施形態)
 上述の各実施形態では、高速かつ高精度な食品の欠陥や異物(不良品)の検出を行う方法について説明した。本発明を使って良品を複数のカテゴリに分類し、それぞれの良品の特性に適合した調理工程を選択できるようにしてもよい。同様に不良品も複数のカテゴリに分類してもよい。また、食品の産地ごとに、特性や欠陥・異物の種類のデータを集計し、食品の最適な調理方法や品質面における課題などを分析できるようにしてもよい。第5の実施形態では、良品と不良品をそれぞれ複数のカテゴリに分類した場合について述べる。
 図44は、複数の良品のカテゴリおよび不良品のカテゴリに対応した反応値を出力するニューラルネットワークの例を示している。図44のニューラルネットワーク220は上述の各実施形態と同様、入力層221、隠れ層222、出力層223の3層を含む。一方、出力層223には複数のカテゴリのそれぞれ対応したユニットが設けられている。
 図44の例では、良品のカテゴリごとに、良品ユニット224(良品#1のユニット)、良品ユニット225(良品#2のユニット)、良品ユニット226(良品#Pのユニット)の複数の良品ユニットが示されている。ここで、Pは良品ユニットの個数であるものとする。以下はP=3の場合を説明する。例えば、良品#1はから揚げとして調理すると、良好な食味が得られる良品のカテゴリであるとする。良品#2は、あぶり焼き(グリルチキン)として調理すると、良好な食味が得られる良品のカテゴリであるとする。良品#3は、蒸し鶏として調理すると、良好な食味が得られる良品のカテゴリであるとする。
 例えば、肉の部分が一定の色彩であり、脂肪分が混入した鶏肉を使ってから揚げをつくると、良好な食味が得られる場合、該当する要件を満たした鶏肉に係る複数のサンプル画像から第2入力データを生成し、良品#1のユニットの反応値を1、その他のユニットの反応値を0とし、ニューラルネットワーク220の学習を行う。一定割合の脂肪分を有する鶏肉を使ってあぶり焼きをつくると良好な食味が得られる場合、該当する要件を満たした鶏肉の複数のサンプル画像から第2入力データを生成し、良品#2のユニットの反応値を1、その他のユニットの反応値を0とし、ニューラルネットワーク220の学習を行う。脂肪分の少ない鶏肉を使って蒸し鶏をつくると良好な食味が得られるのであれば、該当する要件を満たした鶏肉の複数のサンプル画像から第2入力データを生成し、良品#3のユニットの反応値を1、その他のユニットの反応値を0とし、ニューラルネットワーク220の学習を行う。
 上述のようなニューラルネットワークの学習を行うと、これまで熟練した作業員が経験側から判別していた鶏肉の最適な調理用途を装置によって自動的に判定できるようになる。なお、上述の良好な食味が得られる鶏肉の要件は例であり、異なる要件を使ってもよい。また、ここでは最適な調理用途に基づいて良品のカテゴリを定義しているが、時間経過による食味変化の少なさ、時間経過による色の変化の少なさ、冷凍による変性の少なさなどその他の基準に基づく良品のカテゴリを定義してもよい。
 このように、本実施形態に係るシステムでは、判定モードは複数の良品のカテゴリを含み、ニューラルネットワークの出力層は、いずれかの良品のカテゴリに係る反応値を出力する良品ユニットを複数含んでいる。
 また、図44のニューラルネットワーク220の出力層には、不良品のカテゴリごとに、不良品ユニット227(不良品#1のユニット)、不良品ユニット228(不良品#2のユニット)、不良品ユニット229(不良品#Qのユニット)が示されている。ここで、Qは不良品ユニットの個数である。以下ではQ=2の場合を説明する。例えば、不良品#1は、血合いを有する鶏肉に係る不良品のカテゴリである。不良品#2は、異物として羽を含む鶏肉に係る不良品のカテゴリである。これらの不良品のカテゴリは例であり、その他の欠陥や異物に係る不良品のカテゴリを定義してもよい。
 血合いを有する鶏肉が写った複数のサンプル画像から第2入力データを生成し、不良品#1のユニットの反応値を1、その他のユニットの反応値を0とし、ニューラルネットワーク220の学習を行う。異物として羽を含む鶏肉が写った複数のサンプル画像から第2入力データを生成し、不良品#2のユニットの反応値を1、その他のユニットの反応値を0とし、ニューラルネットワーク220の学習を行う。
 このように、本実施形態に係るシステムでは、判定モードは複数の不良品のカテゴリを含み、ニューラルネットワークの出力層は、いずれかの不良品のカテゴリに係る反応値を出力する不良品ユニットを複数含んでいる。
 同様に、図44のニューラルネットワーク220の出力層には、その他のユニット230、231、232が示されている。その他のユニットの個数はRであるものとする。以下ではR=1の場合を説明する。その他のユニットのカテゴリの例としては判定困難な場合が挙げられるが、その他のカテゴリであってもよい。例えば、同一の搬送装置(コンベヤ)で複数の種類の食品が搬送される場合には、別の種類の食品に係る反応値を出力してもよい。これにより、食品の種類の分類や仕分け作業を行うことができる。
 検査対象画像から第1入力データを生成し、第1入力データを出力層に複数の良品ユニットおよび複数の不良品ユニットを有するニューラルネットワーク(例えば、図44)に入力すると、それぞれのユニットの反応値が得られる。また、複数の良品ユニットまたは不良品ユニットの反応値に基づいて、検査対象画像に写された食品の良品のカテゴリまたは不良品のカテゴリが推定される。
 検査対象食品の判定モードを推定したときに、複数の良品ユニットに係る反応値を記憶装置に保存してもよい。検査対象食品が良品であると推定されたのであれば、推定された良品のカテゴリを記憶装置に保存してもよい。同様に、複数の不良品ユニットに係る反応値を記憶装置に保存してもよい。検査対象食品が不良品であると推定されたのであれば、推定された不良品のカテゴリを記憶装置に保存してもよい。また、その他のユニットに係る反応値を保存してもよいし、判定困難なのであれば、その旨を記憶装置に保存してもよい。上述の記憶部と同様、記憶装置の種類と配置については特に問わない。
 図45は、産地ごとの良品のカテゴリおよび不良品のカテゴリの比率を示している。複数の検査対象食品について、推定された良品のカテゴリ、不良品のカテゴリ、その他のカテゴリの件数をそれぞれ集計し、カテゴリごとの構成比率を計算すると、図45のような統計データを格納したテーブルが得られる。図45のテーブルのそれぞれの行は、検査された鶏肉の産地に対応している。図45では、鶏肉の産地として、A工場、B工場、C工場、D農場、E社、F社が示されている。
 図45のそれぞれの列は、推定されたカテゴリに対応している。左から、から揚げに向いた特性を有する鶏肉(良品#1)、あぶり焼きに向いた特性を有する鶏肉(良品#2)、蒸し鶏に向いた特性を有する鶏肉(良品#3)、血合いを有する鶏肉(不良品#1)、異物として羽を含む鶏肉(不良品#2)、判定困難な場合(その他#1)のカテゴリが示されている。図45の統計データでは、各カテゴリの構成比率がパーセントで示されている。
 図45を参照すると、A工場およびF社から供給される鶏肉には蒸し鶏に向いた特性を有するものの比率が高く、B工場およびD工場から供給される鶏肉にはあぶり焼きに向いた特性を有するものの比率が高いことがわかる。C工場から供給される鶏肉にはから揚げに向いた特性を有するものの比率が高いことがわかる。E社から供給される鶏肉には、欠陥として血合いを含むものの確率が比較的高く、D農場から供給される鶏肉には異物として羽を有するものの確率が比較的高いことがわかる。
 このような集計や計算を行うことにより、それぞれの産地から供給される鶏肉の特性や品質を定量的に評価し、それぞれの産地に係る供給者に対してフィードバックを行うことができる。例えば、欠陥や異物を有する鶏肉の確率が高い場合には、供給者に改善を求めたり、鶏肉の加工工程の見直しを行ったりすることが考えられる。図45の統計データを使って、から揚げ、あぶり焼き、蒸し鶏などの生産ラインに供給する鶏肉の産地を決定してもよい。図45の統計データは一例であり、これとは異なる方法で取得したデータを加工してもよい。
 食肉について推定された良品のカテゴリに基づき、食肉に対して行う調理工程を選択してもよい。図46は、良品のカテゴリごとに異なる調理工程を選択するシステムの例を示している。
以下では、鶏肉に対して適用した場合を例に、第5の実施形態に係るシステムを説明する。
 図46は、本実施形態に係るシステムを平面視したときの構成例を示した平面図である。図46では、搬送装置4cが複数の鶏肉を図46の下方向に搬送している。搬送装置4cは、例えばベルトコンベヤであるが、その他の種類の搬送装置であってもよい。搬送されているそれぞれの鶏肉に係る良品のカテゴリ(判定モード)は、搬送装置4cの上流側に設置された食品検査システム(図示せず)により推定されているものとする。本実施形態に係る食品検査システムの構成と機能は、使用するニューラルネットワークと学習方法の違いを除けば、上述の各実施形態と同様である。また、不良品と推定された鶏肉は搬送装置4cの上流側で取り除かれているか、欠陥や異物が除去されているため、図46に示された鶏肉81~84はすべて良品である。
 食品検査システムで鶏肉81の良品のカテゴリ(判定モード)は、良品#3(蒸し鶏向き)と推定されている。このため、仕分け装置3bはセンサ24により搬送装置4c上に鶏肉81が搬送されたことを検出したら、アーム31bを動かし、搬送装置4c上の鶏肉81を搬送装置4d上へ押し出す。搬送装置4dは図46の左方向に動いている。搬送装置4dは鶏肉81を蒸し鶏に係る調理工程に搬送する。そして、鶏肉81は次の工程で蒸し鶏として調理される。
 食品検査システムで鶏肉83の良品のカテゴリ(判定モード)は、良品#2(あぶり焼き向き)と推定されている。このため、仕分け装置3cはセンサ25により搬送装置4c上に鶏肉83が搬送されたことを検出したら、アーム31cを動かし、搬送装置4c上の鶏肉83を搬送装置4e上へ押し出す。搬送装置4eは図46の右方向に動いている。搬送装置4eは鶏肉83をあぶり焼き(グリルチキン)に係る調理工程に搬送する。そして、鶏肉81は次の工程でグリルチキンとして調理される。
 センサ23と同様、センサ24、25の種類については問わないものとする。また、搬送装置4b、4cは食品検査システムと電気的に接続されており、食品検査システムで推定されたそれぞれの鶏肉に係る良品のカテゴリの情報を取得できるものとする。
 食品検査システムで鶏肉84の良品のカテゴリ(判定モード)は、良品#1(から揚げ向き)と推定されている。このため、鶏肉84は仕分け装置3b、3cにより押し出されず、搬送装置4cにより、図46の下方向に搬送されている。搬送装置4cは鶏肉84をから揚げに係る調理工程に搬送する。そして、鶏肉84は次の工程でから揚げとして調理される。
 上述では、鶏肉の調理工程の例として、から揚げ、あぶり焼き、蒸し鶏を挙げたが、その他の調理工程を選択してもよい。例えば、とり天、フライドチキン、つくね、カレー、焼き鳥、シチューなどの調理工程を選択してもよい。図46のシステムを適用することにより、食肉の特性に適合した調理が行われるため、良好な食味や品質を備えた食品を生産することができる。
 本発明のいくつかの実施形態を説明したが、これらの実施形態は例として提示したものであり、発明の範囲の限定することは意図していない、これらの実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。
1 食品検査装置
2、2a、2b、2c 撮影装置
3、3a、3b、3c 仕分け装置
4、4a、4b、4c、4d、4e 搬送装置
5 滑り台
6 プログラマブルロジックコントローラ(PLC)
10 制御部
11 画像記憶部
12、12a 画像処理部
13 入力データ生成部
14 学習データ記憶部
15 学習部
16 モデル記憶部
17 判定部
18、18a 表示部
19 操作部
21、21b 照明部
21a、22a 偏光板
22、22b カメラ
22c フィルタ
23、24、25 センサ
31、31b、31c アーム
61、62、63、110 食品
70、71 ピーク
70a、70b、70c、111a、111b、111c しきい値(破線)
81、82、83、84 鶏肉
101、102、103、104、105、106、107、130、131、132、133、134、200、210、241、242、243、244、245、246 画像
108、109 ピクセル
110a、110b 血合い
112a、112b、112c、113a、113b、113c、122、122a、123、125a、125b、125c 輝度データ
114、115、116、117、118、119、120、121 連なり
126 入力データ
125a、125b、125c 輝度データ
150、170、180、220 ニューラルネットワーク
151、171、181、221 入力層
152、172、182、222 隠れ層
153、173、183。223 出力層
153a、153b、153c、154a、154b、154c、155、173a、173b、183a、230、231、232 ユニット
161、162 データ
191、192、193 破線
194、195、196 分布
197 区間(分布外要素)
201、211、212、213 領域
224、225、226 良品ユニット
227、228、229 不良品ユニット

Claims (26)

  1.  検査対象食品を撮影した判定画像について、前記判定画像に含まれるピクセルの輝度の度数分布を求めるステップと、
     前記度数分布から、前記輝度が一定範囲の値にある前記ピクセルの輝度情報を抽出し、前記ピクセルの前記輝度情報における前記輝度の値を格納した要素を含む輝度データを生成するステップと、
     前記輝度データの前記要素を前記輝度の値の降順または昇順に整列するステップと、
     前記輝度データを第1入力データとして、ニューラルネットワークに入力し、前記ニューラルネットワークの出力層における反応値に基づき、検査対象食品の判定モードを推定するステップとを実行することを特徴とする、
     食品検査システム。
  2.  前記ピクセルの前記輝度は、前記ピクセルの赤色、緑色、青色の少なくともいずれかの色情報に係る前記輝度であり、さらに前記輝度情報は前記色情報であり、前記色情報に係る前記輝度の値を格納した前記要素を含む前記輝度データを生成することを特徴とする、
     請求項1に記載の食品検査システム。
  3.  前記ピクセルの前記輝度は、前記ピクセルの赤色、緑色、青色の前記色情報に係る前記輝度であり、さらに前記輝度情報は前記色情報であり、色ごとに、前記色情報に係る前記輝度の値を格納した前記要素を含む前記輝度データを生成し、複数の前記色に係る前記輝度データを結合することによって前記第1入力データを生成することを特徴とする、
     請求項2に記載の食品検査システム。
  4.  前記輝度の値は、前記判定画像に含まれる前記ピクセルの赤色、緑色、青色のうち、少なくとも2つ以上の色の色情報に係る前記輝度を重み付け加算して求められることを特徴とする、
     請求項1に記載の食品検査システム。
  5.  前記輝度の値は、前記ピクセルの赤色、緑色、青色のうち、2つの色に係る色情報の前記輝度を減算することによって求められることを特徴とする、
     請求項1に記載の食品検査システム。
  6.  前記輝度の値は、前記ピクセルの赤色の前記色情報に係る前記輝度から前記ピクセルの緑の前記色情報に係る前記輝度を減算することによって求められることを特徴とする、
     請求項5に記載の食品検査システム。
  7.  前記輝度の値は、前記判定画像に含まれる前記ピクセルの複数の波長領域のうち、少なくとも2つ以上の前記波長領域に係る前記輝度を重み付け加算して求められることを特徴とする、
     請求項1に記載の食品検査システム。
  8.  前記輝度の値は、前記判定画像に含まれる前記ピクセルの複数の波長領域のうち、少なくとも2つ以上の前記波長領域に係る前記輝度を減算して求められることを特徴とする、
     請求項1に記載の食品検査システム。
  9.  前記輝度の値は、前記ピクセルの赤外線領域に係る前記輝度から前記ピクセルの緑色の前記波長領域に係る前記輝度を減算することによって求められることを特徴とする、
     請求項8に記載の食品検査システム。
  10.  前記赤外線領域は、波長が760nm~1000nmの電磁波の領域であることを特徴とする、
     請求項9に記載の食品検査システム。
  11.  前記輝度データを複数のブロックに分割し、前記ブロックに含まれる前記要素に格納されている前記輝度の代表値を計算するステップと、
     もとの前記輝度データを前記ブロックの数に等しい数の前記要素を含み、前記輝度の代表値を前記要素の値とする前記輝度データに変換するステップとを含むことを特徴とする、
     請求項1ないし10のいずれか一項に記載の食品検査システム。
  12.  前記検査対象食品を撮影した前記判定画像を複数の領域に分割するステップと、
     前記領域に含まれる前記ピクセルの前記輝度情報に係る前記輝度の代表値を計算し、前記領域における前記輝度の代表値を前記要素の値とする前記輝度データを生成するステップとを含むことを特徴とする、
     請求項1ないし11のいずれか一項に記載の食品検査システム。
  13.  前記代表値は、平均値、モード、メジアン、パワースペクトル加算平均のいずれかであることを特徴とする、
     請求項11または12に記載の食品検査システム。
  14.  前記判定モードは、少なくとも良品または不良品を含むことを特徴とする、
     請求項1ないし13のいずれか一項に記載の食品検査システム。
  15.  前記判定モードは、判定困難な場合を含むことを特徴とする、
     請求項14に記載の食品検査システム。
  16.  前記検査対象食品が搬送されている食品であるときに、3層の前記ニューラルネットワークを使って前記食品の前記判定モードを推定することを特徴とする、
     請求項1ないし15のいずれか一項に記載の食品検査システム。
  17.  前記第1入力データが生成されるステップと同一の方法によって、サンプル食品を撮影したサンプル画像に基づき、第2入力データを生成するステップと、
     前記第2入力データを前記ニューラルネットワークに入力し、前記サンプル画像に写されている前記サンプル食品の前記判定モードを前記出力層の教師信号として前記ニューラルネットワークの学習をするステップとを含むことを特徴とする、
     請求項1ないし16のいずれか一項に記載の食品検査システム。
  18.  前記検査対象食品が不良品であると推定されたら、前記判定モードが良品である前記サンプル画像から生成された前記第2入力データの集合から求められた前記輝度の分布と、前記第1入力データにおける前記輝度の値を比較し、前記第1入力データにおいて前記輝度の値が前記分布の範囲外にある分布外要素を求めるステップと、
     前記分布外要素から前記判定画像における前記検査対象食品の欠陥または異物の位置を特定するステップとを含むことを特徴とする、
     請求項17に記載の食品検査システム。
  19.  ブロブ解析を適用することによって、前記第1入力データにおける前記分布外要素から前記判定画像における前記検査対象食品の前記欠陥または前記異物の前記位置を特定することを特徴とする、
     請求項18に記載の食品検査システム。
  20.  前記判定モードは少なくとも良品または不良品に係る複数のカテゴリを含み、前記ニューラルネットワークの前記出力層は、いずれかの前記カテゴリに係る前記反応値を出力するユニットを複数含むことを特徴とする、
     請求項1ないし19のいずれか一項に記載の食品検査システム。
  21.  前記ニューラルネットワークの活性化関数は、放射基底関数であることを特徴とする、
     請求項1ないし20のいずれか一項に記載の食品検査システム。
  22.  前記放射基底関数は、正規分布関数であり、前記ニューラルネットワークの学習では、バックプロパゲーション法により前記正規分布関数の平均値と標準偏差の値が調整されることを特徴とする、
     請求項21に記載の食品検査システム。
  23.  食肉を紫外線光源で照らし、グリーンフィルタを通して撮像することを特徴とする、
     請求項1ないし22のいずれか一項に記載の食品検査システム。
  24.  検査対象食品を撮影した判定画像について、前記判定画像に含まれるピクセルの輝度の度数分布を求めるステップと、
     前記度数分布から、前記輝度が一定範囲の値にある前記ピクセルの輝度情報を抽出し、前記ピクセルの前記輝度情報における前記輝度の値を格納した要素を含む輝度データを生成するステップと
     前記輝度データの前記要素を前記輝度の値の降順または昇順に整列するステップと、
     前記輝度データを第1入力データとして、ニューラルネットワークに入力し、前記ニューラルネットワークの出力層における反応値に基づき、前記検査対象食品の判定モードを推定するステップと
     をコンピュータに実行させることを特徴とする、食品検査プログラム。
  25.  検査対象食品を撮影した判定画像について、前記判定画像に含まれるピクセルの輝度の度数分布を求めるステップと、
     前記度数分布から、前記輝度が一定範囲の値にある前記ピクセルの輝度情報を抽出し、前記ピクセルの前記輝度情報における前記輝度の値を格納した要素を含む輝度データを生成するステップと
     前記輝度データの前記要素を前記輝度の値の降順または昇順に整列するステップと、
     前記輝度データを第1入力データとして、ニューラルネットワークに入力し、前記ニューラルネットワークの出力層における反応値に基づき、前記検査対象食品の判定モードを推定するステップと
     を含むことを特徴とする、食品検査方法。
  26.  食品を撮影した判定画像について、前記判定画像に含まれるピクセルの輝度の度数分布を求めるステップと、
     前記度数分布から、前記輝度が一定範囲の値にある前記ピクセルの輝度情報を抽出し、前記ピクセルの前記輝度情報における前記輝度の値を格納した要素を含む輝度データを生成するステップと、
     前記輝度データの前記要素を前記輝度の値の降順または昇順に整列するステップと、
     前記輝度データを第1入力データとして、ニューラルネットワークに入力し、前記ニューラルネットワークの出力層における反応値に基づき、前記食品の判定モードを推定するステップと、
     推定された前記判定モードに基づき、前記食品に対して行う調理工程を選択するステップと
     を含むことを特徴とする、食品生産方法。
PCT/JP2019/003365 2018-01-31 2019-01-31 食品検査システム、食品検査プログラム、食品検査方法および食品生産方法 WO2019151393A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019516028A JPWO2019151393A1 (ja) 2018-01-31 2019-01-31 食品検査システム、食品検査プログラム、食品検査方法および食品生産方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-015946 2018-01-31
JP2018015946 2018-01-31

Publications (1)

Publication Number Publication Date
WO2019151393A1 true WO2019151393A1 (ja) 2019-08-08

Family

ID=67479791

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/003365 WO2019151393A1 (ja) 2018-01-31 2019-01-31 食品検査システム、食品検査プログラム、食品検査方法および食品生産方法

Country Status (2)

Country Link
JP (1) JPWO2019151393A1 (ja)
WO (1) WO2019151393A1 (ja)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111122582A (zh) * 2019-11-11 2020-05-08 北京海益同展信息科技有限公司 一种禽蛋检测方法、图像处理方法及装置
JP2020153765A (ja) * 2019-03-19 2020-09-24 株式会社 システムスクエア 検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデル
JP2020153764A (ja) * 2019-03-19 2020-09-24 株式会社 システムスクエア 学習モデルの生成方法、学習モデル、検査装置、異常検出方法、及びコンピュータプログラム
JP6972444B1 (ja) * 2021-03-23 2021-11-24 三菱電機株式会社 信頼度判定装置および信頼度判定方法
WO2022009597A1 (ja) 2020-07-08 2022-01-13 帝人株式会社 成形体領域の検査プログラム、成形体領域の検査方法、成形体領域の検査装置
CN114632716A (zh) * 2022-03-19 2022-06-17 莆田市农汇食品有限公司 一种真空包装食品气密性视觉检测装置
CN114652177A (zh) * 2022-04-06 2022-06-24 江苏狼王机械科技有限公司 一种螺旋蒸烤机设备及控制系统
WO2022191091A1 (ja) * 2021-03-08 2022-09-15 株式会社ニチレイフーズ 食品検査システム、食品検査方法及びコンピュータプログラム
JP7223194B1 (ja) 2022-05-27 2023-02-15 株式会社エクサウィザーズ 情報処理方法、コンピュータプログラム、情報処理装置及び情報処理システム
JP7440044B2 (ja) 2022-02-08 2024-02-28 ユーシーシー上島珈琲株式会社 コーヒー豆類の良品識別機能を備える良品検査システムおよび良品検査方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06318244A (ja) * 1993-05-10 1994-11-15 Toshiba Eng Co Ltd 画像処理装置およびこの装置を用いた牛枝肉格付システム
JPH1185950A (ja) * 1997-09-08 1999-03-30 Canon Inc 画像処理装置、画像処理方法及びコンピュータ読み取り可能な記録媒体
US20020012419A1 (en) * 2000-05-25 2002-01-31 Mark Graves Analysis of samples
JP4362479B2 (ja) * 2003-12-12 2009-11-11 富士通株式会社 カラーバランス補正プログラム、カラーバランス補正装置およびカラーバランス補正方法
JP2009293993A (ja) * 2008-06-03 2009-12-17 Central Res Inst Of Electric Power Ind 腐食度評価方法、装置及びプログラム
JP2017062677A (ja) * 2015-09-25 2017-03-30 株式会社Screenホールディングス 分類器構築方法、画像分類方法、分類器構築装置および画像分類装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06318244A (ja) * 1993-05-10 1994-11-15 Toshiba Eng Co Ltd 画像処理装置およびこの装置を用いた牛枝肉格付システム
JPH1185950A (ja) * 1997-09-08 1999-03-30 Canon Inc 画像処理装置、画像処理方法及びコンピュータ読み取り可能な記録媒体
US20020012419A1 (en) * 2000-05-25 2002-01-31 Mark Graves Analysis of samples
JP4362479B2 (ja) * 2003-12-12 2009-11-11 富士通株式会社 カラーバランス補正プログラム、カラーバランス補正装置およびカラーバランス補正方法
JP2009293993A (ja) * 2008-06-03 2009-12-17 Central Res Inst Of Electric Power Ind 腐食度評価方法、装置及びプログラム
JP2017062677A (ja) * 2015-09-25 2017-03-30 株式会社Screenホールディングス 分類器構築方法、画像分類方法、分類器構築装置および画像分類装置

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020153765A (ja) * 2019-03-19 2020-09-24 株式会社 システムスクエア 検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデル
JP2020153764A (ja) * 2019-03-19 2020-09-24 株式会社 システムスクエア 学習モデルの生成方法、学習モデル、検査装置、異常検出方法、及びコンピュータプログラム
CN111122582A (zh) * 2019-11-11 2020-05-08 北京海益同展信息科技有限公司 一种禽蛋检测方法、图像处理方法及装置
CN111122582B (zh) * 2019-11-11 2023-03-07 京东科技信息技术有限公司 一种禽蛋检测方法、图像处理方法及装置
WO2022009597A1 (ja) 2020-07-08 2022-01-13 帝人株式会社 成形体領域の検査プログラム、成形体領域の検査方法、成形体領域の検査装置
WO2022191091A1 (ja) * 2021-03-08 2022-09-15 株式会社ニチレイフーズ 食品検査システム、食品検査方法及びコンピュータプログラム
JP6972444B1 (ja) * 2021-03-23 2021-11-24 三菱電機株式会社 信頼度判定装置および信頼度判定方法
WO2022201276A1 (ja) * 2021-03-23 2022-09-29 三菱電機株式会社 信頼度判定装置および信頼度判定方法
JP7440044B2 (ja) 2022-02-08 2024-02-28 ユーシーシー上島珈琲株式会社 コーヒー豆類の良品識別機能を備える良品検査システムおよび良品検査方法
CN114632716A (zh) * 2022-03-19 2022-06-17 莆田市农汇食品有限公司 一种真空包装食品气密性视觉检测装置
CN114632716B (zh) * 2022-03-19 2024-03-15 莆田市农汇食品有限公司 一种真空包装食品气密性视觉检测装置
CN114652177A (zh) * 2022-04-06 2022-06-24 江苏狼王机械科技有限公司 一种螺旋蒸烤机设备及控制系统
JP2023174268A (ja) * 2022-05-27 2023-12-07 株式会社エクサウィザーズ 情報処理方法、コンピュータプログラム、情報処理装置及び情報処理システム
JP7223194B1 (ja) 2022-05-27 2023-02-15 株式会社エクサウィザーズ 情報処理方法、コンピュータプログラム、情報処理装置及び情報処理システム

Also Published As

Publication number Publication date
JPWO2019151393A1 (ja) 2020-12-03

Similar Documents

Publication Publication Date Title
WO2019151393A1 (ja) 食品検査システム、食品検査プログラム、食品検査方法および食品生産方法
JP7391173B2 (ja) 食品検査補助システム、食品検査補助装置、およびコンピュータプログラム
CA3062051C (en) Fluorescent penetrant inspection system and method
US11410295B2 (en) System and method for hyperspectral image processing to identify foreign object
US11443417B2 (en) System and method for hyperspectral image processing to identify object
Barbin et al. Digital image analyses as an alternative tool for chicken quality assessment
Sun et al. A method for rapid identification of rice origin by hyperspectral imaging technology
Pedreschi et al. Computer vision classification of potato chips by color
Guzmán et al. Infrared machine vision system for the automatic detection of olive fruit quality
US20200096454A1 (en) Defect detection system for aircraft component and defect detection method for aircraft component
Eshkevari et al. Automatic dimensional defect detection for glass vials based on machine vision: A heuristic segmentation method
WO2012039597A2 (en) Fruit ripeness grading system
JP2019200775A (ja) 表面欠陥検査装置及び表面欠陥検査方法
Zhang et al. Development of a hyperspectral imaging system for the early detection of apple rottenness caused by P enicillium
Lopes et al. Dual Stage Image Analysis for a complex pattern classification task: Ham veining defect detection
KR20230139166A (ko) 목재 제품의 불량 검사 방법
JP2023115666A (ja) コーヒー炒豆の焙煎度推定機能を備える焙煎度検査システムおよび焙煎度検査方法
Dias et al. Identification of marks on tires using artificial vision for quality control
Gunasekaran Computer vision systems
Mindoro et al. Automatic Visual Detection of Fresh Poultry Egg Quality Inspection using Image Processing
JP2004317153A (ja) 青果物の光沢検査装置及び光沢検査方法
PEI BROVEY TRANSFORM BASED IMAGE FUSION FOR IMPURITIES SEGMENTATION AND DETECTION ON EDIBLE BIRD’S NEST
Abdelhamid et al. RAPID TECHNICAL METHOD FOR QUALITY CONTROL OF TOMATO FRUITS
Liu et al. Detection of Invisible Damage of Kiwi Fruit Based on Hyperspectral Technique
Dahal Design of object identification system based on machine vision

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2019516028

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19747064

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19747064

Country of ref document: EP

Kind code of ref document: A1