OpenCV and Python
Industrial image processing application for IEEE Region 5 Robotics
Competition.
By Rohan Kotwani
IEEE Region 5 Robotics Competition
• The goal was to navigate to a color block & place that block into a bin
corresponding to the color.
• A pi camera with OpenCV installed was used for object detection,
navigation to object, and color detection.
Information Gathered & associated problems
• Color – The color detection was an issue different lighting conditions
effect the intensity of the color.
• Distance – The distance of the robot to the object primary depended
on the algorithm’s ability filter out noise & correct detect the
perimeter of the image
• Angle from center of camera – The angle was calculated using the
distance in pixels from the center of the image & the camera focal
length.
Parts List
• Raspberry Pi 2
• OpenCV
• Python 3
• Arduino Mega
How it was made
• Image processing was done on the R-Pi2, then the information was
sent via serial communication to the Arduino Mega.
• A “hand-shake” method was used to confirm the data transfer.
Exploratory threshold analysis
• A taxonomy of colors was created with a K-mean clustering algorithm.
Object detection
1. Color threshold filter
2. Contour detection
3. Algorithm to find contours of the right dimension
Distance detection
• The red points are the actual distances, the red line is the curve fitted
interpolation, and the blue points are the distance calculated with
triangle similarity.
Color detection
• The color was calculated by finding the average color inside contours.
The End

Robotics competition 2016

  • 1.
    OpenCV and Python Industrialimage processing application for IEEE Region 5 Robotics Competition. By Rohan Kotwani
  • 2.
    IEEE Region 5Robotics Competition • The goal was to navigate to a color block & place that block into a bin corresponding to the color. • A pi camera with OpenCV installed was used for object detection, navigation to object, and color detection.
  • 3.
    Information Gathered &associated problems • Color – The color detection was an issue different lighting conditions effect the intensity of the color. • Distance – The distance of the robot to the object primary depended on the algorithm’s ability filter out noise & correct detect the perimeter of the image • Angle from center of camera – The angle was calculated using the distance in pixels from the center of the image & the camera focal length.
  • 4.
    Parts List • RaspberryPi 2 • OpenCV • Python 3 • Arduino Mega
  • 5.
    How it wasmade • Image processing was done on the R-Pi2, then the information was sent via serial communication to the Arduino Mega. • A “hand-shake” method was used to confirm the data transfer.
  • 6.
    Exploratory threshold analysis •A taxonomy of colors was created with a K-mean clustering algorithm.
  • 7.
    Object detection 1. Colorthreshold filter 2. Contour detection 3. Algorithm to find contours of the right dimension
  • 8.
    Distance detection • Thered points are the actual distances, the red line is the curve fitted interpolation, and the blue points are the distance calculated with triangle similarity.
  • 9.
    Color detection • Thecolor was calculated by finding the average color inside contours.
  • 10.