Last updated: 29 November 2024

Machine Vision System in Food Industry - Bakery Goods Inspection

A high quality vision system for bakery goods inspection is essential when we have a production line of bakery goods in place. This is because the food industry is one of the most highly regulated sectors. Numerous standards must be adhered to. Therefore, accurate and meaningful analysis is very important. It is particularly important not to make mistakes and to ensure a constantly monitored production. Monitoring is therefore so complex because many factors must be considered. It is therefore understandable that you cannot manage to consider all these points alone.

Machine Vision System in Food Industry - Bakery Goods Inspection
Our large team is very familiar with the products and almost manages to find a suitable solution. However, sometimes constructions also need to be rethought, as physics also sets limits.

The interaction of the industrial camera, the right lens, sufficient lighting, and compatible software must be right. Therefore, the paths with our customers often start in the same way. Together, we develop the setup that we think is best suited. We check this setup with a test setup. Our customers put the setup into operation and then carry out initial checks. Does the software match the hardware? Is the imaging sufficient? Can the setup be implemented in the machine as planned?

We try to clarify and answer all these possible questions already in the first team meetings. Ultimately, we always recommend conducting a test setup, as a functioning system is most important to us.
Currently, we have a particularly interesting use case with one of our customers for food inspection. Here, a detailed bakery goods inspection for quality assurance is carried out. Directly after baking, the bakery goods are placed on a conveyor belt and inspected by a vision system consisting of four cameras. The special focus is on 360-degree monitoring. During a top-down inspection, the underside cannot be captured by the first pair of cameras. On the belt, the bakery goods are rotated halfway by a tilting mechanism, allowing the next pair of cameras to see the underside of the products.

The bakery goods items are examined for size, possible colour defects, and deformations. For example, it is possible that a colour defect in the product is only noticeable when viewing the underside.
The bakery goods inspection vision system detects the errors almost in real-time. This allows the production staff to react immediately. Therefore, in many cases, a defective production can be pre-empted for a longer period.

Selection of the Machine Vision Industrial Camera

When selecting the right industrial camera, it was particularly important for us to calculate the necessary resolution. To do this, we always clarify two core questions. How large is the field of view that I want to observe and how small is the smallest detail that I want to capture. In this bakery goods inspection application, we also considered how accurately we want to measure or what level of measurement deviation is acceptable.

To calculate these values, we have our own tools. Due to the width of the conveyor belt, we divided the conveyor belt into two viewing areas. These areas overlap minimally, so that the software later generates an image.

Since the products are moving at the time of image capture, we opted for a Global Shutter model. Additionally, due to the distance from the computer to the cameras, we decided on a GigE interface. For distances of 5 meters or more, it is usually recommended, as USB cables become very expensive beyond such distances. Furthermore, the customer considered the PoE function to be very important, where the camera is powered directly via the network cable. Despite this, the camera can still be hardware-triggered via the I/O cable. However, this was not required here. But the installation of a light barrier was considered.

The customer required a measurement accuracy of 0.3 mm for the smallest visible detail. The field of view (FOV) per camera was set at 400 x 200mm. A system resolution of 0.1mm/pixel was needed. Based on 3 pixels per smallest particle, at least 4000 x 2000 pixels were required. Thus, our choice fell on the ME2P-900-13GC-P. This camera has a sensor ratio of 2:1 and meets all necessary criteria. With 13 FPS, we can work easily, as the conveyor belt moves very slowly.

Selection of the suitable lens for Bakery Good Inspection

To calculate the appropriate focal length, you can conveniently use our lens calculator. For this, you need the sensor size of the camera, the working distance, and the horizontal width of the field of view.

The camera "ME2P-900-13GC-P" has a 2/3-inch sensor. The field of view had a width of 400mm. Due to the setup of the machine, a possible working distance of 700 to 800mm was determined. At 750mm, a recommended focal length of 16mm is calculated.
Additionally, it is important to note that the lens can represent the resolution of the camera, so we have also provided the lenses on our website with a resolution.

In our bakery goods inspection application, a lens with a resolution of 5MP would therefore be insufficient, as the industrial camera resolves 9 MP. Therefore, we have chosen the LCM-10MP-16MM-F2.8-1.5-ND1. This lens is designed for sensors up to 10MP. In this case, the interplay between the camera and lens is ideally chosen.

Image Processing Software for Bakery goods Inspection

When we talk about a complete machine vision system, it always describes the combination of hardware and software. The computer vision software processes the image data from the industrial camera and analyses it based on certain markers.

Our cameras are GenICam compatible, which means they are compatible with various software solutions. These include, for example, MvTec Halcon, NI LabVIEW, Cognex Vision Pro, Matlab, or OpenCV. Many customers also write their own programs, as the expertise is available in-house.

For the initial steps, you can use the free SDK. There, you can save initial recordings and modify the camera parameters. The application is designed to run smoothly on a Raspberry Pi as well. Supported operating systems include Windows, Linux, and Android. Operating systems like macOS from Apple are not supported for industrial use, but engineers can run a virtual machine with Windows or Linux on a Mac to ensure compatibility. The SDK supports programming languages like C++, C#/.NET, and Python.

For this application for food quality inspection for bakery goods, the customer wished to work with software that is easy to use even for inexperienced colleagues. Therefore, the use of Zebra Aurora Vision software is recommended. This robust and user-friendly software provides a graphical environment that feels like "a toolbox."

With this software, the vision system can be complemented to detect both the size and quantity of bakery goods and identify any faulty production. To gain knowledge about the Aurora Vision software, the free Lite version with all standard algorithms was used.

Possible Applications

In general, this involves optical food inspection, which can be implemented very effectively with the interaction of software and hardware. Depending on the product and the speed of the conveyor belt, you may need to adjust the software or choose a different camera because the working distance is greater or more FPS (frames per second) are required.

To consider all these points, our team is always ready to assist you with advice and support with you bakery goods inspection application. Simply leave us a short message via the contact form, and we will get back to you promptly.