Machine Vision Application on iWave's Cyclone V SoC Development Platform
Machine vision is the application of computer vision and related technologies to industrial automation. Machine Vision is useful in many aspects; it will reduce the labor intensive work and create consistency in the quality of the product. Machine Vision is used in many Grading systems like Vegetable/Fruit Grading systems.
iWave systems has developed Machine Vision Application system for finding Blemish/Damage on Vegetable/Fruit on iWave Cyclone V SoC Development platform. The current system involved in finding blemish/damage on the vegetable eggplant (Brinjal).
The Cyclone V SoC platform is equipped with Dual Core ARM(HPS) with FPGA support. FPGA captures the image of eggplant (Brinjal) using NTSC Camera. The Captured Image is passed to Pre-processing logic in FPGA and the Pre-processed image is updated in FPGA Frame Input Buffer.
In HPS, a QT GUI Application is running, QT GUI application access’s the Frame Buffer and gets the pre-processed Image. Using OpenCV Algorithms, Image processing is done on the pre-processed image to find the Blemish/Damage regions. The processed image is updated in FPGA Output Frame Buffer. The inference of the processed image whether it is blemished/damaged is updated to QT GUI Application.
Finally Post processed image and QT GUI application results are alpha blended in FPGA Video Mixer Logic and the mixed image is then displayed in 800x480 LCD display.
On FPGA, once after Image is captured using NTSC camera, following pre-processing logic is applied-
- Color Plane Sequencer
- Chroma resampler
- Background Subtraction
- Split Y from YCbCr input
- Inversion on Y Component
- 7x7 Median Filter
After applying the pre-processing logic, Pre-processed image is updated in FPGA Input Frame Buffer.
On HPS side, the application access’s the FPGA Input Frame Buffer and gets the pre-processed image and following Image processing functions are applied on the pre-processed image to get the processed output image-
- Create Hollow Model of eggplant(Brinjal)
- Segment object from background
- Fill Hollow Model
- Subtract Fill model from segment object to get blemish/damage region
- Contrast Expansion of blemish/damage region
- Find Maximum value on damage region
Find Area of blemish of the blemish region
The Area of the blemish is compared with the allowed percentage limit and if it is more than that then the allowed percentages, eggplant (Brinjal) is classified under Blemish/Damage category and results is updated to QT GUI Application.
The processed output image along with Blemish/Damage region if any and the hollow model is merged together and is updated in FPGA output Frame Buffer. FPGA access’s the processed output image and adds Alpha channel and finally displays on the LCD (800x480).
- Machine Vision application reduces Cost
- Improve the quality check of vegetable/fruit
- Reduce labor work in finding blemish/damage on the vegetable/fruit
- Robust, efficient
- Threshold settings helps the user to apply the application for wide range of vegetables/fruits
- Threshold settings helps the user to set the limits for deciding acceptance of vegetable/fruits
- QT is used as GUI Front end
OpenCV 2.4 libraries are used for Image processing