Vegetable grading and sorting system with vision cameras

When you want to inspect the vegetables such as carrots, tomato, potatoes cucumbers, lettuce, onions, eggplants, green beans, zucchini and bell peppers etc. quality in terms of length, surface cracks, size, shape and color, implementing a high-quality vision system is crucial to identify these parameters on a conveyor belt. We understand it could be hard to determine the right camera set-up, lighting and software. In only a few steps, this article leads you to selecting the right vision hardware and software.

One of our vision engineers recommends an example test camera set-up and software for this vegetable grading vision system. Via the links, our products and pricing are instantly visible to provide direct access to information about this vegetable grading vision system.
For this application, our customer had an inquiry to detect the carrot cutting quality and grading them based on the photos taken with our industrial cameras. They needed to classify the damaged carrots apart from the healthy ones. Using a machine vision system to detect the parameters allowed him to approve or reject the cracks on thecarrots for further use.
Table of contents
Machine vision camera selection
First, we startwith the selection of the industrial camera for the vegetable grading and sorting vision system. The recommendation was our 1.60 MP GigEcamera MER2-160-75GC-P which was based on the specifications and details of our customer’s application.
First, the customer did not know what camera interface he needed and had no specific interface preference. When the distance between a pc and camera is shorter than 4.6meter, an USB3 camera interface is advised to benefit from the 4 times higher bandwidth than a GigE Camera, data transmission and power through only 1 cable and price advantage.
To differentiate the colors, a color camera was selected. Since the vegetables are moving on a rolling conveyor belt, we advise using a Global shutter camera instead of a rolling shutter camera for this specific carrot grading vision system. More about Global shutter vs. Rolling shutter can be read in this article in our Knowledge Center.
Then to be able to measure the framerate of the camera and how many shots are required to be taken per second, we asked the customer about the actual speed of the conveyor belt and based on the speed of approximately 19 m/s, we calculated the required frame rate of the camera which was 75fps.
To determine the required resolution, which was still unsure for the researcher beforehand, we offered him support by calculating this based on the smallest details he wanted to capture on the carrots surface such as their cracks and the damages. To see the smallest cracks of around 0.05mm within the field of view of approximately 400*300 mm, a system resolution of 1.6 MP is required. Based on 3 pixels per smallest cracks details, at least 1440*1080 pixels were required. Our 1.6 MP MER2-160-75GC-P camera with the Sony IMX273 sensor offers a great high-resolution solution for accurate detection of the cracks and damages for carrot/vegetable quality grading.

Lens for Sony IMX273 sensor
The selected 1.6MP camera for this vegetable grading vision system has a Sony IMX273 sensor, this is a 1/2.9” sensor. To determine which lens is best suited for this vision system, we’ve made use of our online lens calculator. Based on 2 specifications of the vision system, the required horizontal Field of View (FOV) and working distance (WD), the correct focal length is calculated.
The customer requires a FOV of 400x300 mm and prefers to have a WD between 900-1000 mm. The calculation shows that for these specifications a 12MM focal length lens is recommended. It is also shown that the working distance will be 1000 mm, and the field of view will be a bit bigger than preferred. This has to do with the camera sensor size which does not have the same ratio number of pixels as the field of view of 400*300 mm. The final field of view will be approximately 409*307 mm. our 12MM F2.0 1/1.8" C-mount lens, the VA-LCM-5MP-12MM-F2.0-018 lens, is a non-distortion lens < 0.3% which offers a great solution for the 1.6MP camera.
Industrial Lighting for Vegetable Quality Grading
Adding Machine Vision Lighting to the carrot grading inspection increases the contrast and highlights the existing cracks and damages on the carrots surface. To minimize and eliminate the shadows, a lighting system on the upper side of the conveyor belt is advised. The enhanced contrast when using an upside light for the vegetable grading inspection vision system makes it easier to detect the cracks and see the damage on the vegetables to be able to sort them afterwards. For lighting, we recommend a light that is approximately 10% bigger than the field of view. We recommend 2 of our bar lights, the white Bar light series VA-BL3 275*16 ,to be placed upside of the conveyor belt. Additionally, these are available on the express stock. It means that they could be shipped immediately to the customer.
As the application was going to take place in an outdoor area, we both recommended a polarized lens filter and a polarizing sheet to remove the possible glare and reflections.
A polarizing lens filter: the lens filter LFT-LPOL-M25.5 is made for C-mount lenses with the filter thread of M25.5xP0.5 such as the recommended 12 mm C-mount lens.
A polarizing filter sheet: the linear polarizing filter sheet polarizes the back light when holding it in front of the light source.it can be also cut in the customer preferred size.

Image processing software for vegetable grading
A single Camera, lens and lighting do not make a full vegetable grading vision system. For the actual vegetable quality inspection, image processing software is required to detect the cracks and damage on the vegetables. Our cameras are GenIcam compatible, which means that they could be used with a variety of 3rd party software including MvTec Halcon, NI LabVIEW, Cognex Vision pro, MATLAB, Open CV and Arm Boards software.
For first programming, our free SDK can be used to acquire images and set the camera parameters.
The software development kit is compatible with regular and industrial PCs and ARM platforms, including NVIDIA TX series and Raspberry Pi. supported operating systems include Windows, Linux and Android. Operating Systems Notably and Apple MAC OS are not supported for industrial use, but engineers can run a virtual machine with Windows or Linux on MAC for compatibility. The SDK supports programming languages like C++, C#/. NET and Python.it is possible to acquire additional
languages upon request, as they are not included in the standard package.
For this example, application of Vegetable / Carrot grading, the customer appreciated working with software which is easy-to-use for less experienced colleagues. That is why making use of Zebra Aura Vision Software is advised. This strong and user-friendly software offers a robust graphical environment which feels like a “toolbox”.
Using this software to complement your vegetable grading application, both the size of the damages and the amount of them could be detected.
To gather knowledge of the Aurora Vision software, the free lite version is available with all the standard algorithms.
Vegetable Sorting and Grading Applications
A vegetable grading and sorting application with vison system is also used in a variety of other applications and industries, this was used in an agricultural industry. However, it is often used as well in food industries. For example, a vision system could automate counting and analyzing numerous fruits at a fast pace in food production. For high-speed imaging, an industrial vision camera such as our 1.6MP camera with 227 fps, the MER2-160-227U3C camera, at full resolution could offer an excellent vision hardware solution.
Beside inspecting the cracks on the carrots surface, a vison system could also be used for detecting the discoloration and skin quality on the vegetables surface.
Support for Vegetable grading and sorting applications
Would you like to have support from one of our machine vision experts for creating your own Vegetable grading vision system? Or another similar vision system? Don’t hesitate to reach out by using the form below!