About

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).
Application Overview:
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.

Detailed Description:
On FPGA, once after Image is captured using NTSC camera, following pre-processing logic is applied-
•     Color Plane Sequencer
•     Clipper
•     Deinterlace
•     Chroma resampler
•     Background Subtraction
•     Split Y from YCbCr input
•     Inversion on Y Component
•     7x7 Median Filter
•     Contrast Expansion
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).
Benefits:
o     Machine Vision application reduces Cost
o     Improve the quality check of vegetable/fruit
o     Reduce labor work in finding blemish/damage on the vegetable/fruit
o     Robust, efficient
o     Threshold settings helps the user to apply the application for wide range of vegetables/fruits
o     Threshold settings helps the user to set the limits for deciding acceptance of vegetable/fruits
o     QT is used as GUI Front end
o     OpenCV 2.4 libraries are used for Image processing

Machine vision applicaion, OpenCV , NTSC camera, Color Plane Sequencer, QT GUI Application