Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ball detection #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Ball detection #12

wants to merge 3 commits into from

Conversation

Angelaq621
Copy link
Collaborator

Improved ball detection using erode and dilate methods

rishiskhare and others added 3 commits January 25, 2020 12:40
Add test images and file to test HoughCircles
Add code that uses hough circles to detect balls
@@ -2,15 +2,18 @@
import cv2 as cv


vidcap = cv.VideoCapture('test_photos_balls/yellowcheck.mp4')
#vidcap = cv.VideoCapture('test_photos_balls/yellowcheck.mp4')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get the ball detection stuff wrapped in the correct classes from the beginning.

@@ -19,6 +22,9 @@


mask = cv.inRange(hsv, low_yellow, high_yellow)
mask = cv.erode(mask,None, iterations=7)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what this is accomplishing?

@@ -30,7 +36,7 @@

th2 = cv.adaptiveThreshold(output[:,:,2], 255,cv.ADAPTIVE_THRESH_GAUSSIAN_C, cv.THRESH_BINARY,15,10)

circles = cv.HoughCircles(th2, cv.HOUGH_GRADIENT, 1.8, 20, param1=70, param2=50, minRadius=20, maxRadius=60)
circles = cv.HoughCircles(th2, cv.HOUGH_GRADIENT, 1.8, 40, param1=70, param2=50, minRadius=20, maxRadius=60)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get a comment describing what all these parameters are doing.

@AG6GR
Copy link
Contributor

AG6GR commented Feb 1, 2020

Do you have an example of how to run this?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants