Member-only story

OpenCV Series —7 — Hough Circles detection and GOTURN tracker

Rajathithan Rajasekar
3 min readJul 30, 2020

--

Hough Circles detection and GOTURN tracker

In this post, we are going to see how we can use hough circles and GOTURN tracker for tracking a cricket ball and a football . The idea is simple, use Hough circles to detect the ball in a frame and initialize the GOTURN tracker for tracking the subsequent motion in the frame. If the tracker looses track of the object , we reinitialize the tracker using the hough circles detection.

For this example, we read the input from a video file, once the detection and tracking is completed, we output the data to a mp4 file. I have included the code and the github repository, so you can try it from your end, you can fork the repository and more than welcome to improve the code, before that let’s go ahead and see the various parameters of the Hough circles and GOTURN tracker.

Hough Circles

Hough Circles:circles = cv2.HoughCircles( image, method, dp, minDist[, circles[, param1[, param2[, minRadius[, maxRadius]]]]])ParametersOutput:circles - Output vector of found circles. Each vector is encoded as 3 or 4 element floating-point vector (x,y,radius) or (x,y,radius,votes)input:image - 8-bit, single-channel binary source image. The image may

--

--

Rajathithan Rajasekar
Rajathithan Rajasekar

Written by Rajathithan Rajasekar

I like to write code in Python . Interested in cloud , dataAnalysis, computerVision, ML and deepLearning. https://rajathithanrajasekar.medium.com/membership

No responses yet