How to distinguish specific type of balls using a switch, OpenCV, and Raspberry Pi?

asked 2016-10-01 21:55:14 -0600

aarvy gravatar image

I want to track different kinds of ball. e.g., football, basketball, table tennis ball, or cricket ball. There is a catch! But only one at a time!

If I keep a basketball in front of a camera and press a switch then I should be only detecting a basketball all the time, and not other balls. How to write the code in OpenCV for that? Is there an algorithm I can use here?

I am thinking to have a switch to Raspberry Pi to select a ball which would be in front of the camera.

edit retag flag offensive close merge delete

Comments

First of all, all ball shapes are round, so start by detecting round object using for example houghcircles. Secondly you will need to train classifiers using machine learning, able to differentiate between the different ball options. We will not supply you with ready made code, so dig in, start programming and get back with actual issues.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-10-03 09:05:20 -0600 )edit