Robo Cup 2016 KSL Design and implementation of
Robo. Cup 2016 - KSL Design and implementation of vision and image processing core Academic Supervisor: Dr. Kolberg Eli Mentors: Dr. Abramov Benjamin & Mr. Amsalem Rafi Hen Shoob Assaf Rabinowitz
Vision Team The Vision module is responsible for image processing. The main goal is to detect meaningful objects - ball, goal and white lines. The implementation uses some functions from the Open. CV image processing library. In the 1 st semester, we were responsible of implementing Goal Detection is mandatory input for the other cores of the robot, such as the brain and the localization. The localization output of where the robot is located in the field, and the brain decision of the kick direction, are based on if and where the goal is located in relation to the robot. In the 2 nd semester, we were responsible of implementing: Distance approximation Ball Movement calculation
Vision Techniques HSV Vs. RGB We preferred to use HSV image representation.
Vision Techniques Median filter - blurring
Vision Techniques Erosion & Dilation If 1 neighbor is white – the pixel will be white Erosion If 1 neighbor is black – the pixel will be black
Calibration Tool First, we were needed to be able to distinguish green (field) and white (goal posts) objects from other objects in a given image. We need to configure the HSV ranges of white and green. In order to do so we developed a calibration tool. The calibration tool adjusts our image-processing to the current environment colors. The robot defines the green and the white color spectrum. The user clicks on the calibrated color pixels in the original image and the tool saves the configuration for each color.
Calibration Tool – cont. Original Image Green Calibration White Calibration Opponent Calibration
Goal Detection Algorithm Input: Raw image from the robot’s camera. Output: Data structure that contains information about the goal, such as is the goal detected (fullpartial detection), the center of the goal, etc.
Goal Detection Algorithm – Full goal Input image
Goal Detection Algorithm – Full goal Only white image we use a simple threshold function on the HSV transform of the given image. We get a B&W image, in which only white objects are white.
Goal Detection Algorithm – – Full goal After blurring We apply median filter on the image.
Goal Detection Algorithm – Full goal Vertical closing We perform a vertical erosion algorithm on the given image to remove any horizontal white objects from the image. Only vertical white objects are left
Goal Detection Algorithm – Full goal Canny algorithm – edge detection We apply canny algorithm on the given image
Goal Detection Algorithm – Full goal Contours + Minimum surrounding rectangles We surround the left objects with minimum area rectangles.
Goal Detection Algorithm – Full goal
Goal Detection Algorithm – Full goal Output The 2 largest objects are the posts
Goal Detection Algorithm – Single post Input
Goal Detection Algorithm – Single post Decide which post Count white pixels at the sides of the post top
Goal Detection Algorithm – Single post Output Goal Detection Video
Lease Square Approximation Parabolic Fitting
Distance Approximation Requirements: Approximate distance to objects in the field Speed over accuracy Solution: Linear approximation combined with pre-calculated lookup table Implementation: Calculation of the database is automated – table for each head tilt “Memorization”
Ball Movement (GK) Detect and characterize ball movement towards the goal: Direction “Time to jump” Algorithm: Create sequence of Detected. Balls toward the goal (decreasing y value) Reset sequence if no ball was detected If the sequence is long enough: Calculate direction Calculate time to jump return
Ball Movement (GK) – cont. Direction calculation: Linear approximation – x vs. y Calculating x when y gets to the GK legs Time to jump calculation: Parabolic approximation – t vs. y Calculating t when y gets to the GK legs
Overall objectives Code architecture & design: OOD Infrastructure Modularity Integration of all code components Team leaders
- Slides: 24