Skip to content

The goal of this project was to write a an alogrithm for ball detection and tracking using Robotic Operating System(ROS) and OpenCV library.

Notifications You must be signed in to change notification settings

nihar0602/Ball-Tracking-using-ROS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ball-Tracking-using-ROS

Personal Project

result

Ball Tracking using ROS and OpenCV:

bar.jpg

Problem: Ball Tracking :The goal of this project was to write a an alogrithm for ball detection and tracking using Robotic Operating System(ROS) and OpenCV library.

Initially, the project was offered in one of the online MOOC course offered by Prof.Anis Koubaa.

Approach:

  • The camera output is converted into HSV format.
  • Color Filtering is done.
  • Edge detection using Color Filtering.
  • Once Edge detected, draw contour around it.
  • Process the contour like calculating the area,perimeter of the contour.
  • Disadvantage: It is not robust to lighting condition because of color filtering.

How to run:

bar.jpg

  • Download all the files in one folder and name in topic03_opencv
  • Copy and paste the folder in your catkin workspace. (e.g ..\catkin_ws\src\)
  • Once completed, go into catkin workspace. (..\catkin_ws\)
  • Open the terminal in the current directory(..\catkin_ws\) and compile the file using:

catkin_ws

  • Once done, open another terminal and run roscore
  • To run the USB_CAM, run:

rosrun usb_cam usb_cam_node _pixel_format:= yuyv

  • Then run the tennis_ball_usb_cam_tracker.py file
  • To run:

rosrun topic03_opencv tennis_ball_usb_cam_tracker.py

Requirements:

bar.jpg

  • ROS MELODIC.
  • UBUNTU 18.04 LTS.
  • OPENCV 3.4.2 or later version.
  • CVBRIDGE
  • USB_CAM ROS PACKAGE.

                                                                                      

About

The goal of this project was to write a an alogrithm for ball detection and tracking using Robotic Operating System(ROS) and OpenCV library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published