iWave Japan      Welcome to iWave Systems

Machine Vision Application for sorting of Tomatoes using iWave's Cyclone V SoC Development Platform

Machine Vision is the technology to replace the manual inspections with low cost computer vision with cameras. The technology is used in industrial automation to increase the production and to improve the production quality.

iWave Systems has developed Machine Vision Application system for sorting of tomato on iWave Cyclone V SoC Development platform using OpenCV image processing library. Open Source Computer Vision (OpenCV) is aimed at real-timecomputer vision. The current system is developed for finding Calyx, Crack, Blossom End Rot (BER) and Stem parts and there by isolating good and bad tomatoes.

Application Overview:

Altera's Cyclone V SoC Hard Processing System (HPS) consists of FPGA and dual-core ARM Cortex-A9 processor.  FPGA captures the video frames from the camera and also displays the processed final frames in display LCD. Hard Processing System(HPS) contains QT GUI application and image processing library.


Figure 1: Machine Vision Application by using iWave Cyclone V SoC Development Kit

FPGA continuously captures the video frames using NTSC camera. The captured frames are pre processed, where the YCbCr 4:2:2 interlaced video frames are converted to RGB progressive video frames as required for the post processing. This is easily done using the Altera VIP suite available in Quartus tool. The IP cores are configured for Clocked video input and output, Chroma Resampler, Color Space converter, Mixer, Frame buffer and frame reader. 

The QT GUI application running continuously in HPS takes the pre-processed frame from FPGA.  QT GUI application has widgets to tune the image processing parameters. The OpenCV libraries process the pre-processed frame based on the threshold values given in QT. The application identifies and sort calyx, crack, Blossom End Rot (BER) and stem on the surface of the tomato .

Finally the processed frame and image processing results are alpha blended with QT GUI application in FPGA Video Mixer Logic and the mixed image is displayed in 800x480 LCD display.


Figure 2: Machine Vision Application running in iWave Cyclone V Soc Development Kit

Detailed Description:

The image processing module works as follows:

  • Find the contour of the the affected area (Crack, Calyx , Blossom End Rot(BER) or Stem).
  • Segment the affected area from the original image using contour.
  • Find the Convex Hull of the contour.
  • Read the  pixel values about the color factor.
  • By analyzing Hull and color factor, sort the tomato.

Benefits :

  • Efficient sorting of fruits/ vegetable and grading them based on the quality.
  • No manual work, all the manual work replaced my computer vision.
  • Grading is done using many color models (RGB, RGBA, HSV, YCbCr) to get accurate results.
  • Accurate, robust, reliable and and efficient. 
  • QT GUI used as front end to display live video and processed output.
  • QT GUI is used to control the Threshold settings and tuning
  • Threshold settings help to control surrounding environment changes like light
  • By keeping the basic color and threshold settings in a database will help to extend this application for wide range of fruits and vegetables.



For further information or enquiries please write to [email protected] or contact our Regional Partners.

 -Keshava Kumar B

Member Technical (Software)

iWave Systems Technologies Pvt. Ltd