Sorting of Object Based On Colour Using Raspberry PI

Call for Price

Sorting of Object Based On Colour Using Raspberry PI

SKU: Sorting of Object Based On Colour Using Raspberry PI Category:



Sorting of products in an industry is a tedious industrial process, which is generally carried out manually. Continuous manual sorting creates quality consistency issues. Segregation based on different characteristics especially color, require different equipment for checking and then separating. We have proposed an efficient method which can sort the object based on the color. In this project we are using Raspberry Pi which will be connected to the USB camera. Here we will use OpenCV wrapper with python for the object sorting according to its color. To start, we need to initialize a colors dictionary that specifies the mapping of the color name (the key to the dictionary) to the RGB tuple (the value of the dictionary). From there, we allocate memory for a NumPy array to store these colors, followed by initializing the list of color names. The next step is to loop over the colors dictionary, followed by updating the NumPy array and the color Names list, respectively. Finally, we convert the NumPy “image” from the RGB color space to the L*a*b* color space. The CIELAB color space also known as CIE L*a*b, It expresses color as three numerical values, L* for the lightness and a* and b* for the green–red and blue–yellow color components. In order to sort the object pick and place robot is used. In this project first the object will be detected and then segregated and sorted according to the L*a*b* color space. This make our work more efficient and fast.


The idea behind this is to actually label and tag regions of an image as containing a certain color, we’ll be com
puting the Euclidean distance between our dataset of known colors (i.e., the lab array) and the averages of a particular image region. It will sort the objects according to the color and which give the computer vision to computer instead of manually doing it. This will automate the color sorting accordingly.


In the existing system, manually human power is used to sort the object according to the color or a huge complicated design is made to segment the object according to the color, which will take more time and accuracy is also low.


In this proposed system, Raspberry pi is connected with a USB camera where OpenCV wrapper with python is used in which CIELAB color space is used to sort the objects according to its color. This will make our work more easy and efficient.






  • In this project USB Camera is connected to the Raspberry Pi.
  • USB camera will act as the computer vision for object sorting based on color.
  • Pick and Place Robot is connected to the raspberry pi which will help in sorting the objects.
  • Connect power supply for Raspberry pi
  • Plug the HDMI cable in Raspberry pi from the monitor using VGA to HDMI converter cable
  • Connect USB Mouse and USB keyboard to the Raspberry pi


  • Raspberry Pi
  • USB Camera
  • Pick and Place Robot.
  • SD card
  • Monitor


  • Raspbian Jessie
  • OpenCV
  • Language – Linux
  • Python


The Object Sorting Based on Object’s Color has been successfully designed. The USB CAMERA will continuously sense the color and goes to respective Object. Color sensing section performed two main tasks; object’s detection and color recognition. System is fully automatic and can take objects. The cost effective system was designed to perform the continuous and reliable tasks without human errors using the simplest concepts. The color sorting systems are useful in industries and different household activities. Since this system is mainly controlled by the Microcontroller, the results obtained are more reliable and fast.


[1] Yeow Khang Yung, ‘’Color Sorting System with Robot Arm’’ Faculty of Electronic and Computer Engineering University Technical Malaysia Melaka, (2011).

[2] Prof. NilimaBargal, AdityaDeshpande, RuchaKulkarni, RuchaMoghe, PLC based Object Sorting Automation, International Research Journal Of Engineering & Technology, ISSN (Online): 2395-0056, July 2016.

[3] Sheela S, Shivaram. K. R, Meghashree S, Monica L, Prathima A, Shriya M. Kumar, Low Cost Automation for Sorting of Objects on Conveyor Belt, International Journal Of Innovative Research in Science, Engineering & Technology, ISSN (Online): 2319-8753, May 2016

Additional information

Weight 1.000000 kg


There are no reviews yet.

Be the first to review “Sorting of Object Based On Colour Using Raspberry PI”

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.